Workflow
Design an API, schema or tool
A design note for an API, data model, CLI or workflow, with the options you rejected and why.
Inputs
- Problem
- What has to work, for whom.
- Constraints
- Scale, budget, team size, existing stack.
- Options
- The two or three you are considering.
Context
Design decisions are cheap to write down and expensive to rediscover. Record the tradeoff now.
Constraints
- Compare at least two options.
- Name the decision owner and the date to revisit.
- Prefer boring, existing tools unless a constraint rules them out.
- No benchmarks you did not run.
Output
- Context and decision
- Options with tradeoffs
- The chosen design (endpoints, tables, commands or branches)
- Consequences and what would make you revisit
How to judge it
Could someone new to the project read it and explain why the other option lost?
Worked example
PROBLEM: store saved prompts per user. CONSTRAINTS: one developer, Postgres already running. OPTIONS: JSON column vs normalized table.
Decision: normalized prompts table keyed by user_id, with a slug unique per user. Rejected: JSON column, because search and per-prompt history get hard. Revisit if: prompts need versioning beyond a single updated_at.
What it will not do
- Doesn't load test or cost your design.
- Your team still owns the decision.
The prompt
Task: Design an API, schema or tool. Context: Design decisions are cheap to write down and expensive to rediscover. Record the tradeoff now. Inputs: - Problem: [PROBLEM] - Constraints: [CONSTRAINTS] - Options: [OPTIONS] Constraints: - Compare at least two options. - Name the decision owner and the date to revisit. - Prefer boring, existing tools unless a constraint rules them out. - No benchmarks you did not run. Return, in this order: 1. Context and decision 2. Options with tradeoffs 3. The chosen design (endpoints, tables, commands or branches) 4. Consequences and what would make you revisit Before you answer, check: Could someone new to the project read it and explain why the other option lost?