shinpr/claude-code-workflows-recipe-build
Execute materialized task files in autonomous execution mode
npx skills add https://github.com/shinpr/claude-code-workflows --skill recipe-build
Execute Skill: llm-friendly-context before writing Agent prompts, handoffs, or generated artifacts.
Execute Skill: subagents-orchestration-guide before making workflow decisions, invoking agents, or resolving findings.
Core Identity: "I am an orchestrator." (see subagents-orchestration-guide skill)
Local authority gate: Make this recipe's workflow decisions and validate each returned result directly; delegate semantic deliverable production to the named specialist.
Review Resolution Gate [MANDATORY]: Resolve every actionable deliverable-review finding through subagents-orchestration-guide Review Resolution before correction or progression; include declined IDs with governing reasons and evidence in the final user report.
Before the first finding disposition, read references/review-resolution.md from the loaded subagents-orchestration-guide skill.
Execution Protocol:
CRITICAL: Run quality-fixer before every commit.
Work plan: $ARGUMENTS
Before any task processing, locate the work plan. Resolution rule:
docs/plans/tasks/ matching the single-layer pattern {plan-name}-task-*.md. Layer-aware fullstack tasks ({plan-name}-backend-task-*.md / {plan-name}-frontend-task-*.md) are excluded here so a stale fullstack run does not redirect this recipe to the wrong work plan_overview-*.md (materialization overview files) and *-phase*-completion.md (per-phase completion files).{plan-name} prefix as the segment that appears before -task-docs/plans/{plan-name}.md for the prefix that has the most recent task-file mtime; ties broken by the lexicographically last {plan-name}.md in docs/plans/Compute the Consumed Task Set for this run — the exact files this recipe owns, executes, and later deletes. Use the same restricted pattern as Work Plan Resolution:
docs/plans/tasks/ matching the single-layer pattern {plan-name}-task-*.md for the {plan-name} resolved by Work Plan Resolution. Layer-aware fullstack tasks are excluded_overview-*.md or *-phase*-completion.md.Every subsequent reference to "task files" in this recipe — Task Generation Decision Flow, Task Execution Cycle iteration, and Final Cleanup — uses this set, not the unrestricted docs/plans/tasks/*.md glob.
Analyze the Consumed Task Set and determine the action required:
| State | Criteria | Next Action |
|-------|----------|-------------|
| Tasks exist | Consumed Task Set is non-empty | User's execution instruction serves as batch approval → Enter autonomous execution immediately |
| No tasks + plan exists | Consumed Task Set is empty but the resolved work plan exists | Confirm with user → run task-decomposer |
| Neither exists + Design Doc exists | No plan, no Consumed Task Set, but docs/design/*.md exists | Invoke work-planner to create a work plan, then run document-reviewer (dev-workflows:document-reviewer, doc_type: WorkPlan). Apply the Review Resolution Gate: update for apply, re-review with prior_feedback, progress when all actionable findings are decline, and escalate unresolved user_decision_required; then present the resolved plan for batch approval before task materialization |
| Neither exists | No plan, no Consumed Task Set, no Design Doc | Report missing prerequisites to user and stop |
When the Consumed Task Set is empty:
No task files in the Consumed Task Set.
Work plan: docs/plans/[plan-name].md
Generate tasks from the work plan? (y/n):
Invoke task-decomposer using Agent tool:
subagent_type: "dev-workflows:task-decomposer"description: "Materialize work plan tasks"prompt: "Read work plan at docs/plans/[plan-name].md and output individual single-commit task files in docs/plans/tasks/."Recompute the Consumed Task Set using the same restricted pattern from the Consumed Task Set section above. Confirm it is now non-empty. If it is still empty, escalate to the user — task-decomposer either failed silently or produced files that don't match the expected pattern.
Flow: Task generation → Consumed Task Set recompute → Autonomous execution (in this order)
MANDATORY EXECUTION CYCLE: execute → branch on executor result → quality-fix → commit
Before the loop, register "Execute consumed task set", "Run post-implementation verification", "Clean up consumed task files", and "Report completion" once with TaskCreate; mark and advance the active phase with TaskUpdate.
For EACH task in the Consumed Task Set, YOU MUST:
diffBase, pass the task file path in the prompt, and receive the structured responsestatus: "escalation_needed" or "blocked" → STOP and escalate to userrequiresTestReview is true → Invoke integration-test-reviewer with diffBase, changed integration/E2E paths, taskFile, prompt-only claims, and mutationEvidenceapproved → Proceed to step 3blocked → STOP and escalate to userneeds_revision → Apply the Review Resolution Gateapply findings → Return to step 1 with those findings, then re-review with prior_feedbackdecline → Proceed to step 3user_decision_required finding → STOP and escalate to userreadyForQualityCheck: true → Proceed to step 3task_file, upstream mutationEvidence, and qualityCommand when available (caller first, otherwise current task)stub_detected → Return to step 1 with incompleteImplementations[] detailsblocked → STOP and escalate to userapproved → Proceed to step 4approvedCRITICAL: Parse every sub-agent response for status fields. Execute the matching branch in the 4-step cycle. Proceed to next task only after quality-fixer returns approved.
Append the following block to every subagent prompt invoked from this recipe:
Scope boundary for subagents:
Operate within the task scope and referenced files in the prompt.
Use loaded skills to execute that scope.
Escalate when the required fix or investigation falls outside that scope.
Verify task files exist per Pre-execution Checklist, then enter autonomous execution mode. When requirement changes are detected during execution, escalate to the user with the change summary before continuing.
Resolve the Work Plan's readable Design Doc, or the Work Plan itself when no Design Doc exists; missing input blocks verification.
Emit these Agent calls in one assistant message, then await both:
doc_type, document_path, and code_paths from git diff --name-only main...HEADgoverningDocuments and implementationFilesApply subagents-orchestration-guide's Post-Implementation Verification pass/fail and fix/re-run rules. Present the unified report; proceed to Final Cleanup after both pass.
Before the completion report, delete the implementation task files this recipe consumed. Their work is committed; docs/plans/ is ephemeral working state and is not retained between recipe runs:
docs/plans/tasks/{plan-name}-phase*-completion.md (the per-phase completion files generated by task-decomposer for this {plan-name})docs/plans/tasks/_overview-{plan-name}.md if presentdocs/plans/{plan-name}.md) — the user decides whether to delete it after final reviewIf task files cannot be deleted (filesystem error), report the failure but do not block the completion report.
Final report must include:
Take shinpr/claude-code-workflows-recipe-build from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.