Problem: Unstructured coding leads to scope drift, missing validation, autonomous runaway, and misaligned deliverables. Solution: Sequential workflow with reviewer gates, HITL gates, subagent delegation, and skill-driven execution scaled per Request size classification. Validation: Each phase produces verifiable outputs; reviewer catches issues before user; HITL gates prevent autonomous runaway; final validation confirms implementation matches approved intent.
- All Rosetta prep steps MUST be FULLY completed
- MUST USE SKILL
load-project-context(required: all),orchestration(all except trivial),hitl(all, unlessNo HITLorFully Autonomous) - MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel.
- No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping, if in doubt - select the safest / longest path, no deviation from the workflow is allowed
- When debugging is needed, INVOKE SUBAGENT
engineerwithdebuggingskill to save LLM context - INVOKE SUBAGENT
executorfor building, running tests, installing packages, and similar mechanical actions. - MUST just-in-time load each phase's skills
- If workflow is for REQUIREMENTS, MUST USE SKILL
requirements-useand LOAD all affected requirements. Use refs to requirements for subagents. - If
/goalis set repeat phases 7-12 postponing user_review_impl and final_validation until goal is met. - If migrate/modernize: implementation phase MUST use tiny batches ONLY (1-3 files), never bulk-read (other phases may); specs/plan enforce; FS-copy RECOMMENDED; no behavior change/new code; mirror source; subagents same; REQUIRED TO log started/completed; Use impl subagents like MAP-REDUCE;
- Run architect subagent with required model in the background and consult with it if already supported or prefer advisor if already available
- Coding workflow state MUST be saved to
agents/TEMP/<FEATURE>/coding-flow-state.mdfile. - If context already contains request for TDD => implement properly red and green adjusting this workflow, including by moving execution of phases
testsandreview_teststo be afteruser_review_planand beforeimplementation.
- Gather project context, affected areas, dependencies, constraints, requirements. SMALL: orchestrator handles inline.
- Input: user request +
CONTEXT.md+ARCHITECTURE.md+IMPLEMENTATION.md. Output:discovery-notes.mdin FEATURE PLAN folder. - Required skills:
load-project-context - Recommended skills:
codemap(structural project discovery) - If REQUIREMENTS in use:
requirements-useskill is required. - Additionally request to discover existing libraries, packages, search web for similar problems/tasks (if this make sense)
- Update
coding-flow-state.md - Do not stop until 100% clear
- Step 1: discover affected and related code to design architecture requirements to address user request fully.
- Step 2: design 3 best architecture solutions on high level with pro/cons analysis.
- Step 3: define the best solution, but concise, phrase-terse, compressed, etc.
- Input: user request +
CONTEXT.md+ARCHITECTURE.md+IMPLEMENTATION.md. Output: concisearchitecture-notes.mdin FEATURE PLAN folder. - Required skills:
reasoning - Recommended skills:
questioning - Update
coding-flow-state.md
- Present main solution first and then alternatives, do not assume user is in context, give him full information with TLDR.
- Present specs, plan, and review findings. User MUST approve: "Yes, I reviewed the design" or "Approve, the design was reviewed".
- Strict approval; anything else = review feedback, iterate.
- SMALL: combine with Phase 6 into single checkpoint.
- MUST USE SKILL
tech-specsandplanningtogether. Split: specs own WHAT, plan owns HOW. Target: 100% clarity. - Input: discovery notes, user request,
ARCHITECTURE.md. Output:plans/<FEATURE>/<FEATURE>-SPECS.md+plans/<FEATURE>/<FEATURE>-PLAN.md. - SMALL: output as message, no files. MEDIUM: concise. LARGE: full.
- Required skills:
tech-specs,planning - If medium/large
reasoningskill is required - If REQUIREMENTS in use:
requirements-useskill is required. Plan/Specs must have pointers to requirements identifiers. - Recommended skills:
questioning - Update
coding-flow-state.md
- Review specs and plan against user request and discovery notes, do not assume user is in context, give him full information with TLDR.
- Input: specs, plan, user request. Output: review findings and recommendations.
- Update
coding-flow-state.md
- Present specs, plan, and review findings. User MUST approve: "Yes, I reviewed the plan" or "Approve, the plan and specs were reviewed".
- Strict approval; anything else = review feedback, iterate.
- Implement approved plan. Build MUST succeed. Tests excluded.
- Input: approved specs + plan. Demand subagent to read and execute it fully. Do not repeat contents => reference instead. Output: working code, build passing, update relevant documentation briefly (CONTEXT.md, ARCHITECTURE.md, etc).
- MUST follow approved scope. MUST stop and escalate if blocked.
- Required skills:
coding - Recommended skills:
debugging,sensitive-data,testing,dangerous-actions - If requirements are used code must contain comments refs to requirements identifiers
- Spawn multiple implementation agents on independent tasks without dependencies and files intersection if reasonable
- Update
coding-flow-state.md
- Review code changes against approved specs and plan.
- Input: implementation diff, specs, plan, check if documentation is updated, brief, and matches the file intent. Output: review findings and recommendations.
- Required skills:
coding - Recommended skills:
reasoning,debugging,sensitive-data,testing,dangerous-actions - Update
coding-flow-state.md - If SMALL must also validate by running locally and check implementation actually works, once code review is done and there are no major issues
- Validate implementation against specs: git changes, spec coverage, gaps, perform search and MCP fact-checking.
- Then it must run locally and check it actually works if there are no major issues
- Input: implementation diff, specs, plan, review findings. Demand subagent to read and verify specs/plan fully. Do not repeat contents => reference instead. Output: validation findings.
- SMALL: orchestrator performs quick inline check.
- Recommended skills:
reverse-engineering,debugging,sensitive-data,testing,dangerous-actions - Update
coding-flow-state.md
- Present implementation, review findings, and validation findings. User MUST approve: "Yes, I approve the implementation".
- Strict approval required before proceeding to tests.
- SMALL: combined with Phase 13 final validation.
- Write and execute tests. All MUST succeed, isolated, idempotent.
- Input: implementation, specs. Demand subagent to read specs fully. Do not repeat contents => reference instead. Output: passing tests with coverage.
- Required skills:
testing,coding - Recommended skills:
debugging,sensitive-data,dangerous-actions - Update
coding-flow-state.md
- Review tests against specs: coverage, scenarios, edge cases, mocking correctness.
- Input: tests, specs, implementation. Output: review findings and recommendations.
- Required skills:
testing,coding - Recommended skills:
debugging,sensitive-data,dangerous-actions - Update
coding-flow-state.md
- Systematic by-dependency validation: databases, APIs, web, mobile. Check logs, clean up.
- Additionally systematic "manual QA" by yourself.
- Input: full delivery (code + tests + specs + review findings). Demand subagent to read specs fully. Do not repeat contents => reference instead. Output: final validation report.
- SMALL: orchestrator confirms build + tests pass.
- Recommended skills:
coding,debugging,sensitive-data,testing,dangerous-actions - Update
coding-flow-state.md
MCPs:
DeepWiki,Context7— external documentation and library knowledgePlaywright,Chrome-DevTools— web app testingAppium— mobile app testingGitNexus— codebase knowledge graphSerena— semantic code retrieval at symbol level