ワンクリックで
aim-agent-dispatch
Generic and BMAD agent selection, instruction preparation, and activation routing
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Generic and BMAD agent selection, instruction preparation, and activation routing
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Detect content drift of an operator's scaffolded sanctum files (BOND, CAPABILITIES, CREED, INDEX, LORE, MEMORY, PERSONA, PULSE) against the evolving reference templates, and surface recommended add/remove WITH rationale — never a silent overwrite. Use on a session-start drift check, after the reference templates change, or when the operator asks whether their sanctum is current.
Check ai-memory system status and collection stats
Check ai-memory system status and collection stats
Manually save current session context to ai-memory
Search ai-memory for relevant stored memories
Search ai-memory for relevant stored memories
| name | aim-agent-dispatch |
| description | Generic and BMAD agent selection, instruction preparation, and activation routing |
| allowed-tools | Read |
Purpose: Prepare instructions for all agents (generic and BMAD). Determines if BMAD persona is needed and routes accordingly. BMAD routing is handled within this skill.
Before routing any dispatch, assert the current directory is the workspace root by confirming co-presence of _ai-memory/, _bmad/, and oversight/ (CLAUDE.md workspace-root sentinel). Concretely: test -d _ai-memory && test -d _bmad && test -d oversight.
CWD drifts across Bash calls, so re-run this gate immediately before EACH spawn -- not once per session.
BMAD dispatch (use the BMAD Agent Dispatch section below) when:
/bmad-agent-<name> commandsGeneric dispatch (use the Generic Agent Dispatch section below) when:
Mandatory (BMAD-or-fail): if the task maps to any BMAD role/skill above, you MUST dispatch that
BMAD persona. A generic/no-persona agent on BMAD-shaped work is a FAILED dispatch — shut it down and
respawn via the correct /bmad-*. Generic dispatch is only for work with no BMAD role.
Build the instruction using the instruction template (templates/agent-instruction.template.md):
Before dispatching, verify the instruction is:
IF ANY CHECK FAILS: fix the instruction before proceeding.
Check provider from the dispatch plan:
Claude provider: → /aim-model-dispatch (MANDATORY next step) Pass: instruction, AI_MEMORY_AGENT_ID, model from dispatch plan.
Non-Claude provider: → /aim-agent-lifecycle (MANDATORY next step) Pass: instruction, AI_MEMORY_AGENT_ID, provider, model from dispatch plan.
MUST spawn fresh agent for every task -- never reuse across roles or stories.
Agent instruction prepared and routed. Downstream skill handles spawn and activation.
See agent-selection-guide.md for detailed role descriptions, selection criteria, and dispatch decision tree.
| Task Type | Correct Agent | Wrong Agent | Mode |
|---|---|---|---|
| Research current codebase state | Analyst | Architect | Planning |
| Create, validate, or update PRD | PM | Analyst | Planning |
| Break down features into stories | PM | Analyst | Planning |
| Design system architecture | Architect | PM | Planning |
| Check if implementation is ready | Architect | DEV | Planning |
| Plan and initialize a sprint | /bmad-sprint-planning (direct skill) | PM | Planning |
| Create individual story files | /bmad-create-story (direct skill) | PM | Execution |
| Write code / implement a story | DEV | Any other | Execution |
| Review implemented code | DEV | Architect | Execution |
| Design user flows and screens | UX Designer | PM | Planning |
| Write or review documentation | Tech Writer | PM | Execution |
| Write and run tests | /bmad-qa-generate-e2e-tests (direct skill) | DEV | Execution |
| Design test architecture/strategy | /bmad-tea (direct skill) | DEV | Planning |
| Small feature, solo workflow | /bmad-quick-dev (direct skill) | DEV | Execution |
| Research best practices / conventions / coding standards | /aim-best-practices-researcher (direct skill) | hand-rolled web search | Research |
Some phases require agents in sequence:
/bmad-retrospective (direct skill) -> PM or Analyst (documentation update)Use the selection guide and matrix above. When uncertain, assess the primary skill required by the task, not the phase you are in.
If still uncertain, use /bmad-help -- it can answer questions about which agent and workflow to use for a given task.
Extends the generic instruction template (from the Generic Agent Dispatch section above) with:
Check provider from the dispatch plan:
Claude provider: → /aim-model-dispatch (MANDATORY next step) Pass: BMAD activation command, instruction, AI_MEMORY_AGENT_ID, model from dispatch plan.
Non-Claude provider: → /aim-agent-lifecycle (MANDATORY next step) Pass: BMAD activation command, instruction, AI_MEMORY_AGENT_ID, provider, model from dispatch plan.
MUST spawn fresh agent for every task -- never reuse across roles or stories.
| Agent | Activation Command | Description |
|---|---|---|
| Analyst | /bmad-agent-analyst | Research, codebase analysis, domain investigation |
| PM (Product Manager) | /bmad-agent-pm | PRD creation/validation, epics and stories |
| Architect | /bmad-agent-architect | System architecture design, readiness checks |
| Developer (DEV) | /bmad-agent-dev | Code implementation ONLY |
| Developer (review) | /bmad-code-review | Code review ONLY -- MUST use this for ALL review agents, never /bmad-agent-dev |
| UX Designer | /bmad-agent-ux-designer | User flows, screen design, UX research |
| Tech Writer | /bmad-agent-tech-writer | Documentation writing and validation |
MUST use /bmad-agent-tech-writer for ALL documentation tasks (writing, updating, reviewing docs). MUST use /bmad-code-review for ALL review agents (never /bmad-agent-dev). MUST use /bmad-help whenever unsure which agent or workflow to use -- the tables above are NOT exhaustive.
MUST route ALL best-practice / conventions / coding-standard research through /aim-best-practices-researcher -- never hand-run web searches for this. The skill saves the finding to a BP file and stores it to the project-scoped conventions collection, so hand-rolling the research loses it to future sessions.
Workflow commands by phase (sent AFTER activation, when in planning mode):
| Phase | Agent | Workflow Command |
|---|---|---|
| Research | Analyst | /bmad-market-research, /bmad-domain-research, /bmad-technical-research |
| Discovery | Analyst | /bmad-product-brief |
| Discovery (or any phase) | PM | /bmad-create-prd, /bmad-validate-prd, /bmad-edit-prd |
| Architecture | Architect | /bmad-create-architecture |
| Architecture | PM | /bmad-create-epics-and-stories |
| Architecture | Architect | /bmad-check-implementation-readiness |
| Architecture | UX Designer | /bmad-ux |
| Planning | (direct skill) | /bmad-sprint-planning, /bmad-create-story |
| Execution | DEV | /bmad-dev-story |
| Execution | DEV | /bmad-code-review |
| Research | (direct skill) | /aim-best-practices-researcher |
| Release | (direct skill) | /bmad-retrospective |
Set AI_MEMORY_AGENT_ID environment variable when spawning.
Maintenance check:
scripts/check_bmad_commands.shverifies every/bmad-*command in the tables above resolves to an installed skill under.claude/skills/(fire-only-if-missing: silent when all resolve, non-zero listing any that don't; degrades gracefully when BMAD is not installed). Run it after editing these tables or updating the BMAD module.
Sentinel (CLAUDE.md workspace-root): before every spawn, as its own Bash step, assert workspace root:
test -d _ai-memory && test -d _bmad && test -d oversight. FAIL → ABORT.
Spawn (two-phase, GC-20): the spawn prompt loads the BMAD persona via the Skill tool (e.g.
Use the Skill tool to load bmad-agent-dev — likewise bmad-create-story, bmad-code-review; a bare
/bmad-* at spawn activates the lead, not the persona) + one line — "You're activated as a teammate
under Parzival (team-lead). Once activated, SendMessage your activation reply (greeting + menu, and
anything the agent asks) to team-lead, then wait for my instructions before doing any work." Never the
task. mode: auto.
Wait: idle pings (idle_notification "available") are NOISE — no reaction, no on-disk checks, no
nudges; the teammate sends a real message when it has one.
Instruct: read the menu, then SendMessage the task — one task per message, never bundled (GC-20).
Agent selection and instruction complete. Downstream skill handles spawn and activation.
team-lead. to:"main" is background-subagents-only; a teammate using it is rejected and the lead
receives nothing (plain text is invisible between agents). Every report/answer → team-lead.review-cycle/workflow.md (## Reviewer Disagreement).tmux capture-pane.)| Error | Prevention |
|---|---|
| Sending vague instruction | Always complete the full instruction template |
| Combining multiple tasks | One task per instruction -- always |
| Activating wrong agent | Use the BMAD selection matrix above |
| Accepting partial output | Review all DONE WHEN criteria |
| Passing raw agent output to user | Always prepare summary |
| Running agents without verification | Complete instruction checklist first |
| Starting new task before prior accepted | One active task per agent at a time |
| PM activated with thin input | Run Analyst first (DC-08) |
Convention: All POV skill templates use the
.template.mdextension to distinguish them from step files and other markdown documents.
The full instruction template is at: templates/agent-instruction.template.md