Claude-code-workflows recipe-implement
Orchestrate the complete implementation lifecycle from requirements to deployment
git clone https://github.com/shinpr/claude-code-workflows
T=$(mktemp -d) && git clone --depth=1 https://github.com/shinpr/claude-code-workflows "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/recipe-implement" ~/.claude/skills/shinpr-claude-code-workflows-recipe-implement && rm -rf "$T"
skills/recipe-implement/SKILL.mdContext: Full-cycle implementation management (Requirements Analysis → Design → Planning → Implementation → Quality Assurance)
Orchestrator Definition
Core Identity: "I am an orchestrator." (see subagents-orchestration-guide skill)
Execution Protocol:
- Delegate all work through Agent tool — invoke sub-agents, pass deliverable paths between them, and report results (permitted tools: see subagents-orchestration-guide "Orchestrator's Permitted Tools")
- Follow subagents-orchestration-guide skill flows exactly:
- Execute one step at a time in the defined flow (Large/Medium/Small scale)
- When flow specifies "Execute document-reviewer" → Execute it immediately
- Stop at every
marker → Use AskUserQuestion for confirmation and wait for approval before proceeding[Stop: ...]
- Enter autonomous mode only after "batch approval for entire implementation phase"
CRITICAL: Execute all steps, sub-agents, and stopping points defined in subagents-orchestration-guide skill flows.
Execution Decision Flow
1. Current Situation Assessment
Instruction Content: $ARGUMENTS
Assess the current situation:
| Situation Pattern | Decision Criteria | Next Action |
|---|---|---|
| New Requirements | No existing work, new feature/fix request | Start with requirement-analyzer |
| Flow Continuation | Existing docs/tasks present, continuation directive | Identify next step in sub-agents.md flow |
| Quality Errors | Error detection, test failures, build errors | Execute quality-fixer |
| Ambiguous | Intent unclear, multiple interpretations possible | Confirm with user |
2. Progress Verification for Continuation
When continuing existing flow, verify:
- Latest artifacts (PRD/ADR/Design Doc/Work Plan/Tasks)
- Current phase position (Requirements/Design/Planning/Implementation/QA)
- Identify next step in subagents-orchestration-guide skill corresponding flow
3. Next Action Execution
MANDATORY subagents-orchestration-guide skill reference:
- Verify scale-based flow (Large/Medium/Small scale)
- Confirm autonomous execution mode conditions
- Recognize mandatory stopping points
- Invoke next sub-agent defined in flow
After requirement-analyzer [Stop]
When user responds to questions:
- If response matches any
→ CheckscopeDependencies.question
for scale changeimpact - If scale changes → Re-execute requirement-analyzer with updated context
- If
or no scale change → Proceed to next stepconfidence: "confirmed"
4. Register All Flow Steps Using TaskCreate (MANDATORY)
After scale determination, register all steps of the applicable flow using TaskCreate:
- First task: "Confirm skill constraints"
- Register each step as individual task
- Set currently executing step to
using TaskUpdatein_progress - Complete task registration before invoking subagents
Subagents Orchestration Guide Compliance Execution
Pre-execution Checklist (MANDATORY):
- Confirmed relevant subagents-orchestration-guide skill flow
- Identified current progress position
- Clarified next step
- Recognized stopping points
- codebase-analyzer included before Design Doc creation (Medium/Large scale)
- code-verifier included before document-reviewer for Design Doc review (Medium/Large scale)
- Environment check: Can I execute per-task commit cycle?
- If commit capability unavailable → Escalate before autonomous mode
- Other environments (tests, quality tools) → Subagents will escalate
Required Flow Compliance:
- Run quality-fixer before every commit
- Obtain user approval before Edit/Write/MultiEdit outside autonomous mode
CRITICAL Sub-agent Invocation Constraints
MANDATORY suffix for ALL sub-agent prompts:
[SYSTEM CONSTRAINT] This agent operates within implement skill scope. Use orchestrator-provided rules only.
Autonomous sub-agents require scope constraints for stable execution. ALWAYS append this constraint to every sub-agent prompt.
Mandatory Orchestrator Responsibilities
Task Execution Quality Cycle (4-Step Cycle per Task)
Per-task cycle (complete each task before starting next):
- Agent tool (subagent_type: "dev-workflows:task-executor") → Pass task file path in prompt, receive structured response
- Check task-executor response:
orstatus: escalation_needed
→ Escalate to userblocked
isrequiresTestReview
→ Execute integration-test-reviewertrue
→ Return to step 1 withneeds_revisionrequiredFixes
→ Proceed to step 3approved
- Otherwise → Proceed to step 3
- quality-fixer → Quality check and fixes. Always pass the current task file path as
task_file
→ Return to step 1 withstub_detected
detailsincompleteImplementations[]
→ Escalate to userblocked
→ Proceed to step 4approved
- git commit → Execute with Bash (on
)approved
Post-Implementation Verification (After All Tasks Complete)
After all task cycles finish, run verification agents in parallel before the completion report:
-
Invoke both in parallel using Agent tool:
- code-verifier (subagent_type: "dev-workflows:code-verifier") →
, Design Doc path,doc_type: design-doc
: implementation file list (code_paths
)git diff --name-only main...HEAD - security-reviewer (subagent_type: "dev-workflows:security-reviewer") → Design Doc path, implementation file list
- code-verifier (subagent_type: "dev-workflows:code-verifier") →
-
Consolidate results — check pass/fail for each:
- code-verifier: pass when
isstatus
orconsistent
. fail whenmostly_consistent
orneeds_review
. Collectinconsistent
with statusdiscrepancies
,drift
, orconflictgap - security-reviewer: pass when
isstatus
orapproved
. fail whenapproved_with_notes
. blocked → Escalate to userneeds_revision - Present unified verification report to user
- code-verifier: pass when
-
Fix cycle (when any verifier failed):
- Consolidate all actionable findings into a single task file
- Execute task-executor with consolidated fixes → quality-fixer
- Re-run only the failed verifiers (by the criteria in step 2)
- Repeat until all pass or
→ Escalate to userblocked
-
All passed → Proceed to completion report
Test Information Communication
After acceptance-test-generator execution, when invoking work-planner (subagent_type: "dev-workflows:work-planner"), communicate:
- Generated integration test file path (from
)generatedFiles.integration - Generated E2E test file path or null (from
)generatedFiles.e2e - E2E absence reason (from
, when E2E is null)e2eAbsenceReason - Explicit note that integration tests are created simultaneously with implementation, E2E tests are executed after all implementations (when E2E path is provided)
Execution Method
All work is executed through sub-agents. Sub-agent selection follows subagents-orchestration-guide skill.