@bongos/core 1.19.714 → 1.19.724

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 (422) hide show
  1. package/.bongos-core.json +488 -413
  2. package/.claude/skills/backlog-review/SKILL.md +3 -3
  3. package/.claude/skills/blocker-review/SKILL.md +1 -1
  4. package/.claude/skills/blocker-solve/SKILL.md +2 -2
  5. package/.claude/skills/builder-reauth/SKILL.md +1 -1
  6. package/.claude/skills/builder-redteam/SKILL.md +1 -1
  7. package/.claude/skills/builder-ship/SKILL.md +1 -1
  8. package/.claude/skills/builder-start/SKILL.md +1 -1
  9. package/.claude/skills/design/SKILL.md +2 -2
  10. package/.claude/skills/feedback/SKILL.md +1 -1
  11. package/.claude/skills/goal-create/SKILL.md +1 -1
  12. package/.claude/skills/goal-review/SKILL.md +2 -2
  13. package/.claude/skills/idea-triage/SKILL.md +5 -5
  14. package/.claude/skills/merge-mode/SKILL.md +4 -4
  15. package/.claude/skills/new-project/SKILL.md +17 -17
  16. package/.claude/skills/planning-session/SKILL.md +11 -11
  17. package/.claude/skills/recall/SKILL.md +2 -2
  18. package/.claude/skills/strand-fix/SKILL.md +1 -1
  19. package/.devcontainer/README.md +2 -2
  20. package/CONTRIBUTING.md +2 -2
  21. package/GOVERNANCE.md +4 -4
  22. package/clients/bongos-client/README.md +1 -1
  23. package/clients/bongos-client/bongos-client.global.js +4 -0
  24. package/clients/bongos-client/index.cjs +4 -0
  25. package/clients/bongos-client/index.d.ts +5 -0
  26. package/clients/bongos-client/index.mjs +4 -0
  27. package/config/branding.neutral.json +4 -2
  28. package/docs/adr/0001-stack-choice-single-vps.md +2 -2
  29. package/docs/adr/0002-digitalocean-over-hetzner.md +1 -1
  30. package/docs/adr/0008-google-chat-oauth-user-auth.md +1 -1
  31. package/docs/adr/0009-autotile-architecture.md +1 -1
  32. package/docs/adr/0011-terrain-id-rendering-model.md +3 -3
  33. package/docs/adr/0013-paths-as-object-overlays-with-autotile-dispatch.md +1 -1
  34. package/docs/adr/0014-families-canonical-over-vocabulary.md +1 -1
  35. package/docs/adr/0015-task-dependencies-and-auto-promotion.md +1 -1
  36. package/docs/adr/0016-trust-boundary-server-enforced-permissions.md +1 -1
  37. package/docs/adr/0018-three-rank-model-goes-live.md +3 -3
  38. package/docs/adr/0020-security-model-public-stub.md +9 -9
  39. package/docs/adr/0021-per-builder-skill-model-preferences.md +2 -2
  40. package/docs/adr/0022-secrets-policy.md +5 -5
  41. package/docs/adr/0024-cloneable-repo-local-first-memory.md +3 -3
  42. package/docs/adr/0024-multi-agent-system-architecture.md +10 -10
  43. package/docs/adr/0025-offsite-backup-vendor-digitalocean-spaces.md +1 -1
  44. package/docs/adr/0025-structured-criterion-task-link.md +1 -1
  45. package/docs/adr/0026-bfg-memory-hygiene-and-cross-builder-learning.md +13 -13
  46. package/docs/adr/0027-bfg-session-inefficiency-evaluator.md +14 -14
  47. package/docs/adr/0029-status-page-outage-resilience.md +1 -1
  48. package/docs/adr/0030-builders-hall-live-updates.md +1 -1
  49. package/docs/adr/0031-cloud-dev-environments-for-builders.md +7 -7
  50. package/docs/adr/0032-discord-mirror-of-gds.md +3 -3
  51. package/docs/adr/0033-discord-bot-service-principal.md +4 -4
  52. package/docs/adr/0034-thetes-graduated-newcomer-rank.md +1 -1
  53. package/docs/adr/0035-builder-onboarding-three-paths.md +4 -4
  54. package/docs/adr/0036-builders-subdomain-and-ui-reorg.md +1 -1
  55. package/docs/adr/0037-discord-channel-management.md +1 -1
  56. package/docs/adr/0038-chromebook-ttyd-cloudflare-tunnel.md +5 -5
  57. package/docs/adr/0039-setup-first-onboarding-ux.md +6 -6
  58. package/docs/adr/0040-remote-control-default-browser-onramp.md +3 -3
  59. package/docs/adr/0041-temporary-grader-bypass-killswitch.md +2 -2
  60. package/docs/adr/0042-builder-self-deploy-ci-auto-merge.md +5 -5
  61. package/docs/adr/0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md +2 -2
  62. package/docs/adr/0044-mediterranean-palette-replacement.md +1 -1
  63. package/docs/adr/0044-per-box-live-game-preview.md +1 -1
  64. package/docs/adr/0046-sandbox-first-review-gate.md +1 -1
  65. package/docs/adr/0047-discord-bugs-intake-anti-abuse.md +1 -1
  66. package/docs/adr/0049-split-parallel-safety-contract.md +1 -1
  67. package/docs/adr/0050-device-flow-admission-invite-gated-by-default.md +2 -2
  68. package/docs/adr/0051-full-session-transcript-corpus.md +2 -2
  69. package/docs/adr/0052-sandbox-for-everyone-game-only-preview.md +1 -1
  70. package/docs/adr/0053-scoped-dev-box-session.md +1 -1
  71. package/docs/adr/0054-session-token-reward-cost-plus.md +7 -7
  72. package/docs/adr/0055-server-mediated-branch-publish.md +2 -2
  73. package/docs/adr/0056-prod-deploy-script-mirror-and-healthcheck-retry.md +3 -3
  74. package/docs/adr/0057-container-cost-ledger.md +1 -1
  75. package/docs/adr/0057-discord-archon-approval-channels.md +2 -2
  76. package/docs/adr/0058-automatic-gate-surface-gatekeeper.md +6 -6
  77. package/docs/adr/0059-single-approval-remove-devbox-approval-gate.md +11 -11
  78. package/docs/adr/0060-gds-retrieval-layer.md +3 -3
  79. package/docs/adr/0061-context-layer-decomposition.md +2 -2
  80. package/docs/adr/0062-medusa-instance-model-decoupling.md +5 -5
  81. package/docs/adr/0063-generated-repo-map-symbol-skeleton.md +2 -2
  82. package/docs/adr/0064-rename-medusa-to-cloud-bongos.md +3 -3
  83. package/docs/adr/0065-agpl-nonprofit-ai-first-governance.md +5 -5
  84. package/docs/adr/0066-generated-file-map-sections.md +2 -2
  85. package/docs/adr/0067-session-start-fast-forward-pull.md +1 -1
  86. package/docs/adr/0068-shared-art-key-for-newcomers.md +1 -1
  87. package/docs/adr/0069-hall-live-channel-sse-decouple.md +3 -3
  88. package/docs/adr/0070-deterministic-session-card-delivery.md +1 -1
  89. package/docs/adr/0071-box-confirm-before-destroyed-and-drift-reconcile.md +2 -2
  90. package/docs/adr/0072-bongos-app-mac-signed-first-windows-deferred.md +2 -2
  91. package/docs/adr/0072-dev-box-code-staleness-visibility.md +2 -2
  92. package/docs/adr/0073-builder-needs-signal-and-byok-gemini-key.md +3 -3
  93. package/docs/adr/0073-secrets-scan-exclude-uri-detector.md +2 -2
  94. package/docs/adr/0076-in-session-deterministic-compaction.md +2 -2
  95. package/docs/adr/0077-content-addressed-llm-cache.md +2 -2
  96. package/docs/adr/0078-deterministic-first-cron.md +3 -3
  97. package/docs/adr/0079-value-gated-autonomous-engagement.md +2 -2
  98. package/docs/adr/0080-llm-cache-api-transport-and-trust-model.md +3 -3
  99. package/docs/adr/0081-tool-agnostic-design-layer.md +3 -3
  100. package/docs/adr/0082-server-side-merge-conflict-auto-resolution.md +2 -2
  101. package/docs/adr/0083-modular-architecture-strangler-build-plan.md +3 -3
  102. package/docs/adr/0085-remove-default-per-builder-spend-cap.md +2 -2
  103. package/docs/adr/0086-goal-scoped-work-hierarchy.md +15 -15
  104. package/docs/adr/0087-bongos-app-architecture-and-handoff-contract.md +5 -5
  105. package/docs/adr/0087-compete-on-governance-not-tooling-cursor.md +1 -1
  106. package/docs/adr/0088-consistent-character-generative-animation.md +5 -5
  107. package/docs/adr/0089-modular-multi-model-adversarial-grader.md +15 -15
  108. package/docs/adr/0090-metic-task-authoring.md +8 -8
  109. package/docs/adr/0091-bounding-the-kernel-and-db-carve.md +3 -3
  110. package/docs/adr/0092-hosting-module-and-on-prem-target.md +11 -11
  111. package/docs/adr/0093-tranche-2-core-carve-sequence.md +5 -5
  112. package/docs/adr/0094-repo-atlas-self-drawing-codebase-map.md +1 -1
  113. package/docs/adr/0095-borrowed-memory-and-retrieval-concepts.md +6 -6
  114. package/docs/adr/0095-cross-agent-context-management.md +5 -5
  115. package/docs/adr/0096-require-reward-before-workable.md +5 -5
  116. package/docs/adr/0097-one-active-claim-per-session-and-worktree-binding.md +2 -2
  117. package/docs/adr/0097-retroactive-reward-backfill.md +4 -4
  118. package/docs/adr/0098-public-mirror-publish-manifest.md +3 -3
  119. package/docs/adr/0099-delayed-redacted-mirror-export.md +1 -1
  120. package/docs/adr/0100-two-repo-instance-model.md +6 -6
  121. package/docs/adr/0101-goal-hierarchy-phase-5-judge-membership-reward.md +9 -9
  122. package/docs/adr/0102-finish-bounding-the-kernel.md +1 -1
  123. package/docs/adr/0103-core-first-extraction-cloud-bongos-trunk.md +6 -6
  124. package/docs/adr/0103-gdsv4-bongos-consolidation.md +3 -3
  125. package/docs/adr/0104-trust-gds-api-channel-in-auto-mode.md +3 -3
  126. package/docs/adr/0105-instance-seed-migrations-out-of-core.md +2 -2
  127. package/docs/adr/0106-goal-owner-manager-authority.md +2 -2
  128. package/docs/adr/0107-module-upstreaming-contribution-to-core-catalog.md +6 -6
  129. package/docs/adr/0108-instance-composition-configurable-root.md +6 -6
  130. package/docs/adr/0109-self-describing-openapi-and-hosted-docs.md +3 -3
  131. package/docs/adr/0110-untrack-whole-file-generated-nav-docs.md +1 -1
  132. package/docs/adr/0111-instance-hosting-provisioning-module.md +18 -18
  133. package/docs/adr/0112-private-goals-invitations-join-requests.md +7 -7
  134. package/docs/adr/0113-sandbox-studio-descope-superseded-by-0044-0052.md +1 -1
  135. package/docs/adr/0114-instance-docs-discovery-contract.md +4 -4
  136. package/docs/adr/0115-scheduled-routines-portability.md +1 -1
  137. package/docs/adr/0117-api-versioning-and-deprecation-policy.md +1 -1
  138. package/docs/adr/0118-api-contract-source-of-truth-code-first.md +1 -1
  139. package/docs/adr/0120-pay-on-land-and-builder-owned-rebase-gate.md +2 -2
  140. package/docs/adr/0121-greenfield-vs-brownfield-onboarding-adopt-existing-repo.md +1 -1
  141. package/docs/adr/0122-onboarding-diagram-renders-deploy-rendered-off-git.md +3 -3
  142. package/docs/adr/0123-box-idle-sweep-autosave-before-destroy.md +1 -1
  143. package/docs/adr/0124-typed-api-response-bodies.md +2 -2
  144. package/docs/adr/0125-control-plane-scaffolds-standalone-instance-repo.md +2 -2
  145. package/docs/adr/0126-dedicated-cloudbongos-control-plane-droplet.md +3 -3
  146. package/docs/adr/0127-cross-box-fleet-observability.md +1 -1
  147. package/docs/adr/0128-provisioning-runner-privilege-and-db-auth-model.md +3 -3
  148. package/docs/adr/0129-cloudbongos-control-plane-pull-deploy.md +4 -4
  149. package/docs/adr/0130-provision-remote-exec-over-ssh.md +4 -4
  150. package/docs/adr/0131-rank-scoped-skill-visibility.md +2 -2
  151. package/docs/adr/0132-cohost-fleet-control-plane-migration.md +2 -2
  152. package/docs/adr/0133-github-app-manifest-onboarding-signin.md +1 -1
  153. package/docs/adr/0134-private-first-npm-distribution.md +3 -3
  154. package/docs/adr/0135-module-upstream-submission-interim-queue.md +1 -1
  155. package/docs/adr/0136-update-channel-subscription-policy.md +2 -2
  156. package/docs/adr/0137-upstream-publish-policy-manual-owner-gated.md +6 -6
  157. package/docs/adr/0138-bundled-module-deps-declared-per-module.md +4 -4
  158. package/docs/adr/0142-project-context-is-prose-only.md +2 -2
  159. package/docs/adr/0143-onboarding-repo-picker-oauth-scope.md +2 -2
  160. package/docs/adr/0144-devbox-rehome-onto-cloudbongos-plane.md +2 -2
  161. package/docs/adr/0145-free-hosted-project-tier-isolation-and-domain-separation.md +2 -2
  162. package/docs/adr/0146-configurable-reward-mode-cost-plus-only.md +4 -4
  163. package/docs/adr/0147-standalone-live-docs-regen.md +1 -1
  164. package/docs/adr/0149-bongos-dev-local-launcher.md +1 -1
  165. package/docs/adr/0150-box-first-boot-bringup-vendored-instances.md +3 -3
  166. package/docs/adr/0151-governance-permissions-as-atom-ranks-as-roles.md +20 -20
  167. package/docs/adr/0152-landing-gate-served-by-the-core-app.md +2 -2
  168. package/docs/adr/0152-metic-task-abandonment.md +7 -7
  169. package/docs/adr/0153-sequential-chain-runner.md +1 -1
  170. package/docs/adr/0154-goal-owner-criterion-authoring.md +7 -7
  171. package/docs/adr/0155-adopt-private-repo-widen-oauth-scope.md +2 -2
  172. package/docs/adr/0156-user-set-display-name-wins.md +1 -1
  173. package/docs/adr/0157-archon-is-rank-and-identity-only.md +10 -10
  174. package/docs/adr/0158-choke-point-verdict-taxonomy.md +1 -1
  175. package/docs/adr/0159-merge-gate-reconciliation.md +1 -1
  176. package/docs/adr/0160-main-audit-repo-verifiable-caller.md +1 -1
  177. package/docs/adr/0161-publish-on-merge.md +2 -2
  178. package/docs/adr/0163-legacy-display-name-resolution.md +1 -1
  179. package/docs/adr/0165-instances-hookless-by-default.md +1 -1
  180. package/docs/adr/0166-module-maintenance-and-deprecation-policy.md +3 -3
  181. package/docs/adr/0167-gate-trust-link-agpl-default.md +2 -2
  182. package/docs/adr/0167-module-catalog-source-vs-provenance.md +3 -3
  183. package/docs/adr/0169-bongos-serve-server-bring-up.md +1 -1
  184. package/docs/adr/0171-profile-rollup-join-and-consent.md +1 -1
  185. package/docs/adr/0172-editable-rank-roles-substrate-axis.md +2 -2
  186. package/docs/adr/0172-per-craft-compensation-ideator-credit-lane.md +4 -4
  187. package/docs/adr/0173-legacy-multi-ship-shortfall-not-backfilled.md +1 -1
  188. package/docs/adr/0174-government-terminology-ranks-not-roles.md +1 -1
  189. package/docs/adr/0177-goal-membership-kind.md +3 -3
  190. package/docs/adr/0178-the-copy-desk-flag-and-queue.md +1 -1
  191. package/docs/adr/0179-board-membership-predicate-grammar.md +1 -1
  192. package/docs/adr/0181-teardown-state-gate-and-address-retention.md +1 -1
  193. package/docs/adr/0182-project-visibility-two-axes.md +1 -1
  194. package/docs/adr/0183-criteria-close-themselves.md +1 -1
  195. package/docs/adr/0184-ship-requires-an-assurance.md +1 -1
  196. package/docs/adr/0185-spark-handoff-credit-split.md +1 -1
  197. package/docs/adr/0186-per-project-idea-templates.md +1 -1
  198. package/docs/adr/0187-collab-four-decisions.md +1 -1
  199. package/docs/adr/0187-oauth-handshake-cookie-lifetime.md +1 -1
  200. package/docs/adr/0188-patrol-runs-on-ci-not-the-server.md +2 -2
  201. package/docs/adr/0189-baseline-floors-and-the-freeze-detector.md +2 -2
  202. package/docs/adr/0191-majority-and-the-author-who-may-not-decide-alone.md +1 -1
  203. package/docs/adr/0192-a-category-orients-and-authorises-nothing.md +2 -2
  204. package/docs/adr/0193-pause-task-scoped-box-slices.md +1 -1
  205. package/docs/adr/0195-adr-numbers-are-checked-like-migration-numbers.md +2 -2
  206. package/docs/adr/0196-chrome-world-token-contract-and-the-landing-sheets.md +2 -2
  207. package/docs/adr/0197-the-ui-design-module.md +1 -1
  208. package/docs/adr/0198-third-party-skill-vendoring-policy.md +1 -1
  209. package/docs/adr/0203-doorway-changelog-out-of-module-api.md +2 -2
  210. package/docs/adr/0204-the-apex-is-dark-only.md +2 -2
  211. package/docs/adr/0205-federated-checkin-needs-the-hubs-own-signin-witness.md +1 -1
  212. package/docs/adr/0206-own-scoped-session-revocation-no-absolute-ceiling.md +1 -1
  213. package/docs/adr/0207-connections-implementation-departures-and-honest-limits.md +1 -1
  214. package/docs/adr/0208-application-lifecycle-the-handle-waits-and-the-vouch-has-no-minter.md +2 -2
  215. package/docs/adr/0209-one-budget-for-the-account-existence-oracle.md +1 -1
  216. package/docs/adr/0210-scouting-graduates-on-an-instance-asserted-owner-claim.md +1 -1
  217. package/docs/adr/0212-connections-on-the-profile-surface-and-addressing.md +1 -1
  218. package/docs/adr/0213-platform-terms-acceptance-is-the-hubs-own-witness.md +2 -2
  219. package/docs/adr/0215-the-recruiter-sliver-is-a-ceiling-not-a-step.md +6 -6
  220. package/docs/adr/0216-a-fake-pool-interpreter-must-fail-loudly-not-silently-ignore.md +2 -2
  221. package/docs/adr/0217-rank-gates-inviting-not-viewing.md +1 -1
  222. package/docs/adr/0218-the-apex-root-web-surface.md +2 -2
  223. package/docs/adr/0219-a-look-is-a-branding-pack-the-style-library.md +1 -1
  224. package/docs/adr/0220-an-in-house-rebuilt-skill-is-a-first-party-skill.md +1 -1
  225. package/docs/adr/0221-the-impeccable-method-is-one-skill-with-sub-command-playbooks.md +2 -2
  226. package/docs/adr/0222-the-image-family-under-the-hero-only-rule.md +2 -2
  227. package/docs/adr/0223-the-detector-is-two-tiers-in-the-kit.md +3 -3
  228. package/docs/adr/0224-module-skills-reach-the-core-checkout-as-untracked-self-ignored-copies.md +1 -1
  229. package/docs/adr/0225-privacy-suppresses-cross-project-surfaces-only.md +1 -1
  230. package/docs/adr/0226-one-stale-timer-reporting-degrades-enforcement-refuses.md +1 -1
  231. package/docs/adr/0227-a-task-network-map-is-refused-the-goal-graph-is-the-map.md +1 -1
  232. package/docs/adr/0230-a-look-skill-is-a-composition-grammar-the-palette-is-the-pack.md +1 -1
  233. package/docs/adr/0231-the-style-session-an-owner-authors-a-look-inside-the-contract.md +2 -2
  234. package/docs/adr/0232-rot-is-derived-not-swept-and-water-is-the-only-new-verb.md +2 -2
  235. package/docs/adr/0233-a-copy-proposal-is-a-task-carrying-a-patch.md +2 -2
  236. package/docs/adr/0234-idea-routing-capture-time-promotion-landing-matrix-homeless-inbox.md +2 -2
  237. package/docs/adr/0235-a-fix-category-is-kindbug-under-a-goal-no-column-required.md +11 -11
  238. package/docs/adr/0236-many-ideas-one-task-the-lineage-key-is-the-pair.md +5 -5
  239. package/docs/adr/0237-a-starter-bundle-is-a-preset-over-the-always-on-core-keyed-by-declared-type.md +5 -5
  240. package/docs/adr/0238-the-join-door-is-a-provisioning-settings-policy-key.md +1 -1
  241. package/docs/adr/0239-a-recommendation-is-a-table-that-carries-its-own-reason.md +4 -4
  242. package/docs/adr/0240-a-skipped-module-picker-stores-nothing-and-resolves-the-bundle-on-read.md +4 -4
  243. package/docs/adr/0241-the-artist-gate-is-a-per-project-deploy-gate-that-reads-a-state.md +1 -1
  244. package/docs/adr/0242-a-cascade-is-a-declaration-table-on-the-event-that-already-exists.md +2 -2
  245. package/docs/adr/0243-a-bundle-adjustment-belongs-to-the-bundle-not-the-advice-about-it.md +4 -4
  246. package/docs/adr/0244-a-catalog-search-is-a-view-over-the-rows-never-an-edit-to-the-selection.md +3 -3
  247. package/docs/adr/0245-the-way-back-into-an-optional-step-is-that-step-s-own-answer-route.md +7 -7
  248. package/docs/adr/0246-catalog-membership-is-a-projection-not-a-federation-side-effect.md +1 -1
  249. package/docs/adr/0247-the-join-door-is-one-composed-answer-and-dark-matter-has-no-live-verdict-yet.md +2 -2
  250. package/docs/adr/0248-a-hub-project-s-owner-is-the-provisioning-row-carried-on-a-port.md +3 -3
  251. package/docs/adr/0249-the-invite-step-is-the-done-panel-s-first-act-not-a-rail-step.md +3 -3
  252. package/docs/adr/0250-strict-versioning-the-version-boundary-is-the-scope-gate.md +6 -6
  253. package/docs/adr/0251-a-suggestion-of-who-to-invite-is-a-recruiting-surface-and-owes-the-opt-out.md +5 -5
  254. package/docs/adr/0252-the-self-hosted-visibility-report-is-a-pull-and-auto-appear-buys-a-retraction-lever.md +19 -19
  255. package/docs/adr/0253-the-takedown-lever-has-two-writers-and-provenance-is-a-column.md +2 -2
  256. package/docs/adr/0254-a-relayed-link-is-contained-downward-or-it-is-not-published.md +6 -6
  257. package/docs/adr/0255-a-public-lists-ordering-is-part-of-its-payload.md +2 -2
  258. package/docs/adr/0256-the-visibility-ceiling-is-the-sign-in-gate-too-and-the-reader-moves-to-the-composer.md +3 -3
  259. package/docs/adr/0257-auth-resolves-before-the-hall-mounts-anything.md +1 -1
  260. package/docs/adr/0258-the-public-cli-is-a-generated-client-package-not-the-published-core.md +1 -1
  261. package/docs/adr/0259-a-projects-departure-from-the-public-list-is-public.md +7 -7
  262. package/docs/adr/0260-the-application-is-the-consent-and-the-echo-is-the-gate.md +4 -4
  263. package/docs/adr/0261-a-preselect-always-carries-a-reason-the-bundle-summary-is-the-floor.md +1 -1
  264. package/docs/adr/0262-a-bug-never-lands-in-the-inbox.md +1 -1
  265. package/docs/adr/0263-how-a-version-closes.md +3 -3
  266. package/docs/adr/0264-the-ten-working-areas.md +3 -3
  267. package/docs/adr/0265-work-with-no-goal-and-the-order-the-cut-needs.md +5 -5
  268. package/docs/adr/0266-the-board-room-is-its-own-surface-reachable-by-whoever-may-vote.md +2 -2
  269. package/docs/adr/0267-unanimity-and-the-revise-and-re-sit-loop.md +1 -1
  270. package/docs/adr/0268-the-constitution-comes-from-two-roots.md +3 -3
  271. package/docs/adr/0269-the-cli-session-store-is-host-keyed-at-a-fixed-anchor.md +1 -1
  272. package/docs/adr/0270-rank-floor-derives-without-a-prediction.md +2 -2
  273. package/docs/adr/0271-the-ideator-surface-is-two-halves.md +3 -3
  274. package/docs/adr/0272-a-craft-is-an-identity-not-a-toolchain.md +4 -4
  275. package/docs/adr/0273-hall-nav-can-gate-on-a-permission.md +1 -1
  276. package/docs/adr/0274-one-kernel-three-role-packs.md +1 -1
  277. package/docs/adr/0275-one-source-for-a-written-role-responsibility.md +1 -1
  278. package/docs/adr/0276-the-skill-listing-budget-cannot-hold-every-trigger.md +1 -1
  279. package/docs/adr/0277-a-box-is-in-use-only-while-a-human-is-attached.md +1 -1
  280. package/docs/adr/0278-a-gated-project-still-takes-applications.md +2 -2
  281. package/docs/adr/0279-an-upgrade-is-proven-by-the-served-version-not-the-health-check.md +1 -1
  282. package/docs/adr/0280-the-unattended-lane-may-drive-a-co-tenant-because-the-roster-is-the-decision.md +1 -1
  283. package/docs/adr/0281-an-instance-identity-is-its-own-unix-account-and-pg-role.md +2 -2
  284. package/docs/adr/README.md +294 -294
  285. package/docs/api/openapi.json +72 -5
  286. package/docs/api-reference.md +8 -2
  287. package/docs/architecture.md +22 -22
  288. package/docs/branding-contract.md +5 -5
  289. package/docs/canonical-permissions.md +22 -22
  290. package/docs/copy-inventory.md +15 -13
  291. package/docs/copy-registry.json +35 -17
  292. package/docs/design/hall-direction-v2.md +3 -3
  293. package/docs/design/landing-page-direction-v2.md +1 -1
  294. package/docs/design/projects-hub-direction-v2.md +1 -1
  295. package/docs/file-map.md +3 -1
  296. package/docs/module-api-changelog.md +36 -1
  297. package/docs/modules-contract.md +25 -25
  298. package/docs/onboarding/browser-terminal-guide.md +1 -1
  299. package/docs/onboarding/diagrams/README.md +3 -3
  300. package/docs/onboarding/drachmae-and-karma.md +13 -13
  301. package/docs/onboarding/primer.md +7 -7
  302. package/docs/packs/artist.md +1 -1
  303. package/docs/packs/ideator.md +1 -1
  304. package/docs/project-context.template.md +3 -3
  305. package/docs/recipes/builder-box-lifecycle.md +5 -5
  306. package/docs/recipes/claude-design-loop.md +1 -1
  307. package/docs/recipes/core-release-pipeline.md +55 -14
  308. package/docs/recipes/figma-design-loop.md +1 -1
  309. package/docs/recipes/gds-db-backup.md +2 -2
  310. package/docs/recipes/instance-deploy.md +2 -2
  311. package/docs/recipes/instance-service-restart.md +3 -3
  312. package/docs/recipes/local-dev.md +2 -2
  313. package/docs/recipes/managed-settings-remote-control.md +3 -3
  314. package/docs/recipes/memory-backup.md +4 -4
  315. package/docs/recipes/memory-sync-conflicts.md +2 -2
  316. package/docs/recipes/multi-builder-merge.md +2 -2
  317. package/docs/recipes/ops-gotchas.md +4 -4
  318. package/docs/recipes/overnight-builder.md +1 -1
  319. package/docs/recipes/packaging-the-core.md +6 -6
  320. package/docs/recipes/private-npm-distribution.md +5 -5
  321. package/docs/recipes/search-index-ingestion.md +3 -3
  322. package/docs/recipes/self-host.md +5 -5
  323. package/docs/recipes/server-bring-up.md +1 -1
  324. package/docs/recipes/ship-and-regrade.md +2 -2
  325. package/docs/recipes/standalone-live-docs.md +1 -1
  326. package/docs/recipes/ui-look-before-you-ship.md +1 -1
  327. package/docs/recipes/upgrading-the-core.md +2 -2
  328. package/docs/recipes/work-on-a-task-from-your-dev-box.md +6 -6
  329. package/docs/research/cursor-competitive-analysis.md +3 -3
  330. package/docs/research/llm-model-agnostic-and-cheaper-grader.md +7 -7
  331. package/migrations/core_240_artist_gate_indexes.sql +48 -0
  332. package/migrations/core_240_goal_members_drop_legacy_role.sql +79 -0
  333. package/modules/dev-box/app/src/vendor/bongos-client.cjs +4 -0
  334. package/modules/hall-ui/public/watch.css +6 -0
  335. package/modules/hall-ui/public/watch.js +52 -6
  336. package/modules/lifecycle/cascade.js +37 -9
  337. package/modules/lifecycle/db-claims.js +5 -2
  338. package/modules/lifecycle/db-goals.js +4 -3
  339. package/modules/lifecycle/db-overrides.js +117 -4
  340. package/modules/lifecycle/db-tasks.js +63 -0
  341. package/modules/lifecycle/migrations/lifecycle_001_goal_first_leads.sql +12 -4
  342. package/modules/lifecycle/module.json +2 -1
  343. package/modules/lifecycle/pg-constraint-fail.js +49 -0
  344. package/modules/lifecycle/routes/artist-gate.js +101 -0
  345. package/modules/lifecycle/routes/claims.js +13 -1
  346. package/modules/lifecycle/routes/lifecycle.js +6 -0
  347. package/modules/lifecycle/routes/task-write-routes.js +7 -0
  348. package/modules/lifecycle/routes/tasks.js +24 -0
  349. package/modules/lifecycle/task-classifier.js +10 -1
  350. package/modules/lifecycle/tests/cascade.mjs +43 -0
  351. package/modules/provisioning/provisioning.js +79 -3
  352. package/modules/provisioning/routes/provisioning.js +6 -1
  353. package/modules/provisioning/tests/provisioning.mjs +8 -8
  354. package/modules/security/secret-scrub.js +40 -4
  355. package/modules/status-ui/public/README.md +1 -1
  356. package/modules/ui-design/docs/design-contract.md +2 -2
  357. package/modules/ui-design/kit/README.md +1 -1
  358. package/modules/ui-design/kit/serve.js +1 -0
  359. package/modules/ui-design/skills/README.md +6 -6
  360. package/modules/ui-design/skills/brandkit/SKILL.md +1 -1
  361. package/modules/ui-design/skills/design-taste-frontend/SKILL.md +1 -1
  362. package/modules/ui-design/skills/design-taste-frontend-v1/SKILL.md +1 -1
  363. package/modules/ui-design/skills/gpt-taste/SKILL.md +1 -1
  364. package/modules/ui-design/skills/high-end-visual-design/SKILL.md +1 -1
  365. package/modules/ui-design/skills/image-to-code/SKILL.md +1 -1
  366. package/modules/ui-design/skills/imagegen-frontend-mobile/SKILL.md +1 -1
  367. package/modules/ui-design/skills/imagegen-frontend-web/SKILL.md +1 -1
  368. package/modules/ui-design/skills/impeccable/SKILL.md +1 -1
  369. package/modules/ui-design/skills/industrial-brutalist-ui/SKILL.md +1 -1
  370. package/modules/ui-design/skills/minimalist-ui/SKILL.md +1 -1
  371. package/modules/ui-design/skills/redesign-existing-projects/SKILL.md +1 -1
  372. package/modules/ui-design/skills/stitch-design-taste/SKILL.md +1 -1
  373. package/modules/ui-design/skills/style/SKILL.md +2 -2
  374. package/modules/ui-design/styles/README.md +3 -3
  375. package/modules/ui-design/styles/blueprint/DESIGN.md +1 -1
  376. package/modules/ui-design/styles/chrome-world/DESIGN.md +1 -1
  377. package/package-lock.json +2 -2
  378. package/package.json +1 -1
  379. package/scripts/gds/audit-rank-roles.js +172 -0
  380. package/scripts/gds/backfill-task-rewards.js +9 -4
  381. package/scripts/gds/build-cli-package.js +1 -0
  382. package/scripts/gds/claim.js +94 -9
  383. package/scripts/gds/fitness.js +8 -8
  384. package/scripts/gds/go-live.js +139 -5
  385. package/scripts/gds/land-watch.js +13 -5
  386. package/scripts/gds/mirror-redact.js +13 -2
  387. package/scripts/gds/package-core.js +11 -3
  388. package/scripts/gds/release.js +55 -0
  389. package/scripts/gds/ship-land.js +10 -2
  390. package/scripts/gds/ship-regen.js +41 -8
  391. package/scripts/gds/start.js +7 -4
  392. package/scripts/gds/worktree-claim-guard.js +27 -1
  393. package/scripts/public-mirror-export.js +17 -4
  394. package/src/bongos/api-errors.js +9 -0
  395. package/src/bongos/artist-gate.js +204 -0
  396. package/src/branding.js +15 -0
  397. package/src/module-api.js +34 -1
  398. package/tests/api_path_404.mjs +28 -0
  399. package/tests/artist_gate.mjs +234 -0
  400. package/tests/artist_gate_release.mjs +283 -0
  401. package/tests/artist_gate_route.mjs +174 -0
  402. package/tests/box_scope_predicate.mjs +117 -0
  403. package/tests/claim_error_surface.mjs +163 -1
  404. package/tests/cli_exit_no_abort.mjs +256 -3
  405. package/tests/credit_log_single_writer.mjs +94 -0
  406. package/tests/currency_label.mjs +11 -4
  407. package/tests/go_live.mjs +144 -0
  408. package/tests/helpers.mjs +8 -0
  409. package/tests/main_worktree_busy_reason.mjs +167 -0
  410. package/tests/membership_kind_lockstep.mjs +88 -0
  411. package/tests/mirror_redact.mjs +14 -0
  412. package/tests/module_api.mjs +6 -0
  413. package/tests/provision_settings_apply.mjs +13 -5
  414. package/tests/provisioning_settings.mjs +11 -7
  415. package/tests/provisioning_settings_apply.mjs +4 -4
  416. package/tests/provisioning_settings_env.mjs +59 -7
  417. package/tests/public_mirror_export.mjs +12 -0
  418. package/tests/rank_roles_audit.mjs +114 -0
  419. package/tests/scrubber_corpus.mjs +70 -2
  420. package/tests/start_rebase_warning.mjs +50 -0
  421. package/tests/task_field_bounds_match_db.mjs +140 -0
  422. package/tests/watch_roster_self_row.mjs +289 -0
@@ -3,7 +3,7 @@
3
3
  - **Status:** Accepted
4
4
  - **Date:** 2026-06-19
5
5
  - **Track:** internal
6
- - **Builds on:** the warn-only freshness step ([#1258]) it replaces; the dev-box source-materialization cron (`infra/box-source-fetch.sh`, [ADR 0031](<redacted>.md)); the existing memory pull-on-session-start (`.claude/hooks/pull-memory.js`, [#275]) whose best-effort/fail-open discipline this mirrors for the code checkout.
6
+ - **Builds on:** the warn-only freshness step ([#1258]) it replaces; the dev-box source-materialization cron (`infra/box-source-fetch.sh`, [ADR 0031](0031-cloud-dev-environments-for-builders.md)); the existing memory pull-on-session-start (`.claude/hooks/pull-memory.js`, [#275]) whose best-effort/fail-open discipline this mirrors for the code checkout.
7
7
  - **Task:** [#1277](https://example.com/builders#/task/1277) — owner request ("make sure we pull on every session start").
8
8
 
9
9
  ## Context
@@ -3,7 +3,7 @@
3
3
  - **Status:** Accepted
4
4
  - **Date:** 2026-06-20
5
5
  - **Track:** internal
6
- - **Builds on:** [ADR 0016](<redacted>.md) (rank enforced server-side, no caching — the gate here is `builders.rank`), [ADR 0054](<redacted>.md) (cost-plus economics — this is the org choosing to absorb newcomer art spend), and the existing per-builder BYOK key path in `art/pipeline/gen_api.py` (V3.R11 [#91](https://example.com/builders#/task/91))
6
+ - **Builds on:** [ADR 0016](0016-trust-boundary-server-enforced-permissions.md) (rank enforced server-side, no caching — the gate here is `builders.rank`), [ADR 0054](0054-session-token-reward-cost-plus.md) (cost-plus economics — this is the org choosing to absorb newcomer art spend), and the existing per-builder BYOK key path in `art/pipeline/gen_api.py` (V3.R11 [#91](https://example.com/builders#/task/91))
7
7
  - **Task:** [#1281](https://example.com/builders#/task/1281)
8
8
 
9
9
  ## Context
@@ -2,13 +2,13 @@
2
2
 
3
3
  - **Status:** Accepted
4
4
  - **Date:** 2026-06-20
5
- - **Deciders:** task [#1194](https://example.com/builders#/task/1194) (V4.R55) — part of the Cloud Bongos standalone-instance work (C8, [ADR 0062](<redacted>.md))
5
+ - **Deciders:** task [#1194](https://example.com/builders#/task/1194) (V4.R55) — part of the Cloud Bongos standalone-instance work (C8, [ADR 0062](0062-medusa-instance-model-decoupling.md))
6
6
  - **Track:** `internal` (the builders hall)
7
- - **Supersedes:** the *transport* decision of [ADR 0030](<redacted>.md) §2 (WebSocket/Colyseus). The change-signal layer of ADR 0030 (Postgres `NOTIFY` + `src/bongos/live-channel.js`) is **unchanged** and still authoritative.
7
+ - **Supersedes:** the *transport* decision of [ADR 0030](0030-builders-hall-live-updates.md) §2 (WebSocket/Colyseus). The change-signal layer of ADR 0030 (Postgres `NOTIFY` + `src/bongos/live-channel.js`) is **unchanged** and still authoritative.
8
8
 
9
9
  ## Context
10
10
 
11
- [ADR 0030](<redacted>.md) gave the hall live updates in two layers: a transport-agnostic change-signal (a statement-level `NOTIFY` trigger relayed by one persistent `LISTEN` connection in `live-channel.js`) and a **delivery transport** — a broadcast-only Colyseus room (`builders_hall`) riding the game's existing WebSocket server. ADR 0030 explicitly considered SSE, called it "arguably the textbook fit for a receive-only dashboard," and rejected it for one reason only: to **reuse the game's already-proxy-proven Colyseus stack** rather than stand up a second long-lived-connection mechanism.
11
+ [ADR 0030](0030-builders-hall-live-updates.md) gave the hall live updates in two layers: a transport-agnostic change-signal (a statement-level `NOTIFY` trigger relayed by one persistent `LISTEN` connection in `live-channel.js`) and a **delivery transport** — a broadcast-only Colyseus room (`builders_hall`) riding the game's existing WebSocket server. ADR 0030 explicitly considered SSE, called it "arguably the textbook fit for a receive-only dashboard," and rejected it for one reason only: to **reuse the game's already-proxy-proven Colyseus stack** rather than stand up a second long-lived-connection mechanism.
12
12
 
13
13
  That reason is exactly what the Cloud Bongos decoupling (C8) removes. The GDS-only entrypoint (`src/platform-server.js`, [R51](<redacted>.md)) boots the build platform with **no Colyseus in the process**. A `builders_hall` room cannot exist there, so on a game-less instance the hall's only live feature was dead — it would freeze at load exactly as it did before ADR 0030. The transport was load-bearing on the game runtime, which a standalone Cloud Bongos instance does not have.
14
14
 
@@ -3,7 +3,7 @@
3
3
  - **Status:** Accepted
4
4
  - **Date:** 2026-06-20
5
5
  - **Track:** internal
6
- - **Builds on:** the deterministic-card lineage — task 1273 (script owns the card markup, same shape every session), task 1279 (per-builder "render widgets" knob; OFF ⇒ no HTML), task 1282 (in-band `[otb-card]` relay directive so the contract doesn't live only in the skill). Hook discipline mirrors [`.claude/hooks/conductor.js`](../../.claude/hooks/conductor.js) (the `UserPromptSubmit` MAS Conductor, [ADR 0024](<redacted>.md)).
6
+ - **Builds on:** the deterministic-card lineage — task 1273 (script owns the card markup, same shape every session), task 1279 (per-builder "render widgets" knob; OFF ⇒ no HTML), task 1282 (in-band `[otb-card]` relay directive so the contract doesn't live only in the skill). Hook discipline mirrors [`.claude/hooks/conductor.js`](../../.claude/hooks/conductor.js) (the `UserPromptSubmit` MAS Conductor, [ADR 0024](0024-multi-agent-system-architecture.md)).
7
7
  - **Task:** [#1288](https://example.com/builders#/task/1288)
8
8
 
9
9
  ## Context
@@ -1,7 +1,7 @@
1
1
  # ADR 0071 — Dev-box teardown confirms the droplet is gone before marking 'destroyed'; a bidirectional drift reconcile is the backstop
2
2
 
3
3
  **Date:** 2026-06-20
4
- **Context:** GDS / dev boxes, task [#1289](https://example.com/builders#/task/1289). Builds on [ADR 0031](<redacted>.md) (cloud dev environments) and [ADR 0053](0053-scoped-dev-box-session.md) (scoped dev-box session). Touches `scripts/gds/box.js`, `src/bongos/boxes.js`, `src/bongos/do-api.js`, `infra/box-drift-reconcile.{service,timer}`.
4
+ **Context:** GDS / dev boxes, task [#1289](https://example.com/builders#/task/1289). Builds on [ADR 0031](0031-cloud-dev-environments-for-builders.md) (cloud dev environments) and [ADR 0053](0053-scoped-dev-box-session.md) (scoped dev-box session). Touches `scripts/gds/box.js`, `src/bongos/boxes.js`, `src/bongos/do-api.js`, `infra/box-drift-reconcile.{service,timer}`.
5
5
  **Status:** Accepted.
6
6
  **Track:** `internal` (development system / builder dev boxes).
7
7
 
@@ -49,7 +49,7 @@ Dry-run is the default; `--apply` executes. A new hourly timer (`infra/box-drift
49
49
  ## Alternatives considered
50
50
 
51
51
  - **Poll `getDroplet` until 404 after the DELETE.** Stronger confirmation, but adds latency + API calls; the DELETE returning 204/404 is sufficient acceptance, and `reconcile-drift` is the backstop for anything that still slips through. Rejected as over-engineering.
52
- - **Box-side self-termination on `NO_ACTIVE_BOX`.** A box *cannot* delete its own droplet (no DO token; the builder firewall doesn't allow-list the DO API), and `poweroff` does **not** stop DigitalOcean billing. So self-termination can't actually reclaim the droplet — only the control-plane reconcile can. The box-side loop is harmless churn; we left `box-source-fetch.sh` unchanged rather than touch a fleet-auto-installed, permission-path-sensitive script ([ADR 0043](<redacted>.md)) for no real gain.
52
+ - **Box-side self-termination on `NO_ACTIVE_BOX`.** A box *cannot* delete its own droplet (no DO token; the builder firewall doesn't allow-list the DO API), and `poweroff` does **not** stop DigitalOcean billing. So self-termination can't actually reclaim the droplet — only the control-plane reconcile can. The box-side loop is harmless churn; we left `box-source-fetch.sh` unchanged rather than touch a fleet-auto-installed, permission-path-sensitive script ([ADR 0043](0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md)) for no real gain.
53
53
  - **Reconcile snapshots too.** Out of scope: a leaked snapshot is ~$0.30/mo, not SSH-reachable, and not the reported bug. The reconcile is droplet-focused, matching the task.
54
54
 
55
55
  ## Consequences
@@ -1,7 +1,7 @@
1
1
  # ADR 0072 — Bongos app ships Mac-signed + notarized first; Windows code signing deferred (reuse the Dev Box app's signing posture)
2
2
 
3
3
  **Date:** 2026-06-20
4
- **Context:** Bongos App `BONGOS-V1` / criterion C1 (signed-installable), task [#1296](https://example.com/builders#/task/1296) (`BV1.R01`). Builds on [ADR 0045](<redacted>.md) (the Dev Box desktop app) and [ADR 0004](0004-example-name-and-trademark-acceptance.md) (brand discipline). The bongos app forks the Dev Box app's Electron shell ([#1298](https://example.com/builders#/task/1298) `BV1.R03`), so it inherits that app's signing machinery; this ADR pins which parts it inherits now and which it defers.
4
+ **Context:** Bongos App `BONGOS-V1` / criterion C1 (signed-installable), task [#1296](https://example.com/builders#/task/1296) (`BV1.R01`). Builds on [ADR 0045](0045-devbox-desktop-app.md) (the Dev Box desktop app) and [ADR 0004](0004-example-name-and-trademark-acceptance.md) (brand discipline). The bongos app forks the Dev Box app's Electron shell ([#1298](https://example.com/builders#/task/1298) `BV1.R03`), so it inherits that app's signing machinery; this ADR pins which parts it inherits now and which it defers.
5
5
  **Status:** Accepted.
6
6
  **Track:** `internal` (development system → the Cloud Bongos desktop app line; bongos succeeds the GDS after GDS-V4).
7
7
 
@@ -9,7 +9,7 @@
9
9
 
10
10
  Bongos is a floating OS toolbar that asks for **Screen Recording + Microphone** on first run. An unsigned app making those requests is treated as hostile by the OS: on macOS the permission grants may not persist across launches (and arm64 won't launch at all without at least an ad-hoc signature), and on Windows SmartScreen blocks the first launch outright. So a code-signing path is a launch gate, and `R01` exists to **decide** that path up front so packaging (`R15`/`R16`) is unblocked — not to leave it open until packaging time.
11
11
 
12
- The Dev Box app already walked this road ([ADR 0045](<redacted>.md)):
12
+ The Dev Box app already walked this road ([ADR 0045](0045-devbox-desktop-app.md)):
13
13
 
14
14
  - **macOS — solved and wired.** `.github/workflows/build-devbox-app.yml` carries an *inert-until-armed* Mac signing block: with no secrets it builds unsigned (ad-hoc); arming is purely adding repo secrets (`MAC_CSC_LINK` + `MAC_CSC_KEY_PASSWORD`, plus optional `MAC_NOTARIZE_*` for notarization) — no workflow edit. The secrets are bound to the cert env vars **only on the trusted `main` ref** (the SR-13/SR-14 hardening, [#993](https://example.com/builders#/task/993)) so a `claude/**` feature branch can never exfiltrate the Developer ID cert. A post-build `dmgbuild` re-package (task [#1235](https://example.com/builders#/task/1235)) preserves notarization while fixing the install-window backdrop.
15
15
  - **Windows — never resolved.** Windows signing stays unwired pending a cert-vendor decision: blocker [#20](https://example.com/builders#/blocker/20) (Azure Trusted Signing vs. a traditional EV cert). Today Dev Box Windows users get the SmartScreen "More info → Run anyway" first-run friction, documented in the hall onboarding copy.
@@ -3,12 +3,12 @@
3
3
  - **Status:** Accepted
4
4
  - **Date:** 2026-06-20
5
5
  - **Track:** internal
6
- - **Builds on:** [ADR 0031](<redacted>.md) (per-builder dev boxes), the `box-source-fetch.sh` self-update machinery ([#600](https://example.com/builders#/task/600), [#985](https://example.com/builders#/task/985)), and task [#1187](https://example.com/builders#/task/1187) (the box host-key reporter — the report-up cron pattern this mirrors)
6
+ - **Builds on:** [ADR 0031](0031-cloud-dev-environments-for-builders.md) (per-builder dev boxes), the `box-source-fetch.sh` self-update machinery ([#600](https://example.com/builders#/task/600), [#985](https://example.com/builders#/task/985)), and task [#1187](https://example.com/builders#/task/1187) (the box host-key reporter — the report-up cron pattern this mirrors)
7
7
  - **Task:** [#1316](https://example.com/builders#/task/1316) (from idea [#332](https://example.com/builders#/idea/332))
8
8
 
9
9
  ## Context
10
10
 
11
- A builder (LarsCode) repeatedly hit cryptic dev-box failures: the shared Gemini art key never reached the box, and Claude Desktop connect failed with "host verification failed." Both traced to **one cause — the box was running stale code.** Its box was provisioned 2026-06-07, before two features existed: the shared-art-key delivery rail ([ADR 0068](<redacted>.md), `fetch-art-key.js` + the `gen_api.py` shared tier) and the host-key reporter ([#1187](https://example.com/builders#/task/1187)).
11
+ A builder (LarsCode) repeatedly hit cryptic dev-box failures: the shared Gemini art key never reached the box, and Claude Desktop connect failed with "host verification failed." Both traced to **one cause — the box was running stale code.** Its box was provisioned 2026-06-07, before two features existed: the shared-art-key delivery rail ([ADR 0068](0068-shared-art-key-for-newcomers.md), `fetch-art-key.js` + the `gen_api.py` shared tier) and the host-key reporter ([#1187](https://example.com/builders#/task/1187)).
12
12
 
13
13
  Investigation refined the problem. Boxes **already auto-update**: `infra/box-source-fetch.sh` runs every ~10 min and `git pull --ff-only`s `/workspace`, *and* self-updates its own baked scripts/crons ([#985](https://example.com/builders#/task/985)). So any box provisioned *after* that machinery landed self-heals. The residual gaps:
14
14
 
@@ -3,12 +3,12 @@
3
3
  - **Status:** Accepted
4
4
  - **Date:** 2026-06-20
5
5
  - **Track:** internal
6
- - **Builds on:** [ADR 0068](<redacted>.md) (the shared newcomer key — this is the Phase 2 it explicitly deferred), [ADR 0016](<redacted>.md) (rank enforced server-side, no caching — the entitlement axis here), [ADR 0054](<redacted>.md) (cost-plus economics — *we pay up front* for newcomers, builders pay their own bill after)
6
+ - **Builds on:** [ADR 0068](0068-shared-art-key-for-newcomers.md) (the shared newcomer key — this is the Phase 2 it explicitly deferred), [ADR 0016](0016-trust-boundary-server-enforced-permissions.md) (rank enforced server-side, no caching — the entitlement axis here), [ADR 0054](0054-session-token-reward-cost-plus.md) (cost-plus economics — *we pay up front* for newcomers, builders pay their own bill after)
7
7
  - **Task:** [#1013](https://example.com/builders#/task/1013)
8
8
 
9
9
  ## Context
10
10
 
11
- [ADR 0068](<redacted>.md) shipped the *infrastructure* that hands a shared Gemini key to newcomers (rank `xenos`) so their first art task works — **we pay up front.** It closed by naming the deferred half:
11
+ [ADR 0068](0068-shared-art-key-for-newcomers.md) shipped the *infrastructure* that hands a shared Gemini key to newcomers (rank `xenos`) so their first art task works — **we pay up front.** It closed by naming the deferred half:
12
12
 
13
13
  > the newcomer-facing *experience* (copy explaining we pay, the on-promotion walkthrough to add a personal key, a rank-aware setup prompt) is a deliberate Phase 2.
14
14
 
@@ -43,7 +43,7 @@ The owner picked "visible **and** block-at-use" (the builder can't miss it or hi
43
43
 
44
44
  ### 2. Pragmatic BYOK — the own Gemini key, server-stored and synced
45
45
 
46
- The own key moves from local-file-only to **encrypted server storage that becomes the source of truth**, managed in the hall Settings page, synced down to the builder's own machine at session start — the same rail [ADR 0068](<redacted>.md) built for the shared key.
46
+ The own key moves from local-file-only to **encrypted server storage that becomes the source of truth**, managed in the hall Settings page, synced down to the builder's own machine at session start — the same rail [ADR 0068](0068-shared-art-key-for-newcomers.md) built for the shared key.
47
47
 
48
48
  - **Encrypted at rest** ([`src/bongos/secret-box.js`](../../src/bongos/secret-box.js)): AES-256-GCM, master key (`BUILDER_SECRET_KEY`) in **server env only** — never the DB, never the repo — so a DB dump alone can't decrypt. Migration 122 adds `gemini_key_enc` / `gemini_key_last4` / `gemini_key_set_at` to `builders`. Fails **closed**: no/invalid master key → set-key 503s, the feature stays dark (exactly the [ADR 0068] rollout shape).
49
49
  - **Write-only Settings UI** (`GET/PUT/DELETE /api/gds/me/art-key/own`): set / replace / remove; masked (last-4) after save, like GitHub/Stripe; a get-one link; "needed only if you generate art." Own-scoped — a builder reads/writes only their own key.
@@ -1,7 +1,7 @@
1
1
  # ADR 0073 — The secrets scan excludes TruffleHog's generic URI detector
2
2
 
3
3
  **Date:** 2026-06-20
4
- **Context:** Secrets-scanning gate (`.github/workflows/secrets-scan.yml` + the `.husky/pre-commit` early-catch). Tasks [#1318](https://example.com/builders#/task/1318) and [#1320](https://example.com/builders#/task/1320). Relates to [ADR 0022](0022-secrets-policy.md) (secrets policy) and [ADR 0071](<redacted>.md) (dev-box teardown — the trigger).
4
+ **Context:** Secrets-scanning gate (`.github/workflows/secrets-scan.yml` + the `.husky/pre-commit` early-catch). Tasks [#1318](https://example.com/builders#/task/1318) and [#1320](https://example.com/builders#/task/1320). Relates to [ADR 0022](0022-secrets-policy.md) (secrets policy) and [ADR 0071](0071-box-confirm-before-destroyed-and-drift-reconcile.md) (dev-box teardown — the trigger).
5
5
  **Status:** Accepted.
6
6
  **Track:** `internal` (development system / CI gates).
7
7
 
@@ -12,7 +12,7 @@ The CI gate runs `trufflehog git` over the branch's **full history** with `--res
12
12
  1. **A rejection-test fixture** — `tests/box_terminal_ssrf.mjs` asserts the SSRF guard *rejects* terminal URLs that carry userinfo credentials, so the fixtures contain exactly that shape on purpose.
13
13
  2. **Per-builder tunnel hostnames** that no longer resolve. The detector "verifies" a URI by DNS/connection; an unresolvable host yields an `unknown` (unverifiable) result, which `--results=verified,unknown` reports.
14
14
 
15
- This was latent until 2026-06-20: when a builder's dev box was torn down ([ADR 0071](<redacted>.md)) its tunnel host stopped resolving, flipping the fixture's result to a gating failure — reddening **every** PR built off `main` (caught while landing Bongos `R01`, task [#1296](https://example.com/builders#/task/1296)).
15
+ This was latent until 2026-06-20: when a builder's dev box was torn down ([ADR 0071](0071-box-confirm-before-destroyed-and-drift-reconcile.md)) its tunnel host stopped resolving, flipping the fixture's result to a gating failure — reddening **every** PR built off `main` (caught while landing Bongos `R01`, task [#1296](https://example.com/builders#/task/1296)).
16
16
 
17
17
  The first attempt (task [#1318](https://example.com/builders#/task/1318)) added the fixture file to `--exclude-paths`. That failed for two compounding reasons, and is the load-bearing lesson here:
18
18
 
@@ -1,10 +1,10 @@
1
1
  # ADR 0076 — In-session deterministic compaction (retrieval-first context)
2
2
 
3
- **Status:** Accepted (2026-06-20) · tasks [#1347](https://example.com/builders#/task/1347) [#1348](https://example.com/builders#/task/1348) [#1349](https://example.com/builders#/task/1349) [#1350](https://example.com/builders#/task/1350) · hardened [#1364](https://example.com/builders#/task/1364) · System 2 of the Cloud Bongos LLM-reduction redesign (spike [#1326](https://example.com/builders#/task/1326)) · builds on [ADR 0075](<redacted>.md) (the ledger that measures it) and [ADR 0060](0060-gds-retrieval-layer.md) (the recall layer it recovers through)
3
+ **Status:** Accepted (2026-06-20) · tasks [#1347](https://example.com/builders#/task/1347) [#1348](https://example.com/builders#/task/1348) [#1349](https://example.com/builders#/task/1349) [#1350](https://example.com/builders#/task/1350) · hardened [#1364](https://example.com/builders#/task/1364) · System 2 of the Cloud Bongos LLM-reduction redesign (spike [#1326](https://example.com/builders#/task/1326)) · builds on [ADR 0075](0075-per-system-cost-attribution.md) (the ledger that measures it) and [ADR 0060](0060-gds-retrieval-layer.md) (the recall layer it recovers through)
4
4
 
5
5
  ## Context
6
6
 
7
- The efficiency audit's central finding ([ADR 0075](<redacted>.md)): **~82% of token spend is a few dozen Opus "marathon" sessions**, and their cost is overwhelmingly `cache_read` — a context prefix that grows monotonically and is **re-billed on every assistant turn for hours**. Marathon cost is therefore the *integral of a growing prefix over hundreds of turns*, and the prefix is dominated by stale tool output: file reads later edited, the same file read repeatedly, large `Grep`/`Glob`/`ls`/`Bash` dumps acted on once and never referenced again. **This is the only pool large enough to matter — no cache, model-router, or cron-gate can touch it. Only bounding the live context can.**
7
+ The efficiency audit's central finding ([ADR 0075](0075-per-system-cost-attribution.md)): **~82% of token spend is a few dozen Opus "marathon" sessions**, and their cost is overwhelmingly `cache_read` — a context prefix that grows monotonically and is **re-billed on every assistant turn for hours**. Marathon cost is therefore the *integral of a growing prefix over hundreds of turns*, and the prefix is dominated by stale tool output: file reads later edited, the same file read repeatedly, large `Grep`/`Glob`/`ls`/`Bash` dumps acted on once and never referenced again. **This is the only pool large enough to matter — no cache, model-router, or cron-gate can touch it. Only bounding the live context can.**
8
8
 
9
9
  Spike [#1347](https://example.com/builders#/task/1347) measured the realized headroom on 7 real OTB Opus transcripts: **~24% of tool-output tokens are provably stale** by three conservative deterministic rules (superseded reads 7.3%, stale dumps 7.9%, duplicate reads 0.2%; per-session range 4–73%). That is the *floor* — the classifier deliberately counts only what it can prove — so System 2's 20–40% estimate is validated as plausible-to-conservative.
10
10
 
@@ -1,6 +1,6 @@
1
1
  # ADR 0077 — Content-addressed LLM cache
2
2
 
3
- **Status:** Accepted (2026-06-20) · tasks [#1358](https://example.com/builders#/task/1358) [#1359](https://example.com/builders#/task/1359) [#1360](https://example.com/builders#/task/1360) · System 5 of the Cloud Bongos LLM-reduction redesign (spike [#1326](https://example.com/builders#/task/1326)) · reports savings into [ADR 0075](<redacted>.md); reuses the content-hash convention of [ADR 0060](0060-gds-retrieval-layer.md)
3
+ **Status:** Accepted (2026-06-20) · tasks [#1358](https://example.com/builders#/task/1358) [#1359](https://example.com/builders#/task/1359) [#1360](https://example.com/builders#/task/1360) · System 5 of the Cloud Bongos LLM-reduction redesign (spike [#1326](https://example.com/builders#/task/1326)) · reports savings into [ADR 0075](0075-per-system-cost-attribution.md); reuses the content-hash convention of [ADR 0060](0060-gds-retrieval-layer.md)
4
4
 
5
5
  ## Context
6
6
 
@@ -15,7 +15,7 @@ Memoize idempotent model runs at `runSubagent`, keyed on the **content** of the
15
15
  - **Cache key** = `sha256(normalized-prompt | model | task_type | scope_sha)` (`src/bongos/llm-cache.js`, table `llm_cache`, migration 125). `scope_sha` is the git tree/blob SHA of the embedded inputs (`git rev-parse HEAD:<path>`), so **a stale answer is only ever returned when the inputs are provably unchanged** — the moment the tree changes, the key changes and the cache misses. This is the correctness backbone.
16
16
  - **The normalizer registry is the other correctness surface.** A per-`task_type` normalizer strips only **provably-volatile** lines (timestamps, run-ids, the architect's `version=` echo) so two logically-identical prompts hash the same — *without* ever collapsing two genuinely-different requests. Adding a task type means adding a normalizer; that is where a reviewer looks to verify a cache can't return a wrong answer.
17
17
  - **Store only on a clean run.** A result is cached only when `exit_code === 0` and stdout is present — **never a timeout or a non-zero exit**. A cache must never pin a failure.
18
- - **The wrap is opt-in and behavior-preserving.** `grader.runSubagentCached({prompt, opts, cache})` checks the cache then falls through to the **untouched** `runSubagent`; with no `cache` spec it is exactly today's call. A hit returns `{stdout, cost_usd: 0, cached: true}`, so the $0 flows automatically through the existing `extractCostUsd → session-cost` ledger, and the saving is recorded into `cost_baseline` (`system5:llm-cache`, [ADR 0075](<redacted>.md)) — `baseline_usd` = what the run *would* have cost, `amount_usd` = 0 — so the system proves its savings in dollars.
18
+ - **The wrap is opt-in and behavior-preserving.** `grader.runSubagentCached({prompt, opts, cache})` checks the cache then falls through to the **untouched** `runSubagent`; with no `cache` spec it is exactly today's call. A hit returns `{stdout, cost_usd: 0, cached: true}`, so the $0 flows automatically through the existing `extractCostUsd → session-cost` ledger, and the saving is recorded into `cost_baseline` (`system5:llm-cache`, [ADR 0075](0075-per-system-cost-attribution.md)) — `baseline_usd` = what the run *would* have cost, `amount_usd` = 0 — so the system proves its savings in dollars.
19
19
  - **First plug-ins (highest rerun value):** `architect-audit` (key scoped to the git tree-hash of `--paths`) and `onboarding-analyze` (key on the immutable session id). Both are best-effort: any `llm_cache` error degrades to an ordinary uncached run — the cache can never take down the thing it accelerates.
20
20
  - **v1 is exact-match.** Semantic / near-match caching is deferred; a v1 key either matches exactly (after normalization) or misses. That keeps correctness obvious.
21
21
 
@@ -1,6 +1,6 @@
1
1
  # ADR 0078 — Deterministic-first cron harness
2
2
 
3
- **Status:** Accepted (2026-06-20) · tasks [#1355](https://example.com/builders#/task/1355) [#1356](https://example.com/builders#/task/1356) [#1357](https://example.com/builders#/task/1357) · System 4 of the Cloud Bongos LLM-reduction redesign (spike [#1326](https://example.com/builders#/task/1326)) · cost visibility via [ADR 0075](<redacted>.md)
3
+ **Status:** Accepted (2026-06-20) · tasks [#1355](https://example.com/builders#/task/1355) [#1356](https://example.com/builders#/task/1356) [#1357](https://example.com/builders#/task/1357) · System 4 of the Cloud Bongos LLM-reduction redesign (spike [#1326](https://example.com/builders#/task/1326)) · cost visibility via [ADR 0075](0075-per-system-cost-attribution.md)
4
4
 
5
5
  ## Context
6
6
 
@@ -14,8 +14,8 @@ A routine **declares its run mode** in SKILL.md frontmatter, and a dispatcher ru
14
14
  - **`deterministic`** — `execFileSync` each step as plain node; route stdout by sink; non-zero exit → best-effort `#ops` alert + non-zero exit. **This is the whole execution — no `claude -p`.**
15
15
  - **`hybrid`** — run the deterministic prefix as code; spawn `claude -p` *only* when a step emits a non-empty `{"needs_judgment": …}` payload, feeding the model only that payload.
16
16
  - **`judgment`** — the status quo: a wrapped session over the SKILL body.
17
- - Steps run with `OTB_COST_CRON_ROUTINE=<name>` so System 1 ([ADR 0075](<redacted>.md)) tags any (hybrid) spend `cron:<routine>:*` — making "did demoting this to deterministic actually cost ~$0?" a queryable fact.
18
- - **Convert only the provably-deterministic wrappers (task 1356).** `peer-vote-tally` and `diagram-drift` already do their whole job in one self-contained, self-filing script — converted to `mode: deterministic`. **`main-audit` and `dep-audit-nightly` were NOT converted:** `main-audit.js` is trust-boundary core (SEC [#863](https://example.com/builders#/task/863) / [ADR 0043](<redacted>.md)) and neither script self-files its findings (the model currently does the per-finding `idea_inbox` / `vulnerability_report` filing), so demoting them blindly would silently drop alerting. They need a self-filing flag added to their (security) scripts first — a separate, security-reviewed task.
17
+ - Steps run with `OTB_COST_CRON_ROUTINE=<name>` so System 1 ([ADR 0075](0075-per-system-cost-attribution.md)) tags any (hybrid) spend `cron:<routine>:*` — making "did demoting this to deterministic actually cost ~$0?" a queryable fact.
18
+ - **Convert only the provably-deterministic wrappers (task 1356).** `peer-vote-tally` and `diagram-drift` already do their whole job in one self-contained, self-filing script — converted to `mode: deterministic`. **`main-audit` and `dep-audit-nightly` were NOT converted:** `main-audit.js` is trust-boundary core (SEC [#863](https://example.com/builders#/task/863) / [ADR 0043](0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md)) and neither script self-files its findings (the model currently does the per-finding `idea_inbox` / `vulnerability_report` filing), so demoting them blindly would silently drop alerting. They need a self-filing flag added to their (security) scripts first — a separate, security-reviewed task.
19
19
  - **A fitness check stops the boundary from rotting (task 1357).** `fitness.checkDeterministicRoutines` fails CI if a `mode: deterministic` SKILL body contains a judgment/mutation instruction (`git push`/`commit`, `deploy.sh`, an `Edit`/`Write` tool instruction, free-text synthesis) — *negated* mentions ("never pushes", "does NOT edit") are allowed as descriptive boundaries — or if a fenced `node …` command diverges from the declared `steps:`. The pure core (`scanDeterministicBody`) is unit-tested both ways (clean passes, each violation class is caught). This is the structural cure for the markdown-graveyard pattern: a deterministic routine can never quietly become a wrapped session again.
20
20
 
21
21
  ## Consequences
@@ -1,6 +1,6 @@
1
1
  # ADR 0079 — Value-gated autonomous engagement (BUILT DISABLED)
2
2
 
3
- **Status:** Accepted, **shipped inert** (2026-06-20) · tasks [#1351](https://example.com/builders#/task/1351) [#1352](https://example.com/builders#/task/1352) [#1353](https://example.com/builders#/task/1353) [#1354](https://example.com/builders#/task/1354) · System 3 of the Cloud Bongos LLM-reduction redesign (spike [#1326](https://example.com/builders#/task/1326)) · cost visibility via [ADR 0075](<redacted>.md); reuses [ADR 0043](<redacted>.md) protected-path matcher
3
+ **Status:** Accepted, **shipped inert** (2026-06-20) · tasks [#1351](https://example.com/builders#/task/1351) [#1352](https://example.com/builders#/task/1352) [#1353](https://example.com/builders#/task/1353) [#1354](https://example.com/builders#/task/1354) · System 3 of the Cloud Bongos LLM-reduction redesign (spike [#1326](https://example.com/builders#/task/1326)) · cost visibility via [ADR 0075](0075-per-system-cost-attribution.md); reuses [ADR 0043](0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md) protected-path matcher
4
4
 
5
5
  ## Context
6
6
 
@@ -30,7 +30,7 @@ The pure decision cores (`decide`, `autofixAllowed`, `cascade-dispatch.dispatch`
30
30
 
31
31
  - The system is fully built and reviewable, but changes nothing in production until the owner arms it — no autonomous behavior shifts on deploy.
32
32
  - When armed, the spend-brake protects against a runaway autonomous fleet; **security routines (dep-audit) should be exempted from the brake at arming time** — a skipped vuln scan is a security hole, not a saved dollar (noted in the routine).
33
- - This system does **NOT** address marathon (interactive `cache_read`) spend — that is System 2 ([ADR 0076](<redacted>.md)), the only lever on the 82% pool. System 3 attacks the autonomous remainder.
33
+ - This system does **NOT** address marathon (interactive `cache_read`) spend — that is System 2 ([ADR 0076](0076-in-session-deterministic-compaction.md)), the only lever on the 82% pool. System 3 attacks the autonomous remainder.
34
34
  - Arming guidance: enable `OTB_AUTONOMY_ENABLED` first with the grader live, watch `autonomy_runs` (skips) + System 1's `by_source` `cron:%` spend, then let the safe_autofix lane follow once the cascade + gate behavior is trusted.
35
35
 
36
36
  ## Reproduce / verify
@@ -1,10 +1,10 @@
1
1
  # ADR 0080 — LLM-cache API transport + trust model
2
2
 
3
- **Status:** Accepted (2026-06-21) · task [#1381](https://example.com/builders#/task/1381) · transport for the content-addressed cache of [ADR 0077](<redacted>.md); savings ledger contract per [ADR 0075](<redacted>.md) / `migrations/124_cost_baseline.sql`; reuses the rank trust boundary of [ADR 0016](<redacted>.md)
3
+ **Status:** Accepted (2026-06-21) · task [#1381](https://example.com/builders#/task/1381) · transport for the content-addressed cache of [ADR 0077](0077-content-addressed-llm-cache.md); savings ledger contract per [ADR 0075](0075-per-system-cost-attribution.md) / `migrations/124_cost_baseline.sql`; reuses the rank trust boundary of [ADR 0016](0016-trust-boundary-server-enforced-permissions.md)
4
4
 
5
5
  ## Context
6
6
 
7
- System 5 ([ADR 0077](<redacted>.md)) memoizes idempotent model runs in the `llm_cache` Postgres table via `src/bongos/llm-cache.js` (`lookup`/`store`/`recordSaving`), all of which use a **direct `pg` pool**. But its two consumers — `architect-audit.js` and `onboarding-analyze.js` — run as CLI/cron on **builder machines**, where the pool is unreachable (peer-socket only; TCP is scram-only). So every cache op silently degraded to miss/no-store and the cache **could never hit organically** (verified empirically in the System-5 effectiveness eval, task [#1372](https://example.com/builders#/task/1372): 0 rows, 0 hits, despite correct logic — proven only when the DB was reached via a forwarded socket).
7
+ System 5 ([ADR 0077](0077-content-addressed-llm-cache.md)) memoizes idempotent model runs in the `llm_cache` Postgres table via `src/bongos/llm-cache.js` (`lookup`/`store`/`recordSaving`), all of which use a **direct `pg` pool**. But its two consumers — `architect-audit.js` and `onboarding-analyze.js` — run as CLI/cron on **builder machines**, where the pool is unreachable (peer-socket only; TCP is scram-only). So every cache op silently degraded to miss/no-store and the cache **could never hit organically** (verified empirically in the System-5 effectiveness eval, task [#1372](https://example.com/builders#/task/1372): 0 rows, 0 hits, despite correct logic — proven only when the DB was reached via a forwarded socket).
8
8
 
9
9
  The fix is a transport: reach the cache DB from any consumer machine. The hard part is **trust** — a cache *store* writes a `result_stdout` that a later run **replays at $0 and trusts** (for `architect-audit` it becomes `audit_md` written to `docs/audits/` and `seed_ideas` filed to `idea_inbox`). An open store endpoint is a content-injection vector into the planning pipeline and a metrics-integrity vector into the public savings number.
10
10
 
@@ -19,7 +19,7 @@ The fix is a transport: reach the cache DB from any consumer machine. The hard p
19
19
 
20
20
  | Control | What it stops |
21
21
  |---|---|
22
- | **Metic+ gate** on both routes (`requireRank('metic','archon')`, read live per-request — [ADR 0016](<redacted>.md)) | Xenos/Thetes seeding a result a high-value audit later replays. There is no legitimate sub-Metic consumer. |
22
+ | **Metic+ gate** on both routes (`requireRank('metic','archon')`, read live per-request — [ADR 0016](0016-trust-boundary-server-enforced-permissions.md)) | Xenos/Thetes seeding a result a high-value audit later replays. There is no legitimate sub-Metic consumer. |
23
23
  | **`cache_key` must be `/^[0-9a-f]{64}$/`** | malformed / SQL-shaped keys; a key is a sha256 by construction. |
24
24
  | **`task_type` ∈ the registered `NORMALIZERS`** | caching arbitrary (non-idempotent) producers; bounds stores to the known idempotent ones. |
25
25
  | **`owner_builder_id` pinned to `req.builder.id`** (client value ignored) | a caller falsifying write-attribution. (The cache is **shared-on-read by content address** — `lookup` keys on `cache_key` only, not on owner. Isolation comes from the key itself: an entry is only readable by someone who can reconstruct its exact `prompt+model+task_type+scope_sha`, and only at Metic+ — not from an owner filter.) |
@@ -1,6 +1,6 @@
1
1
  # ADR 0081 — Tool-agnostic design layer: repo-canonical, Claude Design + Figma as adapters
2
2
 
3
- **Status:** Accepted (2026-06-21) · this ADR [#1375](https://example.com/builders#/task/1375) · implementation cluster [#1376](https://example.com/builders#/task/1376) [#1377](https://example.com/builders#/task/1377) [#1378](https://example.com/builders#/task/1378) [#1379](https://example.com/builders#/task/1379) [#1380](https://example.com/builders#/task/1380) · applies the core↔host pattern of [ADR 0062](<redacted>.md) to design; grader/ship changes ride the gate-review hard floor of [ADR 0043](<redacted>.md)
3
+ **Status:** Accepted (2026-06-21) · this ADR [#1375](https://example.com/builders#/task/1375) · implementation cluster [#1376](https://example.com/builders#/task/1376) [#1377](https://example.com/builders#/task/1377) [#1378](https://example.com/builders#/task/1378) [#1379](https://example.com/builders#/task/1379) [#1380](https://example.com/builders#/task/1380) · applies the core↔host pattern of [ADR 0062](0062-medusa-instance-model-decoupling.md) to design; grader/ship changes ride the gate-review hard floor of [ADR 0043](0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md)
4
4
 
5
5
  ## Context
6
6
 
@@ -20,7 +20,7 @@ Owner (Lars) requirements, reached in the 2026-06-21 design conversation:
20
20
 
21
21
  ## Decision
22
22
 
23
- **The repo is the single source of truth; every design tool is a swappable adapter against a neutral contract.** This is the [ADR 0062](<redacted>.md) core↔host decoupling applied to design: the system depends on the *contract*, not on any tool.
23
+ **The repo is the single source of truth; every design tool is a swappable adapter against a neutral contract.** This is the [ADR 0062](0062-medusa-instance-model-decoupling.md) core↔host decoupling applied to design: the system depends on the *contract*, not on any tool.
24
24
 
25
25
  1. **Neutral design contract = the repo.** The canonical representation is design tokens (extending [`config/branding.json`](../../config/branding.json)) + component code + exported assets, plus a per-surface "design source pointer" (which tool authored it, where its editable source lives). Tools read from and write to this contract; nothing else is canonical. ([#1377](https://example.com/builders#/task/1377))
26
26
 
@@ -40,7 +40,7 @@ Owner (Lars) requirements, reached in the 2026-06-21 design conversation:
40
40
  - **Designers keep Figma.** Manual Figma edits are first-class for structured/design-system changes and round-trip into the repo via a normal GDS task + the same grader. The honest limit: the Figma→code round-trip is lossy for arbitrary canvas art — that work becomes a committed asset, not round-tripped code.
41
41
  - **One grader to maintain, not two.** The standalone Gemini review path is retired into the unified engine. Code doesn't auto-regen today (a failed grade = human fixes + re-ships); unifying gives every type the same generate→grade→regenerate loop.
42
42
  - **Graphics is unchanged.** World pixel art stays on the Claude Code + Gemini pipeline; Figma stays its viewer ([`otb-figma-sync`](../../.claude/skills/otb-figma-sync/SKILL.md)). This ADR adds the `ui` lane beside it, it does not disturb the art pipeline.
43
- - **Gate-review floor applies.** [#1380](https://example.com/builders#/task/1380) touches [`grader.js`](../../src/bongos/grader.js) + [`ship.js`](../../scripts/gds/ship.js) — the gate-review **hard floor** ([ADR 0043](<redacted>.md)). It needs owner Gate approval even for Archon, and the multimodal call path wants a security review.
43
+ - **Gate-review floor applies.** [#1380](https://example.com/builders#/task/1380) touches [`grader.js`](../../src/bongos/grader.js) + [`ship.js`](../../scripts/gds/ship.js) — the gate-review **hard floor** ([ADR 0043](0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md)). It needs owner Gate approval even for Archon, and the multimodal call path wants a security review.
44
44
 
45
45
  ## Rejected alternatives
46
46
 
@@ -3,7 +3,7 @@
3
3
  - **Status:** Accepted
4
4
  - **Date:** 2026-06-21
5
5
  - **Track:** internal
6
- - **Builds on:** [ADR 0055](<redacted>.md) (server-mediated publish — the box holds no push credential; the server pushes), [ADR 0063](<redacted>.md) / [ADR 0066](<redacted>.md) / [ADR 0062](<redacted>.md) §8 (the generated artifacts + the `otb-regen` merge driver, task 1243), [ADR 0016](<redacted>.md) (trust boundary — this does NOT touch it)
6
+ - **Builds on:** [ADR 0055](0055-server-mediated-branch-publish.md) (server-mediated publish — the box holds no push credential; the server pushes), [ADR 0063](0063-generated-repo-map-symbol-skeleton.md) / [ADR 0066](0066-generated-file-map-sections.md) / [ADR 0062](0062-medusa-instance-model-decoupling.md) §8 (the generated artifacts + the `otb-regen` merge driver, task 1243), [ADR 0016](0016-trust-boundary-server-enforced-permissions.md) (trust boundary — this does NOT touch it)
7
7
  - **Task:** [#1385](https://example.com/builders#/task/1385) (idea [#349](https://example.com/builders#/idea/349))
8
8
 
9
9
  ## Context
@@ -15,7 +15,7 @@ The active merge driver (task 1162, `github-push.mergeIfGreen`) lands a green PR
15
15
 
16
16
  The gap: task 1243's machinery only runs in a **local** `git merge` (a builder's box, `/merge-mode`, ship's pre-stage). But the default ship path is **server-mediated** (ADR 0055) and lands via GitHub's own merge — and **GitHub's merge cannot run a custom merge driver** (`otb-regen`). So a confirmed PR that later conflicts only on these files sits open forever until a human with a credentialed checkout runs a local merge. This is the exact stall behind PR #300 and PR #167 (both on `docs/adr/README.md`).
17
17
 
18
- The owner framed the goal as "kill the merge bottleneck" — and **explicitly rejected** the tempting alternative of lowering deploy/merge access down to the `thetes` rank. That would reopen the Builder 25 hole ([ADR 0043](<redacted>.md)): a lightly-trusted agent landing changes on a live prod payment system. The right fix changes *who does the mechanical work*, not *who is trusted to land code*.
18
+ The owner framed the goal as "kill the merge bottleneck" — and **explicitly rejected** the tempting alternative of lowering deploy/merge access down to the `thetes` rank. That would reopen the Builder 25 hole ([ADR 0043](0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md)): a lightly-trusted agent landing changes on a live prod payment system. The right fix changes *who does the mechanical work*, not *who is trusted to land code*.
19
19
 
20
20
  ## Decision
21
21
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  **Status:** Accepted (2026-06-21) · task [#1405](https://example.com/builders#/task/1405) (BV1.R36) · epic [#1388](https://example.com/builders#/task/1388) (BV1.R34) · spike that produced the design: [#1383](https://example.com/builders#/task/1383) → design research in [`docs/design/modular-architecture/`](../design/modular-architecture/) (5 docs, task [#1401](https://example.com/builders#/task/1401))
4
4
 
5
- **Amended by:** [ADR 0091](<redacted>.md) (2026-06-26, BONGOS-V1 C7) — extends this strangler from the four *feature* modules into the **core itself**: bounds the kernel as an enumerated file roster (the "~3.5k-LOC kernel" this ADR kept referencing), defines the per-domain `db.js` carve mechanism, and classifies what the `src/module-api.js` doorway may expose. Nothing here is reversed; 0091 makes "the kernel" and "carve `db.js` per-domain" concrete.
5
+ **Amended by:** [ADR 0091](0091-bounding-the-kernel-and-db-carve.md) (2026-06-26, BONGOS-V1 C7) — extends this strangler from the four *feature* modules into the **core itself**: bounds the kernel as an enumerated file roster (the "~3.5k-LOC kernel" this ADR kept referencing), defines the per-domain `db.js` carve mechanism, and classifies what the `src/module-api.js` doorway may expose. Nothing here is reversed; 0091 makes "the kernel" and "carve `db.js` per-domain" concrete.
6
6
 
7
- **Builds on:** [ADR 0062](<redacted>.md) (instance/model decoupling — the core↔host split, §4 module registry, §5 module-owned migrations, §9 fitness functions), [ADR 0061](<redacted>.md) (context layers / nested CLAUDE.md), [ADR 0016](<redacted>.md) (server-enforced rank boundary), [ADR 0043](<redacted>.md) (protected paths), [ADR 0049](<redacted>.md) (`touches[]` advisory).
7
+ **Builds on:** [ADR 0062](0062-medusa-instance-model-decoupling.md) (instance/model decoupling — the core↔host split, §4 module registry, §5 module-owned migrations, §9 fitness functions), [ADR 0061](0061-context-layer-decomposition.md) (context layers / nested CLAUDE.md), [ADR 0016](0016-trust-boundary-server-enforced-permissions.md) (server-enforced rank boundary), [ADR 0043](0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md) (protected paths), [ADR 0049](0049-split-parallel-safety-contract.md) (`touches[]` advisory).
8
8
 
9
- > **Numbering reconciliation (read this first).** The design docs, the epic [#1388](https://example.com/builders#/task/1388), and task [#1389](https://example.com/builders#/task/1389) all refer to the project-extensible module system as **"ADR 0080"**. That number was taken by the LLM-cache transport ADR ([ADR 0080](<redacted>.md)) before the module-system ADR was written — the same `0079→0081` collision class recorded in project memory. **The module-system decision record is THIS file, ADR 0083.** Where the design docs or those tasks say "ADR 0080 (module system / plugin API)", read "ADR 0083". ADR 0080 is unrelated (it is the LLM cache).
9
+ > **Numbering reconciliation (read this first).** The design docs, the epic [#1388](https://example.com/builders#/task/1388), and task [#1389](https://example.com/builders#/task/1389) all refer to the project-extensible module system as **"ADR 0080"**. That number was taken by the LLM-cache transport ADR ([ADR 0080](0080-llm-cache-api-transport-and-trust-model.md)) before the module-system ADR was written — the same `0079→0081` collision class recorded in project memory. **The module-system decision record is THIS file, ADR 0083.** Where the design docs or those tasks say "ADR 0080 (module system / plugin API)", read "ADR 0083". ADR 0080 is unrelated (it is the LLM cache).
10
10
 
11
11
  ---
12
12
 
@@ -3,7 +3,7 @@
3
3
  - **Status:** Accepted
4
4
  - **Date:** 2026-06-23
5
5
  - **Track:** internal
6
- - **Builds on:** [ADR 0016](<redacted>.md) (the Archon override stays server-enforced), [ADR 0054](<redacted>.md) (session token cost — the spend this cap measured)
6
+ - **Builds on:** [ADR 0016](0016-trust-boundary-server-enforced-permissions.md) (the Archon override stays server-enforced), [ADR 0054](0054-session-token-reward-cost-plus.md) (session token cost — the spend this cap measured)
7
7
  - **Reverses:** the default-cap half of GDS-V3 criterion **C3** (V3.R84, task [#302](https://example.com/builders#/task/302) — "per-builder monthly budget, Archon-configurable")
8
8
  - **Task:** [#1499](https://example.com/builders#/task/1499)
9
9
 
@@ -11,7 +11,7 @@
11
11
 
12
12
  GDS-V3 criterion C3 (task 302) gave every builder a **month-to-date spend cap**: `cost_log` API/compute spend attributed to the builder since `date_trunc('month', now())`, compared against `builders.monthly_budget_usd`. When that column is `NULL` (the normal case), `classifyCostStatus()` fell back to a project-wide default of **$50/month**. At 100% the builder's `/me` `cost.level` flips to `'over'`, which **hard-blocks `/builder-ship` (before the grader runs) and the art pipeline**. An Archon could raise a specific builder's ceiling via `PATCH /builders/:id/budget`.
13
13
 
14
- The default was framed in-code as "catch a runaway, not ration normal work." In practice it did the opposite. The dominant entry in a builder's `cost_log` is `session:<redacted> — **the API cost of running the assistant to do the work itself** (auto-captured per [ADR 0028](<redacted>.md)). On Opus, a handful of real sessions costs more than $50:
14
+ The default was framed in-code as "catch a runaway, not ration normal work." In practice it did the opposite. The dominant entry in a builder's `cost_log` is `session:<redacted> — **the API cost of running the assistant to do the work itself** (auto-captured per [ADR 0028](0028-honest-llm-spend-accounting.md)). On Opus, a handful of real sessions costs more than $50:
15
15
 
16
16
  - Builder 95 (Jackson Rini), created 2026-06-22, hit `over` on day two: **$69.32 MTD across 5 interactive sessions** (largest single session $24.86) vs the $50 default. He was blocked from shipping anything — and every further session he ran to *try* to work pushed him deeper over, since the cost of working is itself the metered quantity.
17
17
 
@@ -4,7 +4,7 @@
4
4
  - **Date:** 2026-06-23
5
5
  - **Deciders:** Lars (Archon), Claude
6
6
 
7
- **Builds on:** [ADR 0016](<redacted>.md) (server-enforced rank boundary), [ADR 0025](<redacted>.md) (structured criterion↔task link), [ADR 0043](<redacted>.md) (protected paths + rank floor), [ADR 0049](<redacted>.md) (`touches[]` advisory), [ADR 0062](<redacted>.md) (instance/host decoupling — the config-preset pattern), [ADR 0083](<redacted>.md) (modular architecture — "a task is scoped to a module"), [ADR 0084](<redacted>.md) (auto-derived per-task rank floor), [ADR 0015](<redacted>.md) (task dependencies + auto-promotion), [ADR 0054](<redacted>.md) (cost-plus reward).
7
+ **Builds on:** [ADR 0016](0016-trust-boundary-server-enforced-permissions.md) (server-enforced rank boundary), [ADR 0025](0025-structured-criterion-task-link.md) (structured criterion↔task link), [ADR 0043](0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md) (protected paths + rank floor), [ADR 0049](0049-split-parallel-safety-contract.md) (`touches[]` advisory), [ADR 0062](0062-medusa-instance-model-decoupling.md) (instance/host decoupling — the config-preset pattern), [ADR 0083](0083-modular-architecture-strangler-build-plan.md) (modular architecture — "a task is scoped to a module"), [ADR 0084](0084-auto-derived-per-task-rank-floor.md) (auto-derived per-task rank floor), [ADR 0015](0015-task-dependencies-and-auto-promotion.md) (task dependencies + auto-promotion), [ADR 0054](0054-session-token-reward-cost-plus.md) (cost-plus reward).
8
8
 
9
9
  **Track:** `internal` (GDS / methodology — a Cloud Bongos platform capability).
10
10
 
@@ -14,11 +14,11 @@
14
14
 
15
15
  Today only the Archon can create or edit tasks — `POST /tasks` and `PATCH /tasks/:id` are both `requireRank('archon')` ([`src/bongos/routes/tasks.js`](../../src/bongos/routes/tasks.js)). Lower-ranking builders (`xenos`, `thetes`) can only **file ideas** into `idea_inbox`; they have no ability to shape their own work toward an objective.
16
16
 
17
- > **Update (2026-06-26, [ADR 0090](<redacted>.md)):** `POST /tasks` / `PATCH /tasks/:id` are now `requireRank('metic','archon')` — a *Metic* may author tasks directly. This ADR's goal-scoped, module-fenced authoring path (`POST /goals/:id/tasks`) is now the mechanism for **sub-Metic** ranks (`xenos`/`thetes`) specifically; everything below about the scope-subset wall and protected-path block is unchanged and still governs that path. Every task must be hand-authored by the owner first — a delegation bottleneck that wastes capable builders' judgment, and the opposite of the AI-first norm where agents do the building.
17
+ > **Update (2026-06-26, [ADR 0090](0090-metic-task-authoring.md)):** `POST /tasks` / `PATCH /tasks/:id` are now `requireRank('metic','archon')` — a *Metic* may author tasks directly. This ADR's goal-scoped, module-fenced authoring path (`POST /goals/:id/tasks`) is now the mechanism for **sub-Metic** ranks (`xenos`/`thetes`) specifically; everything below about the scope-subset wall and protected-path block is unchanged and still governs that path. Every task must be hand-authored by the owner first — a delegation bottleneck that wastes capable builders' judgment, and the opposite of the AI-first norm where agents do the building.
18
18
 
19
19
  Lars's directive (2026-06-23): **stop assigning individual *tasks*; assign *goals*.** A builder working toward a goal should be able to **author and organize their own tasks** beneath it — but only within a **module scope** they cannot exceed, and never in a way that lets someone "pick a goal and then create tasks that hack stuff."
20
20
 
21
- This slots directly into the modular architecture: [ADR 0083](<redacted>.md) Rule 5 already states *"a task is scoped to a module."* Goals are the mechanism that turns that rule into a **live, enforced permission** rather than a convention.
21
+ This slots directly into the modular architecture: [ADR 0083](0083-modular-architecture-strangler-build-plan.md) Rule 5 already states *"a task is scoped to a module."* Goals are the mechanism that turns that rule into a **live, enforced permission** rather than a convention.
22
22
 
23
23
  The structure decided over a design session is a six-tier hierarchy — most of which **already exists** in the GDS. Only **Goal** is a genuinely new tier:
24
24
 
@@ -39,7 +39,7 @@ The structure decided over a design session is a six-tier hierarchy — most of
39
39
 
40
40
  ### 1. The hierarchy is a configurable preset (onboarding)
41
41
 
42
- The tier set is host-configured, not hardcoded — the [ADR 0062](<redacted>.md) core/host pattern applied to the work model.
42
+ The tier set is host-configured, not hardcoded — the [ADR 0062](0062-medusa-instance-model-decoupling.md) core/host pattern applied to the work model.
43
43
 
44
44
  - A new **`config/hierarchy.json`** (joins `branding.json` / `modules.json` as host config; loaded by a `hierarchy-config.js` mirroring `src/modules.js`) declares the tiers — names, order, and which tier carries **scope**, **membership**, and **criteria**. Example ships the six-tier preset above; the project owner fills/edits it **during onboarding**.
45
45
  - **v1 scope of "editable":** the standard tier set with owner-set labels, enable/disable, and which tier owns scope/criteria/membership. Fully *arbitrary* custom tier graphs are a later extension — explicitly not built now.
@@ -48,7 +48,7 @@ The tier set is host-configured, not hardcoded — the [ADR 0062](<redacted>.md)
48
48
 
49
49
  - **New `goals` table** — sits between `versions` and `done_when_criteria`. New (not `parent_task_id`: one-level, task lifecycle; not `done_when_criteria`: that *is* the criteria tier). Carries: `version_id`, `title`/`description`, **`scope_modules text[]`** (the wall), `status` (`open|achieved|archived`), `created_by`, `succeeded_by_goal_id` (rescope carry-forward).
50
50
  - **Goals are shared, not owned** — a new **`goal_members`** table (many builders ↔ one goal; `lead`/`member` roles). **Membership**, not a single assignee, is what grants bounded task authoring.
51
- - **Criteria re-parent under goals** — `done_when_criteria` gains a `goal_id` (backfill existing version criteria under a per-version default goal). A version is "done" when all its goals are achieved; the `/status` rollup becomes **Version → Goals → Criteria → Tasks** (extends [ADR 0025](<redacted>.md)).
51
+ - **Criteria re-parent under goals** — `done_when_criteria` gains a `goal_id` (backfill existing version criteria under a per-version default goal). A version is "done" when all its goals are achieved; the `/status` rollup becomes **Version → Goals → Criteria → Tasks** (extends [ADR 0025](0025-structured-criterion-task-link.md)).
52
52
  - **Tasks** gain `goal_id`; sub-tasks remain `parent_task_id`; a task fulfils a criterion via the existing `task_criteria` link.
53
53
 
54
54
  ### 3. Bounded task authoring (membership grants it; the create-time gate)
@@ -56,17 +56,17 @@ The tier set is host-configured, not hardcoded — the [ADR 0062](<redacted>.md)
56
56
  - **`POST /goals`** — `requireRank('metic','archon')`; **Archon-only when `scope_modules` includes a `protected` module.**
57
57
  - **`POST /goals/:id/join` / `leave`** — open join for normal goals; **joining a sensitive-scope goal needs Archon approval** (reuse the access-request pattern, [`access-requests.js`](../../src/bongos/routes/access-requests.js)).
58
58
  - **`POST /goals/:id/tasks`** — `requireBuilder` + an in-handler gate (the maneuverability grant), ordered + fail-closed: goal `open` and **caller is a member** (or Archon); version guards reused from `POST /tasks`; **scope subset** — every `touches[]` element covered by the goal's `scope_modules` globs (`touchesOverlap`, [`path-match.js`](../../src/bongos/path-match.js)); **protected-path block** — `checkPermissionPaths` ([`permission-path-check.js`](../../src/bongos/permission-path-check.js)) so a sub-Metic member cannot author a task touching the protected core; then `db.createTask` stamping `goal_id`. `POST /tasks` / `PATCH /tasks/:id` stay byte-identical (Archon-only) for ungoverned creation.
59
- - **Rank floor is auto-derived, not a bespoke cap.** Per [ADR 0084](<redacted>.md), a created task's `requires_rank` is auto-derived from its touches + sensitivity (`deriveRequiredRank` → `metic` for protected/sensitive, else `xenos`) and can only be raised. So a goal member need not (and cannot) self-set a rank that escapes their own gate — and a sensitive task auto-floors to `metic`, which a sub-Metic author could not claim. No new cap mechanism; this composes with the one that already exists.
59
+ - **Rank floor is auto-derived, not a bespoke cap.** Per [ADR 0084](0084-auto-derived-per-task-rank-floor.md), a created task's `requires_rank` is auto-derived from its touches + sensitivity (`deriveRequiredRank` → `metic` for protected/sensitive, else `xenos`) and can only be raised. So a goal member need not (and cannot) self-set a rank that escapes their own gate — and a sensitive task auto-floors to `metic`, which a sub-Metic author could not claim. No new cap mechanism; this composes with the one that already exists.
60
60
 
61
61
  ### 4. The scope wall (set by the planner, never self-granted; "ask to widen")
62
62
 
63
- - **New `src/bongos/module-scope-map.js`** — each module key → its path globs + a `protected` flag, for the full ~16-module roster from the [modular-architecture design](../design/modular-architecture/02-module-map.md). `protected: true` where globs intersect `PROTECTED_GLOBS` ([ADR 0043](<redacted>.md)) — the lifecycle/ship-pipeline, migrations, security, authz core. It **auto-tightens** as [ADR 0083](<redacted>.md) moves code into `modules/<key>/`, converging on that ADR's task→module affinity (where `touches[]` retires in favour of the module label + a ship-time diff⊆module check). The carve precedes the feature (Lars: "carve more modules first").
63
+ - **New `src/bongos/module-scope-map.js`** — each module key → its path globs + a `protected` flag, for the full ~16-module roster from the [modular-architecture design](../design/modular-architecture/02-module-map.md). `protected: true` where globs intersect `PROTECTED_GLOBS` ([ADR 0043](0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md)) — the lifecycle/ship-pipeline, migrations, security, authz core. It **auto-tightens** as [ADR 0083](0083-modular-architecture-strangler-build-plan.md) moves code into `modules/<key>/`, converging on that ADR's task→module affinity (where `touches[]` retires in favour of the module label + a ship-time diff⊆module check). The carve precedes the feature (Lars: "carve more modules first").
64
64
  - A goal's `scope_modules` is set by the assigner at planning time — the **one moment scope is defined**, which is precisely why it is **never self-granted**. Widening goes through a request a trusted rank approves (Archon for a protected module).
65
65
 
66
66
  ### 5. Dependencies
67
67
 
68
68
  - **One polymorphic "blocked-until-done" edge** — a new `dependencies(from_kind, from_id, to_kind, to_id)` over `{task, goal, criterion}`; the existing `tasks.dependencies[]` (task→task) migrates in. "Done" = task/sub-task `shipped`, criterion `satisfied`, goal `achieved`.
69
- - **One enforcement point** — it resolves down to the existing **claim gate** ([ADR 0015](<redacted>.md)): claiming a task checks its own deps plus deps inherited from its goal/criterion; achieving/shipping a node auto-promotes its dependents.
69
+ - **One enforcement point** — it resolves down to the existing **claim gate** ([ADR 0015](0015-task-dependencies-and-auto-promotion.md)): claiming a task checks its own deps plus deps inherited from its goal/criterion; achieving/shipping a node auto-promotes its dependents.
70
70
  - **Cross-goal and cross-version is allowed** (Lars, 2026-06-23). A dependency is a **reference, not a grant** — it never widens module scope, so cross-module deps are safe; cross-goal deps become the visible coordination contract between two shared workspaces. Containment (the tree) is never a dependency; the graph is acyclic.
71
71
 
72
72
  ### 6. Achievement (auto-flag → planner review → auto-achieve) + lifecycle
@@ -78,19 +78,19 @@ The tier set is host-configured, not hardcoded — the [ADR 0062](<redacted>.md)
78
78
 
79
79
  ### 7. How the boundary holds (reuse + defense-in-depth)
80
80
 
81
- The create-time gate sees only *declared* touches (advisory — git merge is the real collision detector, [ADR 0049](<redacted>.md)), so it is the first filter, **not** the enforcement boundary. The existing **ship-time gates remain authoritative on the real diff**: the grader's `permissionPathPrePass`/`routeRankPrePass` + `serverSideGuards` ([`grader.js`](../../src/bongos/grader.js)), the `gate-review` ESCALATE floor, and the post-push `main-audit`. A mis-declared task still cannot *merge* if its real diff hits protected paths. Two CI fitness checks ([`fitness.js`](../../scripts/gds/fitness.js)) guard drift: goal routes are pinned in `route-rank-check.EXPECTED_RANKS`, and the scope code must *import* `PROTECTED_GLOBS`, never re-declare it.
81
+ The create-time gate sees only *declared* touches (advisory — git merge is the real collision detector, [ADR 0049](0049-split-parallel-safety-contract.md)), so it is the first filter, **not** the enforcement boundary. The existing **ship-time gates remain authoritative on the real diff**: the grader's `permissionPathPrePass`/`routeRankPrePass` + `serverSideGuards` ([`grader.js`](../../src/bongos/grader.js)), the `gate-review` ESCALATE floor, and the post-push `main-audit`. A mis-declared task still cannot *merge* if its real diff hits protected paths. Two CI fitness checks ([`fitness.js`](../../scripts/gds/fitness.js)) guard drift: goal routes are pinned in `route-rank-check.EXPECTED_RANKS`, and the scope code must *import* `PROTECTED_GLOBS`, never re-declare it.
82
82
 
83
83
  ### Deferred (explicit non-decisions)
84
84
 
85
- - **Rewards** — whether *achieving a goal* earns anything beyond the per-task cost-plus already paid ([ADR 0054](<redacted>.md)), and how any reward splits among a goal's members. The leaning is karma by default (budget-safe, since example are real money) with contribution-weighted splits, but this is **not yet decided** and rides a follow-on.
86
- - **A sub-Metic builder joining a protected-scope goal** — letting a newcomer work *inside* the dangerous core under a tightly-scoped, Archon-granted goal amends the [ADR 0043](<redacted>.md) hard floor (and needs the ship-time gates to become goal-aware). Deliberately **last**, behind its own security-reviewed ADR. Until then, protected-scope goals require a Metic+ holder.
85
+ - **Rewards** — whether *achieving a goal* earns anything beyond the per-task cost-plus already paid ([ADR 0054](0054-session-token-reward-cost-plus.md)), and how any reward splits among a goal's members. The leaning is karma by default (budget-safe, since example are real money) with contribution-weighted splits, but this is **not yet decided** and rides a follow-on.
86
+ - **A sub-Metic builder joining a protected-scope goal** — letting a newcomer work *inside* the dangerous core under a tightly-scoped, Archon-granted goal amends the [ADR 0043](0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md) hard floor (and needs the ship-time gates to become goal-aware). Deliberately **last**, behind its own security-reviewed ADR. Until then, protected-scope goals require a Metic+ holder.
87
87
  - **An AI relevance / anti-hack judge** at create/claim time (reusing the grader subagent harness; advisory-first, flag-for-Metic, never hard-blocking a newcomer) — a later phase; the deterministic scope + protected-path gates ship first.
88
88
 
89
89
  ---
90
90
 
91
91
  ## The build plan (phases → planning-session tasks)
92
92
 
93
- Each phase ships independently; implementing tasks are created via `/planning-session` under the live internal version (a criterion cluster alongside the [ADR 0083](<redacted>.md) BV1 module work).
93
+ Each phase ships independently; implementing tasks are created via `/planning-session` under the live internal version (a criterion cluster alongside the [ADR 0083](0083-modular-architecture-strangler-build-plan.md) BV1 module work).
94
94
 
95
95
  | Phase | Delivers | Depends on |
96
96
  |---|---|---|
@@ -107,16 +107,16 @@ Each phase ships independently; implementing tasks are created via `/planning-se
107
107
  - **Reuse `parent_task_id` for goals (a goal = a parent task) — rejected.** One-level cap ([`hierarchy.js`](../../src/bongos/hierarchy.js)), wrong lifecycle (a goal is a standing grant, not shippable work that earns credit on ship), and a task has no place for scope or membership.
108
108
  - **Reuse `done_when_criteria` as goals — rejected.** That table *is* the criteria tier; overloading it with membership + a creation grant conflates "definition of done" with "who may do work." A goal *links to* criteria; it is not one.
109
109
  - **Single-owner goals — rejected** (Lars). Goals are shared workspaces; a single assignee would force mega-claims and block collaboration. Membership grants the authority; contribution (not membership alone) is what any future reward weights on.
110
- - **A bespoke per-task rank cap at goal-create — rejected in favour of [ADR 0084](<redacted>.md).** The auto-derived floor already prevents a member minting a task that escapes their gate; a second mechanism would be a second list that drifts (the SEC [#863](https://example.com/builders#/task/863) failure mode).
110
+ - **A bespoke per-task rank cap at goal-create — rejected in favour of [ADR 0084](0084-auto-derived-per-task-rank-floor.md).** The auto-derived floor already prevents a member minting a task that escapes their gate; a second mechanism would be a second list that drifts (the SEC [#863](https://example.com/builders#/task/863) failure mode).
111
111
  - **Restrict dependencies to within a single goal — rejected** (Lars). Real dependencies cross goals; self-containment forces mega-goals or fakery. A dependency is only a reference, so cross-goal is safe and surfaces coordination.
112
- - **Hard-code the hierarchy / build a full tier-editor UI now — both rejected.** A config preset edited at onboarding (the [ADR 0062](<redacted>.md) pattern) is the right middle: configurable per instance without a heavy runtime editor.
112
+ - **Hard-code the hierarchy / build a full tier-editor UI now — both rejected.** A config preset edited at onboarding (the [ADR 0062](0062-medusa-instance-model-decoupling.md) pattern) is the right middle: configurable per instance without a heavy runtime editor.
113
113
  - **Open task creation to all ranks generally (no goal) — rejected.** That removes the scope wall entirely; the whole safety model is that authority is *bounded by an assigned goal's modules*, not granted by rank alone.
114
114
 
115
115
  ---
116
116
 
117
117
  ## Consequences
118
118
 
119
- **Positive.** Lower-rank builders gain real maneuverability (author + organize their own work) without weakening the trust boundary — authority is bounded by an assigned, module-scoped goal and enforced server-side. It fills [ADR 0083](<redacted>.md) Rule 5 and reuses almost everything (versions, criteria, tasks, sub-tasks, the protected-path matcher, the auto-derived rank floor, the dependency/auto-promotion engine, the access-request pattern, the idea-triage cadence shape). The "carve more modules first" map is also an ADR-0083 deliverable. Each phase ships independently and is individually revertible.
119
+ **Positive.** Lower-rank builders gain real maneuverability (author + organize their own work) without weakening the trust boundary — authority is bounded by an assigned, module-scoped goal and enforced server-side. It fills [ADR 0083](0083-modular-architecture-strangler-build-plan.md) Rule 5 and reuses almost everything (versions, criteria, tasks, sub-tasks, the protected-path matcher, the auto-derived rank floor, the dependency/auto-promotion engine, the access-request pattern, the idea-triage cadence shape). The "carve more modules first" map is also an ADR-0083 deliverable. Each phase ships independently and is individually revertible.
120
120
 
121
121
  **Negative / cost.** Schema changes to two core tables (`done_when_criteria` re-parenting under goals; `tasks.goal_id`) plus new `goals`/`goal_members`/`dependencies` tables and a criteria backfill — touches the lifecycle/`migrations` core, so those PRs ride the gate hard-floor and need owner sign-off (the boundary working as designed). The `/status` rollup, `/planning-session`, and the criterion-satisfy route all change. It is a deliberate **widening of the trust boundary** (sub-Metic builders can now create tasks), justified by the layered scope + protected-path + auto-rank-floor + ship-gate defenses; that widening is exactly why this is its own ADR.
122
122
 
@@ -1,7 +1,7 @@
1
1
  # ADR 0087 — Bongos app architecture + the model-agnostic feedback handoff contract
2
2
 
3
3
  **Date:** 2026-06-26
4
- **Context:** Bongos App `BONGOS-V1` / criterion C4 (the feedback loop closes — capture lands in a coding agent), task [#1312](https://example.com/builders#/task/1312) (`BV1.R33`). Records the architecture the R01–R14 rungs built and pins the contract the three handoff paths (R12 [#1307](https://example.com/builders#/task/1307), R13 [#1308](https://example.com/builders#/task/1308), R14 [#1309](https://example.com/builders#/task/1309)) share. Builds on [ADR 0045](<redacted>.md) (the Dev Box desktop app, now absorbed), [ADR 0072](<redacted>.md) (signing posture), [ADR 0083](<redacted>.md) (the modular core), and the [ADR 0062](<redacted>.md) core↔host split.
4
+ **Context:** Bongos App `BONGOS-V1` / criterion C4 (the feedback loop closes — capture lands in a coding agent), task [#1312](https://example.com/builders#/task/1312) (`BV1.R33`). Records the architecture the R01–R14 rungs built and pins the contract the three handoff paths (R12 [#1307](https://example.com/builders#/task/1307), R13 [#1308](https://example.com/builders#/task/1308), R14 [#1309](https://example.com/builders#/task/1309)) share. Builds on [ADR 0045](0045-devbox-desktop-app.md) (the Dev Box desktop app, now absorbed), [ADR 0072](0072-bongos-app-mac-signed-first-windows-deferred.md) (signing posture), [ADR 0083](0083-modular-architecture-strangler-build-plan.md) (the modular core), and the [ADR 0062](0062-medusa-instance-model-decoupling.md) core↔host split.
5
5
  **Status:** Accepted.
6
6
  **Track:** `internal` (development system → the Cloud Bongos desktop app line; bongos succeeds the GDS as the primary builder surface after GDS-V4).
7
7
 
@@ -13,7 +13,7 @@ This ADR records (a) the app's overall shape, and (b) the one contract all the h
13
13
 
14
14
  ## The architecture (what R01–R14 built)
15
15
 
16
- **One umbrella desktop app that absorbs the Dev Box app.** `bongos-app/` is the single signed Cloud Bongos desktop app ([#1298](https://example.com/builders#/task/1298)). The existing Dev Box app ([ADR 0045](<redacted>.md)) becomes a *module* of it rather than a sibling install — one Electron shell, one app-pairing auth (`~/.config/otb/gds-session.json`), one branded `/downloads` distribution, one in-app updater, one Apple Developer ID ([ADR 0072](<redacted>.md)). The result offers both the Dev Box switch and the new feedback toolbar.
16
+ **One umbrella desktop app that absorbs the Dev Box app.** `bongos-app/` is the single signed Cloud Bongos desktop app ([#1298](https://example.com/builders#/task/1298)). The existing Dev Box app ([ADR 0045](0045-devbox-desktop-app.md)) becomes a *module* of it rather than a sibling install — one Electron shell, one app-pairing auth (`~/.config/otb/gds-session.json`), one branded `/downloads` distribution, one in-app updater, one Apple Developer ID ([ADR 0072](0072-bongos-app-mac-signed-first-windows-deferred.md)). The result offers both the Dev Box switch and the new feedback toolbar.
17
17
 
18
18
  **A three-stage pipeline: capture → synthesize → handoff.**
19
19
 
@@ -23,7 +23,7 @@ This ADR records (a) the app's overall shape, and (b) the one contract all the h
23
23
 
24
24
  **The Rung-3 capture floor; element-select deferred to V2.** V1 captures at the **visual** rung — pixels (screen region + frames + freeze-frame markup) plus voice. This is the robust floor: it works over *any* app on screen with no per-app integration, and needs only Screen-Recording + Microphone grants. Higher-fidelity **element-level reads** (resolving the actual UI element under the cursor via macOS Accessibility / a DOM bridge — the "rung-2" reads) are **deferred to V2**: the permission wizard (R05) requests Accessibility *lazily*, only when those reads land, never up front. Capturing pixels-not-elements is a deliberate V1 scope cut, not an accident — it keeps V1 universal and the permission ask minimal.
25
25
 
26
- **Bongos as the GDS successor.** The longer arc ([ADR 0072](<redacted>.md) track line): the Bongos app is where building moves *after* GDS-V4 — the feedback loop (see → say → ship) becomes the primary way an owner directs AI builders, with the GDS's task/claim/ship machinery underneath. This ADR is the first architectural record of that intent.
26
+ **Bongos as the GDS successor.** The longer arc ([ADR 0072](0072-bongos-app-mac-signed-first-windows-deferred.md) track line): the Bongos app is where building moves *after* GDS-V4 — the feedback loop (see → say → ship) becomes the primary way an owner directs AI builders, with the GDS's task/claim/ship machinery underneath. This ADR is the first architectural record of that intent.
27
27
 
28
28
  ## Decision — the model-agnostic handoff contract
29
29
 
@@ -41,9 +41,9 @@ MCP's stdio transport is newline-delimited JSON-RPC 2.0. The four methods a sing
41
41
 
42
42
  ## Consequences
43
43
 
44
- - **Adding a fourth agent is an adapter, not a redesign.** A new target (Cursor, Codex) consumes the *same* bundle via the *same* `resolveLatest()` — the contract already says "prompt text + absolute image paths." The handoff layer is the seam ([ADR 0081](<redacted>.md)'s swappable-adapter pattern, applied to feedback).
44
+ - **Adding a fourth agent is an adapter, not a redesign.** A new target (Cursor, Codex) consumes the *same* bundle via the *same* `resolveLatest()` — the contract already says "prompt text + absolute image paths." The handoff layer is the seam ([ADR 0081](0081-tool-agnostic-design-layer.md)'s swappable-adapter pattern, applied to feedback).
45
45
  - **The `latest` pointer is the single source of truth for "newest bundle."** A reader never scans for itself unless the pointer is missing (then `resolveLatest()` self-heals by scanning for the newest dir with a `prompt.md`). `latest.json` is authoritative cross-platform; the `latest/` symlink is a convenience that may be absent on Windows without symlink privilege — readers never depend on it.
46
46
  - **`writeBundle` now has a side effect beyond writing the bundle** (it records `latest`). This is intentional and best-effort: a pointer failure is swallowed and never loses the bundle already on disk.
47
47
  - **Frames are paths everywhere, base64 nowhere.** Enforced by the bundle format (R11) and re-asserted by the R14 tool result + the test suite. The day an agent needs bytes, it reads the path — the cap-safe choice.
48
48
  - **Element-select is the headline V2 lift.** When rung-2 element reads land, the bundle gains structured element context *alongside* the pixels; the handoff contract (paths, not payloads) does not change.
49
- - **Budget: $0 new recurring cost.** Zero-dependency MCP, on-device transcription, local file bundles. The app rides the already-paid Apple Developer ID ([ADR 0072](<redacted>.md)).
49
+ - **Budget: $0 new recurring cost.** Zero-dependency MCP, on-device transcription, local file bundles. The app rides the already-paid Apple Developer ID ([ADR 0072](0072-bongos-app-mac-signed-first-windows-deferred.md)).
@@ -1,6 +1,6 @@
1
1
  # ADR 0087 — Compete with Cursor on governance, not tooling
2
2
 
3
- **Status:** Accepted (2026-06-24) · task [#1505](https://example.com/builders#/task/1505) · **companion to** [ADR 0083](<redacted>.md) (modular-architecture strangler build plan); builds on [ADR 0016](<redacted>.md) (server-enforced trust boundary), [ADR 0043](<redacted>.md) (rank floor on permission paths), [ADR 0061](<redacted>.md) (context-layer decomposition), [ADR 0081](<redacted>.md) (tool-agnostic design layer), [ADR 0024](<redacted>.md) (MAS). **Red-teams** [`docs/design/modular-architecture/`](../design/modular-architecture/).
3
+ **Status:** Accepted (2026-06-24) · task [#1505](https://example.com/builders#/task/1505) · **companion to** [ADR 0083](0083-modular-architecture-strangler-build-plan.md) (modular-architecture strangler build plan); builds on [ADR 0016](0016-trust-boundary-server-enforced-permissions.md) (server-enforced trust boundary), [ADR 0043](0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md) (rank floor on permission paths), [ADR 0061](0061-context-layer-decomposition.md) (context-layer decomposition), [ADR 0081](0081-tool-agnostic-design-layer.md) (tool-agnostic design layer), [ADR 0024](0024-multi-agent-system-architecture.md) (MAS). **Red-teams** [`docs/design/modular-architecture/`](../design/modular-architecture/).
4
4
 
5
5
  ## Context
6
6