Architecture Decisions
Evaluate architectural trade-offs and record the decision as an ADR.
This playbook helps you decide an architectural question with evidence and record the decision as an Architecture Decision Record (ADR).
Best for: Schema changes, new services, API design, infrastructure decisions Time estimate: 30 to 60 minutes Skills used: mk:party, mk:brainstorming, mk:arch, mk:plan-ceo-review (optional) Agents involved: architect (ADRs), brainstormer (approaches), researcher (technology research)
Overview
For work that touches a database schema, API contracts, service boundaries or infrastructure, the architect agent weighs the trade-offs with evidence, writes the ADR and reads the existing ADRs so new work stays consistent with them. For a high-stakes decision, run mk:party first.
Step 1: Deliberate with mk:party (for major decisions)
/mk:party "Should we use GraphQL or REST for the public API?"mk:party picks 2 to 4 agent personas from the topic (for an architecture topic: architect, developer and planner), runs a few rounds of discussion and returns a synthesis. The personas are played inside your session; they are not separate agent runs. No code is written. The output is a decision brief that feeds the ADR.
Party Mode: "GraphQL vs REST"
performance lens: REST, GraphQL query cost is hard to predict at scale
developer-experience lens: GraphQL, no over-fetching for mobile clients
migration lens: tRPC, if the whole project is TypeScript
Synthesis: tRPC for internal APIs, REST for external, GraphQL deferredUse it when two reasonable engineers would disagree, when the decision has long-term consequences, or when a wrong choice would cost more than two days of rework.
Step 2: Compare approaches (skip if you ran a party)
Ask the question in plain words, or use mk:brainstorming. The brainstormer agent compares two or three approaches:
| Approach | Pros | Cons | Choose when |
|---|---|---|---|
| REST | Simple, cacheable, well understood | Over- and under-fetching | CRUD-heavy, simple data |
| GraphQL | Flexible queries, typed schema | Complex, harder caching | Mobile clients, rich relationships |
| tRPC | End-to-end type safety, no codegen | TypeScript only | Full-stack TypeScript, internal APIs |
Step 3: Research what you do not know
The researcher agent queries official documentation, repositories and community sources, grades them and marks what is established, emerging or experimental. See Researching Libraries.
Step 4: Write the ADR
/mk:arch new "Use tRPC for internal API"mk:arch checks for an existing ADR on the same decision, gathers the context, constraints and options (it asks if any are missing) and has the architect agent write the body: Status, Context, Decision, Consequences and Alternatives Considered. The file is docs/architecture/adr/YYMMDD-decision.md, with status Proposed until you review it. Other mk:arch commands are list, review [ADR file stem] and impact [change description], which checks a proposed change against the decisions already taken.
# 0005 - Use tRPC for internal API
## Status
Accepted
## Context
We need a typed API layer for a TypeScript monorepo.
## Decision
Use tRPC for internal services and REST for external APIs.
## Consequences
- Positive: end-to-end type safety without code generation
- Negative: ties every internal API consumer to TypeScriptIf a decision's reason cannot be derived from the code or the ADR, the architect also appends an entry to .meowkit/memory/decisions.md.
Step 5: Challenge the plan (optional)
/mk:plan-ceo-reviewmk:plan-ceo-review critiques a plan's ambition and scope from a founder's view, in four modes (Expansion, Selective Expansion, Hold Scope, Reduction). Use it when you want the scope questioned, not the ADR checked.
How the architect keeps patterns consistent
The architect reads existing ADRs from docs/architecture/adr/ before it reviews new work. If an implementation conflicts with an accepted ADR, the fix is either to change the implementation or to write a new ADR that supersedes the old one.
Next
Frontend Development covers frontend work with the UI/UX standards.