@bongos/core 1.23.22 → 1.24.1

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 (424) hide show
  1. package/.bongos-core.json +902 -407
  2. package/.claude/skills/blocker-review/SKILL.md +9 -1
  3. package/.claude/skills/blocker-solve/SKILL.md +1 -1
  4. package/.claude/skills/builder-claim/SKILL.md +1 -1
  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-sequence/SKILL.md +1 -1
  8. package/.claude/skills/builder-setup/SKILL.md +1 -1
  9. package/.claude/skills/builder-ship/SKILL.md +1 -1
  10. package/.claude/skills/collab-review/SKILL.md +5 -2
  11. package/.claude/skills/design/SKILL.md +1 -1
  12. package/.claude/skills/goal-create/SKILL.md +2 -2
  13. package/.claude/skills/grade-recover/SKILL.md +1 -1
  14. package/.claude/skills/merge-mode/SKILL.md +1 -1
  15. package/.claude/skills/owner-review/SKILL.md +1 -1
  16. package/.claude/skills/planning-session/SKILL.md +11 -11
  17. package/.claude/skills/read-session-export/SKILL.md +1 -1
  18. package/.claude/skills/recall/SKILL.md +1 -1
  19. package/.claude/skills/scan-before-install/SKILL.md +1 -1
  20. package/.claude/skills/session-handoff/SKILL.md +1 -1
  21. package/.claude/skills/strand-fix/SKILL.md +13 -0
  22. package/.claude/skills/worktree-clean/SKILL.md +1 -1
  23. package/AGENTS.md +15 -0
  24. package/GEMINI.md +5 -0
  25. package/clients/bongos-client/README.md +1 -1
  26. package/clients/bongos-client/bongos-client.global.js +90 -0
  27. package/clients/bongos-client/index.cjs +90 -0
  28. package/clients/bongos-client/index.d.ts +149 -4
  29. package/clients/bongos-client/index.mjs +90 -0
  30. package/docs/adr/0054-session-token-reward-cost-plus.md +3 -1
  31. package/docs/adr/0055-server-mediated-branch-publish.md +1 -1
  32. package/docs/adr/0393-a-platform-account-is-a-person-and-github-is-one-way-in.md +37 -0
  33. package/docs/adr/0394-market-watch-searches-through-the-messages-api-on-the-projects-key-and-runs-from-its-own-poller.md +102 -0
  34. package/docs/adr/0395-a-task-says-what-it-needs-and-lists-show-only-what-you-can-do.md +36 -0
  35. package/docs/adr/0396-google-sign-in-a-stand-in-login-and-a-browser-approved-cli-sign-in.md +41 -0
  36. package/docs/adr/README.md +5 -1
  37. package/docs/api/openapi.json +8555 -5876
  38. package/docs/api-reference.md +63 -10
  39. package/docs/architecture.md +37 -1
  40. package/docs/canonical-permissions.md +1 -1
  41. package/docs/copy-inventory.md +420 -337
  42. package/docs/copy-registry.json +1321 -500
  43. package/docs/file-map.md +1 -0
  44. package/docs/module-api-changelog.md +5 -0
  45. package/docs/onboarding/diagrams/03-drachmae-karma.mmd +3 -3
  46. package/docs/onboarding/diagrams/README.md +1 -1
  47. package/docs/onboarding/drachmae-and-karma.md +15 -15
  48. package/docs/onboarding/primer.md +2 -2
  49. package/docs/page-inventory.json +55 -6
  50. package/docs/page-readings.json +1185 -1011
  51. package/docs/recipes/google-sign-in.md +60 -0
  52. package/docs/recipes/ops-gotchas.md +1 -1
  53. package/migrations/core_282_builders_lower_login_idx.sql +33 -0
  54. package/migrations/core_283_claimable_ignores_page_markers.sql +53 -0
  55. package/migrations/core_283_payout_approvals.sql +183 -0
  56. package/migrations/core_284_payout_gates.sql +179 -0
  57. package/migrations/core_285_task_needs.sql +74 -0
  58. package/modules/ai-studio/billing.js +67 -0
  59. package/modules/ai-studio/context.js +29 -0
  60. package/modules/ai-studio/db.js +172 -0
  61. package/modules/ai-studio/gemini.js +75 -0
  62. package/modules/ai-studio/generate.js +119 -0
  63. package/modules/ai-studio/keys.js +73 -0
  64. package/modules/ai-studio/migrations/ai_studio_001_keys.sql +22 -0
  65. package/modules/ai-studio/migrations/ai_studio_002_ledger.sql +48 -0
  66. package/modules/ai-studio/migrations/ai_studio_003_requests.sql +55 -0
  67. package/modules/ai-studio/openrouter.js +90 -0
  68. package/modules/ai-studio/payments.js +105 -0
  69. package/modules/ai-studio/pricing.js +92 -0
  70. package/modules/ai-studio/routes/ai-studio.js +235 -5
  71. package/modules/ai-studio/studio.js +121 -0
  72. package/modules/autonomy/fence.js +64 -1
  73. package/modules/builder-settings/builder-needs.js +27 -1
  74. package/modules/copy-desk/routes/copy-desk.js +5 -0
  75. package/modules/economy/achievements.js +22 -10
  76. package/modules/economy/cost-classify.js +9 -0
  77. package/modules/economy/cost-write-guard.js +52 -0
  78. package/modules/economy/cost.js +2 -1
  79. package/modules/economy/credits.js +18 -15
  80. package/modules/economy/goal-reward.js +161 -0
  81. package/modules/economy/reward.js +4 -0
  82. package/modules/economy/routes/cost.js +33 -7
  83. package/modules/government/catalog.js +6 -0
  84. package/modules/government/db.js +34 -0
  85. package/modules/government/docket.js +36 -0
  86. package/modules/government/migrations/government_035_payout_approve.sql +29 -0
  87. package/modules/government/pollers/board-expiry.js +108 -20
  88. package/modules/government/protected-surfaces.json +1 -0
  89. package/modules/government/routes/government.js +22 -0
  90. package/modules/government/routing.js +39 -5
  91. package/modules/government/waiting.js +74 -0
  92. package/modules/hall-ui/public/ai-studio-lib.js +268 -0
  93. package/modules/hall-ui/public/ai-studio.css +193 -0
  94. package/modules/hall-ui/public/ai-studio.html +98 -0
  95. package/modules/hall-ui/public/ai-studio.js +556 -0
  96. package/modules/hall-ui/public/ai-studio.states.json +94 -0
  97. package/modules/hall-ui/public/blockers-by-person.js +156 -0
  98. package/modules/hall-ui/public/blockers-lib.js +15 -1
  99. package/modules/hall-ui/public/blockers.html +8 -0
  100. package/modules/hall-ui/public/blockers.js +1 -1
  101. package/modules/hall-ui/public/claim-action.js +3 -0
  102. package/modules/hall-ui/public/collab.html +12 -0
  103. package/modules/hall-ui/public/craft-mode.js +4 -1
  104. package/modules/hall-ui/public/criterion-uat-ui.js +4 -1
  105. package/modules/hall-ui/public/drachmae.html +1 -1
  106. package/modules/hall-ui/public/genesis/r5-life-1-primordial-sea.jpg +0 -0
  107. package/modules/hall-ui/public/genesis/r5-life-2-first-cells-cut.webp +0 -0
  108. package/modules/hall-ui/public/genesis/r5-life-2-first-cells.jpg +0 -0
  109. package/modules/hall-ui/public/genesis/r5-life-3-genome-cut.webp +0 -0
  110. package/modules/hall-ui/public/genesis/r5-life-3-genome.jpg +0 -0
  111. package/modules/hall-ui/public/genesis/r5-life-4-membrane-cut.webp +0 -0
  112. package/modules/hall-ui/public/genesis/r5-life-4-membrane.jpg +0 -0
  113. package/modules/hall-ui/public/genesis/r5-life-5-nervous-system-cut.webp +0 -0
  114. package/modules/hall-ui/public/genesis/r5-life-5-nervous-system.jpg +0 -0
  115. package/modules/hall-ui/public/goal-inbox.js +1 -1
  116. package/modules/hall-ui/public/goals-render.js +4 -0
  117. package/modules/hall-ui/public/goals.html +8 -0
  118. package/modules/hall-ui/public/gov-living.js +6 -2
  119. package/modules/hall-ui/public/hall-ask.css +5 -0
  120. package/modules/hall-ui/public/hall-ask.js +39 -3
  121. package/modules/hall-ui/public/notes-panel.css +20 -0
  122. package/modules/hall-ui/public/notes-panel.js +146 -0
  123. package/modules/hall-ui/public/project-settings.html +1 -1
  124. package/modules/hall-ui/public/project-settings.js +7 -5
  125. package/modules/hall-ui/public/settings-ai-keys.js +124 -0
  126. package/modules/hall-ui/public/settings.html +15 -0
  127. package/modules/hall-ui/public/street-deck.js +12 -3
  128. package/modules/hall-ui/public/studio.css +90 -8
  129. package/modules/hall-ui/public/studio.html +39 -10
  130. package/modules/hall-ui/public/studio.js +148 -18
  131. package/modules/hall-ui/public/task.html +2 -0
  132. package/modules/hall-ui/public/task.js +4 -0
  133. package/modules/hall-ui/public/tweak-editor.js +12 -3
  134. package/modules/hall-ui/public/welcome-boot.css +42 -6
  135. package/modules/hall-ui/public/welcome-boot.js +20 -6
  136. package/modules/hall-ui/public/work.js +20 -0
  137. package/modules/hall-ui/records/ai-studio.md +36 -0
  138. package/modules/hall-ui/records/blockers-people.md +24 -0
  139. package/modules/lifecycle/db-claims.js +32 -4
  140. package/modules/lifecycle/db-goals.js +18 -5
  141. package/modules/lifecycle/db-tasks.js +15 -6
  142. package/modules/lifecycle/done-when.js +23 -1
  143. package/modules/lifecycle/lifecycle.js +5 -0
  144. package/modules/lifecycle/migrations/lifecycle_017_notes.sql +46 -0
  145. package/modules/lifecycle/module.json +2 -1
  146. package/modules/lifecycle/notes.js +219 -0
  147. package/modules/lifecycle/page-notice.js +124 -0
  148. package/modules/lifecycle/page-tweak-artist.js +18 -1
  149. package/modules/lifecycle/publish-reconciler.js +67 -20
  150. package/modules/lifecycle/routes/claims.js +5 -2
  151. package/modules/lifecycle/routes/goals.js +3 -1
  152. package/modules/lifecycle/routes/notes.js +91 -0
  153. package/modules/lifecycle/routes/project-settings.js +43 -35
  154. package/modules/lifecycle/routes/task-route-helpers.js +21 -0
  155. package/modules/lifecycle/routes/task-write-routes.js +21 -3
  156. package/modules/lifecycle/routes/tasks.js +12 -12
  157. package/modules/lifecycle/task-needs-gate.js +70 -0
  158. package/modules/market-watch/CLAUDE.md +15 -0
  159. package/modules/market-watch/db.js +340 -0
  160. package/modules/market-watch/key.js +58 -0
  161. package/modules/market-watch/migrations/market_watch_001_tables.sql +249 -0
  162. package/modules/market-watch/migrations/market_watch_002_run.sql +46 -0
  163. package/modules/market-watch/module.json +26 -0
  164. package/modules/market-watch/pollers/hub-seed.js +54 -0
  165. package/modules/market-watch/pollers/weekly-run.js +100 -0
  166. package/modules/market-watch/research.js +350 -0
  167. package/modules/market-watch/run.js +245 -0
  168. package/modules/market-watch/seed/market-data.json +38 -0
  169. package/modules/market-watch/seed/partners-data.json +497 -0
  170. package/modules/market-watch/seed.js +252 -0
  171. package/modules/market-watch/store.js +230 -0
  172. package/modules/memory/routes/memory.js +14 -2
  173. package/modules/memory/routes/search.js +8 -2
  174. package/modules/platform-identity/account-logins.js +192 -0
  175. package/modules/platform-identity/migrations/platform_identity_034_account_logins.sql +96 -0
  176. package/modules/platform-identity/platform-identity.js +5 -4
  177. package/modules/platform-identity/routes/my-projects.js +6 -0
  178. package/modules/platform-identity/routes/profile.js +18 -0
  179. package/modules/platform-identity/routes/public-profile.js +10 -1
  180. package/modules/platform-identity/routes/sso.js +26 -1
  181. package/modules/platform-identity/tests/platform-identity.mjs +2 -1
  182. package/modules/provisioning/credential-preflight.js +13 -3
  183. package/modules/provisioning/pollers/app-liveness.js +25 -5
  184. package/modules/provisioning/routes/provisioning.js +1 -1
  185. package/modules/provisioning/starter-bundles.js +6 -2
  186. package/modules/public-landing/public/account.html +10 -2
  187. package/modules/public-landing/public/assets/world/r2-bongos-chrome-b.jpg +0 -0
  188. package/modules/public-landing/public/assets/world/r2-bongos-chrome-b.jpg.json +1 -1
  189. package/modules/public-landing/public/assets/world/r2-bongos-chrome-b.webp +0 -0
  190. package/modules/public-landing/public/assets/world/r2-bongos-chrome-b.webp.json +1 -1
  191. package/modules/public-landing/public/assets/world/r2-chrome-blob-one-cut.webp +0 -0
  192. package/modules/public-landing/public/assets/world/r2-chrome-blob-one-cut.webp.json +1 -1
  193. package/modules/public-landing/public/assets/world/r2-chrome-blob-one.jpg +0 -0
  194. package/modules/public-landing/public/assets/world/r2-chrome-blob-one.jpg.json +1 -1
  195. package/modules/public-landing/public/assets/world/r2-chrome-blob-one.webp +0 -0
  196. package/modules/public-landing/public/assets/world/r2-chrome-blob-one.webp.json +1 -1
  197. package/modules/public-landing/public/assets/world/r2-chrome-blobs-set.jpg +0 -0
  198. package/modules/public-landing/public/assets/world/r2-chrome-blobs-set.jpg.json +1 -1
  199. package/modules/public-landing/public/assets/world/r2-chrome-blobs-set.webp +0 -0
  200. package/modules/public-landing/public/assets/world/r2-chrome-blobs-set.webp.json +1 -1
  201. package/modules/public-landing/public/assets/world/r3-frost-bead-cut.webp +0 -0
  202. package/modules/public-landing/public/assets/world/r3-frost-bead-cut.webp.json +1 -1
  203. package/modules/public-landing/public/assets/world/r3-frost-pair-cut.webp +0 -0
  204. package/modules/public-landing/public/assets/world/r3-frost-pair-cut.webp.json +1 -1
  205. package/modules/public-landing/public/assets/world/r3-gold-blob-cut.webp +0 -0
  206. package/modules/public-landing/public/assets/world/r3-gold-blob-cut.webp.json +1 -1
  207. package/modules/public-landing/public/assets/world/r3-gold-pair-cut.webp +0 -0
  208. package/modules/public-landing/public/assets/world/r3-gold-pair-cut.webp.json +1 -1
  209. package/modules/public-landing/public/assets/world/r3-obsidian-blob-cut.webp +0 -0
  210. package/modules/public-landing/public/assets/world/r3-obsidian-blob-cut.webp.json +1 -1
  211. package/modules/public-landing/public/assets/world/r3-obsidian-pair-cut.webp +0 -0
  212. package/modules/public-landing/public/assets/world/r3-obsidian-pair-cut.webp.json +1 -1
  213. package/modules/public-landing/public/assets/world/r3-space-nebula.jpg +0 -0
  214. package/modules/public-landing/public/assets/world/r3-space-nebula.jpg.json +1 -1
  215. package/modules/public-landing/public/assets/world/r4-card-chrome.jpg +0 -0
  216. package/modules/public-landing/public/assets/world/r4-card-chrome.jpg.json +1 -1
  217. package/modules/public-landing/public/assets/world/r4-card-nebula.jpg +0 -0
  218. package/modules/public-landing/public/assets/world/r4-card-nebula.jpg.json +1 -1
  219. package/modules/public-landing/public/assets/world/r5-life-1-primordial-sea.jpg +0 -0
  220. package/modules/public-landing/public/assets/world/r5-life-1-primordial-sea.jpg.json +1 -1
  221. package/modules/public-landing/public/assets/world/r5-life-2-first-cells-cut.webp +0 -0
  222. package/modules/public-landing/public/assets/world/r5-life-2-first-cells-cut.webp.json +1 -1
  223. package/modules/public-landing/public/assets/world/r5-life-2-first-cells.jpg +0 -0
  224. package/modules/public-landing/public/assets/world/r5-life-2-first-cells.jpg.json +1 -1
  225. package/modules/public-landing/public/assets/world/r5-life-3-genome-cut.webp +0 -0
  226. package/modules/public-landing/public/assets/world/r5-life-3-genome-cut.webp.json +1 -1
  227. package/modules/public-landing/public/assets/world/r5-life-3-genome.jpg +0 -0
  228. package/modules/public-landing/public/assets/world/r5-life-3-genome.jpg.json +1 -1
  229. package/modules/public-landing/public/assets/world/r5-life-4-membrane-cut.webp +0 -0
  230. package/modules/public-landing/public/assets/world/r5-life-4-membrane-cut.webp.json +1 -1
  231. package/modules/public-landing/public/assets/world/r5-life-4-membrane.jpg +0 -0
  232. package/modules/public-landing/public/assets/world/r5-life-4-membrane.jpg.json +1 -1
  233. package/modules/public-landing/public/assets/world/r5-life-5-nervous-system-cut.webp +0 -0
  234. package/modules/public-landing/public/assets/world/r5-life-5-nervous-system-cut.webp.json +1 -1
  235. package/modules/public-landing/public/assets/world/r5-life-5-nervous-system.jpg +0 -0
  236. package/modules/public-landing/public/assets/world/r5-life-5-nervous-system.jpg.json +1 -1
  237. package/modules/public-landing/public/community.html +1 -1
  238. package/modules/public-landing/public/connections.html +2 -2
  239. package/modules/public-landing/public/guild.html +1 -1
  240. package/modules/public-landing/public/invitations.html +2 -2
  241. package/modules/public-landing/public/projects.html +5 -5
  242. package/modules/raise/views/nda.html +2 -0
  243. package/modules/specialities/db.js +32 -1
  244. package/modules/specialities/routes/specialities.js +10 -6
  245. package/modules/status-ui/public/index.html +1 -1
  246. package/package-lock.json +2 -2
  247. package/package.json +1 -1
  248. package/release-notes.json +220 -0
  249. package/scripts/bongos/autobongos-tweak-lane.js +46 -1
  250. package/scripts/bongos/backfill-subagent-rewards.js +2 -2
  251. package/scripts/bongos/claim.js +22 -1
  252. package/scripts/bongos/db-backup-nightly.sh +29 -0
  253. package/scripts/bongos/deploy-divergence.js +7 -0
  254. package/scripts/bongos/doc-cli-guard.js +6 -0
  255. package/scripts/bongos/fitness.js +3 -2
  256. package/scripts/bongos/gen-diagrams.js +3 -3
  257. package/scripts/bongos/lib.sh +4 -5
  258. package/scripts/bongos/migration-namespace.js +13 -1
  259. package/scripts/bongos/plain-cards.js +4 -0
  260. package/scripts/bongos/provision-github-setup.js +3 -1
  261. package/scripts/bongos/provision-units.js +6 -1
  262. package/scripts/bongos/publish-manifest.js +3 -0
  263. package/scripts/bongos/release.js +2 -0
  264. package/scripts/bongos/run-unit-tests.js +268 -82
  265. package/scripts/bongos/seed-tasks.example.json +56 -0
  266. package/scripts/bongos/seed-tasks.js +222 -0
  267. package/scripts/bongos/seed-verify-criteria.js +1 -2
  268. package/scripts/bongos/ship-finish.js +2 -0
  269. package/scripts/bongos/ship-resume.js +2 -0
  270. package/scripts/bongos/strand-lease.js +250 -0
  271. package/scripts/bongos/strand-watch.js +26 -5
  272. package/scripts/bongos/version-literal-guard.js +2 -2
  273. package/scripts/discord/post.js +4 -3
  274. package/scripts/gds/seed-tasks.js +7 -0
  275. package/scripts/gds/{build-bongos.js → strand-lease.js} +3 -3
  276. package/scripts/hall-preview/server.js +21 -0
  277. package/src/bongos/auth-config.js +29 -1
  278. package/src/bongos/auth-discord.js +3 -3
  279. package/src/bongos/auth-github.js +3 -6
  280. package/src/bongos/auth-google.js +217 -0
  281. package/src/bongos/device-approval.js +140 -0
  282. package/src/bongos/llm-pricing.js +17 -1
  283. package/src/bongos/metrics.js +48 -2
  284. package/src/bongos/middleware/rate-limit.js +30 -11
  285. package/src/bongos/module-scope-map.js +12 -1
  286. package/src/bongos/optimizer.js +15 -1
  287. package/src/bongos/payout-approvals.js +342 -0
  288. package/src/bongos/payout-gates.js +364 -0
  289. package/src/bongos/prelaunch-gate.js +7 -9
  290. package/src/bongos/prelaunch-switch.js +20 -0
  291. package/src/bongos/route-rank-check.js +3 -0
  292. package/src/bongos/routes/auth-google.js +246 -0
  293. package/src/bongos/routes/auth.js +38 -1
  294. package/src/bongos/routes/backup.js +33 -9
  295. package/src/bongos/routes/builders.js +57 -30
  296. package/src/bongos/routes/github.js +9 -0
  297. package/src/bongos/routes/me.js +18 -0
  298. package/src/bongos/routes/my-payouts.js +133 -0
  299. package/src/bongos/routes/payout-approvals.js +312 -0
  300. package/src/bongos/routes/payout-gates.js +179 -0
  301. package/src/bongos/routes.js +15 -1
  302. package/src/bongos/secret-box.js +18 -3
  303. package/src/bongos/serve-internal.js +47 -19
  304. package/src/bongos/sign-in-pages.js +138 -0
  305. package/src/bongos/task-needs.js +146 -0
  306. package/src/bongos-downloads.js +18 -1
  307. package/src/instance-config.js +28 -0
  308. package/src/module-api.js +14 -1
  309. package/tests/account_logins.mjs +326 -0
  310. package/tests/account_logins_db.mjs +161 -0
  311. package/tests/ai_studio_billing.mjs +253 -0
  312. package/tests/ai_studio_generate.mjs +282 -0
  313. package/tests/ai_studio_keys.mjs +159 -0
  314. package/tests/ai_studio_requests.mjs +319 -0
  315. package/tests/auth_backchannel_logout_route.mjs +201 -0
  316. package/tests/auto_satisfy_criteria.mjs +10 -1
  317. package/tests/autobongos_tweak_lane.mjs +144 -0
  318. package/tests/autobongos_tweak_pin_identity.mjs +137 -0
  319. package/tests/backfill_subagent_rewards.mjs +17 -1
  320. package/tests/backup_trigger_lock.mjs +119 -0
  321. package/tests/blockers_people.mjs +198 -0
  322. package/tests/bounded_rate_maps.mjs +184 -0
  323. package/tests/claimable_blocker_status.mjs +1 -1
  324. package/tests/claims_batch_routes.mjs +421 -0
  325. package/tests/config_read_cache.mjs +171 -0
  326. package/tests/copy_desk_page_editor.mjs +12 -0
  327. package/tests/cost_write_guard.mjs +200 -0
  328. package/tests/craft_achievements.mjs +33 -10
  329. package/tests/criterion_goal_attach.mjs +1 -1
  330. package/tests/db_backup_nightly.mjs +73 -1
  331. package/tests/deploy_divergence_line.mjs +7 -0
  332. package/tests/effective_visibility_predicate.mjs +12 -0
  333. package/tests/fitness.mjs +19 -0
  334. package/tests/fixtures/seed-tasks/bongos-v1-idea-routing.json +256 -0
  335. package/tests/fixtures/seed-tasks/bv1-profiles.json +592 -0
  336. package/tests/fixtures/seed-tasks/bv2-ideator-surface.json +373 -0
  337. package/tests/fixtures/seed-tasks/fake-api.mjs +80 -0
  338. package/tests/github_one_trip.mjs +34 -0
  339. package/tests/github_repo_visibility.mjs +20 -0
  340. package/tests/goal_achievement.mjs +30 -1
  341. package/tests/goal_achievement_reward.mjs +205 -0
  342. package/tests/goal_sort_staleness.mjs +2 -1
  343. package/tests/goal_tier.mjs +11 -1
  344. package/tests/google_fonts_nonblocking.mjs +84 -0
  345. package/tests/google_sign_in.mjs +401 -0
  346. package/tests/government_board_expiry.mjs +94 -0
  347. package/tests/government_protected_surfaces.mjs +1 -1
  348. package/tests/government_routes.mjs +1 -1
  349. package/tests/hall_ai_studio.mjs +347 -0
  350. package/tests/hall_page_gate_map.mjs +3 -0
  351. package/tests/hall_studio_home.mjs +61 -2
  352. package/tests/home_attention_cards.mjs +1 -1
  353. package/tests/human_signal.mjs +141 -0
  354. package/tests/install_script_reader.mjs +51 -0
  355. package/tests/integration_fixture_ids.mjs +82 -0
  356. package/tests/invite_expiry_db.mjs +13 -1
  357. package/tests/lib_sh_resolution.mjs +0 -4
  358. package/tests/market_watch_data.mjs +244 -0
  359. package/tests/market_watch_data_db.mjs +308 -0
  360. package/tests/market_watch_module.mjs +114 -0
  361. package/tests/market_watch_run.mjs +503 -0
  362. package/tests/metrics.mjs +124 -0
  363. package/tests/migration_namespace.mjs +14 -0
  364. package/tests/module_api.mjs +2 -0
  365. package/tests/module_loader.mjs +1 -1
  366. package/tests/notes.mjs +182 -0
  367. package/tests/own_scope_guard.mjs +5 -0
  368. package/tests/page_tweak_marker_sql.mjs +76 -0
  369. package/tests/page_tweak_no_block.mjs +135 -0
  370. package/tests/page_tweak_notice.mjs +103 -0
  371. package/tests/payout_approvals.mjs +253 -0
  372. package/tests/payout_approvals_db.mjs +106 -0
  373. package/tests/payout_gates.mjs +322 -0
  374. package/tests/payout_gates_db.mjs +113 -0
  375. package/tests/planning_session_skill.mjs +13 -3
  376. package/tests/project_settings_page.mjs +29 -5
  377. package/tests/project_settings_spend_cap_route.mjs +235 -0
  378. package/tests/promotion_sweep.mjs +29 -1
  379. package/tests/provision.mjs +3 -2
  380. package/tests/provisioning_app_status.mjs +18 -0
  381. package/tests/provisioning_credential_preflight.mjs +53 -0
  382. package/tests/provisioning_env_manifest_edit_delete.mjs +223 -0
  383. package/tests/publish_reconciler_overlap.mjs +60 -0
  384. package/tests/rank_change_broadcast_port.mjs +151 -0
  385. package/tests/seed_tasks.mjs +176 -0
  386. package/tests/seed_verify_criteria.mjs +2 -6
  387. package/tests/site_classified_once.mjs +142 -0
  388. package/tests/speciality_db_shape.mjs +23 -0
  389. package/tests/speciality_session_skills.mjs +48 -2
  390. package/tests/strand_lease.mjs +249 -0
  391. package/tests/strand_watch.mjs +10 -0
  392. package/tests/task_criteria_routes.mjs +275 -0
  393. package/tests/task_criteria_unlink_db.mjs +123 -0
  394. package/tests/task_needs.mjs +233 -0
  395. package/tests/task_needs_db.mjs +110 -0
  396. package/tests/unit_runner_serial.mjs +266 -43
  397. package/tests/version_literals.mjs +5 -7
  398. package/tests/welcome_boot.mjs +16 -5
  399. package/tests/welcome_boot_browser.mjs +36 -4
  400. package/docs/recipes/bongos-cli-release.md +0 -66
  401. package/scripts/bongos/backfill-disciplines.js +0 -144
  402. package/scripts/bongos/backfill-session-earnings.js +0 -123
  403. package/scripts/bongos/backfill-session-types.js +0 -87
  404. package/scripts/bongos/build-bongos.js +0 -94
  405. package/scripts/bongos/cleanup-orphans.js +0 -74
  406. package/scripts/bongos/seed-bongos-v1-idea-routing-tasks.js +0 -152
  407. package/scripts/bongos/seed-bv1-profiles-tasks.js +0 -135
  408. package/scripts/bongos/seed-bv2-ideator-surface-tasks.js +0 -390
  409. package/scripts/bongos/smoke-batch-claim.sh +0 -238
  410. package/scripts/bongos/smoke-batch-release.sh +0 -316
  411. package/scripts/bongos/smoke-claim-consistency.sh +0 -222
  412. package/scripts/bongos/smoke-dependencies.sh +0 -143
  413. package/scripts/gds/backfill-disciplines.js +0 -7
  414. package/scripts/gds/backfill-session-earnings.js +0 -7
  415. package/scripts/gds/backfill-session-types.js +0 -7
  416. package/scripts/gds/cleanup-orphans.js +0 -7
  417. package/scripts/gds/seed-bongos-v1-idea-routing-tasks.js +0 -6
  418. package/scripts/gds/seed-bv1-profiles-tasks.js +0 -6
  419. package/scripts/gds/seed-bv2-ideator-surface-tasks.js +0 -6
  420. package/scripts/gds/smoke-batch-claim.sh +0 -8
  421. package/scripts/gds/smoke-batch-release.sh +0 -8
  422. package/scripts/gds/smoke-claim-consistency.sh +0 -8
  423. package/scripts/gds/smoke-dependencies.sh +0 -8
  424. package/tests/smoke_dependencies_witness.mjs +0 -46
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: blocker-review
3
3
  description: >-
4
- Daily review of open blockers: resolve, escalate or note; resolving auto-promotes linked tasks. Metic+. Triggers: "/blocker-review", "review blockers", "what's stuck on me", "what's stuck on Lars", "check blockers", a scheduled daily run.
4
+ Review open blockers daily: resolve (auto-promotes linked tasks), escalate or note. Metic+. Triggers: "/blocker-review", "review blockers", "what's stuck on me", "what's stuck on Lars", "check blockers", a scheduled daily run.
5
5
  plain: >-
6
6
  Goes through everything the project is stuck on, one item at a time, so each can be cleared, passed up, or noted as still stuck.
7
7
  reach-for: >-
@@ -47,6 +47,14 @@ node scripts/bongos/api.js GET /api/bongos/blockers
47
47
 
48
48
  If the list is empty, print "no open blockers — nothing to review today" and exit.
49
49
 
50
+ **"What's stuck on me" reads the per-person list instead (task 1004999).** A blocker has no assignee; who it waits on is the seat its ask names (owner, a building's Lead, a board), resolved to people by the same routing the City uses. When the builder asks what is stuck on THEM, fetch only theirs, and name each one's seat ("as the owner", "as the Planning Lead"):
51
+
52
+ ```
53
+ node scripts/bongos/api.js GET /api/bongos/government/blockers/for-me
54
+ ```
55
+
56
+ For "what's stuck on <name>", read `GET /api/bongos/government/blockers/people` and take that person's group. Never frame every blocker as the owner's: one routed to a Lead is the Lead's.
57
+
50
58
  **Step 2 — walk the list, blocker by blocker.**
51
59
 
52
60
  Present each blocker with:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: blocker-solve
3
3
  description: >-
4
- Drive ONE blocker to done and auto-close it, handing the owner-only parts back as precise steps. Unlike /blocker-review, which walks the whole list. Metic+ only. Triggers: "/blocker-solve N", "solve blocker N", "fix the thing blocking task M".
4
+ Drive ONE blocker to done and auto-close it, handing owner-only parts back as precise steps (/blocker-review walks the list). Metic+. Triggers: "/blocker-solve N", "solve blocker N", "fix the thing blocking task M".
5
5
  plain: >-
6
6
  Takes one thing the project is stuck on and works it through to the end, handing back as clear steps anything only the owner can do.
7
7
  reach-for: >-
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: builder-claim
3
3
  description: >-
4
- Atomically claim a task by id. Refuses if already claimed, not ready, or holding unshipped dependencies; a touches[] overlap only warns. Triggers: "/builder-claim N", "claim task N", "I'll work on N", or picking one after /builder-start.
4
+ Claim a task by id. Refuses if claimed, not ready, or deps unshipped; a touches[] overlap only warns. Triggers: "/builder-claim N", "claim task N", "I'll work on N", or picking one after /builder-start.
5
5
  plain: >-
6
6
  Reserves a task for you, so nobody else works on the same thing at the same time.
7
7
  reach-for: >-
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: builder-reauth
3
3
  description: >-
4
- Refresh an expired Bongos CLI session the UI-first way. Triggers: "/builder-reauth", "re-auth", "refresh my session", "my Bongos session expired", "re-issue my CLI token", or any /builder-* failing with "Bongos CLI session is no longer valid".
4
+ Refresh an expired Bongos CLI session, UI-first. Triggers: "/builder-reauth", "re-auth", "refresh my session", "my Bongos session expired", "re-issue my CLI token", or any /builder-* failing with "Bongos CLI session is no longer valid".
5
5
  plain: >-
6
6
  Signs your assistant back in when its sign-in to the project has expired.
7
7
  reach-for: >-
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: builder-redteam
3
3
  description: >-
4
- File a red-team or vulnerability report (severity, repro, expected vs actual) for the Archon. Metic+ only. Triggers: "/builder-redteam", "I found a security issue", "redteam report", "file a vuln", or describing a flaw in the system's own walls.
4
+ File a red-team or vulnerability report (severity, repro, expected vs actual) for the Archon. Metic+. Triggers: "/builder-redteam", "I found a security issue", "redteam report", "file a vuln", or describing a flaw in the system's own walls.
5
5
  plain: >-
6
6
  Files a private report about a security weakness you found, for the project's leads to see.
7
7
  reach-for: >-
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: builder-sequence
3
3
  description: >-
4
- Work a dependency chain from one kickoff: claim, build, ship, repeat; --goal N scopes it. Triggers: "/builder-sequence N", "work the chain from task N", "continue goal N", "let's tackle goal N", "run goal N end to end".
4
+ Work a dependency chain: claim, build, ship, repeat; --goal N scopes it. Triggers: "/builder-sequence N", "work the chain from task N", "continue goal N", "let's tackle goal N", "run goal N end to end".
5
5
  plain: >-
6
6
  Works through a chain of related tasks in order, finishing each one completely before starting the next.
7
7
  reach-for: >-
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: builder-setup
3
3
  description: >-
4
- One-time builder setup: GitHub sign-in and a stored CLI session token; asks which account if another is signed in. Triggers: "/builder-setup", "set up builder", "register me", "set up Bongos", or any /builder-* failing with "no Bongos session".
4
+ One-time builder setup: GitHub sign-in and a stored CLI token; asks which account if another is signed in. Triggers: "/builder-setup", "set up builder", "register me", "set up Bongos", or any /builder-* failing with "no Bongos session".
5
5
  plain: >-
6
6
  Connects your assistant to the project for the first time, using your GitHub account to sign in.
7
7
  reach-for: >-
@@ -22,7 +22,7 @@ The CLI drives a **three-state lifecycle** with a subagent grader between states
22
22
  2. **`confirmed`** — smoke green + the subagent grader passed. **Verified, but not yet paid** — no credits land here ([ADR 0120](../../../docs/adr/0120-pay-on-land-and-builder-owned-rebase-gate.md) pays on land, not on confirm). If the grade fails, the task stays at `completed` for human follow-up.
23
23
  3. **`shipped`** — the branch is merged into `main` + deployed (visible in production). The claim is released and the task is stamped `shipped_at` + `shipped_by`. **Credits land here**, as `credit_log.reason = 'task.shipped'` (a trigger updates `builders.total_credits`). If this step fails (conflicts, smoke red), the task stays at `confirmed` for `/merge-mode` to land later.
24
24
 
25
- > **What actually pays depends on the instance's reward mode** ([ADR 0146](../../../docs/adr/<redacted><redacted>.md)). The default `cost-plus-and-estimate` books both the per-task estimate and the cost-plus session reward. **Cloud Bongos runs `cost-plus-only`**, so the per-task `credits_reward` estimate is *never* paid here — it is an advertised guide only, and the cost-plus session reward (`round(true_cost_usd × 1.20)`) is the sole equity stream. A `Credits +0` on the ship card is expected on this instance, not a bug.
25
+ > **What actually pays depends on the instance's reward mode** ([ADR 0146](../../../docs/adr/<redacted><redacted>.md)). The default `cost-plus-and-estimate` books both the per-task estimate and the cost-plus session reward. **Cloud Bongos runs `cost-plus-only`**, so the per-task `credits_reward` estimate is *never* paid here — it is an advertised guide only, and the cost-plus session reward (`round(true_cost_usd × 1.20)`) is the sole credit stream (credits are a work meter, not equity — ADR 0387). A `Credits +0` on the ship card is expected on this instance, not a bug.
26
26
 
27
27
  `/builder-ship` runs steps 1 + 2 inline; on auto-confirm it chains into step 3 (push, merge on main, smoke, deploy).
28
28
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: collab-review
3
3
  description: >-
4
- Walk the help requests and task recommendations addressed to YOU, one decision at a time. Triggers: "/collab-review", "what have people asked me", "answer my asks", "work my collab queue", a pasted "Copy for Session Start" prompt.
4
+ Answer the help requests and recommendations sent to YOU, one decision at a time. Triggers: "/collab-review", "what have people asked me", "answer my asks", "work my collab queue", a pasted "Copy for Session Start" prompt.
5
5
  plain: >-
6
6
  Goes through the requests other people have sent you, such as asks for help or suggested tasks, and brings you one decision at a time.
7
7
  reach-for: >-
@@ -32,8 +32,11 @@ There is a skill for *asking* (`/ask-for-help`) and this is the one for *answeri
32
32
  ```bash
33
33
  node scripts/bongos/api.js GET /api/bongos/help-requests/for-me
34
34
  node scripts/bongos/api.js GET /api/bongos/task-recommendations/for-me
35
+ node scripts/bongos/api.js GET /api/bongos/government/blockers/for-me
35
36
  ```
36
37
 
38
+ The third is the open blockers whose seat resolves to the reader (as the owner, a building's Lead, or a board member; task 1004999). Each one is answered on its own blocker, not as a help request: say what it waits on and point at `/blockers`.
39
+
37
40
  `for-me` derives the reader's crafts from their own profile server-side. **Never send a `?craft=`** you did not first read back from `crafts` in the response — a craft param that widened rather than narrowed was the privacy hole this surface's grader found.
38
41
 
39
42
  Empty both ways → say "nothing is waiting on you" and stop. Otherwise sort **oldest `created_at` first**: age is the whole point of the queue, and the oldest ask is the one that has already cost the most.
@@ -135,6 +138,6 @@ Reviewed, decided, executed (with the ids of every write), replied to, and **lef
135
138
 
136
139
  ## Files this skill touches
137
140
 
138
- - Calls: `GET /api/bongos/help-requests/for-me`, `GET /api/bongos/task-recommendations/for-me`, `GET /api/bongos/tasks/:id`, `POST /api/bongos/help-requests/:id/replies`, `PATCH /api/bongos/help-requests/:id` (on instruction), `PATCH /api/bongos/task-recommendations/:id`, and the task lifecycle routes above.
141
+ - Calls: `GET /api/bongos/help-requests/for-me`, `GET /api/bongos/task-recommendations/for-me`, `GET /api/bongos/government/blockers/for-me`, `GET /api/bongos/tasks/:id`, `POST /api/bongos/help-requests/:id/replies`, `PATCH /api/bongos/help-requests/:id` (on instruction), `PATCH /api/bongos/task-recommendations/:id`, and the task lifecycle routes above.
139
142
  - Reads: `modules/lifecycle/routes/help-requests.js` and `recommendations.js` (who may reply, who may close), `modules/hall-ui/public/collab-lib.js` (the prompt the page pastes), ADR 0330 (replies, and who may close), ADR 0187 §3 (recommend, never transfer).
140
143
  - The asking half: `/ask-for-help`. The owner's own review queue: `/blocker-review`.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: design
3
3
  description: >-
4
- The UI design playbook: layouts, pages, components, design systems, the hall, status and landing. World-first: the branding pack and DESIGN.md before any taste rule. Triggers: "/design", "design this page", "let's work on the UI", a claimed ui task.
4
+ The UI design playbook: layouts, pages, components, design systems, hall, status, landing. World-first: branding pack and DESIGN.md before taste rules. Triggers: "/design", "design this page", "let's work on the UI", a claimed ui task.
5
5
  plain: >-
6
6
  The guided way to design or change how a page or screen looks, starting from the project's own style.
7
7
  reach-for: >-
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: goal-create
3
3
  description: >-
4
- Plan and create ONE goal (a module-scoped workspace) with its criteria and seed tasks, or spec one made in the hall. Metic+. Triggers: "/goal-create", "create a goal", "what goal should this live in", "spec goal N", a task created with no goal.
4
+ Plan and create ONE goal (module-scoped) with criteria and seed tasks, or spec a hall-made one. Metic+. Triggers: "/goal-create", "create a goal", "what goal should this live in", "spec goal N", a task created with no goal.
5
5
  plain: >-
6
6
  Helps you set up a new goal: what it is for, how you will know it is done, and the first tasks to get there.
7
7
  reach-for: >-
@@ -73,7 +73,7 @@ Everything here is your call. It is presented in Phase 4 as a proposal, not as q
73
73
  - **`category_id`** — the goal's HUMAN category (task 1003277; ADR 0192 — advisory, it gates nothing). Read the live set with `GET /api/bongos/work-categories` (never hard-code the labels), infer the best fit from the goal's outcome and its `scope_modules`, and state your pick in the Phase-4 approval round like every other drafted field. **When nothing in the set fits, that is a designed prompt, not an error**: do NOT silently pick the nearest, and do NOT leave it null and move on — surface the gap in the gray-area round and offer to create a new category (`POST /api/bongos/work-categories` with `{"label":"..."}`; a duplicate slug converges on the existing row), then use it. Creating uncategorised stays legal — if the user declines to name one, POST the goal without `category_id` and note that the 201 body will carry a `category_advisory` reminding whoever looks next.
74
74
  - **`succeeds_goal_id`** — set it when carrying an achieved goal forward. `POST /goals` validates the predecessor exists *before* creating, so a bad ref can't orphan a goal; it then stamps the predecessor's `succeeded_by_goal_id`. Archiving the predecessor is a **separate** call.
75
75
  - **Criteria — 2 to 4.** A goal's criteria are narrower than a version's: each should plausibly anchor 2–5 tasks. Draft `criterion_id` as a stable kebab slug (position-independent, and what `criterion_ids` on `POST /tasks` should reference); `criterion_md` is the outcome prose.
76
- - **Seed tasks — 3 to 8.** Per criterion, with `kind`, a one-line done-when, `criterion_ids: ["<slug>"]`, and dependency edges. Omit `touches[]` (advisory, ADR 0049 — backfilled from the real diff at ship). Never hand-set `requires_rank`: it auto-derives (ADR 0084) from `needs_migration` and the goal's own scope wall, neither of which needs a prediction (ADR 0270). **Make sure `needs_migration` is true on any task that will alter the live database** — it is the input that floors such a task at Metic, and leaving it false is how a schema change lands in the open queue. `POST /tasks` does **not** accept the field (400 `unknown_field`): it infers it from the title and description, so say "migration" or "schema" there, then re-read the created task and, if the guess missed, set it with `PATCH /tasks/<id> {"needs_migration": true}`. **Give every seed task a `discipline`** (`engineer | artist | ideator | ui`): when it is omitted the route infers it from the text, and a task it cannot place is refused 400 `bad_discipline`. Proof tasks use `kind='verify'`; exploration uses `kind='spike'` (and spikes are deliberately left in backlog).
76
+ - **Seed tasks — 3 to 8.** Per criterion, with `kind`, a one-line done-when, `criterion_ids: ["<slug>"]`, and dependency edges. Omit `touches[]` (advisory, ADR 0049 — backfilled from the real diff at ship). Never hand-set `requires_rank`: it auto-derives (ADR 0084) from `needs_migration` and the goal's own scope wall, neither of which needs a prediction (ADR 0270). **Make sure `needs_migration` is true on any task that will alter the live database** — it is the input that floors such a task at Metic, and leaving it false is how a schema change lands in the open queue. `POST /tasks` does **not** accept the field (400 `unknown_field`): it infers it from the title and description, so say "migration" or "schema" there, then re-read the created task and, if the guess missed, set it with `PATCH /tasks/<id> {"needs_migration": true}`. **Give every seed task a `discipline`** (`engineer | artist | ideator | ui`): when it is omitted the route infers it from the text, and a task it cannot place is refused 400 `bad_discipline`. Proof tasks use `kind='verify'`; exploration uses `kind='spike'` (and spikes are deliberately left in backlog). **Say what a task needs** when it needs more than the build loop: `"needs": ["owner"]` for a decision, account or permission only the project owner holds, `"needs": ["server"]` for hands-on work on the live host (DNS, secrets, the database by hand), both if both; omit it otherwise (most tasks). It narrows who is SHOWN the task, never who may read it (ADR 0395).
77
77
 
78
78
  ## Phase 4 — Ask, then get sign-off
79
79
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: grade-recover
3
3
  description: >-
4
- Diagnose why a ship parked at completed (grader outage, fabricated fail, or a real quality fail) and run the right recovery. Triggers: "/grade-recover N", "my grade failed", "grader unavailable", or a ship that landed at completed.
4
+ Diagnose why a ship parked at completed (grader outage, fabricated fail or real fail) and run the right recovery. Triggers: "/grade-recover N", "my grade failed", "grader unavailable", or a ship that landed at completed.
5
5
  plain: >-
6
6
  Works out why a quality review held your work back, whether the reviewer broke, got it wrong, or found a real problem, and takes the right next step.
7
7
  reach-for: >-
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: merge-mode
3
3
  description: >-
4
- Manual fallback for the /builder-ship auto-merge: walks each confirmed task through merge, smoke and deploy. Triggers: "/merge-mode", "merge the queue", "land confirmed tasks", "land the queue", or a /builder-ship that reported the auto-merge bailed.
4
+ Manual fallback for the /builder-ship auto-merge: walks each confirmed task through merge, smoke, deploy. Triggers: "/merge-mode", "merge the queue", "land confirmed tasks", "land the queue", or a /builder-ship whose auto-merge bailed.
5
5
  requires: [main-checkout, push-credential, gh, droplet-ssh]
6
6
  plain: >-
7
7
  The manual backup for finishing hand-ins: it takes approved work that did not merge by itself and puts it live.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: owner-review
3
3
  description: >-
4
- The owner's review in one walk: backlog (what needs a go), bugs (dedupe), ideas (promote, drop, merge), then priorities. Metic+. Triggers: "/owner-review", "review the backlog", "triage bugs", "triage ideas", "review the inbox", "reprioritize".
4
+ The owner's review in one walk: backlog, bugs, ideas, then priorities. Metic+. Triggers: "/owner-review", "review the backlog", "triage bugs", "triage ideas", "review the inbox", "reprioritize".
5
5
  plain: >-
6
6
  One place to go through everything waiting on you: work that needs a go-ahead, reported problems, new ideas, and what matters most next.
7
7
  reach-for: >-
@@ -285,7 +285,7 @@ This is what the V3.R02 (task 309) dependency system encodes; Phase 5 writes bot
285
285
 
286
286
  Once the spec is finalized (Phase 4), **read `docs/specs/<ver>-<goal-slug>.md` as the source of truth** and do the writes in this exact order.
287
287
 
288
- **Probe the session right before the first write, and recover on a 401 (task 1002865).** Call `GET /api/bongos/me` again here: a session that passed the gate at Phase 1 can expire during a long interview (the retro that filed this: 200 at the gate, 401 by Phase 5). If the probe — or ANY write below — answers `401` / "session is no longer valid", **do not abandon the session**: tell the builder to run `/builder-reauth`, wait for it, then **resume** from the write that failed. Everything the session decided is already in the spec file (Phase 4 spooled it), and the writes are idempotent — the meta task and every seeded task on `source_ref`, criteria on `criterion_id` (a 409 means already seeded), dependencies on `(task_id, depends_on_task_id)` — so re-running the seed script after a re-auth creates nothing twice. (If the goal and its criteria already exist — e.g. this session planned tasks for a pre-existing goal — skip the goal/criteria creation in step 2 and seed the tasks under the existing goal, linking them via `criterion_ids` + `goal_id`.)
288
+ **Probe the session right before the first write, and recover on a 401 (task 1002865).** Call `GET /api/bongos/me` again here: a session that passed the gate at Phase 1 can expire during a long interview (the retro that filed this: 200 at the gate, 401 by Phase 5). If the probe — or ANY write below — answers `401` / "session is no longer valid", **do not abandon the session**: tell the builder to run `/builder-reauth`, wait for it, then **resume** from the write that failed. Everything the session decided is already in the spec file (Phase 4 spooled it), and the writes are idempotent — the meta task and every seeded task on `source_ref`, criteria on `criterion_id` (a 409 means already seeded), dependencies on `(task_id, depends_on_task_id)` — so re-running `seed-tasks.js` after a re-auth creates nothing twice. (If the goal and its criteria already exist — e.g. this session planned tasks for a pre-existing goal — skip the goal/criteria creation in step 2 and seed the tasks under the existing goal, linking them via `criterion_ids` + `goal_id`.)
289
289
 
290
290
  1. **Create a meta planning-session task** (`source_ref='<ver>-planning-N'`) that backs all the writes — version='<ver>', kind='decision', status='ready', priority=5, the full session described in its body. Claim it. (For a long session — a big spec + a multi-round interview — create and claim this meta task **early, at Phase 1**, so the spec-write and interview are themselves covered by a claim. A rebase-gated builder can't claim new work; as Archon, proceed and record the session in the meta task even if the claim is blocked, noting it.)
291
291
 
@@ -303,20 +303,20 @@ 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/<redacted>.js` (or `<redacted>.js`) containing:
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.
306
+ 3. **Write a seed spec** — a JSON file for `scripts/bongos/seed-tasks.js`, the one task seeder (task 1004979; it replaced the per-version seed scripts sessions used to copy). Start from `scripts/bongos/seed-tasks.example.json`; the three historical seeds live on as specs under `tests/fixtures/seed-tasks/`. Keep the spec out of the repo unless the session wants it recorded. It holds `version_id`, `goal_id`, a per-seed `source_ref_prefix`, optional `promote: ['R##', ...]` and `links[]` (follow-up writes), and:
307
+ - `tasks[]` — one entry per net-new task: `ref`, `title`, full `description`, `kind`, `discipline`, `priority`, optional `est_minutes` / `manual_degree` / `credits_reward` / `requires_rank`, **optional** `touches` (see below), `deps: ['R##', ...]` (the dep edges captured during brainstorm), AND **`criterion_ids: ['<slug>', ...]`** — 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.
310
- - **Pass `goal_id: <gid>` on each task** so it lands under its goal (not the version's default catch-all). `POST /tasks` now honors `goal_id` (validated to belong to the version); to move an already-created task, `PATCH /tasks/:id` with `{goal_id}` (task 1763). `criterion_ids` accepts a **slug** (the `criterion_id` you set above), a numeric id, or a `"Cn"` position — **but `Cn` is rejected outright once the version holds a second goal**, and a version almost always gains one. Treat the slug as the only form you write.
311
- - A main() that POSTs each task **with its `criterion_ids`** (idempotent on `source_ref`; the criterion links are inserted at create, idempotent on `(task_id, criterion_id)`), PATCHes `idea_inbox` for promotions, and after all tasks exist, POSTs `task_dependencies` via `POST /tasks/:id/dependencies` (resolving each R## to the just-created task ID). Idempotent on `(task_id, depends_on_task_id)`. (Need to re-attribute an already-seeded task? `POST /tasks/:id/criteria` with `{criterion_ids:['Cn',...]}`; `DELETE /tasks/:id/criteria/:criterionId` to detach — both Metic+ ([ADR 0090](../../../docs/adr/0090-metic-task-authoring.md)), mirroring the dependency endpoints.)
310
+ - **The spec's `goal_id` is sent on each task** so it lands under its goal (not the version's default catch-all). `POST /tasks` now honors `goal_id` (validated to belong to the version); to move an already-created task, `PATCH /tasks/:id` with `{goal_id}` (task 1763). `criterion_ids` accepts a **slug** (the `criterion_id` you set above), a numeric id, or a `"Cn"` position — **but `Cn` is rejected outright once the version holds a second goal**, and a version almost always gains one. Treat the slug as the only form you write.
311
+ - **You write no HTTP code.** `seed-tasks.js` POSTs each task **with its `criterion_ids`** (idempotent on `source_ref`; the criterion links are inserted at create, idempotent on `(task_id, criterion_id)`), and after all tasks exist, POSTs `task_dependencies` via `POST /tasks/:id/dependencies` (resolving each R## to the just-created task ID; idempotent on `(task_id, depends_on_task_id)`), then the `promote` list, then `links[]`. Mark a promoted idea with a link: `{"method":"PATCH","path":"/inbox/<idea>","body":{"status":"promoted","promoted_to_task_id":{"$task":"R##"}}}` — the `$task` value becomes that ref's task id. It refuses a positional `"Cn"` ref before its first write. Run `node scripts/bongos/seed-tasks.js <spec.json> --dry-run` first: it validates the spec and prints the plan, and files nothing. (Need to re-attribute an already-seeded task? `POST /tasks/:id/criteria` with `{criterion_ids:['Cn',...]}`; `DELETE /tasks/:id/criteria/:criterionId` to detach — both Metic+ ([ADR 0090](../../../docs/adr/0090-metic-task-authoring.md)), mirroring the dependency endpoints.)
312
312
 
313
- > **Seeding contract — validated on goal 1000045 (2026-07-16):** proof-tasks use `kind='verify'` (a deliverable that IS a verification; can't be prematurely confirmed), spikes `kind='spike'`; `POST /tasks` accepts `criterion_ids` + `goal_id` inline and disciplines include `ui`; there is **no `promoted_idea_id`** field on `POST /tasks` — mark a promoted idea via `PATCH /inbox/:id`; **descoping a criterion has no API** (done-when is create/satisfy/unsatisfy only) — remove the row via a direct DB delete (`ssh … "sudo -u postgres psql -d <db> -c \"DELETE FROM done_when_criteria WHERE id=…\""`) under the meta-task claim, capturing the SQL in its notes; and a seed script **must throttle + honor `429` `retry_after`** (per-IP rate limit) — add a base delay between calls and back off on 429, or a large seed dies halfway. A completed reference seed: `scripts/bongos/<redacted>.js`.
313
+ > **Seeding contract — validated on goal 1000045 (2026-07-16):** proof-tasks use `kind='verify'` (a deliverable that IS a verification; can't be prematurely confirmed), spikes `kind='spike'`; `POST /tasks` accepts `criterion_ids` + `goal_id` inline and disciplines include `ui`; there is **no `promoted_idea_id`** field on `POST /tasks` — mark a promoted idea via `PATCH /inbox/:id`; **descoping a criterion has no API** (done-when is create/satisfy/unsatisfy only) — remove the row via a direct DB delete (`ssh … "sudo -u postgres psql -d <db> -c \"DELETE FROM done_when_criteria WHERE id=…\""`) under the meta-task claim, capturing the SQL in its notes; and a seed **must throttle + honor `429` `retry_after`** (per-IP rate limit) or a large seed dies halfway — `seed-tasks.js` waits 400 ms between calls and backs off on 429. A completed reference seed: `tests/fixtures/seed-tasks/bv1-profiles.json`.
314
314
  >
315
- > **Every seed script verifies its own criterion links — fail loudly on any mismatch, zero included (task 1003076, retro on goal 1000071).** The goal-1000071 seeder linked all 15 tasks to the WRONG criteria (a positional `"Cn"` token resolved against the whole VERSION's criterion order, not the goal's — learning 1000188) and still printed success; only a manual `GET /goals` rollup caught it, after the fact. Every seed script's `main()` must end by tallying the `criterion_ids` it actually POSTed per task, then calling `verifySeedCriteriaLinks` from [`scripts/bongos/seed-verify-criteria.js`](../../../scripts/bongos/seed-verify-criteria.js) — it fetches `GET /api/bongos/goals/<id>`, diffs the returned `criteria[].linked_tasks` against that plan, and `exit(1)`s with a loud per-criterion diff on any mismatch (see `expectedCriterionCounts` + `verifySeedCriteriaLinks`). Reference implementation: `scripts/bongos/<redacted>.js`. **Seeding into a goal that already has linked tasks?** Call `baselineSeedCriteria` BEFORE the first write and pass its result as `baseline` to the verify (task 1004668; reference: `scripts/bongos/<redacted>.js`) — the check then covers every criterion on the goal, pre-existing counts included, and still catches a stray link on one the seed never meant to touch. With a baseline, tally only the tasks this run CREATED — skip any create that answers `idempotent: true`, since a re-run's replayed task is already inside the baseline and counting it again expects its links twice. Without a baseline only the plan's own criteria are checked. This is a script-level check, independent of whatever caused the mislink — it catches the *symptom* (a criterion silently under- or over-linked) whichever bug produces it.
315
+ > **Every seed verifies its own criterion links — fail loudly on any mismatch, zero included (task 1003076, retro on goal 1000071).** The goal-1000071 seeder linked all 15 tasks to the WRONG criteria (a positional `"Cn"` token resolved against the whole VERSION's criterion order, not the goal's — learning 1000188) and still printed success; only a manual `GET /goals` rollup caught it, after the fact. Every seed must end by tallying the `criterion_ids` it actually POSTed per task, then calling `verifySeedCriteriaLinks` from [`scripts/bongos/seed-verify-criteria.js`](../../../scripts/bongos/seed-verify-criteria.js) — it fetches `GET /api/bongos/goals/<id>`, diffs the returned `criteria[].linked_tasks` against that plan, and `exit(1)`s with a loud per-criterion diff on any mismatch (see `expectedCriterionCounts` + `verifySeedCriteriaLinks`). Reference implementation: `scripts/bongos/seed-tasks.js`, which does all of this for every spec unless the spec sets `"verify_criteria": false`. **Seeding into a goal that already has linked tasks?** `seed-tasks.js` calls `baselineSeedCriteria` BEFORE the first write and passes its result as `baseline` to the verify (task 1004668) — the check then covers every criterion on the goal, pre-existing counts included, and still catches a stray link on one the seed never meant to touch. With a baseline, tally only the tasks this run CREATED — skip any create that answers `idempotent: true`, since a re-run's replayed task is already inside the baseline and counting it again expects its links twice. Without a baseline only the plan's own criteria are checked. This is a script-level check, independent of whatever caused the mislink — it catches the *symptom* (a criterion silently under- or over-linked) whichever bug produces it.
316
316
 
317
317
  4. **Apply the migration** (commit + push + deploy, or direct psql via SSH for hot-fix style).
318
318
 
319
- 5. **Run the seed script.** Verify exit code 0 — the seed's own final step (the Seeding contract's `verifySeedCriteriaLinks` call, above) already fails loudly if any criterion's linked task count doesn't match the plan, so a 0 exit means the links landed correctly, not just that the POSTs didn't error. Also spot-check totals via `GET /api/bongos/public/progress` and `GET /api/bongos/versions/<ver>/done-when`.
319
+ 5. **Run the seed:** `node scripts/bongos/seed-tasks.js <spec.json>`. Verify exit code 0 — the seed's own final step (the Seeding contract's `verifySeedCriteriaLinks` call, above) already fails loudly if any criterion's linked task count doesn't match the plan, so a 0 exit means the links landed correctly, not just that the POSTs didn't error. Also spot-check totals via `GET /api/bongos/public/progress` and `GET /api/bongos/versions/<ver>/done-when`.
320
320
 
321
321
  6. **Promote the zero-dep layer to `ready` — scoped to the tasks you just seeded, and only what is still at `backlog`.** Do **not** assume the seed landed at `backlog`: read the seeded rows' statuses and report them (task 1004668). `POST /tasks` answers `backlog`, but the reconciler's backlog sweep (`PROMOTABLE_BACKLOG_WHERE` in `modules/lifecycle/db-tasks.js`, task 1003932) promotes any task with no unmet dependency and no open blocker within about a minute — seeding 27 tasks into goal 1000095 found 24 already at `ready`, spikes included, and the promote below had almost nothing to do. A zero-dep task the sweep has not reached yet is the only thing this step is for.
322
322
 
@@ -328,7 +328,7 @@ Once the spec is finalized (Phase 4), **read `docs/specs/<ver>-<goal-slug>.md` a
328
328
 
329
329
  Both are ordinary carry-overs in any version that has been live for a while, so the blast radius grows the longer an instance runs.
330
330
 
331
- Every seed script POSTs with `source: 'planning-session'` and a per-seed `source_ref` prefix (see `scripts/bongos/<redacted>.js`), which is the handle to scope by — it needs no id transcription and cannot drift from what the seed actually created. **Dry-run the SELECT first and read the rows**, in the same psql session as the migration (or via SSH to the droplet):
331
+ Every seed POSTs with `source: 'planning-session'` and a per-seed `source_ref` prefix (`seed-tasks.js` sends `<source_ref_prefix>-<ref>`), which is the handle to scope by — it needs no id transcription and cannot drift from what the seed actually created. **Dry-run the SELECT first and read the rows**, in the same psql session as the migration (or via SSH to the droplet):
332
332
 
333
333
  ```sql
334
334
  SELECT id, title, priority, kind
@@ -377,7 +377,7 @@ Once the spec is finalized (Phase 4), **read `docs/specs/<ver>-<goal-slug>.md` a
377
377
 
378
378
  If the query returns nothing, stay silent. Don't volunteer info about lower-priority spikes — the next planning session or `/idea-triage` walk will handle those at the right moment.
379
379
 
380
- 8. **Commit + push** the spec file (`docs/specs/<ver>-<goal-slug>.md`) + the migration + seed script + any new skill files + the session-log entry.
380
+ 8. **Commit + push** the spec file (`docs/specs/<ver>-<goal-slug>.md`) + the migration + the seed spec (if the session keeps it) + any new skill files + the session-log entry.
381
381
 
382
382
  9. **Ship the meta task** via `/builder-ship` with a clean value-summary.
383
383
 
@@ -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 `scripts/bongos/<redacted>.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/seed-tasks.js`. Mirror those patterns rather than inventing new ones.
399
399
 
400
400
  ## Tone for the user
401
401
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: read-session-export
3
3
  description: >-
4
- Read a Claude Code /export zip to answer questions about a past session; never creates one. Triggers: a dropped session-export-*.zip, "read/summarize this session", "what happened in this session", "what was I/you thinking", "/read-session-export".
4
+ Read a Claude Code /export zip to answer questions about a past session; never makes one. Triggers: a dropped session-export-*.zip, "read/summarize this session", "what happened in this session", "what was I/you thinking", "/read-session-export".
5
5
  plain: >-
6
6
  Reads a saved copy of a past conversation with your assistant and answers questions about what happened in it.
7
7
  reach-for: >-
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: recall
3
3
  description: >-
4
- Read-only, rank-scoped search over repo docs and DB prose; use it instead of grepping. Triggers: "/recall", "what do we know about X", "have we done X before", "did a past session hit X", "search the docs/ADRs for X", "is there an ADR about X".
4
+ Read-only, rank-scoped search of repo docs and DB prose; use it instead of grepping. Triggers: "/recall", "what do we know about X", "have we done X before", "did a past session hit X", "search the docs/ADRs for X", "is there an ADR about X".
5
5
  plain: >-
6
6
  Searches everything the project already knows, its documents and past decisions, in one go.
7
7
  reach-for: >-
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: scan-before-install
3
3
  description: >-
4
- Vet a third-party GitHub repo or Claude plugin BEFORE installing: quarantined fetch, deterministic floor, subagent panel, verdict. Never installs. Triggers: "/scan-before-install", "is this plugin safe to install", "vet this GitHub repo".
4
+ Vet a third-party GitHub repo or Claude plugin BEFORE installing (quarantined fetch, checks, subagent panel, verdict); never installs. Triggers: "/scan-before-install", "is this plugin safe to install", "vet this GitHub repo".
5
5
  plain: >-
6
6
  Checks an outside add-on or code project for safety problems before you install it.
7
7
  reach-for: >-
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: session-handoff
3
3
  description: >-
4
- Emit a paste-ready next-steps prompt so a FRESH session starts with curated context. Triggers: "/session-handoff", "hand off to a fresh session", "give me a handoff prompt", "wrap up context for next time", "continue this in a new session".
4
+ Emit a paste-ready prompt so a FRESH session starts with curated context. Triggers: "/session-handoff", "hand off to a fresh session", "give me a handoff prompt", "wrap up context for next time", "continue this in a new session".
5
5
  plain: >-
6
6
  Writes a ready-to-paste note so a fresh conversation can pick up exactly where this one left off.
7
7
  reach-for: >-
@@ -19,6 +19,18 @@ You are landing one stranded task. The reconciler is not coming back for it —
19
19
  node scripts/bongos/skill-preflight.js strand-fix # exits 1 naming what is MISSING (gh)
20
20
  ```
21
21
 
22
+ ## Take the strand before you touch it (task 1004956)
23
+
24
+ Several sessions see the same strand note. ONE fixes it; the rest are told who has it.
25
+
26
+ ```bash
27
+ node scripts/bongos/strand-lease.js take N # exit 0: it is yours · exit 3: another session has it
28
+ ```
29
+
30
+ - **Exit 3** — it prints which session holds it. **Stop here**: leave that strand to that session and go back to your own work. Do not walk it in parallel. The hold runs out by itself (45 minutes after its last renewal) if that session stops, and the next startup note will offer it again.
31
+ - **Exit 0** — it is yours. Run `take N` again before each slow step (a merge, a test run, a ship) to renew it; renewing is how other sessions know you are still on it.
32
+ - Landing it (`ship.js`) or releasing it (`release.js`) clears the hold. If you stop without either — the work needs a person, say — run `node scripts/bongos/strand-lease.js release N` so another session can try.
33
+
22
34
  ## Which shape is this? (read first)
23
35
 
24
36
  `node scripts/bongos/strand-watch.js --json` — find the task. Three shapes, three owners:
@@ -57,6 +69,7 @@ node scripts/bongos/skill-preflight.js strand-fix # exits 1 naming what is MIS
57
69
  ## Rules
58
70
 
59
71
  - One task per invocation; the strand list is short and every case differs.
72
+ - One session per strand: take the lease first, and never walk a strand another session holds.
60
73
  - Never `git push origin main`, never force-push, never re-`confirm` around the grader — the fix is always land, flip, or release.
61
74
  - Wrong shape → hand off (`/merge-mode`, `/grade-recover`) instead of improvising.
62
75
  - No claim is needed to walk someone else's strand — landing confirmed work is the reconciler's job, and this is its manual fallback (Metic+; the ship route is rank-gated server-side).
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: worktree-clean
3
3
  description: >-
4
- Remove per-claim worktrees whose work landed, and sweep the husks a locked remove leaves, via junction-safe worktree.js, never raw git worktree remove. Triggers: "/worktree-clean", "prune stale worktrees", "worktree husks".
4
+ Remove per-claim worktrees whose work landed and sweep locked-remove husks, via junction-safe worktree.js, never raw git worktree remove. Triggers: "/worktree-clean", "prune stale worktrees", "worktree husks".
5
5
  plain: >-
6
6
  Tidies away old workspace folders on your computer whose work has already been merged.
7
7
  reach-for: >-
package/AGENTS.md ADDED
@@ -0,0 +1,15 @@
1
+ # @bongos/core — installed platform dependency (not your project's CLAUDE.md)
2
+
3
+ This file is a placeholder shipped inside the **@bongos/core** package. The core's own
4
+ internal agent notes are intentionally omitted from the published artifact so they cannot
5
+ load into your instance's context.
6
+
7
+ **It does not govern this repository.** Your own root `CLAUDE.md`, your `.claude/`
8
+ directory, and the live Bongos database are the source of truth for how work happens here
9
+ and who may do what.
10
+
11
+ You are seeing this only because an agent opened a file under `node_modules/@bongos/core/`.
12
+ Nothing in here needs to be read to use the platform — run `bongos help` for commands.
13
+
14
+ _To work ON the platform core itself, use the standalone @bongos/core source repository,
15
+ not this vendored copy._
package/GEMINI.md ADDED
@@ -0,0 +1,5 @@
1
+ # GEMINI.md
2
+
3
+ Gemini: this project's rules for every AI model are in [`AGENTS.md`](AGENTS.md) — read it, then [`CLAUDE.md`](CLAUDE.md).
4
+
5
+ When you need the person, start the line with `🙋 **HUMAN TASK:**` (they must do something) or `🔀 **HUMAN DECISION:**` (they must choose; list the options and mark your pick).
@@ -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
- - 588 operations across 77 resource groups
8
+ - 631 operations across 79 resource groups
9
9
 
10
10
  ## Use it from your project
11
11
 
@@ -125,8 +125,30 @@ function createClient(opts = {}) {
125
125
  postAgentsNameInvoke: (args) => request("POST", "/agents/{name}/invoke", { hasBody: true }, args),
126
126
  },
127
127
  "aiStudio": {
128
+ // GET /ai-studio/balance — rank: any-builder — GET /ai-studio/balance
129
+ getAiStudioBalance: (args) => request("GET", "/ai-studio/balance", { hasBody: false }, args),
130
+ // GET /ai-studio/files/{id} — rank: any-builder — GET /ai-studio/files/:id
131
+ getAiStudioFilesId: (args) => request("GET", "/ai-studio/files/{id}", { hasBody: false }, args),
132
+ // GET /ai-studio/keys — rank: any-builder — GET /ai-studio/keys
133
+ getAiStudioKeys: (args) => request("GET", "/ai-studio/keys", { hasBody: false }, args),
134
+ // DELETE /ai-studio/keys/{provider} — rank: any-builder — DELETE /ai-studio/keys/:provider
135
+ deleteAiStudioKeysProvider: (args) => request("DELETE", "/ai-studio/keys/{provider}", { hasBody: false }, args),
136
+ // PUT /ai-studio/keys/{provider} — rank: any-builder — PUT /ai-studio/keys/:provider
137
+ putAiStudioKeysProvider: (args) => request("PUT", "/ai-studio/keys/{provider}", { hasBody: true }, args),
138
+ // GET /ai-studio/requests — rank: any-builder — GET /ai-studio/requests
139
+ getAiStudioRequests: (args) => request("GET", "/ai-studio/requests", { hasBody: false }, args),
140
+ // POST /ai-studio/requests — rank: any-builder — POST /ai-studio/requests
141
+ postAiStudioRequests: (args) => request("POST", "/ai-studio/requests", { hasBody: true }, args),
142
+ // GET /ai-studio/requests/{id} — rank: any-builder — GET /ai-studio/requests/:id
143
+ getAiStudioRequestsId: (args) => request("GET", "/ai-studio/requests/{id}", { hasBody: false }, args),
128
144
  // GET /ai-studio/status — rank: any-builder — GET /ai-studio/status
129
145
  getAiStudioStatus: (args) => request("GET", "/ai-studio/status", { hasBody: false }, args),
146
+ // POST /ai-studio/topup — rank: any-builder — POST /ai-studio/topup
147
+ postAiStudioTopup: (args) => request("POST", "/ai-studio/topup", { hasBody: true }, args),
148
+ // GET /ai-studio/topup/quote — rank: any-builder — GET /ai-studio/topup/quote
149
+ getAiStudioTopupQuote: (args) => request("GET", "/ai-studio/topup/quote", { hasBody: false }, args),
150
+ // POST /ai-studio/uploads — rank: any-builder — POST /ai-studio/uploads
151
+ postAiStudioUploads: (args) => request("POST", "/ai-studio/uploads", { hasBody: true }, args),
130
152
  },
131
153
  "analytics": {
132
154
  // GET /analytics/builder/{id} — rank: any-builder — GET /analytics/builder/:id
@@ -145,6 +167,10 @@ function createClient(opts = {}) {
145
167
  postAuthBackchannelLogout: (args) => request("POST", "/auth/backchannel-logout", { hasBody: true }, args),
146
168
  // POST /auth/cli-token/issue — rank: any-builder — POST /auth/cli-token/issue
147
169
  postAuthCliTokenIssue: (args) => request("POST", "/auth/cli-token/issue", { hasBody: true }, args),
170
+ // GET /auth/device — rank: public — GET /auth/device
171
+ getAuthDevice: (args) => request("GET", "/auth/device", { hasBody: false }, args),
172
+ // POST /auth/device/approve — rank: any-builder — POST /auth/device/approve
173
+ postAuthDeviceApprove: (args) => request("POST", "/auth/device/approve", { hasBody: true }, args),
148
174
  // POST /auth/device/exchange — rank: public — POST /auth/device/exchange
149
175
  postAuthDeviceExchange: (args) => request("POST", "/auth/device/exchange", { hasBody: true }, args),
150
176
  // POST /auth/device/poll — rank: public — POST /auth/device/poll
@@ -157,6 +183,10 @@ function createClient(opts = {}) {
157
183
  getAuthDiscordStart: (args) => request("GET", "/auth/discord/start", { hasBody: false }, args),
158
184
  // POST /auth/discord/unlink — rank: any-builder — POST /auth/discord/unlink
159
185
  postAuthDiscordUnlink: (args) => request("POST", "/auth/discord/unlink", { hasBody: true }, args),
186
+ // GET /auth/google/callback — rank: public — GET /auth/google/callback
187
+ getAuthGoogleCallback: (args) => request("GET", "/auth/google/callback", { hasBody: false }, args),
188
+ // GET /auth/google/start — rank: public — GET /auth/google/start
189
+ getAuthGoogleStart: (args) => request("GET", "/auth/google/start", { hasBody: false }, args),
160
190
  // POST /auth/logout — rank: any-builder — POST /auth/logout
161
191
  postAuthLogout: (args) => request("POST", "/auth/logout", { hasBody: true }, args),
162
192
  // POST /auth/revoke — rank: archon — POST /auth/revoke
@@ -233,6 +263,8 @@ function createClient(opts = {}) {
233
263
  getBuildersIdActivity: (args) => request("GET", "/builders/{id}/activity", { hasBody: false }, args),
234
264
  // PATCH /builders/{id}/budget — rank: metic+archon — PATCH /builders/:id/budget
235
265
  patchBuildersIdBudget: (args) => request("PATCH", "/builders/{id}/budget", { hasBody: true }, args),
266
+ // PATCH /builders/{id}/capabilities — rank: archon — PATCH /builders/:id/capabilities
267
+ patchBuildersIdCapabilities: (args) => request("PATCH", "/builders/{id}/capabilities", { hasBody: true }, args),
236
268
  // GET /builders/{id}/onboarding — rank: public — GET /builders/:id/onboarding
237
269
  getBuildersIdOnboarding: (args) => request("GET", "/builders/{id}/onboarding", { hasBody: false }, args),
238
270
  // GET /builders/{id}/profile — rank: public — GET /builders/:id/profile
@@ -525,6 +557,10 @@ function createClient(opts = {}) {
525
557
  postGovernmentAssignments: (args) => request("POST", "/government/assignments", { hasBody: true }, args),
526
558
  // DELETE /government/assignments/{builderId}/{rankKey} — rank: archon — DELETE /government/assignments/:builderId/:rankKey
527
559
  deleteGovernmentAssignmentsBuilderIdRankKey: (args) => request("DELETE", "/government/assignments/{builderId}/{rankKey}", { hasBody: false }, args),
560
+ // GET /government/blockers/for-me — rank: any-builder — GET /government/blockers/for-me
561
+ getGovernmentBlockersForMe: (args) => request("GET", "/government/blockers/for-me", { hasBody: false }, args),
562
+ // GET /government/blockers/people — rank: any-builder — GET /government/blockers/people
563
+ getGovernmentBlockersPeople: (args) => request("GET", "/government/blockers/people", { hasBody: false }, args),
528
564
  // POST /government/board/charter — rank: metic+archon — POST /government/board/charter
529
565
  postGovernmentBoardCharter: (args) => request("POST", "/government/board/charter", { hasBody: true }, args),
530
566
  // POST /government/board/decision-rules — rank: metic+archon — POST /government/board/decision-rules
@@ -745,6 +781,8 @@ function createClient(opts = {}) {
745
781
  deleteMeFilterViewsId: (args) => request("DELETE", "/me/filter-views/{id}", { hasBody: false }, args),
746
782
  // PATCH /me/filter-views/{id} — rank: any-builder — PATCH /me/filter-views/:id
747
783
  patchMeFilterViewsId: (args) => request("PATCH", "/me/filter-views/{id}", { hasBody: true }, args),
784
+ // POST /me/guardian-cosigns — rank: any-builder — POST /me/guardian-cosigns
785
+ postMeGuardianCosigns: (args) => request("POST", "/me/guardian-cosigns", { hasBody: true }, args),
748
786
  // GET /me/guild-engagements — rank: any-builder — GET /me/guild-engagements
749
787
  getMeGuildEngagements: (args) => request("GET", "/me/guild-engagements", { hasBody: false }, args),
750
788
  // GET /me/guild-requests — rank: any-builder — GET /me/guild-requests
@@ -779,6 +817,12 @@ function createClient(opts = {}) {
779
817
  postMePasskeysRemove: (args) => request("POST", "/me/passkeys/remove", { hasBody: true }, args),
780
818
  // POST /me/passkeys/rename — rank: any-builder — POST /me/passkeys/rename
781
819
  postMePasskeysRename: (args) => request("POST", "/me/passkeys/rename", { hasBody: true }, args),
820
+ // POST /me/payout-age — rank: any-builder — POST /me/payout-age
821
+ postMePayoutAge: (args) => request("POST", "/me/payout-age", { hasBody: true }, args),
822
+ // POST /me/payout-freezes/{id}/appeal — rank: any-builder — POST /me/payout-freezes/:id/appeal
823
+ postMePayoutFreezesIdAppeal: (args) => request("POST", "/me/payout-freezes/{id}/appeal", { hasBody: true }, args),
824
+ // GET /me/payouts — rank: any-builder — GET /me/payouts
825
+ getMePayouts: (args) => request("GET", "/me/payouts", { hasBody: false }, args),
782
826
  // PATCH /me/profile — rank: any-builder — PATCH /me/profile
783
827
  patchMeProfile: (args) => request("PATCH", "/me/profile", { hasBody: true }, args),
784
828
  // GET /me/profile-nudge — rank: any-builder — GET /me/profile-nudge
@@ -797,6 +841,8 @@ function createClient(opts = {}) {
797
841
  postMeSessionsRevoke: (args) => request("POST", "/me/sessions/revoke", { hasBody: true }, args),
798
842
  // POST /me/sessions/revoke-all — rank: any-builder — POST /me/sessions/revoke-all
799
843
  postMeSessionsRevokeAll: (args) => request("POST", "/me/sessions/revoke-all", { hasBody: true }, args),
844
+ // GET /me/sign-in-methods — rank: any-builder — GET /me/sign-in-methods
845
+ getMeSignInMethods: (args) => request("GET", "/me/sign-in-methods", { hasBody: false }, args),
800
846
  // GET /me/skill-prefs — rank: any-builder — GET /me/skill-prefs
801
847
  getMeSkillPrefs: (args) => request("GET", "/me/skill-prefs", { hasBody: false }, args),
802
848
  // PATCH /me/skill-prefs — rank: any-builder — PATCH /me/skill-prefs
@@ -876,6 +922,16 @@ function createClient(opts = {}) {
876
922
  // POST /my-projects/join — rank: any-builder — POST /my-projects/join
877
923
  postMyProjectsJoin: (args) => request("POST", "/my-projects/join", { hasBody: true }, args),
878
924
  },
925
+ "notes": {
926
+ // GET /notes — rank: any-builder — GET /notes
927
+ getNotes: (args) => request("GET", "/notes", { hasBody: false }, args),
928
+ // POST /notes — rank: any-builder — POST /notes
929
+ postNotes: (args) => request("POST", "/notes", { hasBody: true }, args),
930
+ // DELETE /notes/{id} — rank: any-builder — DELETE /notes/:id
931
+ deleteNotesId: (args) => request("DELETE", "/notes/{id}", { hasBody: false }, args),
932
+ // PATCH /notes/{id} — rank: any-builder — PATCH /notes/:id
933
+ patchNotesId: (args) => request("PATCH", "/notes/{id}", { hasBody: true }, args),
934
+ },
879
935
  "npmRelease": {
880
936
  // DELETE /npm-release/preview — rank: any-builder — DELETE /npm-release/preview
881
937
  deleteNpmReleasePreview: (args) => request("DELETE", "/npm-release/preview", { hasBody: false }, args),
@@ -922,6 +978,40 @@ function createClient(opts = {}) {
922
978
  // GET /page-notes/site — rank: any-builder — GET /page-notes/site
923
979
  getPageNotesSite: (args) => request("GET", "/page-notes/site", { hasBody: false }, args),
924
980
  },
981
+ "payouts": {
982
+ // POST /payouts/age-records — rank: archon — POST /payouts/age-records
983
+ postPayoutsAgeRecords: (args) => request("POST", "/payouts/age-records", { hasBody: true }, args),
984
+ // GET /payouts/approvals — rank: archon — GET /payouts/approvals
985
+ getPayoutsApprovals: (args) => request("GET", "/payouts/approvals", { hasBody: false }, args),
986
+ // POST /payouts/approve — rank: archon — POST /payouts/approve
987
+ postPayoutsApprove: (args) => request("POST", "/payouts/approve", { hasBody: true }, args),
988
+ // POST /payouts/contracts — rank: archon — POST /payouts/contracts
989
+ postPayoutsContracts: (args) => request("POST", "/payouts/contracts", { hasBody: true }, args),
990
+ // POST /payouts/freezes — rank: archon — POST /payouts/freezes
991
+ postPayoutsFreezes: (args) => request("POST", "/payouts/freezes", { hasBody: true }, args),
992
+ // POST /payouts/freezes/{id}/decide — rank: archon — POST /payouts/freezes/:id/decide
993
+ postPayoutsFreezesIdDecide: (args) => request("POST", "/payouts/freezes/{id}/decide", { hasBody: true }, args),
994
+ // GET /payouts/gates/{builderId} — rank: archon — GET /payouts/gates/:builderId
995
+ getPayoutsGatesBuilderId: (args) => request("GET", "/payouts/gates/{builderId}", { hasBody: false }, args),
996
+ // POST /payouts/grants — rank: archon — POST /payouts/grants
997
+ postPayoutsGrants: (args) => request("POST", "/payouts/grants", { hasBody: true }, args),
998
+ // POST /payouts/guardians — rank: archon — POST /payouts/guardians
999
+ postPayoutsGuardians: (args) => request("POST", "/payouts/guardians", { hasBody: true }, args),
1000
+ // GET /payouts/rules — rank: archon — GET /payouts/rules
1001
+ getPayoutsRules: (args) => request("GET", "/payouts/rules", { hasBody: false }, args),
1002
+ // POST /payouts/rules — rank: archon — POST /payouts/rules
1003
+ postPayoutsRules: (args) => request("POST", "/payouts/rules", { hasBody: true }, args),
1004
+ // POST /payouts/rules/{id}/narrow — rank: archon — POST /payouts/rules/:id/narrow
1005
+ postPayoutsRulesIdNarrow: (args) => request("POST", "/payouts/rules/{id}/narrow", { hasBody: true }, args),
1006
+ // POST /payouts/rules/{id}/revoke — rank: archon — POST /payouts/rules/:id/revoke
1007
+ postPayoutsRulesIdRevoke: (args) => request("POST", "/payouts/rules/{id}/revoke", { hasBody: true }, args),
1008
+ // POST /payouts/rules/{id}/runs — rank: archon — POST /payouts/rules/:id/runs
1009
+ postPayoutsRulesIdRuns: (args) => request("POST", "/payouts/rules/{id}/runs", { hasBody: true }, args),
1010
+ // POST /payouts/rules/{id}/runs/{runKey}/hold — rank: archon — POST /payouts/rules/:id/runs/:runKey/hold
1011
+ postPayoutsRulesIdRunsRunKeyHold: (args) => request("POST", "/payouts/rules/{id}/runs/{runKey}/hold", { hasBody: true }, args),
1012
+ // POST /payouts/screenings — rank: archon — POST /payouts/screenings
1013
+ postPayoutsScreenings: (args) => request("POST", "/payouts/screenings", { hasBody: true }, args),
1014
+ },
925
1015
  "profiles": {
926
1016
  // GET /profiles/{handle} — rank: public — GET /profiles/:handle
927
1017
  getProfilesHandle: (args) => request("GET", "/profiles/{handle}", { hasBody: false }, args),