Skip to content

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:

Confirm feat
Apply the proposed change to the codebase?

Quick path — example

"Change the primary button background from blue to violet."

  1. N45 reads PATTERNS to know your CSS/styling conventions
  2. Confirms scope: one component, one line in a stylesheet
  3. Decides: quick path — all four conditions met
  4. Creates a dedicated branch (quick-feat/button-violet)
  5. Spawns the executor with the precise change
  6. Returns: files modified, summary, how to test
  7. You validate → commit → merge

Total time: about 1 minute.

Structured path — example

"Add Google OAuth login alongside email/password."

  1. N45 reads project patterns and confirms scope
  2. Triage detects a new public contract (/auth/google endpoint) — fails condition 4
  3. Decides: structured path
  4. Runs full discovery — explores auth code, asks about session model, scopes, redirect URLs
  5. Generates a spec — proposed flows, endpoints, persistence, error cases
  6. You review and approve the spec
  7. N45 generates a roadmap with phases (DB → backend → frontend → tests)
  8. Each phase runs through dedicated agents (executor + reviewer per task)
  9. After all phases pass review, you enter validation
  10. 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