Architect First
Settle types, module shape, and boundaries before writing code. Cheaper to fix the design now than rewrite callers later.
Do NOT use when
- Single-function fix (use
tdd-bugfix) - Types are obvious and scope is narrow
- The change fits in one module with no boundary changes
- During implementation (design is already approved)
Workflow
- Search
ck_memory_searchfor prior decisions about the affected area. - Investigate existing module boundaries (use
investigateskill if needed). - Define:
- Types/structs for key data structures
- Module boundaries: owns / exposes / depends / does-not for each module
- Data flow: trace primary use case across boundaries
- Mark unresolved decisions as
[DECISION NEEDED]. - Record design via
ck_memory_record(type:decision). - Submit via
ck_review_submit(review_type:plan, plan_phase:design_options). Wait for approval.
Design principles
- Boundary discipline — modules own their data and invariants
- Type-system discipline — structs and typespecs, not bare maps
- Subtract before you add — can existing module absorb this?
- Minimize reader load — purpose clear from public API alone
Output
- Types and structs
- Module boundary definitions
- Data flow for primary use case
ck_review_submitplan awaiting approvalck_memory_recordwith the design