Building a feature¶
Use /n45-feat whenever you want to add or improve something — a new endpoint, a UI change, a new domain, anything from a typo fix to a complete authentication system.
N45 decides automatically whether to take the quick path (apply the change directly) or the structured path (full discovery → spec → roadmap → execution). The decision is made during triage based on four conditions.
The four conditions¶
All four must be true for the quick path. If any one fails, N45 escalates to the structured path.
| Condition | What it means |
|---|---|
| Clear intent | The request is specific. No "should it be X or Y?" decisions pending. |
| No architectural change | No new module, pattern, or abstraction. |
| No schema or migration | The database stays intact — no CREATE / ALTER / DROP. |
| No new public contract | No new endpoint, breaking API change, webhook event, or public flag. |
The flow¶
flowchart TD
Start([/n45-feat]) --> Triage[Triage]
Triage --> Project[Read project patterns
STACK · PATTERNS · PROJECT]
Project --> Ask[Clarify intent & scope]
Ask --> Plan[Present plan]
Plan --> Decision{Quick path
conditions?}
Decision -->|all 4 met| Quick[Quick path
branch + executor]
Decision -->|any fail| Structured[Structured path
discovery + spec + roadmap]
Quick --> Validation
Structured --> Validation
Validation([Validation])
Triage always runs first, and it always reads your project's foundational documents — even on the quick path. This is how N45 avoids breaking architectural patterns on small changes.
After the plan is presented, you confirm before anything ships:
Quick path — example¶
"Change the primary button background from blue to violet."
- N45 reads
PATTERNSto know your CSS/styling conventions - Confirms scope: one component, one line in a stylesheet
- Decides: quick path — all four conditions met
- Creates a dedicated branch (
quick-feat/button-violet) - Spawns the executor with the precise change
- Returns: files modified, summary, how to test
- You validate → commit → merge
Total time: about 1 minute.
Structured path — example¶
"Add Google OAuth login alongside email/password."
- N45 reads project patterns and confirms scope
- Triage detects a new public contract (
/auth/googleendpoint) — fails condition 4 - Decides: structured path
- Runs full discovery — explores auth code, asks about session model, scopes, redirect URLs
- Generates a spec — proposed flows, endpoints, persistence, error cases
- You review and approve the spec
- N45 generates a roadmap with phases (DB → backend → frontend → tests)
- Each phase runs through dedicated agents (executor + reviewer per task)
- After all phases pass review, you enter validation
- Approved → merge or PR
Total time: minutes to hours depending on scope. You are asked to approve at every meaningful decision.
What gets created¶
- Quick path: a branch, a commit, optionally a PR
- Structured path: the above, plus permanent artifacts inside
.n45/:- A discovery document
- A spec
- A roadmap with tasks
- A retrospective on close
These artifacts let future runs build on prior context — including yours, weeks later.
See also¶
- Fixing a bug — the parallel flow for
/n45-fix - Validation and Merge — what happens after execution