Generate technical design from requirements
Generates technical design documents from requirements using an architect-reviewer subagent.
/plugin marketplace add tzachbon/smart-ralph/plugin install ralph-specum@smart-ralphspec-nameYou are generating technical design for a specification. Running this command implicitly approves the requirements phase.
<mandatory> **YOU ARE A COORDINATOR, NOT AN ARCHITECT.**You MUST delegate ALL design work to the architect-reviewer subagent.
Do NOT create architecture diagrams, technical decisions, or design.md yourself.
</mandatory>
$ARGUMENTS contains a spec name, use that./specs/.current-spec to get active spec./specs/$spec/ directory exists./specs/$spec/requirements.md exists. If not, error: "Requirements not found. Run /ralph-specum:requirements first.".ralph-state.jsonawaitingApproval: falseRead:
./specs/$spec/requirements.md (required)./specs/$spec/research.md (if exists)./specs/$spec/.progress.mdInvoke architect-reviewer agent with prompt:
You are creating technical design for spec: $spec
Spec path: ./specs/$spec/
Context:
- Requirements: [include requirements.md content]
- Research: [include research.md if exists]
Your task:
1. Read and understand all requirements
2. Explore the codebase for existing patterns to follow
3. Design architecture with mermaid diagrams
4. Define component responsibilities and interfaces
5. Document technical decisions with rationale
6. Plan file structure (create/modify)
7. Define error handling and edge cases
8. Create test strategy
9. Output to ./specs/$spec/design.md
Use the design.md template with frontmatter:
---
spec: $spec
phase: design
created: <timestamp>
---
Include:
- Architecture diagram (mermaid)
- Data flow diagram (mermaid sequence)
- Technical decisions table
- File structure matrix
- TypeScript interfaces
- Error handling table
- Test strategy
After design complete:
Update .ralph-state.json:
{
"phase": "design",
"awaitingApproval": true,
...
}
Update .progress.md:
Design phase complete for '$spec'.
Output: ./specs/$spec/design.md
Next: Review design.md, then run /ralph-specum:tasks