devflow-kit 3.11.0 → 3.12.1

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.
Files changed (206) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/dist/agents/architect.md +91 -0
  3. package/dist/agents/code.md +21 -25
  4. package/dist/agents/debug.md +22 -50
  5. package/dist/agents/design.md +9 -43
  6. package/dist/agents/fix.md +15 -29
  7. package/dist/agents/git.md +19 -22
  8. package/dist/agents/harden.md +14 -19
  9. package/dist/agents/knowledge.md +11 -19
  10. package/dist/agents/refactor.md +9 -14
  11. package/dist/agents/research.md +11 -34
  12. package/dist/agents/review.md +22 -52
  13. package/dist/agents/skim.md +7 -17
  14. package/dist/agents/triage.md +7 -14
  15. package/dist/cli/commands/uninstall.js +1 -1
  16. package/dist/commands/bug-analysis.md +32 -63
  17. package/dist/commands/code-review.md +39 -88
  18. package/dist/commands/debug.md +32 -82
  19. package/dist/commands/dynamic-build.md +157 -211
  20. package/dist/commands/dynamic-plan.md +71 -93
  21. package/dist/commands/dynamic-profile.md +7 -155
  22. package/dist/commands/dynamic-tickets.md +65 -186
  23. package/dist/commands/explore.md +27 -70
  24. package/dist/commands/implement.md +101 -189
  25. package/dist/commands/plan.md +61 -108
  26. package/dist/commands/release.md +26 -92
  27. package/dist/commands/research.md +37 -106
  28. package/dist/commands/resolve.md +65 -129
  29. package/dist/commands/self-review.md +36 -100
  30. package/dist/compliance-off/agents/git.md +15 -18
  31. package/dist/compliance-off/agents/triage.md +7 -14
  32. package/dist/compliance-off/commands/bug-analysis.md +32 -63
  33. package/dist/compliance-off/commands/code-review.md +35 -83
  34. package/dist/compliance-off/commands/dynamic-build.md +151 -205
  35. package/dist/compliance-off/commands/dynamic-tickets.md +65 -186
  36. package/dist/compliance-off/commands/implement.md +97 -183
  37. package/dist/compliance-off/commands/plan.md +61 -108
  38. package/dist/compliance-off/commands/release.md +26 -91
  39. package/dist/compliance-off/commands/resolve.md +55 -129
  40. package/dist/compliance-off/skills/git/references/tracker/github/ensure-pr-ready.md +3 -3
  41. package/dist/compliance-off/skills/git/references/tracker/jira/ensure-pr-ready.md +3 -3
  42. package/dist/compliance-off/skills/git/references/tracker/linear/ensure-pr-ready.md +3 -3
  43. package/dist/core/plugins.js +3 -3
  44. package/dist/curation-compliance-off/agents/triage.md +7 -13
  45. package/dist/curation-compliance-off/commands/bug-analysis.md +22 -42
  46. package/dist/curation-compliance-off/commands/code-review.md +26 -63
  47. package/dist/curation-compliance-off/commands/dynamic-build.md +144 -194
  48. package/dist/curation-compliance-off/commands/dynamic-tickets.md +54 -173
  49. package/dist/curation-compliance-off/commands/implement.md +89 -164
  50. package/dist/curation-compliance-off/commands/plan.md +52 -87
  51. package/dist/curation-compliance-off/commands/release.md +18 -79
  52. package/dist/curation-compliance-off/commands/resolve.md +46 -109
  53. package/dist/curation-off/agents/architect.md +85 -0
  54. package/dist/curation-off/agents/code.md +20 -23
  55. package/dist/curation-off/agents/debug.md +20 -48
  56. package/dist/curation-off/agents/design.md +8 -41
  57. package/dist/curation-off/agents/fix.md +14 -27
  58. package/dist/curation-off/agents/harden.md +13 -18
  59. package/dist/curation-off/agents/knowledge.md +9 -17
  60. package/dist/curation-off/agents/refactor.md +8 -12
  61. package/dist/curation-off/agents/research.md +9 -32
  62. package/dist/curation-off/agents/review.md +11 -40
  63. package/dist/curation-off/agents/skim.md +7 -17
  64. package/dist/curation-off/agents/triage.md +7 -13
  65. package/dist/curation-off/commands/bug-analysis.md +22 -42
  66. package/dist/curation-off/commands/code-review.md +30 -68
  67. package/dist/curation-off/commands/debug.md +24 -63
  68. package/dist/curation-off/commands/dynamic-build.md +150 -200
  69. package/dist/curation-off/commands/dynamic-plan.md +60 -80
  70. package/dist/curation-off/commands/dynamic-tickets.md +54 -173
  71. package/dist/curation-off/commands/explore.md +18 -50
  72. package/dist/curation-off/commands/implement.md +93 -170
  73. package/dist/curation-off/commands/plan.md +52 -87
  74. package/dist/curation-off/commands/release.md +18 -80
  75. package/dist/curation-off/commands/research.md +26 -84
  76. package/dist/curation-off/commands/resolve.md +56 -109
  77. package/dist/curation-off/commands/self-review.md +27 -79
  78. package/dist/hud/components/version-badge.js +1 -1
  79. package/dist/skills/git/references/pr/update-pr-evidence.md +2 -1
  80. package/dist/skills/git/references/tracker/github/ensure-pr-ready.md +3 -3
  81. package/dist/skills/git/references/tracker/jira/ensure-pr-ready.md +3 -3
  82. package/dist/skills/git/references/tracker/linear/ensure-pr-ready.md +3 -3
  83. package/dist/targets/claude-code/curation-install.js +2 -2
  84. package/dist/variant-axes.json +5 -1
  85. package/package.json +1 -1
  86. package/src/assets/agents/_partials/_code.mds +3 -5
  87. package/src/assets/agents/_partials/_design.mds +86 -0
  88. package/src/assets/agents/architect.mds +45 -0
  89. package/src/assets/agents/code.mds +18 -20
  90. package/src/assets/agents/curate.md +26 -35
  91. package/src/assets/agents/debug.mds +22 -50
  92. package/src/assets/agents/design.mds +11 -114
  93. package/src/assets/agents/evaluate.md +6 -16
  94. package/src/assets/agents/explore.md +1 -2
  95. package/src/assets/agents/fix.mds +12 -24
  96. package/src/assets/agents/git.mds +20 -23
  97. package/src/assets/agents/harden.mds +14 -19
  98. package/src/assets/agents/knowledge.mds +10 -38
  99. package/src/assets/agents/polish.md +13 -39
  100. package/src/assets/agents/refactor.mds +6 -9
  101. package/src/assets/agents/research.mds +11 -34
  102. package/src/assets/agents/review.mds +12 -84
  103. package/src/assets/agents/skim.mds +7 -17
  104. package/src/assets/agents/synthesize.md +3 -21
  105. package/src/assets/agents/test.md +31 -32
  106. package/src/assets/agents/tracker.md +116 -229
  107. package/src/assets/agents/triage.mds +7 -26
  108. package/src/assets/agents/validate.md +1 -3
  109. package/src/assets/commands/_partials/_compliance.mds +2 -2
  110. package/src/assets/commands/_partials/_decisions.mds +17 -24
  111. package/src/assets/commands/_partials/_docs_root.mds +31 -10
  112. package/src/assets/commands/_partials/_engine.mds +36 -56
  113. package/src/assets/commands/_partials/_evidence_policy.mds +1 -1
  114. package/src/assets/commands/_partials/_factory.mds +10 -104
  115. package/src/assets/commands/_partials/_knowledge.mds +48 -52
  116. package/src/assets/commands/_partials/_plan_contract.mds +2 -2
  117. package/src/assets/commands/_partials/_preamble.mds +21 -21
  118. package/src/assets/commands/_partials/_publication.mds +3 -3
  119. package/src/assets/commands/_partials/_roster.mds +12 -13
  120. package/src/assets/commands/_partials/_settings.mds +6 -3
  121. package/src/assets/commands/_partials/_ticket_template.mds +3 -7
  122. package/src/assets/commands/_partials/_tracker.mds +10 -5
  123. package/src/assets/commands/_partials/_wave.mds +23 -32
  124. package/src/assets/commands/bug-analysis.mds +3 -7
  125. package/src/assets/commands/code-review.mds +12 -33
  126. package/src/assets/commands/debug.mds +5 -47
  127. package/src/assets/commands/dynamic-build.mds +48 -70
  128. package/src/assets/commands/dynamic-plan.mds +23 -42
  129. package/src/assets/commands/dynamic-profile.mds +7 -57
  130. package/src/assets/commands/dynamic-tickets.mds +9 -29
  131. package/src/assets/commands/explore.mds +5 -44
  132. package/src/assets/commands/implement.mds +77 -119
  133. package/src/assets/commands/plan.mds +27 -57
  134. package/src/assets/commands/release.mds +4 -62
  135. package/src/assets/commands/research.mds +9 -55
  136. package/src/assets/commands/resolve.mds +40 -87
  137. package/src/assets/commands/self-review.mds +5 -45
  138. package/src/assets/mds/git/_ops_pr.mds +1 -0
  139. package/src/assets/mds/git/_ops_steps.mds +4 -4
  140. package/src/assets/mds/git/_pr.mds +1 -1
  141. package/src/assets/rules/engineering.md +1 -1
  142. package/src/assets/rules/quality.md +2 -2
  143. package/src/assets/scripts/ci-wait.cjs +154 -19
  144. package/src/assets/scripts/hooks/assets/orchestrator-charter.md +3 -3
  145. package/src/assets/scripts/hooks/preamble +2 -3
  146. package/src/assets/scripts/pr-evidence.cjs +1 -0
  147. package/src/assets/scripts/resolve-evidence-policy.cjs +14 -13
  148. package/src/assets/scripts/resolve-root.cjs +190 -0
  149. package/src/assets/scripts/resolve-settings.cjs +14 -9
  150. package/src/assets/scripts/verify-evidence.cjs +551 -25
  151. package/src/assets/skills/accessibility/SKILL.md +28 -95
  152. package/src/assets/skills/agent-references/SKILL.md +2 -4
  153. package/src/assets/skills/agent-references/references/commands/implement-evidence-asks.md +1 -1
  154. package/src/assets/skills/agent-references/references/commands/implement-levels.md +4 -7
  155. package/src/assets/skills/agent-references/references/commands/implement-revalidate.md +1 -1
  156. package/src/assets/skills/agent-references/references/commands/plan-levels.md +2 -2
  157. package/src/assets/skills/apply-decisions/SKILL.md +5 -6
  158. package/src/assets/skills/apply-feature-knowledge/SKILL.md +3 -13
  159. package/src/assets/skills/architecture/SKILL.md +29 -105
  160. package/src/assets/skills/boundary-validation/SKILL.md +27 -78
  161. package/src/assets/skills/complexity/SKILL.md +8 -104
  162. package/src/assets/skills/compliance/SKILL.md +9 -67
  163. package/src/assets/skills/consistency/SKILL.md +7 -107
  164. package/src/assets/skills/database/SKILL.md +7 -72
  165. package/src/assets/skills/dependencies/SKILL.md +9 -109
  166. package/src/assets/skills/dependencies/references/detection.md +10 -0
  167. package/src/assets/skills/dependency-research/SKILL.md +9 -63
  168. package/src/assets/skills/design-review/SKILL.md +14 -37
  169. package/src/assets/skills/docs-framework/SKILL.md +4 -47
  170. package/src/assets/skills/documentation/SKILL.md +7 -71
  171. package/src/assets/skills/documentation/references/patterns.md +1 -1
  172. package/src/assets/skills/documentation/references/violations.md +1 -1
  173. package/src/assets/skills/feature-knowledge/SKILL.md +19 -222
  174. package/src/assets/skills/feature-knowledge/references/new-kb.md +128 -0
  175. package/src/assets/skills/gap-analysis/SKILL.md +1 -31
  176. package/src/assets/skills/git/SKILL.md +2 -22
  177. package/src/assets/skills/go/SKILL.md +24 -113
  178. package/src/assets/skills/java/SKILL.md +12 -98
  179. package/src/assets/skills/patterns/SKILL.md +8 -93
  180. package/src/assets/skills/performance/SKILL.md +29 -88
  181. package/src/assets/skills/python/SKILL.md +22 -120
  182. package/src/assets/skills/qa/SKILL.md +16 -54
  183. package/src/assets/skills/qa/references/browser-testing.md +0 -24
  184. package/src/assets/skills/qa/references/sources.md +2 -2
  185. package/src/assets/skills/quality-gates/SKILL.md +13 -100
  186. package/src/assets/skills/react/SKILL.md +33 -95
  187. package/src/assets/skills/regression/SKILL.md +8 -73
  188. package/src/assets/skills/reliability/SKILL.md +11 -120
  189. package/src/assets/skills/research-codebase/SKILL.md +7 -49
  190. package/src/assets/skills/research-competitor/SKILL.md +4 -39
  191. package/src/assets/skills/research-external/SKILL.md +5 -43
  192. package/src/assets/skills/research-market/SKILL.md +5 -43
  193. package/src/assets/skills/research-technology/SKILL.md +8 -68
  194. package/src/assets/skills/review-methodology/SKILL.md +10 -56
  195. package/src/assets/skills/rust/SKILL.md +19 -109
  196. package/src/assets/skills/security/SKILL.md +39 -66
  197. package/src/assets/skills/software-design/SKILL.md +20 -105
  198. package/src/assets/skills/software-design/references/patterns.md +84 -2
  199. package/src/assets/skills/software-design/references/violations.md +1 -1
  200. package/src/assets/skills/test-driven-development/SKILL.md +32 -107
  201. package/src/assets/skills/test-driven-development/references/rationalization-prevention.md +33 -1
  202. package/src/assets/skills/testing/SKILL.md +35 -53
  203. package/src/assets/skills/typescript/SKILL.md +23 -102
  204. package/src/assets/skills/ui-design/SKILL.md +26 -74
  205. package/src/assets/skills/worktree-support/SKILL.md +4 -10
  206. package/dist/curation-off/commands/dynamic-profile.md +0 -214
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Proactive bug finding with static and semantic analysis — hunts real bugs in changed code before merge
2
+ description: Proactive bug finding in changed code before merge, with static and semantic analysis
3
3
  output-dir: dist/commands
4
4
  ---
5
5
  @import { knowledge_load } from "./_partials/_knowledge.mds"
@@ -9,8 +9,6 @@ output-dir: dist/commands
9
9
  @import "./_partials/_settings.mds" as settings
10
10
  # Bug Analysis Command
11
11
 
12
- Run a proactive bug analysis on the current branch: static analysis tools and parallel semantic analyzers, synthesized into one bug report.
13
-
14
12
  ## Usage
15
13
 
16
14
  `/bug-analysis [--full] [--no-static]`: `--full` ignores incremental state; `--no-static` skips static analysis.
@@ -224,9 +222,7 @@ Pick the focus analyzers from `CHANGED_FILES` (Step 2b; do not re-run `git diff`
224
222
  **Requires:** DIFF_RANGE, ANALYSIS_DIR, ACTIVE_FOCUSES, STATIC_FINDINGS, ACCEPTANCE_RULES, PLAN_CONTEXT, FEATURE_KNOWLEDGE
225
223
  <!-- curation:end -->
226
224
 
227
- Spawn ALL active Debug agents **in a single message** (parallel, NOT background):
228
-
229
- For each active focus, spawn:
225
+ Spawn one Debug agent for each active focus, all in a single message (parallel, not background):
230
226
  ```
231
227
  Agent(subagent_type="Debug", run_in_background=false):
232
228
  "Analyze focusing on {focus}.
@@ -313,7 +309,7 @@ Seven phases: Phase 1 to Phase 7.
313
309
  |------|----------|
314
310
  | Rebase invalidates `.last-analysis-head` SHA | `git cat-file -t` check fails → fallback to full diff |
315
311
  | Zero changed files in DIFF_RANGE with exit 0 | Stop: "No changes to analyze." |
316
- | `--full` flag | Bypass incremental detection (Step 2a), run full diff from base |
312
+ | `--full` flag | Step 2a takes the full-range path |
317
313
  | A scanner did not run or did not complete | Name the tool and why in `STATIC_FINDINGS`, not `(none)`; a tool that did not complete keeps the marker |
318
314
 
319
315
  ## Resolve Compatibility
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Comprehensive branch review using specialized sub-agents for PR readiness
2
+ description: Branch review by specialized agents for PR readiness
3
3
  output-dir: dist/commands
4
4
  ---
5
5
  @import { knowledge_load } from "./_partials/_knowledge.mds"
@@ -18,12 +18,7 @@ Run a comprehensive code review of the current branch by spawning parallel revie
18
18
 
19
19
  ## Usage
20
20
 
21
- ```
22
- /code-review (review current branch — or all worktrees if multiple found)
23
- /code-review #42 (review specific PR)
24
- /code-review --full (force full-branch review, ignore previous review state)
25
- /code-review --path /path/to/worktree (review a specific worktree only)
26
- ```
21
+ `/code-review` (the current branch, or every reviewable worktree), `/code-review #42` (one PR), `--full` (ignore the previous review state), `--path <worktree>` (one worktree only).
27
22
 
28
23
  ## Phases
29
24
 
@@ -306,7 +301,7 @@ The core, database, dependencies, documentation and compliance focuses, and ever
306
301
 
307
302
  {{decisions_load()}}
308
303
  <!-- curation:on -->
309
- This produces a compact index of active ADR/PF entries. Pass `DECISIONS_CONTEXT` to all Review agents as one shared slice, cut over the diff's files. Review agents use `devflow:apply-decisions` to Read full entry bodies on demand.
304
+ Pass `DECISIONS_CONTEXT` to all Review agents as one shared slice, cut over the diff's files.
310
305
 
311
306
  <!-- curation:end -->
312
307
  {{knowledge_load()}}
@@ -354,11 +349,9 @@ Spawn Review agents **in a single message**, one per focus in REVIEW_FOCUS_LIST
354
349
  | documentation | conditional | devflow:documentation | diff.patch |
355
350
  | compliance | diff-driven | devflow:compliance | diff.patch |
356
351
 
357
- Review agent count: `code` runs 8 core +1-12 at `full`, up to 2 fewer at `standard`, 3-4 at lean; a reduced class or a mix runs 2-6.
358
-
359
352
  {{compliance_focus_inject()}}
360
353
 
361
- Each Review agent invocation (all in one message, **NOT background**):
354
+ Each Review agent invocation:
362
355
  ```
363
356
  Agent(subagent_type="Review", run_in_background=false):
364
357
  "Review focusing on {focus}. Load the pattern skill via the Skill tool: Skill(skill="devflow:{focus}").
@@ -455,35 +448,21 @@ Per worktree, after successful completion:
455
448
 
456
449
  ```
457
450
  /code-review
458
- │
459
451
  <!-- compliance:on -->
460
452
  ├─ Phase 0: Worktree Discovery & Pre-flight, Steps 0a-0f (Git agent per worktree, parallel)
461
453
  <!-- compliance:off -->
462
454
  ├─ Phase 0: Worktree Discovery & Pre-flight, Steps 0a-0e (Git agent per worktree, parallel)
463
455
  <!-- compliance:end -->
464
456
  │ ├─ Step 0b: Resolve the compliance lens and gate level
465
- │
466
- ├─ Per worktree (SEQUENTIAL):
467
- │ │
468
- │ ├─ Phase 1: Analyze changed files
469
- │ │ ├─ Classify the diff (paths.txt → DIFF_CLASS)
470
- │ │ ├─ Choose the focuses
471
- │ │ └─ Write diff.patch and diff-{focus}.patch
472
- │ │
473
- │ ├─ Phase 2: Reviews (PARALLEL within worktree), one per REVIEW_FOCUS_LIST focus
474
- │ │ ├─ code: core (diff.patch), language (diff-{focus}.patch), conditional
475
- │ │ └─ docs-only / tests-only / lockfile-only: the reduced set (diff.patch)
476
- │ │
457
+ └─ Per worktree (SEQUENTIAL):
458
+ ├─ Phase 1: Classify the diff, choose the focuses, write diff.patch and diff-{focus}.patch
459
+ ├─ Phase 2: Reviews (PARALLEL): code, or docs-only / tests-only / lockfile-only (the reduced set)
477
460
  <!-- compliance:on -->
478
- │ ├─ Phase 3: Synthesis → Review Comment (SEQUENTIAL within worktree)
479
- │ │ ├─ Step 3a: Synthesize agent (mode: review, writes review-summary.md)
480
- │ │ └─ Step 3b: Git agent (post-review-summary)
461
+ ├─ Phase 3: Synthesize agent, then Git agent (post-review-summary)
481
462
  <!-- compliance:off -->
482
- │ ├─ Phase 3: Synthesis → Review Summary (SEQUENTIAL within worktree)
483
- │ │ └─ Step 3a: Synthesize agent (mode: review, writes review-summary.md)
463
+ ├─ Phase 3: Synthesize agent (writes review-summary.md)
484
464
  <!-- compliance:end -->
485
- │ │
486
- │ └─ Phase 4: Write .last-review-head + display results
465
+ └─ Phase 4: Write .last-review-head + display results
487
466
  ```
488
467
 
489
468
  ## Edge Cases
@@ -492,7 +471,7 @@ Per worktree, after successful completion:
492
471
  |------|----------|
493
472
  | `--full` in multi-worktree mode | Applies to all worktrees (global modifier). It sets the diff range, never the gate level |
494
473
  <!-- compliance:on -->
495
- | Review comment already posted | Git agent matches its own marker on the `{cycle, timestamp}` pair → skip silently (D7) |
474
+ | Review comment already posted | Git agent skips it (D7) |
496
475
  <!-- compliance:end -->
497
476
  | Docs-only diff | Its Step 1.1 set, narrowed by level |
498
477
  | Tests-only diff | Its Step 1.1 set, narrowed by level |
@@ -516,4 +495,4 @@ Per worktree, after successful completion:
516
495
  2. **Parallel, not background** - Multiple agents in one message, but `run_in_background=false` so phases complete before proceeding
517
496
  3. **Git agent for git work** - All git operations go through Git agent, except the exceptions named in Principle 1; its writes print nothing
518
497
  4. **Honest reporting** - Display agent outputs directly
519
- 5. **Incremental by default** - Only review new changes unless `--full` specified
498
+ 5. **Fewest turns** - Send calls that need no output of each other in one message: the Step 0a listing with the Step 0b-ii script; at `standard` or `lean`, the Step 1.2b directory print with the Step 1.1 listing, and its Read with the `paths.txt` Read; the Phase 1b git calls, each under its own condition, with the Step 1.3 writes
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Debug issues using competing hypothesis investigation with parallel agents
2
+ description: Debug issues with parallel agents on competing hypotheses
3
3
  output-dir: dist/commands
4
4
  ---
5
5
  @import { knowledge_writeback } from "./_partials/_knowledge.mds"
@@ -9,8 +9,6 @@ output-dir: dist/commands
9
9
  @import "./_partials/_compliance.mds" as compliance
10
10
  # Debug Command
11
11
 
12
- Investigate bugs by spawning parallel agents, each pursuing a different hypothesis. Evidence is aggregated and synthesized to identify the root cause.
13
-
14
12
  ## Usage
15
13
 
16
14
  ```
@@ -27,10 +25,7 @@ What follows `/debug` is bound once, here. Every later step names it `COMMAND_IN
27
25
  $ARGUMENTS
28
26
  </command-input>
29
27
 
30
- `COMMAND_INPUT` is one of:
31
- - Bug description: "login fails after session timeout"
32
- - Issue reference: "#42"
33
- - Empty: use conversation context
28
+ An empty `COMMAND_INPUT` means: use the conversation context.
34
29
 
35
30
  ## Phases
36
31
 
@@ -57,7 +52,7 @@ Phase 7 passes `COMPLIANCE_DIRECTIVE` to the Code agent that implements the fix,
57
52
  The orchestrator uses `DECISIONS_CONTEXT` locally when generating hypotheses (Phase 2) — prior pitfalls and decisions can suggest specific root causes to investigate. Follow `devflow:apply-decisions` to Read full entry bodies on demand. **Do NOT pass `DECISIONS_CONTEXT` to Explore investigators** — decisions context stays in the orchestrator; investigators examine code directly.
58
53
 
59
54
  <!-- curation:end -->
60
- **No up-front feature knowledge load** — debug investigation workers read code directly to avoid confirmation bias. Feature knowledge is only written back at the end if the investigation surfaced durable, cross-cutting knowledge.
55
+ **No up-front feature knowledge load** — debug investigation workers read code directly to avoid confirmation bias. Write back only if the investigation found durable, cross-cutting knowledge.
61
56
 
62
57
  ### Phase 2: Context Gathering
63
58
 
@@ -222,47 +217,11 @@ Ask user via AskUserQuestion: "Want me to implement this fix?"
222
217
 
223
218
  {{knowledge_writeback()}}
224
219
 
225
- ## Architecture
226
-
227
- ```
228
- /debug (orchestrator)
229
- │
230
- <!-- curation:on -->
231
- ├─ Phase 1: Load Decisions Index (Orchestrator-Local)
232
- <!-- curation:off -->
233
- ├─ Phase 1: Resolve Settings
234
- <!-- curation:end -->
235
- │ └─ No up-front feature knowledge load (avoids confirmation bias in investigators)
236
- │
237
- ├─ Phase 2: Context gathering
238
- │ └─ Git agent (fetch issue, if #N provided)
239
- │
240
- ├─ Phase 3: Parallel investigation
241
- │ └─ 3-5 Explore agents, one per hypothesis (single message)
242
- │
243
- ├─ Phase 4: Converge
244
- │ └─ Validate confirmed hypotheses, unify partials, or generate second-round
245
- │
246
- ├─ Phase 5: Synthesize
247
- │ └─ Synthesize agent aggregates and compares findings
248
- │
249
- ├─ Phase 6: Root cause report with confidence level
250
- │
251
- ├─ Phase 7: Offer Fix
252
- │ └─ AskUserQuestion → Code agent (fix) + Polish agent, or done
253
- │
254
- └─ Feature Knowledge Write-Back (Conditional)
255
- └─ Knowledge agent (if investigation surfaced durable cross-cutting knowledge)
256
- ```
257
-
258
220
  ## Principles
259
221
 
260
222
  1. **Competing hypotheses** - Never investigate a single theory; always have alternatives
261
- 2. **Parallel execution** - All investigators run simultaneously for speed
262
- 3. **Evidence-based** - Every claim requires file:line references
263
- 4. **Honest uncertainty** - If no hypothesis survives, report that clearly
264
- 5. **Convergence validation** - Confirmed hypotheses get additional validation to prevent confirmation bias
265
- 6. **No pre-loaded knowledge in sub-agents** - Investigators read code fresh to avoid confirmation bias; feature knowledge write-back happens only after investigation completes
223
+ 2. **Evidence-based** - Every claim requires file:line references
224
+ 3. **Honest uncertainty** - If no hypothesis survives, report that clearly
266
225
 
267
226
  ## Error Handling
268
227
 
@@ -270,4 +229,3 @@ Ask user via AskUserQuestion: "Want me to implement this fix?"
270
229
  - If all hypotheses are disproved: report "No root cause identified" with investigation summary
271
230
  - If an investigator errors: continue with remaining results, note the gap
272
231
  - If convergence validation contradicts the original confirmation: downgrade confidence and report contradicting evidence
273
- - If user declines fix: done — report stands as documentation