@bongos/core 1.18.0 → 1.18.18
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.
- package/.bongos-core.json +1740 -640
- package/.claude/skills/builder-box/SKILL.md +6 -0
- package/.claude/skills/builder-sequence/SKILL.md +97 -0
- package/.claude/skills/builder-ship/SKILL.md +8 -2
- package/.claude/skills/builder-start/SKILL.md +11 -0
- package/.claude/skills/builder-sync/SKILL.md +41 -0
- package/.claude/skills/fix-task/SKILL.md +64 -0
- package/.claude/skills/goal-create/SKILL.md +158 -0
- package/.claude/skills/goal-review/SKILL.md +3 -1
- package/.claude/skills/idea-triage/SKILL.md +14 -8
- package/.claude/skills/merge-mode/SKILL.md +2 -2
- package/.claude/skills/new-project/SKILL.md +1 -0
- package/.claude/skills/planning-session/SKILL.md +45 -18
- package/.env.local.example +4 -3
- package/README.md +5 -3
- package/bin/bongos.js +1 -0
- package/clients/bongos-client/README.md +2 -2
- package/clients/bongos-client/bongos-client.global.js +82 -18
- package/clients/bongos-client/index.cjs +82 -18
- package/clients/bongos-client/index.d.ts +131 -29
- package/clients/bongos-client/index.mjs +82 -18
- package/config/branding.neutral.json +11 -2
- package/config/governance.neutral.json +21 -0
- package/docs/adr/0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md +24 -0
- package/docs/adr/0090-metic-task-authoring.md +1 -1
- package/docs/adr/0142-project-context-is-prose-only.md +41 -0
- package/docs/adr/0143-onboarding-repo-picker-oauth-scope.md +35 -0
- package/docs/adr/0144-devbox-rehome-onto-cloudbongos-plane.md +41 -0
- package/docs/adr/0144-federated-single-logout-backchannel.md +42 -0
- package/docs/adr/0145-devbox-app-branding-driven-module.md +44 -0
- package/docs/adr/0145-free-hosted-project-tier-isolation-and-domain-separation.md +62 -0
- package/docs/adr/0146-configurable-reward-mode-cost-plus-only.md +53 -0
- package/docs/adr/0147-standalone-live-docs-regen.md +39 -0
- package/docs/adr/0148-task-scoped-box-source-access.md +48 -0
- package/docs/adr/0149-bongos-dev-local-launcher.md +57 -0
- package/docs/adr/0150-box-first-boot-bringup-vendored-instances.md +68 -0
- package/docs/adr/0151-governance-permissions-as-atom-ranks-as-roles.md +229 -0
- package/docs/adr/0152-landing-gate-served-by-the-core-app.md +92 -0
- package/docs/adr/0152-metic-task-abandonment.md +67 -0
- package/docs/adr/0153-sequential-chain-runner.md +51 -0
- package/docs/adr/0154-goal-owner-criterion-authoring.md +86 -0
- package/docs/adr/README.md +15 -2
- package/docs/api/openapi.json +2648 -483
- package/docs/api-reference.md +73 -13
- package/docs/architecture.md +4 -2
- package/docs/branding-contract.md +3 -1
- package/docs/canonical-permissions.md +21 -8
- package/docs/file-map.md +15 -7
- package/docs/onboarding/diagrams/01-task-lifecycle.mmd +2 -2
- package/docs/onboarding/diagrams/02-rank-ladder.mmd +3 -1
- package/docs/onboarding/diagrams/05-versioning.mmd +1 -3
- package/docs/onboarding/diagrams/assertions.json +4 -7
- package/docs/onboarding/drachmae-and-karma.md +3 -3
- package/docs/onboarding/primer.md +17 -16
- package/docs/onboarding/slash-commands.md +124 -0
- package/docs/recipes/builder-box-lifecycle.md +23 -0
- package/docs/recipes/devbox-app-release.md +14 -4
- package/docs/recipes/instance-first-run.md +16 -0
- package/docs/recipes/local-dev.md +81 -0
- package/docs/recipes/ops-gotchas.md +19 -1
- package/docs/recipes/overnight-builder.md +1 -1
- package/docs/recipes/packaging-the-core.md +13 -0
- package/docs/recipes/parallel-goal-waves.md +174 -0
- package/docs/recipes/ship-and-regrade.md +2 -2
- package/docs/recipes/standalone-live-docs.md +48 -0
- package/docs/recipes/upgrading-the-core.md +5 -2
- package/docs/recipes/work-on-a-task-from-your-dev-box.md +108 -0
- package/migrations/003_pms.sql +6 -7
- package/migrations/006_pms_v2.sql +3 -31
- package/migrations/039_newcomer_friendly_column.sql +5 -0
- package/migrations/102_remove_box_first_provision_approval.sql +4 -0
- package/migrations/core_192_github_oauth_tokens.sql +33 -0
- package/migrations/core_193_task_needs_rebase.sql +28 -0
- package/migrations/core_194_confirmed_backlog_clawback.sql +63 -0
- package/migrations/core_195_idea_triage_provenance.sql +57 -0
- package/migrations/core_196_session_reward_topup.sql +69 -0
- package/modules/autonomy/pollers/routine-timers.js +9 -8
- package/modules/builder-settings/wandering-prefs.js +61 -18
- package/modules/dev-box/app/README.md +73 -0
- package/modules/dev-box/app/assets/tray/mac-alertTemplate.png +0 -0
- package/modules/dev-box/app/assets/tray/mac-alertTemplate@2x.png +0 -0
- package/modules/dev-box/app/assets/tray/mac-busyTemplate.png +0 -0
- package/modules/dev-box/app/assets/tray/mac-busyTemplate@2x.png +0 -0
- package/modules/dev-box/app/assets/tray/mac-offTemplate.png +0 -0
- package/modules/dev-box/app/assets/tray/mac-offTemplate@2x.png +0 -0
- package/modules/dev-box/app/assets/tray/mac-onTemplate.png +0 -0
- package/modules/dev-box/app/assets/tray/mac-onTemplate@2x.png +0 -0
- package/modules/dev-box/app/assets/tray/win-alert.png +0 -0
- package/modules/dev-box/app/assets/tray/win-busy.png +0 -0
- package/modules/dev-box/app/assets/tray/win-off.png +0 -0
- package/modules/dev-box/app/assets/tray/win-on.png +0 -0
- package/modules/dev-box/app/build-resources/dmg-background.png +0 -0
- package/modules/dev-box/app/build-resources/dmg-background@2x.png +0 -0
- package/modules/dev-box/app/build-resources/icon.png +0 -0
- package/modules/dev-box/app/electron-builder.tmpl.yml +95 -0
- package/modules/dev-box/app/electron-builder.yml +95 -0
- package/modules/dev-box/app/package-lock.json +5291 -0
- package/modules/dev-box/app/package.json +30 -0
- package/modules/dev-box/app/renderer/app.js +319 -0
- package/modules/dev-box/app/renderer/index.html +45 -0
- package/modules/dev-box/app/renderer/styles.css +246 -0
- package/modules/dev-box/app/renderer/theme.generated.css +16 -0
- package/modules/dev-box/app/scripts/apply-dmg-backdrop.sh +82 -0
- package/modules/dev-box/app/scripts/dmgbuild-settings.py +39 -0
- package/modules/dev-box/app/scripts/gen-brand.js +138 -0
- package/modules/dev-box/app/scripts/gen-dmg-backdrop.py +323 -0
- package/modules/dev-box/app/scripts/gen-icons.js +286 -0
- package/modules/dev-box/app/scripts/vendor-client.js +23 -0
- package/modules/dev-box/app/src/box-controller.js +287 -0
- package/modules/dev-box/app/src/brand.generated.json +13 -0
- package/modules/dev-box/app/src/brand.js +16 -0
- package/modules/dev-box/app/src/config.js +19 -0
- package/modules/dev-box/app/src/gds-client.js +90 -0
- package/modules/dev-box/app/src/main.js +610 -0
- package/modules/dev-box/app/src/pairing.js +57 -0
- package/modules/dev-box/app/src/preload.js +29 -0
- package/modules/dev-box/app/src/session-store.js +58 -0
- package/modules/dev-box/app/src/ssh-setup.js +569 -0
- package/modules/dev-box/app/src/task-picker.js +70 -0
- package/modules/dev-box/app/src/tray.js +99 -0
- package/modules/dev-box/app/src/updater.js +55 -0
- package/modules/dev-box/app/src/vendor/bongos-client.cjs +698 -0
- package/modules/dev-box/app/test/unit.mjs +526 -0
- package/modules/dev-box/box-access.js +121 -4
- package/modules/dev-box/boxes.js +20 -0
- package/modules/dev-box/module.json +1 -1
- package/modules/dev-box/routes/box.js +87 -3
- package/modules/economy/credits.js +116 -25
- package/modules/economy/reward.js +8 -0
- package/modules/economy/streak.js +2 -1
- package/modules/governance/CLAUDE.md +15 -0
- package/modules/governance/catalog.js +419 -0
- package/modules/governance/config.js +174 -0
- package/modules/governance/db.js +125 -0
- package/modules/governance/migrations/governance_001_tables.sql +81 -0
- package/modules/governance/migrations/governance_002_seed_and_backfill.sql +103 -0
- package/modules/governance/migrations/governance_003_task_abandon_metic.sql +28 -0
- package/modules/governance/migrations/governance_004_criterion_create.sql +39 -0
- package/modules/governance/migrations/governance_005_resync_builder_rank_roles.sql +56 -0
- package/modules/governance/module.json +10 -0
- package/modules/governance/protected-surfaces.js +88 -0
- package/modules/governance/protected-surfaces.json +80 -0
- package/modules/governance/rank-roles.js +83 -0
- package/modules/governance/resolver.js +221 -0
- package/modules/governance/routes/governance.js +89 -0
- package/modules/governance/routes/role-sync.js +49 -0
- package/modules/governance/session-scopes.js +127 -0
- package/modules/governance/session-scopes.json +38 -0
- package/modules/hall-ui/public/atlas.css +117 -0
- package/modules/hall-ui/public/atlas.html +3 -114
- package/modules/hall-ui/public/brand-apply.js +34 -6
- package/modules/hall-ui/public/builders.js +187 -219
- package/modules/hall-ui/public/diagrams.html +2 -0
- package/modules/hall-ui/public/dom-utils.js +27 -0
- package/modules/hall-ui/public/drachmae.html +2 -0
- package/modules/hall-ui/public/drachmae.js +54 -1
- package/modules/hall-ui/public/gate.css +98 -0
- package/modules/hall-ui/public/gate.html +3 -95
- package/modules/hall-ui/public/goal-inbox.js +4 -1
- package/modules/hall-ui/public/goals-page.js +626 -114
- package/modules/hall-ui/public/goals.css +79 -1
- package/modules/hall-ui/public/goals.html +38 -11
- package/modules/hall-ui/public/hall-widgets.js +62 -52
- package/modules/hall-ui/public/harbor.css +123 -0
- package/modules/hall-ui/public/harbor.html +3 -120
- package/modules/hall-ui/public/index.html +11 -4
- package/modules/hall-ui/public/instances-panel.js +4 -1
- package/modules/hall-ui/public/modules.css +63 -0
- package/modules/hall-ui/public/modules.html +3 -60
- package/modules/hall-ui/public/my-projects.html +78 -0
- package/modules/hall-ui/public/my-projects.js +142 -0
- package/modules/hall-ui/public/new-project-wizard.js +7 -3
- package/modules/hall-ui/public/not-ready.html +2 -0
- package/modules/hall-ui/public/pair.css +73 -0
- package/modules/hall-ui/public/pair.html +3 -70
- package/modules/hall-ui/public/palette.js +302 -0
- package/modules/hall-ui/public/primer.css +13 -0
- package/modules/hall-ui/public/primer.html +2 -0
- package/modules/hall-ui/public/profile.html +2 -0
- package/modules/hall-ui/public/ranks.html +2 -0
- package/modules/hall-ui/public/roadmap.css +179 -0
- package/modules/hall-ui/public/roadmap.html +9 -172
- package/modules/hall-ui/public/roadmap.js +329 -316
- package/modules/hall-ui/public/scouting.html +45 -0
- package/modules/hall-ui/public/scouting.js +73 -0
- package/modules/hall-ui/public/sessions.css +16 -0
- package/modules/hall-ui/public/sessions.html +3 -13
- package/modules/hall-ui/public/settings.html +2 -0
- package/modules/hall-ui/public/settings.js +4 -4
- package/modules/hall-ui/public/shell.js +143 -18
- package/modules/hall-ui/public/style.css +231 -39
- package/modules/hall-ui/public/task-detail.js +347 -26
- package/modules/hall-ui/public/task.html +6 -1
- package/modules/hall-ui/public/watch.html +2 -0
- package/modules/hall-ui/public/work.html +8 -6
- package/modules/hall-ui/public/work.js +1 -1
- package/modules/ideas/inbox.js +61 -11
- package/modules/ideas/routes/inbox.js +23 -0
- package/modules/lifecycle/claim-eligibility.js +72 -0
- package/modules/lifecycle/db.js +519 -139
- package/modules/lifecycle/done-when.js +18 -3
- package/modules/lifecycle/github-push.js +19 -2
- package/modules/lifecycle/goal-advisory.js +114 -0
- package/modules/lifecycle/goal-authz.js +62 -0
- package/modules/lifecycle/lifecycle.js +9 -0
- package/modules/lifecycle/publish-reconciler.js +109 -6
- package/modules/lifecycle/routes/claims.js +68 -23
- package/modules/lifecycle/routes/done-when.js +110 -15
- package/modules/lifecycle/routes/goals.js +8 -38
- package/modules/lifecycle/routes/tasks.js +38 -6
- package/modules/lifecycle/ship-card.js +6 -0
- package/modules/onboarding/onboarding-state.js +1 -1
- package/modules/platform-identity/CLAUDE.md +15 -0
- package/modules/platform-identity/hub-device.js +147 -0
- package/modules/platform-identity/hub-keys.js +151 -0
- package/modules/platform-identity/migrations/platform_identity_001_tables.sql +114 -0
- package/modules/platform-identity/migrations/platform_identity_002_client_origin_index.sql +18 -0
- package/modules/platform-identity/migrations/platform_identity_003_project_memberships.sql +42 -0
- package/modules/platform-identity/migrations/platform_identity_004_projects.sql +44 -0
- package/modules/platform-identity/migrations/platform_identity_005_builder_activity.sql +42 -0
- package/modules/platform-identity/module.json +18 -0
- package/modules/platform-identity/platform-identity.js +531 -0
- package/modules/platform-identity/pollers/code-sweep.js +43 -0
- package/modules/platform-identity/routes/my-projects.js +140 -0
- package/modules/platform-identity/routes/projects.js +107 -0
- package/modules/platform-identity/routes/scouting.js +35 -0
- package/modules/platform-identity/routes/sso.js +402 -0
- package/modules/platform-identity/tests/platform-identity.mjs +388 -0
- package/modules/platform-identity/ui/.gitkeep +0 -0
- package/modules/security/routes/reports.js +10 -0
- package/modules/sessions/db.js +166 -21
- package/modules/sessions/module.json +1 -1
- package/modules/sessions/pollers/session-reward-reconcile.js +78 -0
- package/modules/sessions/routes/sessions.js +33 -0
- package/modules/status-ui/public/explore.html +54 -0
- package/modules/status-ui/public/explore.js +67 -0
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/public-landing/assets/anim/idle/frame_00.webp +0 -0
- package/public-landing/assets/anim/idle/frame_01.webp +0 -0
- package/public-landing/assets/anim/idle/frame_02.webp +0 -0
- package/public-landing/assets/anim/idle/frame_03.webp +0 -0
- package/public-landing/assets/anim/idle/frame_04.webp +0 -0
- package/public-landing/assets/anim/idle/frame_05.webp +0 -0
- package/public-landing/assets/anim/idle/frame_06.webp +0 -0
- package/public-landing/assets/anim/idle/frame_07.webp +0 -0
- package/public-landing/assets/anim/idle/frame_08.webp +0 -0
- package/public-landing/assets/anim/idle/frame_09.webp +0 -0
- package/public-landing/assets/anim/idle/frame_10.webp +0 -0
- package/public-landing/assets/anim/idle/frame_11.webp +0 -0
- package/public-landing/assets/anim/idle/frame_12.webp +0 -0
- package/public-landing/assets/anim/idle/frame_13.webp +0 -0
- package/public-landing/assets/anim/idle/frame_14.webp +0 -0
- package/public-landing/assets/anim/idle/frame_15.webp +0 -0
- package/public-landing/assets/anim/idle/frame_16.webp +0 -0
- package/public-landing/assets/anim/idle/frame_17.webp +0 -0
- package/public-landing/assets/anim/idle/frame_18.webp +0 -0
- package/public-landing/assets/anim/idle/frame_19.webp +0 -0
- package/public-landing/assets/anim/idle/frame_20.webp +0 -0
- package/public-landing/assets/anim/idle/frame_21.webp +0 -0
- package/public-landing/assets/anim/idle/frame_22.webp +0 -0
- package/public-landing/assets/anim/idle/frame_23.webp +0 -0
- package/public-landing/assets/anim/idle/frame_24.webp +0 -0
- package/public-landing/assets/anim/idle/frame_25.webp +0 -0
- package/public-landing/assets/anim/idle/frame_26.webp +0 -0
- package/public-landing/assets/anim/idle/frame_27.webp +0 -0
- package/public-landing/assets/anim/idle/frame_28.webp +0 -0
- package/public-landing/assets/anim/idle/frame_29.webp +0 -0
- package/public-landing/assets/anim/idle/frame_30.webp +0 -0
- package/public-landing/assets/anim/idle/frame_31.webp +0 -0
- package/public-landing/assets/anim/idle/frame_32.webp +0 -0
- package/public-landing/assets/anim/idle/frame_33.webp +0 -0
- package/public-landing/assets/anim/idle/frame_34.webp +0 -0
- package/public-landing/assets/anim/idle/frame_35.webp +0 -0
- package/public-landing/assets/anim/idle/frame_36.webp +0 -0
- package/public-landing/assets/anim/idle/frame_37.webp +0 -0
- package/public-landing/assets/anim/idle/frame_38.webp +0 -0
- package/public-landing/assets/anim/idle/frame_39.webp +0 -0
- package/public-landing/assets/anim/idle/frame_40.webp +0 -0
- package/public-landing/assets/anim/idle/frame_41.webp +0 -0
- package/public-landing/assets/anim/idle/frame_42.webp +0 -0
- package/public-landing/assets/anim/idle/frame_43.webp +0 -0
- package/public-landing/create.html +252 -62
- package/public-landing/gate/README.md +137 -0
- package/public-landing/gate/dispmaps/bar.png +0 -0
- package/public-landing/gate/dispmaps/flat.png +0 -0
- package/public-landing/gate/dispmaps/key.png +0 -0
- package/public-landing/gate/index.html +587 -0
- package/public-landing/gate/previews/cloud-bongos.jpg +0 -0
- package/public-landing/gate/previews/off-the-boats.jpg +0 -0
- package/public-landing/gate/space.css +799 -0
- package/public-landing/gate/space.js +1826 -0
- package/public-landing/gate/sprites/enter.png +0 -0
- package/public-landing/gate/sprites/search.png +0 -0
- package/public-landing/gate/sprites/terminal-blank.png +0 -0
- package/public-landing/gate/sprites/tile.png +0 -0
- package/public-landing/world/assets/clouds/cloud-island-large.png +0 -0
- package/public-landing/world/assets/clouds/cloud-puff.png +0 -0
- package/public-landing/world/assets/creatures/creature-whale-cargo.png +0 -0
- package/public-landing/world/assets/creatures/creature-whale-glide.png +0 -0
- package/public-landing/world/assets/plates/plate-clouds-near.png +0 -0
- package/public-landing/world/assets/plates/scene-establishing.png +0 -0
- package/scripts/gds/abandon.js +6 -4
- package/scripts/gds/api.js +10 -5
- package/scripts/gds/api.ps1 +26 -0
- package/scripts/gds/api.sh +6 -0
- package/scripts/gds/audit-ships.js +7 -1
- package/scripts/gds/backfill-sessions.js +78 -18
- package/scripts/gds/backup.js +23 -1
- package/scripts/gds/box-connect-lib.js +124 -31
- package/scripts/gds/box-sync.js +66 -0
- package/scripts/gds/box.js +225 -53
- package/scripts/gds/cf-tunnel.js +145 -6
- package/scripts/gds/claim.js +34 -3
- package/scripts/gds/cli-lib.js +161 -21
- package/scripts/gds/code.js +6 -2
- package/scripts/gds/deploy-divergence.js +209 -0
- package/scripts/gds/dev-lib.js +309 -0
- package/scripts/gds/dev.js +322 -0
- package/scripts/gds/doctor.js +90 -61
- package/scripts/gds/fetch-art-key.js +1 -1
- package/scripts/gds/fetch-sound-prefs.js +2 -2
- package/scripts/gds/fitness.js +228 -12
- package/scripts/gds/gds-db-backup.service +16 -1
- package/scripts/gds/gds-db-offsite.service +9 -1
- package/scripts/gds/gen-api-client.js +1 -1
- package/scripts/gds/gen-api-docs.js +36 -14
- package/scripts/gds/gen-diagrams.js +45 -28
- package/scripts/gds/gen-file-map.js +2 -1
- package/scripts/gds/gen-freshness.js +32 -0
- package/scripts/gds/gen-repo-map.js +3 -2
- package/scripts/gds/gen-session-index.js +14 -5
- package/scripts/gds/hooks/pre-push.js +2 -2
- package/scripts/gds/init.js +60 -3
- package/scripts/gds/install-git-hooks.js +1 -1
- package/scripts/gds/key-card.js +15 -6
- package/scripts/gds/key-status.js +1 -1
- package/scripts/gds/linkify-refs.js +35 -9
- package/scripts/gds/lint-migrations.js +102 -0
- package/scripts/gds/login.js +58 -11
- package/scripts/gds/mirror-redact.js +5 -0
- package/scripts/gds/package-core.js +263 -4
- package/scripts/gds/paste-token.js +7 -1
- package/scripts/gds/preflight.js +126 -0
- package/scripts/gds/provision.js +268 -19
- package/scripts/gds/publish-manifest.js +22 -1
- package/scripts/gds/reauth.js +7 -3
- package/scripts/gds/regen-instance-docs.js +47 -0
- package/scripts/gds/run-unit-tests.js +42 -16
- package/scripts/gds/seed-bongos-v1-seo-tasks.js +104 -0
- package/scripts/gds/seed-bv1-profiles-tasks.js +126 -0
- package/scripts/gds/sequence.js +425 -0
- package/scripts/gds/session-cost.js +10 -1
- package/scripts/gds/setup.js +72 -5
- package/scripts/gds/shell.js +5 -3
- package/scripts/gds/ship.js +433 -59
- package/scripts/gds/smoke-gds.js +139 -8
- package/scripts/gds/start.js +171 -22
- package/scripts/gds/status.js +1 -1
- package/scripts/gds/triage.js +10 -9
- package/scripts/gds/upgrade.js +271 -7
- package/scripts/migrate.sh +10 -0
- package/scripts/status-mirror-sync.js +114 -84
- package/src/bongos/api-errors.js +1 -0
- package/src/bongos/auth.js +809 -107
- package/src/bongos/db-kernel.js +27 -0
- package/src/bongos/db.js +105 -0
- package/src/bongos/github-repos.js +93 -0
- package/src/bongos/module-scope-map.js +27 -1
- package/src/bongos/permission-path-check.js +136 -102
- package/src/bongos/repo-info.js +47 -11
- package/src/bongos/route-rank-check.js +429 -46
- package/src/bongos/routes/_helpers.js +12 -1
- package/src/bongos/routes/auth.js +312 -13
- package/src/bongos/routes/backup.js +58 -2
- package/src/bongos/routes/github.js +90 -0
- package/src/bongos/routes/instance.js +15 -3
- package/src/bongos/routes/me.js +35 -1
- package/src/bongos/routes.js +2 -0
- package/src/bongos/serve-internal.js +84 -15
- package/src/branding.js +49 -2
- package/src/instance-config.js +46 -0
- package/src/module-api.js +140 -1
- package/src/platform-server.js +86 -9
- package/tests/abandon_task.mjs +59 -3
- package/tests/api_cli_flags.mjs +53 -0
- package/tests/auth_page_gate.mjs +13 -0
- package/tests/backfill_sessions.mjs +127 -1
- package/tests/backup_cli.mjs +54 -0
- package/tests/bongos_box_connect.mjs +77 -0
- package/tests/box_access.mjs +130 -1
- package/tests/box_credential.mjs +125 -0
- package/tests/box_host_keys.mjs +24 -0
- package/tests/box_infra_resolve.mjs +149 -0
- package/tests/box_scope_session.mjs +6 -2
- package/tests/box_sync.mjs +55 -0
- package/tests/box_task_scope.mjs +99 -0
- package/tests/branding.mjs +41 -23
- package/tests/cf_ruleset_preflight.mjs +142 -0
- package/tests/cf_tunnel.mjs +37 -0
- package/tests/claim_gate_rebase.mjs +98 -0
- package/tests/clawback_confirmed_backlog.mjs +103 -0
- package/tests/cli_lib_formatters.mjs +20 -0
- package/tests/confirm_attribution.mjs +30 -46
- package/tests/credit_grant.mjs +198 -10
- package/tests/criterion_authoring_gate.mjs +272 -0
- package/tests/criterion_progress.mjs +33 -1
- package/tests/dev_lib.mjs +253 -0
- package/tests/devbox_artifact_gate.mjs +75 -0
- package/tests/devbox_dmg_backdrop.mjs +137 -0
- package/tests/devbox_icons.mjs +304 -0
- package/tests/devbox_installer_brand.mjs +232 -0
- package/tests/devbox_key_register.mjs +234 -0
- package/tests/docs_openapi_route.mjs +110 -0
- package/tests/doctor_hooks.mjs +141 -0
- package/tests/extract_json.mjs +140 -0
- package/tests/fitness.mjs +89 -0
- package/tests/gen_freshness.mjs +96 -0
- package/tests/github_repos_helpers.mjs +91 -0
- package/tests/github_token_store.mjs +121 -0
- package/tests/goal_advisory.mjs +251 -0
- package/tests/goal_criterion_confirm_ui.mjs +269 -0
- package/tests/goal_routes.mjs +59 -4
- package/tests/goal_tier.mjs +12 -3
- package/tests/governance_catalog.mjs +129 -0
- package/tests/governance_claim_eligibility.mjs +262 -0
- package/tests/governance_config.mjs +187 -0
- package/tests/governance_ownership_scope.mjs +410 -0
- package/tests/governance_page_gates.mjs +324 -0
- package/tests/governance_parity.mjs +336 -0
- package/tests/governance_principals.mjs +232 -0
- package/tests/governance_protected_surfaces.mjs +208 -0
- package/tests/governance_require_permission.mjs +223 -0
- package/tests/governance_resolver.mjs +84 -0
- package/tests/governance_role_sync.mjs +231 -0
- package/tests/governance_seed.mjs +127 -0
- package/tests/governance_session_scope.mjs +434 -0
- package/tests/governance_vanilla_boot.mjs +203 -0
- package/tests/grade_attribution.mjs +7 -7
- package/tests/hall_audit.mjs +223 -0
- package/tests/hall_nav.mjs +191 -0
- package/tests/hall_palette.mjs +206 -0
- package/tests/hall_signout.mjs +124 -0
- package/tests/hook_user_agents.mjs +10 -0
- package/tests/idea_triage.mjs +162 -0
- package/tests/idp_device_exchange.mjs +198 -0
- package/tests/idp_federation.mjs +100 -0
- package/tests/init.mjs +51 -0
- package/tests/instance_config.mjs +65 -0
- package/tests/instance_mismatch_guard.mjs +23 -6
- package/tests/instance_release_config.mjs +104 -0
- package/tests/linkify_refs.mjs +15 -2
- package/tests/migrations_forward_safe.mjs +86 -0
- package/tests/module_api.mjs +1 -1
- package/tests/module_contributions.mjs +55 -0
- package/tests/module_loader.mjs +10 -5
- package/tests/module_scope_active_claims.mjs +94 -0
- package/tests/needs_rebase.mjs +92 -0
- package/tests/one_active_claim_per_session.mjs +76 -0
- package/tests/override_attribution.mjs +10 -8
- package/tests/override_request_ownership.mjs +8 -4
- package/tests/package_core.mjs +246 -1
- package/tests/parse_cookie_decode.mjs +42 -0
- package/tests/pay_on_land.mjs +129 -0
- package/tests/platform_boot.mjs +100 -1
- package/tests/post_login_landing.mjs +42 -0
- package/tests/preflight_checks.mjs +72 -0
- package/tests/provision.mjs +289 -7
- package/tests/pruned_lockfile_integrity.mjs +79 -0
- package/tests/publish_branch_route.mjs +53 -0
- package/tests/publish_reconciler.mjs +187 -2
- package/tests/repo_info_binding.mjs +248 -0
- package/tests/reward_gate.mjs +11 -2
- package/tests/reward_mode_cost_plus_only.mjs +116 -0
- package/tests/reward_mode_surfacing.mjs +168 -0
- package/tests/route_permission_check.mjs +301 -0
- package/tests/route_rank_check.mjs +254 -12
- package/tests/route_validation.mjs +30 -0
- package/tests/sequence.mjs +267 -0
- package/tests/session_digest.mjs +44 -0
- package/tests/session_index.mjs +18 -6
- package/tests/session_records.mjs +39 -1
- package/tests/session_reward_on_land.mjs +381 -0
- package/tests/session_reward_reconcile.mjs +229 -0
- package/tests/ship_api_client_pathspec.mjs +100 -0
- package/tests/ship_base_flag.mjs +93 -0
- package/tests/ship_ci_deploy.mjs +140 -3
- package/tests/ship_upstream_deletion.mjs +57 -0
- package/tests/smoke_target.mjs +233 -0
- package/tests/start_env_guard.mjs +87 -0
- package/tests/start_rebase_warning.mjs +103 -0
- package/tests/status_mirror_sync.mjs +122 -0
- package/tests/stop_refcheck.mjs +19 -1
- package/tests/task_goal_link.mjs +15 -6
- package/tests/upgrade.mjs +393 -5
- package/tests/web_admission_status.mjs +162 -0
- package/tests/write_validation_gaps.mjs +110 -0
- package/.gitignore +0 -91
- package/docs/adr/0139-platform-history-migration-to-cloudbongos.md +0 -94
- package/docs/adr/0140-cloudbongos-standalone-reprovision.md +0 -43
- package/scripts/hall-preview/fixtures/access-requests.json +0 -20
- package/scripts/hall-preview/fixtures/achievements.json +0 -76
- package/scripts/hall-preview/fixtures/analytics__builder.json +0 -251
- package/scripts/hall-preview/fixtures/audit-log.json +0 -68
- package/scripts/hall-preview/fixtures/blockers__detail.json +0 -12
- package/scripts/hall-preview/fixtures/box__me.json +0 -5
- package/scripts/hall-preview/fixtures/boxes__cost-ledger.json +0 -69
- package/scripts/hall-preview/fixtures/builders__active-claims.json +0 -1
- package/scripts/hall-preview/fixtures/builders__directory.json +0 -81
- package/scripts/hall-preview/fixtures/builders__roster.json +0 -48
- package/scripts/hall-preview/fixtures/goals.json +0 -502
- package/scripts/hall-preview/fixtures/goals__25.json +0 -96
- package/scripts/hall-preview/fixtures/goals__26.json +0 -67
- package/scripts/hall-preview/fixtures/goals__3.json +0 -103
- package/scripts/hall-preview/fixtures/goals__35.json +0 -49
- package/scripts/hall-preview/fixtures/goals__conflicts.json +0 -154
- package/scripts/hall-preview/fixtures/goals__detail.json +0 -96
- package/scripts/hall-preview/fixtures/goals__inbox.json +0 -5
- package/scripts/hall-preview/fixtures/goals__requests.json +0 -3
- package/scripts/hall-preview/fixtures/grades__by-builder.json +0 -32
- package/scripts/hall-preview/fixtures/inbox.json +0 -330
- package/scripts/hall-preview/fixtures/inbox__detail.json +0 -15
- package/scripts/hall-preview/fixtures/instance.json +0 -124
- package/scripts/hall-preview/fixtures/leaderboard.json +0 -184
- package/scripts/hall-preview/fixtures/me.json +0 -476
- package/scripts/hall-preview/fixtures/me__art-key__own.json +0 -6
- package/scripts/hall-preview/fixtures/me__event-sound-prefs.json +0 -209
- package/scripts/hall-preview/fixtures/me__recent-ships.json +0 -304
- package/scripts/hall-preview/fixtures/me__render.json +0 -5
- package/scripts/hall-preview/fixtures/me__skill-prefs.json +0 -143
- package/scripts/hall-preview/fixtures/me__sound-prefs.json +0 -67
- package/scripts/hall-preview/fixtures/me__wandering.json +0 -43
- package/scripts/hall-preview/fixtures/override-requests.json +0 -15
- package/scripts/hall-preview/fixtures/provisioning__fleet.json +0 -1
- package/scripts/hall-preview/fixtures/provisioning__fleet__cost-ledger.json +0 -1
- package/scripts/hall-preview/fixtures/provisioning__instances.json +0 -1
- package/scripts/hall-preview/fixtures/public__analytics__ecosystem.json +0 -516
- package/scripts/hall-preview/fixtures/public__bounty-table.json +0 -37
- package/scripts/hall-preview/fixtures/public__cost-summary.json +0 -742
- package/scripts/hall-preview/fixtures/public__estimation-drift.json +0 -41
- package/scripts/hall-preview/fixtures/public__grades.json +0 -50
- package/scripts/hall-preview/fixtures/public__progress.json +0 -124
- package/scripts/hall-preview/fixtures/public__recent-shipped.json +0 -426
- package/scripts/hall-preview/fixtures/public__repo-health.json +0 -160
- package/scripts/hall-preview/fixtures/public__repo-info.json +0 -5
- package/scripts/hall-preview/fixtures/security__docs.json +0 -10
- package/scripts/hall-preview/fixtures/security__reports.json +0 -31
- package/scripts/hall-preview/fixtures/sessions__search.json +0 -9
- package/scripts/hall-preview/fixtures/tasks.json +0 -2420
- package/scripts/hall-preview/fixtures/tasks__claimable.json +0 -2555
- package/scripts/hall-preview/fixtures/tasks__detail.json +0 -111
- package/scripts/hall-preview/fixtures/tasks__peer-votes__feed.json +0 -330
- package/scripts/hall-preview/fixtures/versions.json +0 -89
|
@@ -39,6 +39,12 @@ The per-builder box lifecycle (ADR 0031 §2) auto-suspends when idle (snapshot-a
|
|
|
39
39
|
- **Own resource only.** `/box/me` and `/box/ssh-key` are scoped to the caller. The full roster (`GET /api/gds/boxes`) is Archon-only — don't try it for a regular builder.
|
|
40
40
|
- **Don't print the SSH private key** — these endpoints only ever return public fingerprints, never private material. Keep it that way.
|
|
41
41
|
|
|
42
|
+
## Quirks on the box (verified from ssh sessions)
|
|
43
|
+
|
|
44
|
+
- **`sharp` resolves only from `/workspace`.** Run image-pipeline tooling (art gen, thumbnailing) from `/workspace` — invoking it from another cwd on the box fails to resolve the native binding.
|
|
45
|
+
- **Playwright MCP writes screenshots to `.playwright-mcp/` relative to the server's cwd**, not the caller's — look there first when a screenshot path seems to have gone missing.
|
|
46
|
+
- **The Bash tool's cwd persists between calls on the box.** A bare `cd x` silently shifts every later command in the session; prefer absolute paths over `cd`-then-relative sequences.
|
|
47
|
+
|
|
42
48
|
## Files this skill touches
|
|
43
49
|
|
|
44
50
|
- Calls: `/api/gds/box/me`, `/api/gds/box/ssh-key` (read), `/api/gds/box/terminal` (read), optionally `POST /api/gds/box/ensure` (queue auto-provision/wake) or `DELETE /api/gds/box/ssh-key/:id`
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: builder-sequence
|
|
3
|
+
description: Walk a whole dependency chain from one kickoff — claim, build, ship, then pick up whatever that unblocked, and repeat until the chain is done or something needs a human. Triggers when the user says "/builder-sequence N", "work the chain from task N", "do these tasks in order", "run goal N end to end", "keep going until the chain is done", or "work through the rest of this chain". One task is claimed at a time; a task is always fully shipped before the next is claimed.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are running a **chain**: several dependency-linked tasks, one after another, from a single kickoff. Two-thirds of the open backlog sits behind a predecessor, and shipping a task auto-promotes its dependents `backlog`→`ready` — but nothing picks the newly-unblocked task up. That gap is what this skill closes.
|
|
7
|
+
|
|
8
|
+
This skill owns the **loop and the halt discipline**. It does not re-derive how to claim, build, or ship — `/builder-claim`, `/dev`, and `/builder-ship` own those, and you defer to them each pass.
|
|
9
|
+
|
|
10
|
+
## The one rule
|
|
11
|
+
|
|
12
|
+
**One task at a time, fully shipped before the next is claimed.** The server enforces this anyway (one active claim per working tree, `shouldRefuseSessionClaim`), and it is what makes the chain safe: each task lands on a clean tree, and each ship is what unblocks the next task. Never batch-claim a chain — successors fail `DEPS_NOT_SHIPPED` by construction, because their predecessor has not shipped yet.
|
|
13
|
+
|
|
14
|
+
## The loop
|
|
15
|
+
|
|
16
|
+
1. **Plan the chain, and show it before starting.**
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
node scripts/gds/sequence.js --from <task-id>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Or `--goal <goal-id>` to scope to a goal's open tasks. This prints the chain in dependency order with total credits and total estimated time. Relay it, and confirm the scope looks right before doing any work — a 24-task chain is not a single sitting, and the user should see the size before you start.
|
|
23
|
+
|
|
24
|
+
2. **Ask for the next task.**
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
node scripts/gds/sequence.js --from <head-id> --next
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Exit 0 with a task means go. **Exit 1 means halt** — see below. Re-run this each pass rather than working from the step-1 plan: the plan is a snapshot, and shipping changes what is claimable.
|
|
31
|
+
|
|
32
|
+
3. **Claim it** — `/builder-claim <id>`, or `node scripts/gds/claim.js <id>`.
|
|
33
|
+
|
|
34
|
+
4. **Build it** — follow `/dev`. Stay strictly inside the task's `touches[]`. Everything the normal task loop requires still applies: read the acceptance criteria, work test-first, commit before shipping.
|
|
35
|
+
|
|
36
|
+
5. **Ship it** — `/builder-ship`. The task must reach `shipped`, not stall at `completed` or `confirmed`. A ship that does not land has not unblocked anything, so the chain cannot advance; treat it as a halt (see `ship_failed` below).
|
|
37
|
+
|
|
38
|
+
6. **Go back to step 2.** The ship you just landed is what promotes the next task to `ready`.
|
|
39
|
+
|
|
40
|
+
Between passes, report progress in one line — which task landed, what is next, how much of the chain remains. The user is following a long run; they should never have to ask where it is.
|
|
41
|
+
|
|
42
|
+
## Halting — the contract
|
|
43
|
+
|
|
44
|
+
**The runner stops and reports. It never ships a half-finished task, and it never skips ahead to work around a blocked one.** A skipped predecessor strands everything behind it, so skipping is not the safer option it looks like.
|
|
45
|
+
|
|
46
|
+
`sequence.js --next` exits 1 and names the reason when the next task:
|
|
47
|
+
|
|
48
|
+
| Reason | Means |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `needs_migration` | wants a schema change — needs a reserved migration number and human eyes |
|
|
51
|
+
| `security_sensitive` | flagged security-sensitive |
|
|
52
|
+
| `protected_path` | `touches[]` hits the permission/deploy core |
|
|
53
|
+
| `rank_floor` | requires a rank above the running builder's |
|
|
54
|
+
| `thin_spec` | no description, or too thin to verify "done" against |
|
|
55
|
+
| `judgement_kind` | a `decision` or `spike` — the output is a recommendation or an ADR, not mechanical work |
|
|
56
|
+
| `not_claimable` | `ready`, but the server will not hand it over (open blocker, or `touches[]` collide with a live claim) |
|
|
57
|
+
| `deps_unmet` | still waiting on a predecessor |
|
|
58
|
+
| `in_flight` | already mid-ship |
|
|
59
|
+
| `cycle` | sits in a dependency cycle and cannot be ordered |
|
|
60
|
+
|
|
61
|
+
Two more halts are yours to detect, not the script's:
|
|
62
|
+
|
|
63
|
+
- **`ship_failed`** — the ship bounced, the grade failed, or the task did not reach `shipped`.
|
|
64
|
+
- **`scope_surprise`** — the task turns out to need work outside its `touches[]`, or its premise is wrong (the thing it describes is already done, or no longer true). Do not quietly widen the scope; that is a new task.
|
|
65
|
+
|
|
66
|
+
**On any halt:** leave the current task claimed, stop, and report — what you hit, which task, and what it needs from a human. Then say plainly what already landed. Everything shipped stays shipped; a halt costs the rest of the run, not the work done.
|
|
67
|
+
|
|
68
|
+
To inspect one task without running anything:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
node scripts/gds/sequence.js --check <task-id>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## What NOT to do
|
|
75
|
+
|
|
76
|
+
- **Do not skip a halted task and continue down the chain.** The owner chose stop-and-report precisely so a blocked predecessor does not silently strand its dependents.
|
|
77
|
+
- **Do not batch-claim.** See "The one rule".
|
|
78
|
+
- **Do not widen a task's `touches[]`** to make the chain flow. File a new task instead (`node scripts/gds/capture.js`).
|
|
79
|
+
- **Do not keep going past the user's stated scope.** `--from` and `--goal` bound the run; when the chain is exhausted, stop and report rather than reaching into the wider backlog.
|
|
80
|
+
- **Do not treat a long chain as a mandate to run unattended forever.** If the remaining estimate is large, say so and let the user decide whether to continue.
|
|
81
|
+
|
|
82
|
+
## Flags
|
|
83
|
+
|
|
84
|
+
| Flag | Effect |
|
|
85
|
+
|---|---|
|
|
86
|
+
| `--from <id>` | scope to a task and everything transitively behind it |
|
|
87
|
+
| `--goal <id>` | scope to a goal's open tasks |
|
|
88
|
+
| `--next` | emit only the next claimable task, or exit 1 with a halt reason |
|
|
89
|
+
| `--check <id>` | evaluate the halt matrix for one task; exit 1 if anything fires |
|
|
90
|
+
| `--limit N` | cap the planned chain (default 50) |
|
|
91
|
+
| `--json` | machine-readable output for all of the above |
|
|
92
|
+
|
|
93
|
+
## Files this skill touches
|
|
94
|
+
|
|
95
|
+
- Runs: `scripts/gds/sequence.js` (planning + next + check), then `scripts/gds/claim.js` and `scripts/gds/ship.js` per pass.
|
|
96
|
+
- Reads: `GET /api/gds/tasks/:id` (for `dependencies[]`/`dependents[]`), `GET /api/gds/tasks/claimable`, `GET /api/gds/me`.
|
|
97
|
+
- Writes nothing itself — every state change goes through the claim and ship paths that already own it.
|
|
@@ -12,8 +12,10 @@ Runs `node scripts/gds/ship.js <task-id> --notes "..." --summary "..."`.
|
|
|
12
12
|
The CLI drives a **three-state lifecycle** with a subagent grader between states (Phase 5, 2026-05-10):
|
|
13
13
|
|
|
14
14
|
1. **`completed`** — the builder declared the work done. Always reached. Sets the task's `value_summary` (used on `status.example.com`) and the handoff notes.
|
|
15
|
-
2. **`confirmed`** — smoke green + the subagent grader passed. **
|
|
16
|
-
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`. If this step fails (conflicts, smoke red), the task stays at `confirmed` for `/merge-mode` to land later.
|
|
15
|
+
2. **`confirmed`** — smoke green + the subagent grader passed. **Verified, but not yet paid** — no credits land here ([ADR 0120](../../../docs/adr/<redacted>.md) pays on land, not on confirm). If the grade fails, the task stays at `completed` for human follow-up.
|
|
16
|
+
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.
|
|
17
|
+
|
|
18
|
+
> **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.
|
|
17
19
|
|
|
18
20
|
`/builder-ship` runs steps 1 + 2 inline; on auto-confirm it chains into step 3 (push, merge on main, smoke, deploy).
|
|
19
21
|
|
|
@@ -37,6 +39,8 @@ The CLI drives a **three-state lifecycle** with a subagent grader between states
|
|
|
37
39
|
- Decisions made (linked to ADRs)
|
|
38
40
|
If the user is in a hurry, ask them for one bullet per heading and fill gaps from session context.
|
|
39
41
|
|
|
42
|
+
**Confirm every new behavior is asserted by a checked-in `tests/*.mjs` case** — the grader treats throwaway verification scripts and Playwright probes as unverified and bounces the ship back to `completed`.
|
|
43
|
+
|
|
40
44
|
3. **Compose the value summary (`--summary`)** — ONE LINE, written for non-engineers. This is what shows up on `status.example.com` for the team and the public. Examples:
|
|
41
45
|
- "Players can now resume at their last position after a browser refresh."
|
|
42
46
|
- "Cost dashboard backfilled with 377 art-pipeline API calls."
|
|
@@ -53,6 +57,8 @@ The CLI drives a **three-state lifecycle** with a subagent grader between states
|
|
|
53
57
|
--summary "the one-liner"
|
|
54
58
|
```
|
|
55
59
|
|
|
60
|
+
**Never merge a task branch to main before running `ship.js`.** `ship.js` diffs the claim branch against `main`; an already-merged branch yields an empty diff, and the only exits are `--allow-empty` (dead-ends the task at `completed`, requiring an Archon-only confirm) or reverting the merge. Ship from the branch, then let `ship.js` land it. (This trap was hit on tasks 1002417 and 1002419, producing blockers 1000081/1000082 and an ~8.5-hour stall.)
|
|
61
|
+
|
|
56
62
|
5. **Render the completion card — it IS the summary; do NOT write a prose recap (task 1270).**
|
|
57
63
|
_As of task 1288 the lifecycle-card `PostToolUse` hook (`.claude/hooks/lifecycle-card.js`) reads this card and injects a one-step render directive right after `ship.js` runs — normally just follow that and render **once**; the detail below is the fallback if no directive appears._
|
|
58
64
|
On every ship, `ship.js` prints ONE deterministic completion card — the same shape every time, only the data changes. It always prints a monospace card to stdout, and for a shipped / confirmed / grade-failed outcome it ALSO writes a branded HTML card to a temp file and prints two marker lines:
|
|
@@ -27,6 +27,17 @@ Delivery is now deterministic (task 1288). The **card-delivery hook** (`.claude/
|
|
|
27
27
|
- If `start.js` prints **"no GDS session"**, the builder isn't signed in — route them by scenario: a **first-timer** on the project runs `/builder-setup` (one-time GitHub sign-in that also registers them); a **returning builder whose session went stale** runs `/builder-reauth` (the fast UI re-issue). `start.js` now prints both options; relay the one that fits, then retry.
|
|
28
28
|
- (`--full` adds the detailed status widgets + worktree/context block; `--json` is the machine interface; `--hook` is the envelope the hook consumes — don't run these for the user unless asked.)
|
|
29
29
|
|
|
30
|
+
## When the environment isn't ready (fresh clone)
|
|
31
|
+
|
|
32
|
+
`/builder-start` is frequently the **first** command run in a freshly-cloned instance, where the local environment isn't set up yet. In that state the script can't produce a card — so **route the builder to the one missing step instead of surfacing a raw error**. Match what you see and relay the single fix, plainly:
|
|
33
|
+
|
|
34
|
+
- **`bongos: command not found`, a "cannot find module" from `node scripts/gds/start.js`, or you can otherwise tell this is a fresh checkout** (a scaffolded instance whose `node_modules` is absent). The `bongos` CLI ships *inside* the not-yet-installed `@bongos/core` package, so nothing runs until deps are installed — this is the #1 fresh-clone wall. Route: run `npm install`, then `bongos dev` (one-command local bring-up), then re-run `/builder-start`. Don't try to hand-run internal scripts; the package isn't unpacked yet.
|
|
35
|
+
- **The card says the instance isn't reachable / running.** The local server was never brought up. Route: `bongos dev`, then re-run. (`start.js` now prints this guided card itself on a connection failure — relay it verbatim.)
|
|
36
|
+
- **Exit code 3 / "Wrong instance — refusing to act".** This machine's signed-in session targets a *different* instance than this project's `config/branding.json`. This is correct-by-design (it prevents writing to the wrong place). Route: run the exact `bongos login <origin>` line the message prints (the origin is right there), then re-run. **Do not** set an env override to force the mismatched instance.
|
|
37
|
+
- **"no GDS session"** — the auth case above (`/builder-setup` for a first-timer, `/builder-reauth` for a stale session).
|
|
38
|
+
|
|
39
|
+
Emit one guided next step, not a wall of options. These are the same fixes `bongos doctor` and the environment preflight (`preflight.js`) describe — this just front-loads them onto the first command so a newcomer isn't diagnosing a crash.
|
|
40
|
+
|
|
30
41
|
## After rendering
|
|
31
42
|
|
|
32
43
|
- The widget rows are **click-to-claim**: a click sends "Claim task N", which you handle by running `/builder-claim N` (the `builder-claim` skill). A typed number does the same.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: builder-sync
|
|
3
|
+
description: "Sync now — re-fetch the dev box's source immediately so a freshly-claimed task's code materializes within seconds, instead of waiting for the ~10-min cron. Triggers on '/builder-sync', 'sync my box', 're-scope my box', 'pull my task's code now', or right after '/builder-claim N' when the builder wants the code on the box now. Runs ON the box."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**Script skill (authoritative).** The core action is `node scripts/gds/box-sync.js`. Run it and relay its output verbatim.
|
|
7
|
+
|
|
8
|
+
You are re-running the dev box's source-fetch **on demand** (BV1.R96, goal 1000051 — task-scoped dev box). The box normally re-fetches on a ~10-min cron; this makes it instant.
|
|
9
|
+
|
|
10
|
+
## Why this exists
|
|
11
|
+
|
|
12
|
+
A builder's box holds only the code for their **active claim** (ADR 0148 task-scoping): `GET /box/source-access` returns the sparse-checkout set for the modules the claimed task's goal scopes. The box applies that via `infra/box-source-fetch.sh`, on a cron every ~10 min. So right after `/builder-claim N`, the *new* task's code isn't on the box yet — until the next cron tick.
|
|
13
|
+
|
|
14
|
+
`box-sync.js` re-runs that fetch **now**. Because the fetch re-reads `/box/source-access`, it **re-scopes the box in place** to whatever the builder currently holds a claim on — seconds after claiming, not ~10 minutes later. The cron stays the backstop.
|
|
15
|
+
|
|
16
|
+
## How to use
|
|
17
|
+
|
|
18
|
+
1. **Run it** (on the box):
|
|
19
|
+
```
|
|
20
|
+
node scripts/gds/box-sync.js
|
|
21
|
+
```
|
|
22
|
+
Add `--dry-run` to print what it would run without fetching.
|
|
23
|
+
|
|
24
|
+
2. **Relay the output.** On success it prints `sync: done — your box now holds the code for your active claim.` The sparse-checkout is now scoped to the active claim's modules (plus the base instance).
|
|
25
|
+
|
|
26
|
+
3. **Typical flow:** `/builder-claim N` → `/builder-sync` → the box now has task N's module code; open the working folder and start.
|
|
27
|
+
|
|
28
|
+
## Failure modes
|
|
29
|
+
|
|
30
|
+
- **`no infra/box-source-fetch.sh found`** — you are **not on a dev box** (off a box your source *is* your local checkout, so there's nothing to sync). This is expected on a laptop; the skill exits non-zero and says so.
|
|
31
|
+
- **The fetch itself errors** — the underlying `box-source-fetch.sh` output is passed through verbatim (e.g. a credential/rank issue surfaces there); relay it and, if it's a rank/claim problem, check the active claim with `/builder-start`.
|
|
32
|
+
|
|
33
|
+
## Constraints
|
|
34
|
+
|
|
35
|
+
- **Runs on the box only.** It re-runs the box-side fetch; it does not push, claim, or change scope by itself — scope follows the builder's active claim (change scope by claiming a different task, then sync).
|
|
36
|
+
- **Idempotent + safe.** Re-running is harmless; the cron does the same thing on its own schedule.
|
|
37
|
+
|
|
38
|
+
## Files this skill touches
|
|
39
|
+
|
|
40
|
+
- Runs: `scripts/gds/box-sync.js` → `infra/box-source-fetch.sh` (on the box)
|
|
41
|
+
- Reads (indirectly, via the fetch): `GET /box/source-access`
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fix-task
|
|
3
|
+
description: Claim, fix, verify, and ship a single GDS task by id — the standard cloud-bongos task loop. Use when asked to "claim/fix/ship task NNNN".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are running the standard task loop for cloud-bongos: read a task, verify its premise, claim it, fix it test-first, then ship it. This skill chains the pieces `/builder-claim` and `/builder-ship` already own — it does not re-derive their mechanics.
|
|
7
|
+
|
|
8
|
+
## What this skill does
|
|
9
|
+
|
|
10
|
+
Runs the recurring "claim, fix, and ship task NNNN" macro end to end. Its own value is the parts nothing else covers: verifying the task's premise before claiming (step 1), the test-first discipline (step 4), and confirming the ship actually landed instead of bouncing (step 7). For claiming and shipping themselves, it defers to `/builder-claim` and `/builder-ship`.
|
|
11
|
+
|
|
12
|
+
## How to use
|
|
13
|
+
|
|
14
|
+
1. **Read the task and verify it BEFORE claiming.**
|
|
15
|
+
```
|
|
16
|
+
node scripts/gds/api.js GET /api/gds/tasks/<id>
|
|
17
|
+
```
|
|
18
|
+
If the task names a root cause, open the actual code it points at and confirm that root cause is real — don't take the task's own diagnosis on faith. If the description doesn't match what the code does, say so before writing anything; a task built on a wrong premise needs a corrected task, not a fix for the wrong bug.
|
|
19
|
+
|
|
20
|
+
2. **If the task is in `backlog`, promote it to `ready` first** (Metic+ only — `POST /tasks/:id/promote` is rank-gated):
|
|
21
|
+
```
|
|
22
|
+
node scripts/gds/api.js POST /api/gds/tasks/<id>/promote --body '{}'
|
|
23
|
+
```
|
|
24
|
+
Skip this step if the task is already `ready`.
|
|
25
|
+
|
|
26
|
+
3. **Claim it** — see `/builder-claim` for the full mechanics (dedicated worktree, one-claim-per-session, and its error codes). In short:
|
|
27
|
+
```
|
|
28
|
+
node scripts/gds/claim.js <id> --worktree <worktree-name>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
4. **Write a failing test FIRST, then fix.** Add the case to the relevant `tests/*.mjs` file (or create one if none covers the surface) that reproduces the bug/gap the task describes. Run it and confirm it fails for the reason you expect — THEN implement the fix — THEN confirm the same test passes.
|
|
32
|
+
|
|
33
|
+
5. **Run the full verification the ship gate expects, not just the one new test:**
|
|
34
|
+
- the whole touched `tests/*.mjs` file (every case, not just the new one)
|
|
35
|
+
- `node scripts/gds/fitness.js` (the architecture fitness gate — core/host boundary, CLAUDE.md budget, rank-guard)
|
|
36
|
+
- any other suite CLAUDE.md/CONTRIBUTING.md calls out for the surface you touched (e.g. a module's own nested CLAUDE.md test pointer)
|
|
37
|
+
|
|
38
|
+
A throwaway verification script or a one-off Playwright probe does **not** satisfy this — the grader only trusts a checked-in `tests/*.mjs` case (see `/builder-ship`).
|
|
39
|
+
|
|
40
|
+
6. **Ship from the claim branch** — see `/builder-ship` for handoff notes, the value summary, and the completion-card rendering contract. In short:
|
|
41
|
+
```
|
|
42
|
+
node scripts/gds/ship.js <id> --notes "..." --summary "..."
|
|
43
|
+
```
|
|
44
|
+
**Never merge the claim branch into `main` before running `ship.js`.** `ship.js` diffs the branch against `main`; a pre-merged branch yields an empty diff, and the only way out is `--allow-empty` (dead-ends the task at `completed`, needing an Archon-only confirm) or reverting the merge. Ship from the branch and let `ship.js` land it — the same trap `/builder-ship` calls out.
|
|
45
|
+
|
|
46
|
+
7. **Confirm the outcome — don't assume the ship landed.**
|
|
47
|
+
```
|
|
48
|
+
node scripts/gds/api.js GET /api/gds/tasks/<id>
|
|
49
|
+
```
|
|
50
|
+
- `shipped` (or `confirmed`, awaiting `/merge-mode`) → done; relay the completion card per `/builder-ship`.
|
|
51
|
+
- Still `completed` → the grader bounced it. **Surface its feedback verbatim** — don't paraphrase or summarize away the specifics — then loop back to step 4 with that feedback in hand.
|
|
52
|
+
|
|
53
|
+
## Constraints
|
|
54
|
+
|
|
55
|
+
- **Don't skip step 1.** A task's own description can be wrong; verifying against the live code before claiming avoids burning a claim on a fix for a bug that doesn't exist as described.
|
|
56
|
+
- **Don't claim a task still in `backlog`** — promote it first (step 2), or the claim is refused (`TASK_NOT_READY`; see `/builder-claim`).
|
|
57
|
+
- **Don't substitute a manual/throwaway check for a committed test** — see step 5.
|
|
58
|
+
- **Don't merge to `main` before shipping** — see step 6 and `/builder-ship`'s own callout on the same trap.
|
|
59
|
+
|
|
60
|
+
## Files this skill touches
|
|
61
|
+
|
|
62
|
+
- Calls: `GET /api/gds/tasks/:id`, `POST /api/gds/tasks/:id/promote`, plus whatever `/builder-claim` and `/builder-ship` call for claiming and shipping.
|
|
63
|
+
- Reads: `~/.config/otb/gds-session.json`
|
|
64
|
+
- Writes: the fix itself, plus a new or extended `tests/*.mjs` case.
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: goal-create
|
|
3
|
+
description: Plan and create ONE GDS goal — the module-scoped workspace between a version and its criteria (ADR 0086) — in a single interactive session. Claude reads the goal board, decides reuse-vs-new, infers scope_modules from the LIVE module roster, drafts the goal's done-when criteria and a seed-task outline on its own, then asks only about genuine gray areas and for one sign-off before writing anything. Scoped smaller than /planning-session (one goal in one sitting, no spec file, no migration) and the opening end of /goal-review (which closes goals out). Triggers when the user says "/goal-create", "create a goal", "make a goal for this", "plan a goal", "we need a goal to hold this work", "what goal should this live in", or automatically when a task is created with no goal to live in — a POST /tasks response carrying a `goal_advisory`, or work about to land in a version's "<version> — general" catch-all. Metic+ rank only (Metic and Archon; not Xenos) — Archon for a protected-module scope.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are running the **goal-create** session for this Cloud Bongos instance. You produce **one goal**: a title, a scope wall, two to four done-when criteria, and a handful of seed tasks — written to the GDS in one sitting.
|
|
7
|
+
|
|
8
|
+
> **Not `/planning-session`, not `/goal-review`.** `/planning-session` scopes a whole **version**: 5–9 criteria, a written spec under `docs/specs/`, a multi-round interview, a seed script, a migration. This skill produces **one goal**, with no spec file and no migration. `/goal-review` is the other end of the same lifecycle — it *confirms* criteria and auto-achieves goals. If the ask is "plan the next version", stop and run `/planning-session` instead.
|
|
9
|
+
|
|
10
|
+
## Rank gate — Metic+ only
|
|
11
|
+
|
|
12
|
+
**Gated to Metic+ (Metic, Archon); not Xenos.** Creating a goal sets a **scope wall** — the module keys its members may author inside — and seeds the criteria a slice of the version will be judged against. That is a trusted-builder operation (ADR 0086 §3/§4). The server enforces it: `POST /api/gds/goals` is `requireRank('metic','archon')`, and `POST /api/gds/versions/:id/done-when` is `requireRank('metic','archon')` **plus a goal-ownership wall** (ADR 0154) — both pinned in `route-rank-check.MODULE_EXPECTED_RANKS.lifecycle`. This check just stops a Xenos early instead of after a wall of 403s. Markdown never grants authority ([`docs/canonical-permissions.md`](../../../docs/canonical-permissions.md), [ADR 0016](../../../docs/adr/<redacted>.md)).
|
|
13
|
+
|
|
14
|
+
**Enforce the gate at the very top of the session, before reading anything else:**
|
|
15
|
+
|
|
16
|
+
1. Call `node scripts/gds/api.js GET /api/gds/me` and read `builder.rank`. Compare case-insensitively (lowercase it before testing).
|
|
17
|
+
2. **If `rank` lowercases to `xenos`** → stop immediately. Tell the builder: *"Creating a goal sets a scope wall and seeds a version's done-when criteria — a Metic+ operation. You're currently Xenos. You can still **file** the proposal as an idea (`node scripts/gds/capture.js "…"`) for an Archon to promote at triage; ask an Archon for promotion if you need to create goals directly."* Do not read the goal board, do not draft criteria.
|
|
18
|
+
3. **If `rank` lowercases to `metic` or `archon`** → proceed with the phases below.
|
|
19
|
+
4. **If `rank` is absent** (a deployment where the three-rank model hasn't shipped) → treat the session as available, exactly as `/idea-triage` does in its pre-rank passthrough mode, and note that in the session log.
|
|
20
|
+
5. **The protected-scope branch is a SECOND gate, decided in Phase 3 — not here.** A goal whose `scope_modules` includes a **protected** key is Archon-only to create (`403 archon_required_for_protected_scope`) and Archon-mediated to join. You do not know the scope at gate time. Draft it in Phase 3, then take one of the off-ramps in Phase 5 if you are a Metic and the drafted scope is protected.
|
|
21
|
+
|
|
22
|
+
## What this skill does
|
|
23
|
+
|
|
24
|
+
1. Reads the live goal board for the target version, and the version's existing criteria.
|
|
25
|
+
2. Decides **reuse vs. create** — an open goal whose outcome and scope already cover the work wins; a net-new goal only when nothing does.
|
|
26
|
+
3. Drafts, on its own: title · description · `scope_modules` (verified against the **live** roster) · `succeeds_goal_id` lineage · 2–4 criteria · a seed-task outline.
|
|
27
|
+
4. Asks — via AskUserQuestion — only the gray areas it genuinely cannot decide, then **one** approval round.
|
|
28
|
+
5. Writes in the order **goal → criteria → tasks**, then verifies and reports.
|
|
29
|
+
|
|
30
|
+
## Phase 1 — Read the board (autonomous; ask nothing)
|
|
31
|
+
|
|
32
|
+
Determine without asking:
|
|
33
|
+
|
|
34
|
+
- **The version.** `node scripts/gds/api.js GET /api/gds/public/versions`. If exactly one is `building` or `planning`, take it. Ask only when two or more are open *and* the work doesn't obviously belong to one.
|
|
35
|
+
- **The existing goals.** `node scripts/gds/api.js GET "/api/gds/goals?version=<ver>&status=open"`, then `GET /api/gds/goals/<id>` on each plausible candidate — the detail response is `{goal, members, criteria, dependencies}`, which is what tells you whether a candidate already owns criteria in this space.
|
|
36
|
+
- **The version's criteria.** `node scripts/gds/api.js GET "/api/gds/versions/<ver>/done-when"` → `{version_id, criteria, goals}`. Use it to avoid a `criterion_id` collision and to pick the next `sort_order` (max + 1).
|
|
37
|
+
- **The module roster — LIVE, never from memory and never from this file:**
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
node -e "const m=require('./src/bongos/module-scope-map');console.log(m.moduleKeys().map(k=>k+(m.isProtectedModule(k)?' [PROTECTED — Archon-only]':'')).join('\n'))"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
> **Run the line. Do not paste a roster anywhere, including into this file.** `protected` is *derived* from glob overlap with the trust core, so it changes when the globs change. The snapshot in `/planning-session`'s Phase 2.5 rotted within one release and now omits a key — that is the failure mode this rule exists to prevent.
|
|
44
|
+
|
|
45
|
+
- **Lineage**, only when this goal continues a prior version's work: `node scripts/gds/api.js GET "/api/gds/goals?version=<prev>&status=achieved"` and pick the predecessor for `succeeds_goal_id`.
|
|
46
|
+
|
|
47
|
+
## Phase 2 — Reuse or create (autonomous; one question only on a genuine tie)
|
|
48
|
+
|
|
49
|
+
> **Reuse** when an open goal's outcome already contains this work *and* its `scope_modules` already cover the files it touches. **Create** when the work is a distinct outcome, or when reusing would force that goal's wall to widen into a new module — widening is `POST /goals/:id/scope`, a separate ask a trusted rank approves. Don't smuggle it in.
|
|
50
|
+
|
|
51
|
+
If the answer is reuse, **stop creating.** Report the goal id, and if an orphan task triggered this session, move it:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
node scripts/gds/api.js PATCH /api/gds/tasks/<task_id> --body '{"goal_id":<gid>}' # ids only — safe inline
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Only a real tie between two candidates earns an AskUserQuestion.
|
|
58
|
+
|
|
59
|
+
## Phase 3 — Draft the goal (autonomous)
|
|
60
|
+
|
|
61
|
+
Everything here is your call. It is presented in Phase 4 as a proposal, not as questions.
|
|
62
|
+
|
|
63
|
+
- **Title** — the outcome the goal owns, not a task list. One line.
|
|
64
|
+
- **`description`** — 2–4 sentences: what is true when this goal is achieved, and what it explicitly does not cover.
|
|
65
|
+
- **`scope_modules`** — infer from the planned work's file paths, then **verify every key against `moduleKeys()`**. An unknown key is a hard `400 unknown_module` (the response helpfully returns the full valid roster). Keep it tight: the wall is set here and only here. **No covering key?** Do not invent one — file a `kind='refactor'` prep task scoped to `kernel` to extend `MODULE_GLOBS`, and make this goal's tasks depend on it.
|
|
66
|
+
- **`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.
|
|
67
|
+
- **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.
|
|
68
|
+
- **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` (auto-derives, ADR 0084). Proof tasks use `kind='verify'`; exploration uses `kind='spike'` (and spikes are deliberately left in backlog).
|
|
69
|
+
|
|
70
|
+
## Phase 4 — Ask, then get sign-off
|
|
71
|
+
|
|
72
|
+
Two rounds at most, both via **AskUserQuestion**.
|
|
73
|
+
|
|
74
|
+
1. **Gray-area round — at most one round, at most 4 questions, often zero.** A question earns its place only if the work is genuinely underspecified on it, reasonable people would disagree, **and** the answer changes the goal's shape. Put your recommendation first and leave room for "Other". Legitimate gray areas: where this goal's boundary falls against an adjacent one; whether a module belongs inside the wall or is a dependency; whether this succeeds a prior goal or replaces it; whether a criterion belongs to this goal or the version. **Do not ask** anything the goal board, the criteria list, or `moduleKeys()` already answers, and never ask a yes/no rubber-stamp.
|
|
75
|
+
2. **The approval round — always exactly one, always last.** Present the goal (title · `scope_modules` · join policy · succeeds), the **numbered** criteria, and the seed-task table. Then one question: **Create it** / **Goal + criteria only** (skip the seed tasks) / **Edit first** / **Cancel**. Number the criteria so the user edits by number rather than by copy/paste.
|
|
76
|
+
|
|
77
|
+
## Phase 5 — Land it (write order: goal → criteria → tasks)
|
|
78
|
+
|
|
79
|
+
The order is forced: a criterion needs `goal_id`, a task needs both `goal_id` and the criterion slugs.
|
|
80
|
+
|
|
81
|
+
> **Always `--body-file`, never inline `--body`, for anything carrying a title, description or criterion prose.** Those strings are authored in this session and routinely contain an apostrophe ("the builder's hall"), which terminates a single-quoted shell argument and corrupts the JSON — or, with a hostile string, runs whatever follows on the builder's machine. Write the body to a temp `.json` file and pass its path. On Windows also heed `scripts/gds/CLAUDE.md`: do **not** create that file with `Out-File`/`>` (the UTF-8 BOM breaks `JSON.parse`), and never pipe `api.js` through `2>&1` (its banner goes to stderr by design).
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
# 5a — the goal. STRICT validation: exactly these five fields are accepted
|
|
85
|
+
# (version_id*, title*, description, scope_modules[], succeeds_goal_id).
|
|
86
|
+
# ANY other key is a 400 unknown_field — do NOT pass criteria, tasks, lead or visibility.
|
|
87
|
+
# goal.json: {"version_id":"<ver>","title":"...","description":"...","scope_modules":["<key>"]}
|
|
88
|
+
# carry-forward: add "succeeds_goal_id":<prior_goal_id>
|
|
89
|
+
node scripts/gds/api.js POST /api/gds/goals --body-file <path-to-goal.json>
|
|
90
|
+
# → 201 {ok, goal, succeeds_goal_id}. CAPTURE goal.id.
|
|
91
|
+
# You are now the goal's OWNER and its 'lead' member — the membership row is inserted
|
|
92
|
+
# in the SAME statement, so there is NO join step. Don't POST /goals/<id>/join after.
|
|
93
|
+
|
|
94
|
+
# 5b — the criteria, one call each, in presentation order.
|
|
95
|
+
# criterion.json: {"criterion_id":"<slug>","criterion_md":"...","goal_id":<gid>,"sort_order":<n>}
|
|
96
|
+
node scripts/gds/api.js POST /api/gds/versions/<ver>/done-when --body-file <path-to-criterion.json>
|
|
97
|
+
# You may write these because you OWN the goal (ADR 0154), not merely because you are
|
|
98
|
+
# a Metic. Refusals: 409 criterion_exists (slug already on this version — reuse it,
|
|
99
|
+
# don't rename around the collision) · 409 goal_not_open · 409 version_closed ·
|
|
100
|
+
# 400 bad_goal_id (which ALSO masks "you don't own this goal" — see below).
|
|
101
|
+
|
|
102
|
+
# 5c — the seed tasks, one call each. --body-file avoids shell-quoting description/arrays.
|
|
103
|
+
node scripts/gds/api.js POST /api/gds/tasks --body-file <path-to-task.json>
|
|
104
|
+
# {"version_id":"<ver>","goal_id":<gid>,"title":"...","description":"...",
|
|
105
|
+
# "kind":"feature|refactor|infra|spike|verify|decision","priority":N,"est_minutes":N,
|
|
106
|
+
# "criterion_ids":["<slug>"],"source":"goal-create","source_ref":"goal-<gid>-R##"}
|
|
107
|
+
# criterion_ids takes a SLUG (preferred), a "Cn" position, or a numeric id; an
|
|
108
|
+
# unresolvable ref is 400 bad_criterion_ref and NOTHING is created. source_ref makes a
|
|
109
|
+
# re-run idempotent (a repeat returns the original task with "idempotent": true).
|
|
110
|
+
# Throttle between calls and honour 429 retry_after.
|
|
111
|
+
|
|
112
|
+
# 5d — dependency edges, only where a real gate exists.
|
|
113
|
+
node scripts/gds/api.js POST /api/gds/tasks/<id>/dependencies --body '{"depends_on_task_id":<id>}' # ids only
|
|
114
|
+
|
|
115
|
+
# 5e — promote the zero-dependency layer. Every new task lands status='backlog', and
|
|
116
|
+
# auto-promotion only fires when a DEPENDENCY ships — so a task with no deps would
|
|
117
|
+
# sit unclaimable forever. Leave spikes in backlog.
|
|
118
|
+
node scripts/gds/api.js POST /api/gds/tasks/<id>/promote
|
|
119
|
+
|
|
120
|
+
# 6 — verify + report.
|
|
121
|
+
node scripts/gds/api.js GET /api/gds/goals/<gid> # {goal, members, criteria, dependencies}
|
|
122
|
+
node scripts/gds/api.js GET "/api/gds/tasks?goal_id=<gid>"
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Protected scope — the Archon off-ramps
|
|
126
|
+
|
|
127
|
+
> **If the drafted `scope_modules` contains a protected key and you are a Metic, do not POST.** `POST /goals` returns `403 archon_required_for_protected_scope`, and a protected-scope goal is Archon-mediated to join in any case. Say so plainly and offer three routes:
|
|
128
|
+
> 1. **Narrow the wall.** Usually only *part* of the work needs the protected module. Create the goal scoped to the unprotected keys, and file the protected-core piece as a task under an existing Archon-owned goal.
|
|
129
|
+
> 2. **Hand an Archon the drafted body.** They create it, then admit you via `POST /goals/:id/members` (Archon-only for protected scope, and the target must be Metic+).
|
|
130
|
+
> 3. **File it as an idea** — `node scripts/gds/capture.js "<the goal proposal>"` — for an Archon to promote at `/idea-triage`.
|
|
131
|
+
>
|
|
132
|
+
> **Do not** create the goal narrow intending to widen it later. Widening into a protected key is Archon-gated too. Scope is never self-granted (ADR 0086 §4).
|
|
133
|
+
|
|
134
|
+
### A 400 on a criterion can mean "not your goal"
|
|
135
|
+
|
|
136
|
+
`POST /versions/:id/done-when` deliberately returns the **same** `400 bad_goal_id` whether the goal doesn't exist or you simply don't own/manage it — so the route can't be used to probe which goals (including private ones) exist on a version (ADR 0154). If you get `bad_goal_id` for a goal you just created, you are almost certainly writing to the wrong version; if it's a goal someone else owns, ask them or an Archon to add the criterion.
|
|
137
|
+
|
|
138
|
+
## Auto-invoked from a task create (the orphan hook)
|
|
139
|
+
|
|
140
|
+
When `POST /tasks` came back with a non-null **`goal_advisory`**, you were invoked to give that task a home.
|
|
141
|
+
|
|
142
|
+
- `reason: "no_goal"` — the task has no goal at all. Its version has no catch-all, which is normal for any version created after the goal tier shipped.
|
|
143
|
+
- `reason: "catch_all"` — it landed in `"<version> — general"`: a bucket with no scope wall, no criteria and no owner.
|
|
144
|
+
|
|
145
|
+
Run the phases above **with the orphan task as the seed** — its title, description and touches are your best evidence for the goal's title and `scope_modules`. Two shortcuts:
|
|
146
|
+
|
|
147
|
+
- **Prefer reuse.** `goal_advisory.candidate_goals` already lists the version's open goals with the catch-all excluded. Check each with `GET "/api/gds/goals/<id>/suggest-criteria?title=<t>&description=<d>"` — a strong criterion match means the task belongs there and no new goal is needed. Move it with `PATCH /tasks/<id> {"goal_id":<gid>}`.
|
|
148
|
+
- **If you do create a goal, re-home the orphan into it** (same PATCH) and link the criterion: `POST /api/gds/tasks/<task_id>/criteria --body '{"criterion_ids":["<slug>"]}'` (slugs are kebab-case, so inline is safe). Do **not** delete and recreate the task — you would lose its id, `source_ref` and any votes.
|
|
149
|
+
|
|
150
|
+
**A goal-less task is not an error and was never blocked.** `goal_advisory` is advice on a request that already succeeded. Never fail a build, refuse work, or badger the builder over it — if they say "later", file the idea and move on.
|
|
151
|
+
|
|
152
|
+
## Why we run this
|
|
153
|
+
|
|
154
|
+
Nothing in the system creates a goal on its own, and nothing errors when a task has none. `db.createTask` falls back to the version's `"<version> — general"` catch-all, and those rows were created **only** by migration 160, for the versions that existed at that moment — `db.createVersion` makes no such goal and there is no trigger. So on any newer version, every task quietly gets `goal_id = NULL`: no scope wall, no criteria gating it, no workspace where anyone reviews it. This skill is how a real goal comes to exist before that happens.
|
|
155
|
+
|
|
156
|
+
## Tone for the user
|
|
157
|
+
|
|
158
|
+
Lars is the prompter (see CLAUDE.md §2). Frame the goal as an **outcome** — what is true when it's done — never as a `scope_modules` array or a rank discussion. Decide the mechanics yourself; ask only about the boundary: what this goal owns, and what it deliberately doesn't. Keep the approval round to one screen.
|
|
@@ -5,11 +5,13 @@ description: Walk the GDS criterion review queue — for each criterion auto-fla
|
|
|
5
5
|
|
|
6
6
|
You are running the **goal-review** session for this Cloud Bongos instance. It mirrors `/idea-triage`, but for the *closing* end of the work hierarchy (ADR 0086 §6): criteria that have **auto-flagged "met — pending review"** get walked one-at-a-time and dispositioned, so finished work actually closes out instead of sitting in limbo.
|
|
7
7
|
|
|
8
|
+
> **The other end of this lifecycle is [`/goal-create`](../goal-create/SKILL.md)** — it opens a goal (scope wall, criteria, seed tasks); this one closes it out.
|
|
9
|
+
|
|
8
10
|
**The auto-flag is derived, not stored.** When every task linked to a criterion has shipped — and the criterion has not yet been confirmed — the server flags it `pending_review` (deterministic from `task_criteria` + ship status; no manual propose step). This skill surfaces that queue and lets a trusted builder confirm or reject each one. Confirming sets the criterion `satisfied=true`; confirming a goal's **last** unsatisfied criterion auto-flips the goal `open → achieved`.
|
|
9
11
|
|
|
10
12
|
## Rank gate — Metic+ only
|
|
11
13
|
|
|
12
|
-
**Gated to Metic+ (Metic, Archon); not Xenos.** Confirming a criterion sets `satisfied=true` and can auto-achieve a goal — a trusted-builder operation that closes out a slice of a version (the "who confirms" resolution in ADR 0086 §6: the planner, not only the Archon). The server enforces this — `POST /api/gds/done-when/:criterionId/satisfy` is `requireRank('metic','archon')` and pinned in `route-rank-check.
|
|
14
|
+
**Gated to Metic+ (Metic, Archon); not Xenos.** Confirming a criterion sets `satisfied=true` and can auto-achieve a goal — a trusted-builder operation that closes out a slice of a version (the "who confirms" resolution in ADR 0086 §6: the planner, not only the Archon). The server enforces this — `POST /api/gds/done-when/:criterionId/satisfy` is `requireRank('metic','archon')` and pinned in `route-rank-check.MODULE_EXPECTED_RANKS.lifecycle` — so this check just stops a Xenos early instead of after a wall of 403s. Markdown never grants authority ([`docs/canonical-permissions.md`](../../../docs/canonical-permissions.md), [ADR 0016](../../../docs/adr/<redacted>.md)).
|
|
13
15
|
|
|
14
16
|
**Enforce the gate at the very top of the session, before reading anything else:**
|
|
15
17
|
|
|
@@ -5,6 +5,8 @@ description: Daily walk through the GDS idea_inbox — for each open idea, promp
|
|
|
5
5
|
|
|
6
6
|
You are running the daily idea-triage session for Example. Open ideas in the GDS `idea_inbox` table get walked one-at-a-time and verdicted, so the inbox doesn't accumulate stale entries.
|
|
7
7
|
|
|
8
|
+
> **This skill is no longer the only way to triage.** Since task 1002447 a Metic+ builder can promote, discard and merge from the **hall** — the Home "Needs your attention" card's idea rows each carry a *Triage* verb that opens the record overlay, where all three forms live. No Claude session involved. What this skill adds over the hall is the **parallel development pass** (Step 1.5) — an idea fleshed out into open questions/risks before the verdict — so reach for it when the queue needs judgment, and use the hall when it just needs clearing.
|
|
9
|
+
|
|
8
10
|
## Rank gate — Metic+ only
|
|
9
11
|
|
|
10
12
|
**Gated to Metic+ (Metic, Archon); not Xenos.** Triage verdicts (promote, discard, merge) reshape the team's backlog — a trusted-builder operation (GDS-V3 criterion C2, `three-ranks-gate-everything`; [`docs/canonical-permissions.md`](../../../docs/canonical-permissions.md), [ADR 0018](../../../docs/adr/<redacted>.md)). A Xenos can still **file** an idea (`POST /api/gds/inbox`); they just can't verdict them.
|
|
@@ -42,7 +44,9 @@ If `open_count` is 0, print "inbox empty — nothing to triage today" and exit.
|
|
|
42
44
|
|
|
43
45
|
**Step 1.5 — develop the open ideas in parallel (task 930).**
|
|
44
46
|
|
|
45
|
-
Before
|
|
47
|
+
**Before spawning any subagents, run a cheap staleness pass over the list first** — a quick skim of each idea's title/body against the current codebase/CLAUDE.md to catch ideas that are already implemented, already superseded, or otherwise obviously stale. A recent triage found 47 of 170 open ideas already stale; filtering those out first means the expensive multi-agent development pass below is only spent on ideas that still need it.
|
|
48
|
+
|
|
49
|
+
Then, before walking the list, **flesh out each remaining open idea with a subagent** so the verdict lands on a developed idea, not a one-liner. Spawn the subagents **in parallel** (multiple `Agent` tool calls in a single message) — they run while you prepare the walk, so there's no serial wait.
|
|
46
50
|
|
|
47
51
|
- **Model:** `opus` for every development subagent. This is research / design analysis against the live repo, which per CLAUDE.md §2's routing table is Opus work — never inherit silently, never downgrade to Haiku.
|
|
48
52
|
- **Fan-out cap:** develop up to **12** ideas per session (oldest-first — `captured_at` ascending). If there are more than 12 open, note "developed the 12 oldest; the rest are walked undeveloped" so nothing is silently dropped.
|
|
@@ -71,7 +75,7 @@ node scripts/gds/triage.js --development "${TMPDIR:-/tmp}/otb-idea-development.j
|
|
|
71
75
|
**Step 2 — walk the list, idea by idea.**
|
|
72
76
|
|
|
73
77
|
Present each idea with:
|
|
74
|
-
- id + kind (auto-classified by B2)
|
|
78
|
+
- id + kind (auto-classified by B2 — one of `feature`, `bug`, `infra`, `refactor`, `spike`, `learning-capture`, `cleanup`, `decision`, `blocker-resolution`, `unclassified`, `criterion-proposal`; mirrors `tasks.kind` plus the triage-only `criterion-proposal` value, `modules/ideas/inbox.js`)
|
|
75
79
|
- title
|
|
76
80
|
- body_md (full)
|
|
77
81
|
- captured_at + captured_by
|
|
@@ -85,7 +89,7 @@ Then ask the user (concise prompt — Lars is an EE, not a software engineer; fr
|
|
|
85
89
|
|
|
86
90
|
**Promote → pick the tier (BV1.R64 / ADR 0086).** An idea no longer only becomes a *task* — it can promote into any tier of the work hierarchy: a **goal** (a whole module-scoped workspace), a **criterion** (a new done-when test), or a **task** (a single unit of work). Choose by the idea's size: a broad objective → goal; a "we should also require X to be done" → criterion; a concrete piece of work → task. Frame the choice to the user in those terms, then create the right record and mark the idea promoted.
|
|
87
91
|
|
|
88
|
-
- **Promote → task** (the common case). Ask for version, title, est_minutes, priority, credits_reward (`touches[]` optional — [ADR 0049](../../../docs/adr/<redacted>.md)).
|
|
92
|
+
- **Promote → task** (the common case). Ask for version, title, est_minutes, priority, credits_reward (`touches[]` optional — [ADR 0049](../../../docs/adr/<redacted>.md)). `POST /api/gds/tasks` lands the new task in `backlog`, **not** `active` — it still needs `POST /tasks/:id/promote` (Metic+) before it's claimable. **Pass `goal_id` on the create** so the task lands in a real goal rather than the version's `"<version> — general"` catch-all — `POST /tasks` has accepted it since task 1763, and the 201 now returns a `goal_advisory` when the task ends up with no proper home. If no existing goal fits, run [`/goal-create`](../goal-create/SKILL.md) instead of filing it loose.
|
|
89
93
|
|
|
90
94
|
```
|
|
91
95
|
# 1. Create the task (--body-file avoids shell-quoting the touches[]/description).
|
|
@@ -96,7 +100,7 @@ Then ask the user (concise prompt — Lars is an EE, not a software engineer; fr
|
|
|
96
100
|
node scripts/gds/api.js PATCH /api/gds/inbox/<idea_id> --body '{"status":"promoted","promoted_to_task_id":<new_task_id>}'
|
|
97
101
|
```
|
|
98
102
|
|
|
99
|
-
- **Promote → goal** (Metic+; Archon if the scope includes a `protected` module). Create the goal, then mark the idea promoted — `promoted_to_task_id` stays NULL (a goal isn't a task; note the new goal id in the session log, mirroring how criterion-promotion records its link).
|
|
103
|
+
- **Promote → goal** (Metic+; Archon if the scope includes a `protected` module). For anything needing criteria and seed tasks, run [`/goal-create`](../goal-create/SKILL.md) — it does the reuse-vs-new check, the scope wall and the sign-off. The bare one-liner below is fine only for a goal you are deliberately leaving empty. Create the goal, then mark the idea promoted — `promoted_to_task_id` stays NULL (a goal isn't a task; note the new goal id in the session log, mirroring how criterion-promotion records its link).
|
|
100
104
|
|
|
101
105
|
```
|
|
102
106
|
node scripts/gds/api.js POST /api/gds/goals --body '{"version_id":"<ver>","title":"...","description":"from idea #<idea_id>","scope_modules":["<module-key>", ...]}'
|
|
@@ -111,18 +115,20 @@ Then ask the user (concise prompt — Lars is an EE, not a software engineer; fr
|
|
|
111
115
|
|
|
112
116
|
If the idea isn't already criterion-proposal-shaped, either re-file it in that shape or promote it to a task/goal instead — don't hand-write a `done_when_criteria` row.
|
|
113
117
|
|
|
114
|
-
**Discard** → mark it closed:
|
|
118
|
+
**Discard** → mark it closed, with the reason (`triage_note`, task 1002447 / migration core_195 — a discard with no reason is a verdict nobody can audit):
|
|
115
119
|
|
|
116
120
|
```
|
|
117
|
-
node scripts/gds/api.js PATCH /api/gds/inbox/<idea_id> --body '{"status":"discarded"}'
|
|
121
|
+
node scripts/gds/api.js PATCH /api/gds/inbox/<idea_id> --body '{"status":"discarded","triage_note":"superseded by the new gate"}'
|
|
118
122
|
```
|
|
119
123
|
|
|
120
|
-
**Merge** → ask the user which other idea N is the canonical one, then
|
|
124
|
+
**Merge** → ask the user which other idea N is the canonical one, then fold this one into it:
|
|
121
125
|
|
|
122
126
|
```
|
|
123
|
-
node scripts/gds/api.js PATCH /api/gds/inbox/<idea_id> --body '{"status":"merged","
|
|
127
|
+
node scripts/gds/api.js PATCH /api/gds/inbox/<idea_id> --body '{"status":"merged","merged_into_idea_id":<canonical_idea_id>,"triage_note":"same ask as #N"}'
|
|
124
128
|
```
|
|
125
129
|
|
|
130
|
+
> **`merged_into_idea_id`, NOT `promoted_to_task_id`.** This skill used to document the latter; that column is `REFERENCES tasks(id)`, so an idea id written there either trips the FK (a 500) or silently points at an unrelated task that happens to share the number. Task 1002447 added the real column. The server refuses a self-merge (`MERGE_SELF`), a target that doesn't exist (`MERGE_TARGET_NOT_FOUND`), and a target that is itself merged (`MERGE_TARGET_MERGED` — it names where the chain ends, so retarget there).
|
|
131
|
+
|
|
126
132
|
**Defer** is implicit — leave the idea open by not patching it. Inbox count stays the same; the idea will surface again tomorrow.
|
|
127
133
|
|
|
128
134
|
**Step 4 — surface a summary.**
|
|
@@ -5,7 +5,7 @@ description: Manual fallback for the auto-merge in /builder-ship. Walks every ta
|
|
|
5
5
|
|
|
6
6
|
You are running the manual merge-mode session for Example. **`/merge-mode` is a rare last resort, not a routine sweep — and not something to push on other builders.** The server lands merges on its own: `/builder-ship` chains into auto-merge, green PRs auto-merge, a 5-min reconciler flips `confirmed → shipped`, and the [ADR 0082](../../../docs/adr/<redacted>.md) resolver self-heals generated-file conflicts. **Before running this skill, confirm the task is genuinely stuck** — still at `confirmed` more than ~5 minutes after its ship because of a conflict or regression the server couldn't auto-resolve. If you haven't waited for the sweep yet, stop and wait. This skill is for the strand that survives all of that — usually a cross-branch / non-generated-file conflict, a smoke regression, or a `--no-merge` ship.
|
|
7
7
|
|
|
8
|
-
The queue this skill works against is **tasks at status='confirmed'**. Those are tasks where the builder declared done, verification passed,
|
|
8
|
+
The queue this skill works against is **tasks at status='confirmed'**. Those are tasks where the builder declared done, verification passed, and the only thing missing is the merge to main + deploy. **They are not yet paid** — [ADR 0120](../../../docs/adr/<redacted>.md) books the reward on land, so landing the queue is what releases those builders' credits.
|
|
9
9
|
|
|
10
10
|
## What this skill does
|
|
11
11
|
|
|
@@ -144,7 +144,7 @@ For each task that successfully merged + deployed:
|
|
|
144
144
|
node scripts/gds/api.js POST /api/gds/tasks/<task-id>/ship
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
-
The `POST /tasks/:id/ship` endpoint flips the task to `shipped`, stamps `shipped_at`.
|
|
147
|
+
The `POST /tasks/:id/ship` endpoint flips the task to `shipped`, stamps `shipped_at`. **This is the credit moment** — [ADR 0120](../../../docs/adr/<redacted>.md) books the reward on land, so this call is what pays the builder (on a `cost-plus-only` instance like Cloud Bongos that is the cost-plus session reward only — the per-task estimate is never paid; [ADR 0146](../../../docs/adr/<redacted><redacted>.md)).
|
|
148
148
|
|
|
149
149
|
**Step 7 — surface a summary.**
|
|
150
150
|
|
|
@@ -108,4 +108,5 @@ A new owner has gone zero → live: their own standalone repo on a pinned core,
|
|
|
108
108
|
- **This skill is the source of truth for the sequence.** If a step changes, change it here; `bongos onboard` (task 1982) and the hall wizard (task 1983) must render the same sequence.
|
|
109
109
|
- **Standalone only** (ADR 0108) — do not fall back to editing this monorepo's checkout for a new project.
|
|
110
110
|
- **Never weaken the trust boundary** — the web tier enqueues; only the control-plane runner (`provision.js`) touches cloud tokens (ADR 0016 / 0111 §2).
|
|
111
|
+
- **Live docs are automatic** — a standalone instance's session-log index regenerates on deploy (`provision.js` runs `regen-instance-docs.js` after migrate; `bongos init`/`upgrade` seed+refresh it), and the whole-file nav docs are gitignored so `git reset --hard` never wipes them ([ADR 0147](../../../docs/adr/<redacted>.md)). If you wire a **bespoke** deploy script for an instance, it MUST call `node node_modules/@bongos/core/scripts/gds/regen-instance-docs.js` after `git reset` + migrate — see [`docs/recipes/standalone-live-docs.md`](../../../docs/recipes/standalone-live-docs.md).
|
|
111
112
|
- **Adopting an EXISTING repo** (brownfield) is the other branch of the scaffold leg (step 3) — `bongos init --adopt` ([ADR 0121](../../../docs/adr/<redacted>.md)): detect → accept-gated conflict pre-flight → additive layering (never clobbers) → real version/goal + backlog import. Built; the `bongos onboard` CLI and the hall "start a project" wizard offer the same greenfield-vs-adopt choice.
|