deep-design
Installation
SKILL.md
Deep Design Skill
When to use deep-design vs --spec mode
- deep-design (default): Multi-agent adversarial workflow — stress-tests designs with parallel critics. Use for complex systems. Outputs battle-tested design doc.
- deep-design --spec: Single-session lightweight spec writer. Outputs SDD-compatible
spec.mdwith User Scenarios & Testing (prioritized P1/P2/P3), Functional Requirements (FR-###), Success Criteria (SC-###), Key Entities, Assumptions, and Edge Cases. Createsspecs/{NNN-feature}/spec.mdandchecklists/requirements.md. Ready fordeep-planto consume.
Adversarially stress-test a design. Given a concept, validate input, draft a spec, attack it with parallel critic agents across orthogonal dimensions, fix discovered flaws using independent judge agents, and repeat until coverage is saturated. Output is a battle-tested design document with an honest coverage report.
Execution Model
All operations use Claude Code primitives. The following contracts are non-negotiable:
- All data passed to agents via files, never inline. Spec content, dedup lists, angle definitions, fact sheets — all written to disk before the agent prompt. Inline data is silently truncated.
- State written before agent spawn, not after.
spawn_time_isois written to state.json before the Agent tool call. Spawn failure recordsspawn_failedstatus. Resume uses persisted state, never in-memory reconstruction. - Structured output is the contract; free-text is ignored. Every judge and checker produces machine-parseable structured lines as the final lines of output. Coordinator reads only structured fields. Unparseable output triggers fail-safe classification (critical or conflict). Critic output files MUST contain
STRUCTURED_OUTPUT_START/STRUCTURED_OUTPUT_ENDmarkers; files without these markers are treated as failed (not partially consumed). - No coordinator self-review of anything load-bearing. Fact sheets, severity classifications, cross-fix checks, form-switch dedup, section-impact scores — all delegated to independent agents. The coordinator orchestrates; it does not evaluate.
- Termination labels are honest. "Conditions Met" or "Max Rounds Reached" — never "no critical flaws remain." Coverage fraction includes the denominator caveat. Unverified sections are listed explicitly.
- Coverage completeness is a hard invariant — not a judgment call. All 5 required dimension categories (correctness, usability_ux, economics_cost, operability, security_trust) MUST have
explored_count >= 1before any run (in-session or sagaflow) can proceed to final synthesis. If a category has zero explored angles, the coordinator MUST spawn critics targeting that category — not skip it, not label it "out of scope," not cite context constraints. "Context is running low" is NOT a valid reason to skip required categories; the coordinator MUST either (a) use sagaflow durable execution to avoid context limits, (b) run coverage extension rounds, or (c) label the runINCOMPLETE — uncovered: {list}and refuse to present it as finished work. A run that declares completion while listing known uncovered categories is a protocol violation, not a judgment call.