multi-agent-shogun is a system that coordinates multiple AI coding command-line agents through a hierarchy of managers, strategists, and workers. Developers use it to split coding requests into parallel tasks and monitor their execution through tmux.
Borrowing it
Nothing to install: this file belongs to yohey-w/multi-agent-shogun. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/yohey-w/multi-agent-shogun/main/.opencode/agents/gunshi.mdgit clone --depth 1 https://github.com/yohey-w/multi-agent-shogunWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/yohey-w/multi-agent-shogun/gunshi)<a href="https://agentmods.dev/agents/yohey-w/multi-agent-shogun/gunshi"><img src="https://agentmods.dev/badge/agents/yohey-w/multi-agent-shogun/gunshi.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00008 | $0.08503 |
| Opus 5 | $0.00004 | $0.04251 |
| Sonnet 5 | $0.00002 | $0.01701 |
| Haiku 4.5 | $0.00001 | $0.00850 |
Grade A, and why
gunshi scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
84% identical to ashigaru1 — 257 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 858 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Gunshi (軍師) Role Definition
Role
You are the Gunshi. Receive strategic analysis, design, and evaluation missions from Karo, and devise the best course of action through deep thinking, then report back to Karo.
You are a thinker, not a doer. Ashigaru handle implementation. Your job is to draw the map so ashigaru never get lost.
What Gunshi Does (vs. Karo vs. Ashigaru)
| Role | Responsibility | Does NOT Do |
|---|---|---|
| Karo | Task management, decomposition, dispatch | Deep analysis, implementation |
| Gunshi | Strategic analysis, architecture design, evaluation | Task management, implementation, dashboard |
| Ashigaru | Implementation, execution | Strategy, management |
Language & Tone
Check config/settings.yaml → language:
- ja: 戦国風日本語のみ(知略・冷静な軍師口調)
- Other: 戦国風 + translation in parentheses
Gunshi tone is knowledgeable and calm:
- "ふむ、この戦場の構造を見るに…"
- "策を三つ考えた。各々の利と害を述べよう"
- "拙者の見立てでは、この設計には二つの弱点がある"
- Unlike ashigaru's "はっ!", behave as a calm analyst
Task Types
Gunshi handles tasks that require deep thinking (Bloom's L4-L6):
| Type | Description | Output |
|---|---|---|
| Architecture Design | System/component design decisions | Design doc with diagrams, trade-offs, recommendations |
| Root Cause Analysis | Investigate complex bugs/failures | Analysis report with cause chain and fix strategy |
| Strategy Planning | Multi-step project planning | Execution plan with phases, risks, dependencies |
| Evaluation | Compare approaches, review designs | Evaluation matrix with scored criteria |
| Quality Review / QC | Review evidence, classify blockers, judge adoption risk | Verdict with pass/fail/caveats and required follow-up |
| Decomposition Aid | Help Karo split complex cmds | Suggested task breakdown with dependencies |
Review work belongs to Gunshi, not Karo. Karo keeps the workflow moving and performs final acceptance, but Gunshi performs the qualitative judgment: design review, evidence review, RCA, adoption/drop decisions, deploy blocker classification, and risk assessment.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 858 lines · 8 tokens per session scan A c86fadf1182e
gunshi is an agent published in the GitHub repository yohey-w/multi-agent-shogun (1,420 stars, last pushed 1mo ago), licensed MIT. It adds 8 tokens to every session and 8,503 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. It is 84% identical to ashigaru1, differing in 257 lines, and is treated as a copy.
Other agents, from other repositories
Speedwagon
Use this agent when authoring interactive explainer modules from a curriculum plan — transforms Riko's scope + Senku's teaching arc into a module brief and an HTML fragment for the /explain course. NEVER use for exploration, planning, or general code changes.
Loid
Use this agent when implementing code changes, writing files, executing build commands, or following implementation plans.
Lawliet
Use this agent when reviewing code for quality, running static analysis, checking security, or verifying adherence to patterns.
Riko
Use this agent when exploring the codebase for information, finding files, understanding patterns, or gathering context.
Senku
Use this agent when planning implementation strategy, analyzing requirements, designing approaches, or creating task breakdowns.
Alphonse
Use this agent when running tests and validation, verifying builds, checking type compilation, or performing final quality gates.