MANDATORY RULES — VIOLATION IS FORBIDDEN
- Response language follows
languagesetting in.agent/config/user-preferences.yamlif configured. - NEVER skip steps. Execute from Step 0 in order. Explicitly report completion of each step to the user before proceeding to the next.
- You MUST use MCP tools throughout the entire workflow. This is NOT optional.
- Use code analysis tools (
get_symbols_overview,find_symbol,find_referencing_symbols,search_for_pattern) for code exploration. - Use memory tools (read/write/edit) for progress tracking.
- Memory path: configurable via
memoryConfig.basePath(default:.serena/memories) - Tool names: configurable via
memoryConfig.toolsinmcp.json - Do NOT use raw file reads or grep as substitutes. MCP tools are the primary interface for code and memory operations.
- Use code analysis tools (
- Read the workflow-guide BEFORE starting. Read
.agent/skills/workflow-guide/SKILL.mdand follow its Core Rules. - Follow the context-loading guide. Read
.agent/skills/_shared/context-loading.mdand load only task-relevant resources.
Phase 0: Initialization (DO NOT SKIP)
- Read
.agent/skills/workflow-guide/SKILL.mdand confirm Core Rules. - Read
.agent/skills/_shared/context-loading.mdfor resource loading strategy. - Read
.agent/skills/_shared/memory-protocol.mdfor memory protocol. - Read
.agent/skills/_shared/multi-review-protocol.md(11 review guides) - Read
.agent/skills/_shared/quality-principles.md(4 principles) - Read
.agent/skills/_shared/phase-gates.md(gate definitions) - Record session start using memory write tool:
- Create
session-coordinate-pro.mdin the memory base path - Include: session start time, user request summary, workflow version (pro)
- Create
Phase 1: PLAN (Steps 1-4)
Step 1: Create Plan & Review
// turbo Activate PM Agent to execute Steps 1-4:
- Analyze requirements.
- Define API contracts.
- Create a prioritized task breakdown.
- Execute Plan Review - Completeness (Step 2).
- Execute Meta Review (Step 3).
- Execute Over-Engineering Review (Step 4).
- Save plan to
.agent/plan.json. - Create
task-board.mdin memory path for dashboard compatibility. - Use memory write tool to record plan completion.
Step 2: Plan Review (Completeness)
- Executed by PM Agent: Ensure requirements are fully mapped.
Step 3: Review Verification (Meta Review)
- Executed by PM Agent: Self-verify if the review was sufficient.
Step 4: Over-Engineering Review (Simplicity)
- Executed by PM Agent: Check for unnecessary complexity (MVP focus).
PLAN_GATE
- [ ] Plan documented
- [ ] Assumptions listed
- [ ] Alternatives considered
- [ ] Over-engineering review done
- [ ] User confirmation
On gate pass: Use memory edit tool to record phase completion in session-coordinate-pro.md
Gate failure → Return to Step 1
Phase 2: IMPL (Step 5)
Step 5: Implementation
// turbo Spawn Implementation Agents (Backend/Frontend/Mobile) in parallel. Command:
oh-my-ag agent:spawn backend "Implement backend tasks per plan. IMPORTANT: Follow .agent/skills/_shared/context-loading.md rules." session-id -w ./backend &
oh-my-ag agent:spawn frontend "Implement frontend tasks per plan. IMPORTANT: Follow .agent/skills/_shared/context-loading.md rules." session-id -w ./frontend &
wait
Step 5.1: Monitor & Wait for Completion
Wait for all implementation agents to complete before proceeding.
- Use memory read tool to poll
progress-{agent}.mdfiles - Use MCP code analysis tools to verify implementation alignment
- Check for
result-{agent}.mdfiles to confirm completion - Use memory edit tool to record monitoring results in
session-coordinate-pro.md
Continue polling until all agents report completion or failure.
IMPL_GATE
- [ ] Build succeeds
- [ ] Tests pass
- [ ] Only planned files modified
On gate pass: Use memory edit tool to record phase completion in session-coordinate-pro.md
Gate failure → Return to Step 5, re-spawn failed agents, and repeat monitoring until GATE passes.
Phase 3: VERIFY (Steps 6-8)
Step 6-8: QA Verification
// turbo
Spawn QA Agent to execute Steps 6-8.
Command: oh-my-ag agent:spawn qa-agent "Execute Phase 3 Verification. Step 6: Alignment Review. Step 7: Security/Bug Review (npm audit, OWASP). Step 8: Improvement/Regression Review. IMPORTANT: Follow .agent/skills/_shared/context-loading.md rules." session-id
Monitor QA Agent Progress
Wait for QA Agent to complete verification before proceeding.
- Use memory read tool to poll
progress-qa-agent.md - Check for
result-qa-agent.mdto confirm completion - Use memory edit tool to record QA results in
session-coordinate-pro.md
Continue polling until QA Agent reports completion.
Step 6: Alignment Review
- Executed by QA Agent: Compare implementation vs plan.
Step 7: Security/Bug Review (Safety)
- Executed by QA Agent: Check for vulnerabilities (Safety).
Step 8: Improvement Review (Regression Prevention)
- Executed by QA Agent: Run regression tests.
VERIFY_GATE
- [ ] Implementation = Requirements
- [ ] CRITICAL count: 0
- [ ] HIGH count: 0
- [ ] No regressions
On gate pass: Use memory edit tool to record phase completion in session-coordinate-pro.md
Gate failure → Return to Step 5, fix implementation issues, and repeat VERIFY phase until GATE passes.
Phase 4: REFINE (Steps 9-13)
Step 9-13: Deep Refinement
// turbo
Spawn Debug Agent (or Senior Dev Agent) to execute Steps 9-13.
Command: oh-my-ag agent:spawn debug-agent "Execute Phase 4 Refine. Step 9: Split large files. Step 10: Integration check. Step 11: Side Effect analysis (find_referencing_symbols). Step 12: Consistency review. Step 13: Cleanup dead code. IMPORTANT: Follow .agent/skills/_shared/context-loading.md rules." session-id
Monitor Debug Agent Progress
Wait for Debug Agent to complete refinement before proceeding.
- Use memory read tool to poll
progress-debug-agent.md - Check for
result-debug-agent.mdto confirm completion - Use memory edit tool to record refinement results in
session-coordinate-pro.md
Continue polling until Debug Agent reports completion.
Step 9: Split Large Files/Functions
- Executed by Debug Agent: Files > 500 lines, Functions > 50 lines.
Step 10: Integration/Reuse Review (Reusability)
- Executed by Debug Agent: Check for duplicate logic.
Step 11: Side Effect Review (Cascade Impact)
- Executed by Debug Agent: Analyze impact scope.
Step 12: Full Change Review (Consistency)
- Executed by Debug Agent: Review naming and style.
Step 13: Clean Up Unused Code
- Executed by Debug Agent: Remove newly created dead code.
REFINE_GATE
- [ ] No large files/functions
- [ ] Integration opportunities captured
- [ ] Side effects verified
- [ ] Code cleaned
On gate pass: Use memory edit tool to record phase completion in session-coordinate-pro.md
Gate failure → Re-spawn Debug Agent with specific issues and repeat until GATE passes.
Skip conditions: Simple tasks < 50 lines
Phase 5: SHIP (Steps 14-17)
Step 14-17: Final QA & Deployment Readiness
// turbo
Spawn QA Agent to execute Steps 14-17.
Command: oh-my-ag agent:spawn qa-agent "Execute Phase 5 Ship. Step 14: Quality Review (lint/coverage). Step 15: UX Flow Verification. Step 16: Related Issues Review. Step 17: Deployment Readiness. IMPORTANT: Follow .agent/skills/_shared/context-loading.md rules." session-id
Monitor Final QA Progress
Wait for QA Agent to complete final review before proceeding.
- Use memory read tool to poll
progress-qa-agent.md - Check for
result-qa-agent.mdto confirm completion - Use memory edit tool to record final QA results in
session-coordinate-pro.md
Continue polling until QA Agent reports completion.
Step 14: Code Quality Review
- Executed by QA Agent: Lint, Types, Coverage.
Step 15: UX Flow Verification
- Executed by QA Agent: User journey check.
Step 16: Related Issues Review (Cascade Impact 2nd)
- Executed by QA Agent: Final impact check.
Step 17: Deployment Readiness Review (Final)
- Executed by QA Agent: Secrets, Migrations, checklist.
SHIP_GATE
- [ ] Quality checks pass
- [ ] UX verified
- [ ] Related issues resolved
- [ ] Deployment checklist complete
- [ ] User final approval
On gate pass: Use memory write tool to record final results in session-coordinate-pro.md
Gate failure → Address issues, re-run affected steps, and repeat until GATE passes.
Review Steps Summary
| Phase | Steps | Agent | Execution | Perspective | | ------ | ----- | ----------- | --------- | --------------------------------- | | PLAN | 1-4 | PM Agent | Inline | Completeness, Meta, Simplicity | | IMPL | 5 | Dev Agents | Spawn | Implementation | | VERIFY | 6-8 | QA Agent | Spawn | Alignment, Safety, Regression | | REFINE | 9-13 | Debug Agent | Spawn | Reusability, Cascade, Consistency | | SHIP | 14-17 | QA Agent | Spawn | Quality, UX, Cascade 2nd, Deploy |
Total 11 review steps → High quality guaranteed (PM Agent inline, others spawned)