/shape
Shape a raw idea into something buildable. Output is a context packet —
the unit of specification that precedes implementation.
Workflow
Phase 1: Understand
Accept: raw idea, backlog.d/ item, issue ID, or observation.
Spawn parallel sub-agents to gather context fast: one to map the relevant
codebase area (files, patterns, constraints), another to search for prior art
(how do other projects solve this? check codebase first, then /research).
Synthesize their findings before proceeding.
Phase 2: Product Exploration
GATE: Do NOT write code until product direction is locked.
- Investigate — Problem space, user impact, prior art
- Brainstorm — 2-3 approaches with tradeoffs. Recommend one.
- Discuss — One question at a time. Iterate until locked.
- Draft spec — Goal, non-goals, acceptance criteria
Phase 3: Technical Exploration
Explore — 3-5 technical approaches. For each:
architecture sketch, files to modify, pattern alignment, effort, tradeoffs.
Recommend one.
Validate — For effort M or larger, spawn the design review bench in parallel:
ousterhout reviews for module depth and information hiding, carmack for
shippability and over-engineering, grug for complexity. Give each the design
summary and ask for a verdict + concerns. If any has blocking concerns,
revise the design before proceeding.
Discuss — No limit on rounds. Design isn't ready until user says so.
Phase 4: Context Packet
The output of shape. This is what /autopilot and builders consume.
# Context Packet: <title>
## Goal
<1 sentence — what outcome, not mechanism>
## Non-Goals
- <what NOT to do, even if it seems like a good idea>
## Constraints / Invariants
- <things that must remain true before, during, and after>
## Authority Order
tests > type system > code > docs > lore
## Repo Anchors
- `src/auth/middleware.ts` — current pattern to follow
- `tests/auth/` — existing coverage
## Prior Art
- `src/payments/middleware.ts` — similar pattern
## Oracle (Definition of Done)
- [ ] All existing auth tests pass
- [ ] New endpoint returns 200 with valid token
- [ ] Response time < 100ms p99
## Implementation Sequence
1. <first chunk>
2. <second chunk>
## Risk + Rollout
- <how it could fail, how to undo it>
If you can't write an oracle, the goal isn't clear enough. Go back to Phase 2.
Gotchas
- Vague oracles: "It should work" is not an oracle. "These 3 tests pass and this endpoint returns 200" is. See
references/executable-oracles.md.
- Checkbox oracles: Prose checklists drift. Write oracles as commands that return pass/fail, not prose that requires interpretation.
- Speccing after building: A context packet written after implementation is documentation, not specification. Spec first.
- 50 repo anchors: If everything is an anchor, nothing is. Pick 3-10 files whose patterns MUST be followed.
- Skipping non-goals: Agents drift toward scope expansion. Non-goals are load-bearing constraints. Write them.
- Over-speccing implementation details: Specify WHAT and WHY. Let the builder figure out HOW. Detailed pseudocode cascades errors.
Principles
- Minimize touch points (fewer files = less risk)
- Design for deletion (easy to remove later)
- Favor existing patterns over novel ones
- YAGNI ruthlessly
- Recommend, don't just list options
- One question at a time
1---2name: shape3description: Shape a raw idea into something buildable. Product + technical exploration. Spec, design, critique, plan. Output is a context packet. Use when: "shape this", "write a spec", "design this feature", "plan this", "spec out", "context packet", "technical design". Trigger: /shape, /spec, /plan, /cp.4---56# /shape78Shape a raw idea into something buildable. Output is a **context packet** —9the unit of specification that precedes implementation.1011## Workflow1213### Phase 1: Understand1415Accept: raw idea, backlog.d/ item, issue ID, or observation.1617Spawn parallel sub-agents to gather context fast: one to map the relevant18codebase area (files, patterns, constraints), another to search for prior art19(how do other projects solve this? check codebase first, then /research).20Synthesize their findings before proceeding.2122### Phase 2: Product Exploration2324**GATE: Do NOT write code until product direction is locked.**25261. **Investigate** — Problem space, user impact, prior art272. **Brainstorm** — 2-3 approaches with tradeoffs. **Recommend one.**283. **Discuss** — One question at a time. Iterate until locked.294. **Draft spec** — Goal, non-goals, acceptance criteria3031### Phase 3: Technical Exploration32331. **Explore** — 3-5 technical approaches. For each:34 architecture sketch, files to modify, pattern alignment, effort, tradeoffs.35 **Recommend one.**36372. **Validate** — For effort M or larger, spawn the design review bench in parallel:38 ousterhout reviews for module depth and information hiding, carmack for39 shippability and over-engineering, grug for complexity. Give each the design40 summary and ask for a verdict + concerns. If any has blocking concerns,41 revise the design before proceeding.42433. **Discuss** — No limit on rounds. Design isn't ready until user says so.4445### Phase 4: Context Packet4647The output of shape. This is what `/autopilot` and builders consume.4849```markdown50# Context Packet: <title>5152## Goal53<1 sentence — what outcome, not mechanism>5455## Non-Goals56- <what NOT to do, even if it seems like a good idea>5758## Constraints / Invariants59- <things that must remain true before, during, and after>6061## Authority Order62tests > type system > code > docs > lore6364## Repo Anchors65- `src/auth/middleware.ts` — current pattern to follow66- `tests/auth/` — existing coverage6768## Prior Art69- `src/payments/middleware.ts` — similar pattern7071## Oracle (Definition of Done)72- [ ] All existing auth tests pass73- [ ] New endpoint returns 200 with valid token74- [ ] Response time < 100ms p997576## Implementation Sequence771. <first chunk>782. <second chunk>7980## Risk + Rollout81- <how it could fail, how to undo it>82```8384If you can't write an oracle, the goal isn't clear enough. Go back to Phase 2.8586## Gotchas8788- **Vague oracles:** "It should work" is not an oracle. "These 3 tests pass and this endpoint returns 200" is. See `references/executable-oracles.md`.89- **Checkbox oracles:** Prose checklists drift. Write oracles as commands that return pass/fail, not prose that requires interpretation.90- **Speccing after building:** A context packet written after implementation is documentation, not specification. Spec first.91- **50 repo anchors:** If everything is an anchor, nothing is. Pick 3-10 files whose patterns MUST be followed.92- **Skipping non-goals:** Agents drift toward scope expansion. Non-goals are load-bearing constraints. Write them.93- **Over-speccing implementation details:** Specify WHAT and WHY. Let the builder figure out HOW. Detailed pseudocode cascades errors.9495## Principles9697- Minimize touch points (fewer files = less risk)98- Design for deletion (easy to remove later)99- Favor existing patterns over novel ones100- YAGNI ruthlessly101- Recommend, don't just list options102- One question at a time