multi-agent-shogun: Instructions file for Claude Code

.github/copilot-instructions.md

multi-agent-shogun copilot-instructions.md is an instructions file for Claude Code, GitHub Copilot from yohey-w/multi-agent-shogun. It costs 5,048 tokens per session, scanned A, original, MIT.

Instructions for a GitHub Copilot CLI setup where multiple coding agents work in parallel through tmux, a terminal session manager. They define agent roles, startup and recovery steps, shared task data, and forbidden actions.

In plain words
What is it for?
Use them when starting or recovering an agent session, reading assigned work, checking shared memory, or coordinating parallel development.
Why use it?
They help each agent identify its role and rebuild the correct project state before acting, reducing coordination mistakes.

Instructions file for Claude CodeGitHub Copilot

Written for Claude Code and GitHub Copilot: SessionStart hook event, but also a Copilot instructions file. Also seen: mentions Codex; mentions OpenCode.

This is yohey-w/multi-agent-shogun's own configuration. It tells Claude Code and GitHub Copilot how to work on multi-agent-shogun itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything multi-agent-shogun configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash scripts/inbox_write.sh <target_agent> "<message>" <type> <from>.

About the project

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.

yohey-w/multi-agent-shogun · 1,424 stars · on GitHub

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/yohey-w/multi-agent-shogun/main/.github/copilot-instructions.md
Clone the repo
git clone --depth 1 https://github.com/yohey-w/multi-agent-shogun

Made for: Claude Code, GitHub Copilot.

Wrote 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.

agentmods badge for multi-agent-shogun copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/yohey-w/multi-agent-shogun/copilot-instructions/github.svg)](https://agentmods.dev/instructions/yohey-w/multi-agent-shogun/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/yohey-w/multi-agent-shogun/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/yohey-w/multi-agent-shogun/copilot-instructions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for multi-agent-shogun copilot-instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/yohey-w/multi-agent-shogun/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/yohey-w/multi-agent-shogun/copilot-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,048 This file is loaded in full into every session.
When invoked 5,048 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. ✓ AI security review Sonnet 5 · 7 Sept 2026 📄 Read the review
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.05048 $0.05048
Opus 5.5 $0.02019 $0.02019
Sonnet 5.5 $0.01010 $0.01010
Haiku 4.5 $0.00505 $0.00505

Measured 1mo ago against content hash 3527fae1fde9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

multi-agent-shogun copilot-instructions.md 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 1mo 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.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

.github/copilot-instructions.md · 314 lines

How it starts

The opening of the file, as written. The whole thing — 314 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Procedures

Session Start / Recovery (all agents)

This is ONE procedure for ALL situations: fresh start, compaction, session continuation, or any state where you see copilot-instructions.md. You cannot distinguish these cases, and you don't need to. Always follow the same steps.

  1. Identify self: tmux display-message -t "$TMUX_PANE" -p '#{@agent_id}'
  2. Read memory/MEMORY.md (shogun only) — persistent cross-session memory. If file missing, skip. GitHub Copilot CLI users: this file is also auto-loaded via GitHub Copilot CLI's memory feature.
  3. Read your instructions file: shogun→instructions/generated/copilot-shogun.md, karo→instructions/generated/copilot-karo.md, ashigaru→instructions/generated/copilot-ashigaru.md, gunshi→instructions/generated/copilot-gunshi.md. NEVER SKIP — even if a conversation summary exists. Summaries do NOT preserve persona, speech style, or forbidden actions.
  4. Rebuild state from primary YAML data (queue/, tasks/, reports/)
  5. Review forbidden actions, then start work

CRITICAL: Steps 1-2を完了するまでinbox処理するな。inboxN nudgeが先に届いても無視し、自己識別→memory→instructions読み込みを必ず先に終わらせよ。Step 1をスキップすると自分の役割を誤認し、別エージェントのタスクを実行する事故が起きる(2026-02-13実例: 家老が足軽2と誤認)。

(2026-07-01廃止): Memory MCP(mcp__memory__*、server-memoryバックエンド)は廃止した。設計上「簡潔な索引」であるべきところ自己肥大化(read_graph単体でトークン上限超過)し、かつ発火が完全に手動依存(hook等の強制力なし)で実際に長期間呼ばれず死蔵していたため。memory/MEMORY.md+個別ファイルのfile-based系統のみが正本。

CRITICAL: dashboard.md is secondary data (karo's summary). Primary data = YAML files. Always verify from YAML.

/clear Recovery (ashigaru only)

Lightweight recovery using only copilot-instructions.md (auto-loaded). Do NOT read instructions/*.md (cost saving).

Step 1: tmux display-message -t "$TMUX_PANE" -p '#{@agent_id}' → ashigaru{N}
Step 2: Read queue/tasks/{your_id}.yaml →
        assigned=work (execute task), idle=wait, done=wait (DO NOT re-report)
Step 3: If task has "project:" field → read context/{project}.md
        If task has "target_path:" → read that file
Step 4: Start work (only if assigned=work)

Read the full file on GitHub · 314 lines

Changes

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.

  1. 1mo ago First seen · 314 lines · 5,048 tokens per session scan E 3527fae1fde9

Subscribe to this mod's changes

multi-agent-shogun copilot-instructions.md is an instructions file published in the GitHub repository yohey-w/multi-agent-shogun (1,424 stars, last pushed 2mo ago), licensed MIT. It adds 5,048 tokens to every session, about $0.0202 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,649 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,549 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens