| name | muai-workflow |
| description | Multi-AI workflow with cross-review and human approval gate. Use when planning features, generating implementation plans, reviewing plans from other AIs, executing approved plans, or handing off work between AI agents. Activates on plan generation, code review, and multi-step feature implementation. |
MuAiFlow — Multi-AI Workflow
You follow a structured plan→review→approve→execute pipeline. No AI can execute code without human approval.
Core Flow
[You] Generate plan → status: DRAFT
[Other AI] Cross-review → status: AI_REVIEWED
⏸️ STOP — wait for human approval
[Human] Approves → status: HUMAN_APPROVED
[You] Execute → status: EXECUTING → DONE
⚠️ BLOCKING RULE
NEVER set status: HUMAN_APPROVED or fill human_approved_by. Only the human does this. If human_approved_by is empty, STOP before executing any task.
Plan Format
Plans live in .ai/plans/tracked/YYYY-MM-DD-title.md for tracked work or .ai/plans/local/YYYY-MM-DD-title.md for private local work, using this frontmatter:
---
status: DRAFT
author: [your name]
review_required: true
reviewer_ai:
human_approved_by:
human_approved_at:
branch: feature/name
created_at: YYYY-MM-DDTHH:mm:ss
---
Status Flow
DRAFT → AI_REVIEWED → HUMAN_APPROVED → EXECUTING → DONE
↓ ↓
CHANGES_REQUESTED BLOCKED
When Generating a Plan
- Read
.ai/plans/TEMPLATE.md for the full template
- Read project conventions (CLAUDE.md or AGENTS.md)
- Read
.ai/plans/context.md if it exists (large reference data; reusable skeleton at .ai/plans/CONTEXT_TEMPLATE.md)
- Verify every file path you cite actually exists
- Set
status: DRAFT, fill author, branch, created_at
- Set
review_required: true for: DB changes, auth, external APIs, refactors > 5 files
- Each task must have: Type, Depends on, Complexity, Model tier, Files, Description, Acceptance criteria
When Reviewing a Plan
- Read the plan completely
- Verify EVERY file path cited — read the actual files
- Cite
file:line when pointing out risks
- Separate BLOCKERS (must fix) from SUGGESTIONS (optional)
- Check: tests exist for business logic, no security gaps, migrations planned
- Set
status: AI_REVIEWED or CHANGES_REQUESTED
- NEVER set
HUMAN_APPROVED
When Executing a Plan
- Verify
status is HUMAN_APPROVED and human_approved_by is filled — if not, STOP
- Follow task dependency order
- Mark acceptance criteria as done after each task
- Run verification commands after each task
- If a build, test, lint, or check stalls or fails only in a restricted or sandboxed environment, re-run the exact same command with elevated permissions or outside the restriction before treating it as a project failure
- If blocked, set
status: BLOCKED and explain why
- After all tasks: run Final Verification, set
status: DONE
Use Next.js/Turbopack stuck at Creating an optimized production build ... only as an example of this rule, not as the main case.
Model Tiers (per task)
- reasoning — architecture, planning, complex debugging
- standard — business logic, integration, normal implementation
- fast — boilerplate, styles, tests, i18n, docs
Handoff (switching AIs)
Before ending your session, fill the plan's Handoff section:
- Last AI, Last task, Progress, Next step, Blockers, Extra context