@bongos/core 1.21.176 → 1.21.178

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 (214) hide show
  1. package/.bongos-core.json +186 -496
  2. package/.claude/skills/planning-session/SKILL.md +2 -2
  3. package/clients/bongos-client/README.md +1 -1
  4. package/clients/bongos-client/bongos-client.global.js +0 -6
  5. package/clients/bongos-client/index.cjs +0 -6
  6. package/clients/bongos-client/index.d.ts +0 -6
  7. package/clients/bongos-client/index.mjs +0 -6
  8. package/config/scheduled-routines.json +3 -8
  9. package/docs/adr/0042-builder-self-deploy-ci-auto-merge.md +3 -2
  10. package/docs/adr/0091-bounding-the-kernel-and-db-carve.md +1 -1
  11. package/docs/adr/0093-tranche-2-core-carve-sequence.md +1 -1
  12. package/docs/api/openapi.json +1 -87
  13. package/docs/api-reference.md +1 -8
  14. package/docs/canonical-permissions.md +4 -4
  15. package/docs/copy-inventory.md +25 -39
  16. package/docs/copy-registry.json +73 -200
  17. package/docs/file-map.md +6 -11
  18. package/docs/handoff-template.md +1 -1
  19. package/docs/module-api-changelog.md +4 -0
  20. package/docs/modules-contract.md +2 -2
  21. package/docs/onboarding/diagrams/README.md +3 -7
  22. package/docs/onboarding/diagrams/assertions.json +3 -3
  23. package/docs/page-inventory.json +4 -7
  24. package/docs/page-readings.json +1520 -1569
  25. package/docs/recipes/ops-gotchas.md +3 -1
  26. package/modules/autonomy/db.js +9 -0
  27. package/modules/autonomy/module.json +2 -2
  28. package/modules/autonomy/pollers/daily-checks.js +262 -0
  29. package/modules/autonomy/pollers/routine-timers.js +7 -5
  30. package/modules/autonomy/rank-roles.js +64 -0
  31. package/modules/autonomy/server-schedule.js +37 -0
  32. package/modules/government/catalog.js +10 -7
  33. package/modules/government/decision-board.js +0 -1
  34. package/modules/government/decision-rules.js +0 -1
  35. package/modules/government/docket.js +0 -1
  36. package/modules/government/protected-surfaces.js +1 -1
  37. package/modules/government/protected-surfaces.json +2 -3
  38. package/modules/hall-ui/public/atlas.html +1 -1
  39. package/modules/hall-ui/public/blockers.html +1 -1
  40. package/modules/hall-ui/public/board-room.html +1 -1
  41. package/modules/hall-ui/public/city.html +1 -1
  42. package/modules/hall-ui/public/collab.html +1 -1
  43. package/modules/hall-ui/public/commands.html +1 -1
  44. package/modules/hall-ui/public/copy-desk.html +1 -1
  45. package/modules/hall-ui/public/deploy.html +1 -1
  46. package/modules/hall-ui/public/diagrams.html +1 -1
  47. package/modules/hall-ui/public/drachmae.html +1 -1
  48. package/modules/hall-ui/public/fleet.html +1 -1
  49. package/modules/hall-ui/public/gate.css +4 -26
  50. package/modules/hall-ui/public/gate.html +12 -27
  51. package/modules/hall-ui/public/gate.js +26 -176
  52. package/modules/hall-ui/public/gate.states.json +4 -22
  53. package/modules/hall-ui/public/goal-map.html +1 -1
  54. package/modules/hall-ui/public/goals.html +1 -1
  55. package/modules/hall-ui/public/government.html +1 -1
  56. package/modules/hall-ui/public/idea.html +1 -1
  57. package/modules/hall-ui/public/ideas.html +1 -1
  58. package/modules/hall-ui/public/index.html +1 -1
  59. package/modules/hall-ui/public/modules.html +1 -1
  60. package/modules/hall-ui/public/my-agents.html +1 -1
  61. package/modules/hall-ui/public/primer.html +1 -1
  62. package/modules/hall-ui/public/profile.html +1 -1
  63. package/modules/hall-ui/public/project-settings.html +1 -1
  64. package/modules/hall-ui/public/ranks.html +1 -1
  65. package/modules/hall-ui/public/roadmap.html +1 -1
  66. package/modules/hall-ui/public/roster.html +1 -1
  67. package/modules/hall-ui/public/sessions.html +1 -1
  68. package/modules/hall-ui/public/settings.html +1 -1
  69. package/modules/hall-ui/public/shell.js +1 -1
  70. package/modules/hall-ui/public/street-card.js +5 -9
  71. package/modules/hall-ui/public/street-desk.js +2 -2
  72. package/modules/hall-ui/public/street-inside.js +1 -1
  73. package/modules/hall-ui/public/street.html +1 -1
  74. package/modules/hall-ui/public/studio.html +1 -1
  75. package/modules/hall-ui/public/task.html +1 -1
  76. package/modules/hall-ui/public/thinking.html +1 -1
  77. package/modules/hall-ui/public/tweak-editor.html +1 -1
  78. package/modules/hall-ui/public/watch.html +1 -1
  79. package/modules/hall-ui/public/work.html +1 -1
  80. package/modules/lifecycle/matter-acts.js +0 -6
  81. package/modules/lifecycle/module.json +0 -1
  82. package/package-lock.json +2 -2
  83. package/package.json +1 -1
  84. package/release-notes.json +36 -0
  85. package/scripts/bongos/adopt-preflight.js +3 -3
  86. package/scripts/bongos/api-alias-caller-scan.js +2 -2
  87. package/scripts/bongos/audit-authorship.sh +1 -8
  88. package/scripts/bongos/audit-rank-roles.js +15 -56
  89. package/scripts/bongos/bump-version.js +46 -9
  90. package/scripts/bongos/codemod-rename-scripts-gds.js +0 -1
  91. package/scripts/bongos/diagram-facts.js +1 -1
  92. package/scripts/bongos/do-api.js +1 -1
  93. package/scripts/bongos/doc-cli-guard.js +2 -0
  94. package/scripts/bongos/doc-control-claims.js +2 -2
  95. package/scripts/bongos/fitness-checks-identity.js +4 -15
  96. package/scripts/bongos/gen-diagrams.js +3 -3
  97. package/scripts/bongos/government-walk.js +3 -9
  98. package/scripts/bongos/hard-floor.js +52 -0
  99. package/scripts/bongos/publish-manifest.js +3 -3
  100. package/scripts/bongos/pulse.js +5 -3
  101. package/scripts/bongos/routine-schedule.js +38 -3
  102. package/scripts/bongos/run-unit-tests.js +17 -5
  103. package/scripts/bongos/ship-regen.js +2 -3
  104. package/scripts/gds/{goal-names.js → hard-floor.js} +3 -4
  105. package/scripts/security/dep-audit.js +50 -124
  106. package/src/bongos/module-scope-map.js +2 -2
  107. package/src/bongos/permission-path-check.js +1 -1
  108. package/src/bongos/route-rank-check.js +1 -8
  109. package/src/bongos/routes.js +1 -2
  110. package/src/module-api.js +1 -1
  111. package/src/modules.js +1 -1
  112. package/tests/acclaim_feed_evidence_db.mjs +42 -23
  113. package/tests/adr_0089_scope.mjs +7 -5
  114. package/tests/autonomy_daily_checks.mjs +201 -0
  115. package/tests/bump_version.mjs +52 -18
  116. package/tests/claude_materialize.mjs +12 -12
  117. package/tests/copy_desk_flags_db.mjs +22 -14
  118. package/tests/effective_visibility_predicate.mjs +0 -18
  119. package/tests/gating_review_retired.mjs +1 -1
  120. package/tests/government_act_alone_buildings.mjs +1 -3
  121. package/tests/government_board_membership_db.mjs +35 -22
  122. package/tests/government_protected_surfaces.mjs +29 -13
  123. package/tests/governor_docket.mjs +0 -2
  124. package/tests/governor_matter_acts.mjs +6 -8
  125. package/tests/hall_city.mjs +1 -1
  126. package/tests/hall_matter_card.mjs +2 -2
  127. package/tests/hall_oversight_world.mjs +16 -12
  128. package/tests/hall_street_desk.mjs +4 -3
  129. package/tests/hall_street_inside.mjs +1 -1
  130. package/tests/helpers.mjs +34 -0
  131. package/tests/howto_state.mjs +33 -56
  132. package/tests/howto_state_db.mjs +68 -0
  133. package/tests/idea_credit_streams_db.mjs +11 -3
  134. package/tests/integration_parked_ratchet.mjs +7 -1
  135. package/tests/nav_permission_atoms.mjs +1 -1
  136. package/tests/page_notes_db.mjs +12 -8
  137. package/tests/page_tweak_no_rearm.mjs +50 -0
  138. package/tests/publish_manifest.mjs +64 -0
  139. package/tests/routine_capture_kind.mjs +18 -7
  140. package/tests/routine_schedule.mjs +42 -0
  141. package/tests/search_isolation.mjs +5 -103
  142. package/tests/search_isolation_db.mjs +140 -0
  143. package/tests/session_earnings_mirror_db.mjs +2 -0
  144. package/tests/workflow_exec_paths.mjs +9 -11
  145. package/modules/lifecycle/routes/gate-approvals.js +0 -299
  146. package/scripts/bongos/artifact-staleness.js +0 -267
  147. package/scripts/bongos/ci-grade.js +0 -82
  148. package/scripts/bongos/classify-discipline.js +0 -153
  149. package/scripts/bongos/codemod-rename-src-gds.js +0 -145
  150. package/scripts/bongos/coreB-carve-proof.sh +0 -725
  151. package/scripts/bongos/gate-review.js +0 -330
  152. package/scripts/bongos/goal-names.js +0 -102
  153. package/scripts/bongos/rename-goals.js +0 -109
  154. package/scripts/bongos/seed-adopt-tasks.js +0 -75
  155. package/scripts/bongos/seed-api-contract-goal-tasks.js +0 -141
  156. package/scripts/bongos/seed-board-room-tasks.js +0 -196
  157. package/scripts/bongos/seed-bongos-app-tasks.js +0 -294
  158. package/scripts/bongos/seed-bongos-coreB-tranche1-tasks.js +0 -81
  159. package/scripts/bongos/seed-bongos-coreB-tranche2-tasks.js +0 -100
  160. package/scripts/bongos/seed-bongos-goal-hierarchy-tasks.js +0 -307
  161. package/scripts/bongos/seed-bongos-module-system-tasks.js +0 -346
  162. package/scripts/bongos/seed-bongos-tasks.js +0 -214
  163. package/scripts/bongos/seed-bongos-v1-seo-tasks.js +0 -104
  164. package/scripts/bongos/seed-bv1-community-tasks.js +0 -131
  165. package/scripts/bongos/seed-bv1-privacy-invites-tasks.js +0 -133
  166. package/scripts/bongos/seed-bv1-profile-page-tasks.js +0 -161
  167. package/scripts/bongos/seed-bv1-r01-delta-tasks.js +0 -154
  168. package/scripts/bongos/seed-bv2-tweak-mode-tasks.js +0 -277
  169. package/scripts/bongos/seed-gds-v4-tasks.js +0 -624
  170. package/scripts/bongos/seed-governance-tasks.js +0 -340
  171. package/scripts/bongos/seed-medusa-tasks.js +0 -440
  172. package/scripts/bongos/seed-module-upstreaming.js +0 -219
  173. package/scripts/bongos/seed-productization-tasks.js +0 -235
  174. package/scripts/bongos/seed-project-admin-console-tasks.js +0 -88
  175. package/scripts/bongos/seed-provisioning-tasks.js +0 -83
  176. package/scripts/bongos/seed-strict-versioning-tasks.js +0 -275
  177. package/scripts/bongos/seed-v2-world-tasks.js +0 -283
  178. package/scripts/gds/artifact-staleness.js +0 -7
  179. package/scripts/gds/ci-grade.js +0 -7
  180. package/scripts/gds/classify-discipline.js +0 -7
  181. package/scripts/gds/codemod-rename-src-gds.js +0 -7
  182. package/scripts/gds/coreB-carve-proof.sh +0 -8
  183. package/scripts/gds/gate-review.js +0 -7
  184. package/scripts/gds/rename-goals.js +0 -7
  185. package/scripts/gds/seed-adopt-tasks.js +0 -7
  186. package/scripts/gds/seed-api-contract-goal-tasks.js +0 -7
  187. package/scripts/gds/seed-board-room-tasks.js +0 -6
  188. package/scripts/gds/seed-bongos-app-tasks.js +0 -7
  189. package/scripts/gds/seed-bongos-coreB-tranche1-tasks.js +0 -7
  190. package/scripts/gds/seed-bongos-coreB-tranche2-tasks.js +0 -7
  191. package/scripts/gds/seed-bongos-goal-hierarchy-tasks.js +0 -7
  192. package/scripts/gds/seed-bongos-module-system-tasks.js +0 -7
  193. package/scripts/gds/seed-bongos-tasks.js +0 -7
  194. package/scripts/gds/seed-bongos-v1-seo-tasks.js +0 -6
  195. package/scripts/gds/seed-bv1-community-tasks.js +0 -6
  196. package/scripts/gds/seed-bv1-privacy-invites-tasks.js +0 -6
  197. package/scripts/gds/seed-bv1-profile-page-tasks.js +0 -6
  198. package/scripts/gds/seed-bv1-r01-delta-tasks.js +0 -6
  199. package/scripts/gds/seed-bv2-tweak-mode-tasks.js +0 -6
  200. package/scripts/gds/seed-gds-v4-tasks.js +0 -7
  201. package/scripts/gds/seed-governance-tasks.js +0 -7
  202. package/scripts/gds/seed-medusa-tasks.js +0 -7
  203. package/scripts/gds/seed-module-upstreaming.js +0 -7
  204. package/scripts/gds/seed-productization-tasks.js +0 -7
  205. package/scripts/gds/seed-project-admin-console-tasks.js +0 -6
  206. package/scripts/gds/seed-provisioning-tasks.js +0 -7
  207. package/scripts/gds/seed-strict-versioning-tasks.js +0 -7
  208. package/scripts/gds/seed-v2-world-tasks.js +0 -7
  209. package/scripts/migrate_cost_ledger.sh +0 -178
  210. package/tests/artifact_staleness.mjs +0 -207
  211. package/tests/gate_approvals.mjs +0 -611
  212. package/tests/gate_review.mjs +0 -152
  213. package/tests/goal_names.mjs +0 -120
  214. package/tests/newcomer_generator.mjs +0 -48
@@ -303,7 +303,7 @@ Once the spec is finalized (Phase 4), **read `docs/specs/<ver>-<goal-slug>.md` a
303
303
  - **For a brand-new version scaffolded from scratch (DR / a fresh instance):** put the `INSERT INTO done_when_criteria` (with `goal_id`, `ON CONFLICT ... DO UPDATE`) in **`migrations/instance/<NN>_<ver_slug>_planning_seed.sql`** — and recreate the goal idempotently in the same file (the goal is a runtime row a replay won't have). Applies only under `GDS_APPLY_INSTANCE_SEEDS=1`.
304
304
  - **Migration** at `migrations/<NN>_<ver_slug>_planning_seed.sql` (CORE — platform-universal, non-scope-truth changes only): `UPDATE versions SET done_when = ...` and `UPDATE tasks` for existing-task priority + V##.R## title prefix (guarded by `WHERE title NOT LIKE 'V<ver>.R%'`). **Do NOT put versions/goals/`done_when_criteria` INSERTs here** — that's scope-truth and fails the `selfhost-boot` gate (ADR 0105).
305
305
 
306
- 3. **Write a seed script** at `scripts/bongos/seed-<ver_slug>-tasks.js` modeled on `scripts/bongos/seed-v3-tasks.js` containing:
306
+ 3. **Write a seed script** at `scripts/bongos/seed-<ver_slug>-tasks.js` modeled on `scripts/bongos/<redacted>.js` (or `<redacted>.js`) containing:
307
307
  - The TASKS array — one entry per net-new task with full description, kind, discipline, priority, est_minutes, manual_degree, credits_reward, **optional** `touches` (see below), optional `promoted_idea_id`, `depends_on_refs: ['R##', ...]` (the dep edges captured during brainstorm), AND **`criterion_ids: ['Cn', ...]`** — the done-when criterion(s) this task gates. The brainstorm in Phase 3 is already grouped by criterion, so this is just transcribing that grouping. **Use the criterion_id SLUG, not a positional `"Cn"` token.** `Cn` ranks over the whole VERSION's criteria, so on a version holding more than one goal it resolves to some other goal's criterion — which is how all 15 tasks of goal 1000071 were mislinked while the seed printed success (learning 1000188). Since task 1003108 the server **refuses** a positional ref on a multi-goal version (`400 ambiguous_criterion_ref`) rather than guessing, so a slug is the only ref that works there. The server resolves it against the task's version at create (ADR 0025 / task 438). **This replaces the old `**Criterion:** Cn` prose** — don't write that line anymore; pass `criterion_ids` instead so the task is linked in `task_criteria` at creation and `/status` counts it with no backfill.
308
308
  - **`touches` is now OPTIONAL (task 882 / [ADR 0049](../../../docs/adr/0049-split-parallel-safety-contract.md)).** Omit it (or leave it blank) unless you already know a tight file set and want the advisory overlap signal during the brainstorm. At first `/builder-ship` the server backfills `touches[]` from the real committed diff — the declared set becomes what git actually reported. Don't burn planning effort predicting file lists; a rough or absent prediction is fine and no longer ship-blocking.
309
309
  - **`requires_rank` AUTO-DERIVES — you don't hand-set it per task (task [#1498](https://example.com/builders#/task/1498) / [ADR 0084](../../../docs/adr/0084-auto-derived-per-task-rank-floor.md)).** On create the server floors a task at `metic` when it is `security_sensitive` or its `touches` reach the permission / authz / ship-grade / deploy / migration core (the same protected paths a sub-Metic builder can't push to); everything else stays the open `xenos` default. To deliberately gate a task **higher** than the auto-floor (e.g. owner-only work), pass `requires_rank: 'metic' | 'archon'` on the task — it can only RAISE the floor, never drop below it.
@@ -395,7 +395,7 @@ node scripts/bongos/api.js GET /api/bongos/inbox
395
395
  node scripts/bongos/api.js GET /api/bongos/versions/<id>/done-when
396
396
  ```
397
397
 
398
- Phase 5 writes use the same `POST /tasks`, `PATCH /inbox/:id` shape as `idea-triage` and `seed-v3-tasks.js`. Mirror those patterns rather than inventing new ones.
398
+ Phase 5 writes use the same `POST /tasks`, `PATCH /inbox/:id` shape as `idea-triage` and `scripts/bongos/<redacted>.js`. Mirror those patterns rather than inventing new ones.
399
399
 
400
400
  ## Tone for the user
401
401
 
@@ -5,7 +5,7 @@ A **generated**, zero-dependency typed client for the Bongos API — produced fr
5
5
  by hand; it regenerates when the spec changes, so it can never drift from the routes.
6
6
 
7
7
  - API version: **v1** (served at `/api/bongos/v1`)
8
- - 580 operations across 77 resource groups
8
+ - 578 operations across 76 resource groups
9
9
 
10
10
  ## Use it from your project
11
11
 
@@ -408,12 +408,6 @@ function createClient(opts = {}) {
408
408
  // POST /founding/start — rank: any-builder — POST /founding/start
409
409
  postFoundingStart: (args) => request("POST", "/founding/start", { hasBody: true }, args),
410
410
  },
411
- "gateApprovals": {
412
- // GET /gate-approvals — rank: metic+archon — GET /gate-approvals
413
- getGateApprovals: (args) => request("GET", "/gate-approvals", { hasBody: false }, args),
414
- // POST /gate-approvals/{pr}/approve — rank: archon — POST /gate-approvals/:pr/approve
415
- postGateApprovalsPrApprove: (args) => request("POST", "/gate-approvals/{pr}/approve", { hasBody: true }, args),
416
- },
417
411
  "github": {
418
412
  // GET /github/orgs — rank: any-builder — GET /github/orgs
419
413
  getGithubOrgs: (args) => request("GET", "/github/orgs", { hasBody: false }, args),
@@ -407,12 +407,6 @@ function createClient(opts = {}) {
407
407
  // POST /founding/start — rank: any-builder — POST /founding/start
408
408
  postFoundingStart: (args) => request("POST", "/founding/start", { hasBody: true }, args),
409
409
  },
410
- "gateApprovals": {
411
- // GET /gate-approvals — rank: metic+archon — GET /gate-approvals
412
- getGateApprovals: (args) => request("GET", "/gate-approvals", { hasBody: false }, args),
413
- // POST /gate-approvals/{pr}/approve — rank: archon — POST /gate-approvals/:pr/approve
414
- postGateApprovalsPrApprove: (args) => request("POST", "/gate-approvals/{pr}/approve", { hasBody: true }, args),
415
- },
416
410
  "github": {
417
411
  // GET /github/orgs — rank: any-builder — GET /github/orgs
418
412
  getGithubOrgs: (args) => request("GET", "/github/orgs", { hasBody: false }, args),
@@ -963,12 +963,6 @@ export interface BongosClient {
963
963
  /** POST /founding/start — rank: any-builder */
964
964
  postFoundingStart(args?: RequestArgs): Promise<ApiResponse>;
965
965
  };
966
- "gateApprovals": {
967
- /** GET /gate-approvals — rank: metic+archon */
968
- getGateApprovals(args?: RequestArgs): Promise<ApiResponse>;
969
- /** POST /gate-approvals/{pr}/approve — rank: archon */
970
- postGateApprovalsPrApprove(args?: RequestArgs): Promise<ApiResponse>;
971
- };
972
966
  "github": {
973
967
  /** GET /github/orgs — rank: any-builder */
974
968
  getGithubOrgs(args?: RequestArgs): Promise<ApiResponse>;
@@ -404,12 +404,6 @@ export function createClient(opts = {}) {
404
404
  // POST /founding/start — rank: any-builder — POST /founding/start
405
405
  postFoundingStart: (args) => request("POST", "/founding/start", { hasBody: true }, args),
406
406
  },
407
- "gateApprovals": {
408
- // GET /gate-approvals — rank: metic+archon — GET /gate-approvals
409
- getGateApprovals: (args) => request("GET", "/gate-approvals", { hasBody: false }, args),
410
- // POST /gate-approvals/{pr}/approve — rank: archon — POST /gate-approvals/:pr/approve
411
- postGateApprovalsPrApprove: (args) => request("POST", "/gate-approvals/{pr}/approve", { hasBody: true }, args),
412
- },
413
407
  "github": {
414
408
  // GET /github/orgs — rank: any-builder — GET /github/orgs
415
409
  getGithubOrgs: (args) => request("GET", "/github/orgs", { hasBody: false }, args),
@@ -3,25 +3,20 @@
3
3
  "defaults": { "scope": "instance-wide", "enabled": true, "requiresAutonomy": false },
4
4
  "routines": {
5
5
  "artifact-audit": { "scope": "instance-wide", "enabled": true, "cadence": "weekly", "requiresAutonomy": false, "note": "deterministic; task 1003200. Reads main's own history + tree, so it runs in CI (a vendored core is not a git repo) — .github/workflows/artifact-audit.yml." },
6
- "artifact-staleness": { "scope": "instance-wide", "enabled": true, "cadence": "daily", "requiresAutonomy": false, "note": "deterministic; task 1001930 / ADR 0110 pt.5. INSTANCE-SIDE ONLY, and the opposite of artifact-audit above: it reads the gitignored deploy-generated files on the serving machine's disk, which a CI checkout legitimately does not have — so it declares no cadence in its SKILL.md and no workflow fires it. This cadence is the hint the operator's own scheduler reads." },
7
6
  "bfg": { "scope": "instance-wide", "builderAware": true, "enabled": true, "cadence": "nightly", "requiresAutonomy": false, "note": "Parts A+B read-only + always-on; Part C (cross-builder write) is separately gated by BFG_WRITE_ENABLED + a provisioned principal token." },
8
7
  "bfg-session-eval": { "scope": "instance-wide", "builderAware": true, "enabled": true, "cadence": "nightly", "requiresAutonomy": false },
9
8
  "core-update-subscription": { "scope": "instance-wide", "enabled": true, "cadence": "15min", "requiresAutonomy": true, "note": "Patch-only auto-upgrade of subscribed consumer instances (ADR 0136 / task 2150). Default OFF + opt-in: the roster (config/update-subscriptions.json) ships empty, so this is a no-op until an operator arms autonomy AND lists an instance. Every upgrade is health-gated with auto-rollback (task 2149). CADENCE (task 1003674): this is the knob that decides how long a published release waits before a subscribed instance takes it — at 'daily' a builder's ship reached the live site up to 24h late, because everything upstream is already fast (CI publishes to npm within ~2 min of merge) and this sweep was the only slow step. 15min is the worst-case lag, not a re-check cost: the sweep exits immediately when the registry has nothing newer. FLOOR ~5min: an upgrading run takes ~2 min, and runs must not overlap. Installing the period is the operator's half — see docs/recipes/upgrading-the-core.md." },
10
- "dep-audit-nightly": { "scope": "instance-wide", "enabled": true, "cadence": "nightly", "requiresAutonomy": false },
11
- "diagram-drift": { "scope": "instance-wide", "enabled": true, "cadence": "daily", "requiresAutonomy": false },
9
+ "dep-audit-nightly": { "scope": "instance-wide", "enabled": true, "cadence": "daily", "requiresAutonomy": false, "note": "deterministic; task 1004878. Fired by the in-process daily-checks poller (modules/autonomy/pollers/daily-checks.js): npm audit of the deployed instance, high/critical findings filed as ONE idea, re-filed only when the set changes." },
12
10
  "idea-triage-nightly": { "scope": "instance-wide", "enabled": false, "cadence": "nightly", "requiresAutonomy": true },
13
11
  "main-audit": { "scope": "instance-wide", "enabled": true, "cadence": "on-merge", "requiresAutonomy": false, "note": "Trust-boundary backstop — audits commits landed on main." },
14
- "newcomer-floor": { "scope": "instance-wide", "enabled": true, "cadence": "daily", "requiresAutonomy": false },
15
- "newcomer-generator": { "scope": "instance-wide", "enabled": true, "cadence": "daily", "requiresAutonomy": false },
16
12
  "overnight-builder": { "scope": "instance-wide", "enabled": false, "cadence": "nightly", "requiresAutonomy": true, "note": "Autonomous claim+ship; OFF until the instance arms autonomy." },
17
13
  "overnight-code-review": { "scope": "instance-wide", "enabled": false, "cadence": "nightly", "requiresAutonomy": true },
18
- "peer-vote-tally": { "scope": "instance-wide", "enabled": true, "cadence": "daily", "requiresAutonomy": false },
19
- "rank-roles-audit": { "scope": "instance-wide", "enabled": true, "cadence": "nightly", "requiresAutonomy": false, "note": "deterministic; read-only; never fatal at boot (idea 1000622) — task 1002873" },
14
+ "peer-vote-tally": { "scope": "instance-wide", "enabled": true, "cadence": "weekly", "requiresAutonomy": false, "note": "deterministic; fired weekly by the in-process routine-timers poller (modules/autonomy/pollers/routine-timers.js)." },
15
+ "rank-roles-audit": { "scope": "instance-wide", "enabled": true, "cadence": "daily", "requiresAutonomy": false, "note": "deterministic; read-only; never fatal at boot (idea 1000622) — task 1002873. Fired by the in-process daily-checks poller (task 1004878)." },
20
16
  "redteam-weekly": { "scope": "instance-wide", "enabled": true, "cadence": "weekly", "requiresAutonomy": false, "note": "deterministic; task 1003128" },
21
17
  "repo-simplify-sweep": { "scope": "instance-wide", "enabled": true, "cadence": "weekly", "requiresAutonomy": false },
22
18
  "security-review-weekly": { "scope": "instance-wide", "enabled": true, "cadence": "weekly", "requiresAutonomy": false },
23
19
  "skill-usage-review": { "scope": "instance-wide", "enabled": true, "cadence": "nightly", "requiresAutonomy": false },
24
- "stale-claim-release": { "scope": "instance-wide", "enabled": true, "cadence": "hourly", "requiresAutonomy": false },
25
20
  "stranded-rows": { "scope": "instance-wide", "enabled": true, "requiresAutonomy": false, "note": "no cadence: nothing schedules it yet, so it is run by hand — declaring one with no cron firing it fails fitness Check 25 (task 1003775)" }
26
21
  }
27
22
  }
@@ -2,7 +2,8 @@
2
2
 
3
3
  **Date:** 2026-06-07
4
4
  **Context:** GDS-V3, task [#679](https://example.com/builders#/task/679) (cut prod deploy over to CI). Completes the [#597](https://example.com/builders#/task/597) / [ADR 0031](0031-cloud-dev-environments-for-builders.md) §6 goal — *no builder box holds the production droplet SSH key*. Extends [ADR 0031](0031-cloud-dev-environments-for-builders.md) §6; re-applies [ADR 0016](0016-trust-boundary-server-enforced-permissions.md) to CI.
5
- **Status:** Accepted — **armed in production 2026-06-13** (interim, grader-off variant — task [#859](https://example.com/builders#/task/859); `config/deploy.json` `mode: ci`; see the *Arming record* below + session log [`<redacted>.md`](../session-logs/<redacted>.md)).
6
5
  **Amended 2026-09-30:** the CI grade-gate (precondition 1) is permanently retired, not deferred — see the *Amendment* at the end (task 1004456, blocker 1000103).
6
+ **Status:** Accepted — **armed in production 2026-06-13** (interim, grader-off variant — task [#859](https://example.com/builders#/task/859); `config/deploy.json` `mode: ci`; see the *Arming record* below + session log [`<redacted>.md`](../session-logs/<redacted>.md)).
7
+ **Amended 2026-09-30:** the CI grade-gate (precondition 1) is permanently retired, not deferred — see the *Amendment* at the end (task 1004456, blocker 1000103).
7
8
 
8
9
  ## Problem
9
10
 
@@ -35,7 +36,7 @@ With no human in the merge loop, **the CI checks *are* the authority**. The thre
35
36
 
36
37
  1. **[`CODEOWNERS`](../../CODEOWNERS)** — a PR touching any gate surface (`.github/`, `config/deploy.json`, `ship.js`, the grader, `auth.js`/`route-rank-check.js`) **or any code that executes on the droplet at deploy** (`migrations/`, `scripts/migrate.sh`, `package.json`/`package-lock.json`, `scripts/deploy/` — `~/deploy.sh` runs migrations + `npm ci` from the merged tree, so a malicious migration or poisoned lockfile would otherwise auto-merge and run on prod) requires Archon review *even under auto-merge*, when branch protection has "Require review from Code Owners" on. Ordinary PRs (game, art, docs) carry no code owner and auto-merge freely — that's the point.
37
38
 
38
- 2. **The grader must RE-RUN in CI** — CODEOWNERS only catches *committed* changes to `ship.js`. A builder could run a **locally-edited, uncommitted** `ship.js` that skips the grade and opens an auto-merge PR anyway. An earlier draft of this ADR proposed a CI check that *reads the server-recorded grade* — but that is **theater**: `POST /tasks/:id/grade` records the grader scores *from the request body* (the server does not recompute them), so a tampered local ship.js can POST a fake passing grade. The only tamper-proof gate runs the grader **in CI, against the PR diff**, where the builder cannot touch it — [`.github/workflows/grade-gate.yml`](../../.github/workflows/grade-gate.yml) + [`scripts/gds/ci-grade.js`](../../scripts/gds/ci-grade.js) ([#855](https://example.com/builders#/task/855)), which reuse the exact production grading path (`ship.js runSubagentGrader` → the adversarial worker panel) and **fail closed**. It is **skip-safe** (green-but-not-gating) until the operator wires a grader auth secret AND marks it a required check — the same inert-until-armed pattern as `deploy-prod.yml`. This was written as a **hard precondition** of arming `ci` mode. *(Superseded 2026-09-30: the CI grade-gate is permanently retired — see the Amendment below.)*
39
+ 2. **The grader must RE-RUN in CI** — CODEOWNERS only catches *committed* changes to `ship.js`. A builder could run a **locally-edited, uncommitted** `ship.js` that skips the grade and opens an auto-merge PR anyway. An earlier draft of this ADR proposed a CI check that *reads the server-recorded grade* — but that is **theater**: `POST /tasks/:id/grade` records the grader scores *from the request body* (the server does not recompute them), so a tampered local ship.js can POST a fake passing grade. The only tamper-proof gate runs the grader **in CI, against the PR diff**, where the builder cannot touch it — [`.github/workflows/grade-gate.yml`](../../.github/workflows/grade-gate.yml) + `scripts/gds/ci-grade.js` (deleted by task 1004859) ([#855](https://example.com/builders#/task/855)), which reuse the exact production grading path (`ship.js runSubagentGrader` → the adversarial worker panel) and **fail closed**. It is **skip-safe** (green-but-not-gating) until the operator wires a grader auth secret AND marks it a required check — the same inert-until-armed pattern as `deploy-prod.yml`. This was written as a **hard precondition** of arming `ci` mode. *(Superseded 2026-09-30: the CI grade-gate is permanently retired — see the Amendment below.)*
39
40
 
40
41
  ### Why not just hand builders the droplet key
41
42
 
@@ -84,7 +84,7 @@ This ADR's deliverable is the decision above **plus** the carve broken into clai
84
84
 
85
85
  **Proof of equivalence at every step** (ADR 0083 / 0062 discipline): after each carve, OTB behaves **byte-for-byte the same**. That is the per-task done-when.
86
86
 
87
- **Tranche-1 status: PROVEN** (R74, [#1578](https://example.com/builders#/task/1578)). The five claims above are demonstrated, in one re-runnable command, by [`scripts/gds/coreB-carve-proof.sh`](../../scripts/gds/coreB-carve-proof.sh): memory + grading are loader-discovered modules; `db-kernel.js` + the memory query slice left the `db.js` monolith; `KERNEL_FILES` is the bounded 17-file roster with zero fitness hard-failures (incl. the three ENFORCING C7 boundary checks); grading resolves through the `grade` kernel port (`seams.resolveOptional('grade')`) with no core→grader import; and the 27 DB-free tests exercising the carved surfaces pass unchanged (byte-identical). The ongoing guard is CI — `fitness.js` (the kernel-imports-no-domain ratchet flips red at zero leaks) + `run-unit-tests.js` on every PR; the script is the consolidated demonstration, not a new gate. Tranche 2 (the remaining ~8 core domains) stays deferred per owner until greenlit.
87
+ **Tranche-1 status: PROVEN** (R74, [#1578](https://example.com/builders#/task/1578)). The five claims above are demonstrated, in one re-runnable command, by `scripts/gds/coreB-carve-proof.sh` (deleted once the carve was done, task 1004856; in history at dc7d88169): memory + grading are loader-discovered modules; `db-kernel.js` + the memory query slice left the `db.js` monolith; `KERNEL_FILES` is the bounded 17-file roster with zero fitness hard-failures (incl. the three ENFORCING C7 boundary checks); grading resolves through the `grade` kernel port (`seams.resolveOptional('grade')`) with no core→grader import; and the 27 DB-free tests exercising the carved surfaces pass unchanged (byte-identical). The ongoing guard is CI — `fitness.js` (the kernel-imports-no-domain ratchet flips red at zero leaks) + `run-unit-tests.js` on every PR; the script is the consolidated demonstration, not a new gate. Tranche 2 (the remaining ~8 core domains) stays deferred per owner until greenlit.
88
88
 
89
89
  ---
90
90
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  ## Context
12
12
 
13
- Tranche 1 ([ADR 0091](0091-bounding-the-kernel-and-db-carve.md)) did two things: it **proved the core-carve pattern** on the two cleanest-slicing domains (memory, grading — demonstrated by [`scripts/gds/coreB-carve-proof.sh`](../../scripts/gds/coreB-carve-proof.sh), R74), and it **shipped the infrastructure** every later carve reuses — the bounded kernel roster + `KERNEL_FILES` fitness ratchet (R70), the doorway with `withTx` (R68), the per-domain `db.js` slice pattern + `db-kernel.js` (R69), and the `grade` kernel **port** (R73). That infrastructure is generic: each remaining core domain is now a *pure carve* copying R72/R73, with **no new scaffolding**.
13
+ Tranche 1 ([ADR 0091](0091-bounding-the-kernel-and-db-carve.md)) did two things: it **proved the core-carve pattern** on the two cleanest-slicing domains (memory, grading — demonstrated by `scripts/gds/coreB-carve-proof.sh` (deleted once the carve was done, task 1004856; in history at dc7d88169), R74), and it **shipped the infrastructure** every later carve reuses — the bounded kernel roster + `KERNEL_FILES` fitness ratchet (R70), the doorway with `withTx` (R68), the per-domain `db.js` slice pattern + `db-kernel.js` (R69), and the `grade` kernel **port** (R73). That infrastructure is generic: each remaining core domain is now a *pure carve* copying R72/R73, with **no new scaffolding**.
14
14
 
15
15
  What remains is the bulk of the core: ~8 cohesive domains + the two web UIs + the lifecycle state machine ([02 §6](../design/modular-architecture/02-module-map.md) roster). The import-graph scan ([02 §2](../design/modular-architecture/02-module-map.md)) already told us which slice cleanly (economy, ideas, security alongside the proven memory/grading) and which is the coupled cluster (the lifecycle — `tasks → grader/github-push/ship-broadcast`). This ADR turns that evidence into a sequence.
16
16
 
@@ -133,10 +133,6 @@
133
133
  "name": "founding",
134
134
  "description": "Endpoints under `/api/bongos/founding`."
135
135
  },
136
- {
137
- "name": "gate-approvals",
138
- "description": "Endpoints under `/api/bongos/gate-approvals`."
139
- },
140
136
  {
141
137
  "name": "github",
142
138
  "description": "Endpoints under `/api/bongos/github`."
@@ -6435,88 +6431,6 @@
6435
6431
  ]
6436
6432
  }
6437
6433
  },
6438
- "/gate-approvals": {
6439
- "get": {
6440
- "operationId": "get_gate_approvals",
6441
- "tags": [
6442
- "gate-approvals"
6443
- ],
6444
- "summary": "GET /gate-approvals",
6445
- "description": "GET /gate-approvals — open PRs awaiting owner approval (gate-review red), with the verdict + per-file reasons + changed files + diff link. rank: metic+archon. BV1.R105 left this on requireRank because `gate_approval.decide` was declared over the /approve WRITE only and no atom named the read. ADR 0157 extends the catalog with exactly that atom — `gate_approval.read`, floor metic — so the mapping is now one the catalog makes. The split is load-bearing, not cosmetic: `page.view.government` opens /gate to Metic, and without a Metic-readable data endpoint that page would render nothing but a 403. Approving a held PR stays archon (`.decide`, system).\n\n**Rank:** `metic+archon` — Metic or Archon rank (review/triage powers).\n\n**Permissions:** `gate_approval.read` (all required).",
6446
- "x-rank": "metic+archon",
6447
- "x-source": "modules/lifecycle/routes/gate-approvals.js",
6448
- "x-permissions": [
6449
- "gate_approval.read"
6450
- ],
6451
- "responses": {
6452
- "200": {
6453
- "description": "Success."
6454
- },
6455
- "400": {
6456
- "$ref": "#/components/responses/BadRequest"
6457
- },
6458
- "401": {
6459
- "$ref": "#/components/responses/Unauthorized"
6460
- },
6461
- "403": {
6462
- "$ref": "#/components/responses/Forbidden"
6463
- }
6464
- },
6465
- "security": [
6466
- {
6467
- "builderSession": []
6468
- }
6469
- ]
6470
- }
6471
- },
6472
- "/gate-approvals/{pr}/approve": {
6473
- "post": {
6474
- "operationId": "post_gate_approvals_pr_approve",
6475
- "tags": [
6476
- "gate-approvals"
6477
- ],
6478
- "summary": "POST /gate-approvals/:pr/approve",
6479
- "description": "POST /gate-approvals/:pr/approve — record owner approval for a stuck gate PR and re-run the gate-review check so it clears. rank: archon (clears the hard floor — pinned in route-rank-check.EXPECTED_RANKS for downgrade protection).\n\n**Rank:** `archon` — Archon only (rank and identity management + the escalation keys — the trust boundary).\n\n**Permissions:** `gate_approval.decide` (all required).",
6480
- "x-rank": "archon",
6481
- "x-source": "modules/lifecycle/routes/gate-approvals.js",
6482
- "x-permissions": [
6483
- "gate_approval.decide"
6484
- ],
6485
- "parameters": [
6486
- {
6487
- "name": "pr",
6488
- "in": "path",
6489
- "required": true,
6490
- "schema": {
6491
- "type": "string"
6492
- },
6493
- "description": "Path parameter `pr`."
6494
- }
6495
- ],
6496
- "responses": {
6497
- "200": {
6498
- "description": "Success."
6499
- },
6500
- "400": {
6501
- "$ref": "#/components/responses/BadRequest"
6502
- },
6503
- "401": {
6504
- "$ref": "#/components/responses/Unauthorized"
6505
- },
6506
- "403": {
6507
- "$ref": "#/components/responses/Forbidden"
6508
- },
6509
- "404": {
6510
- "$ref": "#/components/responses/NotFound"
6511
- }
6512
- },
6513
- "security": [
6514
- {
6515
- "builderSession": []
6516
- }
6517
- ]
6518
- }
6519
- },
6520
6434
  "/github/orgs": {
6521
6435
  "get": {
6522
6436
  "operationId": "get_github_orgs",
@@ -37066,7 +36980,7 @@
37066
36980
  "description": "A required dependency/feature is not configured or is temporarily down."
37067
36981
  }
37068
36982
  },
37069
- "x-endpoint-count": 580,
36983
+ "x-endpoint-count": 578,
37070
36984
  "x-schema-count": 622,
37071
36985
  "x-undocumented-bodies": 12,
37072
36986
  "x-response-schemas": 404,
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Bongos API reference
4
4
 
5
- > **Generated from the live route files** — the route file is authoritative. 580 endpoints across 99 route files.
5
+ > **Generated from the live route files** — the route file is authoritative. 578 endpoints across 98 route files.
6
6
  > Machine-readable spec: [`docs/api/openapi.json`](api/openapi.json) (OpenAPI 3.1). Rendered docs site: **`/docs`** (e.g. `cloudbongos.com/docs`).
7
7
 
8
8
  Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust-boundary-server-enforced-permissions.md)): `public` < `any-builder` < `metic+archon` < `archon`.
@@ -281,13 +281,6 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
281
281
  | POST | `/api/bongos/founding/stages/:stage/close` | `any-builder` | — | |
282
282
  | POST | `/api/bongos/founding/start` | `any-builder` | — | |
283
283
 
284
- ## `gate-approvals` (2)
285
-
286
- | Method | Path | Rank | Body | Description |
287
- |---|---|---|---|---|
288
- | GET | `/api/bongos/gate-approvals` | `metic+archon` | — | GET /gate-approvals — open PRs awaiting owner approval (gate-review red), with the verdict + per-file reasons + changed files + diff link. |
289
- | POST | `/api/bongos/gate-approvals/:pr/approve` | `archon` | — | POST /gate-approvals/:pr/approve — record owner approval for a stuck gate PR and re-run the gate-review check so it clears. |
290
-
291
284
  ## `github` (6)
292
285
 
293
286
  | Method | Path | Rank | Body | Description |
@@ -94,7 +94,7 @@ forming the ordered claim-gate tier **`xenos` (1) < `thetes` (2) < `metic` (3) <
94
94
  deliberate Archon promotion.
95
95
  - **`xenos`** — the **sandboxed entry rank** every new GitHub-authed builder defaults to (migration
96
96
  029 flipped the column default here). Read-only on public surfaces; may claim + ship **only** tasks
97
- an Archon (or the newcomer-generator) has flagged `newcomer_friendly = true` (enforced in
97
+ an Archon has flagged `newcomer_friendly = true` (enforced in
98
98
  `db.claimTask` / `claimTasksBatch`, returns `rank_too_low_for_task`). Cannot triage, resolve
99
99
  blockers, or run planning/priority sessions. This is also the tier a deactivated/offboarded builder
100
100
  is dropped to by `/builder-exit` (migration `025`); for them `status='inactive'` additionally blocks
@@ -141,7 +141,7 @@ or missing ranks fail closed.
141
141
  - **identity** — `PATCH /api/bongos/builders/:id/status` (offboard/(de)activate), `GET|PATCH /api/bongos/access-requests[/:id]`
142
142
  (who is admitted), `POST /api/gds/auth/revoke[-all]` (whose sessions are valid).
143
143
  - **the four escalation keys**, which look operational but are not: `POST /api/bongos/tasks/:id/confirm`
144
- (grader-bypass), `POST /api/bongos/gate-approvals/:pr/approve` (CI deploy-gate override), protected-module
144
+ (grader-bypass), `POST /api/bongos/gate-approvals/:pr/approve` (CI deploy-gate override — the route was removed by task 1004859 because the CI check it overrode never ran; its key `gate_approval.decide` stays in the catalog, retired), protected-module
145
145
  **goal scope** ([ADR 0086](adr/0086-goal-scoped-work-hierarchy.md)), and `government.manage` (the
146
146
  ranks/permissions tab). Delegating any one of them lets a Metic reach Archon in four steps — create a
147
147
  protected-scope goal in the permission core, claim a task there (protected paths already floor at
@@ -235,8 +235,8 @@ or missing ranks fail closed.
235
235
  `GET /override-requests` + `POST .../:id/decide`; `POST /claims/:id/release-on-behalf`;
236
236
  `POST /done-when/:id/unsatisfy`; `POST /goals/reorder`; `POST /versions`;
237
237
  `POST /tasks/newcomer-restock`; `POST /tasks/peer-votes/tally`; `GET /discord/channels/plan` +
238
- `POST .../reconcile`; `GET /autonomy/precheck`. Plus `GET /gate-approvals`, whose read was split out as
239
- `gate_approval.read` so the Gate page is usable at Metic while **approving** stays Archon.
238
+ `POST .../reconcile`; `GET /autonomy/precheck`. `GET /gate-approvals` (key `gate_approval.read`) was removed with its approve
239
+ route by task 1004859; the key stays in the catalog, retired.
240
240
 
241
241
  > **Note the one confidentiality widening:** `/security/docs` (the engagement-report store with
242
242
  > attacker-usable exploit detail) is now Metic-readable, because it shares `security.report.adjudicate`