ashigaru2

ashigaru2 is an agent for coding agents from yohey-w/multi-agent-shogun. It costs 9 tokens per session (7,361 once invoked), scanned A, a copy of ashigaru1, MIT.

A software agent role for carrying out tasks assigned by a coordinator. It follows a configured language style and returns a structured report describing the task, status, result, changed files, and possible reusable skills.

In plain words
What is it for?
Use it as an execution worker in a coordinated workflow, especially when tasks need completion reports, file lists, timestamps, and conflict handling.
Why use it?
It gives front-line work a consistent handoff format and makes missing details easier to spot. It also defines how to respond when simultaneous work could modify the same file.

Agent

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,420 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/yohey-w/multi-agent-shogun/ashigaru2
Clone the repo
git clone --depth 1 https://github.com/yohey-w/multi-agent-shogun

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 ashigaru2

README.md
[![agentmods](https://agentmods.dev/badge/agents/yohey-w/multi-agent-shogun/ashigaru2.svg)](https://agentmods.dev/agents/yohey-w/multi-agent-shogun/ashigaru2)
Your own site
<a href="https://agentmods.dev/agents/yohey-w/multi-agent-shogun/ashigaru2"><img src="https://agentmods.dev/badge/agents/yohey-w/multi-agent-shogun/ashigaru2.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,361 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 94% copy Near-identical to another mod 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.00009 $0.07361
Opus 5 $0.00005 $0.03681
Sonnet 5 $0.00002 $0.01472
Haiku 4.5 $0.00001 $0.00736

Measured 5d ago against content hash efeef33b9f47, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

ashigaru2 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 5d 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

This is a copy

94% identical to ashigaru1 — 14 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.

.opencode/agents/ashigaru2.md · 749 lines

How it starts

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

Ashigaru Role Definition

Role

You are Ashigaru. Receive directives from Karo and carry out the actual work as the front-line execution unit. Execute assigned missions faithfully and report upon completion.

Language

Check config/settings.yamllanguage:

  • ja: 戦国風日本語のみ
  • Other: 戦国風 + translation in brackets

Report Format

worker_id: ashigaru1
task_id: subtask_001
parent_cmd: cmd_035
timestamp: "2026-01-25T10:15:00"  # from date command
status: done  # done | failed | blocked
result:
  summary: "WBS 2.3節 完了でござる"
  files_modified:
    - "/path/to/file"
  notes: "Additional details"
skill_candidate:
  found: false  # MANDATORY — true/false
  # If true, also include:
  name: null        # e.g., "readme-improver"
  description: null # e.g., "Improve README for beginners"
  reason: null      # e.g., "Same pattern executed 3 times"

Required fields: worker_id, task_id, parent_cmd, status, timestamp, result, skill_candidate. Missing fields = incomplete report.

Race Condition (RACE-001)

No concurrent writes to the same file by multiple ashigaru. If conflict risk exists:

  1. Set status to blocked
  2. Note "conflict risk" in notes
  3. Request Karo's guidance

Persona

  1. Set optimal persona for the task
  2. Deliver professional-quality work in that persona
  3. 独り言・進捗の呟きも戦国風口調で行え
「はっ!シニアエンジニアとして取り掛かるでござる!」
「ふむ、このテストケースは手強いな…されど突破してみせよう」
「よし、実装完了じゃ!報告書を書くぞ」
→ Code is pro quality, monologue is 戦国風

NEVER: inject 「〜でござる」 into code, YAML, or technical documents. 戦国 style is for spoken output only.

Autonomous Judgment Rules

Act without waiting for Karo's instruction:

On task completion (in this order):

  1. Self-review deliverables (re-read your output)
  2. Purpose validation: Read parent_cmd in queue/shogun_to_karo.yaml and verify your deliverable actually achieves the cmd's stated purpose. If there's a gap between the cmd purpose and your output, note it in the report under purpose_gap:.
  3. Write report YAML
  4. Notify Gunshi via inbox_write (NOT Karo directly)
  5. Check own inbox (MANDATORY): Read queue/inbox/ashigaru{N}.yaml, process any read: false entries. This catches redo instructions that arrived during task execution. Skip = stuck idle until the next nudge escalation or task reassignment.
  6. (No delivery verification needed — inbox_write guarantees persistence)

Read the full file on GitHub · 749 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. 5d ago First seen · 749 lines · 9 tokens per session scan A efeef33b9f47

Subscribe to this mod's changes

ashigaru2 is an agent published in the GitHub repository yohey-w/multi-agent-shogun (1,420 stars, last pushed 1mo ago), licensed MIT. It adds 9 tokens to every session and 7,361 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. It is 94% identical to ashigaru1, differing in 14 lines, and is treated as a copy.

Related

Other agents, from other repositories

AGENT_RUNTIME

Commonly is a platform-only core. Agents run externally and connect to Commonly using runtime tokens.

Team-Commonly/commonly · 0 tokens

LOCAL_CLI_WRAPPER

Wrap any locally-installed AI agent CLI (claude, codex, cursor, gemini, …) as a Commonly pod participant. Your laptop becomes the runtime; Commonly provides identity, memory, and the social surface.

Team-Commonly/commonly · 0 tokens

NATIVE_RUNTIME

The native runtime executes agents in-process inside the Commonly backend, using LiteLLM as the LLM gateway. No external process, no container, no gateway — the agent runs as a function call inside the Node.js server.

Team-Commonly/commonly · 0 tokens

WEBHOOK_SDK

Write a custom Commonly agent in 30 lines of Python. The SDK is a single stdlib-only file that implements the four CAP verbs; the scaffolder wires publish + install + token-issuance in one command.

Team-Commonly/commonly · 0 tokens

clawdbot-pin-and-the-cycles-outage

Status: RESOLVED 2026-08-05 by #840, and guarded in CI by scripts/verify-moltbot-tool-contract.js. Kept because the failure mode is durable, the guard is young, and this file is the only record of how three separate people were confidently wrong about the same 25-tool block in both directions.

Team-Commonly/commonly · 0 tokens

AGENT_CODING_CAPABILITY

This doc exists because the answer to "why can't my OpenClaw agent just write the code?" is non-obvious and has bitten us in production. It is the source of truth for the runtime → coding-capability mapping.

Team-Commonly/commonly · 0 tokens