forge-orkes 0.3.9 → 0.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,34 +1,28 @@
1
1
  # Agent: Verifier
2
2
 
3
- Verify against goals, not against code. Report gaps, never fix them.
3
+ Verify against goals, not code. Report gaps, never fix them.
4
4
 
5
5
  ## Role
6
6
 
7
- Perform goal-backward verification: start from what was promised (must_haves), work backward to confirm it exists, is substantive, and is wired together. You are a quality auditor you report findings, you never fix code.
7
+ Goal-backward verification: start from what was promised (must_haves), work backward to confirm it exists, is substantive, and is wired together. Report findings only — never fix code.
8
8
 
9
- ## Available Tools
9
+ ## Tools
10
10
 
11
- **Allowed:**
12
- - Read, Glob, Grep (inspect code and artifacts)
13
- - Bash (run tests, build, lint read-only commands + test execution)
14
- - Task (spawn sub-verifiers for parallel checks)
15
-
16
- **Forbidden:**
17
- - Write, Edit (cannot modify any files — only report)
18
- - Bash: `git commit`, `git push`, `rm`, `mv` (no side effects)
19
- - Fixing code (if something fails, report it — Executor fixes it)
11
+ | Allowed | Forbidden |
12
+ |---------|-----------|
13
+ | Read, Glob, Grep | Write, Edit |
14
+ | Bash (tests, build, lint) | `git commit`, `git push`, `rm`, `mv` |
15
+ | Task (parallel sub-verifiers) | Fixing code (report it — Executor fixes) |
20
16
 
21
17
  ## Upstream Input
22
18
 
23
19
  - Plan with must_haves: `.forge/phases/m{M}-{N}-{name}/plan.md`
24
20
  - Execution summary from Executor
25
- - Source code (read-only inspection)
26
- - Milestone state file (what was completed, any deviations)
21
+ - Source code (read-only)
22
+ - Milestone state file (completions, deviations)
27
23
 
28
24
  ## Downstream Output
29
25
 
30
- Verification report:
31
-
32
26
  ```markdown
33
27
  # Verification Report: {Phase/Plan Name}
34
28
 
@@ -88,60 +82,48 @@ Read: .forge/context.md → know locked decisions
88
82
  For each truth in `must_haves.truths`:
89
83
  1. Determine how to observe it (run app? check output? read code?)
90
84
  2. Execute the observation
91
- 3. Record: PASS with evidence, or FAIL with what was observed instead
85
+ 3. Record PASS with evidence, or FAIL with what was observed instead
92
86
 
93
87
  ### 3. Verify Artifacts
94
88
 
95
89
  For each artifact in `must_haves.artifacts`:
96
90
 
97
- **Exists check**: Does the file/component exist at the specified path?
91
+ **Exists check**:
98
92
  ```bash
99
93
  ls -la {path}
100
94
  ```
101
95
 
102
- **Substantive check**: Is it real code, not a stub?
103
- Red flags for stubs:
104
- - Functions that return empty arrays, null, or hardcoded values
105
- - Components that render only placeholder text
96
+ **Substantive check** red flags for stubs:
97
+ - Functions returning empty arrays, null, or hardcoded values
98
+ - Components rendering only placeholder text
106
99
  - Files under 10 lines that should be substantial
107
100
  - `// TODO` or `// PLACEHOLDER` comments
108
- - Empty catch blocks
109
- - Functions with no implementation body
101
+ - Empty catch blocks, no-op function bodies
110
102
 
111
103
  ```bash
112
- # Check for stub patterns
113
104
  grep -n "TODO\|PLACEHOLDER\|FIXME\|NotImplemented" {path}
114
105
  grep -n "return \[\]\|return null\|return {}" {path}
115
106
  ```
116
107
 
117
- **Wired check**: Is it actually connected to the rest of the system?
118
- - Is it imported by other modules?
119
- - Is it registered in routing/navigation?
120
- - Is it called/rendered somewhere?
121
-
108
+ **Wired check** is it connected to the system?
122
109
  ```bash
123
- # Check if imported anywhere
124
110
  grep -r "import.*{component}" src/
125
111
  grep -r "require.*{module}" src/
126
112
  ```
113
+ Check: imported by other modules, registered in routing, called/rendered somewhere.
127
114
 
128
115
  ### 4. Verify Key Links
129
116
 
130
117
  For each link in `must_haves.key_links`:
131
118
  1. Trace from component A to component B
132
- 2. Verify the connection exists (import, API call, event, route)
133
- 3. Test the connection works (if testable)
119
+ 2. Confirm the connection exists (import, API call, event, route)
120
+ 3. Test the connection works if testable
134
121
 
135
122
  ### 5. Run Tests
136
123
 
137
124
  ```bash
138
- # Run full test suite
139
125
  npm test 2>&1
140
-
141
- # Run build to check for compilation errors
142
126
  npm run build 2>&1
143
-
144
- # Run linting
145
127
  npm run lint 2>&1
146
128
  ```
147
129
 
@@ -149,8 +131,6 @@ Record all results.
149
131
 
150
132
  ### 6. Anti-Pattern Scan
151
133
 
152
- Check for common issues the Executor might have left:
153
-
154
134
  | Pattern | Command | Severity |
155
135
  |---------|---------|----------|
156
136
  | Console.log debugging | `grep -rn "console.log" src/` | Warning |
@@ -162,13 +142,13 @@ Check for common issues the Executor might have left:
162
142
  ### 7. Requirements Coverage
163
143
 
164
144
  Cross-reference requirements from `.forge/phases/m{M}-{N}-{name}/requirements.yml`:
165
- - Every `must-have` requirement should have corresponding implemented code
166
- - Every acceptance criterion should be testable
167
- - Flag any requirements with no corresponding implementation
145
+ - Every `must-have` requirement has corresponding implemented code
146
+ - Every acceptance criterion is testable
147
+ - Flag requirements with no corresponding implementation
168
148
 
169
149
  ### 8. Produce Report
170
150
 
171
- Compile all findings into the verification report template. Set overall status:
151
+ Compile findings into the verification report template. Overall status:
172
152
  - **PASS**: All truths verified, all artifacts substantive and wired, tests pass
173
153
  - **PARTIAL**: Some truths verified, minor gaps in artifacts or links
174
154
  - **FAIL**: Critical truths unverified, stubs found, tests failing
@@ -196,15 +176,15 @@ gaps:
196
176
  - [ ] All must_haves checked (truths, artifacts, key_links)
197
177
  - [ ] Tests executed and results recorded
198
178
  - [ ] Anti-pattern scan completed
199
- - [ ] Requirements coverage verified
179
+ - [ ] Requirements coverage checked
200
180
  - [ ] No source code modified
201
- - [ ] Verification report delivered with clear PASS/FAIL/PARTIAL
202
- - [ ] Gaps documented in YAML format (if any)
181
+ - [ ] Report delivered with clear PASS/FAIL/PARTIAL
182
+ - [ ] Gaps documented in YAML format if any
203
183
 
204
184
  ## Anti-Patterns
205
185
 
206
- - **Fix-while-verifying**: Editing code to make tests pass (your job is to report, not fix)
207
- - **Surface-level checks**: Confirming file exists without checking substance
186
+ - **Fix-while-verifying**: Editing code to make tests pass report, don't fix
187
+ - **Surface-level checks**: Confirming a file exists without checking substance
208
188
  - **Skipping wired check**: File exists and has code, but nothing uses it
209
189
  - **Trusting test count**: Many tests passing doesn't mean the right things are tested
210
- - **Ignoring deviations**: Not checking whether Executor's deviations were valid
190
+ - **Ignoring deviations**: Not checking whether Executor deviations were valid
@@ -1,24 +1,23 @@
1
1
  ---
2
2
  name: architecting
3
- description: "Use when making architectural decisions: choosing frameworks, designing data models, defining API contracts, evaluating trade-offs. Trigger when a decision will affect multiple features, when you need to choose between competing approaches, or when planning Full tier work that requires structural decisions before implementation."
3
+ description: "Make architectural decisions: choose frameworks, design data models, define API contracts, evaluate trade-offs. Trigger for Full tier work requiring structural decisions before implementation."
4
4
  ---
5
5
 
6
6
  # Architecting
7
7
 
8
- Make sound architectural decisions. Document rationale. Consider alternatives.
8
+ Make architectural decisions. Document rationale. Consider alternatives.
9
9
 
10
- ## When to Use This Skill
10
+ ## When to Use
11
11
 
12
12
  - Choosing a framework, library, or major dependency
13
13
  - Designing a data model or database schema
14
14
  - Defining API contracts or service boundaries
15
- - Deciding on state management approach
16
- - Choosing authentication/authorization strategy
17
- - Any decision that will be expensive to change later
15
+ - Deciding on state management, auth strategy
16
+ - Any decision expensive to change later
18
17
 
19
18
  ## Architecture Decision Record (ADR)
20
19
 
21
- Every significant architectural decision gets recorded. Store in `.forge/decisions/`:
20
+ Record every significant decision in `.forge/decisions/`:
22
21
 
23
22
  ```markdown
24
23
  # ADR-{NNN}: {Decision Title}
@@ -27,13 +26,13 @@ Every significant architectural decision gets recorded. Store in `.forge/decisio
27
26
  **Status:** Proposed | Decided | Superseded by ADR-{NNN}
28
27
 
29
28
  ## Context
30
- What problem are we solving? What constraints exist? What prompted this decision?
29
+ What problem? What constraints? What prompted this?
31
30
 
32
31
  ## Decision
33
- What did we decide? Be specific about the approach, not just the tool.
32
+ The chosen approach be specific about the approach, not the tool.
34
33
 
35
34
  ## Rationale
36
- Why this approach? What are the key benefits that made this the winner?
35
+ Why this won.
37
36
 
38
37
  ## Alternatives Considered
39
38
 
@@ -50,13 +49,11 @@ Why this approach? What are the key benefits that made this the winner?
50
49
  - Why rejected: {Specific reason}
51
50
 
52
51
  ## Trade-Offs
53
- What are we gaining and what are we giving up?
54
52
  - Gain: {benefit}
55
53
  - Give up: {drawback}
56
54
  - Mitigation: {how we'll handle the drawback}
57
55
 
58
56
  ## Consequences
59
- What changes because of this decision?
60
57
  - {Positive consequence}
61
58
  - {Negative consequence}
62
59
  - {Future decisions this enables or blocks}
@@ -64,70 +61,59 @@ What changes because of this decision?
64
61
 
65
62
  ## Constitutional Gate Check
66
63
 
67
- Before finalizing any architecture decision, verify against `.forge/constitution.md`:
64
+ Before finalizing any decision, check against `.forge/constitution.md`:
68
65
 
69
66
  1. Read the relevant articles
70
- 2. Check if the decision satisfies all gates
71
- 3. If a gate fails → either change the decision or propose a constitutional amendment
67
+ 2. Confirm the decision satisfies all gates
68
+ 3. Gate fails → change the decision or propose a constitutional amendment
72
69
 
73
- Common gate conflicts:
74
- - **Article I (Library-First)**: Custom solution when library exists?
75
- - **Article III (Simplicity)**: Adding unnecessary complexity?
76
- - **Article IV (Consistency)**: Breaking existing patterns without justification?
77
- - **Article V (Design System)**: Introducing UI elements outside the design system?
70
+ Common conflicts:
71
+ - **Article I (Library-First)**: Custom solution when a library exists?
72
+ - **Article III (Simplicity)**: Unnecessary complexity?
73
+ - **Article IV (Consistency)**: Breaking patterns without justification?
74
+ - **Article V (Design System)**: UI elements outside the design system?
78
75
 
79
76
  ## Scope Assessment
80
77
 
81
- Where does this decision belong?
82
-
83
- | Scope | Storage | Review Required |
84
- |-------|---------|-----------------|
85
- | Single feature only | Comment in code + brief note in plan | No |
78
+ | Scope | Storage | Review |
79
+ |-------|---------|--------|
80
+ | Single feature | Code comment + plan note | No |
86
81
  | Multiple features | `.forge/decisions/ADR-{NNN}.md` | User approval |
87
- | Entire project structure | `.forge/decisions/ADR-{NNN}.md` + update `project.yml` | User approval + constitutional check |
88
- | External system boundary | `.forge/decisions/ADR-{NNN}.md` + API contract | User approval + security review |
82
+ | Project structure | ADR + update `project.yml` | User approval + constitutional check |
83
+ | External boundary | ADR + API contract | User approval + security review |
89
84
 
90
85
  ## Data Model Design
91
86
 
92
- When designing data models:
93
-
94
- 1. Start with the user stories (what data do they need to see/create/edit?)
87
+ 1. Start from user stories — what data do they see/create/edit?
95
88
  2. Identify entities and relationships
96
- 3. Define required fields vs. optional
97
- 4. Consider indexing needs (what will be queried frequently?)
98
- 5. Plan for evolution (what might change? Use nullable fields over rigid schemas)
89
+ 3. Define required vs. optional fields
90
+ 4. Consider indexing for frequent queries
91
+ 5. Plan for evolution prefer nullable fields over rigid schemas
99
92
 
100
93
  Document in `.forge/phases/m{M}-{N}-{name}/data-model.md`.
101
94
 
102
95
  ## API Contract Design
103
96
 
104
- When designing APIs:
105
-
106
97
  1. Define endpoints with HTTP methods
107
98
  2. Specify request/response schemas (TypeScript interfaces or JSON Schema)
108
99
  3. Document error responses
109
- 4. Consider pagination for list endpoints
110
- 5. Plan authentication requirements per endpoint
100
+ 4. Add pagination for list endpoints
101
+ 5. Plan per-endpoint auth requirements
111
102
 
112
103
  Document in `.forge/phases/m{M}-{N}-{name}/contracts/`.
113
104
 
114
105
  ## Output
115
106
 
116
- After completing architectural work:
117
107
  1. ADR filed in `.forge/decisions/`
118
108
  2. Data model documented (if applicable)
119
109
  3. API contracts defined (if applicable)
120
- 4. Constitutional gates verified
121
- 5. User has approved significant decisions
110
+ 4. Constitutional gates checked
111
+ 5. User approved significant decisions
122
112
 
123
113
  ## Phase Handoff
124
114
 
125
- After architectural decisions are documented:
126
-
127
- 1. **Verify persistence** — Confirm ADRs are written to `.forge/decisions/`, data models and API contracts to `.forge/phases/m{M}-{N}-{name}/`
115
+ 1. **Persist** — Confirm ADRs in `.forge/decisions/`, models and contracts in `.forge/phases/m{M}-{N}-{name}/`
128
116
  2. **Update state** — Set `current.status` to `planning` in `.forge/state/milestone-{id}.yml`
129
117
  3. **Recommend context clear:**
130
118
 
131
- *"Architecting phase complete. Decisions are documented in `.forge/decisions/` and phase artifacts. I recommend clearing context (`/clear`) before starting the planning phase — the planner will load ADRs, contracts, and state from disk.*
132
-
133
- *Ready to continue? Clear context and invoke `/forge` to resume."*
119
+ *"Architecture decisions written. `/clear` then `/forge` to continue with planning."*
@@ -1,70 +1,60 @@
1
1
  ---
2
2
  name: beads-integration
3
- description: "Use when Beads is installed and you want persistent memory across sessions. Trigger when: starting a session on an existing project (bd prime for context), need to find unblocked work (bd ready), completing tasks (bd complete), or managing long-horizon multi-session projects. Requires Beads CLI to be installed."
3
+ description: "Use when Beads is installed for persistent cross-session memory. Trigger on: session start (bd prime), finding unblocked work (bd ready), completing tasks (bd complete), or managing multi-session projects. Requires Beads CLI."
4
4
  ---
5
5
 
6
- # Beads Integration (Optional)
6
+ # Beads Integration
7
7
 
8
- Persistent cross-session memory. Only available when Beads is installed.
8
+ Persistent cross-session memory. Requires Beads CLI.
9
9
 
10
10
  ## Prerequisites
11
11
 
12
- Before using this skill, verify:
13
- 1. Beads CLI installed: `bd --version` (should return version)
14
- 2. Beads initialized in project: `.beads/` directory exists
12
+ 1. Beads CLI installed: `bd --version`
13
+ 2. Beads initialized: `.beads/` directory exists
15
14
  3. Forge integration enabled: `settings.json → forge.beads_integration: true`
16
15
 
17
- If not installed, Forge works fine without it using `.forge/state/` + Session Memory.
16
+ Without Beads, Forge uses `.forge/state/` + Session Memory.
18
17
 
19
18
  ## Integration Points
20
19
 
21
- ### On Session Start: `bd prime`
20
+ ### Session Start: `bd prime`
22
21
 
23
- Run at the beginning of every session:
22
+ Run at every session start:
24
23
 
25
24
  ```bash
26
25
  bd prime
27
26
  ```
28
27
 
29
- This injects ~1-2K tokens of context:
30
- - Open tasks with zero open blockers
31
- - Recently closed tasks (last 3)
32
- - Active blockers and their status
28
+ Injects ~1-2K tokens: open unblocked tasks, recently closed tasks (last 3), active blockers.
33
29
 
34
- Combine with Forge state: read `.forge/state/milestone-{id}.yml` for workflow position (where `{id}` is the selected milestone), `bd prime` for project-wide context.
30
+ Combine with Forge state: `.forge/state/milestone-{id}.yml` for workflow position, `bd prime` for project-wide context.
35
31
 
36
32
  ### Finding Work: `bd ready`
37
33
 
38
- Instead of manually triaging, query what's available:
39
-
40
34
  ```bash
41
35
  bd ready # All unblocked tasks, sorted by priority
42
36
  bd ready --priority 3 # Only priority 3+ tasks
43
37
  bd ready --json # Machine-readable output
44
38
  ```
45
39
 
46
- Use `bd ready` output to inform which Forge phase/plan to work on next.
40
+ Use output to decide which Forge phase/plan to work on next.
47
41
 
48
42
  ### During Work: `bd update`
49
43
 
50
- As you complete Forge tasks, update Beads:
51
-
52
44
  ```bash
53
- bd complete {task-id} # Mark task done
54
- bd block {task-id} --by {blocker-id} # Record a blocker
55
- bd unblock {task-id} # Remove a blocker
45
+ bd complete {task-id} # Mark task done
46
+ bd block {task-id} --by {blocker-id} # Record a blocker
47
+ bd unblock {task-id} # Remove a blocker
56
48
  ```
57
49
 
58
50
  ### Memory Hygiene: `bd compact`
59
51
 
60
- Periodically clean up old completed tasks:
61
-
62
52
  ```bash
63
- bd compact --analyze --json # See what would be compacted
53
+ bd compact --analyze --json # Preview what gets compacted
64
54
  bd compact --apply # Summarize old tasks (30+ days closed)
65
55
  ```
66
56
 
67
- Compaction replaces detailed task content with LLM-generated summaries, preserving essential context while reducing token cost.
57
+ Compaction replaces detailed task content with LLM-generated summaries, reducing token cost while preserving essential context.
68
58
 
69
59
  ## Forge + Beads Workflow
70
60
 
@@ -83,37 +73,31 @@ bd prime → bd ready (pick task) → researching → discussing → planning
83
73
  bd prime → bd ready (pick phase) → researching → discussing → architecting → planning → executing → bd complete → verifying → done
84
74
  ```
85
75
 
86
- ## Syncing State
87
-
88
- Forge's `.forge/state/` and Beads' `.beads/` serve different purposes:
76
+ ## State Sync
89
77
 
90
78
  | Concern | Forge (state/) | Beads (.beads/) |
91
79
  |---------|----------------|-----------------|
92
- | Current workflow position | ✓ (milestone-{id}.yml: phase, plan, task) | |
93
- | Global framework patterns | ✓ (index.yml: desire_paths, metrics) | |
94
- | Locked decisions | ✓ (context.md) | |
95
- | Project-wide task graph | | ✓ (DAG with dependencies) |
96
- | Cross-session memory | | (persists in git) |
97
- | Task prioritization | | ✓ (5-level priority) |
98
- | Memory compaction | | (semantic summarization) |
80
+ | Workflow position | milestone-{id}.yml: phase, plan, task | |
81
+ | Framework patterns | index.yml: desire_paths, metrics | |
82
+ | Locked decisions | context.md | |
83
+ | Project-wide task graph | | DAG with dependencies |
84
+ | Cross-session memory | | Persists in git |
85
+ | Task prioritization | | 5-level priority |
86
+ | Memory compaction | | Semantic summarization |
99
87
 
100
- Both are git-tracked. Both survive session boundaries. They complement each other.
88
+ Both are git-tracked and survive session boundaries. They complement each other.
101
89
 
102
90
  ## Creating Beads from Forge Plans
103
91
 
104
- When Forge creates plans with tasks, optionally create corresponding Beads:
92
+ Optionally create Beads from Forge plan tasks for DAG dependency tracking:
105
93
 
106
94
  ```bash
107
95
  bd create "Implement login form" --priority 3
108
96
  bd create "Add auth API endpoint" --priority 3 --blocked-by {login-form-id}
109
97
  ```
110
98
 
111
- This gives you the DAG dependency tracking that Forge's flat plan files don't provide.
112
-
113
99
  ## Disabling Beads Integration
114
100
 
115
- If you want Forge without Beads:
116
-
117
101
  ```json
118
102
  {
119
103
  "forge": {
@@ -122,4 +106,4 @@ If you want Forge without Beads:
122
106
  }
123
107
  ```
124
108
 
125
- Beads continues working independently. Forge just won't query or update it.
109
+ Beads continues working independently; Forge stops querying/updating it.
@@ -1,21 +1,21 @@
1
1
  ---
2
2
  name: debugging
3
- description: "Use when code isn't working and you need to investigate systematically. Trigger when: tests fail unexpectedly, features don't work as expected, errors are cryptic or intermittent, or you've been stuck for more than 10 minutes. This skill prevents thrashing by enforcing scientific debugging."
3
+ description: "Systematic debugging when tests fail, features break, errors are cryptic/intermittent, or you've been stuck 10+ minutes. Prevents thrashing via scientific method."
4
4
  ---
5
5
 
6
6
  # Debugging
7
7
 
8
- Debug systematically. Every hypothesis tested, every dead end recorded.
8
+ Every hypothesis tested, every dead end recorded.
9
9
 
10
- ## The Scientific Method for Bugs
10
+ ## Scientific Method
11
11
 
12
- 1. **Observe**: What's the actual behavior? (exact error, steps to reproduce, when it started)
13
- 2. **Hypothesize**: Why might this happen? (max 3 hypotheses)
14
- 3. **Predict**: If hypothesis is correct, what should we observe when we test?
15
- 4. **Test**: Run the test. Capture evidence.
16
- 5. **Eliminate**: Does evidence support or refute? Record result.
17
- 6. **Iterate**: Next hypothesis, or refine current one.
18
- 7. **Conclude**: Root cause identified. Fix it.
12
+ 1. **Observe**: Exact behavior error, repro steps, when it started
13
+ 2. **Hypothesize**: Max 3 candidate causes
14
+ 3. **Predict**: If hypothesis holds, what should the test show?
15
+ 4. **Test**: Run it. Capture evidence.
16
+ 5. **Eliminate**: Support or refute? Record result.
17
+ 6. **Iterate**: Next hypothesis or refine current one
18
+ 7. **Conclude**: Root cause found. Fix it.
19
19
 
20
20
  ## Persistent Debug File
21
21
 
@@ -69,62 +69,61 @@ updated: 2026-02-16T19:30:00Z
69
69
  ```
70
70
 
71
71
  ### Update Rules
72
- - **Status**: Overwrite (phase transitions only)
73
- - **Current Focus**: Overwrite (before every action)
72
+ - **Status**: Overwrite on phase transitions only
73
+ - **Current Focus**: Overwrite before every action
74
74
  - **Symptoms**: Immutable after gathering phase
75
- - **Eliminated**: Append only (prevents re-investigating dead ends)
75
+ - **Eliminated**: Append only prevents re-investigating dead ends
76
76
  - **Evidence Log**: Append only
77
77
 
78
78
  ## Investigation Techniques
79
79
 
80
- Use these in order of effectiveness:
80
+ Use in order of effectiveness:
81
81
 
82
- ### 1. Read the Error (seriously)
83
- Read the ENTIRE error message, stack trace, and surrounding log output. Most bugs are explained by the error — we just don't read carefully enough.
82
+ ### 1. Read the Error
83
+ Read the ENTIRE error message, stack trace, and surrounding log output. Most bugs are explained by the error.
84
84
 
85
85
  ### 2. Binary Search
86
- Cut the problem space in half. If a function has 10 steps, test after step 5. If it works, bug is in steps 6-10. Repeat.
86
+ Cut the problem space in half. Test after step 5 of 10. Works? Bug is in 6-10. Repeat.
87
87
 
88
88
  ### 3. Minimal Reproduction
89
- Strip away everything until only the bug remains. Remove middleware, simplify data, use hardcoded values. The smaller the reproduction, the clearer the cause.
89
+ Strip away everything until only the bug remains. Remove middleware, simplify data, hardcode values.
90
90
 
91
91
  ### 4. Differential Debugging
92
- What changed? `git diff`, `git log`, recent dependency updates. If it worked before and doesn't now, something changed.
92
+ What changed? `git diff`, `git log`, recent dependency updates.
93
93
 
94
94
  ### 5. Working Backwards
95
- Start from the wrong output. Trace the data backward through the system: which function produced it? What was its input? Where did that come from?
95
+ Start from the wrong output. Trace data backward: which function produced it? What was its input?
96
96
 
97
97
  ### 6. Comment Out Everything
98
- Remove all code. Uncomment one piece at a time. When the bug reappears, you found the culprit.
98
+ Remove all code. Uncomment one piece at a time. When the bug reappears, that's the culprit.
99
99
 
100
100
  ### 7. Add Observability First
101
- Before changing behavior, add logging. See what's actually happening before guessing.
101
+ Add logging before changing behavior. See what's happening before guessing.
102
102
 
103
103
  ### 8. Git Bisect
104
- If you know it worked at some point: `git bisect start`, `git bisect bad` (current), `git bisect good {hash}` (working version). Git finds the exact breaking commit.
104
+ `git bisect start`, `git bisect bad` (current), `git bisect good {hash}` (working version). Git finds the exact breaking commit.
105
105
 
106
- ## Cognitive Bias Awareness
106
+ ## Cognitive Bias Traps
107
107
 
108
- Watch for these traps:
109
- - **Confirmation bias**: Seeking evidence that supports your theory, ignoring counter-evidence
110
- - **Anchoring**: Fixating on the first theory instead of considering alternatives
111
- - **Availability bias**: Blaming the last thing you changed, even if unrelated
112
- - **Sunk cost**: Continuing a dead-end investigation because you've spent time on it
108
+ - **Confirmation bias**: Seeking evidence for your theory, ignoring counter-evidence
109
+ - **Anchoring**: Fixating on the first theory
110
+ - **Availability bias**: Blaming the last thing changed, even if unrelated
111
+ - **Sunk cost**: Continuing a dead-end investigation because of time spent
113
112
 
114
- Counter-measure: After 3 failed hypotheses, step back and re-read symptoms from scratch.
113
+ After 3 failed hypotheses, step back and re-read symptoms from scratch.
115
114
 
116
- ## When to Escalate
115
+ ## Escalation
117
116
 
118
- After 5 hypotheses tested without finding root cause:
119
- 1. Document everything in debug file (what's tried, what's eliminated)
120
- 2. Mark as `[NEEDS PAIR DEBUGGING]` in `.forge/state/milestone-{id}.yml` blockers
117
+ After 5 hypotheses tested without root cause:
118
+ 1. Document everything in the debug file
119
+ 2. Mark `[NEEDS PAIR DEBUGGING]` in `.forge/state/milestone-{id}.yml` blockers
121
120
  3. The debug file saves the next person hours of re-investigation
122
121
 
123
122
  ## Resolution
124
123
 
125
124
  When root cause found:
126
125
  1. Fix the issue
127
- 2. Add a test that catches this specific bug (regression test)
126
+ 2. Add a regression test for this specific bug
128
127
  3. Commit: `fix({scope}): {description of root cause and fix}`
129
128
  4. Move debug file to `.forge/debug/resolved/`
130
129
  5. Update `.forge/state/milestone-{id}.yml` — remove from blockers