MoAI-ADK — Prompts
Prompt 1: Unified Orchestrator (moai SKILL.md) — Natural Language Router
Source: .claude/skills/moai/SKILL.md
Technique: Priority-ordered natural language routing with explicit subcommand matching before semantic classification.
---
name: moai
description: >
MoAI unified orchestrator for autonomous development. Routes natural
language or subcommands (brain, plan, run, sync, design, project, fix,
loop, mx, feedback, review, clean, codemaps, coverage, e2e, harness) to
specialized agents.
allowed-tools: Agent, AskUserQuestion, Skill, TaskCreate, TaskUpdate, TaskList,
TaskGet, Bash, Read, Write, Edit, Glob, Grep
## Intent Router
### Priority 1: Explicit Subcommand Matching
[HARD] Extract the FIRST WORD from the Raw User Input. If it matches any subcommand
(or its alias), route to that workflow IMMEDIATELY. Do NOT analyze the remaining text.
- **brain** (aliases: ideate, idea): Pre-spec ideation
- **plan** (aliases: spec): SPEC document creation
- **run** (aliases: impl): DDD/TDD implementation
- **sync** (aliases: docs, pr): Documentation + PR
- ...
### Priority 2: SPEC-ID Detection
Only if Priority 1 did not match: Check if input contains SPEC-XXX pattern.
If found, route to **run** workflow automatically.
### Priority 3: Natural Language Classification
Only if BOTH Priority 1 AND 2 did not match: Classify entire input semantically.
### Priority 4: Default Behavior
If ambiguous: AskUserQuestion with top 2-3 matching workflows.
Notable technique: Strict priority chain (exact match → ID match → semantic → ask) prevents the routing from being confused by similar-sounding but different commands.
Prompt 2: Execution Mode Flags
Source: .claude/skills/moai/SKILL.md
Technique: Automatic complexity-based execution mode selection with explicit flag overrides.
## Execution Mode Flags (mutually exclusive)
- `--team`: Force Agent Teams mode for parallel execution
- `--solo`: Force sub-agent mode (single agent per phase)
- No flag: System auto-selects based on complexity thresholds
(domains >= 3, files >= 10, or complexity score >= 7)
When no flag is provided, the system evaluates task complexity and automatically
selects between team mode (for complex, multi-domain tasks) and sub-agent mode
(for focused, single-domain tasks).
Notable technique: Automatic complexity-based mode selection — the agent assesses domains and file count to decide whether to spawn a full team or a single subagent. No other framework automates this decision.
Prompt 3: MX Tag Protocol
Source: .claude/rules/moai/workflow/mx-tag-protocol.md (referenced in SKILL.md)
Technique: Inline code annotation system. MX tags are structured comments embedded in code that carry semantic context for agents. The /moai mx command scans and annotates codebases; the review command checks for MX compliance.
This is unique in the corpus — a framework-native code annotation protocol for encoding agent context directly in source files.