@tyroneross/build-loop 0.36.1 → 0.43.0

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 (270) hide show
  1. package/.agents/plugins/marketplace.json +2 -2
  2. package/.claude-plugin/marketplace.json +3 -3
  3. package/.claude-plugin/plugin.json +1 -1
  4. package/.codex-plugin/plugin.json +1 -1
  5. package/.cursor/rules/build-loop-surface.mdc +12 -11
  6. package/.cursor/rules/skill-index.mdc +33 -0
  7. package/AGENTS.md +213 -34
  8. package/README.md +99 -31
  9. package/agents/advisor.md +4 -4
  10. package/agents/alignment-checker.md +2 -2
  11. package/agents/architecture-scout.md +4 -4
  12. package/agents/build-orchestrator.md +38 -36
  13. package/agents/database-assessor.md +10 -4
  14. package/agents/design-contract-specialist.md +8 -8
  15. package/agents/fact-checker.md +13 -3
  16. package/agents/fix-critique.md +2 -2
  17. package/agents/independent-auditor.md +60 -7
  18. package/agents/leak-scanner.md +82 -0
  19. package/agents/overfitting-reviewer.md +2 -2
  20. package/agents/plan-critic.md +1 -1
  21. package/agents/promotion-reviewer.md +5 -5
  22. package/agents/retrospective-synthesizer.md +138 -35
  23. package/agents/scope-auditor.md +82 -11
  24. package/agents/security-reviewer.md +55 -1
  25. package/agents/self-improvement-architect.md +17 -3
  26. package/agents/transcript-pattern-miner.md +5 -5
  27. package/agents/ui-validator.md +1 -1
  28. package/bin/build-loop-debugger.js +143 -0
  29. package/bin/build-loop-install.js +1 -4
  30. package/bin/build-loop-load-probe.js +345 -0
  31. package/codex-skills/build-loop/SKILL.md +28 -6
  32. package/commands/feedback.md +37 -0
  33. package/dist/src/interactive-verifier.d.ts +1 -14
  34. package/dist/src/interactive-verifier.d.ts.map +1 -1
  35. package/dist/src/interactive-verifier.js +6 -113
  36. package/dist/src/interactive-verifier.js.map +1 -1
  37. package/dist/src/quality.d.ts +5 -0
  38. package/dist/src/quality.d.ts.map +1 -0
  39. package/dist/src/quality.js +81 -0
  40. package/dist/src/quality.js.map +1 -0
  41. package/dist/src/storage.d.ts.map +1 -1
  42. package/dist/src/storage.js +37 -3
  43. package/dist/src/storage.js.map +1 -1
  44. package/docs/agent-surface-policy.md +35 -31
  45. package/docs/memory-setup.md +19 -0
  46. package/hooks/git/pre-push +65 -4
  47. package/hooks/hooks.json +95 -38
  48. package/hooks/pre-commit +20 -1
  49. package/hooks/pre-edit-rally-point.sh +10 -3
  50. package/hooks/session-start-codex-hook-trust.sh +30 -0
  51. package/hooks/session-start-git-hooks.sh +3 -1
  52. package/hooks/session-start-rally-point.sh +52 -4
  53. package/hooks/session-start-worktree-gc.sh +47 -94
  54. package/hooks/stop-transcript-sweep.sh +173 -0
  55. package/hooks/test_closeout.sh +14 -2
  56. package/package.json +8 -7
  57. package/scripts/README.md +1 -1
  58. package/scripts/_paths.py +65 -0
  59. package/scripts/groundwork_exchange.py +1012 -0
  60. package/scripts/install_memory.py +33 -1
  61. package/scripts/lessons_index/ingest.py +13 -2
  62. package/scripts/lessons_index/query.py +36 -13
  63. package/scripts/memory_context/__init__.py +108 -14
  64. package/scripts/memory_graph/__init__.py +5 -1
  65. package/scripts/project_resolver.py +42 -36
  66. package/scripts/sync_plugin_cache.py +37 -2
  67. package/skills/agent-rally-point/SKILL.md +46 -0
  68. package/skills/api-registry-bridge/SKILL.md +1 -1
  69. package/skills/architecture/dead/SKILL.md +1 -1
  70. package/skills/architecture/impact/SKILL.md +1 -1
  71. package/skills/architecture/review/SKILL.md +1 -1
  72. package/skills/architecture/rules/SKILL.md +3 -3
  73. package/skills/architecture/scan/SKILL.md +1 -1
  74. package/skills/architecture/trace/SKILL.md +1 -1
  75. package/skills/attribution-standard/SKILL.md +6 -6
  76. package/skills/auto-decision-capture/SKILL.md +31 -2
  77. package/skills/auto-finding-capture/SKILL.md +28 -1
  78. package/skills/build-loop/SKILL.md +131 -23
  79. package/skills/build-loop/fallbacks.md +16 -21
  80. package/skills/build-loop/phases/ui-validation.md +2 -2
  81. package/skills/build-loop/references/advisor-dispatch-ladder.md +1 -1
  82. package/skills/build-loop/references/apple-native-planning.md +1 -1
  83. package/skills/build-loop/references/autonomous-and-per-commit-modes.md +11 -5
  84. package/skills/build-loop/references/autonomy-dashboard.md +115 -0
  85. package/skills/build-loop/references/capability-routing.md +24 -2
  86. package/skills/build-loop/references/coordination.md +24 -6
  87. package/skills/build-loop/references/experiment-results-template.md +15 -3
  88. package/skills/build-loop/references/leadership.md +1 -1
  89. package/skills/build-loop/references/memory.md +14 -3
  90. package/skills/build-loop/references/modular-systems-pack.md +8 -0
  91. package/skills/build-loop/references/output-style.md +86 -0
  92. package/skills/build-loop/references/phase-1-assess.md +102 -2
  93. package/skills/build-loop/references/phase-2-plan.md +9 -1
  94. package/skills/build-loop/references/phase-3-execute.md +5 -2
  95. package/skills/build-loop/references/phase-4-review.md +85 -8
  96. package/skills/build-loop/references/phase-5-iterate.md +76 -8
  97. package/skills/build-loop/references/phase-6-learn.md +10 -17
  98. package/skills/build-loop/references/privileged-request-broker.md +254 -0
  99. package/skills/build-loop/references/resource-aware-execution.md +183 -0
  100. package/skills/build-loop/references/self-recursive-dev.md +2 -2
  101. package/skills/build-loop/references/status-output-format.md +207 -0
  102. package/skills/build-loop/references/verify-dispatch.md +56 -2
  103. package/skills/building-with-deepagents/SKILL.md +1 -1
  104. package/skills/claim-scope/SKILL.md +185 -0
  105. package/skills/color-engine/SKILL.md +103 -0
  106. package/skills/color-engine/_core.py +464 -0
  107. package/skills/color-engine/color_engine.py +175 -0
  108. package/skills/cost-rca/SKILL.md +61 -0
  109. package/skills/data-plane-worktrees/SKILL.md +139 -0
  110. package/skills/data-plane-worktrees/agents/openai.yaml +4 -0
  111. package/skills/database-practice/SKILL.md +200 -0
  112. package/skills/database-practice/references/diagnostic-queries.sql +126 -0
  113. package/skills/database-practice/references/vector-and-graph-tuning.md +208 -0
  114. package/skills/database-practice/scripts/db_table_map.py +1244 -0
  115. package/skills/database-practice/scripts/test_db_table_map.py +514 -0
  116. package/skills/debug-loop/SKILL.md +36 -6
  117. package/skills/debugging-memory/SKILL.md +32 -430
  118. package/skills/debugging-memory/references/pattern-extraction.md +4 -4
  119. package/skills/debugging-memory/references/search.md +32 -120
  120. package/skills/debugging-memory/references/store.md +32 -126
  121. package/skills/debugging-memory/references/subagent-integration.md +1 -1
  122. package/skills/decision-queue/SKILL.md +251 -0
  123. package/skills/decision-queue/assets/template.html +1242 -0
  124. package/skills/decision-queue/references/example-large-queue-batching.md +164 -0
  125. package/skills/decision-queue/scripts/regen_template_constants.py +160 -0
  126. package/skills/defenseclaw-bridge/SKILL.md +2 -2
  127. package/skills/defenseclaw-bridge/references/dc-config-mapping.md +2 -9
  128. package/skills/drain-proposals/SKILL.md +53 -0
  129. package/skills/focused-loop-builder/SKILL.md +31 -0
  130. package/skills/focused-loop-builder/references/spec-format.md +27 -0
  131. package/skills/handoff/SKILL.md +169 -8
  132. package/skills/ibr-bridge/SKILL.md +4 -1
  133. package/skills/knowledge/SKILL.md +26 -14
  134. package/skills/knowledge/references/review-mode.md +2 -3
  135. package/skills/knowledge/templates/madr-minimal.md +1 -1
  136. package/skills/mcp-builder/SKILL.md +1 -1
  137. package/skills/model-bakeoff/SKILL.md +48 -10
  138. package/skills/model-tiering/SKILL.md +92 -31
  139. package/skills/native-ax-driver/SKILL.md +38 -5
  140. package/skills/native-ax-driver/scripts/native_driver.py +278 -22
  141. package/skills/native-ax-driver/scripts/test_native_driver.py +227 -0
  142. package/skills/optimize/SKILL.md +1 -1
  143. package/skills/plugin-builder/SKILL.md +48 -1
  144. package/skills/plugin-builder/references/build-loop-phase-guidance.md +3 -4
  145. package/skills/plugin-builder/references/distribution.md +13 -2
  146. package/skills/plugin-builder/references/plugin-hygiene-lessons.md +2 -2
  147. package/skills/plugin-tests/SKILL.md +2 -2
  148. package/skills/recursive-retrospective/SKILL.md +1 -1
  149. package/skills/repo-closeout/SKILL.md +17 -0
  150. package/skills/repo-closeout/agents/openai.yaml +4 -0
  151. package/skills/repo-maintenance/SKILL.md +179 -0
  152. package/skills/repo-maintenance/agents/openai.yaml +4 -0
  153. package/skills/repo-maintenance/references/pre-public-hygiene.md +134 -0
  154. package/skills/repo-maintenance/references/repository-taxonomy.md +161 -0
  155. package/skills/repo-maintenance/references/safety-protocol.md +106 -0
  156. package/skills/repo-maintenance/references/stack-profiles.md +138 -0
  157. package/skills/repo-maintenance/scripts/audit_repo_maintenance.py +1198 -0
  158. package/skills/repo-maintenance/scripts/test_audit_repo_maintenance.py +506 -0
  159. package/skills/repository-intelligence/SKILL.md +189 -0
  160. package/skills/repository-intelligence/agents/openai.yaml +4 -0
  161. package/skills/repository-intelligence/references/assessment-rubric.md +88 -0
  162. package/skills/repository-intelligence/scripts/repository_inventory.py +347 -0
  163. package/skills/research/SKILL.md +12 -2
  164. package/skills/root-cause-analysis/SKILL.md +1 -1
  165. package/skills/runtime-parity-verification/SKILL.md +36 -1
  166. package/skills/security-methodology/SKILL.md +22 -9
  167. package/skills/security-methodology/references/agentic-handoff-templates.md +220 -0
  168. package/skills/security-methodology/references/cross-source-matrix.md +1 -1
  169. package/skills/security-methodology/references/owasp-agentic-top-10.md +1 -1
  170. package/skills/security-scan/SKILL.md +55 -15
  171. package/skills/self-improve/SKILL.md +70 -50
  172. package/skills/silent-assumptions/SKILL.md +341 -0
  173. package/skills/silent-assumptions/references/elicitation-detectors.md +342 -0
  174. package/skills/spec-writing/SKILL.md +128 -24
  175. package/skills/spec-writing/scripts/check_checklist.py +114 -15
  176. package/skills/ui-design/SKILL.md +6 -4
  177. package/skills/ui-design/references/color-engine.md +132 -0
  178. package/skills/ui-design/references/design-preferences-from-owned-apps.md +8 -8
  179. package/skills/ui-design/references/ui-guidance-sources.md +1 -1
  180. package/skills/ui-design/references/universal-design-principles.alt.md +2 -2
  181. package/plugin-artifacts/codex/.codex-plugin/plugin.json +0 -41
  182. package/plugin-artifacts/codex/AGENTS.md +0 -560
  183. package/plugin-artifacts/codex/BUILD-ARTIFACT.md +0 -5
  184. package/plugin-artifacts/codex/LICENSE +0 -202
  185. package/plugin-artifacts/codex/README.md +0 -313
  186. package/plugin-artifacts/codex/assets/build-loop-plugin-icon.png +0 -0
  187. package/plugin-artifacts/codex/docs/agent-surface-policy.md +0 -63
  188. package/plugin-artifacts/codex/references/advisor-dispatch-ladder.md +0 -62
  189. package/plugin-artifacts/codex/references/agent-role-taxonomy.md +0 -135
  190. package/plugin-artifacts/codex/references/autonomous-and-per-commit-modes.md +0 -161
  191. package/plugin-artifacts/codex/references/autonomy-config.md +0 -231
  192. package/plugin-artifacts/codex/references/backlog-system.md +0 -285
  193. package/plugin-artifacts/codex/references/capability-routing.md +0 -231
  194. package/plugin-artifacts/codex/references/codex-subagents.md +0 -106
  195. package/plugin-artifacts/codex/references/coordination-file-template.md +0 -181
  196. package/plugin-artifacts/codex/references/coordination-rules.md +0 -552
  197. package/plugin-artifacts/codex/references/dogfood-reload-checkpoint.md +0 -112
  198. package/plugin-artifacts/codex/references/halt-and-ask-protocol.md +0 -102
  199. package/plugin-artifacts/codex/references/implementer-envelope-schema.md +0 -302
  200. package/plugin-artifacts/codex/references/intent-capability-pack.md +0 -257
  201. package/plugin-artifacts/codex/references/intent-exploration-prompts.md +0 -96
  202. package/plugin-artifacts/codex/references/leadership.md +0 -72
  203. package/plugin-artifacts/codex/references/memory-systems.md +0 -261
  204. package/plugin-artifacts/codex/references/memory.md +0 -313
  205. package/plugin-artifacts/codex/references/model-tier-mapping.md +0 -296
  206. package/plugin-artifacts/codex/references/modular-systems-pack.md +0 -96
  207. package/plugin-artifacts/codex/references/phase-1-assess.md +0 -249
  208. package/plugin-artifacts/codex/references/phase-2-plan.md +0 -86
  209. package/plugin-artifacts/codex/references/phase-3-execute.md +0 -49
  210. package/plugin-artifacts/codex/references/phase-4-review.md +0 -341
  211. package/plugin-artifacts/codex/references/phase-5-iterate.md +0 -72
  212. package/plugin-artifacts/codex/references/phase-6-learn.md +0 -58
  213. package/plugin-artifacts/codex/references/recent-design-structures.md +0 -274
  214. package/plugin-artifacts/codex/references/research-trigger-policy.md +0 -140
  215. package/plugin-artifacts/codex/references/runtime-smoke-triggers.md +0 -42
  216. package/plugin-artifacts/codex/references/self-review.md +0 -234
  217. package/plugin-artifacts/codex/references/single-writer-commit-protocol.md +0 -90
  218. package/plugin-artifacts/codex/references/task-capture-policy.md +0 -68
  219. package/plugin-artifacts/codex/references/ui-io-contract.md +0 -116
  220. package/plugin-artifacts/codex/references/ui-spotcheck-protocol.md +0 -65
  221. package/plugin-artifacts/codex/references/verify-dispatch.md +0 -85
  222. package/plugin-artifacts/codex/skills/build-loop/SKILL.md +0 -381
  223. package/plugin-artifacts/codex/skills/build-loop/detect-plugins.mjs +0 -82
  224. package/plugin-artifacts/codex/skills/build-loop/eval-guide.md +0 -65
  225. package/plugin-artifacts/codex/skills/build-loop/fallbacks.md +0 -549
  226. package/plugin-artifacts/codex/skills/build-loop/phases/fact-check.md +0 -42
  227. package/plugin-artifacts/codex/skills/build-loop/phases/ui-validation.md +0 -267
  228. package/plugin-artifacts/codex/skills/build-loop/references/advisor-dispatch-ladder.md +0 -62
  229. package/plugin-artifacts/codex/skills/build-loop/references/apple-native-planning.md +0 -439
  230. package/plugin-artifacts/codex/skills/build-loop/references/autonomous-and-per-commit-modes.md +0 -161
  231. package/plugin-artifacts/codex/skills/build-loop/references/capability-routing.md +0 -231
  232. package/plugin-artifacts/codex/skills/build-loop/references/codex-subagents.md +0 -106
  233. package/plugin-artifacts/codex/skills/build-loop/references/coordination.md +0 -161
  234. package/plugin-artifacts/codex/skills/build-loop/references/correction-aware-capture.md +0 -177
  235. package/plugin-artifacts/codex/skills/build-loop/references/experiment-results-template.md +0 -101
  236. package/plugin-artifacts/codex/skills/build-loop/references/independent-auditor.md +0 -72
  237. package/plugin-artifacts/codex/skills/build-loop/references/intent-capability-pack.md +0 -257
  238. package/plugin-artifacts/codex/skills/build-loop/references/intent-exploration-prompts.md +0 -96
  239. package/plugin-artifacts/codex/skills/build-loop/references/leadership.md +0 -72
  240. package/plugin-artifacts/codex/skills/build-loop/references/memory.md +0 -313
  241. package/plugin-artifacts/codex/skills/build-loop/references/modular-systems-pack.md +0 -96
  242. package/plugin-artifacts/codex/skills/build-loop/references/output-style.md +0 -222
  243. package/plugin-artifacts/codex/skills/build-loop/references/pay-it-forward-arch.md +0 -98
  244. package/plugin-artifacts/codex/skills/build-loop/references/phase-1-assess.md +0 -249
  245. package/plugin-artifacts/codex/skills/build-loop/references/phase-2-plan.md +0 -86
  246. package/plugin-artifacts/codex/skills/build-loop/references/phase-3-execute.md +0 -49
  247. package/plugin-artifacts/codex/skills/build-loop/references/phase-4-review.md +0 -341
  248. package/plugin-artifacts/codex/skills/build-loop/references/phase-5-iterate.md +0 -72
  249. package/plugin-artifacts/codex/skills/build-loop/references/phase-6-learn.md +0 -58
  250. package/plugin-artifacts/codex/skills/build-loop/references/recent-design-structures.md +0 -274
  251. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/ASSESSMENT.md +0 -85
  252. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/STANDALONE_TEST_RUN.md +0 -149
  253. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/01-simple-bugfix.md +0 -32
  254. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/02-ui-build-with-iteration.md +0 -48
  255. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/03-multi-failure-escalation.md +0 -60
  256. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/04-ui-build-ibr-absent.md +0 -51
  257. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/05-refactor-navgator-absent.md +0 -71
  258. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/scenarios/06-recurring-bug-debugger-absent.md +0 -52
  259. package/plugin-artifacts/codex/skills/build-loop/references/refactor-history/trace-comparison.md +0 -202
  260. package/plugin-artifacts/codex/skills/build-loop/references/self-recursive-dev.md +0 -77
  261. package/plugin-artifacts/codex/skills/build-loop/references/self-review.md +0 -234
  262. package/plugin-artifacts/codex/skills/build-loop/references/ui-io-contract.md +0 -116
  263. package/plugin-artifacts/codex/skills/build-loop/references/verify-dispatch.md +0 -85
  264. package/plugin-artifacts/codex/skills/build-loop/scanners/audit-design-rules.mjs +0 -476
  265. package/plugin-artifacts/codex/skills/build-loop/scanners/require-visual-evidence.mjs +0 -239
  266. package/plugin-artifacts/codex/skills/build-loop/templates/backlog-item.md +0 -35
  267. package/plugin-artifacts/codex/skills/build-loop/templates/codex-worker-prompt.md +0 -100
  268. package/plugin-artifacts/codex/skills/build-loop/templates/ui-subagent-prompt.md +0 -179
  269. package/plugin-artifacts/codex/skills/build-loop/templates/ux-fix-plan.md +0 -40
  270. package/scripts/build_codex_plugin_artifact.py +0 -321
@@ -1,452 +1,54 @@
1
1
  ---
2
2
  name: debugging-memory
3
- description: Use when the user asks to "debug this", "fix this bug", "investigate error", "diagnose", "root cause", or reports a crash/exception/failure. Memory-first workflow that checks past incidents before investigating — owns verdict-handling and Review-F outcome feedback. Op-routed (input `{op: "search" | "store" | "assess", ...}`): search = memory lookup, store = incident write, assess = parallel domain assessment; per-op detail in `references/{search,store,assess}.md`. NOT the iterative fix loop (use `debug-loop`) or the postmortem system-lever analysis (use `root-cause-analysis`).
4
- version: 1.6.0
3
+ description: Search Build Loop's native debugging memory before you investigate a bug, then store the verified fix afterward. Use when the user reports a crash, error, regression, or broken behavior check what already failed this way before re-deriving it. Not for implementing the fix itself; use debug-loop.
4
+ version: 2.0.0
5
5
  user-invocable: false
6
6
  ---
7
7
 
8
8
  <!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
9
9
 
10
- # Debugging Memory Workflow
10
+ # Debugging Memory
11
11
 
12
- This skill integrates build-loop's native debugging memory into debugging workflows. The core principle: **never solve the same bug twice**.
12
+ Build Loop embeds the Coding Debugger core natively. Search and store use the same project-local structured root: `.claude/memory/`. No standalone debugger package, plugin, or MCP server is required.
13
13
 
14
- ## Op-routing interface (ADR-01)
14
+ ## Op routing
15
15
 
16
- This skill accepts an `op` selector. Callers invoke `Skill("build-loop:debugging-memory") with input { op, ... }`:
17
-
18
- | `op` | Purpose | Detail reference |
16
+ | `op` | Purpose | Reference |
19
17
  |---|---|---|
20
- | `"search"` | Memory LOOKUP — search local `.build-loop/issues/` (+ optional standalone Coding Debugger), return a verdict + compact matches. Default op for the memory-first gate and the domain assessors. | `references/search.md` |
21
- | `"store"` | Incident WRITE — persist a resolved bug as a native incident note (Review-F storage path). | `references/store.md` |
22
- | `"assess"` | Parallel domain ASSESSMENT fan out api/database/frontend/performance assessors and rank findings. | `references/assess.md` |
23
-
24
- Omitting `op` runs the memory-first workflow below (equivalent to `op: "search"` followed by verdict-based routing). The three former skills `debugging-memory-search`, `debugging-store`, `debugging-assess` were folded into these ops (2026-07, pool-consolidation Inc 5); their bodies are the reference files above.
25
-
26
- ## Memory-First Approach
27
-
28
- Before investigating any bug, always check build-loop's native debugging memory:
29
-
30
- ```
31
- Search `.build-loop/issues/` and invoke `build-loop:debugging-memory` `{op:"search"}` with the symptom description.
32
- ```
33
-
34
- The search returns a **verdict** with matching incidents and patterns.
35
-
36
- **Verdict-based decision tree:**
37
-
38
- 1. **KNOWN_FIX**: Apply the documented fix directly only when the strict direct-apply gate (below) passes; otherwise adapt the prior incident as a hypothesis and route to the standard fix flow
39
- 2. **LIKELY_MATCH**: Review the past incident, use it as a starting point — never direct-apply
40
- 3. **WEAK_SIGNAL**: Consider loosely related incidents, but investigate fresh
41
- 4. **NO_MATCH**: Proceed with standard debugging, document the solution afterward
42
-
43
- ## Direct-apply gate (strict)
44
-
45
- Compressing a failure to a single-line symptom and then applying a historical fix directly can overfit on superficially similar incidents (same error string, different root cause, version, or layer). Direct-apply on a `KNOWN_FIX` is gated behind three independent checks. **All three must hold** or the verdict falls back to "adapted plan, route through the normal fix flow":
46
-
47
- 1. **File match**: at least one of the incident's `files[]` exists at the same path in the current project (suffix match is acceptable — `src/auth/session.ts` matches even if relative vs absolute).
48
- 2. **Version match**: if the incident records a framework/library version (e.g. `next@14`, `prisma@5.8`), the current project's equivalent version must be within the same major (and same minor for libraries with pre-1.0 semver). If no version metadata on the incident, this check defaults to **fail** — no direct-apply.
49
- 3. **Second validation signal**: a non-symptom-string match must also agree. At least one of:
50
- - An exact stack-frame match (same function name + same file) between current failure and incident
51
- - A matching error class/type hierarchy (not just the message text)
52
- - A matching log entry from `read_logs` that ran earlier in the gate
53
-
54
- If any of the three fails, downgrade to adapted-plan routing and record the downgrade with `direct_apply_blocked_by: "version_mismatch" | "no_file_overlap" | "no_secondary_signal"`.
55
-
56
- **Why this is strict**: a bad direct-apply mutates the codebase on a lossy match and then Review-F stores the (wrong) outcome back to memory, reinforcing the false association. The cost of occasionally skipping a legitimate direct-apply is small; the cost of one overfit mutation compounding across sessions is large.
57
-
58
- When `KNOWN_FIX` direct-apply is blocked, the caller should treat the verdict as `LIKELY_MATCH` for routing purposes — load the top incident's detail, adapt the fix to current context, and run it through whatever fix flow the caller normally uses (in build-loop, that's Iterate as an adapted plan).
59
-
60
- ## Progressive Depth Retrieval
61
-
62
- Results are returned as compact summaries. Drill into matches on demand:
63
-
64
- 1. **Initial search**: Use `build-loop:debugging-memory` `{op:"search"}` — returns verdict + compact matches when structured memory exists
65
- 2. **Drill down**: Read the matching `.build-loop/issues/<id>.md` incident note for full context
66
- 3. **Outcome tracking**: Use `build-loop:debugging-memory` `{op:"store"}` after verification to record whether the fix worked, failed, or was modified
67
-
68
- ## Visibility
69
-
70
- When this skill activates, always announce it to the user:
71
-
72
- 1. **Before searching**: Output "Checking debugging memory for similar issues..."
73
- 2. **After search**: Report result briefly:
74
- - Found match: "Found X matching incident(s) from past debugging sessions"
75
- - No match: "No matching incidents in debugging memory - starting fresh investigation"
76
-
77
- This ensures users know the debugger is active and working.
78
-
79
- ## Structured Debugging Process
80
-
81
- When no past solution applies, follow this systematic approach.
82
-
83
- ### Deep Investigation Mode
84
-
85
- For non-trivial issues, load the `debug-loop` skill instead of the basic steps below. The trigger is the **verdict category** from memory search, not a numeric confidence score:
86
-
87
- - **`KNOWN_FIX`** → apply the fix directly, skip the loop
88
- - **`LIKELY_MATCH`** → enter debug loop (past incidents exist but need verification against current context)
89
- - **`WEAK_SIGNAL`** → enter debug loop (loosely related, needs fresh investigation)
90
- - **`NO_MATCH`** → enter debug loop (no prior knowledge, full investigation needed)
91
-
92
- Also enter the debug loop when:
93
- - The initial diagnosis feels superficial (treating a symptom as the cause)
94
- - A previous fix attempt didn't hold — the bug came back
95
- - The user explicitly asks for root cause analysis or deep investigation
96
- - Multiple symptoms suggest a shared underlying cause
97
-
98
- The debug loop provides: causal tree investigation, hypothesis testing, iterative fix-verify-score cycles (up to 5x), fix critique before declaring done, and transparent ✅/⚠️/❓ reporting.
99
-
100
- ### Basic Steps (for simple, clear-cut issues)
101
-
102
- For straightforward bugs where the cause is immediately apparent, use these steps directly:
103
-
104
- ### 1. Reproduce
105
-
106
- Establish a reliable reproduction path:
107
- - Identify exact steps to trigger the bug
108
- - Note any environmental factors (OS, dependencies, state)
109
- - Create a minimal reproduction if possible
110
-
111
- ### 2. Isolate
112
-
113
- Narrow down the problem space:
114
- - Binary search through recent changes
115
- - Disable components to find the culprit
116
- - Check logs and error messages for clues
117
-
118
- ### 3. Diagnose
119
-
120
- Find the root cause:
121
- - Trace the execution path
122
- - Examine state at failure point
123
- - Identify the specific code causing the issue
124
-
125
- ### 4. Fix
126
-
127
- Implement the solution:
128
- - Make minimal, targeted changes
129
- - Avoid side effects
130
- - Consider edge cases
131
-
132
- ### 5. Verify
133
-
134
- Confirm the fix works:
135
- - Test the original reproduction steps
136
- - Run related tests
137
- - Check for regressions
138
-
139
- ## Review-F outcome feedback (closing the memory-first loop)
140
-
141
- When a build / debugging session completes, close the feedback loop locally. If standalone Coding Debugger supplied cross-project memory for this run, mirror the result there as an optional second step.
142
-
143
- ### Step A — Store resolved incidents (write new knowledge)
144
-
145
- For each failure resolved during this run, write a native Build Loop incident note:
146
-
147
- ```bash
148
- mkdir -p .build-loop/issues
149
- ```
150
-
151
- ```markdown
152
- # <short incident title>
153
-
154
- ## Symptom
155
- <original failure string>
156
-
157
- ## Root Cause
158
- <what was wrong>
159
-
160
- ## Fix
161
- <diff or description>
162
-
163
- ## Verification
164
- <tests or reproduction checks that passed>
165
-
166
- ## Tags
167
- build-loop, <project>, <layer>
168
- ```
169
-
170
- Use `.build-loop/issues/<stable-slug>.md` as the path. Keep each note concise enough for future local search to surface the symptom, root cause, and verified fix.
171
-
172
- ### Step B — Report outcomes on applied optional memory
173
-
174
- For each prior gate where standalone Coding Debugger supplied a `KNOWN_FIX` or `LIKELY_MATCH`, report back whether the suggested fix actually worked through that plugin's outcome tool:
175
-
176
- - `worked`: applied as-is, resolved the criterion on first attempt
177
- - `modified`: applied the suggested approach but had to adapt substantially (Iterate attempt count > 1 on that criterion)
178
- - `failed`: applied but criterion still failed; eventually resolved via different fix or not at all
179
-
180
- This optional training signal belongs to standalone Coding Debugger. Build Loop itself does not register an MCP outcome tool.
181
-
182
- ## Incident Documentation
183
-
184
- After fixing a bug, store a local `.build-loop/issues/*.md` incident note for future retrieval.
185
-
186
- The local note should include:
187
- - **Symptom**: user-facing description of the bug
188
- - **Root Cause**: technical explanation of why the bug occurred
189
- - **Fix**: what was done to fix it
190
- - **Verification**: tests or reproduction checks that passed
191
- - **Tags**: search keywords for future retrieval
192
- - **Files Changed**: list of files that were modified
193
-
194
- ### Manual Incident Storage (Alternative)
195
-
196
- Agents can write incident files directly with the Write tool.
197
-
198
- **Step 1: Generate incident ID**
199
- ```
200
- INC_YYYYMMDD_HHMMSS_xxxx
201
- ```
202
- Where `xxxx` is 4 random alphanumeric characters. Example: `INC_20241231_143052_a7b2`
203
-
204
- **Step 2: Write JSON file**
205
- ```bash
206
- .build-loop/issues/INC_20241231_143052_a7b2.md
207
- ```
208
-
209
- **Minimal incident structure:**
210
- ```markdown
211
- # INC_20241231_143052_a7b2
212
-
213
- ## Symptom
214
- User-facing description of the bug.
215
-
216
- ## Root Cause
217
- Technical explanation of why the bug occurred.
218
-
219
- ## Fix
220
- What was done to fix it.
221
-
222
- ## Verification
223
- - Reproduction now passes
224
- - Related regression tests pass
225
-
226
- ## Files Changed
227
- - path/to/file.ts
228
-
229
- ## Tags
230
- relevant, keywords, search
231
- ```
232
-
233
- **Step 3: Ensure directory exists**
234
- Before writing, create the directory if needed:
235
- ```bash
236
- mkdir -p .build-loop/issues
237
- ```
238
-
239
- ### Quality Indicators
240
-
241
- The memory system scores incidents on:
242
- - Root cause analysis depth (30%)
243
- - Fix documentation completeness (30%)
244
- - Verification status (20%)
245
- - Tags and metadata (20%)
246
-
247
- Target 75%+ quality score for effective future retrieval.
248
-
249
- ### Tagging Strategy
250
-
251
- Apply descriptive tags for better searchability:
252
- - Technology: `react`, `typescript`, `api`, `database`
253
- - Category: `logic`, `config`, `dependency`, `performance`
254
- - Symptom type: `crash`, `render`, `timeout`, `validation`
255
-
256
- ## Using Past Solutions
257
-
258
- When the memory system finds a match:
259
-
260
- 1. **Review the past incident** - Understand the original context
261
- 2. **Assess applicability** - Consider differences in current situation
262
- 3. **Adapt the fix** - Modify as needed for current codebase
263
- 4. **Verify thoroughly** - The same symptom may have different causes
264
-
265
- ## Pattern Recognition
266
-
267
- The memory system automatically extracts patterns when 3+ similar incidents exist. Patterns represent reusable solutions with higher reliability than individual incidents.
268
-
269
- When a pattern matches:
270
- - Trust the solution template (90%+ confidence)
271
- - Apply the recommended approach
272
- - Note any caveats mentioned
273
-
274
- ## Extended capability — global-scope memory + cross-domain assessors
275
-
276
- If project-local memory misses but cross-project memory might have a hit, re-call this skill with broader scope, or escalate to the assess skill for additional domain assessor coverage:
277
-
278
- ```
279
- Skill("build-loop:debugging-memory") with input { op: "search", symptom, scope: "global", calledBy: "debugging-memory" }
280
- Skill("build-loop:debugging-memory") with input { op: "assess", symptom, scope: "global" }
281
- ```
282
-
283
- Both are native build-loop skills. They search local `.build-loop/issues/` first and may use standalone Coding Debugger only when that plugin is installed and the caller explicitly requests cross-project memory.
284
-
285
- Use this for:
286
- - A `NO_MATCH` from project memory where cross-project history might still have a relevant incident
287
- - An ambiguous verdict where additional assessor input would change the routing decision
288
- - Coordination state that lives outside the current project and was explicitly requested
289
-
290
- Do NOT use this for: every memory call (it's escalation, not primary path), or when project memory already returned `KNOWN_FIX` (bundled is enough).
291
-
292
- ## Native Memory Quick Reference
293
-
294
- | Surface | Purpose |
295
- |------|---------|
296
- | `build-loop:debugging-memory` `{op:"search"}` | Search memory for similar bugs (returns verdict when available) |
297
- | `build-loop:debugging-memory` `{op:"store"}` | Store a new debugging incident |
298
- | `.build-loop/issues/<id>.md` | Full incident or pattern detail |
299
- | `.build-loop/issues/` | Recent incidents and local memory corpus |
300
- | `build-loop:debugging-memory` `{op:"assess"}` | Parallel domain assessment (`references/assess.md`) |
301
-
302
- ## Parallel Domain Assessment
303
-
304
- For complex issues that may span multiple areas (database, frontend, API, performance), use parallel assessment to diagnose all domains simultaneously.
305
-
306
- ### When to Use Parallel Assessment
307
-
308
- - Symptom is vague or unclear ("app broken", "something wrong")
309
- - Multiple domains may be involved ("search is slow and returns wrong results")
310
- - Post-deploy regression with unknown scope
311
- - Complex issues affecting multiple layers
312
-
313
- ### Domain Assessors
314
-
315
- Four specialized assessor agents are available:
316
-
317
- | Assessor | Expertise |
318
- |----------|-----------|
319
- | `database-assessor` | Prisma, PostgreSQL, queries, migrations, connection issues |
320
- | `frontend-assessor` | React, hooks, rendering, state, hydration, SSR |
321
- | `api-assessor` | Endpoints, REST/GraphQL, auth, middleware, CORS |
322
- | `performance-assessor` | Latency, memory, CPU, bottlenecks, optimization |
323
-
324
- ### Parallel Execution
325
-
326
- Launch assessors **in parallel** using the Task tool:
327
-
328
- ```
329
- For: "search is slow and returns wrong results"
330
-
331
- Launch simultaneously:
332
- - database-assessor (query performance)
333
- - api-assessor (endpoint correctness)
334
- - performance-assessor (latency analysis)
335
- ```
336
-
337
- Each assessor returns a JSON assessment with:
338
- - `confidence`: 0-1 score
339
- - `probable_causes`: List of likely issues
340
- - `recommended_actions`: Steps to fix
341
- - `related_incidents`: Past memory matches
342
-
343
- ### Domain Detection Keywords
344
-
345
- | Domain | Trigger Keywords |
346
- |--------|-----------------|
347
- | Database | query, schema, migration, prisma, sql, connection, constraint, index |
348
- | Frontend | react, hook, useEffect, render, component, state, hydration, browser |
349
- | API | endpoint, route, request, response, auth, 500, 404, cors, middleware |
350
- | Performance | slow, latency, timeout, memory, leak, cpu, bottleneck, optimization |
351
-
352
- ### Result Aggregation
353
-
354
- After parallel assessments complete:
355
- 1. Rank by confidence score (highest first)
356
- 2. Consider evidence count (more related incidents = higher priority)
357
- 3. Generate priority ranking of recommended actions
358
- 4. Present unified diagnosis with action sequence
359
-
360
- ## Trace Integration
361
-
362
- The debugger can ingest traces from multiple sources to aid diagnosis:
363
-
364
- ### Supported Trace Sources
365
-
366
- - **OpenTelemetry (OTLP)**: Distributed tracing spans
367
- - **Sentry**: Error events and breadcrumbs
368
- - **Langchain/LangSmith**: LLM operation traces
369
- - **Browser**: Chrome DevTools, Playwright, console logs
370
-
371
- ### Using Traces for Debugging
372
-
373
- When traces are available:
374
- 1. Correlate error traces with symptoms
375
- 2. Review performance spans for latency issues
376
- 3. Check LLM traces for AI-related bugs
377
- 4. Examine browser console for frontend errors
378
-
379
- Traces are summarized to minimize token usage while preserving key diagnostic information.
380
-
381
- ## Token-Efficient Retrieval
382
-
383
- The memory system uses tiered retrieval to minimize context size:
384
-
385
- ### Retrieval Tiers
386
-
387
- | Tier | Token Usage | Content |
388
- |------|-------------|---------|
389
- | Summary | ~100 tokens | ID, symptom preview, category |
390
- | Compact | ~200 tokens | Short keys, essential fields |
391
- | Full | ~550 tokens | Complete incident details |
392
-
393
- ### Automatic Token Budgeting
394
-
395
- Default budget: 2500 tokens
396
- - Patterns: 30% (750 tokens)
397
- - Incidents: 60% (1500 tokens)
398
- - Metadata: 10% (250 tokens)
399
-
400
- The system automatically selects the appropriate tier based on available budget.
401
-
402
- ## Subagent Integration
403
-
404
- When debugging involves subagents (your own or from other plugins), follow these guidelines to ensure debugging memory is utilized.
405
-
406
- ### Automatic Behavior
407
-
408
- **Before spawning debugging-related subagents:**
409
- 1. Search debugging memory first using `build-loop:debugging-memory` `{op:"search"}`
410
- 2. Pass relevant context to the subagent in its prompt
411
- 3. Include any matching incidents or patterns found
412
-
413
- **Example subagent prompt with debugging context:**
414
- ```
415
- Investigate the database timeout issue.
416
-
417
- DEBUGGING MEMORY CONTEXT:
418
- - Found 2 similar incidents: INC_20241215_db_timeout, INC_20241201_pool_exhaust
419
- - Pattern PTN_connection_pool suggests checking pool size and idle timeout
420
- - Previous fix: Increased pool size from 10 to 25 in DATABASE_URL
18
+ | `search` | Return a verdict and compact incident matches before investigation. | `references/search.md` |
19
+ | `store` | Persist a verified incident to the same store searched above. | `references/store.md` |
20
+ | `assess` | Run parallel domain assessment for a multi-domain symptom. | `references/assess.md` |
421
21
 
422
- Start your investigation considering this prior knowledge.
423
- ```
22
+ Omitting `op` means `search`.
424
23
 
425
- ### When Subagents Cannot Access Debugging Memory
24
+ ## Required workflow
426
25
 
427
- **Inform the user** when debugging memory cannot be used with subagents:
26
+ 1. Announce: “Checking debugging memory for similar issues...”
27
+ 2. Run the native search command from `references/search.md` with the exact symptom.
28
+ 3. Report the verdict and match count.
29
+ 4. Route the live diagnosis and fix to `build-loop:debug-loop` unless a `KNOWN_FIX` passes every direct-apply check.
30
+ 5. After verification, run the native store command from `references/store.md`.
31
+ 6. Search again to prove the newly stored incident is discoverable.
428
32
 
429
- 1. **External MCP tools**: "Note: The debugging subagent is using external MCP tools that cannot access local debugging memory. I searched memory beforehand and found [X matching incidents / no matches]."
33
+ ## Verdict handling
430
34
 
431
- 2. **Third-party agents**: "Note: This third-party debugging agent doesn't have access to your project's debugging memory. Consider searching debugging memory first to check for similar past issues."
35
+ - `KNOWN_FIX`: direct-apply only after file, version, and second-signal checks all pass.
36
+ - `LIKELY_MATCH`: treat as a grounded hypothesis; verify in the current code.
37
+ - `WEAK_SIGNAL`: do not anchor; investigate fresh.
38
+ - `NO_MATCH`: investigate fresh and store the verified resolution.
432
39
 
433
- 3. **Sandboxed environments**: "Note: The subagent runs in a sandboxed environment without access to debugging memory. I've pre-loaded relevant context from [X] matching incidents."
40
+ ## Storage boundary
434
41
 
435
- ### Coordinating Multiple Debugging Subagents
42
+ - `.claude/memory/incidents/*.json`: durable structured debugger history.
43
+ - `.claude/memory/patterns/*.json`: extracted reusable patterns.
44
+ - `.build-loop/issues/`: unresolved or executable work only; do not store resolved debugger history there.
436
45
 
437
- When using parallel assessment or multiple debugging subagents:
46
+ ## Quality gate
438
47
 
439
- 1. **Pre-query memory once** using `build-loop:debugging-memory` `{op:"search"}` before spawning agents
440
- 2. **Distribute context** - each agent gets relevant subset
441
- 3. **Aggregate findings** - collect new insights from all agents
442
- 4. **Store unified incident** - write a native `.build-loop/issues/*.md` note to document the combined diagnosis
48
+ Every stored incident needs an exact symptom, causal root cause, implemented fix, verification evidence, relevant tags, and changed files. Never label an untested diagnosis `verified`.
443
49
 
444
- ## Best Practices
50
+ ## Sibling skills
445
51
 
446
- 1. **Always check memory first** - Search local `.build-loop/issues/` before investigating any bug
447
- 2. **Document every fix** - Write a `.build-loop/issues/*.md` note after resolving bugs
448
- 3. **Use descriptive symptoms** - Better matching requires good descriptions
449
- 4. **Include verification status** - Helps prioritize trusted solutions
450
- 5. **Record outcomes** - Use standalone Coding Debugger outcomes only when that optional plugin supplied the prior incident
451
- 6. **Pass context to subagents** - Don't let debugging knowledge stay siloed
452
- 7. **Inform users of limitations** - Be transparent when memory can't be accessed
52
+ - `build-loop:debug-loop`: investigate, fix, and verify the active bug.
53
+ - `build-loop:root-cause-analysis`: post-fix systemic analysis.
54
+ - `build-loop:debugging-memory` `{op:"assess"}`: parallel domain assessment.
@@ -63,18 +63,18 @@ Patterns are extracted automatically when conditions are met:
63
63
 
64
64
  ### Triggering Extraction
65
65
 
66
- Use build-loop's native incident notes to preview and extract patterns.
66
+ Use Build Loop's native structured incidents to preview and extract patterns.
67
67
 
68
68
  Local workflow:
69
69
 
70
70
  ```bash
71
- find .build-loop/issues -type f -name '*.md' 2>/dev/null
71
+ find .claude/memory/incidents -type f -name '*.json' 2>/dev/null
72
72
  ```
73
73
 
74
- Standalone Coding Debugger can provide richer pattern APIs when explicitly installed and requested. Programmatic examples should import that package from the standalone repo, not from build-loop.
74
+ The debugger core is exported by Build Loop itself:
75
75
 
76
76
  ```typescript
77
- import { extractPatterns } from '<coding-debugger-package>';
77
+ import { extractPatterns } from '@tyroneross/build-loop';
78
78
 
79
79
  const patterns = await extractPatterns({
80
80
  min_incidents: 3,