design
Design phase. Takes scope.md and produces design.md with architecture, directory structure, interfaces, integration details, and justified complexity exceptions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Design phase. Takes scope.md and produces design.md with architecture, directory structure, interfaces, integration details, and justified complexity exceptions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Analyze phase. Turns scope.md and design.md into readiness.md with traceability, truths, build order, and scope-risk checks before BUILD.
Audit preferences.md stack choices against input docs for orthodox, idiomatic fit. Use before /expand when you want to validate that your technology choices match the problem domain.
Execute BUILD, ITERATE, or verify-fix work in small, test-first vertical slices. Use for multi-file implementation, failing tests, root-cause debugging, scope-creep risk, or when maintainability matters.
Build phase. Takes scope.md, design.md, and readiness.md and writes the actual code, tests, and deployment config in vertical slices.
Deploy phase. Push to the deployment target, verify it's live, write README and DELIVERY.md.
Distill raw input materials into structured reference docs. Use when docs/input/ contains messy client briefs, API specs, meeting notes, or domain knowledge that needs structuring before EXPAND.
| name | design |
| description | Design phase. Takes scope.md and produces design.md with architecture, directory structure, interfaces, integration details, and justified complexity exceptions. |
Read scaffolding/scope.md. Produce scaffolding/design.md.
scaffolding/scope.md fullypreferences.md if it exists (for stack conventions)scaffolding/design.md with these exact sections:# Design: [Project Name]
## Architecture
[How the pieces fit together. Include a simple ASCII diagram if the system has more than 2 components.]
## Directory Structure
[The actual file tree you'll create at the repo root. Be specific.]
```
├── src/
│ └── ...
├── tests/
├── scaffolding/
├── README.md
└── ...
```
## Interfaces
[Key data shapes, API contracts, module boundaries. At least one concrete type/shape.]
## External Integrations
[What this talks to outside itself. For each:
- What it is
- How you call it
- What happens when it fails
- **Test strategy**: mock (fake responses) / recorded (record-replay) / live (real API calls in tests)]
[Or "None — self-contained" if applicable.]
## Observability
[What needs logging, monitoring, or tracing. What would you check first if this breaks at 2am?
- **Shed**: Structured logging to stdout. Errors include context (what input caused it, what state was expected).
- **House**: Structured logging to Loki + Grafana alerting on error patterns. OpenTelemetry traces for request flows. Correlation IDs. Health endpoint.
- **Skyscraper**: OpenTelemetry instrumentation (traces + metrics + logs). Prometheus + Loki + Grafana dashboards. Alerting on SLO breach.]
## Complexity Exceptions
[Any justified place where BUILD may need to exceed the normal slice/file limits, share a cross-cutting abstraction, or stage work across multiple `AC-*` items. If none, write "None."]
## Open Questions
[Anything uncertain. Resolve these before building. Or "None — straightforward."]
Design Review (house/skyscraper only — skip for sheds): Walk through 2-3 key scenarios from the acceptance criteria against the design. For each:
If critical issues are found, fix the design before proceeding. Append findings to design.md under a ## Design Review section.
Run the post-design gate:
scaffolding/design.md existsNone.)If any gate condition fails, fix it and recheck.
Log the result to scaffolding/log.md:
## DESIGN — [timestamp]
- **Gate**: PASS (attempt N)
- **Evidence**: [what was checked — directory structure, interfaces, integration test strategies]
- **Changes**: scaffolding/design.md created
- **Retries**: [total gate attempts this phase]
- **Next**: ANALYZE
Git checkpoint:
git add -A && git commit -m "docs(design): architecture for [project]" -m "[summarize architecture, key interfaces, integration count]\nGate: post-design PASS (attempt N)."
Auto-continue to ANALYZE (unless user specified stepped mode).
✓ DESIGN complete. Gate passed.
Ready for ANALYZE. Continue?
AC-* appears to require unusual complexity, record that explicitly under ## Complexity Exceptions so BUILD does not discover it accidentally.