Fixing a bug¶
Use /n45-fix when something is broken, behaving incorrectly, or running slowly. N45 investigates, identifies the root cause, and proposes a correction — either applied immediately or planned in detail.
Like /n45-feat, N45 chooses between a hot fix and a structured fix based on what the investigation finds.
The three conditions¶
All three must be true for the hot fix path. If any one fails, N45 escalates to a structured fix.
| Condition | What it means |
|---|---|
| Clear root cause | The diagnosis is confirmed. No pending investigation. |
| No architectural change | The fix touches existing code paths only — no new modules or pattern shifts. |
| No schema or migration | The fix doesn't require a database change. |
The flow¶
flowchart TD
Start([/n45-fix]) --> Investigate[Investigate]
Investigate --> Project[Read project patterns]
Project --> Ask[Clarify symptoms & expected]
Ask --> Diagnose[Diagnose root cause]
Diagnose --> Decision{Hot fix
conditions?}
Decision -->|all 3 met| Hot[Hot fix
branch + executor]
Decision -->|any fail| Structured[Structured fix
discovery + spec + roadmap]
Hot --> Validation
Structured --> Validation
Validation([Validation])
Hot fix — example¶
"The login button does nothing when I click it."
- N45 reads
PATTERNSand the relevant components - Investigates: finds the submit handler is never bound
- Diagnoses: clear root cause, single file
- Confirms all three hot-fix conditions are met
- Decides: hot fix
- Creates a dedicated branch (
hot-fix/login-button-no-submit) - Spawns the executor with the diagnosis and the file scope
- Returns: changed files, summary, how to test
- You validate → commit → merge
Total time: 1–2 minutes.
Structured fix — example¶
"Our migration corrupted user records. Some sessions show wrong data."
- N45 investigates and identifies a partial-update bug in a migration
- Detects: requires a recovery script and schema verification — fails condition 3
- Decides: structured fix
- Runs discovery: maps affected records, root cause, recovery strategy
- Generates a spec covering the data fix plan, audit log, rollback
- You review the spec
- Generates a roadmap (recover → verify → backfill → tests)
- Each task is executed and reviewed before moving on
- Validation → approval → merge
How it differs from /n45-feat¶
/n45-feat |
/n45-fix |
|
|---|---|---|
| Quick path name | Quick Feat | Hot Fix |
| Branch prefix | quick-feat/... |
hot-fix/... |
| Commit tag | [quick-feat] |
[hot-fix] |
| Trigger | New behavior wanted | Existing behavior wrong |
Otherwise: same triage, same validation, same merge.