write-a-design-doc
Use when proposing a non-trivial system change that needs review before build. Frames the problem, options with costs, the chosen design, and the risks, for a reviewer to attack.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- write-a-design-doc
- description
- Use when proposing a non-trivial system change that needs review before build. Frames the problem, options with costs, the chosen design, and the risks, for a reviewer to attack.
02 资源文件 3
- 许可证LICENSE1.0 KB
- 参考文档SOURCE.md344 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
Write a Design Doc
A design doc exists to be criticised before code exists. If a reviewer cannot find the weak point, the doc is hiding it, not resolving it.
Procedure
- Open with the problem and the constraints, in numbers: current latency, volume, budget, deadline. No solution in the first paragraph.
- State the goals and, explicitly, the non-goals under a
## Non-goalsheading. "This does not handle multi-region" prevents scope arguments later. - Present two or three real options, each with cost, complexity, and what it forecloses. A one-option doc is a decision already made.
- Recommend one and say why in terms of the constraints, not taste.
- Describe the proposed design with a diagram (text or ASCII), the data model, and the request path.
- List the failure modes and how the design handles each: what happens at 10x load, when a dependency is down.
- Call out the risks and the reversible decisions; mark the one-way doors.
- Give the migration and rollout plan, including rollback.
- Add an open-questions section with owners, so unresolved items are visible, not implied.
- Estimate the cost and the operational burden (on-call, new dependency, runbooks to write).
- Cap it at a few pages; link deep detail to appendices.
- Circulate for async comment before review; the doc that gets no comments is either trivial or unread.
Pitfalls
- A doc that opens with the solution, so options and tradeoffs read as rationalisation.
- Options listed but none costed, so the comparison is theatre.
- No non-goals, inviting scope creep in review.
- Diagrams that omit the failure path, showing only the happy request.
- Silently burying the risky choice instead of flagging it as a one-way door.
- A design that ignores the migration of existing data, treating greenfield as the only case.
- Estimating effort in days without a range or the assumptions behind it.
Verification
wc -l design.md && grep -cE '^#{1,3} (Non-goals|Options|Risks|Rollback)' design.md
The doc has explicit Non-goals, Options, Risks and Rollback sections. Ask a reviewer to name the design's weakest point; if they cannot from the doc alone, add the tradeoff you left implicit.
04 同仓库更多 Skills
recipe-performance
Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold/warm/background-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout/paint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.
mexc-spot-websocket
MEXC Spot WebSocket workflows for public streams, protobuf handling, depth maintenance, listen keys, and private streams without exposing API keys.
mexc-spot-rest
MEXC Spot REST workflows for public data, signed account requests, orders, wallet/admin actions, and secure signing without exposing API keys.
mexc-futures-websocket
MEXC Futures WebSocket workflows for public streams, private account/order/position streams, ping/pong, subscriptions, and depth maintenance.
0xklen-version-and-refresh-sanctions-lists
暂无简介
verify-tests-cover-changed-lines
Use when a PR adds code that the existing suite may not exercise. Measures patch coverage — the share of newly changed lines hit by tests — before approving.