Create an immutable design contract for a new project. Collaborative process: research → discuss constraints → lock decisions → write doc. Usage: /north-star [project-name]
Create NORTH_STAR.md — an immutable design contract whose primary audience is future LLM coding agents. Prevents agents from weakening assumptions, skipping validation, re-exploring dead ends, or mixing concerns.
If no project name given, ask: "What are we building?"
Gather:
Spawn parallel research (use /research pattern or Task agents):
This is where the value lives. Ask targeted questions to lock constraints:
Don't rush this. The NORTH_STAR is only as good as the discussion that produces it.
Create NORTH_STAR.md in project root:
# NORTH STAR — <Project Name>
Immutable design contract. Audience: LLM coding agents.
Append-only decision log at bottom. Do not weaken constraints.
## Goal
<1-2 sentence summary>
## Architecture — LOCKED
<Core abstraction, separation of concerns, what never mixes>
## Constraints
### LOCKED (do not change without decision log entry)
- <Constraint 1>: <rationale>
- <Constraint 2>: <rationale>
### OPEN (measure empirically)
- <Question 1>: <what we don't know, how to find out>
- <Question 2>: <default assumption + plan to validate>
## Layers
<Ordered implementation layers, each with gate criteria>
Layer-gate rule: each layer must pass its criteria before
the next layer is added. Do not skip. Do not build Layer N
to "fix" a broken Layer N-1.
## Anti-Patterns — DO NOT
1. <Thing an agent will try> — <why it fails, with evidence>
2. <Another thing> — <citation from prior work>
## Decision Log
| Date | Decision | Rationale |
|------|----------|-----------|
| <date> | Created NORTH_STAR | Initial constraints from research + discussion |
The three-doc hierarchy for larger projects:
| Doc | Scope | Mutability |
|---|---|---|
| NORTH_STAR.md | Immutable constraints, kill list, gate rules | Append-only (decision log) |
| ROADMAP.md | Full vision, research findings, confidence ladder | Updated as we learn |
| PROMPT.md | Current phase spec, acceptance criteria, "done" definition | Replaced per phase |
Only create ROADMAP.md and PROMPT.md if the project warrants it. Ask the user before creating companion docs.
Output: "NORTH_STAR.md written. Review the LOCKED constraints — once we start building, these don't change without a decision log entry."