@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
package/README.md CHANGED
@@ -38,14 +38,16 @@ For the **living, auto-generated diagram** of how the loop actually wires up in
38
38
 
39
39
  ## Quick start
40
40
 
41
- Install for all three host surfaces on macOS:
41
+ Install the plugin from the marketplace. In Claude Code:
42
42
 
43
- ```bash
44
- npm install -g @tyroneross/build-loop@0.36.0
45
- build-loop-install --host all
43
+ ```text
44
+ /plugin marketplace add tyroneross/build-loop
45
+ /plugin install build-loop@build-loop
46
46
  ```
47
47
 
48
- Then, in a Claude Code session inside your project, hand the loop a task:
48
+ In Codex, add the same git marketplace with `/plugin marketplace add` and install `build-loop`. Then **restart the host** so it loads the plugin.
49
+
50
+ build-loop has **no runtime CLI** — the loop runs *inside* your agent host. The plugin ships the skills, agents, and hooks it drives; there is no `build-loop` binary to run. After restart, in a session inside your project, hand the loop a task:
49
51
 
50
52
  ```text
51
53
  /build-loop:run add billing settings with tests
@@ -55,23 +57,41 @@ What you observe: the agent prints a short status line per phase (`[Phase 1: Ass
55
57
 
56
58
  You do not pick a mode. `/build-loop:run` auto-routes build, fix, refactor, optimize, research, and test requests to the right path.
57
59
 
60
+ ### Groundwork exchange
61
+
62
+ When a project contains `.designdoc/build-request.json` (or sets `GROUNDWORK_BUILD_REQUEST`), Build Loop validates that request against its adjacent canonical `spec.json` before planning. It preserves Groundwork's ordered tasks, dependency graph, acceptance criteria, and external manual actions as the build boundary.
63
+
64
+ After implementation and verification, Review-G writes `.designdoc/implementation-map.json`. The map binds each reported task, component, contract, or requirement and its repository-local evidence to the original request, Spec, and task digests. Build Loop reports implementation evidence; Groundwork remains the authority for desired state and calculates convergence.
65
+
66
+ The exchange adapter ships with identical bytes for Claude Code and Codex at `scripts/groundwork_exchange.py`. Run `python3 scripts/groundwork_exchange.py --help` for the validation and emission commands.
67
+
58
68
  ## Install
59
69
 
60
- `build-loop-install` runs the package's helpers from the installed npm package:
70
+ The plugin installs and updates through the host's **native marketplace** no npm step, no global install, no `sudo`:
71
+
72
+ ```text
73
+ /plugin marketplace add tyroneross/build-loop # Claude Code or Codex
74
+ /plugin install build-loop@build-loop
75
+ ```
76
+
77
+ The host owns install, versioning, and `/plugin update`. Restart the host to load a freshly installed or updated plugin. On first session build-loop seeds a memory scaffold at `~/.build-loop-memory` (constitution, MEMORY.md, indexes).
61
78
 
62
- - Syncs the Claude Code cache from the package root.
63
- - Syncs the Codex cache from `plugin-artifacts/codex`, the slim Codex install artifact.
64
- - Bootstraps the build-loop memory root with public templates.
65
- - Leaves publishing, GitHub releases, and production deploys to explicit release commands.
79
+ <details>
80
+ <summary>Alternative: npm installer (exact-pin / offline / pre-marketplace hosts)</summary>
66
81
 
67
- For GitHub Packages, authenticate first and point the `@tyroneross` scope at the GitHub registry:
82
+ The legacy `build-loop-install` binary syncs the same files into the host caches manually. Prefer the marketplace above; use this only to pin an exact version or on a host without marketplace support.
68
83
 
84
+ <!-- x-release-please-start-version -->
69
85
  ```bash
70
- npm config set @tyroneross:registry https://npm.pkg.github.com
71
- npm login --scope=@tyroneross --registry=https://npm.pkg.github.com
72
- npm install -g @tyroneross/build-loop@0.36.0
86
+ npm install -g @tyroneross/build-loop@0.43.0
73
87
  build-loop-install --host all
74
88
  ```
89
+ <!-- x-release-please-end -->
90
+
91
+ Global install needs a writable npm prefix. If `npm -g` fails with `EACCES` (Node from the official `.pkg` installer targets root-owned `/usr/local`), avoid the global install entirely with `npx @tyroneross/build-loop build-loop-install --host all`, or set a user prefix: `npm config set prefix ~/.local`.
92
+
93
+ GitHub Packages is for private/pinned builds only — not needed for the public install. To use it: `npm config set @tyroneross:registry https://npm.pkg.github.com` then `npm login --scope=@tyroneross --registry=https://npm.pkg.github.com`.
94
+ </details>
75
95
 
76
96
  Installer options:
77
97
 
@@ -86,6 +106,37 @@ Installer options:
86
106
  | `--dry-run` | Show cache sync actions without writing. |
87
107
  | `--json` | Emit one machine-readable result. |
88
108
 
109
+ ### Confirm it loaded
110
+
111
+ The plugin has no runtime CLI, so a successful install is not visible from the shell.
112
+ Check inside the host instead. After restarting it, run:
113
+
114
+ ```text
115
+ /build-loop:run what version of build-loop is loaded and where did it load from
116
+ ```
117
+
118
+ A working install answers with a version and a plugin path. If the command is not
119
+ offered at all, the host did not load the plugin — restart it once more, then check
120
+ that `/plugin` lists `build-loop` as installed and enabled.
121
+
122
+ ### Uninstall
123
+
124
+ ```text
125
+ /plugin uninstall build-loop@build-loop # Claude Code or Codex
126
+ ```
127
+
128
+ Your memory store is deliberately left behind: it lives outside the plugin at
129
+ `~/.build-loop-memory` (or wherever `BUILD_LOOP_MEMORY_ROOT` points), so
130
+ reinstalling keeps every decision, lesson, and retrospective. Delete that directory
131
+ yourself if you want the history gone. Per-project run state lives in each repo's
132
+ gitignored `.build-loop/` and can be removed with the project.
133
+
134
+ If you used the npm installer, also remove the global package:
135
+
136
+ ```bash
137
+ npm uninstall -g @tyroneross/build-loop
138
+ ```
139
+
89
140
  Local development install:
90
141
 
91
142
  ```bash
@@ -100,7 +151,7 @@ python3 scripts/install_memory.py --ensure-project build-loop
100
151
 
101
152
  ## Commands
102
153
 
103
- `/build-loop:run` is the only command. Describe the task in plain language — build, fix, refactor, optimize, research, debug, test, root-cause, retrospective, or plan — and the orchestrator classifies intent and routes to the right internal mode. You never pick a mode or a flag.
154
+ `/build-loop:run` is the command you will use. Describe the task in plain language — build, fix, refactor, optimize, research, debug, test, root-cause, retrospective, or plan — and the orchestrator classifies intent and routes to the right internal mode. You never pick a mode or a flag.
104
155
 
105
156
  ```text
106
157
  /build-loop:run add billing settings with tests
@@ -108,28 +159,34 @@ python3 scripts/install_memory.py --ensure-project build-loop
108
159
  /build-loop:run reduce API latency # routes to the optimize loop
109
160
  /build-loop:run compare queue providers # routes to research (no commits)
110
161
  /build-loop:run self-improve against recent runs # runs Phase 6 Learn alone
162
+ /build-loop:feedback the plan step skipped my constraint # files a GitHub issue on build-loop
111
163
  ```
112
164
 
113
165
  Debugging is also auto-invoked by the loop itself on a review failure. The former mode and utility commands (`debug`, `research-run`, `test`, `self-improve`, `debugger*`, `assess`) are now internal, reached by intent rather than as separate commands.
114
166
 
167
+ Build Loop includes the Coding Debugger core natively. The loop searches before investigation and stores verified fixes afterward through `bin/build-loop-debugger.js`; both operations use the existing project-local `.claude/memory/` structured store. The standalone debugger package and MCP server are not required.
168
+
115
169
  ## Host surfaces
116
170
 
117
171
  The repo ships three agent surfaces from one source:
118
172
 
119
173
  - **Claude Code plugin**: plugin metadata, commands, hooks, and `agents/*.md`.
120
- - **Codex plugin**: Codex metadata plus a slim public skill entrypoint (`plugin-artifacts/codex/`).
174
+ - **Codex plugin**: Codex metadata plus a slim public skill entrypoint (`codex-skills/build-loop/SKILL.md`), installed from the repository root.
121
175
  - **Host-neutral [`AGENTS.md`](AGENTS.md)**: the same loop methodology for any AGENTS.md-aware tool (Copilot, Cursor, and others), with no Claude-specific integration required.
122
176
 
123
- Surface counts in this release: one command (`/build-loop:run`), 44 skills, 28 agents.
177
+ Surface counts in this release: two commands (`/build-loop:run` and `/build-loop:feedback`), 55 skills, 29 agents. Every skill, what it is for, and how an agent reaches it is listed in [`docs/SKILL-INDEX.md`](docs/SKILL-INDEX.md) — generated from the skills' own frontmatter, so it cannot drift from what ships. `scripts/test_readme_surface_claims.py` holds the counts on this line to the same source.
124
178
 
125
179
  ## Agent start protocol
126
180
 
127
181
  Start every build-loop repo session by checking Rally for coordination state: peers, claims, handoffs, and soft file conflicts. Rally verifies nothing on its own, so confirm code, package, version, and release truth from git, tests, manifests, registries, or GitHub directly.
128
182
 
129
183
  ```bash
130
- rally enter --tool claude_code --json
131
- rally next --tool claude_code --json
132
- rally check before-write --tool claude_code --path README.md --strict --json
184
+ BASE_TOOL="${BUILD_LOOP_RALLY_TOOL:-claude_code}" # choose this host family
185
+ RALLY_SESSION_ID="$(python3 scripts/rally_point/actor_identity.py --tool "$BASE_TOOL" --field session-id)"
186
+ RALLY_TOOL="$(python3 scripts/rally_point/actor_identity.py --tool "$BASE_TOOL" --session-id "$RALLY_SESSION_ID")"
187
+ rally enter --tool "$RALLY_TOOL" --session-id "$RALLY_SESSION_ID" --json
188
+ rally next --tool "$RALLY_TOOL" --json
189
+ rally check before-write --tool "$RALLY_TOOL" --path README.md --strict --json
133
190
  ```
134
191
 
135
192
  If the Rally binary is not installed, proceed without it. Full coordination rules: [`references/coordination-rules.md`](references/coordination-rules.md).
@@ -156,7 +213,9 @@ These tables index agent roles. None of them are commands you run directly. Core
156
213
 
157
214
  Each agent declares a `(segment, tier)` role that resolves to a concrete model at dispatch. Selection runs on two axes: a work-role **segment** (Generative Reasoning, Agentic Execution, Representation/Retrieval, Governance/Evaluation, plus dormant Realtime, Perception, and Generative Media lanes) and a seven-rung **capability tier** ladder (T0 through T5, plus T-S for specialist infrastructure). Both axes are encoded as data in [`references/model-taxonomy.json`](references/model-taxonomy.json), the **index** that is the durable source of truth. The `(segment, tier)` role is the KEY into that index; an agent's `model:` frontmatter is the index-DERIVED recommended fallback for the active host, kept in sync by [`scripts/sync_agent_model_defaults.py`](scripts/sync_agent_model_defaults.py) (never hand-edited). At dispatch the orchestrator resolves the role LIVE through [`scripts/resolve_agent_model.py`](scripts/resolve_agent_model.py) and OVERRIDES the frontmatter, so the running model always reflects the current index + availability. The `Tier` column below shows the legacy token (`Frontier`, `Thinking`, `Code`, `Pattern`), which aliases onto `T1`, `T2`, `T3`, `T4`, and the concrete model is an Anthropic fresh-install default. The index is **user-editable and chat-maintainable**: a new or different-provider model is adopted by classifying it once and reordering the cell, with no agent edits. Then `sync_agent_model_defaults.py --apply` regenerates the recommended `model:` values. Full mapping: [`references/model-tier-mapping.md`](references/model-tier-mapping.md).
158
215
 
159
- Resolution is availability-aware across dispatches: a model observed unavailable at dispatch (a provider outage) is recorded so the role falls back to the next host-reachable model in its tier — a frontier/judgment role degrades at most to the thinking tier, and a model the current host cannot dispatch is never offered. Outage records carry a timestamp and auto-expire after a TTL (`BUILD_LOOP_OUTAGE_TTL_SECONDS`, default 1800s), so a recovered model is picked up again without a manual clear. Recording and clearing run through [`scripts/dispatch_fallback.py`](scripts/dispatch_fallback.py); expiry is pruned on read in [`scripts/model_resolver.py`](scripts/model_resolver.py).
216
+ Resolution is availability-aware across dispatches: a model observed unavailable at dispatch (a provider outage) is recorded so the role falls back to the next host-reachable model in its tier — a frontier/judgment role degrades at most to the thinking tier, and a model the current host cannot dispatch is never offered. Outage records carry a timestamp and auto-expire after a TTL (`BUILD_LOOP_OUTAGE_TTL_SECONDS`, default 1800s), so a recovered model is picked up again without a manual clear. Recording and clearing run through [`scripts/dispatch_fallback.py`](scripts/dispatch_fallback.py); expiry is pruned on read in [`scripts/model_resolver.py`](scripts/model_resolver.py). Resolution is also **host-capability aware**: a local model whose declared `min_ram_gb` exceeds the machine's RAM is folded into the unavailable set, so a 16GB laptop is never routed at a 30B coding model. A host whose RAM cannot be read filters nothing — absence of a reading is not evidence of a small machine.
217
+
218
+ Any host can query the index **without a Python import** via [`scripts/model_index.py`](scripts/model_index.py) — `resolve`, `tiers`, `segments`, `models`, `agent`, and `export {json,env,toml}`. It runs from any working directory, takes `--json` on every subcommand, and stamps each payload with the taxonomy's schema version and content fingerprint so a consumer can detect staleness. `export --format env` emits `BUILDLOOP_MODEL_*` variables for a shell or a non-Claude agent profile. The contract is documented in [`references/model-index-contract.md`](references/model-index-contract.md).
160
219
 
161
220
  ### Lead / workflow agents
162
221
 
@@ -196,6 +255,7 @@ Resolution is availability-aware across dispatches: a model observed unavailable
196
255
  | `ui-validator` | UI behavior, state, accessibility, layout, console, and rendering evidence validation. | Code |
197
256
  | `root-cause-investigator` | Causal-tree investigation for persistent or ambiguous failures. | inherit |
198
257
  | `mock-scanner` | Production-path scan for placeholder, fake, fixture, and mock data. | Pattern |
258
+ | `leak-scanner` | Lifecycle accounting for memory/resource leaks in long-lived code paths (unbounded maps, eviction predicates, spawn-without-reap, retain cycles, uncapped buffers). | Code |
199
259
 
200
260
  ### Learning agents
201
261
 
@@ -220,7 +280,7 @@ It is for developers running AI coding agents on non-trivial changes: features,
220
280
 
221
281
  ### What is the fastest way to try it?
222
282
 
223
- `npm install -g @tyroneross/build-loop@0.36.0`, then `build-loop-install --host all`, then `/build-loop:run <your task>` inside a project. See [Quick start](#quick-start).
283
+ `npm install -g @tyroneross/build-loop@0.43.0`, then `build-loop-install --host all`, then `/build-loop:run <your task>` inside a project. See [Quick start](#quick-start). <!-- x-release-please-version -->
224
284
 
225
285
  ### How is it different from just letting an agent code directly?
226
286
 
@@ -242,7 +302,17 @@ Consumer projects store run state under `.build-loop/`:
242
302
  backlog/
243
303
  ```
244
304
 
245
- Add `.build-loop/` to a consumer project's `.gitignore` unless the repo intentionally tracks selected backlog or plan files.
305
+ Add `.build-loop/` to a consumer project's `.gitignore`. In a **public** repo, treat that as mandatory rather than optional: [`references/public-repository-documentation-boundary.md`](references/public-repository-documentation-boundary.md) §3 names `.build-loop/` working state and deferred-work lists as private, and this repo's own `check_runtime_memory_tracking` hook blocks a commit that tracks them.
306
+
307
+ ### Publishing a repo that build-loop has run in
308
+
309
+ [`scripts/doc_boundary.py`](scripts/doc_boundary.py) grades a documentation tree against that policy and sorts every tracked doc into the policy's own buckets — `public_current`, `private_archived`, `public_removed`, `blocked`:
310
+
311
+ ```bash
312
+ python3 scripts/doc_boundary.py --repo . --json # exit 0 clean, 1 findings, 2 error
313
+ ```
314
+
315
+ It honors the policy's rule that *"naming is evidence, not the decision"*: a `high` verdict needs a path signal **and** a content signal to agree, so a filename alone caps at `needs_review` and never convicts on its own. Only decided findings drive a non-zero exit; `needs_review` is advisory and expects a human read. Private repos are reported but never failed. Before removing anything it flags, archive it first — §4 requires a private-memory receipt, and a removal without one is not a passing review.
246
316
 
247
317
  build-loop memory defaults to `~/.build-loop-memory` on a fresh machine, or an existing `~/dev/git-folder/build-loop-memory` when present. Bootstrap or inspect it:
248
318
 
@@ -253,12 +323,11 @@ python3 scripts/install_memory.py --check
253
323
 
254
324
  ## Codex surface
255
325
 
256
- The Codex package exposes one public entrypoint skill through the slim artifact:
326
+ The Codex package installs from the repository root and exposes one public entrypoint skill:
257
327
 
258
328
  ```text
259
- plugin-artifacts/codex/
260
- .codex-plugin/plugin.json
261
- skills/build-loop/SKILL.md
329
+ .codex-plugin/plugin.json # "skills": "./codex-skills"
330
+ codex-skills/build-loop/SKILL.md
262
331
  ```
263
332
 
264
333
  The full `skills/` tree still ships for Claude Code and for internal references. Codex loads helper instructions only when the public build-loop skill asks for them.
@@ -266,7 +335,7 @@ The full `skills/` tree still ships for Claude Code and for internal references.
266
335
  Check installed cache sync and prune stale versions:
267
336
 
268
337
  ```bash
269
- python3 scripts/check_cache_sync.py --host codex --source plugin-artifacts/codex
338
+ python3 scripts/check_cache_sync.py --host codex --source .
270
339
  python3 scripts/check_cache_sync.py --host claude --source .
271
340
  python3 scripts/prune_plugin_cache.py --source . --host all --apply
272
341
  ```
@@ -281,7 +350,6 @@ For a plugin/package release, keep these version surfaces in lockstep:
281
350
  - `.claude-plugin/marketplace.json`
282
351
  - `.codex-plugin/plugin.json`
283
352
  - `.agents/plugins/marketplace.json`
284
- - `plugin-artifacts/codex/.codex-plugin/plugin.json`
285
353
 
286
354
  Build and verify, then verify the release surface after tag/push:
287
355
 
@@ -289,9 +357,9 @@ Build and verify, then verify the release surface after tag/push:
289
357
  npm run build
290
358
  python3 scripts/test_plugin_manifest.py
291
359
  python3 scripts/test_agent_surface_policy.py
292
- npm run codex:build-artifact
360
+ python3 scripts/reference_pointer_lint.py
293
361
  npm pack --dry-run --json
294
- python3 scripts/verify_release_surface.py --version v0.36.0 --branch main --remote origin --json
362
+ python3 scripts/verify_release_surface.py --version v0.43.0 --branch main --remote origin --json # x-release-please-version
295
363
  ```
296
364
 
297
365
  Publishing to GitHub Packages, npmjs, or GitHub Releases is a release action. Run it only when explicitly requested by the human owner.
package/agents/advisor.md CHANGED
@@ -14,7 +14,7 @@ description: |
14
14
  <example>
15
15
  Context: Phase 2 of a high-stakes build (riskSurfaceChange + synthesisDensity 7). The orchestrator wants the plan authored at Frontier, not inline on Opus.
16
16
  user: "Author the Phase 2 plan for the auth-refactor build at frontier tier"
17
- assistant: "Dispatching the advisor agent. It reads intent.md + goal.md + the architecture baseline, walks the spec-writing checklist, and writes the plan to docs/plans/. plan-critic + scope-auditor then verify it before any implementer runs."
17
+ assistant: "Dispatching the advisor agent. It reads intent.md + goal.md + the architecture baseline, walks the spec-writing checklist, and writes the plan to .build-loop/plans/. plan-critic + scope-auditor then verify it before any implementer runs."
18
18
  </example>
19
19
 
20
20
  <example>
@@ -22,7 +22,7 @@ description: |
22
22
  user: "The plan no longer fits — re-plan chunk 4 with the failure evidence"
23
23
  assistant: "Dispatching the advisor agent in re-plan mode. It reads the failure evidence + the diff vs the current plan, diagnoses planning-miss vs execution-miss, and (on planning-miss) emits corrected instructions: a diff against the prior plan plus the evidence that justifies the change."
24
24
  </example>
25
- model: fable
25
+ model: opus
26
26
  tier: frontier
27
27
  segment: generative_reasoning
28
28
  color: gold
@@ -62,7 +62,7 @@ Load the canonical protocol rather than re-deriving it: **`Skill("build-loop:spe
62
62
  5. **Name the falsifier** for each F-criterion — the concrete check that would prove the criterion failed.
63
63
  6. **Approach lenses** for non-trivial architecture/workflow/interface decisions: clean-sheet best answer, current-constraints answer, and the bridge between them.
64
64
 
65
- Write the plan to `docs/plans/<feature-slug>.md` (or the path the orchestrator names) and/or `.build-loop/` artifacts. **You write only plan artifacts** — your `Write` access is scoped to `docs/plans/**` and `.build-loop/**`; you do not touch source files (that is the implementer's job, verified separately).
65
+ Write the plan to `.build-loop/plans/<feature-slug>.md` (or the path the orchestrator names). **You write only plan artifacts** — your `Write` access is scoped to `.build-loop/**`; you do not touch source files (that is the implementer's job, verified separately), and you never write a plan into `docs/`.
66
66
 
67
67
  ## Re-planning on a planning miss (the remediation contract)
68
68
 
@@ -102,7 +102,7 @@ Return a condensed envelope to the orchestrator:
102
102
 
103
103
  ```
104
104
  mode: author | re-plan
105
- plan_path: docs/plans/<slug>.md
105
+ plan_path: .build-loop/plans/<slug>.md
106
106
  diagnosis: planning-miss | execution-miss | n/a # re-plan mode only
107
107
  instructions_diff: <summary of the plan delta> # re-plan mode only
108
108
  trigger: <objective verifier signal that summoned/advanced you>
@@ -43,8 +43,8 @@ Read the spec FIRST, then the item. Same anti-position-bias rationale as indepen
43
43
 
44
44
  1. `Read(workdir + "/.build-loop/intent.md")` — north star, update intent, user value, **non-goals**.
45
45
  2. `Read(workdir + "/.build-loop/goal.md")` — the current goal text.
46
- 3. `Read("~/dev/git-folder/build-loop-memory/constitution.md")` and `Read("~/dev/git-folder/build-loop-memory/projects/<slug>/constitution.md")` — global/project rules (must-not-violate). Phase 1 already eager-loaded; you re-read for current state.
47
- 3a. `Read("~/dev/git-folder/build-loop-memory/projects/<slug>/charter.md")` (or the repo mirror `.build-loop/charter.md`) — OPTIONAL (absent for low-stakes projects). Read its **Posture → priority_order** when present: the ranked tie-breaker (security/reliability/speed/cost/simplicity/polish + notes).
46
+ 3. Recall the global and project constitution from the memory store root (`scripts/memory_facade.py recall()`, or `_paths.memory_store_root()` for direct file paths) — `constitution.md` and `projects/<slug>/constitution.md` — global/project rules (must-not-violate). Any missing artifact is `(none found)` — not an error; state explicitly which ones were missing. Phase 1 already eager-loaded; you re-read for current state.
47
+ 3a. `Read("<memory-store-root>/projects/<slug>/charter.md")` (or the repo mirror `.build-loop/charter.md`) — OPTIONAL (absent for low-stakes projects). Read its **Posture → priority_order** when present: the ranked tie-breaker (security/reliability/speed/cost/simplicity/polish + notes).
48
48
  4. `Read(workdir + "/.build-loop/prd.md")` — optional. Repo-level PRD if user dropped one. Skip silently if absent.
49
49
  5. `Read(workdir + "/prd.md")` — optional repo-root PRD. Same fallthrough.
50
50
  6. `Read(item_path)` — the candidate item itself. Read body only after anchors.
@@ -19,7 +19,7 @@ You are the build-loop architecture scout. The orchestrator dispatches you with
19
19
  |---|---|---|---|
20
20
  | `baseline` | none | Refresh ACP, surface top hotspots + recent violations + in-scope lessons. | `{kind: "hotspot", component, blast_radius, layer}`, `{kind: "violation", rule, components, first_seen}`, `{kind: "lesson", id, signature}` |
21
21
  | `chunk-impact` | `files: [...]` | Slice ACP to those files + reverse-deps depth=1; recommend chunk parallelism. | `{kind: "impact", file, reverse_deps, layer, parallel_safe_with: [chunk_ids]}` |
22
- | `review-rules` | none (post-Execute) | Run rules check, diff against `known_violations.json`, write decisions for new ones. | `{kind: "violation", rule, components, decision_id, severity}` |
22
+ | `review-rules` | none (post-Execute) | Run rules check, diff against `known_violations.json`, write decisions for new ones. Surface `shallow_module` (thin pass-through: high fan-out, low fan-in) as an advisory `severity: warn` finding — never blocking. | `{kind: "violation", rule, components, decision_id, severity}` (rule ∈ orphan\|circular_dependency\|layer_violation\|hotspot\|shallow_module) |
23
23
  | `iterate-subgraph` | `failing_files: [...]` | Compute subgraph + trace; recommend fix scope. | `{kind: "impact", file, downstream, upstream, fix_scope_files: [...]}` |
24
24
  | `learn-sync` | none (Phase 6) | Promote new lessons + sync NavGator lessons to Postgres. | `{kind: "lesson", id, source, action: "promoted|synced"}` |
25
25
  | `enrich` | none (Phase 1/4) | Run the native enriched scan, then label each `semantic_todo` site. | `{kind: "enriched", node_id, type, model_class, purpose}` |
@@ -76,11 +76,11 @@ If your findings exceed the budget, truncate the `findings[]` array and add `"_t
76
76
 
77
77
  ### `review-rules` (Phase 4 Review-D)
78
78
 
79
- 1. `python -m build_loop.architecture rules --json` — capture stdout.
79
+ 1. `python -m build_loop.architecture rules --json` — capture stdout. Native `check_rules` emits `orphan`, `circular_dependency`, `layer_violation`, `hotspot`, and `shallow_module` (thin pass-through — high fan-out, low fan-in; `severity: warn`, advisory).
80
80
  2. Read `.episodic/architecture/known_violations.json` if present (no-op gracefully if absent).
81
81
  3. Diff: each new violation → invoke `scripts/capture_arch_violation.py` (Chunk 6 will provide; if missing, log to `findings[].side_effects` with `"capture_arch_violation_missing"` and skip).
82
- 4. `summary`: new vs known counts, blocking vs warning.
83
- 5. Recommend `route: "iterate"` if any new violation is `severity >= "blocker"`; else `route: "continue"`.
82
+ 4. `summary`: new vs known counts, blocking vs warning. Surface every new `shallow_module` finding in `findings[]` (kind `violation`, rule `shallow_module`) and name the shallow components in `follow_up` so Phase-4 guidance can advise deepening them — it is **advisory only**, never a `route: iterate` trigger.
83
+ 5. Recommend `route: "iterate"` if any new violation is `severity >= "blocker"`; else `route: "continue"`. `shallow_module` (warn) never routes to iterate.
84
84
 
85
85
  ### `iterate-subgraph` (Phase 5 Iterate)
86
86