@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
@@ -1,234 +0,0 @@
1
- <!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
2
-
3
- # Self-Review — Periodic Autonomous Self-Improvement
4
-
5
- Single source of truth for the build-loop self-review subsystem: purpose, light/deep model, config schema, launchd schedule, graceful degradation, and the headless apply prompt.
6
-
7
- ---
8
-
9
- ## Purpose
10
-
11
- Self-review mines recent build-loop runs for recurring issues and efficiency signals, produces a human-readable digest, and (in deep mode) automatically applies safe improvements via the normal build-loop pipeline. It closes the loop between observations captured during builds and durable fixes that land in the repo — without requiring the user to manually schedule or trigger a review.
12
-
13
- Two cadences balance cost against coverage:
14
-
15
- | Mode | Default cadence | Scope | Auto-apply |
16
- |---|---|---|---|
17
- | **light** | Daily (09:00) | Issues in the last 7 days; proposal cap 10 | No — digest + queue only |
18
- | **deep** | Weekly (Sunday 03:00) | Issues in the last 30 days; uncapped | Yes — SAFE proposals auto-routed through build-loop |
19
-
20
- ---
21
-
22
- ## Config schema
23
-
24
- Add a `selfReview` block to `.build-loop/config.json` (all fields optional; defaults shown):
25
-
26
- ```json
27
- {
28
- "selfReview": {
29
- "enabled": true,
30
- "autonomy": "apply_push",
31
- "light": "daily",
32
- "deep": "weekly"
33
- }
34
- }
35
- ```
36
-
37
- | Field | Values | Meaning |
38
- |---|---|---|
39
- | `enabled` | `true` / `false` | `false` disables the launchd jobs and is a no-op for the installer |
40
- | `autonomy` | `apply_push` \| `apply_local` \| `propose` | `apply_push` — apply SAFE items and push main; `apply_local` — apply but do not push; `propose` — queue only, no auto-apply |
41
- | `light` | `daily` \| `weekly` \| `disabled` | Cadence for the light job |
42
- | `deep` | `daily` \| `weekly` \| `disabled` | Cadence for the deep job |
43
-
44
- Cadence values map to launchd `StartCalendarInterval`. `daily` → every day at the job's configured hour. `weekly` → once per week on the configured weekday. `disabled` skips installing that job.
45
-
46
- ---
47
-
48
- ## How it works
49
-
50
- ### Data-gathering layer (scripts/self_review/ package — frozen CLI)
51
-
52
- `python3 scripts/self_review/__main__.py --mode {light|deep} [--workdir <repo>] [--days N] [--dry-run] --json`
53
-
54
- Always exits 0. Writes:
55
- - `.build-loop/self-review/<UTCdate>-<mode>.md` — human digest
56
- - `.build-loop/proposals/self-review-*.md` — one file per candidate improvement, each with `classify_hint: SAFE|RISKY|DECISION` frontmatter
57
-
58
- Returns JSON to stdout:
59
- ```json
60
- {
61
- "mode": "light|deep",
62
- "window_days": 7,
63
- "mined": {"corrections": [], "rituals": [], "sequences": []},
64
- "efficiency_findings": [],
65
- "self_simplification": [],
66
- "digest_path": ".build-loop/self-review/2026-05-29-deep.md",
67
- "queued": [".build-loop/proposals/self-review-foo.md"],
68
- "errors": [],
69
- "dry_run": false
70
- }
71
- ```
72
-
73
- **`self_simplification[]`** (deep mode, self-recursive only): a list of proactive simplification findings for build-loop's own code. Each entry has the shape:
74
-
75
- ```json
76
- {
77
- "target": "self",
78
- "file": "<relative path>",
79
- "finding": "<one-line description>",
80
- "classify_hint": "SAFE|RISKY|DECISION",
81
- "proposed_action": "<what to do>"
82
- }
83
- ```
84
-
85
- `target: self` marks a proposal as targeting build-loop's own code (plugin repo or `build-loop-memory`). These proposals are subject to the SELF-MODIFICATION SAFETY GATE (see §"Self-modification of the restricted repo" below) — they are never processed by the standard reactive-fix path.
86
-
87
- Deep mode digests include an `## Apply plan` section that separates SAFE-to-auto-apply items from RISKY-to-surface items. When `self_simplification[]` is non-empty, the digest also includes a `## Self-simplification proposals` section listing each `target: self` finding.
88
-
89
- ### Scheduling layer (launchd)
90
-
91
- `python3 scripts/install_self_review.py install` writes two plists to `~/Library/LaunchAgents/`:
92
-
93
- - `com.build-loop.selfreview-light.plist` — daily at 09:00, invokes `scripts/self_review_run.sh light`
94
- - `com.build-loop.selfreview-deep.plist` — weekly Sunday at 03:00, invokes `scripts/self_review_run.sh deep`
95
-
96
- `install` and `uninstall` also unload + remove any jobs still installed under the pre-rename legacy labels (developer-prefixed `*.buildloop.selfreview-*`), so an existing machine transitions to the neutral labels on the next run.
97
-
98
- Both jobs write output to `.build-loop/self-review/launchd-{light,deep}.log`.
99
-
100
- ### Wrapper layer (scripts/self_review_run.sh)
101
-
102
- Invoked by launchd (or manually). Runs the gatherer, saves the JSON snapshot to `.build-loop/self-review/last-<mode>.json`, appends a timestamped line to `.build-loop/self-review/run.log`, and (for deep mode with `autonomy` in `{apply_push, apply_local}`) invokes the headless apply prompt via `claude -p`.
103
-
104
- ---
105
-
106
- ## Install / uninstall / status
107
-
108
- ```bash
109
- # Install both launchd jobs
110
- python3 scripts/install_self_review.py install
111
-
112
- # Remove launchd jobs and plists
113
- python3 scripts/install_self_review.py uninstall
114
-
115
- # Check loaded/not-loaded
116
- python3 scripts/install_self_review.py status
117
-
118
- # JSON output for any subcommand
119
- python3 scripts/install_self_review.py status --json
120
- ```
121
-
122
- Or via the slash command: `/build-loop:self-review --install` / `--uninstall` / `--status`.
123
-
124
- ---
125
-
126
- ## Graceful degradation
127
-
128
- If the `claude` CLI is not installed or not on PATH when the deep wrapper fires, the wrapper logs the skip reason and exits 0. The digest and queued proposals are still produced — the user can process them manually via `/build-loop:run` or `/build-loop:self-review deep`.
129
-
130
- The queue accumulates across skipped deep runs. On the next successful headless invocation, all queued SAFE proposals are processed.
131
-
132
- ---
133
-
134
- ---
135
-
136
- ## Self-modification of the restricted repo
137
-
138
- The self-review/self-heal loop is authorized to write to the restricted repo — build-loop's own plugin repo and the `build-loop-memory` durable repo (lessons and skills). This is normally a guarded action because it edits the running runtime.
139
-
140
- **The SELF-MODIFICATION SAFETY GATE is MANDATORY and non-negotiable for ANY change to build-loop's own code.** It is the load-bearing safety for this authorization.
141
-
142
- ### Gate protocol (every self-modification commit must pass all steps)
143
-
144
- **Step 1 — Bundle first (reversibility):**
145
- ```bash
146
- git bundle create .build-loop/bundles/pre-selfmod-$(date +%Y%m%dT%H%M%S).bundle --all
147
- ```
148
- Always bundle before any self-modification. This is the rollback point.
149
-
150
- **Step 2 — Self-recursive / per-commit mode:**
151
- Self-modifications use the existing per-commit mode machinery (one commit at a time, reviewed before the next). `selfRecursive.enabled` is `true` when the working directory IS build-loop's own repo. Do not batch multiple self-modification commits without a gate pass between each.
152
-
153
- **Step 3 — Verify gate (MANDATORY before commit):**
154
- ```bash
155
- python3 scripts/self_mod_verify.py \
156
- --workdir "$PWD" \
157
- --scope auto \
158
- --changed-files <space-separated file list> \
159
- --auto-revert \
160
- --json
161
- ```
162
- `--scope auto` runs mapped tests for small changes and broader tests for multi-file/core changes (practical default). Use `--scope full` for the slow exhaustive option (900s, parallel when pytest-xdist is present).
163
-
164
- `verdict: pass` → the self-modification may commit.
165
- `verdict: fail` → the gate AUTO-REVERTS the change and writes the finding to `.build-loop/proposals/failed-gate/`. The change is NEVER committed. Do not retry a failed gate verdict without diagnosing the root cause.
166
-
167
- **Self-modifications execute — they do not stop the loop.** A self-modification that is part of the accepted plan (including edits to the gate, tests, or the self-improvement loop) executes behind the test-suite gate: `self_mod_verify.py --scope auto --auto-revert` must return `verdict: pass` (tests are the oracle; a failed gate auto-reverts the change). Build-loop never halts a planned self-modification for human approval. Oversight is post-hoc, not a gate: (a) self-modifying runs trigger an ADDITIONAL adversarial review (independent-auditor at build scope; the periodic deep self-review re-audits recent self-modifications) — non-blocking; (b) the end-of-run readback reports every self-modification and the additional-review findings so the human sees results at the end. The loop stays on task and reports once, at the end.
168
-
169
- **Step 4 — SAFE-only auto-apply:**
170
- Only changes that `classify_action.py` classifies as SAFE auto-apply through this path. Structural or architectural self-modifications — new phase, changed dispatch contract, agent-role change — surface as DECISION and are never auto-applied. They are queued to `.build-loop/proposals/needs-decision/` for explicit user action.
171
-
172
- ### Authorized targets
173
-
174
- - Build-loop's own plugin repo (files under the build-loop working directory when `selfRecursive.enabled`)
175
- - `build-loop-memory` durable repo: lessons, skills, and project-scoped memory entries written via `scripts/memory_writer.py`
176
-
177
- ### What is NOT authorized without user confirmation
178
-
179
- - Promotion of project-local skills to `~/.claude/skills/` (global scope — confirm first)
180
- - Changes to `agents/build-orchestrator.md` phase contracts or MECE ownership rules (structural — DECISION; surface as DECISION, never auto-apply)
181
-
182
- ---
183
-
184
- ## APPLY PROMPT
185
-
186
- This is the exact prompt text fed to `claude -p` by `scripts/self_review_run.sh` for deep auto-apply. Do not paraphrase — the wrapper reads this file and extracts the block between the `BEGIN_APPLY_PROMPT` and `END_APPLY_PROMPT` markers.
187
-
188
- <!-- BEGIN_APPLY_PROMPT -->
189
- You are running headlessly as part of a scheduled build-loop self-review. Your job is to apply safe improvements identified by the periodic self-review.
190
-
191
- Step 1 — Read the context:
192
- - Read `.build-loop/self-review/last-deep.json` (the data-gatherer output).
193
- - For each path listed in `queued[]`, read the proposal file. Take only proposals where `classify_hint: SAFE`.
194
- - Skip any proposal where `classify_hint` is `RISKY` or `DECISION` — leave those files untouched.
195
- - Separately, collect every entry in `self_simplification[]` where `classify_hint: SAFE` AND `target: self`. These are proactive self-simplifications of build-loop's own code and require the SELF-MODIFICATION SAFETY GATE in Step 2b.
196
-
197
- Step 2a — Apply each SAFE non-self proposal:
198
- For each SAFE proposal without `target: self`, route it through `/build-loop:run` with a goal derived from the proposal's title and body. Build-loop handles apply + commit + collapse. Its own autonomy gate and deployment policy govern what lands — do not bypass them.
199
-
200
- Step 2b — Apply SAFE `target: self` proposals (self-modification path):
201
- Self-modifications execute — they do not stop the loop. For each SAFE `target: self` proposal, apply the change, then — BEFORE committing — run the MANDATORY SAFETY GATE:
202
- ```bash
203
- python3 scripts/self_mod_verify.py \
204
- --workdir "$PWD" \
205
- --scope auto \
206
- --changed-files <the files you changed> \
207
- --auto-revert \
208
- --json
209
- ```
210
- - `verdict: pass` → commit the change via the normal per-commit mode (one commit per self-modification; do not batch). The self-modification is recorded for the end-of-run readback.
211
- - `verdict: fail` → the gate has already auto-reverted the change. Move the proposal to `.build-loop/proposals/failed-gate/` and continue with the next proposal. NEVER commit a failed-gate self-modification.
212
- - Skip any `target: self` proposal that `classify_action.py` does not classify as SAFE (RISKY → isolate to worktree-branch + log; DECISION → queue to `.build-loop/proposals/needs-decision/`, do not apply).
213
-
214
- Do NOT stop the loop for any self-modification, including those that touch the gate scripts, tests, or the self-improvement loop. The test-suite gate is the oracle; if it passes, the change commits and is reported at the end.
215
-
216
- Step 3 — Determine push behavior:
217
- Read `.build-loop/config.json` key `selfReview.autonomy` (default `apply_push`).
218
- - If `apply_push`: after all SAFE proposals have been routed and landed, run `git push origin main` for the accumulated commits. Build-loop's deployment_policy still gates this; if the push is blocked by policy, log the block and exit 0 — do not force.
219
- - If `apply_local`: do not push. Commits land locally; the user pushes manually.
220
-
221
- Step 4 — Report:
222
- Print a short summary: how many SAFE proposals were processed (split: standard vs `target: self`), how many RISKY/DECISION items were left queued, how many `target: self` proposals were gated/reverted by a failed test gate, and the push status (pushed / local-only / skipped by policy / n/a).
223
-
224
- Include a `## Self-modifications (readback)` section listing every self-modification that landed this run: file, one-line what/why, test-gate verdict, and the additional-review finding (pass/flag). If no self-modifications occurred, omit the section.
225
-
226
- Constraints:
227
- - Never apply a RISKY or DECISION proposal autonomously.
228
- - Never apply a `target: self` proposal without running `self_mod_verify.py` first.
229
- - Never commit a change that `self_mod_verify.py` returned `verdict: fail` for.
230
- - Never stop the loop for a self-modification — including those that touch the gate, tests, or self-improvement loop scripts. The test gate is the oracle; pass → commit and continue; fail → auto-revert and continue. Report at the end.
231
- - Never bypass build-loop's commit auditor or autonomy gate.
232
- - If build-loop is not available as a slash command, log the unavailability and exit 0 — the queue stays intact.
233
- - This is a local developer tool; there are no users to protect other than the repo owner.
234
- <!-- END_APPLY_PROMPT -->
@@ -1,116 +0,0 @@
1
- <!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
2
-
3
- # UI Input/Output Contract
4
-
5
- Use this contract for any build-loop task that adds, modifies, or validates a user-facing UI surface. It turns "build the component" into an explicit inventory of what the user can provide, what the system returns, and which UI pattern must handle each data shape.
6
-
7
- ## When It Applies
8
-
9
- Apply this when `uiTarget != null` and the task changes any screen, component, form, table, chart, voice/audio affordance, file workflow, generated output, or streamed response. Skip only for copy-only changes that do not alter the available inputs, outputs, states, or operations.
10
-
11
- ## Required Plan Section
12
-
13
- Every UI plan must include a `## UI Input/Output Contract` section before implementation. Use one row per affected screen or component, and keep each field concrete.
14
-
15
- | Field | Required Answer |
16
- |---|---|
17
- | Surface | Screen/component name plus file path |
18
- | User inputs | Every value the user can provide |
19
- | System outputs | Every value the user receives or decides from |
20
- | Data taxonomy | Structural type, content format, persistence intent |
21
- | Operation model | CRUD operation plus any domain verb |
22
- | Component mapping | Exact input control and output renderer |
23
- | State matrix | Empty, populated, focused, disabled, loading, success, error, and streaming/abort when relevant |
24
- | Modality | Text, voice, file, vision, chart, map, AI/generated, or streaming; include fallback |
25
- | Validation/security | Presentation, application, and domain validation; sanitization; auth/authz display behavior |
26
- | Traceability | Data schema, API endpoint/method, design-system component, and rationale |
27
-
28
- ## Data Taxonomy
29
-
30
- Classify each input and output before choosing UI controls:
31
-
32
- - **Structural type**: scalar, structured object/array, binary, stream.
33
- - **Content format**: plain text, Markdown, rich text, HTML, JSON tree, chart data, audio, image, map/geospatial.
34
- - **Persistence intent**: persisted CRUD data, transient session state, real-time stream, computed/derived output.
35
-
36
- ## Operation Model
37
-
38
- Name the operation the UI performs:
39
-
40
- - **Create**: POST, form, wizard, inline add.
41
- - **Read**: GET, table, card, detail view, chart.
42
- - **Update**: PUT/PATCH, edit form, inline edit, toggle.
43
- - **Delete**: DELETE, destructive button, confirmation.
44
- - **Domain verbs**: submit, approve, publish, escalate, cancel, refund, reorder, filter, sort, export, download.
45
-
46
- Do not hide domain verbs inside generic "update" language when rules, side effects, or affordances differ.
47
-
48
- ## Component Mapping
49
-
50
- Choose components from the data shape, not habit.
51
-
52
- | Data Shape | Input Control | Output Renderer |
53
- |---|---|---|
54
- | Short string | Single-line input | Text with overflow/copy behavior |
55
- | Long plain text | Textarea with sizing policy | Paragraph or preformatted text |
56
- | Markdown | Split write/preview editor | Sanitized Markdown renderer |
57
- | Rich text | Schema-backed editor | Paired rich-text viewer |
58
- | JSON/object | Schema-aware JSON editor/tree | Collapsible tree or raw/parsed toggle |
59
- | Number | Number input, slider, or stepper | Locale-aware number display |
60
- | Boolean | Toggle, checkbox, or yes/no radio | Explicit state label |
61
- | Date/time | Date/time/range picker | Locale/timezone-aware display |
62
- | Enum | Select, radio group, or searchable select when options exceed seven | Label/chip/list value |
63
- | File/binary | Upload/dropzone with progress | Preview/download with file metadata |
64
- | Voice/audio | Mic button with waveform and text fallback | Audio player/TTS plus transcript |
65
- | Tabular data | Filters/search feeding table | Sort/filter/paginated table |
66
- | Chart data | Form/filter inputs feeding visualization | Named chart type plus table fallback |
67
- | Streaming/AI output | Prompt or structured input | Token/partial renderer with abort and retry |
68
- | Geospatial | Address/map controls | Map with markers/clusters and fallback text |
69
-
70
- ## State Matrix
71
-
72
- Document the states each component must render:
73
-
74
- - Default/empty.
75
- - Populated/filled.
76
- - Focused.
77
- - Hover on pointer devices.
78
- - Active/pressed.
79
- - Disabled/permission-blocked.
80
- - Loading.
81
- - Success.
82
- - Error/invalid.
83
- - Empty result.
84
- - Streaming/partial with abort and retry behavior when relevant.
85
-
86
- ## Modalities
87
-
88
- When a modality exists, it needs its own UI and failure path:
89
-
90
- - **Text**: text input, textarea, rich text, text/Markdown renderer.
91
- - **Voice**: push-to-talk or wake-word trigger, ASR provider/threshold if known, transcript fallback, TTS controls.
92
- - **File**: upload control, MIME/size rules, preview/download, copy-text fallback.
93
- - **Vision/image**: image upload/camera, viewer/annotation, alt-text fallback.
94
- - **Chart/graph**: chart type, data schema, axis labels, colorblind-safe palette, table fallback.
95
- - **AI/generated output**: output type contract, response schema/template, streaming vs complete mode, abort/retry behavior.
96
-
97
- ## Validation And Security
98
-
99
- Validation must be named by layer:
100
-
101
- - **Presentation**: required fields, max length, pattern, type, inline field errors.
102
- - **Application**: cross-field and business-rule errors, form-level/toast surface.
103
- - **Domain**: invariant failures, system-error surface, and whether repeated domain failures indicate a spec gap.
104
- - **Sanitization**: allowed subset for Markdown, rich text, HTML, JSON, and generated content.
105
- - **Auth/authz**: permission required for create/update/delete/domain verbs, and UI behavior when denied: hidden, disabled, or 403/empty view.
106
-
107
- ## Traceability
108
-
109
- Each UI element that accepts or returns data must trace to:
110
-
111
- - Data model or schema version.
112
- - API endpoint/method or local data source.
113
- - Design-system component or explicit net-new rationale.
114
- - Test or validation evidence.
115
-
116
- If the trace cannot be named, the plan is incomplete.
@@ -1,85 +0,0 @@
1
- <!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
2
- <!-- PROVENANCE: folded from skills/verify-dispatch/SKILL.md (v0.1.0) on 2026-07-02 (pool-consolidation Inc 2). Reactive-selection trigger preserved in agents/build-orchestrator.md §"Verify every subagent" + skills/build-loop/SKILL.md; this reference holds the checklist body. -->
3
-
4
- # Verify dispatch — post-dispatch verification checklist
5
-
6
- Walk this after any dispatched Agent, Task, or orchestrator sub-agent (including background/`run_in_background` dispatches and headless build-loop orchestrators) claims commits landed and tests passed — especially when the safety classifier was unavailable or when you would say "classifier unavailable". Also applies when the user says "verify the subagent", "did the agent actually commit", or "confirm the dispatch worked". A solicited peer agreeing after you asked it to check is NOT independent verification — use this checklist instead.
7
-
8
- ## When this fires / Why
9
-
10
- **Standing rule:** "verify every subagent." A dispatched agent's report is a claim, not evidence. Three recurring failure modes:
11
-
12
- - The safety classifier is unavailable, so the agent's self-report goes unchecked.
13
- - A solicited peer reviews your work after you asked it to — that's anchoring, not independent validation (memory: `feedback_solicited_peer_review_is_not_independent.md`).
14
- - An auditor was supposed to run but was substituted by inline self-audit (memory: `feedback_buildloop_verify_auditor_ran.md`).
15
-
16
- Ground truth comes from commands you run yourself, not from prose the agent returned.
17
-
18
- ## 5-Step Verification Checklist
19
-
20
- Run these yourself. Do not echo the agent's report back as your own finding.
21
-
22
- ### 1 — Confirm the commit hashes exist on the claimed branch
23
-
24
- ```bash
25
- git log --oneline -n 5
26
- git rev-parse HEAD
27
- git branch --contains <hash>
28
- ```
29
-
30
- The hashes the agent named must appear in the log. The branch must be the expected one. If HEAD is on the wrong branch, flag it before reading anything else.
31
-
32
- ### 2 — Working tree is clean (modulo known runtime churn)
33
-
34
- ```bash
35
- git status --short
36
- ```
37
-
38
- Acceptable noise: `.rally/log/`, `.build-loop/state.json`, build artefacts declared in `.gitignore`. Anything else — unexpected staged files, leftover edits, index residue from a parallel agent — is a scope breach or index corruption; name it explicitly.
39
-
40
- ### 3 — Run the test suites yourself; do not trust the report
41
-
42
- Pick the command that matches the repo:
43
-
44
- ```bash
45
- # Rust
46
- cargo test
47
-
48
- # Python (prefer uv; system python may be broken)
49
- uv run --with pytest python -m pytest
50
-
51
- # Node / TypeScript
52
- npx tsc --noEmit && npx jest --passWithNoTests
53
- ```
54
-
55
- Capture and report real pass/fail counts and any error output. "The agent said tests passed" is not a verification; this step is.
56
-
57
- ### 4 — Confirm cross-repo parity fixtures are byte-identical
58
-
59
- When the build involves copied or synced artifacts (e.g. native skill copies from a sibling repo, fixture pairs, generated schema files):
60
-
61
- ```bash
62
- diff <canonical-source> <copy-in-this-repo>
63
- # or
64
- sha256sum <file-a> <file-b>
65
- ```
66
-
67
- A hash or diff mismatch means the sync did not complete correctly even if the agent reported success.
68
-
69
- ### 5 — Report your findings with evidence
70
-
71
- State the outcome in this form:
72
-
73
- ```
74
- ✅ verified by: git log (commit abc1234 on branch X), cargo test (47 passed, 0 failed), git status clean
75
- ⚠️ untested: <what you could not check and why>
76
- ```
77
-
78
- Never emit "the agent confirmed it passed" as your own verification line. Name which commands you ran and what they returned. If a step was skipped, say why.
79
-
80
- ## What this does NOT replace
81
-
82
- - **runtime-parity-verification** — that skill cross-checks a running app's UI against backend state. This checklist covers the git/test layer only.
83
- - **plan-verify** — that skill lints a plan's evidence claims before Phase 2 acceptance. This checklist fires after a dispatch reports completion.
84
-
85
- Origin lessons: `feedback_solicited_peer_review_is_not_independent.md`, `feedback_buildloop_verify_auditor_ran.md`, `feedback_verify_running_app_not_compile_green.md`.