بنقرة واحدة
design
Use when a spec has requirements.md and needs technical design.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when a spec has requirements.md and needs technical design.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when a spec has tasks.md and should enter autonomous task execution.
Use when starting curdx-flow, creating a spec, resuming work, or routing intent.
Use when handling curdx-flow flags, state files, delegation, execution loops, or skill entrypoint rules.
Use when curdx-flow needs user decisions after codebase facts are discovered.
Use when a spec has design.md and needs implementation tasks.
Use when showing curdx-flow slash skills, options, workflow, or troubleshooting.
| name | design |
| description | Use when a spec has requirements.md and needs technical design. |
| argument-hint | [spec-name] |
| allowed-tools | Read Write Edit Bash Agent AskUserQuestion |
| disable-model-invocation | true |
Generate technical design for the active spec. Running this command implicitly approves requirements. You are a coordinator, not an architect -- delegate ALL work to the architect-reviewer subagent.
Complete these coordination steps in order; do not create user-facing implementation tasks from this checklist:
--quick)spec-reviewer + code-quality-reviewer); QuickMode bypass per D5curdx-flow snapshot --spec "$ARGUMENTS" when $ARGUMENTS begins with a spec name; otherwise run curdx-flow snapshot.snapshot.active is false, error: "No active spec. Run /curdx-flow:new first."snapshot.spec.fsPath as $SPEC_PATH.snapshot.artifacts.requirements.exists is false, error: "Requirements not found. Run /curdx-flow:requirements first."curdx-flow state merge "$SPEC_PATH/.curdx-state.json" '{"awaitingApproval":false}'
requirements.md (required), research.md (if exists), .progress.md, snapshot.topology.references/workflow-contract.md, references/agent-output-contract.md, and references/context-and-dispatch-policy.md.Check if --quick appears in $ARGUMENTS. If present, skip to Step 3.
Parse Intent Classification and all prior interview responses to skip already-answered questions.
Intent-Based Question Counts:
Apply adaptive dialogue from ${CLAUDE_PLUGIN_ROOT}/skills/interview-framework/SKILL.md. Ask context-driven questions one at a time.
Design Exploration Territory (hints, not a script):
After dialogue, propose 2-3 architectural approaches. Examples (illustrative only):
Append to .progress.md under "Interview Responses":
### Design Interview (from design.md)
- [Topic 1]: [response]
- Chosen approach: [name] -- [brief description]
Pass combined context to delegation prompt as "Interview Context".
Agent Teams are experimental and disabled by default in Claude Code. Use the team lifecycle only when CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 is set and the TeamCreate / TaskCreate / TaskList / SendMessage tools are visible in the current session. If any team tool is unavailable or fails, immediately continue with the direct Agent(agent_type: architect-reviewer) path. Treat this as the normal path, not a degraded path.
Direct path:
TaskCreate(subject: "Generate technical design for $spec", activeForm: "Generating design"). If unavailable or failing, continue without it.Agent(agent_type: architect-reviewer) with requirements, research, and interview context. Instruct it to design architecture with mermaid diagrams, component responsibilities, technical decisions with rationale, file structure, error handling, test strategy. Output to ./specs/$spec/design.md../specs/$spec/design.md.Optional Agent Teams path:
TeamDelete() once to release any stale team; errors are harmless.TeamCreate(team_name: "design-$spec")TaskCreate(subject: "Generate technical design for $spec", activeForm: "Generating design")Agent(agent_type: architect-reviewer, team_name: "design-$spec", name: "architect-1") with the same prompt as the direct path.TaskList check.SendMessage(type: "shutdown_request", recipient: "architect-1")./specs/$spec/design.md, then TeamDelete().
This step runs the two-stage review protocol at the design phase boundary: spec-reviewer (specCompliance) and code-quality-reviewer (codeQuality) are dispatched in parallel, in ONE message, against the frozen design.md artifact. Both reviewers must complete before reconciliation.
Required reading before dispatch (read once at top of step, do not skip):
bounded-parallel-dispatch.md — independence criteria + the Review-domain "ALL Agent calls in ONE message" rule (anti-pattern #3 + #5–#8). Both reviewers must be spawned in the SAME message.two-stage-review.md — domain boundary table (specCompliance vs codeQuality), 3-layer drift defense, anti-rationalization rule, SLSA-shape verdict glossary, QuickMode behavior contract.The two reviewers do not see each other's output (Layer 2 isolation). The coordinator never arbitrates findings across domains.
1. Optional TaskCreate(subject: "Spec-compliance review of design.md",
activeForm: "Reviewing design (spec-compliance)")
Optional TaskCreate(subject: "Code-quality review of design.md",
activeForm: "Reviewing design (code-quality)")
2. # ALL Agent calls in ONE message — see bounded-parallel-dispatch.md anti-pattern #3
Agent(agent_type: spec-reviewer,
prompt: "Review ./specs/$spec/design.md for spec-compliance ONLY.
Upstream: requirements.md + research.md.
Your domain: traceability, phase artifact structure, requirement
coverage, artifact format. Do NOT comment on code-quality concerns
(smell / security / readability / test-shape) — those belong to the
peer code-quality-reviewer (which you do NOT see and MUST NOT
reference). Emit a markdown findings table and a final line
`REVIEW_PASS` or `REVIEW_FAIL` (byte-equal).")
Agent(agent_type: code-quality-reviewer,
prompt: "Review ./specs/$spec/design.md for code-quality ONLY.
Your domain: code smell / security / implementation quality /
readability / test quality / no-hallucinations. Do NOT comment
on traceability to requirements / phase artifact structure /
requirement coverage / artifact format / front-matter — those
belong to spec-reviewer (which you do NOT see and MUST NOT
reference). Emit a markdown findings table and a final line
`REVIEW_PASS` or `REVIEW_FAIL` (byte-equal).")
3. # Wait for both Agent results; collect REVIEW_PASS/REVIEW_FAIL final lines.
4. # Persist verdicts under verificationBlocks.design.reviews via merge-state (FR-T3 — never hand-edit state):
curdx-flow state merge \
"$SPEC_PATH/.curdx-state.json" \
'{"verificationBlocks":{"design":{"reviews":{
"specCompliance":{"verdict":"<PASS|FAIL>","findings":[...],"reviewerId":"spec-compliance","timestamp":"<ISO8601>"},
"codeQuality":{"verdict":"<PASS|FAIL>","findings":[...],"reviewerId":"code-quality","timestamp":"<ISO8601>"}
}}}}'
Optional Agent Teams overlay: if Agent Teams are enabled and available, create TeamCreate(team_name: "review-design-$spec"), add matching team_name and name fields to both Agent calls, wait via automatic teammate messages or one TaskList check, then SendMessage(...shutdown_request...) and TeamDelete(). If any team step fails, rerun or continue with the direct dual Agent(...) calls above.
Read state.quickMode from .curdx-state.json. specCompliance is always a hard gate; QuickMode only relaxes codeQuality.
if state.quickMode === true:
if specCompliance.verdict === "FAIL":
# Hard gate even in QuickMode — FR-M2 reverse contract.
block; show findings; do NOT advance to Step 5.
if codeQuality.verdict === "FAIL":
# Advisory downgrade — set advisory:true via merge-state, surface findings,
# continue. Never set advisory on specCompliance.
merge-state into verificationBlocks.design.reviews.codeQuality.advisory = true
log warning to .progress.md; proceed to Step 5.
else: # normal mode
if specCompliance.verdict === "FAIL" OR codeQuality.verdict === "FAIL":
# Either FAIL blocks. Display findings table, ask user (Step 5 "Run review" / "Request changes" loop).
Iteration < 3: re-invoke architect-reviewer with merged feedback, loop back to 4.1.
Iteration >= 3: graceful degradation, log warning, proceed (permissive ceiling matches prior behavior).
else:
proceed to Step 5.
Anti-rationalization: the coordinator MUST NOT pass spec-reviewer's findings into the code-quality-reviewer prompt (or vice versa). Both verdicts are stored verbatim under verificationBlocks.design.reviews. See two-stage-review.md §2.
Revision delegation: Re-invoke architect-reviewer with the merged feedback (both reviewers' findings concatenated, attributed by reviewerId) and requirements.md upstream context. Focus on the union of issues.
Error handling: Reviewer no signal = treat as REVIEW_PASS for that slot (permissive ceiling). Agent failure = retry once, then use the surviving reviewer's verdict alone (still hard-gate on specCompliance if it survived).
Fallback: Direct dual Agent(...) calls in ONE message are the default. Team failures are non-blocking unless both reviewers fail to return a verdict.
Read ./specs/$spec/design.md and display:
Design complete for '$spec'.
Output: $PWD/specs/$spec/design.md
## What I Designed
**Approach**: [1-2 sentences from Overview]
**Components**:
- [Component A]: [brief purpose]
- [Component B]: [brief purpose]
**Key Decisions**:
- [Decision 1]: [choice made]
- [Decision 2]: [choice made]
**Files**: [X] to create, [Y] to modify
If --quick, skip to Step 6.
Ask ONE question: "How do you want to proceed?" with these options via AskUserQuestion:
If "Approve": proceed to Step 6. If "Run review": Invoke spec-reviewer via Agent tool with full design.md content (upstream: research.md + requirements.md). Display findings table. If REVIEW_PASS, note it. If REVIEW_FAIL, show feedback. Then loop back to this same 3-choice question (user decides next action). If "Request changes" or "Other":
Agent(agent_type: architect-reviewer) and feedback; use the optional team lifecycle only if Agent Teams are enabled and available.curdx-state.json (preserve all existing fields):
curdx-flow state merge \
"$SPEC_PATH/.curdx-state.json" '{"phase":"design","awaitingApproval":true}'
.progress.md: mark requirements as implicitly approved, set current phaseRead commitSpec from .curdx-state.json. If true:
git add ./specs/$spec/design.md
git commit -m "spec($spec): add technical design"
git push -u origin $(git branch --show-current)
If commit or push fails, display warning but continue.
(Does not apply in --quick mode.)
-> Next: Run /curdx-flow:tasks/curdx-flow:tasks