@tyroneross/build-loop 0.36.0 → 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 +11 -5
  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 +56 -2
  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 +23 -10
  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
@@ -14,7 +14,7 @@ Each section is self-contained. Keep prose tight: the goal is "capture the conce
14
14
 
15
15
  **Build-loop-owned static fallback.** When no browser/simulator/native-AX path is available, build-loop cannot compute every rendered style value, but it CAN grep the code for specific UI contract and design-rule violations. The checks below are the minimum-viable static-analysis subset.
16
16
 
17
- > **Precedence note**: IBR is explicit-only. Do not route web UI builds, Review-B validation, coverage-gap generation, or Iterate re-validation through `build-loop:ibr-bridge` unless the user specifically asks for IBR / Interface Built Right / `.ibr-test.json`. The default path is `design-contract-specialist` for direction, `ui-validator` for rendered checks, and this static matrix when rendered evidence is unavailable.
17
+ > **Precedence note**: follow `../../references/ibr-ui-verification-policy.md`. Headless IBR is the primary verifier when Build Loop updates, compares, or audits a renderable UI design and IBR is installed. This file defines the fallback when IBR is absent or cannot reach the surface. Interactive viewers and persistent sessions remain explicit-only.
18
18
 
19
19
  ### Design principles (Calm Precision, condensed from global `CLAUDE.md`)
20
20
 
@@ -266,7 +266,7 @@ The `build-loop:debug-loop` skill is bundled with build-loop. Use this fallback
266
266
  2. **Isolate** — binary-search the diff / commits / inputs until you find the smallest change that flips pass ↔ fail.
267
267
  3. **Hypothesize** — one specific claim about cause. Write it as a statement, not a question.
268
268
  4. **Test** — make the smallest possible change that would confirm or refute the hypothesis. Run it. Observe.
269
- 5. **Record** — append one line to `.build-loop/issues/YYYY-MM-DD-<slug>.md` with: symptom, root cause, fix, prevention.
269
+ 5. **Record** — after verification, use the native `build-loop-debugger store` command so the incident lands in `.claude/memory/`.
270
270
 
271
271
  Stop after 3 failed hypotheses and escalate to the user with what was tried.
272
272
 
@@ -274,7 +274,7 @@ Stop after 3 failed hypotheses and escalate to the user with what was tried.
274
274
 
275
275
  ## bug-memory — Prior-bug lookup
276
276
 
277
- The `build-loop:debugging-memory` skill is bundled with build-loop. Use this fallback only if the skill cannot provide structured recall. No cross-project training — just a file-grep of this project's prior builds.
277
+ The `build-loop:debugging-memory` skill and debugger core are bundled with Build Loop. Use this fallback only if the native CLI or compiled core cannot load.
278
278
 
279
279
  ### Query procedure
280
280
 
@@ -287,7 +287,7 @@ TOKENS=$(echo "$SYMPTOM" | tr ' ' '\n' | grep -E '^[A-Z][a-zA-Z]+$|^[a-z_]+[A-Z]
287
287
 
288
288
  # Search local project history
289
289
  for T in $TOKENS; do
290
- grep -R -l "$T" .build-loop/issues/ 2>/dev/null
290
+ grep -R -l "$T" .claude/memory/incidents/ 2>/dev/null
291
291
  grep -R -l "$T" .build-loop/feedback.md 2>/dev/null
292
292
  grep -R -l "$T" .bookmark/ 2>/dev/null
293
293
  done | sort -u
@@ -300,25 +300,15 @@ done | sort -u
300
300
  | `LOCAL_HIT_EXACT` | At least one file contains the full symptom string (case-insensitive substring match) | Read that file; adapt its recorded fix as the Iterate plan. Not direct-apply. |
301
301
  | `LOCAL_HIT_PARTIAL` | ≥2 tokens co-occur in the same file | Reference the file in the Iterate plan; investigate normally |
302
302
  | `LOCAL_WEAK` | 1 token match only | Note reference, investigate normally |
303
- | `LOCAL_NO_MATCH` | No files contain any tokens | Standard Iterate; write a new `.build-loop/issues/<slug>.md` after resolution |
303
+ | `LOCAL_NO_MATCH` | No files contain any tokens | Standard Iterate; use the native debugger store after resolution |
304
304
 
305
305
  No confidence score (no classifier). No cross-project lookup. No automatic training signal back to the source — this is strictly read-only memory for one project.
306
306
 
307
307
  ### Storage (write side)
308
308
 
309
- After resolving a failure, append to `.build-loop/issues/YYYY-MM-DD-<slug>.md`:
309
+ After resolving a failure, create the JSON payload documented in `skills/debugging-memory/references/store.md` and invoke the native store command. It writes to `.claude/memory/incidents/` and updates the indexes used by search.
310
310
 
311
- ```
312
- # <one-line title>
313
-
314
- **Symptom**: <error string as it appeared>
315
- **Root cause**: <what was actually wrong>
316
- **Fix**: <diff summary or description>
317
- **Files**: <paths touched>
318
- **Tags**: <layer>, <component>, <pattern>
319
- ```
320
-
321
- Future builds will grep this file. The bundled `build-loop:debugging-memory` skill promotes this to native build-loop recall; standalone Coding Debugger can mirror it into cross-project ranked memory when installed separately.
311
+ Do not write resolved incident history to `.build-loop/issues/`; that directory remains an executable/open-work lane.
322
312
 
323
313
  ---
324
314
 
@@ -415,11 +405,16 @@ Use the **6-Part Stack** for any system prompt or agent prompt:
415
405
  5. **Output format** — exact structure: JSON schema, markdown template, or free text with labeled sections. Specify escape behavior for ambiguous inputs.
416
406
  6. **Acceptance criteria** — how success is judged. If deterministic, what makes it wrong. If LLM-judged, what the judge looks for.
417
407
 
418
- Calibrate to model tier:
408
+ Calibrate to the target model's capability rung. **These lines are kept byte-equal to the `summary` strings in `references/model-taxonomy.json` (`prompting_profiles.by_tier`) by test `T-09` in `scripts/test_model_taxonomy.py`. Edit the taxonomy first, then mirror the change here — editing only one side fails the test.** Rungs are the taxonomy's ladder: T0 restricted-frontier · T1 ultra-frontier · T2 frontier · T3 balanced workhorse · T4 efficient near-frontier · T5 utility. Inside build-loop, resolve a target's rung with `python3 scripts/resolve_agent_model.py <agent>`; the lines below stand on their own when you are not.
409
+
410
+ - **T0** — State the goal, the context, and the falsifier. Omit worked examples. Give every constraint its rationale. Trust the model with the edge cases.
411
+ - **T1** — State the goal, the context, and the falsifier. Omit worked examples. Give every constraint its rationale. Trust the model with the edge cases.
412
+ - **T2** — Lead with context rather than directives. Include at most one compact example, and only when the contract is novel. Delegate the edge cases, but name the falsifiers you already know.
413
+ - **T3** — Write the full brief: worked contract examples, explicit caps with the arithmetic shown, and known edge cases enumerated (including schema-field warnings).
414
+ - **T4** — Write the full explicit brief: worked examples and direct instructions.
415
+ - **T5** — Write the full explicit brief: worked examples and direct instructions. Use this rung for bounded mechanical tasks only.
419
416
 
420
- - **Frontier (T1 Opus 4.6, GPT-5)**: can handle longer instructions, implicit reasoning, self-correction. Prefer clarity over verbosity.
421
- - **Mid (T2 — Sonnet 5, GPT-5 class)**: explicit instructions; show, don't tell; 1-2 few-shot examples help.
422
- - **Small/fast (T3 — Haiku 4.5, gpt-4-mini)**: keep prompts short; single task only; deterministic output format; more examples (3-5).
417
+ T4 and T5 are weakly-evidenced placeholders encoding current behavior rather than a posture chosen on evidence; see each rung's `evidence_note` in the taxonomy.
423
418
 
424
419
  Review checklist — when auditing an existing prompt:
425
420
 
@@ -21,7 +21,7 @@ When `uiTarget != null`, the UI gates wire in automatically:
21
21
  1. **Phase 1 (Assess)** — mockup pre-flight scan + required UI scoring criteria
22
22
  2. **Phase 2 (Plan)** — UI input/output contract section from `references/ui-io-contract.md`, then mockup-gallery hook for major UI work (new page or ≥40% redesign): draft B&W mockups via `mockup-gallery:mockup-session-new` before any UI is written. The exception to build-loop's "actions/functions only, no plugin UI" policy — mockup drafting is itself the action.
23
23
  3. **Phase 3 (Execute)** — verbatim subagent-prompt template injection on every UI dispatch, including the plan's UI input/output contract
24
- 4. **Phase 4 sub-step B (Validate)** — build-loop-owned `ui-validator` first, then design-rule scanner on changed files, contract coverage, code graders, and visual evidence capture
24
+ 4. **Phase 4 sub-step B (Validate)** — IBR primary when installed for renderable UI design updates/comparisons/audits, with `ui-validator` in parallel; then design-rule scanner, contract coverage, and code graders
25
25
  5. **Phase 4 sub-step D (Fact-Check)** — Gate 5 design-rule scanner across full project; Gate 5a UI input/output contract scan; Gate 7 UX triage scanner (interactability, performance, data-accuracy, usability) writing queue entries to `.build-loop/ux-queue/`
26
26
  6. **Phase 5 (Iterate)** — drains the UX queue alongside Validate failures; parallel fan-out (≤4) for independent fixes; runs the build-loop UI re-validate hook before returning to Review-B
27
27
 
@@ -44,7 +44,7 @@ When `uiTarget != null`, build-loop owns the design route:
44
44
 
45
45
  1. Phase 2 loads `build-loop:ui-design`, then dispatches `design-contract-specialist` with `trigger_point: phase2-design-direction` for non-trivial UI work. It reads the UI input/output contract, `references/recent-design-structures.md`, `skills/ui-design/references/ui-guidance-sources.md`, product/workflow needs, project tokens, mockups, screenshots, and local design artifacts, then chooses a fit-for-purpose direction and writes `.build-loop/app-contract/ui.md`. Recent and existing design patterns are inputs, not mandates.
46
46
  2. Phase 3 implementers receive the UI contract plus `templates/ui-subagent-prompt.md`.
47
- 3. Visual verification routes per `state.json.availablePlugins.ibr`:
47
+ 3. Visual verification follows `../../../references/ibr-ui-verification-policy.md` and routes per `state.json.availablePlugins.ibr`:
48
48
  - **IBR installed → IBR primary**: dispatch IBR `scan` (web) / `scan_macos` (macOS) via `build-loop:ibr-bridge`; `ui-validator` runs in parallel as the build-loop-owned check.
49
49
  - **IBR absent → native fallback**: Phase 4-B dispatches `ui-validator` first (web), or routes to `native-ax-driver` (macOS), or the iOS-simulator screenshot path (`uiTarget: "mobile"`). Either path satisfies the BL-1 visual-evidence gate.
50
50
  4. Phase 4-B always runs scanners and code graders after the visual verifier. The BL-1 gate (`scanners/require-visual-evidence.mjs`) is a separate exit-code check; it does not care which route ran, only that the evidence is visual/AX rather than symbol/string.
@@ -45,7 +45,7 @@ The orchestrator (single writer) appends one row to `.build-loop/agent-ledger.js
45
45
  action: author | re-plan
46
46
  agent: advisor · tier: frontier · model: <resolved id (fable / gpt-5.x / …)>
47
47
  rung: 0|1|2|3 · status: pass|fail|partial · trigger: <synthesisDensity>5 | riskSurfaceChange | stakes>=medium | dispatch_tier:frontier>
48
- refs: {output: docs/plans/<slug>.md, input: <prior plan / failure evidence>}
48
+ refs: {output: .build-loop/plans/<slug>.md, input: <prior plan / failure evidence>}
49
49
  note: <on re-plan: failure evidence + why a retry is justified>
50
50
  ```
51
51
 
@@ -302,7 +302,7 @@ For native iOS/macOS modernization passes scoped from a prior audit, run a three
302
302
 
303
303
  ### Native visual evidence
304
304
 
305
- Use built-in simulator screenshots and native AX evidence for visual regression after a redesign that changes layout. Those tools do not extract computed SwiftUI font/color/spacing values, so source-code extraction remains load-bearing for metric audits. Use grep + Read for typography, color, spacing, and token claims. IBR native scans are explicit-only auxiliary evidence when the user asks for IBR.
305
+ When IBR can reach the running native surface, use its headless native scan or comparison automatically as the primary visual verifier for UI design updates, comparisons, and audits. Keep built-in simulator screenshots and native AX evidence as the fallback and corroborating evidence. Those tools do not extract computed SwiftUI font/color/spacing values, so source-code extraction remains load-bearing for metric audits. Use grep + Read for typography, color, spacing, and token claims. Interactive IBR viewers and persistent sessions remain explicit-only.
306
306
 
307
307
  ### Three-tier ROI ordering
308
308
 
@@ -9,9 +9,9 @@ each; the full detail lives here and loads on demand.
9
9
 
10
10
  ## Autonomous Mode (Queue-Drain Loop)
11
11
 
12
- Autonomous mode generalizes Phase 5 Iterate into a self-replenishing worker that drains its own `ux-queue/` + `issues/` + `proposals/`, alignment-checks each item against the original intent, executes the aligned subset, and commits in batches until the queue is empty or the wall-clock budget elapses. Default since this mode shipped (`--autonomous=false` opts back to classic one-pass).
12
+ Autonomous mode generalizes Phase 5 Iterate into a self-replenishing worker that drains executable `queue/` + `ux-queue/` + `issues/` + `followup/` lanes, alignment-checks each item against the original intent, executes the aligned subset, and commits in batches until the queue is empty or the wall-clock budget elapses. Proposals and backlog items remain non-executable.
13
13
 
14
- **End-of-run backlog/issues drain — SHIPPED DEFAULT 2026-06-04**: every run now auto-drains `.build-loop/issues/` then `.build-loop/backlog/` at end-of-thread without asking. Reversible per-repo via `.build-loop/config.json`:
14
+ **End-of-run queue continuation:** every run may continue its executable lanes at end-of-thread. Backlog work joins only through `backlog.py promote` at a planning boundary. Planned work is pickup-eligible; initiatives require user approval and an isolated non-main worktree; decisions only surface for matching workstreams.
15
15
 
16
16
  ```json
17
17
  { "sessionPrefs": { "continueFromQueues": "never" } }
@@ -77,8 +77,8 @@ The orchestrator writes `state.execution.budget` at autonomous-mode start:
77
77
  | Mode | Per-build cap | Per-item cap |
78
78
  |---|---|---|
79
79
  | Classic (autonomous=false) | 5 | n/a |
80
- | Autonomous default | 25 | 3 same-verdict |
81
- | Autonomous long | 25 | 3 same-verdict |
80
+ | Autonomous default | 25 | audit at 3 identical unresolved verdicts; quarantine at 5 |
81
+ | Autonomous long | 25 | audit at 3 identical unresolved verdicts; quarantine at 5 |
82
82
 
83
83
  `maxIterateAttemptsAutonomous` is configurable in `.build-loop/config.json.autonomy.maxIterateAttemptsAutonomous`.
84
84
 
@@ -137,7 +137,13 @@ Passing both `--per-commit` and `--no-per-commit` is a user error — fail loud
137
137
 
138
138
  2. **Per-commit orchestrator dispatch.** For each commit in the plan (respecting `depends_on`), the skill body dispatches a fresh `Agent(subagent_type="build-loop:build-orchestrator", ...)` carrying ONLY that commit's packet plus a `PER_COMMIT_DISPATCH: { commit_id, run_id, prior_commit_hashes }` prompt prefix. Each dispatched orchestrator runs Phase 3 Execute + Phase 4 Review for ITS commit only, then commits and returns. The dispatched orchestrator's behavior on the prefix is documented in `agents/build-orchestrator.md` §0a.
139
139
 
140
- 3. **Aggregate.** The skill body collects each orchestrator's return envelope and writes a final report combining all commits' results. On partial failure (commit N fails), do NOT dispatch downstream commits; retain `.build-loop/per-commit-plan.json` so a subsequent `/build-loop:run --resume` invocation can pick up where it stopped. **Parent-dispatch contract (GAP-1):** the dispatcher (this skill body) HAS the Agent tool, so it is the parent that owes the audit. For every returned envelope whose `auditor_status` is `not-run:parent-must-dispatch` or `cross-vendor-deferred`, the dispatcher MUST before declaring that commit/run review-complete dispatch `Agent(subagent_type="build-loop:independent-auditor")` on that commit's diff range, append the verdict to `.build-loop/judge-decisions.json`, and re-run `write_run_entry --scope build` so the review-completeness gate passes. A nested per-commit orchestrator cannot audit itself; the audit is the dispatcher's responsibility, not an optional step.
140
+ 3. **Aggregate.** The skill body collects each orchestrator's return envelope and writes a final report combining all commits' results. On partial failure (commit N fails), do NOT dispatch downstream commits; retain `.build-loop/per-commit-plan.json` so a subsequent `/build-loop:run --resume` invocation can pick up where it stopped. **Parent-dispatch contract (GAP-1 — now machine-checkable, not prose):** the dispatcher (this skill body) HAS the Agent tool, so it is the parent that owes the audit. A nested per-commit orchestrator that could not run the auditor writes an **owed-verification manifest** (`.build-loop/owed-verification.json`, via `scripts/owed_verification.py write`) at its Review Sub-step A and flips `state.json.review_incomplete = true`. The dispatcher MUST before declaring the run review-complete resolve every owed manifest:
141
+
142
+ 1. `python3 ${CLAUDE_PLUGIN_ROOT}/scripts/owed_verification.py check --workdir "$PWD" --json`. Exit 1 (`status: incomplete`) means verifiers are still owed; exit 0 (`complete`/`absent`) means nothing outstanding.
143
+ 2. For each verifier in the manifest's `owed[]`, dispatch it using the manifest's `dispatch_commands[verifier]` (e.g. `Agent(subagent_type="build-loop:independent-auditor")` on that commit's diff range), append the verdict to `.build-loop/judge-decisions.json`, then `owed_verification.py clear --verifier <name> --workdir "$PWD"`.
144
+ 3. When the last owed verifier is cleared the manifest is removed and `review_incomplete` flips back to `false`. Re-run `write_run_entry --scope build` so the review-completeness gate passes.
145
+
146
+ Also handle any returned envelope whose `auditor_status` is `not-run:parent-must-dispatch` or `cross-vendor-deferred` even if (for a partial/legacy path) no manifest was written — the audit is the dispatcher's responsibility, not an optional step. The manifest is what makes "the parent can't silently skip it" a mechanism rather than a memory. Helper + tests: `scripts/owed_verification.py` / `scripts/test_owed_verification.py`.
141
147
 
142
148
  **Parent owes Phase 6 Learn + retrospective (E3).** A stop-early dispatch that never reaches Phase 4 Review-G can't run Phase 6 Learn or the post-push retro — so the dispatching parent owes them at close, under the same parent-dispatch contract as GAP-1 (not optional, name the owner at dispatch). Full contract: `agents/build-orchestrator.md` §Phase 4 A (E3 block).
143
149
 
@@ -0,0 +1,115 @@
1
+ # Build Loop Dashboard
2
+
3
+ ## Big idea
4
+
5
+ The local dashboard shows the current Build Loop phase, major tasks, and agents
6
+ that have actually been invoked. The same page retains the autonomy decision
7
+ controls for production, reversibility, scope, and major user outcomes.
8
+
9
+ ## Start
10
+
11
+ ```bash
12
+ python3 scripts/autonomy_dashboard.py --workdir "$PWD" --port 8765
13
+ ```
14
+
15
+ The command starts a detached local server that survives the launching terminal
16
+ or agent session. Open `http://127.0.0.1:8765`. Check or stop it with:
17
+
18
+ ```bash
19
+ python3 scripts/autonomy_dashboard.py --workdir "$PWD" --status
20
+ python3 scripts/autonomy_dashboard.py --workdir "$PWD" --stop
21
+ ```
22
+
23
+ The dashboard is opt-in and token-free. Build Loop does not start it
24
+ automatically, `--stop` removes the running surface whenever the user prefers,
25
+ and the projection performs no LLM or provider calls.
26
+
27
+ Use `--foreground` only when an external process manager owns the server
28
+ lifecycle. The server refuses non-loopback binding and non-loopback Host/Origin
29
+ headers.
30
+
31
+ ## Live run projection
32
+
33
+ `GET /api/state` includes a `run` object produced by
34
+ `scripts/dashboard_projection.py`. The browser refreshes that projection every
35
+ two seconds while the page is visible; no server restart is required when the
36
+ run advances.
37
+
38
+ Each of the six standard phases includes its expected output. Free-form progress
39
+ comments use the existing bounded working-state channel:
40
+
41
+ ```bash
42
+ python3 scripts/working_state_writer.py --workdir "$PWD" \
43
+ --agent "<agent-id>" --run-id "<run-id>" --phase execute \
44
+ --status editing --note "Connecting the live task projection."
45
+ ```
46
+
47
+ The note is capped at 800 characters, stored in
48
+ `.build-loop/working-state/{current.json,log.jsonl}`, and filtered to the current
49
+ run before display.
50
+
51
+ The projection is read-only and rebuildable. It uses these canonical records:
52
+
53
+ - `.build-loop/state.json` for the current run, phase, and structured task
54
+ collections;
55
+ - `.build-loop/plan.md` to enrich matching bare task IDs and as a major-task
56
+ fallback when structured execution tasks are absent;
57
+ - `.build-loop/agent-ledger.jsonl` for recorded agent invocations in the current
58
+ run; and
59
+ - `.build-loop/working-state/{current.json,log.jsonl}` for bounded free-form run
60
+ notes and comments; and
61
+ - `runs[-1].judge_decisions` in `.build-loop/state.json` for the latest
62
+ completed run when no agent-ledger rows are available.
63
+
64
+ Missing or malformed optional records produce an honest empty state or warning.
65
+ The dashboard does not infer invocation from an available-agent roster and does
66
+ not write phase, task, agent, or judge state.
67
+
68
+ ## Persistence contract
69
+
70
+ - Every selection or note edit appends a `response_saved` event to
71
+ `.build-loop/autonomy-dashboard/responses.jsonl`.
72
+ - Reload and process restart reconstruct the latest response per gap from that
73
+ append-only log.
74
+ - Each collapsed card names the selected policy and shows saved, queued, or
75
+ applied state;
76
+ JavaScript applies selected styling directly so feedback does not depend on
77
+ CSS `:has()` support.
78
+ - **Queue this decision** appends `response_queued` and creates
79
+ `.build-loop/followup/dashboard-<gap>-<timestamp>.md`.
80
+ - Queuing a revision moves older executable files for the same gap to
81
+ `.build-loop/autonomy-dashboard/superseded/`; one gap has one live instruction.
82
+ - A validated completion appends `response_applied`, moves its instruction out
83
+ of `.build-loop/followup/` into `.build-loop/autonomy-dashboard/applied/`, and
84
+ shows the completion summary and evidence in the dashboard.
85
+ - Agents may read saved responses for context. They act only on queued follow-up
86
+ items or a direct user instruction.
87
+
88
+ ## Agent consumption
89
+
90
+ 1. Run `python3 scripts/autonomy_dashboard.py --workdir "$PWD" --print-state`.
91
+ 2. Treat `responses[*].choice_id` and `note` as owner-authored direction.
92
+ 3. Treat `queued_path` as the execution instruction and re-check its premise
93
+ against the live repo before changing code.
94
+ 4. Route the follow-up through normal autonomy, validation, and production gates.
95
+ 5. After validation succeeds, close the queue item and publish evidence:
96
+
97
+ ```bash
98
+ python3 scripts/autonomy_dashboard.py --workdir "$PWD" \
99
+ --complete "<dashboard_gap_id>" \
100
+ --summary "<what changed>" \
101
+ --evidence "commit:<sha>; tests:<result>; audit:<verdict>"
102
+ ```
103
+
104
+ `Queued` means a current or future Build Loop run can execute the instruction;
105
+ the dashboard does not run a hidden worker. `Applied` means Build Loop validated
106
+ the result and removed the item from the executable queue.
107
+
108
+ ## Policy ownership
109
+
110
+ The dashboard explains and records choices. `scripts/autonomy_supervisor.py`
111
+ owns execution policy: missing-information routing, task-shape learning, bounded
112
+ queue manifests, discovered-issue classification, convergence enforcement, and
113
+ live provider/host/cost backpressure. Queue sizing and fan-out are adaptive;
114
+ 150 is an absolute ceiling, not a target. The third repeated unresolved verdict
115
+ requires independent audit and the fifth quarantines the item.
@@ -24,6 +24,7 @@ Phase 1 runs `node ${CLAUDE_PLUGIN_ROOT}/skills/build-loop/detect-plugins.mjs` a
24
24
  | Intent capability pack | Phases 1-4 | Read `references/intent-capability-pack.md`; write `.build-loop/intent.md`; pass the intent packet to every subagent |
25
25
  | Modular systems pack | Phases 1-4 | Read `references/modular-systems-pack.md`; partition files/tasks MECE; prefer modular scalable boundaries unless an exception is documented |
26
26
  | Codex subagent adapter | Phase 3 (Execute, Codex only) | Read `references/codex-subagents.md`; use `templates/codex-worker-prompt.md` for authorized Codex workers |
27
+ | `build-loop:data-plane-worktrees` | Phase 1 Assess through terminal closeout when a worktree touches mutable non-Git state | Inventory surfaces inline, keep writable paths under `.build-loop/data/<run-id>/`, namespace external resources by run id, and serialize any unavoidable shared writer |
27
28
 
28
29
  ### Spec/Plan author router (intent-driven, ordered)
29
30
 
@@ -100,13 +101,13 @@ The order is the contract: row 1 short-circuits before any author runs; row 2 is
100
101
  | Recent design structures | `design-contract-specialist` reads `references/recent-design-structures.md` and selects by product/workflow/data fit | explicit design-tool artifacts passed as evidence | `fallbacks.md#web-ui` |
101
102
  | Screenshot / visual evidence | `showcase:capture`, `showcase:record` | `screenshot` MCP tool | `fallbacks.md#screenshot` |
102
103
  | Web content fetching (low LLM) | `scraper-app:web-scraper` SDK | — | `fallbacks.md#web-fetch` (flags LLM cost in report) |
103
- | Deep debugging | `build-loop:debug-loop` + `build-loop:debugging-memory` native search/store | standalone Coding Debugger only when explicitly installed for cross-project memory | `fallbacks.md#debug` |
104
+ | Deep debugging | `build-loop:debug-loop` + bundled `build-loop:debugging-memory` native search/store | | `fallbacks.md#debug` |
104
105
  | Bug-pattern memory | `build-loop:debugging-memory` | — | `fallbacks.md#bug-memory` (greps `.build-loop/issues/` + `.bookmark/`) |
105
106
  | Agent authoring | `agent-builder:agent-builder-anthropic` | `plugin-dev:agent-development` (if plugin work) | `fallbacks.md#agent-authoring` |
106
107
  | DeepAgents / local-LLM agent work | `build-loop:building-with-deepagents` (SubAgent API, middleware stack, per-agent tool scoping, anti-patterns) | — | Read installed `deepagents` source: `python3 -c 'import deepagents, os; print(os.path.dirname(deepagents.__file__))'` then `graph.py` + `middleware/subagents.py` |
107
108
  | Structured reports / handoffs | `pyramid-principle:pyramid-short-form` (Review-F reports), `pyramid-long-form` (design docs) | — | `fallbacks.md#structured-writing` (SCQA + MECE skeleton) |
108
109
  | Hosted-IDE migration (Replit / Lovable / Bolt / v0) | `replit-migrate:migration-scan`, `migrate-web`, `migrate-ios`; MCP tools `migrate_scan`, `migrate_plan_web`, `migrate_plan_native`, `migrate_map_apis`, `migrate_map_models`, `migrate_check_progress` | — | `fallbacks.md#migration` (manual inventory + stack-translation) |
109
- | Prompt authoring / review / audit (system prompts, agent prompts, eval judges) | `prompt-builder:prompt-builder` skill; slash commands `/prompt-builder:optimize`, `/score`, `/compare`, `/save`, `/list`. Calibrates to model tier (T1/T2/T3) and deployment (interactive, backend, rag_pipeline, agent, plugin, eval_judge, personal_mobile). Returns 6-Part-Stack prompt + 5-dim score + diagnosis + `[ASSUMED:]` tags + `TEMPERATURE_HINT` | `prompt-builder` (personal skill, same name, loaded via Skill tool) | `fallbacks.md#prompt` |
110
+ | Prompt authoring / review / audit (system prompts, agent prompts, eval judges) | `prompt-builder:prompt-builder` skill; slash commands `/prompt-builder:optimize`, `/score`, `/compare`, `/save`, `/list`. Calibrates to prompt-builder's own 3-level scheme (frontier/mid/small — its labels, not taxonomy rungs) and deployment (interactive, backend, rag_pipeline, agent, plugin, eval_judge, personal_mobile). Returns 6-Part-Stack prompt + 5-dim score + diagnosis + `[ASSUMED:]` tags + `TEMPERATURE_HINT` | `prompt-builder` (personal skill, same name, loaded via Skill tool) | `fallbacks.md#prompt` |
110
111
  | iOS / watchOS / macOS dev + deploy | `apple-dev` personal skill (via `Skill("apple-dev")`) | `replit-migrate:migrate-ios` (when migrating *to* native) | `fallbacks.md#apple-dev` |
111
112
  | Web deploy verification (Vercel) | Vercel MCP (`mcp.vercel.com` remote OAuth, only if user adds it to `.mcp.json`) | Vercel CLI via `scripts/verify_deploy.py` | `fallbacks.md#web-deploy-verify` |
112
113
  | Strategic frame / PRD grounding (Assess + Review) | `build-loop:prd-bridge` — reads `docs/prd-*.md` frontmatter (`core_principles`, `load_when`) + Navigation Map + Section Index in Phase 1; verifies diff doesn't violate principles in Phase 5 Fact-Check; recommends `prd-builder` skill if no PRD exists. Falls back to grep on principle keywords if frontmatter parser unavailable. | `prd-builder` skill direct invocation | Phase 1 captures north-star + intent fresh into `intent.md` (existing fallback) |
@@ -138,6 +139,27 @@ Tie-breaker: if signals are mixed (an Apple project with both `ios/` and a macOS
138
139
 
139
140
  Some capabilities should fire proactively based on goal phrasing or files touched. Phase 1 ASSESS sets these flags in `.build-loop/state.json.triggers`, and Phase 4 EXECUTE consults them before dispatching each subagent.
140
141
 
142
+ **data-plane-worktrees** (mutable non-Git state isolation)
143
+
144
+ Fires when a Build Loop worktree can read or write state that Git does not
145
+ isolate.
146
+
147
+ Trigger if any of:
148
+
149
+ - Goal mentions SQLite, PostgreSQL/Postgres, database/schema migration,
150
+ generated/search/vector index, Docker/Compose volume or project, mutable file
151
+ store, cache with canonical writes, bucket, queue, or external namespace.
152
+ - Changed code opens `*.sqlite`, `*.sqlite3`, or `*.db`; connects to PostgreSQL;
153
+ runs migrations; builds an index; or provisions a persistent service.
154
+ - Repo signals include migration directories, Compose volume definitions,
155
+ file-backed stores, or generated indexes shared across worktrees.
156
+
157
+ Action: set `state.json.triggers.dataPlaneWorktree: true`, load
158
+ `Skill("build-loop:data-plane-worktrees")` before Phase 2, inventory every data
159
+ surface in the run manifest, and require `validate` before the first write plus
160
+ `terminal` before closeout. A baseline empty manifest is not evidence that no
161
+ data surface exists; Assess must make that determination from the goal and repo.
162
+
141
163
  **pyramid-principle** (structured writing)
142
164
 
143
165
  Fires whenever the build produces user-visible prose or professional writing. Even small text should follow pyramid structure, and the logical ordering principle applies to design flow too.
@@ -119,12 +119,28 @@ adapter in the boundary manifest.
119
119
 
120
120
  ## Discovery integration (current)
121
121
 
122
- Build-loop uses `scripts/rally_point/discovery_bridge.py` as the shared
123
- channel resolver. It prefers the standalone `agent-rally-point` discovery
124
- surface when installed and falls back to build-loop's embedded resolver only
125
- when needed. Both native discovery and the embedded fallback default to
126
- `~/.agent-rally-point/apps/...`; the fallback uses the local worktree-aware
127
- `<slug>` when no native `<repo-id>` is available.
122
+ Build Loop uses `scripts/rally_point/discovery_bridge.py` as the single backend
123
+ resolver. The contract has two writable backends:
124
+
125
+ 1. `backend=rally`, `transport=rally-cli`: an explicit binary override or the
126
+ standalone `rally` on `PATH` wins. Build Loop requires valid `version`,
127
+ `whoami`, and read-only `status read` envelopes before treating the room as
128
+ operational. All event writes go through `rally say`; Build Loop must never
129
+ create a private `changes.jsonl` inside `.rally`.
130
+ 2. `backend=build-loop-local`, `transport=fact-v1`: when Rally is absent or its
131
+ room is unhealthy, Build Loop writes its shared fallback spool. Only Build
132
+ Loop readers consume this backend; `codex`, `claude_code`, and `cursor` are
133
+ host identities within Build Loop, not independent fallback participants.
134
+
135
+ The fetched Build Loop binary is a compatibility fallback after standalone
136
+ Rally, not a version authority that may shadow it. When Rally becomes
137
+ operational, `maybe_auto_migrate()` replays fact-v1 rows idempotently and stores
138
+ a digest watermark only after Rally returns a complete migration receipt.
139
+
140
+ `.build-loop/agent-ledger.jsonl` remains the local authority for judgment gates.
141
+ Each successful canonical append also projects the exact row through the same
142
+ backend adapter. Projection failure is reported but never changes the local
143
+ append result.
128
144
 
129
145
  The discovery layer (see
130
146
  [`agent-rally-point/docs/DISCOVERY.md`](https://github.com/tyroneross/agent-rally-point/blob/main/docs/DISCOVERY.md))
@@ -146,6 +162,8 @@ Current build-loop callers route through the bridge:
146
162
  use the resolved channel for session-start and pre-edit hook behavior.
147
163
  4. `scripts/coordination_watch.py` remains a compatibility wrapper; watcher
148
164
  behavior lives under `scripts/agent_rally_watcher/`.
165
+ 5. `scripts/agent_ledger.py` preserves the local gate input and projects each
166
+ canonical row through `rally_point.post.post(...)`.
149
167
 
150
168
  ## Cross-references
151
169
 
@@ -33,6 +33,11 @@ certainty, "not computed — why").
33
33
  - Backtest: data + window = <...> · in/out-of-sample split = <...>
34
34
  - Ablation: component removed = <...> · baseline = <...>
35
35
  - **Held constant (confounds managed):** <model, environment, inputs, seed, …>
36
+ - **Model/thinking identity** (required for model or agent comparisons):
37
+ - `<arm>`: model `<provider/model/version>` · normalized level `<none|minimal|low|medium|high|xhigh|max|ultra|unknown>` · provider value `<exact label|null>` · mode `<single_agent|multi_agent|adaptive|unknown>`
38
+ - Provenance: `<source_document|experiment_config|runtime_log|unknown>` · evidence `<URL + table/footnote OR exact command/config/log>`
39
+ - Evidence kind: `<published_document|local_test>` · observed at `<ISO-8601>`
40
+ - Mixed/unknown effort confound: `<none | explain why ranking is directional>`
36
41
  - **Measurement:** <who/what scored, against what ground truth, and exactly how>
37
42
  - Blinding: <none | labels withheld | fully blinded> — <if you claim blinded, say what made it so; if a tell leaked, say so>
38
43
 
@@ -51,9 +56,9 @@ certainty, "not computed — why").
51
56
  | <cost> | effort/latency/$ | lower better (only counts when quality ties or wins) | <calls · s · $> |
52
57
 
53
58
  **Data:**
54
- | <arm / run / config> | <m1> | <m2> | <cost> |
55
- |---|---|---|---|
56
- | <...> | | | |
59
+ | <arm / run> | Model ID | Thinking level / mode | Thinking provenance | <m1> | <m2> | <cost> |
60
+ |---|---|---|---|---|---|---|
61
+ | <...> | <provider/model/version> | <high / single_agent> | <runtime_log: path#line> | | | |
57
62
 
58
63
  **Statistics — fill what you actually computed; for the rest write "not computed — <why>":**
59
64
  - **Effect size:** <metric: value (e.g. Δ, Cohen's d, lift %)> | not computed — <why>
@@ -99,3 +104,10 @@ certainty, "not computed — why").
99
104
  inconclusive", how sure, and on how much data, from the first line.
100
105
  6. **Pre-register when the result will drive a real decision** — commit Objective +
101
106
  Hypothesis + decision rule before running, so the verdict can't be retrofit.
107
+ 7. **Thinking level is part of the treatment.** Never collapse scores by model name when
108
+ effort or mode differs. Preserve the source's exact label and a normalized level. For
109
+ published rows, cite the page/table/footnote; for our tests, cite the effective runtime
110
+ config or log. If the value is not reported, write `unknown` and name the confound.
111
+ Model bake-offs carry these fields in each arm of the existing `abc-comparison/v2`
112
+ observation artifact. Preserve that raw artifact: Benchmark Lab retention is a pending
113
+ Lab-owned extension, and current ingest acceptance does not prove the fields survived.
@@ -54,7 +54,7 @@ State the posture you're operating under when it materially shapes the turn ("op
54
54
  ## Parallel-work doctrine (decentralized execution)
55
55
 
56
56
  - Decompose into **MECE** chunks (disjoint file ownership) so workers don't collide; the orchestrator owns git (single-writer) and workers never commit.
57
- - Fan-out width follows `scripts/parallelism.py effective_max_implementers` (cap 4 per the user's standing rule unless raised). Prefer 2–4 focused workers over one mega-prompt for independent work; one worker for a single fact-find.
57
+ - Fan-out width follows the autonomy supervisor's adaptive admission envelope. Start at no more than four, then recover one worker after stable telemetry windows; reduce or pause on provider, host, cost, thermal, latency, or failure pressure. The absolute ceiling is 150, while independent MECE work and all lower resource caps remain binding. Use one worker for a single fact-find.
58
58
  - **Risky-but-reversible parallel work → isolated worktrees, merge back.** Two writers on one worktree race on HEAD/index — isolate, then collapse to main at close (Phase D / `collapse_run.py`).
59
59
  - Workers return condensed structured results; the orchestrator (Thinking tier) synthesizes and verifies — cheaper-tier output is never trusted unchecked.
60
60
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## Memory — Global and Project-Scoped
8
8
 
9
- Build-loop maintains one canonical long-term memory store at `~/dev/git-folder/build-loop-memory/`. Every build reads canonical indexes/folders; writes go to exactly one lane based on scope.
9
+ Build-loop maintains one canonical long-term memory store at the memory store root (resolved by `scripts/_paths.py:memory_store_root()`). Every build reads canonical indexes/folders; writes go to exactly one lane based on scope.
10
10
 
11
11
  ### Recall-optimized memory discipline
12
12
 
@@ -50,7 +50,7 @@ Three work/knowledge artifact types, each with a clear WRITE → READ → TRACK
50
50
  | Artifact | Write (where) | Read / Track | Lifetime |
51
51
  |---|---|---|---|
52
52
  | **issues** | `<repo>/.build-loop/issues/<id>.md` — current-run bugs | Phase 5 Iterate drains them; repo-local so inherently scoped | short-lived (resolve → delete) |
53
- | **backlog** | durable: `build-loop-memory/projects/<slug>/backlog.md` (slug folder = repo scope); active: `<repo>/.build-loop/backlog/<id>.md` | read before planning self-work; Phase 5 drains active items | long-lived |
53
+ | **backlog** | canonical: `<repo>/.build-loop/backlog/items/<ID>.md`; mirror: `build-loop-memory/projects/<slug>/backlog/<ID>.md` | classed deferred work; planned items require promotion, initiatives require approval/isolation, decisions surface by workstream | long-lived |
54
54
  | **backlog-archive** | `build-loop-memory/projects/<slug>/backlog-archive.md` | closed/moved/superseded items land here **with rationale + ref** — never deleted silently | durable |
55
55
  | **lessons** | `projects/<slug>/lessons/` (project) OR top-level `lessons/` (cross-project, stored `_unscoped`) — via `memory_writer.py` | `context_bootstrap` recall scopes to `(slug OR _unscoped)` — never other projects | durable |
56
56
 
@@ -250,6 +250,17 @@ Run once after this version of build-loop is installed; the migration completes
250
250
  - `memory_index.py append` — `fcntl.flock(LOCK_EX)` on `INDEX.jsonl.lock`; multi-writer safe across hosts.
251
251
  - `memory_update_ledger.py append` — `fcntl.flock(LOCK_EX)` on `updates.jsonl.lock`; append-only and multi-writer safe.
252
252
 
253
+ ### Peer-held store — queue, never silent-skip (`promotion_queue.py`)
254
+
255
+ When the canonical store is busy / peer-held, a durable write MUST enqueue, not skip. Observed 2026-07-11: three retrospectives skipped durable promotion because a peer held the store (agents pointed `--memory-root` at a scratch path) — silent loss. `scripts/promotion_queue.py` is the queue-and-report primitive.
256
+
257
+ - **Busy signal** (`store_busy`): the env `BUILD_LOOP_MEMORY_BUSY` OR a `<memory_root>/.peer-hold` marker.
258
+ - **Producer** — raise the signal around a long store batch so peers queue instead of racing:
259
+ - `with promotion_queue.peer_hold(memory_root): ...` (context manager), or the `hold` / `release` CLI (`python3 scripts/promotion_queue.py --memory-root <root> hold`).
260
+ - `promotion_queue.drain` already wraps its multi-write apply phase in `peer_hold` (fires on every post-push closeout), and `append_milestone.py`'s fcntl lock-timeout is the organic milestone-lane producer.
261
+ - **Queue** lives in the CONSUMER repo (`.build-loop/pending-promotions/queue.jsonl`), never in build-loop-memory, so a held store cannot block enqueue.
262
+ - **Drain** replays queued milestone / lesson / retro-durable records via the existing writers at the next closeout (`python3 -m closeout --source post-push`) or `promotion_queue.py drain`. A record enqueued mid-drain is carried forward (locked re-read), never dropped.
263
+
253
264
  ## Append-only milestones (anti-rewrite-drift)
254
265
 
255
266
  ### The problem this solves
@@ -284,7 +295,7 @@ python3 ${CLAUDE_PLUGIN_ROOT}/scripts/append_milestone.py \
284
295
  --json
285
296
  ```
286
297
 
287
- `--commit` and `--project` override the defaults (git HEAD and slug derived from `--workdir`). `--memory-root` overrides the default `~/dev/git-folder/build-loop-memory`.
298
+ `--commit` and `--project` override the defaults (git HEAD and slug derived from `--workdir`). `--memory-root` overrides the resolved memory store root (see `scripts/_paths.py:memory_store_root()` for the resolution order — env override, else an existing legacy checkout, else the neutral per-user default).
288
299
 
289
300
  Output: `{"appended": true, "path": "...", "line": "..."}` on success; `{"appended": false, "reason": "..."}` on fail-soft (non-git workdir, unwritable root). Exit 0 in both cases.
290
301
 
@@ -31,6 +31,14 @@ When taking an exception, record:
31
31
  MODULARITY EXCEPTION: <why simpler/integrated is better for this use case>
32
32
  ```
33
33
 
34
+ ## Module Shape Is a Cost Lever, Not an Accuracy Gate
35
+
36
+ Module-shape guidance — **narrow public interface + small, well-named internal files + a testable boundary per capability** — is a **cost** lever, not a correctness gate. Apply it proportionally; **never make it build-blocking.**
37
+
38
+ A controlled minimal-pair study (matched repos differing only in cleanliness) measured the payoff of cleaner, better-shaped code as roughly **−34% agent file-revisitation/thrash and −7–8% tokens**, with **~0 change in task pass-rate** (91.3% clean vs 92.1% messy). So better module shape makes an agent navigate a codebase *cheaper*, not *more correct*. The "deep module" tension is also illusory: deep constrains *interface width* (fewer symbols the model must hold in context) while "small files" constrains *token load per read* — orthogonal, and the best-supported synthesis is a deep module implemented across small internal files, which modern sub-agent tooling (external refs + exploration summaries) already delivers without fat single files.
39
+
40
+ Because the win is cost and the accuracy delta is unproven, treat this as guidance the Critic can *surface*, not a gate that can *block*. Do not mandate refactors for module depth; flag avoidable thrash, but ship on correctness. Source: `build-loop-memory/research/2026-07-06-ai-coding-fundamentals-and-harness-claims.md` (Claims 1 & 2).
41
+
34
42
  ## MECE File And Agent Partition
35
43
 
36
44
  Phase 2 Plan must partition work so every changed file has exactly one owner and every required responsibility has an owner.
@@ -47,6 +47,24 @@ The report describes what the change DOES FOR THE USER, not the feature or mecha
47
47
 
48
48
  This is judgment, not a deterministic check: `report_lint.py` does NOT grade outcome framing (a fuzzy "is this outcome-framed?" rule would false-green on disguised mechanism prose and false-block on terse-but-correct outcome reports). The rule is enforced by the Review-G one-pass self-heal — the orchestrator rewrites a mechanism-only lead into an outcome-first one before emitting.
49
49
 
50
+ ### Release notes lead with one useful claim
51
+
52
+ Each release-note item starts with a direct statement: `[Actor] [strong verb] [specific outcome].` The next sentence explains why the outcome matters. Lists, implementation details, and examples then support the claim.
53
+
54
+ - Name the actor. Use `Rally`, `Claude Code`, or `Codex` when that system owns the action.
55
+ - State the result before the mechanism. Tell the reader what now works, what stops failing, or what becomes easier.
56
+ - Treat a list as evidence, not insight. Do not lead with a comma-separated inventory of commands, lifecycle events, files, or checks.
57
+ - Keep examples after the point. Details such as lead changes, claim closure, expired-claim takeover, release, and resolution clarify the rule after the reader knows what the rule achieves.
58
+ - Check each item before publishing: actor + verb + outcome; reason next; supporting detail last.
59
+
60
+ **Weak — the inventory substitutes for the point:**
61
+
62
+ > Lead-seat changes, claim closure, takeover, release, and resolution now enforce authority at the write boundary.
63
+
64
+ **Strong — the statement explains the outcome first:**
65
+
66
+ > Rally enforces ownership at the write boundary so one agent cannot close or transfer another agent's work. This protection covers lead changes, claim closure, expired-claim takeover, release, and resolution.
67
+
50
68
  ### Good — outcome-framed (the user-approved target style)
51
69
 
52
70
  ```
@@ -77,6 +95,27 @@ filter; outages persist to model-availability.json with a TTL.
77
95
 
78
96
  Why this is bad: it is the exact same change, but described as the feature/implementation. The reader learns what files exist, not that their runs stop stalling during an outage or that quality holds on the backup. It leads with the mechanism (`dispatch_fallback.py`, `canonical-id normalization`, `host-provider filter`, `model-availability.json`, `TTL`) and never states the user outcome. The fix is the rewrite above: keep this detail, but move it below an outcome-first lead.
79
97
 
98
+ ## Governing rule: direct language. Clear verb, clear outcome.
99
+
100
+ Every sentence names who did what, and what resulted. If a reader cannot extract the verb and
101
+ the outcome in one pass, rewrite it.
102
+
103
+ These are now ENFORCED by `scripts/report_lint.py`, not merely taught (the doctrine below existed
104
+ and was routinely ignored, which is why it is linted now):
105
+
106
+ | Rule | Fires on | Fix |
107
+ |---|---|---|
108
+ | `weak-verb` | nominalizations that hide the action: `was responsible for`, `performed an analysis of`, `made a decision`, `in order to` | use the strong verb: `caused`, `analyzed`, `decided`, `to` |
109
+ | `filler-opener` | `Now,` `Basically,` `It's worth noting` `Let me` `I'll now` | delete it and start with the action |
110
+ | `hedge` | `I think`, `perhaps`, `somewhat`, `arguably` | state it, or mark confidence (✅ / ⚠️ / ❓). A line already carrying a status marker is calibrated and exempt. |
111
+
112
+ Calibrated uncertainty is required and is never a "hedge" finding: `❓ uncertain` is honest,
113
+ `I think` is padding.
114
+
115
+ **Em dashes (guidance, not linted):** prefer periods, colons, and commas. An occasional em dash
116
+ is fine; leaning on them reads as rushed. This is a taste call, so it stays guidance — a lint that
117
+ fired on every dash would be noise you learn to ignore.
118
+
80
119
  ## Precision and Brevity — sentence architecture
81
120
 
82
121
  Clear, concise statements depend less on better words and more on sentence architecture. Strongest pattern: concrete noun + strong verb + specific object/outcome + cause/evidence when needed.
@@ -220,3 +259,50 @@ The lint targets ONLY the final user-facing report markdown + phase status lines
220
259
  - Findings are WARN (advisory): the orchestrator self-heals by revising the draft once, then emits it
221
260
  - Never hard-blocks a run — worst case is one revision pass
222
261
  - The structural lint (`scripts/build_report_lint.py`) keeps running in parallel; it is orthogonal (parallel_batch / merge_plan / evidence triplet shape)
262
+
263
+ ## Evidence class on every claim (added 2026-07-25)
264
+
265
+ A claim about **why** or **whether** something works must say how it was checked.
266
+ Tag it, or name the observation on the same line.
267
+
268
+ | Class | Means | Example |
269
+ |---|---|---|
270
+ | `[measured]` | You measured the thing itself | `select max(created_at) from entities` returned a timestamp |
271
+ | `[correlated]` | You measured something related; state the gap | its metric stopped appearing, so the process *may* be stopped |
272
+ | `[reasoned]` | Inferred from code, absence, or an aggregate | grep found no callers |
273
+
274
+ **The gate: a delete, deploy, or restart may only be justified by `[measured]`.**
275
+ `[correlated]` and `[reasoned]` are fine in a report; they are not sufficient to
276
+ act irreversibly.
277
+
278
+ `scripts/report_lint.py` enforces the labelling half at Phase 4G
279
+ (`mechanism-claim-unobserved`, WARN). The action gate is a human/orchestrator
280
+ discipline: check the class before acting, not after.
281
+
282
+ ### Why this exists
283
+
284
+ On 2026-07-25 six claims were wrong the same way. Each measured something true
285
+ one step from what it asserted, then reported the inference at the confidence of
286
+ the measurement:
287
+
288
+ | Claimed | Actually measured |
289
+ |---|---|
290
+ | "the worker died" | its metric stopped appearing (it was Online, wedged on 5 stuck jobs) |
291
+ | "source maps never uploaded" | the auth token was empty |
292
+ | "persistence works" | ONE article served from store (5.2% of 11,581 rows do) |
293
+ | "Summary V2 is live" | the code was committed (6 of 11,603 rows carry it) |
294
+ | "13 routes safe to delete" | a grep returned nothing (3 had live callers) |
295
+ | "the KG kept growing" | row counts since April (13 days of zero were inside) |
296
+
297
+ Two of those reached the user as status. One would have deleted a route that a
298
+ passing 149-line test imports. The restart recommendation was correct by
299
+ accident: it freed the slots, but without a per-job deadline the same wedge
300
+ recurs on the next slow host.
301
+
302
+ **The tell is grammatical.** "Died", "never uploaded", "works", "safe to delete"
303
+ are mechanisms. "Stopped appearing", "returns zero rows", "is empty" are
304
+ observations. A mechanism verb with no matching observation is the flag.
305
+
306
+ Agreement between reviewers does not substitute. Where two agents disagreed the
307
+ conflict surfaced and was settled; where several shared the same proxy, nothing
308
+ caught it.