shinpr/claude-code-workflows-recipe-design
Execute from codebase analysis to design document creation
npx skills add https://github.com/shinpr/claude-code-workflows --skill recipe-design
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.
Context: Dedicated to the design phase.
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. The scope bootstrap locates seed files; the named specialists own semantic investigation and artifact authorship.
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:
[Stop: ...] marker → Wait for user approval before proceedingsubagents-orchestration-guide usage: Use the guide for orchestration principles (Delegation Boundary, Decision precedence, Execution Boundary), the Scale Determination table, and handoff contracts HC-02 onward. This recipe's start order and subagent prompts supersede the guide's requirement-analyzer-origin flow, First Action Rule, HC-01, and Agent-Specific Prompt Content.
CRITICAL: Execute document-reviewer, design-sync (for Design Docs), and all stopping points — each serves as a quality gate. Skipping any step risks undetected inconsistencies.
Requirements → scope bootstrap → codebase-analyzer → [Stop: Scope confirmation]
↓
technical-designer
↓
code-verifier → document-reviewer
↓
design-sync → [Stop: Design approval]
Included in this skill:
Responsibility Boundary: This skill completes with design document (ADR/Design Doc) approval. Work planning and beyond are outside scope.
Requirements: $ARGUMENTS
codebase-analyzer requires a populated requirement_analysis.affectedFiles. Build that seed with a lightweight, orchestrator-local pass — locating files only, with no deep reading and no design decisions:
rg, or grep when rg is unavailable) for files matching those keywords.affectedFiles.affectedFiles before invoking codebase-analyzer. If the user confirms no related code exists, report that codebase-grounded design does not apply and confirm with the user how to proceed.affectedFiles before invoking codebase-analyzer.This step locates seed files only. Reading files in full, tracing dependencies, and analysis remain codebase-analyzer's responsibility.
Invoke codebase-analyzer with its existing schema. The orchestrator constructs requirement_analysis from the Step 1 seed.
subagent_type: "dev-workflows:codebase-analyzer", description: "Codebase analysis"prompt: includerequirements: the user requirements verbatimrequirement_analysis: a JSON object with all four fields — affectedFiles (Step 1 seed), purpose (the user requirements), scale (provisional value from the Scale Determination table applied to the seed file count), technicalConsiderations ({ constraints: [], risks: [], dependencies: [] } — the bootstrap performs no analysis, so the object is present with empty lists)After codebase-analyzer returns, confirm the design scope with the user before any design work. This is a recipe-local confirmation step.
Execute Skill: requirement-convergence before running the hearing protocol.
First run the requirement-convergence hearing protocol, using the codebase-analyzer findings as the facts it presents. In this flow, the orchestrator elicits and judges the fields and records the result as the skill's convergence object (outcome, requirements[] with layer labels, nonGoals[], plus a readiness label per field). Treat cost as already resolved because semantic repository investigation is assigned to codebase-analyzer and entering this recipe decided to design. Carry that object into Step 4 so technical-designer persists it to the Design Doc.
Then present, sourced from the codebase-analyzer JSON, using AskUserQuestion:
analysisScope.filesAnalyzed and the modules they belong toanalysisScope.categoriesDetected and focusAreaslimitations plus any assumptions codebase-analyzer recordedAsk the user to choose one:
After the user confirms the scope, count the confirmed target files and set the scale from the subagents-orchestration-guide Scale Determination table. This confirmed scale supersedes the Step 2 provisional value and determines the design document.
[STOP]: Wait for the user's choice before proceeding.
Pass the full codebase-analyzer JSON to technical-designer (handoff contract HC-02). ADRs use alternative comparison; Design Docs use Design Convergence.
subagent_type: "dev-workflows:technical-designer", description: "Design Doc creation", prompt: "Create Design Doc based on the requirements. Requirements: [user requirements verbatim]. Codebase analysis: [codebase-analyzer JSON from Step 2]. Confirmed scope and user answers: [Step 3 confirmed scope and user answers]. Convergence result: [Step 3 convergence object]. Apply the code: prefix to codebase-analyzer fact_ids when filling the Fact Disposition Table."subagent_type: "dev-workflows:technical-designer", description: "ADR creation", prompt: "Create ADR for [technical decision]. Requirements: [user requirements verbatim]. Codebase analysis: [codebase-analyzer JSON from Step 2]. Confirmed scope and user answers: [Step 3 confirmed scope and user answers]. Present at least two alternatives with trade-offs."subagent_type: "dev-workflows:code-verifier", description: "Design Doc verification", prompt: "doc_type: design-doc document_path: [Design Doc path] Verify Design Doc against existing code."code_verification evidence; the document-reviewer result controls correction routing.subagent_type: "dev-workflows:document-reviewer", description: "Design Doc review", prompt: "Review [Design Doc path] for consistency, completeness, and adopted design validity. doc_type: DesignDoc. review_context: creation. requirements_verbatim: [user requirements verbatim]. confirmed_decisions: [Step 3 confirmed scope and user answers]. codebase_analysis: [codebase-analyzer JSON from Step 2]. code_verification: [code-verifier output from this step]"apply findings change the Design Doc, invoke technical-designer in update mode, then re-run code-verifier and document-reviewer with prior_feedback.subagent_type: "dev-workflows:document-reviewer", description: "ADR review", prompt: "Review [ADR path] for consistency and completeness. doc_type: ADR. codebase_analysis: [codebase-analyzer JSON from Step 2]"apply findings change the ADR, invoke technical-designer in update mode and re-run document-reviewer with prior_feedback.subagent_type: "dev-workflows:design-sync", description: "Design consistency check", prompt: "Check consistency across all Design Docs in docs/design/. Report conflicts and overlaps."apply findings → invoke the named technical designer for each affected Design Doc; re-run code-verifier and document-reviewer for each modified document with the latest verification and prior_feedback, then re-run design-syncdecline → proceed to the approval stopuser_decision_required conflict → stop for user input[STOP]: Present the design document, plus design-sync results for a Design Doc, and obtain user approval. For an approved ADR, invoke technical-designer in update mode to set its status to Accepted and verify the update before completion.
requirement_analysisAcceptedDesign phase completed.
Take shinpr/claude-code-workflows-recipe-design 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.