| name | nq-design |
| description | Guide the tech design discussion and design doc drafting for a feature. Use when starting steps 3-4 of the feature process. |
| user-invocable | true |
| argument-hint | Feature name or requirements doc path (e.g., "XP from history" or "docs/requirements/encounters.md") |
NQ Tech Design Process
This skill guides steps 3 (Tech Design Discussion) and 4 (Design Doc) of the feature process defined in CLAUDE.md.
Input: A feature name, requirements doc, or conversation context describing what we're building.
Step 1: Read Context
Before any design discussion, read:
- The requirements doc (if one exists) — line by line. Flag any place where a design decision might deviate.
- DATA_MODEL.md — understand current entities, relationships, lifecycle rules.
- docs/mechanics.md — understand current user-facing behavior.
- Relevant source code — trace the existing functions that touch the feature area.
Step 2: Tech Design Discussion
Talk through how to build it. Cover:
- Entities and relationships — what data structures change or are added?
- Data flow — how does data move from user action to storage to display?
- Trade-offs — what are the options, what do you recommend, and why?
- Vertical slices — each implementation step must deliver something the user can functionally test, not "backend then frontend." Don't separate backend from frontend into different steps when the frontend is the primary way to verify the backend works.
Surface genuine questions and gaps. Don't default to "no questions, ready to build." Spend real effort thinking through edge cases before saying there aren't any.
Step 3: Pre-Draft Checklist
Before drafting the design doc, verify you can answer each of these. If not, raise the gap.
Read Path Analysis
Write Path Analysis (CRITICAL — this is where design gaps become implementation bugs)
Consumer Analysis
Edge Cases
Step 4: Draft the Design Doc
Write to docs/design/<feature-name>-design.md. The doc must include:
- Goal — one paragraph.
- Approach — high-level strategy.
- Write path changes — enumerate every function that writes affected data, what changes in each, and transactional boundaries.
- Read path changes — what queries change, what display updates.
- Migration — what happens for existing users on first launch.
- Implementation steps — vertical slices, each independently testable. For UI-visible changes, specify which tab/view to test on (e.g., "Quest List tab," "Quest Giver," "Saga tab"). Data that appears on multiple surfaces (e.g., saga steps on both Quest List and Saga tab) should name each surface explicitly.
- Out of scope — what we're explicitly not doing.
Design Doc Rules
- Implement the requirements, not reinterpret them. If a design decision differs from what was agreed, flag it BEFORE writing the doc.
- Summarize after drafting. End with a conversational summary of the approach and implementation steps so the user can react before we commit to the plan.
- Don't commit without code. Design docs are committed alongside implementation, or when the user explicitly asks for a doc-only commit.
Step 5: Step Spec
After the design doc is approved, write a step spec for the first vertical slice. Scoped to what can be built, tested, and committed in one session. Lives in docs/step-spec.md.