Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@
!.opencode/tools/mark-as-read.ts

# Setup and deployment scripts
!shutsujin_departure.sh
!first_setup.sh
!setup.sh
!install.bat
!shutsujin_departure.sh
!first_setup.sh
!setup.sh
!install.bat
!Configure-Agents.sh
!Configure-Agents.bat
!Configure-Agents.command

# Development tooling
!Makefile
Expand Down Expand Up @@ -109,9 +112,10 @@
!scripts/stop_hook_inbox.sh
!scripts/session_start_hook.sh
!scripts/agent_status.sh
!scripts/ratelimit_check.sh
!scripts/switch_cli.sh
!scripts/dashboard-viewer.py
!scripts/ratelimit_check.sh
!scripts/switch_cli.sh
!scripts/configure_agents.py
!scripts/dashboard-viewer.py


# SayTask (sample template only, not actual data)
Expand Down
58 changes: 58 additions & 0 deletions Configure-Agents.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
@echo off
setlocal EnableExtensions EnableDelayedExpansion
chcp 65001 >nul 2>&1
title multi-agent-shogun Agent Configurator

set "SCRIPT_DIR=%~dp0"
if "%SCRIPT_DIR:~-1%"=="\" set "SCRIPT_DIR=%SCRIPT_DIR:~0,-1%"

echo.
echo +============================================================+
echo ^| [SHOGUN] multi-agent-shogun - Agent Configurator ^|
echo ^| Runs agent configuration inside Ubuntu/WSL ^|
echo +============================================================+
echo.

if not exist "%SCRIPT_DIR%\scripts\configure_agents.py" (
echo [ERROR] scripts\configure_agents.py not found next to this launcher.
echo Run this bat from the multi-agent-shogun folder.
echo.
pause
exit /b 1
)

wsl.exe -d Ubuntu -- echo test >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Ubuntu on WSL is not ready.
echo Finish Ubuntu initial setup, then run first_setup.sh in WSL.
echo.
pause
exit /b 1
)

for /f "usebackq delims=" %%I in (`wsl.exe -d Ubuntu -- wslpath -a "%SCRIPT_DIR%"`) do set "REPO_WSL=%%I"
if not defined REPO_WSL (
echo [ERROR] Failed to resolve WSL path from:
echo %SCRIPT_DIR%
echo.
pause
exit /b 1
)

wsl.exe -d Ubuntu -- bash -lc "cd \"%REPO_WSL%\" && python3 scripts/configure_agents.py %*"
set "CONFIG_EXIT=%ERRORLEVEL%"
if not "%CONFIG_EXIT%"=="0" (
echo.
echo [ERROR] Configurator failed with exit code %CONFIG_EXIT%.
echo.
pause
exit /b %CONFIG_EXIT%
)

echo.
echo [OK] Agent configuration finished.
echo Restart runtime with:
echo bash shutsujin_departure.sh -c
echo.
pause
exit /b 0
30 changes: 30 additions & 0 deletions Configure-Agents.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
# macOS Finder launcher for Shogun agent configuration.

set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$SCRIPT_DIR"

echo ""
echo " +============================================================+"
echo " | [SHOGUN] multi-agent-shogun - Agent Configurator |"
echo " | Choose CLI type per role and active ashigaru count |"
echo " +============================================================+"
echo ""

if [[ ! -f "scripts/configure_agents.py" ]]; then
echo " [ERROR] scripts/configure_agents.py not found."
echo " Put this .command file in the multi-agent-shogun folder."
echo ""
read -r -p "Press Enter to close..."
exit 1
fi

python3 scripts/configure_agents.py "$@"

echo ""
echo " [OK] Agent configuration finished."
echo " Restart runtime with: bash shutsujin_departure.sh -c"
echo ""
read -r -p "Press Enter to close..."
26 changes: 26 additions & 0 deletions Configure-Agents.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# Configure Shogun role CLI types and active ashigaru count.

set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"

echo ""
echo " +============================================================+"
echo " | [SHOGUN] multi-agent-shogun - Agent Configurator |"
echo " | Choose CLI type per role and active ashigaru count |"
echo " +============================================================+"
echo ""

if [[ ! -f "scripts/configure_agents.py" ]]; then
echo " [ERROR] scripts/configure_agents.py not found."
echo " Run this launcher from the multi-agent-shogun folder."
exit 1
fi

python3 scripts/configure_agents.py "$@"

echo ""
echo " [OK] Agent configuration finished."
echo " Restart runtime with: bash shutsujin_departure.sh -c"
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ Then restart your computer and run `install.bat` again.
|--------|---------|-------------|
| `install.bat` | Windows: WSL2 + Ubuntu setup | First time only |
| `first_setup.sh` | Install tmux, Node.js, Claude Code CLI + Memory MCP config | First time only |
| `Configure-Agents.sh` / `.bat` / `.command` | Guided CUI for role CLI assignment and Ashigaru count | When changing formation |
| `shutsujin_departure.sh` | Create tmux sessions + launch the configured CLI for each agent + load instructions + start ntfy listener | Daily |
| `scripts/switch_cli.sh` | Live switch agent CLI/model (settings.yaml → /exit → relaunch) | As needed |

Expand Down Expand Up @@ -584,7 +585,14 @@ Detailed project knowledge (requirements, design, past feedback) lives in `conte

#### 3. Customizing the agent formation

The agent formation (which CLI each agent uses) lives in `config/settings.yaml`:
The agent formation (which CLI each agent uses) lives in `config/settings.yaml`.
For guided setup, run the small configurator:

```bash
bash Configure-Agents.sh
```

It asks for `cli.default`, then Shogun, Karo, Gunshi, the active Ashigaru count, and each Ashigaru's CLI type. It preserves existing `model`, `variant`, and `thinking` fields by default.

```yaml
cli:
Expand Down
10 changes: 9 additions & 1 deletion README_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ wsl --install
|-----------|------|---------------|
| `install.bat` | Windows: WSL2 + Ubuntu のセットアップ | 初回のみ |
| `first_setup.sh` | tmux、Node.js、Claude Code CLI のインストール + Memory MCP設定 | 初回のみ |
| `Configure-Agents.sh` / `.bat` / `.command` | 役職ごとの CLI と足軽人数を対話式に設定 | 陣営構成を変える時 |
| `shutsujin_departure.sh` | tmuxセッション作成 + エージェントごとの設定済みCLI起動 + 指示書読み込み + ntfyリスナー起動 | 毎日 |
| `scripts/switch_cli.sh` | エージェントのCLI/モデルをライブ切替(settings.yaml → /exit → 再起動) | 必要時 |

Expand Down Expand Up @@ -588,7 +589,14 @@ notes: |

#### 3. エージェント構成のカスタマイズ

陣営構成(誰にどのCLIを使わせるか)は `config/settings.yaml`:
陣営構成(誰にどのCLIを使わせるか)は `config/settings.yaml`。
対話式に設定したい場合は、簡易 CUI を使えます:

```bash
bash Configure-Agents.sh
```

`cli.default`、将軍、家老、軍師、足軽人数、各足軽の CLI 種別の順に聞きます。既存の `model`、`variant`、`thinking` はデフォルトでは保持します。

```yaml
cli:
Expand Down
Loading