@bongos/core 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.bongos-core.json +5727 -0
- package/.claude/skills/blocker-review/SKILL.md +91 -0
- package/.claude/skills/blocker-solve/SKILL.md +96 -0
- package/.claude/skills/builder-backup/SKILL.md +54 -0
- package/.claude/skills/builder-box/SKILL.md +45 -0
- package/.claude/skills/builder-claim/SKILL.md +76 -0
- package/.claude/skills/builder-connect/SKILL.md +59 -0
- package/.claude/skills/builder-cost/SKILL.md +47 -0
- package/.claude/skills/builder-end/SKILL.md +81 -0
- package/.claude/skills/builder-exit/SKILL.md +88 -0
- package/.claude/skills/builder-key/SKILL.md +40 -0
- package/.claude/skills/builder-reauth/SKILL.md +50 -0
- package/.claude/skills/builder-redteam/SKILL.md +109 -0
- package/.claude/skills/builder-release/SKILL.md +41 -0
- package/.claude/skills/builder-setup/SKILL.md +62 -0
- package/.claude/skills/builder-ship/SKILL.md +79 -0
- package/.claude/skills/builder-stage/SKILL.md +51 -0
- package/.claude/skills/builder-start/SKILL.md +46 -0
- package/.claude/skills/close-box/SKILL.md +43 -0
- package/.claude/skills/design-sync/SKILL.md +69 -0
- package/.claude/skills/dev/SKILL.md +49 -0
- package/.claude/skills/feedback/SKILL.md +32 -0
- package/.claude/skills/figma-design-sync/SKILL.md +74 -0
- package/.claude/skills/goal-review/SKILL.md +89 -0
- package/.claude/skills/idea-triage/SKILL.md +144 -0
- package/.claude/skills/ideate/SKILL.md +82 -0
- package/.claude/skills/merge-mode/SKILL.md +169 -0
- package/.claude/skills/new-project/SKILL.md +108 -0
- package/.claude/skills/otb-character-review/SKILL.md +71 -0
- package/.claude/skills/otb-design-review/SKILL.md +47 -0
- package/.claude/skills/otb-feedback-capture/SKILL.md +45 -0
- package/.claude/skills/otb-figma-sync/SKILL.md +54 -0
- package/.claude/skills/otb-tile-generate/SKILL.md +45 -0
- package/.claude/skills/paint/SKILL.md +70 -0
- package/.claude/skills/planning-session/SKILL.md +299 -0
- package/.claude/skills/priority-session/SKILL.md +134 -0
- package/.claude/skills/read-session-export/SKILL.md +58 -0
- package/.claude/skills/recall/SKILL.md +52 -0
- package/.claude/skills/session-handoff/SKILL.md +46 -0
- package/.claude/skills/status/SKILL.md +33 -0
- package/.devcontainer/Dockerfile +69 -0
- package/.devcontainer/README.md +73 -0
- package/.devcontainer/devcontainer-lock.json +19 -0
- package/.devcontainer/devcontainer.json +93 -0
- package/.devcontainer/healthcheck.sh +84 -0
- package/.devcontainer/init-firewall.sh +198 -0
- package/.devcontainer/post-create.sh +153 -0
- package/.dockerignore +36 -0
- package/.env.local.example +32 -0
- package/.gitattributes +83 -0
- package/.gitignore +91 -0
- package/CLAUDE.md +242 -0
- package/CODE_OF_CONDUCT.md +46 -0
- package/CONTRIBUTING.md +51 -0
- package/Dockerfile +46 -0
- package/GOVERNANCE.md +44 -0
- package/LICENSE +661 -0
- package/README.md +88 -0
- package/bin/bongos.js +222 -0
- package/clients/bongos-client/README.md +48 -0
- package/clients/bongos-client/bongos-client.global.js +617 -0
- package/clients/bongos-client/examples/hello-world.mjs +62 -0
- package/clients/bongos-client/index.cjs +619 -0
- package/clients/bongos-client/index.d.ts +793 -0
- package/clients/bongos-client/index.mjs +614 -0
- package/clients/bongos-client/package.json +32 -0
- package/config/branding.neutral.json +60 -0
- package/config/design-tokens.neutral.json +51 -0
- package/config/design-tokens.schema.json +96 -0
- package/config/modules.neutral.json +9 -0
- package/docker-compose.yml +52 -0
- package/docker-entrypoint.sh +30 -0
- package/docs/adr/0001-stack-choice-single-vps.md +45 -0
- package/docs/adr/0002-digitalocean-over-hetzner.md +27 -0
- package/docs/adr/0003-cloudflare-origin-cert-over-letsencrypt.md +35 -0
- package/docs/adr/0004-amazonprimea-name-and-trademark-acceptance.md +45 -0
- package/docs/adr/0005-invisible-other-players-in-v1.md +37 -0
- package/docs/adr/0006-singleton-worldroom-plus-queueroom.md +30 -0
- package/docs/adr/0007-persistent-identity-via-localstorage-uuid.md +31 -0
- package/docs/adr/0008-family-based-tile-generation.md +86 -0
- package/docs/adr/0008-google-chat-oauth-user-auth.md +37 -0
- package/docs/adr/0009-autotile-architecture.md +181 -0
- package/docs/adr/0010-pms-architecture.md +70 -0
- package/docs/adr/0011-terrain-id-rendering-model.md +174 -0
- package/docs/adr/0012-ground-object-cell-split.md +208 -0
- package/docs/adr/0013-paths-as-object-overlays-with-autotile-dispatch.md +158 -0
- package/docs/adr/0014-families-canonical-over-vocabulary.md +103 -0
- package/docs/adr/0015-task-dependencies-and-auto-promotion.md +125 -0
- package/docs/adr/0016-trust-boundary-server-enforced-permissions.md +132 -0
- package/docs/adr/0017-code-simplification-and-repo-cleanliness.md +74 -0
- package/docs/adr/0018-three-rank-model-goes-live.md +97 -0
- package/docs/adr/0019-red-team-bounty-payout-table.md +52 -0
- package/docs/adr/0020-security-model-public-stub.md +70 -0
- package/docs/adr/0021-per-builder-skill-model-preferences.md +99 -0
- package/docs/adr/0022-secrets-policy.md +124 -0
- package/docs/adr/0023-kind-multipliers-and-idea-bonus.md +118 -0
- package/docs/adr/0024-cloneable-repo-local-first-memory.md +277 -0
- package/docs/adr/0024-multi-agent-system-architecture.md +125 -0
- package/docs/adr/0025-offsite-backup-vendor-digitalocean-spaces.md +59 -0
- package/docs/adr/0025-structured-criterion-task-link.md +44 -0
- package/docs/adr/0026-bfg-memory-hygiene-and-cross-builder-learning.md +117 -0
- package/docs/adr/0027-bfg-session-inefficiency-evaluator.md +170 -0
- package/docs/adr/0028-honest-llm-spend-accounting.md +109 -0
- package/docs/adr/0029-status-page-outage-resilience.md +59 -0
- package/docs/adr/0030-builders-hall-live-updates.md +59 -0
- package/docs/adr/0031-cloud-dev-environments-for-builders.md +222 -0
- package/docs/adr/0032-discord-mirror-of-gds.md +50 -0
- package/docs/adr/0033-discord-bot-service-principal.md +82 -0
- package/docs/adr/0034-thetes-graduated-newcomer-rank.md +53 -0
- package/docs/adr/0035-builder-onboarding-three-paths.md +128 -0
- package/docs/adr/0036-builders-subdomain-and-ui-reorg.md +40 -0
- package/docs/adr/0037-discord-channel-management.md +51 -0
- package/docs/adr/0038-chromebook-ttyd-cloudflare-tunnel.md +111 -0
- package/docs/adr/0039-setup-first-onboarding-ux.md +49 -0
- package/docs/adr/0040-remote-control-default-browser-onramp.md +47 -0
- package/docs/adr/0041-temporary-grader-bypass-killswitch.md +40 -0
- package/docs/adr/0042-builder-self-deploy-ci-auto-merge.md +82 -0
- package/docs/adr/0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md +74 -0
- package/docs/adr/0044-mediterranean-palette-replacement.md +73 -0
- package/docs/adr/0044-per-box-live-game-preview.md +57 -0
- package/docs/adr/0045-devbox-desktop-app.md +133 -0
- package/docs/adr/0046-sandbox-first-review-gate.md +72 -0
- package/docs/adr/0047-discord-bugs-intake-anti-abuse.md +36 -0
- package/docs/adr/0048-works-in-progress-ia-split.md +32 -0
- package/docs/adr/0049-split-parallel-safety-contract.md +46 -0
- package/docs/adr/0050-device-flow-admission-invite-gated-by-default.md +43 -0
- package/docs/adr/0051-full-session-transcript-corpus.md +57 -0
- package/docs/adr/0052-sandbox-for-everyone-game-only-preview.md +70 -0
- package/docs/adr/0053-scoped-dev-box-session.md +55 -0
- package/docs/adr/0054-session-token-reward-cost-plus.md +63 -0
- package/docs/adr/0055-server-mediated-branch-publish.md +47 -0
- package/docs/adr/0056-prod-deploy-script-mirror-and-healthcheck-retry.md +62 -0
- package/docs/adr/0057-container-cost-ledger.md +28 -0
- package/docs/adr/0057-discord-archon-approval-channels.md +64 -0
- package/docs/adr/0058-automatic-gate-surface-gatekeeper.md +64 -0
- package/docs/adr/0059-single-approval-remove-devbox-approval-gate.md +37 -0
- package/docs/adr/0060-gds-retrieval-layer.md +97 -0
- package/docs/adr/0061-context-layer-decomposition.md +61 -0
- package/docs/adr/0062-medusa-instance-model-decoupling.md +107 -0
- package/docs/adr/0063-generated-repo-map-symbol-skeleton.md +44 -0
- package/docs/adr/0064-rename-medusa-to-cloud-bongos.md +49 -0
- package/docs/adr/0065-agpl-nonprofit-ai-first-governance.md +69 -0
- package/docs/adr/0066-generated-file-map-sections.md +51 -0
- package/docs/adr/0067-session-start-fast-forward-pull.md +43 -0
- package/docs/adr/0068-shared-art-key-for-newcomers.md +38 -0
- package/docs/adr/0069-hall-live-channel-sse-decouple.md +35 -0
- package/docs/adr/0070-deterministic-session-card-delivery.md +44 -0
- package/docs/adr/0071-box-confirm-before-destroyed-and-drift-reconcile.md +59 -0
- package/docs/adr/0072-bongos-app-mac-signed-first-windows-deferred.md +35 -0
- package/docs/adr/0072-dev-box-code-staleness-visibility.md +39 -0
- package/docs/adr/0073-builder-needs-signal-and-byok-gemini-key.md +64 -0
- package/docs/adr/0073-secrets-scan-exclude-uri-detector.md +37 -0
- package/docs/adr/0074-memory-map-stays-light.md +32 -0
- package/docs/adr/0075-per-system-cost-attribution.md +37 -0
- package/docs/adr/0076-in-session-deterministic-compaction.md +58 -0
- package/docs/adr/0077-content-addressed-llm-cache.md +32 -0
- package/docs/adr/0078-deterministic-first-cron.md +48 -0
- package/docs/adr/0079-value-gated-autonomous-engagement.md +39 -0
- package/docs/adr/0080-llm-cache-api-transport-and-trust-model.md +46 -0
- package/docs/adr/0081-tool-agnostic-design-layer.md +62 -0
- package/docs/adr/0082-productized-key-storage-provisioning.md +32 -0
- package/docs/adr/0082-server-side-merge-conflict-auto-resolution.md +55 -0
- package/docs/adr/0083-modular-architecture-strangler-build-plan.md +143 -0
- package/docs/adr/0084-auto-derived-per-task-rank-floor.md +86 -0
- package/docs/adr/0085-remove-default-per-builder-spend-cap.md +39 -0
- package/docs/adr/0086-goal-scoped-work-hierarchy.md +123 -0
- package/docs/adr/0087-bongos-app-architecture-and-handoff-contract.md +49 -0
- package/docs/adr/0087-compete-on-governance-not-tooling-cursor.md +65 -0
- package/docs/adr/0088-consistent-character-generative-animation.md +169 -0
- package/docs/adr/0089-modular-multi-model-adversarial-grader.md +179 -0
- package/docs/adr/0090-metic-task-authoring.md +73 -0
- package/docs/adr/0091-bounding-the-kernel-and-db-carve.md +106 -0
- package/docs/adr/0092-hosting-module-and-on-prem-target.md +117 -0
- package/docs/adr/0093-tranche-2-core-carve-sequence.md +72 -0
- package/docs/adr/0094-repo-atlas-self-drawing-codebase-map.md +49 -0
- package/docs/adr/0095-borrowed-memory-and-retrieval-concepts.md +65 -0
- package/docs/adr/0095-cross-agent-context-management.md +58 -0
- package/docs/adr/0096-require-reward-before-workable.md +209 -0
- package/docs/adr/0097-one-active-claim-per-session-and-worktree-binding.md +46 -0
- package/docs/adr/0097-retroactive-reward-backfill.md +124 -0
- package/docs/adr/0098-public-mirror-publish-manifest.md +92 -0
- package/docs/adr/0099-delayed-redacted-mirror-export.md +55 -0
- package/docs/adr/0100-two-repo-instance-model.md +60 -0
- package/docs/adr/0101-goal-hierarchy-phase-5-judge-membership-reward.md +90 -0
- package/docs/adr/0102-finish-bounding-the-kernel.md +36 -0
- package/docs/adr/0103-core-first-extraction-cloud-bongos-trunk.md +70 -0
- package/docs/adr/0103-gdsv4-bongos-consolidation.md +28 -0
- package/docs/adr/0104-trust-gds-api-channel-in-auto-mode.md +42 -0
- package/docs/adr/0105-instance-seed-migrations-out-of-core.md +47 -0
- package/docs/adr/0106-goal-owner-manager-authority.md +84 -0
- package/docs/adr/0107-module-upstreaming-contribution-to-core-catalog.md +83 -0
- package/docs/adr/0108-instance-composition-configurable-root.md +87 -0
- package/docs/adr/0109-self-describing-openapi-and-hosted-docs.md +44 -0
- package/docs/adr/0110-untrack-whole-file-generated-nav-docs.md +49 -0
- package/docs/adr/0111-instance-hosting-provisioning-module.md +135 -0
- package/docs/adr/0112-private-goals-invitations-join-requests.md +72 -0
- package/docs/adr/0113-sandbox-studio-descope-superseded-by-0044-0052.md +41 -0
- package/docs/adr/0114-instance-docs-discovery-contract.md +32 -0
- package/docs/adr/0115-scheduled-routines-portability.md +31 -0
- package/docs/adr/0116-api-error-envelope-and-code-taxonomy.md +62 -0
- package/docs/adr/0117-api-versioning-and-deprecation-policy.md +50 -0
- package/docs/adr/0118-api-contract-source-of-truth-code-first.md +47 -0
- package/docs/adr/0119-api-pagination-contract.md +34 -0
- package/docs/adr/0120-pay-on-land-and-builder-owned-rebase-gate.md +108 -0
- package/docs/adr/0121-greenfield-vs-brownfield-onboarding-adopt-existing-repo.md +97 -0
- package/docs/adr/0122-onboarding-diagram-renders-deploy-rendered-off-git.md +43 -0
- package/docs/adr/0123-box-idle-sweep-autosave-before-destroy.md +36 -0
- package/docs/adr/0124-typed-api-response-bodies.md +37 -0
- package/docs/adr/0125-control-plane-scaffolds-standalone-instance-repo.md +36 -0
- package/docs/adr/0126-dedicated-cloudbongos-control-plane-droplet.md +30 -0
- package/docs/adr/0127-cross-box-fleet-observability.md +64 -0
- package/docs/adr/0128-provisioning-runner-privilege-and-db-auth-model.md +46 -0
- package/docs/adr/0129-cloudbongos-control-plane-pull-deploy.md +34 -0
- package/docs/adr/0130-provision-remote-exec-over-ssh.md +61 -0
- package/docs/adr/0131-rank-scoped-skill-visibility.md +47 -0
- package/docs/adr/0132-cohost-fleet-control-plane-migration.md +54 -0
- package/docs/adr/0133-github-app-manifest-onboarding-signin.md +42 -0
- package/docs/adr/0134-private-first-npm-distribution.md +38 -0
- package/docs/adr/README.md +208 -0
- package/docs/api/openapi.json +13720 -0
- package/docs/api-reference.md +437 -0
- package/docs/architecture.md +244 -0
- package/docs/branding-contract.md +66 -0
- package/docs/branding-fill-prompt.md +25 -0
- package/docs/canonical-permissions.md +241 -0
- package/docs/design/container-exterior-tiles.md +49 -0
- package/docs/design/container-exterior.md +81 -0
- package/docs/design/container-interior.md +77 -0
- package/docs/design/modular-architecture/00-research-report.md +107 -0
- package/docs/design/modular-architecture/01-architecture.md +125 -0
- package/docs/design/modular-architecture/02-module-map.md +116 -0
- package/docs/design/modular-architecture/03-builder-flows.md +104 -0
- package/docs/design/modular-architecture/04-module-lifecycle.md +62 -0
- package/docs/design/modular-architecture/README.md +27 -0
- package/docs/design/vanilla-hall-ui-redesign-scope.md +284 -0
- package/docs/design/world-map-scroll.md +41 -0
- package/docs/design-contract.md +320 -0
- package/docs/file-map.md +418 -0
- package/docs/handoff-template.md +92 -0
- package/docs/modules-contract.md +293 -0
- package/docs/onboarding/browser-terminal-guide.md +73 -0
- package/docs/onboarding/diagrams/01-task-lifecycle.mmd +28 -0
- package/docs/onboarding/diagrams/02-rank-ladder.mmd +54 -0
- package/docs/onboarding/diagrams/03-drachmae-karma.mmd +37 -0
- package/docs/onboarding/diagrams/04-architecture.mmd +51 -0
- package/docs/onboarding/diagrams/05-versioning.mmd +29 -0
- package/docs/onboarding/diagrams/README.md +94 -0
- package/docs/onboarding/diagrams/assertions.json +170 -0
- package/docs/onboarding/diagrams/puppeteer-config.json +1 -0
- package/docs/onboarding/diagrams/render-config.json +9 -0
- package/docs/onboarding/drachmae-and-karma.md +178 -0
- package/docs/onboarding/primer.md +202 -0
- package/docs/project-context.template.md +67 -0
- package/docs/recipes/README.md +35 -0
- package/docs/recipes/audit-replay.md +100 -0
- package/docs/recipes/bongos-cli-release.md +66 -0
- package/docs/recipes/builder-box-lifecycle.md +152 -0
- package/docs/recipes/claude-design-loop.md +143 -0
- package/docs/recipes/claude-gemini-bongos-doors.md +155 -0
- package/docs/recipes/cloudbongos-staging-gate.md +139 -0
- package/docs/recipes/cloudbongos-standup.md +111 -0
- package/docs/recipes/devbox-app-release.md +93 -0
- package/docs/recipes/devbox-app-windows-test.md +128 -0
- package/docs/recipes/failed-ship-recovery-proof.md +102 -0
- package/docs/recipes/figma-design-loop.md +129 -0
- package/docs/recipes/gds-db-backup.md +255 -0
- package/docs/recipes/instance-deploy.md +37 -0
- package/docs/recipes/managed-settings-remote-control.md +416 -0
- package/docs/recipes/memory-backup.md +71 -0
- package/docs/recipes/memory-sync-conflicts.md +98 -0
- package/docs/recipes/multi-builder-merge.md +78 -0
- package/docs/recipes/ops-gotchas.md +212 -0
- package/docs/recipes/overnight-builder.md +53 -0
- package/docs/recipes/packaging-the-core.md +49 -0
- package/docs/recipes/parallel-load-results-2026-05-30.md +63 -0
- package/docs/recipes/parallel-load-test.md +32 -0
- package/docs/recipes/pixel-art-pipeline.md +411 -0
- package/docs/recipes/private-npm-distribution.md +79 -0
- package/docs/recipes/search-index-ingestion.md +67 -0
- package/docs/recipes/self-host.md +60 -0
- package/docs/recipes/ship-and-regrade.md +72 -0
- package/docs/recipes/staging-data.md +50 -0
- package/docs/recipes/staging-environment.md +215 -0
- package/docs/recipes/upgrading-the-core.md +58 -0
- package/docs/research/cursor-competitive-analysis.md +255 -0
- package/docs/research/llm-model-agnostic-and-cheaper-grader.md +227 -0
- package/migrations/003_pms.sql +284 -0
- package/migrations/004_pms_cost_idempotency.sql +13 -0
- package/migrations/005_pms_smoke_filter.sql +44 -0
- package/migrations/006_pms_v2.sql +378 -0
- package/migrations/007_pms_v2_hierarchy_trigger.sql +59 -0
- package/migrations/008_pms_v2_migration_allocator.sql +27 -0
- package/migrations/009_pms_v2_blockers_table.sql +68 -0
- package/migrations/010_uptime.sql +29 -0
- package/migrations/011_backfill_v2_v3_done_when.sql +20 -0
- package/migrations/012_pms_v2_task_lifecycle_states.sql +82 -0
- package/migrations/013_claim_locking.sql +22 -0
- package/migrations/014_pms_task_discipline.sql +86 -0
- package/migrations/015_pms_estimation_calibration.sql +140 -0
- package/migrations/016_pms_task_grades.sql +60 -0
- package/migrations/017_version_progress_exclude_abandoned.sql +49 -0
- package/migrations/019_rename_pms_v3_to_gds_v3.sql +65 -0
- package/migrations/020_task_dependencies.sql +99 -0
- package/migrations/021_v3_renumber_and_deps.sql +224 -0
- package/migrations/022_v3_reconcile_dep_gated_status.sql +41 -0
- package/migrations/023_pms_rank.sql +30 -0
- package/migrations/025_builder_exit_status.sql +15 -0
- package/migrations/027_builders_preferred_disciplines.sql +46 -0
- package/migrations/028_tasks_parallel_safe.sql +71 -0
- package/migrations/029_rank_three_live.sql +32 -0
- package/migrations/030_vulnerability_reports.sql +61 -0
- package/migrations/031_reward_simplification.sql +57 -0
- package/migrations/032_repo_health_snapshots.sql +56 -0
- package/migrations/033_audit_log.sql +64 -0
- package/migrations/034_lifecycle_breakdown_leaf_only.sql +62 -0
- package/migrations/035_auth_token_hygiene.sql +66 -0
- package/migrations/037_builder_skill_model_prefs.sql +44 -0
- package/migrations/038_task_override_requests.sql +51 -0
- package/migrations/039_newcomer_friendly_column.sql +124 -0
- package/migrations/040_builder_karma.sql +58 -0
- package/migrations/041_kind_multipliers_and_idea_bonus.sql +42 -0
- package/migrations/042_criterion_proposal_workflow.sql +78 -0
- package/migrations/043_builder_onboarding_observability.sql +66 -0
- package/migrations/044_tasks_requires_rank.sql +97 -0
- package/migrations/045_builder_onboarding_state.sql +147 -0
- package/migrations/046_cost_log_builder_attribution.sql +42 -0
- package/migrations/054_builder_memory.sql +108 -0
- package/migrations/055_task_criteria.sql +90 -0
- package/migrations/058_peer_votes.sql +41 -0
- package/migrations/059_onboarding_pick_disciplines.sql +59 -0
- package/migrations/060_access_requests.sql +46 -0
- package/migrations/061_backfill_override_ship_attribution.sql +29 -0
- package/migrations/062_session_records.sql +34 -0
- package/migrations/063_session_records_tool_errors_idx.sql +11 -0
- package/migrations/064_grade_attempts.sql +18 -0
- package/migrations/065_bfg_principal.sql +58 -0
- package/migrations/066_live_notify_triggers.sql +69 -0
- package/migrations/067_builder_boxes.sql +117 -0
- package/migrations/067_discord_bot_foundation.sql +69 -0
- package/migrations/068_thetes_requires_rank.sql +27 -0
- package/migrations/069_builder_ssh_keys.sql +66 -0
- package/migrations/070_box_intents.sql +101 -0
- package/migrations/071_box_first_provision_approval.sql +46 -0
- package/migrations/072_onboarding_ship_three_remove_primer.sql +80 -0
- package/migrations/073_box_terminal_access.sql +46 -0
- package/migrations/075_builder_sound_prefs.sql +28 -0
- package/migrations/078_box_claude_active.sql +22 -0
- package/migrations/079_box_first_connected_at.sql +20 -0
- package/migrations/081_tasks_needs_migration.sql +34 -0
- package/migrations/084_tasks_security_sensitive.sql +24 -0
- package/migrations/085_security_engagement_docs.sql +34 -0
- package/migrations/086_rename_disciplines.sql +125 -0
- package/migrations/088_builders_anthropic_link.sql +28 -0
- package/migrations/089_builders_monthly_budget.sql +19 -0
- package/migrations/090_box_scoped_sessions.sql +38 -0
- package/migrations/091_session_token_reward.sql +44 -0
- package/migrations/093_tasks_sandbox_review.sql +22 -0
- package/migrations/102_remove_box_first_provision_approval.sql +58 -0
- package/migrations/103_search_chunks.sql +90 -0
- package/migrations/104_builder_box_blocked.sql +34 -0
- package/migrations/105_box_host_keys.sql +35 -0
- package/migrations/111_medusa_customer0_framing.sql +35 -0
- package/migrations/112_drop_track_check.sql +25 -0
- package/migrations/113_merge_lease.sql +16 -0
- package/migrations/114_cloudbongos_rename_live_strings.sql +32 -0
- package/migrations/118_currency_label_decoupling.sql +23 -0
- package/migrations/119_builder_behavior_prefs.sql +31 -0
- package/migrations/121_box_code_version.sql +37 -0
- package/migrations/122_builder_gemini_key.sql +30 -0
- package/migrations/123_cost_log_tiers.sql +33 -0
- package/migrations/124_cost_baseline.sql +45 -0
- package/migrations/125_llm_cache.sql +54 -0
- package/migrations/126_autonomy_runs.sql +33 -0
- package/migrations/143_cost_calibration.sql +63 -0
- package/migrations/145_backfill_task_requires_rank.sql +84 -0
- package/migrations/160_goal_tier.sql +88 -0
- package/migrations/163_polymorphic_dependencies.sql +187 -0
- package/migrations/164_event_sound_prefs.sql +20 -0
- package/migrations/165_task_module_key.sql +15 -0
- package/migrations/171_claims_published_head_sha.sql +24 -0
- package/migrations/174_close_orphaned_claims_on_terminal_tasks.sql +30 -0
- package/migrations/175_task_grades_diff_hash.sql +9 -0
- package/migrations/176_promotion_respects_open_blockers.sql +58 -0
- package/migrations/176_ui_discipline.sql +40 -0
- package/migrations/177_require_reward_before_workable.sql +76 -0
- package/migrations/178_reward_gate_auto_assign_revert_autopromote.sql +61 -0
- package/migrations/179_search_chunk_usefulness.sql +33 -0
- package/migrations/180_one_active_claim_per_session.sql +54 -0
- package/migrations/181_cost_log_skill_name.sql +33 -0
- package/migrations/184_claim_release_requested.sql +25 -0
- package/migrations/185_module_upstreaming_goal_wiring.sql +59 -0
- package/migrations/187_goal_sort_order.sql +30 -0
- package/migrations/187_tasks_kind_check_add_verify.sql +21 -0
- package/migrations/README.md +88 -0
- package/migrations/core_188_goal_visibility_and_membership_requests.sql +71 -0
- package/migrations/core_189_core_upgrades_ledger.sql +37 -0
- package/migrations/core_189_credit_log_task_id_index.sql +19 -0
- package/migrations/core_190_rebuild_claimable_task_views.sql +71 -0
- package/migrations/instance/018_pms_v3_planning_seed.sql +131 -0
- package/migrations/instance/080_gds_v4_planning_seed.sql +75 -0
- package/migrations/instance/110_medusa_planning_seed.sql +70 -0
- package/migrations/instance/120_bongos_v1_planning_seed.sql +69 -0
- package/migrations/instance/144_bongos_v1_module_system_criterion.sql +26 -0
- package/migrations/instance/159_bongos_v1_goal_hierarchy_criterion.sql +29 -0
- package/migrations/instance/172_v2_world_planning_seed.sql +163 -0
- package/migrations/instance/173_bongos_v1_c7_core_modularized.sql +33 -0
- package/migrations/instance/182_gdsv4_bongos_consolidation.sql +132 -0
- package/migrations/instance/183_gdsv4_carryover_themed_goals.sql +116 -0
- package/migrations/instance/186_bongos_v1_governance_planning_seed.sql +69 -0
- package/modules/autonomy/CLAUDE.md +49 -0
- package/modules/autonomy/db.js +50 -0
- package/modules/autonomy/module.json +13 -0
- package/modules/autonomy/pollers/routine-timers.js +146 -0
- package/modules/autonomy/routes/autonomy.js +37 -0
- package/modules/builder-settings/CLAUDE.md +58 -0
- package/modules/builder-settings/builder-needs.js +115 -0
- package/modules/builder-settings/db.js +168 -0
- package/modules/builder-settings/display-name.js +84 -0
- package/modules/builder-settings/event-sound-prefs.js +169 -0
- package/modules/builder-settings/interaction-prefs.js +201 -0
- package/modules/builder-settings/model-alloc-prefs.js +147 -0
- package/modules/builder-settings/module.json +10 -0
- package/modules/builder-settings/render-prefs.js +103 -0
- package/modules/builder-settings/routes/settings.js +417 -0
- package/modules/builder-settings/settings.js +52 -0
- package/modules/builder-settings/skill-prefs.js +196 -0
- package/modules/builder-settings/sound-prefs.js +178 -0
- package/modules/builder-settings/wandering-prefs.js +282 -0
- package/modules/dev-box/CLAUDE.md +38 -0
- package/modules/dev-box/box-access.js +275 -0
- package/modules/dev-box/box-credential.js +94 -0
- package/modules/dev-box/box-onboard.js +486 -0
- package/modules/dev-box/boxes.js +842 -0
- package/modules/dev-box/db.js +39 -0
- package/modules/dev-box/module.json +14 -0
- package/modules/dev-box/routes/box.js +977 -0
- package/modules/discord/CLAUDE.md +50 -0
- package/modules/discord/auth.js +54 -0
- package/modules/discord/bug-attachments.js +210 -0
- package/modules/discord/db.js +96 -0
- package/modules/discord/discord-approvals.js +145 -0
- package/modules/discord/discord-audit.js +29 -0
- package/modules/discord/discord-bot.js +545 -0
- package/modules/discord/discord-bugs.js +257 -0
- package/modules/discord/discord-channels.js +412 -0
- package/modules/discord/discord-inbound.js +147 -0
- package/modules/discord/discord-message-buffer.js +54 -0
- package/modules/discord/discord-reaction.js +186 -0
- package/modules/discord/discord-role-sync.js +318 -0
- package/modules/discord/module.json +14 -0
- package/modules/discord/pollers/discord-bot.js +19 -0
- package/modules/discord/routes/bug-attachments.js +44 -0
- package/modules/discord/routes/discord.js +102 -0
- package/modules/discord/ship-broadcast.js +78 -0
- package/modules/discord/webhook.js +74 -0
- package/modules/economy/CLAUDE.md +48 -0
- package/modules/economy/achievements.js +594 -0
- package/modules/economy/cost-classify.js +331 -0
- package/modules/economy/cost-summary-shape.js +90 -0
- package/modules/economy/cost.js +438 -0
- package/modules/economy/credits.js +430 -0
- package/modules/economy/migrations/economy_001_fix_gds_shipper_description.sql +91 -0
- package/modules/economy/module.json +10 -0
- package/modules/economy/reward.js +61 -0
- package/modules/economy/routes/cost.js +97 -0
- package/modules/economy/routes/leaderboard.js +26 -0
- package/modules/economy/routes/reward.js +42 -0
- package/modules/economy/streak.js +285 -0
- package/modules/grading/CLAUDE.md +42 -0
- package/modules/grading/db.js +39 -0
- package/modules/grading/grader-rubric.json +151 -0
- package/modules/grading/grader-workers/efficiency.js +213 -0
- package/modules/grading/grader-workers/extract-json.js +80 -0
- package/modules/grading/grader-workers/fence.js +100 -0
- package/modules/grading/grader-workers/hacker.js +239 -0
- package/modules/grading/grader-workers/index.js +183 -0
- package/modules/grading/grader-workers/narc.js +207 -0
- package/modules/grading/grader-workers/quality.js +198 -0
- package/modules/grading/grader-workers/rubric.js +20 -0
- package/modules/grading/grader-workers/worker-prompt.js +89 -0
- package/modules/grading/grader-workers/worker-verdict.js +50 -0
- package/modules/grading/grader.js +1790 -0
- package/modules/grading/module.json +12 -0
- package/modules/grading/routes/grade.js +51 -0
- package/modules/hall-ui/CLAUDE.md +61 -0
- package/modules/hall-ui/module.json +14 -0
- package/modules/hall-ui/public/atlas.html +180 -0
- package/modules/hall-ui/public/atlas.js +336 -0
- package/modules/hall-ui/public/box-panel.js +423 -0
- package/modules/hall-ui/public/brand-apply.js +117 -0
- package/modules/hall-ui/public/builders.js +3028 -0
- package/modules/hall-ui/public/chime.wav +0 -0
- package/modules/hall-ui/public/copy-on-click.js +174 -0
- package/modules/hall-ui/public/cursors/arrow.png +0 -0
- package/modules/hall-ui/public/cursors/hand-pointer.png +0 -0
- package/modules/hall-ui/public/cursors/magnifier-out.png +0 -0
- package/modules/hall-ui/public/cursors/magnifier.png +0 -0
- package/modules/hall-ui/public/diagram-viewer.css +125 -0
- package/modules/hall-ui/public/diagram-viewer.js +330 -0
- package/modules/hall-ui/public/diagrams.html +113 -0
- package/modules/hall-ui/public/dom-utils.js +212 -0
- package/modules/hall-ui/public/drachmae.html +68 -0
- package/modules/hall-ui/public/drachmae.js +136 -0
- package/modules/hall-ui/public/gate.html +143 -0
- package/modules/hall-ui/public/gate.js +228 -0
- package/modules/hall-ui/public/goals-page.js +1297 -0
- package/modules/hall-ui/public/goals.html +376 -0
- package/modules/hall-ui/public/goals.js +119 -0
- package/modules/hall-ui/public/hall-widgets.js +189 -0
- package/modules/hall-ui/public/harbor.html +167 -0
- package/modules/hall-ui/public/harbor.js +335 -0
- package/modules/hall-ui/public/index.html +116 -0
- package/modules/hall-ui/public/instances-panel.js +172 -0
- package/modules/hall-ui/public/md-reader.js +234 -0
- package/modules/hall-ui/public/modules.html +119 -0
- package/modules/hall-ui/public/modules.js +154 -0
- package/modules/hall-ui/public/new-project-wizard.js +186 -0
- package/modules/hall-ui/public/not-ready.html +48 -0
- package/modules/hall-ui/public/pair.html +119 -0
- package/modules/hall-ui/public/pair.js +132 -0
- package/modules/hall-ui/public/primer.css +404 -0
- package/modules/hall-ui/public/primer.html +85 -0
- package/modules/hall-ui/public/primer.js +641 -0
- package/modules/hall-ui/public/profile.html +85 -0
- package/modules/hall-ui/public/profile.js +236 -0
- package/modules/hall-ui/public/ranks.html +69 -0
- package/modules/hall-ui/public/ranks.js +206 -0
- package/modules/hall-ui/public/roadmap.html +209 -0
- package/modules/hall-ui/public/roadmap.js +375 -0
- package/modules/hall-ui/public/sessions.html +92 -0
- package/modules/hall-ui/public/sessions.js +222 -0
- package/modules/hall-ui/public/settings.html +640 -0
- package/modules/hall-ui/public/settings.js +1219 -0
- package/modules/hall-ui/public/shell.js +495 -0
- package/modules/hall-ui/public/style.css +1748 -0
- package/modules/hall-ui/public/task-detail.js +253 -0
- package/modules/hall-ui/public/task.html +83 -0
- package/modules/hall-ui/public/task.js +326 -0
- package/modules/hall-ui/public/watch.html +333 -0
- package/modules/hall-ui/public/watch.js +859 -0
- package/modules/hall-ui/public/work.html +469 -0
- package/modules/hall-ui/public/work.js +1292 -0
- package/modules/ideas/CLAUDE.md +37 -0
- package/modules/ideas/blockers.js +100 -0
- package/modules/ideas/inbox.js +459 -0
- package/modules/ideas/module.json +10 -0
- package/modules/ideas/routes/blockers.js +120 -0
- package/modules/ideas/routes/inbox.js +230 -0
- package/modules/lifecycle/CLAUDE.md +63 -0
- package/modules/lifecycle/conflict-resolve.js +436 -0
- package/modules/lifecycle/db.js +4970 -0
- package/modules/lifecycle/done-when.js +355 -0
- package/modules/lifecycle/github-push.js +969 -0
- package/modules/lifecycle/goal-conflicts.js +133 -0
- package/modules/lifecycle/hierarchy.js +104 -0
- package/modules/lifecycle/lifecycle.js +58 -0
- package/modules/lifecycle/merge-lock.js +261 -0
- package/modules/lifecycle/migrations/lifecycle_001_goal_first_leads.sql +28 -0
- package/modules/lifecycle/migrations/lifecycle_002_backfill_orphan_task_goals.sql +36 -0
- package/modules/lifecycle/module.json +13 -0
- package/modules/lifecycle/pollers/publish-reconciler.js +20 -0
- package/modules/lifecycle/publish-reconciler.js +418 -0
- package/modules/lifecycle/routes/analytics.js +63 -0
- package/modules/lifecycle/routes/claims.js +506 -0
- package/modules/lifecycle/routes/dependencies.js +82 -0
- package/modules/lifecycle/routes/done-when.js +136 -0
- package/modules/lifecycle/routes/gate-approvals.js +197 -0
- package/modules/lifecycle/routes/goals.js +1419 -0
- package/modules/lifecycle/routes/lifecycle.js +43 -0
- package/modules/lifecycle/routes/tasks.js +1703 -0
- package/modules/lifecycle/routes/versions.js +128 -0
- package/modules/lifecycle/ship-card.js +505 -0
- package/modules/lifecycle/ship-preflight.js +225 -0
- package/modules/lifecycle/task-classifier.js +512 -0
- package/modules/lifecycle/version-close.js +106 -0
- package/modules/memory/CLAUDE.md +40 -0
- package/modules/memory/learnings.js +275 -0
- package/modules/memory/memory.js +572 -0
- package/modules/memory/module.json +12 -0
- package/modules/memory/routes/learnings.js +90 -0
- package/modules/memory/routes/memory.js +916 -0
- package/modules/memory/routes/search.js +188 -0
- package/modules/memory/search-chunker.js +252 -0
- package/modules/memory/search.js +320 -0
- package/modules/onboarding/CLAUDE.md +55 -0
- package/modules/onboarding/approval-broadcast.js +59 -0
- package/modules/onboarding/db.js +54 -0
- package/modules/onboarding/module.json +10 -0
- package/modules/onboarding/newcomer-restock.js +212 -0
- package/modules/onboarding/onboarding-state.js +532 -0
- package/modules/onboarding/onboarding.js +508 -0
- package/modules/onboarding/port.js +63 -0
- package/modules/onboarding/routes/access-requests.js +208 -0
- package/modules/onboarding/routes/onboarding.js +54 -0
- package/modules/security/CLAUDE.md +44 -0
- package/modules/security/module.json +10 -0
- package/modules/security/routes/reports.js +251 -0
- package/modules/security/secret-scrub.js +201 -0
- package/modules/security/security.js +294 -0
- package/modules/sessions/CLAUDE.md +39 -0
- package/modules/sessions/bfg.js +357 -0
- package/modules/sessions/db.js +326 -0
- package/modules/sessions/module.json +10 -0
- package/modules/sessions/pulse.js +149 -0
- package/modules/sessions/routes/sessions.js +331 -0
- package/modules/status-ui/CLAUDE.md +47 -0
- package/modules/status-ui/module.json +14 -0
- package/modules/status-ui/public/README.md +29 -0
- package/modules/status-ui/public/cursors/arrow.png +0 -0
- package/modules/status-ui/public/cursors/hand-pointer.png +0 -0
- package/modules/status-ui/public/index.html +363 -0
- package/modules/status-ui/public/snapshots/.gitkeep +0 -0
- package/modules/status-ui/public/status.js +1375 -0
- package/modules/status-ui/public/style.css +1342 -0
- package/package-lock.json +975 -0
- package/package.json +28 -0
- package/public-docs/index.html +35 -0
- package/public-docs/redoc.standalone.js +1838 -0
- package/public-docs/redoc.standalone.js.LICENSE.txt +102 -0
- package/public-landing/buddha.png +0 -0
- package/public-landing/create.html +868 -0
- package/public-landing/index.html +168 -0
- package/scripts/bongos-mcp.js +28 -0
- package/scripts/cron/style_guide_audit.sh +134 -0
- package/scripts/discord/README.md +52 -0
- package/scripts/discord/lib.js +80 -0
- package/scripts/discord/post.js +51 -0
- package/scripts/gds/CLAUDE.md +144 -0
- package/scripts/gds/abandon.js +58 -0
- package/scripts/gds/adopt-detect.js +123 -0
- package/scripts/gds/adopt-import.js +111 -0
- package/scripts/gds/adopt-preflight.js +121 -0
- package/scripts/gds/api.js +78 -0
- package/scripts/gds/architect-audit.js +288 -0
- package/scripts/gds/art-stage.js +152 -0
- package/scripts/gds/audit-authorship.sh +243 -0
- package/scripts/gds/audit-deps.js +121 -0
- package/scripts/gds/audit-exports.js +128 -0
- package/scripts/gds/audit-replay.sh +161 -0
- package/scripts/gds/audit-ships.js +251 -0
- package/scripts/gds/autonomy-gate.js +135 -0
- package/scripts/gds/backfill-cost.js +165 -0
- package/scripts/gds/backfill-sessions.js +351 -0
- package/scripts/gds/backfill-task-rewards.js +408 -0
- package/scripts/gds/backup.js +94 -0
- package/scripts/gds/bfg-principal-token.js +65 -0
- package/scripts/gds/box-auth-check.js +160 -0
- package/scripts/gds/box-connect-lib.js +453 -0
- package/scripts/gds/box.js +1258 -0
- package/scripts/gds/build-bongos.js +94 -0
- package/scripts/gds/capture.js +123 -0
- package/scripts/gds/cf-tunnel.js +419 -0
- package/scripts/gds/ci-grade.js +82 -0
- package/scripts/gds/claim-recall.js +112 -0
- package/scripts/gds/claim.js +333 -0
- package/scripts/gds/classify-discipline.js +153 -0
- package/scripts/gds/claude-materialize.js +176 -0
- package/scripts/gds/cleanup-orphans.js +74 -0
- package/scripts/gds/cli-lib.js +518 -0
- package/scripts/gds/code.js +101 -0
- package/scripts/gds/codemod-rename-src-gds.js +145 -0
- package/scripts/gds/conductor-dispatch.js +426 -0
- package/scripts/gds/context-pack.js +228 -0
- package/scripts/gds/coreB-carve-proof.sh +716 -0
- package/scripts/gds/cost.js +47 -0
- package/scripts/gds/db-backup-nightly.sh +160 -0
- package/scripts/gds/db-backup-offsite.sh +152 -0
- package/scripts/gds/demote.js +40 -0
- package/scripts/gds/design-sync.js +62 -0
- package/scripts/gds/diagnose-achievements.js +118 -0
- package/scripts/gds/diagram-facts.js +319 -0
- package/scripts/gds/discipline-modes.json +25 -0
- package/scripts/gds/discord-channels.js +66 -0
- package/scripts/gds/do-api.js +176 -0
- package/scripts/gds/docs-entropy.js +403 -0
- package/scripts/gds/doctor.js +389 -0
- package/scripts/gds/feedback-latest.js +94 -0
- package/scripts/gds/fetch-art-key.js +106 -0
- package/scripts/gds/fetch-sound-prefs.js +88 -0
- package/scripts/gds/figma-design-sync.js +61 -0
- package/scripts/gds/fitness.js +1446 -0
- package/scripts/gds/gate-review.js +322 -0
- package/scripts/gds/gating.js +325 -0
- package/scripts/gds/gds-db-backup.service +24 -0
- package/scripts/gds/gds-db-backup.timer +20 -0
- package/scripts/gds/gds-db-offsite.service +29 -0
- package/scripts/gds/gds-db-offsite.timer +18 -0
- package/scripts/gds/gen-api-client.js +508 -0
- package/scripts/gds/gen-api-docs.js +1037 -0
- package/scripts/gds/gen-atlas.js +366 -0
- package/scripts/gds/gen-diagrams.js +608 -0
- package/scripts/gds/gen-file-map.js +196 -0
- package/scripts/gds/gen-repo-map.js +519 -0
- package/scripts/gds/gen-session-index.js +210 -0
- package/scripts/gds/git-merge-regen.js +147 -0
- package/scripts/gds/grade-smoke.js +205 -0
- package/scripts/gds/hooks/pre-push.js +169 -0
- package/scripts/gds/http-api-client.js +88 -0
- package/scripts/gds/init.js +903 -0
- package/scripts/gds/install-git-hooks.js +114 -0
- package/scripts/gds/key-card.js +213 -0
- package/scripts/gds/key-status.js +126 -0
- package/scripts/gds/land-watch.js +168 -0
- package/scripts/gds/learning-capture.js +145 -0
- package/scripts/gds/lib.sh +44 -0
- package/scripts/gds/linkify-refs.js +473 -0
- package/scripts/gds/local-preview-lib.js +159 -0
- package/scripts/gds/local-preview.js +95 -0
- package/scripts/gds/login.js +225 -0
- package/scripts/gds/main-audit.js +279 -0
- package/scripts/gds/me.js +88 -0
- package/scripts/gds/memory-map.js +174 -0
- package/scripts/gds/merge-lock.js +71 -0
- package/scripts/gds/migration-namespace.js +200 -0
- package/scripts/gds/mirror-lineage-check.js +319 -0
- package/scripts/gds/mirror-redact.js +305 -0
- package/scripts/gds/module.js +482 -0
- package/scripts/gds/newcomer-floor.config.json +13 -0
- package/scripts/gds/newcomer-floor.js +415 -0
- package/scripts/gds/newcomer-floor.templates.json +86 -0
- package/scripts/gds/newcomer-floor.test.js +235 -0
- package/scripts/gds/next-number.js +163 -0
- package/scripts/gds/oauth-secret.js +197 -0
- package/scripts/gds/onboard.js +217 -0
- package/scripts/gds/onboarding-analyze.js +226 -0
- package/scripts/gds/onboarding-config.js +178 -0
- package/scripts/gds/onboarding-ship.js +92 -0
- package/scripts/gds/package-core.js +684 -0
- package/scripts/gds/paste-token.js +131 -0
- package/scripts/gds/portability-smoke-art.sh +85 -0
- package/scripts/gds/portability-smoke-memory.sh +147 -0
- package/scripts/gds/provision.js +1324 -0
- package/scripts/gds/publish-manifest.js +307 -0
- package/scripts/gds/pulse.js +309 -0
- package/scripts/gds/push-main.js +45 -0
- package/scripts/gds/read-session-export.js +359 -0
- package/scripts/gds/reauth.js +149 -0
- package/scripts/gds/recall.js +135 -0
- package/scripts/gds/release.js +71 -0
- package/scripts/gds/render-ideas.js +173 -0
- package/scripts/gds/repo-metrics.js +363 -0
- package/scripts/gds/resolve-skill-model.js +57 -0
- package/scripts/gds/run-routine.js +197 -0
- package/scripts/gds/run-unit-tests.js +178 -0
- package/scripts/gds/sandbox-stage.js +653 -0
- package/scripts/gds/search-ingest-db.js +209 -0
- package/scripts/gds/search-ingest-md.js +225 -0
- package/scripts/gds/security-baseline-check.sh +180 -0
- package/scripts/gds/seed-adopt-tasks.js +75 -0
- package/scripts/gds/seed-api-contract-goal-tasks.js +141 -0
- package/scripts/gds/seed-bongos-app-tasks.js +294 -0
- package/scripts/gds/seed-bongos-coreB-tranche1-tasks.js +81 -0
- package/scripts/gds/seed-bongos-coreB-tranche2-tasks.js +100 -0
- package/scripts/gds/seed-bongos-goal-hierarchy-tasks.js +307 -0
- package/scripts/gds/seed-bongos-module-system-tasks.js +346 -0
- package/scripts/gds/seed-bongos-tasks.js +214 -0
- package/scripts/gds/seed-gds-v4-tasks.js +624 -0
- package/scripts/gds/seed-governance-tasks.js +340 -0
- package/scripts/gds/seed-medusa-tasks.js +440 -0
- package/scripts/gds/seed-module-upstreaming.js +219 -0
- package/scripts/gds/seed-productization-tasks.js +235 -0
- package/scripts/gds/seed-provisioning-tasks.js +83 -0
- package/scripts/gds/seed-staging.sh +104 -0
- package/scripts/gds/seed-v2-world-tasks.js +283 -0
- package/scripts/gds/seed-v3-tasks.js +1981 -0
- package/scripts/gds/session-cost.js +393 -0
- package/scripts/gds/session-digest.js +179 -0
- package/scripts/gds/session-eval.js +576 -0
- package/scripts/gds/session.js +404 -0
- package/scripts/gds/setup.js +504 -0
- package/scripts/gds/shell.js +100 -0
- package/scripts/gds/ship.js +3618 -0
- package/scripts/gds/smoke-batch-claim.sh +213 -0
- package/scripts/gds/smoke-batch-release.sh +296 -0
- package/scripts/gds/smoke-box.sh +150 -0
- package/scripts/gds/smoke-claim-consistency.sh +212 -0
- package/scripts/gds/smoke-dependencies.sh +84 -0
- package/scripts/gds/smoke-gds.js +125 -0
- package/scripts/gds/smoke-write.sh +168 -0
- package/scripts/gds/start.js +782 -0
- package/scripts/gds/status.js +365 -0
- package/scripts/gds/triage.js +366 -0
- package/scripts/gds/upgrade.js +421 -0
- package/scripts/gds/validate-design.js +254 -0
- package/scripts/gds/version-close.js +549 -0
- package/scripts/migrate.sh +183 -0
- package/scripts/migrate_cost_ledger.sh +178 -0
- package/scripts/public-mirror-export.js +291 -0
- package/scripts/render-diagrams.sh +88 -0
- package/scripts/security/dep-audit.js +276 -0
- package/scripts/setup-builder.js +274 -0
- package/scripts/setup-builder.sh +28 -0
- package/scripts/snapshots/backfill-history.mjs +292 -0
- package/scripts/snapshots/maybe-render-on-deploy.sh +66 -0
- package/scripts/snapshots/render-pre-art-eras.mjs +329 -0
- package/scripts/snapshots/render-world.mjs +322 -0
- package/scripts/status-mirror-sync.js +192 -0
- package/scripts/status-probe.mjs +185 -0
- package/server.js +212 -0
- package/src/asset-version.js +71 -0
- package/src/bongos/CLAUDE.md +64 -0
- package/src/bongos/api-errors.js +281 -0
- package/src/bongos/api-path-404.js +67 -0
- package/src/bongos/api-prefix.js +38 -0
- package/src/bongos/app-pair.js +172 -0
- package/src/bongos/auth.js +979 -0
- package/src/bongos/cascade-dispatch.js +123 -0
- package/src/bongos/db-kernel.js +252 -0
- package/src/bongos/db.js +911 -0
- package/src/bongos/goal-scope-check.js +120 -0
- package/src/bongos/hierarchy-config.js +189 -0
- package/src/bongos/live-channel.js +145 -0
- package/src/bongos/llm-cache.js +260 -0
- package/src/bongos/llm-pricing.js +220 -0
- package/src/bongos/metrics.js +286 -0
- package/src/bongos/middleware/audit.js +274 -0
- package/src/bongos/middleware/error-envelope.js +93 -0
- package/src/bongos/middleware/rate-limit.js +195 -0
- package/src/bongos/module-scope-map.js +271 -0
- package/src/bongos/optimizer.js +166 -0
- package/src/bongos/path-match.js +47 -0
- package/src/bongos/permission-path-check.js +248 -0
- package/src/bongos/pool.js +55 -0
- package/src/bongos/repo-info.js +91 -0
- package/src/bongos/route-rank-check.js +420 -0
- package/src/bongos/routes/CLAUDE.md +43 -0
- package/src/bongos/routes/_helpers.js +369 -0
- package/src/bongos/routes/audit-log.js +59 -0
- package/src/bongos/routes/auth.js +755 -0
- package/src/bongos/routes/backup.js +104 -0
- package/src/bongos/routes/builders.js +526 -0
- package/src/bongos/routes/healthz.js +16 -0
- package/src/bongos/routes/instance.js +129 -0
- package/src/bongos/routes/live.js +125 -0
- package/src/bongos/routes/llm-cache.js +119 -0
- package/src/bongos/routes/me.js +380 -0
- package/src/bongos/routes/modules.js +131 -0
- package/src/bongos/routes/optimizer.js +54 -0
- package/src/bongos/routes/public.js +476 -0
- package/src/bongos/routes/security.js +207 -0
- package/src/bongos/routes.js +166 -0
- package/src/bongos/secret-box.js +177 -0
- package/src/bongos/sensitive-surfaces.js +30 -0
- package/src/bongos/serve-internal.js +889 -0
- package/src/bongos/uptime-poller.js +90 -0
- package/src/bongos-downloads.js +70 -0
- package/src/branding.js +182 -0
- package/src/build-info.js +77 -0
- package/src/devbox-downloads.js +67 -0
- package/src/instance-config.js +200 -0
- package/src/module-api.js +366 -0
- package/src/module-loader/loader.js +268 -0
- package/src/module-loader/manifest-schema.js +140 -0
- package/src/module-loader/provenance.js +28 -0
- package/src/module-loader/semver.js +100 -0
- package/src/module-seams.js +291 -0
- package/src/modules.js +254 -0
- package/src/platform-server.js +135 -0
- package/src/ui/adapters/claude-design/index.js +333 -0
- package/src/ui/adapters/figma/index.js +328 -0
- package/tests/abandon_task.mjs +138 -0
- package/tests/achievements_reconcile.mjs +167 -0
- package/tests/adopt_detect.mjs +141 -0
- package/tests/adopt_import.mjs +132 -0
- package/tests/adopt_preflight.mjs +105 -0
- package/tests/anti_grid.mjs +89 -0
- package/tests/api_client.mjs +231 -0
- package/tests/api_docs.mjs +283 -0
- package/tests/api_error_envelope_buildcheck.mjs +56 -0
- package/tests/api_error_envelope_middleware.mjs +99 -0
- package/tests/api_error_registry.mjs +108 -0
- package/tests/api_pagination_contract.mjs +51 -0
- package/tests/api_path_404.mjs +96 -0
- package/tests/app_pair.mjs +168 -0
- package/tests/architect.mjs +140 -0
- package/tests/art_key.mjs +121 -0
- package/tests/art_stage.mjs +121 -0
- package/tests/asset_version.mjs +94 -0
- package/tests/atlas.mjs +69 -0
- package/tests/audit_deps.mjs +74 -0
- package/tests/audit_middleware.mjs +385 -0
- package/tests/auth_admission_gate.mjs +164 -0
- package/tests/auth_anthropic_identity.mjs +95 -0
- package/tests/auth_duplicate_cookie.mjs +56 -0
- package/tests/auth_error_brand.mjs +77 -0
- package/tests/auth_flow_slice1.mjs +223 -0
- package/tests/auth_inactive_builder.mjs +94 -0
- package/tests/auth_page_gate.mjs +92 -0
- package/tests/auth_session_ttl.mjs +155 -0
- package/tests/autonomous_fit_protected_paths.mjs +115 -0
- package/tests/autonomy_gate.mjs +85 -0
- package/tests/autotile_variants.mjs +256 -0
- package/tests/autotile_xverify.mjs +133 -0
- package/tests/backfill_sessions.mjs +101 -0
- package/tests/backfill_task_rewards.mjs +152 -0
- package/tests/backup_cli.mjs +104 -0
- package/tests/bfg.mjs +327 -0
- package/tests/bfg_write.mjs +423 -0
- package/tests/bongos_box_connect.mjs +89 -0
- package/tests/bongos_dispatch.mjs +74 -0
- package/tests/bongos_downloads.mjs +118 -0
- package/tests/bongos_login.mjs +34 -0
- package/tests/box_access.mjs +186 -0
- package/tests/box_auth_check.mjs +114 -0
- package/tests/box_code_staleness.mjs +116 -0
- package/tests/box_connect_e2e.mjs +196 -0
- package/tests/box_cost.mjs +70 -0
- package/tests/box_dns_repoint.mjs +151 -0
- package/tests/box_host_keys.mjs +102 -0
- package/tests/box_onboard.mjs +317 -0
- package/tests/box_scope_session.mjs +115 -0
- package/tests/box_ship_permissions.mjs +71 -0
- package/tests/box_terminal_ssrf.mjs +90 -0
- package/tests/boxes.mjs +1255 -0
- package/tests/branding.mjs +88 -0
- package/tests/bug_attachments.mjs +189 -0
- package/tests/build_info.mjs +88 -0
- package/tests/builder_needs.mjs +99 -0
- package/tests/cap_newcomer_tasks.mjs +114 -0
- package/tests/cascade-dispatch.mjs +95 -0
- package/tests/cf_tunnel.mjs +459 -0
- package/tests/claim_recall.mjs +150 -0
- package/tests/claims_bind_session.mjs +47 -0
- package/tests/claude_materialize.mjs +148 -0
- package/tests/cli_box_scope.mjs +52 -0
- package/tests/cli_lib_formatters.mjs +87 -0
- package/tests/cli_token_reissue.mjs +147 -0
- package/tests/client_bundle_route.mjs +47 -0
- package/tests/cloud_bongos_pack.mjs +85 -0
- package/tests/conductor.mjs +496 -0
- package/tests/confirm_attribution.mjs +156 -0
- package/tests/conflict_resolve.mjs +462 -0
- package/tests/context_pack.mjs +240 -0
- package/tests/cost.mjs +94 -0
- package/tests/cost_audit.mjs +122 -0
- package/tests/cost_budget_status.mjs +78 -0
- package/tests/cost_reconcile.mjs +102 -0
- package/tests/cost_summary_shape.mjs +94 -0
- package/tests/credit_grant.mjs +376 -0
- package/tests/criterion_progress.mjs +220 -0
- package/tests/criterion_proposal.mjs +109 -0
- package/tests/criterion_ref_parse.mjs +53 -0
- package/tests/currency_label.mjs +119 -0
- package/tests/day_cycle.mjs +197 -0
- package/tests/dependencies_migration.mjs +77 -0
- package/tests/dependencies_polymorphic.mjs +212 -0
- package/tests/deploy_instance.mjs +78 -0
- package/tests/devbox_downloads.mjs +122 -0
- package/tests/diff_derived_signals.mjs +115 -0
- package/tests/discord_approvals.mjs +174 -0
- package/tests/discord_autojoin.mjs +158 -0
- package/tests/discord_bot.mjs +94 -0
- package/tests/discord_bugs.mjs +297 -0
- package/tests/discord_channels.mjs +337 -0
- package/tests/discord_foundation.mjs +76 -0
- package/tests/discord_inbound.mjs +190 -0
- package/tests/discord_message_buffer.mjs +87 -0
- package/tests/discord_oauth.mjs +55 -0
- package/tests/discord_reaction.mjs +170 -0
- package/tests/discord_role_sync.mjs +151 -0
- package/tests/display_name.mjs +123 -0
- package/tests/dns_preflight.mjs +74 -0
- package/tests/event_sound_prefs.mjs +194 -0
- package/tests/eviction_policy.mjs +279 -0
- package/tests/figma_adapter.mjs +199 -0
- package/tests/file_map.mjs +91 -0
- package/tests/first_admin_bootstrap.mjs +40 -0
- package/tests/fitness.mjs +435 -0
- package/tests/fitness_two_root.mjs +104 -0
- package/tests/fixtures/session-506-digest.json +34 -0
- package/tests/gate_approvals.mjs +451 -0
- package/tests/gate_review.mjs +152 -0
- package/tests/git_merge_regen.mjs +151 -0
- package/tests/github_push_ancestry.mjs +119 -0
- package/tests/github_push_land_proof.mjs +127 -0
- package/tests/github_push_merge_driver.mjs +175 -0
- package/tests/goal_abuse_matrix.mjs +187 -0
- package/tests/goal_achievement.mjs +146 -0
- package/tests/goal_conflicts.mjs +305 -0
- package/tests/goal_dependencies_read.mjs +73 -0
- package/tests/goal_member_roles.mjs +420 -0
- package/tests/goal_membership_requests.mjs +332 -0
- package/tests/goal_routes.mjs +203 -0
- package/tests/goal_scope_check.mjs +167 -0
- package/tests/goal_tier.mjs +312 -0
- package/tests/goal_wall_proof.mjs +112 -0
- package/tests/grade_attempts.mjs +73 -0
- package/tests/grade_attribution.mjs +117 -0
- package/tests/grade_diff_hash.mjs +191 -0
- package/tests/grade_server_authoritative.mjs +305 -0
- package/tests/grade_unavailable_display.mjs +66 -0
- package/tests/grader.mjs +1960 -0
- package/tests/grader_bypass.mjs +57 -0
- package/tests/grader_panel.mjs +252 -0
- package/tests/grader_prompt_fencing.mjs +192 -0
- package/tests/helpers.mjs +52 -0
- package/tests/hierarchy-config.mjs +81 -0
- package/tests/init.mjs +463 -0
- package/tests/instance_config.mjs +76 -0
- package/tests/instance_manifest.mjs +110 -0
- package/tests/interaction_prefs.mjs +72 -0
- package/tests/key-card.mjs +110 -0
- package/tests/key-status.mjs +45 -0
- package/tests/land_watch.mjs +115 -0
- package/tests/lifecycle-card.mjs +145 -0
- package/tests/lifecycle_breakdown_view.mjs +236 -0
- package/tests/linkify_refs.mjs +264 -0
- package/tests/live_channel.mjs +128 -0
- package/tests/live_sse.mjs +122 -0
- package/tests/llm-cache-route.mjs +110 -0
- package/tests/llm-cache.mjs +140 -0
- package/tests/llm-pricing.mjs +152 -0
- package/tests/local_preview.mjs +136 -0
- package/tests/main_audit.mjs +137 -0
- package/tests/memory_isolation.mjs +431 -0
- package/tests/memory_map.mjs +107 -0
- package/tests/memory_pull.mjs +429 -0
- package/tests/merge_lease.mjs +100 -0
- package/tests/merge_lock.mjs +312 -0
- package/tests/metrics.mjs +147 -0
- package/tests/migration_allocation.mjs +146 -0
- package/tests/migration_namespace.mjs +185 -0
- package/tests/migrations_fresh_replay_guard.mjs +38 -0
- package/tests/mirror_lineage_fulltree.mjs +45 -0
- package/tests/mirror_lineage_proof.mjs +72 -0
- package/tests/mirror_redact.mjs +193 -0
- package/tests/model_alloc_prefs.mjs +63 -0
- package/tests/module-scope-map.mjs +88 -0
- package/tests/module_api.mjs +110 -0
- package/tests/module_cli.mjs +292 -0
- package/tests/module_contributions.mjs +148 -0
- package/tests/module_loader.mjs +286 -0
- package/tests/module_manifest.mjs +194 -0
- package/tests/module_owned_tests.mjs +105 -0
- package/tests/module_provenance.mjs +34 -0
- package/tests/module_route_rank.mjs +147 -0
- package/tests/module_seams.mjs +68 -0
- package/tests/modules.mjs +156 -0
- package/tests/modules_route.mjs +38 -0
- package/tests/newcomer_floor.mjs +17 -0
- package/tests/newcomer_restock.mjs +80 -0
- package/tests/next_number.mjs +154 -0
- package/tests/oauth_secret.mjs +60 -0
- package/tests/onboard.mjs +70 -0
- package/tests/onboarding_gate.mjs +267 -0
- package/tests/onboarding_observability.mjs +344 -0
- package/tests/onboarding_route_signals.mjs +175 -0
- package/tests/onboarding_state.mjs +346 -0
- package/tests/one_active_claim_per_session.mjs +111 -0
- package/tests/orphaned_claim_ship.mjs +135 -0
- package/tests/override_attribution.mjs +142 -0
- package/tests/override_request_ownership.mjs +235 -0
- package/tests/package_core.mjs +435 -0
- package/tests/parallel-load.mjs +402 -0
- package/tests/path_match.mjs +62 -0
- package/tests/permission_path.mjs +151 -0
- package/tests/platform_boot.mjs +167 -0
- package/tests/pre_compact.mjs +60 -0
- package/tests/preview_server.mjs +127 -0
- package/tests/profile_route.mjs +197 -0
- package/tests/provision.mjs +805 -0
- package/tests/provisioning_github_app_routes.mjs +98 -0
- package/tests/public_mirror_export.mjs +124 -0
- package/tests/public_task_resolver.mjs +112 -0
- package/tests/publish_branch_route.mjs +422 -0
- package/tests/publish_manifest.mjs +184 -0
- package/tests/publish_reconciler.mjs +728 -0
- package/tests/rank_gate.mjs +463 -0
- package/tests/rate_limit_public.mjs +217 -0
- package/tests/read_session_export.mjs +89 -0
- package/tests/recall_cli.mjs +82 -0
- package/tests/recall_hints.mjs +119 -0
- package/tests/recent_shipped_window.mjs +80 -0
- package/tests/regrade_eligibility.mjs +202 -0
- package/tests/render_prefs.mjs +122 -0
- package/tests/repo_map.mjs +92 -0
- package/tests/reward_gate.mjs +284 -0
- package/tests/route_rank_check.mjs +243 -0
- package/tests/route_validation.mjs +490 -0
- package/tests/routine_timers.mjs +72 -0
- package/tests/rubric_fixtures.mjs +140 -0
- package/tests/run_routine.mjs +69 -0
- package/tests/sandbox_stage.mjs +582 -0
- package/tests/scrubber_corpus.mjs +257 -0
- package/tests/search_chunker.mjs +209 -0
- package/tests/search_ingest.mjs +96 -0
- package/tests/search_ingest_db.mjs +88 -0
- package/tests/search_isolation.mjs +204 -0
- package/tests/search_route.mjs +95 -0
- package/tests/secret_box.mjs +189 -0
- package/tests/security_docs.mjs +186 -0
- package/tests/security_route.mjs +108 -0
- package/tests/served_paths_shipped.mjs +118 -0
- package/tests/session-cards.mjs +142 -0
- package/tests/session_506_regression.mjs +69 -0
- package/tests/session_caps.mjs +238 -0
- package/tests/session_cost.mjs +133 -0
- package/tests/session_digest.mjs +73 -0
- package/tests/session_eval.mjs +386 -0
- package/tests/session_index.mjs +105 -0
- package/tests/session_records.mjs +369 -0
- package/tests/session_search.mjs +78 -0
- package/tests/session_start_freshness.mjs +123 -0
- package/tests/setup_smoke.mjs +154 -0
- package/tests/ship_autolinkify.mjs +60 -0
- package/tests/ship_automerge_injection.mjs +174 -0
- package/tests/ship_broadcast_routing.mjs +125 -0
- package/tests/ship_broadcast_server.mjs +175 -0
- package/tests/ship_card.mjs +280 -0
- package/tests/ship_ci_deploy.mjs +374 -0
- package/tests/ship_preflight.mjs +368 -0
- package/tests/ship_premerge.mjs +75 -0
- package/tests/ship_resume.mjs +129 -0
- package/tests/ship_upload_skip.mjs +89 -0
- package/tests/ship_zero_commit.mjs +60 -0
- package/tests/single_host_hall.mjs +98 -0
- package/tests/skill_prefs.mjs +150 -0
- package/tests/smoke_preflight.mjs +66 -0
- package/tests/snapshot_picker.mjs +233 -0
- package/tests/sound_prefs.mjs +198 -0
- package/tests/sprite_facing.mjs +35 -0
- package/tests/status-probe.mjs +89 -0
- package/tests/status_backfill.mjs +94 -0
- package/tests/stop_refcheck.mjs +127 -0
- package/tests/streak.mjs +175 -0
- package/tests/subdomain_auth.mjs +58 -0
- package/tests/task_classifier_vocab.mjs +41 -0
- package/tests/task_create_idempotency.mjs +96 -0
- package/tests/task_goal_link.mjs +93 -0
- package/tests/task_ownership_gate.mjs +125 -0
- package/tests/terrain_picker.mjs +298 -0
- package/tests/touches_overlap.mjs +75 -0
- package/tests/triage_development.mjs +140 -0
- package/tests/turn_in_place.mjs +280 -0
- package/tests/upgrade.mjs +357 -0
- package/tests/verify_task_guard.mjs +64 -0
- package/tests/version_close.mjs +76 -0
- package/tests/versions_route.mjs +93 -0
- package/tests/walkability.mjs +188 -0
- package/tests/wandering_prefs.mjs +176 -0
- package/tests/worktree_disambiguation.mjs +105 -0
- package/tests/worktree_guard.mjs +90 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# 0101 — Goal hierarchy Phase 5: relevance judge, sub-Metic membership in protected-scope goals, and the goal-reward model
|
|
2
|
+
|
|
3
|
+
- **Status:** Accepted (design + security review recorded; the build is a task cluster, filed backlog under BONGOS-V1). Two sub-decisions are explicitly **owner-gated at build time** — see Parts 2 and 3.
|
|
4
|
+
- **Date:** 2026-07-01
|
|
5
|
+
- **Deciders:** Lars (Archon), Claude
|
|
6
|
+
|
|
7
|
+
**Builds on:** [ADR 0086](<redacted>.md) (the goal hierarchy — this is its deferred Phase 5), [ADR 0043](<redacted>.md) (the protected-path hard floor this amends), [ADR 0016](<redacted>.md) (server-enforced permissions), [ADR 0084](<redacted>.md) (auto-derived rank floor), [ADR 0024](<redacted>.md) (the grader subagent harness the judge reuses), [ADR 0058](<redacted>.md) (gate-review + owner approval), [ADR 0054](<redacted>.md) (per-task cost-plus reward), [ADR 0023](<redacted>.md) (credit multipliers), [ADR 0027](<redacted>.md) (BFG contribution signals).
|
|
8
|
+
|
|
9
|
+
**Track:** `internal` (GDS / methodology — a Cloud Bongos platform capability).
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Context
|
|
14
|
+
|
|
15
|
+
[ADR 0086](<redacted>.md) shipped the goal-scoped work hierarchy — Phases 1–4 (BV1.R54–R64): the module-scope map, the configurable hierarchy preset, the `goals` tier, the bounded task-authoring gate (`POST /goals/:id/tasks`), the polymorphic dependency edge, and the criterion-auto-flag → `/goal-review` → goal-auto-achieve lifecycle. Those phases are **live and defended**: a member's authoring is bounded by the deterministic scope-subset wall, the protected-path block (the single [ADR 0043](<redacted>.md) roster), and the auto-derived rank floor ([ADR 0084](<redacted>.md)), with the ship-time gates authoritative on the real diff (BV1.R61 pins + abuse matrix).
|
|
16
|
+
|
|
17
|
+
ADR 0086 **explicitly deferred three non-decisions** to "its own security-reviewed ADR," because each is a matter of *judgment* or a *widening of the trust boundary* rather than the deterministic wall that shipped first. This is that ADR. It records the design and the security review; the build is a future cluster (filed below). It changes **no enforcement code**.
|
|
18
|
+
|
|
19
|
+
The three deferred items:
|
|
20
|
+
|
|
21
|
+
1. **An AI relevance / anti-hack judge** at goal-task create/claim time — advisory-first, never hard-blocking a newcomer.
|
|
22
|
+
2. **Sub-Metic membership inside protected-scope goals** — which amends the [ADR 0043](<redacted>.md) hard floor and requires the ship-time gates to become goal-aware.
|
|
23
|
+
3. **The goal-reward model** — does *achieving a goal* earn anything beyond the per-task cost-plus already paid, and how does any reward split among a goal's members.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Decision
|
|
28
|
+
|
|
29
|
+
We adopt a three-part design. Each part is an independent, revertible build task. The security-sensitive boundary-widening (Part 2) ships **last**, behind the advisory judge (Part 1) and an explicit owner Gate sign-off + red-team pass.
|
|
30
|
+
|
|
31
|
+
### Part 1 — The relevance / anti-hack judge (advisory-first)
|
|
32
|
+
|
|
33
|
+
**What.** At goal-task **create** (`POST /goals/:id/tasks`) and, optionally, at **claim**, an AI judge assesses: *is this task genuinely in service of the goal, or is it scope-gaming / a hack attempt that slipped the deterministic gate?* (e.g. a task whose declared `touches[]` sit inside scope but whose title/description reveal an intent to weaken the very wall that admitted it).
|
|
34
|
+
|
|
35
|
+
**How.** Reuse the existing grader subagent harness ([ADR 0024](<redacted>.md) — the adversarial worker panel + `cascade-dispatch`), NOT a new harness. Cheapest model first (the cascade ceiling), escalate only on ambiguity; budget-aware (the $5k constraint).
|
|
36
|
+
|
|
37
|
+
**Advisory-first — the load-bearing rule.** The judge **flags for a Metic to review**; it **never hard-blocks a newcomer at create time**. The deterministic scope-subset + protected-path + auto-rank-floor gates remain the **only hard walls**. The judge is a soft, human-escalated signal that surfaces in a review queue mirroring the `/goal-review` / `/idea-triage` cadence. High-confidence or repeat gaming may *raise friction* (e.g. require a Metic co-sign before the authored task becomes claimable) but never a silent, opaque AI "no."
|
|
38
|
+
|
|
39
|
+
**Why advisory, not blocking.** An LLM judge is fallible; hard-blocking on it would (a) re-introduce the delegation bottleneck ADR 0086 exists to remove, and (b) create a gaming/DoS surface (adversarial prompts crafted to trip or exhaust the judge). Keeping it advisory means a wrong judge call costs a review, never a builder's ability to work.
|
|
40
|
+
|
|
41
|
+
### Part 2 — Sub-Metic membership in protected-scope goals (amends ADR 0043)
|
|
42
|
+
|
|
43
|
+
**Today (the conservative default that stays until this ships).** A protected-scope goal requires a **Metic+** holder ([ADR 0086](<redacted>.md) Deferred); a sub-Metic cannot author/claim/ship work touching the protected core even inside a goal — the [ADR 0043](<redacted>.md) hard floor blocks it at the pre-push hook, the grader `permissionPathPrePass`, the `gate-review` ESCALATE floor, and the post-push `main-audit`.
|
|
44
|
+
|
|
45
|
+
**The amendment.** An **Archon** may admit a sub-Metic to a protected-scope goal under a **tightly-scoped, Archon-granted membership**, letting them author + claim + ship work touching a **narrow, explicitly-enumerated** protected surface — but **only with the ship-time gates made goal-aware**.
|
|
46
|
+
|
|
47
|
+
**Security review (the crux).** The amendment is a genuine **widening of the trust boundary**, so it is purely *additive* permission, fail-closed, gated on an explicit grant:
|
|
48
|
+
|
|
49
|
+
- **Goal-aware ship-time gates.** A sub-Metic diff touching a protected path is allowed **only if** all hold, checked server-side against the **real committed diff** (not the advisory create-time `touches[]`): (a) the author is a **member** of a protected-scope goal, (b) the membership was **Archon-granted** and audit-logged, and (c) every protected path the diff touches is **within that goal's enumerated protected scope**. Any protected-path hit **outside** a live matching grant → the ADR-0043 floor bites unchanged.
|
|
50
|
+
- **Never self-granted.** Protected scope is Archon-set at goal creation ([ADR 0086](<redacted>.md) §4); membership admission to a protected-scope goal is the Archon-only `POST /goals/:id/members`. The sub-Metic can *ask*, never grant.
|
|
51
|
+
- **Blast-radius containment.** The member can touch only the goal's enumerated protected paths; the grader, `gate-review`, and `main-audit` still run on the real diff; the Archon can revoke membership; the Part-1 relevance judge watches for gaming; the `main-audit` flags any sub-Metic protected-path commit **not** covered by a live goal grant.
|
|
52
|
+
- **Ships last, gated.** This is the highest-risk change. Its build task carries an explicit **owner Gate approval** ([ADR 0058](<redacted>.md)) and a **red-team pass** before merge.
|
|
53
|
+
|
|
54
|
+
### Part 3 — The goal-reward model
|
|
55
|
+
|
|
56
|
+
**Question.** Does *achieving* a goal earn anything beyond the per-task cost-plus already paid ([ADR 0054](<redacted>.md)), and how does any reward split among members?
|
|
57
|
+
|
|
58
|
+
**Leaning (recorded; the money is owner-gated).**
|
|
59
|
+
|
|
60
|
+
- **Karma by default, not drachmae.** Drachmae are real money (1 = $1) against a tight $5k budget, and a goal is a *coordination construct*, not a unit of billable work — the per-task cost-plus already pays for the actual shipping. A goal-achievement **karma** bonus recognizes the collaboration with **no new monetary spend**.
|
|
61
|
+
- **Contribution-weighted, not membership-flat.** The bonus tracks **who actually shipped tasks under the goal** (reuse the shipped-task/credit attribution + the BFG contribution signals, [ADR 0027](<redacted>.md)), never mere membership — a flat per-member reward would incentivize goal-squatting. A `lead` may take a small coordination share.
|
|
62
|
+
- **On achievement, not creation.** The reward attaches when a goal is **achieved** (all criteria satisfied + confirmed via `/goal-review`), never on creation or joining — which, with contribution-weighting and the Metic confirmation, closes the free-rider and squatting surfaces.
|
|
63
|
+
|
|
64
|
+
**Owner-gated.** Whether *any* monetary (drachmae) component attaches, and the exact karma amount/curve, is **Lars's call at build time** — money is owner authority. This ADR records the budget-safe default (karma-only, contribution-weighted); the build task (P5.3) surfaces the money decision explicitly rather than presuming it.
|
|
65
|
+
|
|
66
|
+
### The child task list (filed backlog under BONGOS-V1, `source_ref` = this ADR)
|
|
67
|
+
|
|
68
|
+
- **P5.1 — Relevance/anti-hack judge (advisory-first).** Reuse the grader harness at goal-task create/claim; flag → Metic review queue; never hard-blocks; budget-aware cascade. *(Metic.)*
|
|
69
|
+
- **P5.2 — Goal-aware ship-time gates + the ADR-0043 amendment.** Sub-Metic membership in protected-scope goals under an Archon grant; make the pre-push hook / grader pre-pass / `gate-review` / `main-audit` goal-aware on the real diff; fail-closed; red-team + owner Gate sign-off. *(Archon; sequence after P5.1 so the advisory signal exists.)*
|
|
70
|
+
- **P5.3 — Goal-reward model.** Karma-default, contribution-weighted split on goal achievement; anti-gaming; the monetary decision surfaced to the owner. *(Metic; after the goal-achievement flow, BV1.R63.)*
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Alternatives considered
|
|
75
|
+
|
|
76
|
+
- **A hard-blocking relevance judge — rejected.** A fallible LLM as a hard gate re-introduces the bottleneck ADR 0086 removed and creates a gaming/DoS surface; the deterministic gates are the hard wall, the judge is a soft signal.
|
|
77
|
+
- **Keep protected-scope Metic+-only forever — rejected as the long-term posture** (it caps the maneuverability grant's reach), but it **is** the safe default that stays in force until P5.2 ships with its security review.
|
|
78
|
+
- **Flat per-member goal reward — rejected.** It incentivizes goal-squatting; contribution-weighting is fairer and anti-gaming.
|
|
79
|
+
- **A drachmae goal bonus by default — rejected as the default** (real money, tight budget); left as an explicit owner-gated option, not presumed.
|
|
80
|
+
- **Fold Phase 5 into Phase 4 rather than its own ADR — rejected** (ADR 0086 already decided this): the boundary-widening warrants a standalone security review, which is this document.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Consequences
|
|
85
|
+
|
|
86
|
+
**Positive.** Completes the goal hierarchy's *judgment* and *reward* story: a soft relevance signal catches gaming the deterministic wall can't see; a newcomer can eventually touch a narrow protected surface under an explicit, revocable, audited Archon grant; and collaboration is recognized without mandatory monetary spend.
|
|
87
|
+
|
|
88
|
+
**Negative / cost.** Part 2 is a real widening of the trust boundary — the reason it ships last, fail-closed, red-teamed, and owner-approved. The judge adds LLM cost (mitigated: advisory, cheapest-model-first, budget-aware). The reward model adds accounting on goal achievement.
|
|
89
|
+
|
|
90
|
+
**Neutral.** The monetary-reward specifics and the exact karma curve stay owner-gated; the build is a future cluster (P5.1–P5.3), each part independently shippable and revertible; until they land, behavior is the conservative Phase-1–4 default (no goal bonus; protected-scope goals require a Metic+ holder; no AI judge in the loop).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# ADR 0102 — Finish bounding the kernel: LLM-cost as kernel-adjacent infra, identity/auth carve, flip Check 12 to ENFORCING
|
|
2
|
+
|
|
3
|
+
**Status:** Accepted (2026-07-02) · **Supersedes the WARN-mode deferral in** [ADR 0091](<redacted>.md) §1,§3 / [ADR 0093](<redacted>.md)
|
|
4
|
+
|
|
5
|
+
## Context
|
|
6
|
+
|
|
7
|
+
ADR 0091 §1 defined the kernel boundary — every file in `fitness.js` `KERNEL_FILES` must import only the kernel + grandfathered infra. Its enforcer, fitness **Check 12 ("kernel imports no domain")**, shipped as a **WARN-mode ratchet**: it *reported* the tracked kernel→domain leaks but `hardFail: false`, "flips to a red build at zero." It never reached zero, so the boundary stayed advisory. At the start of this work there were **7 tracked leaks**:
|
|
8
|
+
|
|
9
|
+
- `src/module-api.js` (the doorway) → `./gds/db` ×4 — Gemini-key storage (×3) + `builderRollingAvgGrade` (×1)
|
|
10
|
+
- `src/module-api.js` → `./gds/llm-cache`, `./gds/llm-pricing` (×2)
|
|
11
|
+
- `src/bongos/auth.js` → `./db` (×1)
|
|
12
|
+
|
|
13
|
+
The 2020-era framing (ADR 0093) parked `llm-cache`/`llm-pricing` "until an llm-infra module exists." Revisiting that: building such a module is a needless seam.
|
|
14
|
+
|
|
15
|
+
## Decision
|
|
16
|
+
|
|
17
|
+
**Clear all 7 leaks and flip Check 12 to a hard gate** (`hardFail` when findings > 0), so any future kernel→domain import reds the build.
|
|
18
|
+
|
|
19
|
+
1. **LLM-cost is kernel-adjacent infra, not a domain module.** `llm-cache.js` (a best-effort, dependency-injected content-addressed cache) and `llm-pricing.js` (a pure token→USD pricing table) carry no domain logic and are consumed by core, the grading module, and the CLI cost tooling *alike* — the same cross-cutting category as the pg pool and `path-match.js`, which are already in `KERNEL_IMPORT_ALLOWLIST`. Add both there. This clears leaks 5–6 with **no file moves and no new module core would have to depend on anyway.**
|
|
20
|
+
|
|
21
|
+
2. **Carve the identity/auth/admission cluster into `db-kernel.js`.** `upsertBuilder`, `seatFirstAdminIfUnclaimed`, `getBuilderByGithubId`, `hasInvitedAccessRequest`, `createSession`, `lookupSession`, `SESSION_TTL_MS`, and the `RANKS` vocabulary move from the `db.js` residue into the bounded kernel slice (they are kernel identity/authz primitives; `auth.js` — a `KERNEL_FILE` — resolves them there). `db.js` re-imports and re-exports every name, so its other importers and internal uses (e.g. `setBuilderRank`'s `RANKS.indexOf`) are byte-identical. Clears leak 7. (`RANKS` stays TWINNED with `modules/lifecycle/db.js` — the twin now pairs with db-kernel.)
|
|
22
|
+
|
|
23
|
+
3. **Push the doorway's remaining domain re-exports behind ports.** Gemini-key storage → the `art-pipeline` module + its port; `builderRollingAvgGrade` → the `grading` module + the `grade` port. The doorway stops importing `./gds/db`. Clears leaks 1–4.
|
|
24
|
+
|
|
25
|
+
4. **Flip `<redacted>`** to report `violations` + `hardFail: findings.length > 0`.
|
|
26
|
+
|
|
27
|
+
## Consequences
|
|
28
|
+
|
|
29
|
+
- The kernel↔domain boundary becomes a **hard, self-defending CI gate** — the ratchet can no longer silently rot (the same class of gap this session's audit found in the C9 proof and self-host hardware-verify).
|
|
30
|
+
- `db.js` shrinks toward being purely the social-twin + security-docs + credential residue; `db-kernel.js` is now the identity/auth/rank/audit/tx slice in full.
|
|
31
|
+
- Landed incrementally (llm-infra classification → auth carve → Gemini port → grade port → flip), each verified against `fitness.js` + the unit suite + a live vanilla `docker compose up` (auth still 401s cleanly). Test stubs that mocked `db.lookupSession` were repointed to `db-kernel`.
|
|
32
|
+
|
|
33
|
+
## Alternatives considered
|
|
34
|
+
|
|
35
|
+
- **Build an `llm-infra` module for cache+pricing** (the ADR 0093 deferral). Rejected: they are pure cross-cutting infra with no domain state; a module would exist only to be depended on by core anyway, adding a seam and a port for zero isolation benefit. Kernel-adjacent classification is the honest model.
|
|
36
|
+
- **Promote the Gemini/grade functions into the kernel.** Rejected: they are art-pipeline / grading *domain* reads over domain tables, not kernel primitives — they belong behind their modules' ports.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# ADR 0103 — Core-first extraction: Cloud Bongos is the trunk, Example splits
|
|
2
|
+
|
|
3
|
+
- **Status:** Accepted
|
|
4
|
+
- **Date:** 2026-07-02
|
|
5
|
+
- **Track:** internal
|
|
6
|
+
- **Task:** [#1726](https://example.com/builders#/task/1726) (BV1.R87) — the owner-review decision this ADR records.
|
|
7
|
+
- **Supersedes:** [ADR 0100](<redacted>.md) §§1–2 (the Mercury-first sequence and the "Example stays coupled until a later decision" plank). **Retains ADR 0100 §3** (per-repo GDS) **and §4** (the generated mirror, retired conditionally).
|
|
8
|
+
- **Builds on:** [ADR 0062](<redacted>.md) §1 (portable-core / host-instance cut-line), [ADR 0098](<redacted>.md) (`isPublishable()` — the executable definition of "the core"), [ADR 0100](<redacted>.md) §§3–4 + its R84 (`bongos package-core`, shipped), [ADR 0065](<redacted>.md) (AGPL / non-profit / AI-first).
|
|
9
|
+
- **Reshapes:** the R84 → R86 spine — inserts a core-extraction step before Mercury (R85) and adds a committed Example-split step (see §4).
|
|
10
|
+
- **Amended by:** [ADR 0108](<redacted>.md) — resolves §2's mechanism-neutral consumer-repo shape ("installs a pinned core version and layers its own content on top") into configurable-root.
|
|
11
|
+
|
|
12
|
+
## Context
|
|
13
|
+
|
|
14
|
+
[ADR 0100](<redacted>.md) was accepted 2026-07-01. It chose two repos, but sequenced **Mercury** (a greenfield Example instance) as the *first* two-repo consumer and deliberately left **Example coupled** as the single-checkout reference instance "until a later, separate decision" — on the reasoning that moving a live product before the update channel is proven buys risk for no gain.
|
|
15
|
+
|
|
16
|
+
A next-day owner review (2026-07-02, task [#1726](https://example.com/builders#/task/1726)) reopened planks 1 and 2. The owner's position, stated directly:
|
|
17
|
+
|
|
18
|
+
- **Cloud Bongos is the real product** — the thing of durable value — and should live as a clean standalone artifact, with Example as *one consumer of it*, not its host.
|
|
19
|
+
- **The coupling actively hurts.** One repo carrying both the game and the platform, with a convoluted shared history, is hard to reason about and hand off.
|
|
20
|
+
- **The boundary stays theoretical while Example is coupled.** OTB specifics keep leaking into the "portable" core. Evidence: a walk of the ~105 accumulated memory-file learnings on 2026-07-02 found **~85% are platform knowledge wearing OTB-specific framing** (example.com links, the droplet, `drachmae`) — the substance is core, the *wording* is coupled. Only 7 items are genuinely instance-bound.
|
|
21
|
+
- **Mercury is imminent** — the separation should be proven on something that matters to the business now.
|
|
22
|
+
|
|
23
|
+
"Leave Example coupled until later" reads, under these priorities, as "never." The precondition ADR 0100 waited for — a mechanical, CI-enforced boundary — already holds (ADR 0093 core-carve, the module system, `isPublishable()`), so the more ambitious cut is now buildable rather than a leap.
|
|
24
|
+
|
|
25
|
+
## Decision
|
|
26
|
+
|
|
27
|
+
### 1. Core-first extraction — the core gets its own repo, first.
|
|
28
|
+
|
|
29
|
+
The Cloud Bongos **core** — the `isPublishable()` subtree ([ADR 0098](<redacted>.md)): portable methodology + platform + GDS engine + neutral branding — is extracted into its **own standalone repository** with **fresh history**, AGPL/public-ready. That repo **is** Cloud Bongos, the product. This is the *first* physical move, ahead of standing up any consumer. R84's `bongos package-core` is reused, not discarded: the subtree it already packages is exactly what gets extracted.
|
|
30
|
+
|
|
31
|
+
### 2. Example splits — it is not the permanently-coupled reference instance.
|
|
32
|
+
|
|
33
|
+
Example becomes a **consumer repo** that installs a pinned core version and layers its own game content, branding, and modules on top — the same shape as any other instance. It is **sequenced after** the core extraction and, for live-prod-risk reasons, after greenfield Mercury has proven the consumer path. This reverses ADR 0100 §2's open-ended deferral into a committed, sequenced step. The single-checkout reskin (cloudbongos.com) stays a supported cheap-reskin shape.
|
|
34
|
+
|
|
35
|
+
### 3. Retained from ADR 0100: per-repo GDS (§3) and the conditional mirror (§4).
|
|
36
|
+
|
|
37
|
+
Each repo runs its own GDS (own DB, tasks, builders, credits) — a shared GDS is still rejected. The delayed redacted mirror ([ADR 0099](<redacted>.md)) stays the public surface **until** the core is physically extracted — under this ADR that trigger now fires *first*, so the mirror's retirement/repointing is re-evaluated at extraction time rather than after a Mercury detour.
|
|
38
|
+
|
|
39
|
+
### 4. Reshaped spine.
|
|
40
|
+
|
|
41
|
+
| Step | Task | Change |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| R84 — package the core | [#1688](https://example.com/builders#/task/1688) | shipped; reused as-is |
|
|
44
|
+
| **R88 — extract the core into its own repo** | [#1727](https://example.com/builders#/task/1727) | the new first physical move (dep: R84) |
|
|
45
|
+
| R85 — Mercury on a pinned core | [#1689](https://example.com/builders#/task/1689) | re-pointed to depend on R88 (extraction), not just R84 |
|
|
46
|
+
| R86 — `bongos upgrade` channel | [#1690](https://example.com/builders#/task/1690) | unchanged (dep: R85) |
|
|
47
|
+
| **R89 — split Example onto the pinned core** | [#1728](https://example.com/builders#/task/1728) | committed, sequenced (deps: R88 + R85) |
|
|
48
|
+
|
|
49
|
+
## Alternatives reconsidered (rejected)
|
|
50
|
+
|
|
51
|
+
- **Keep ADR 0100 as-is (Mercury-first, Example coupled forever).** Rejected — it leaves the core↔instance boundary untested and traps the product inside the game repo, which is the exact pain the owner raised.
|
|
52
|
+
- **Split Example *first*.** Rejected — moving a live product before the consumer/upgrade path is proven on greenfield Mercury adds risk for no gain. Core-first + Mercury-proof-first de-risks the prod migration.
|
|
53
|
+
- **One repo with a clean internal cut (`core/` vs `instances/`).** Rejected — cheapest, but Cloud Bongos never becomes a separately shippable product and the boundary stays enforced by fitness tests, not a real repo gap.
|
|
54
|
+
|
|
55
|
+
## Consequences
|
|
56
|
+
|
|
57
|
+
- **The core repo becomes the canonical public artifact.** ADR 0099's mirror retirement, deferred in ADR 0100 §4 to "physical extraction," is now re-evaluated as part of R88.
|
|
58
|
+
- **Two one-time migrations** (Mercury standup, then Example re-base) plus a permanent per-project upgrade step — the recurring cost the single-repo model avoided, now accepted for the product + boundary payoff.
|
|
59
|
+
- **A larger operational footprint** (a core repo + per-instance repos, each with its own GDS/CI) — weighed against the $5k budget, mitigated by building incrementally, Mercury-driven.
|
|
60
|
+
- **The 2026-07-02 learnings classification** (105 memory files, walked item-by-item with the owner: 85 CORE, 5 SPLIT, 4 INSTANCE, 11 DROP) is the reference for what knowledge travels into the extracted core repo. Companion: [`docs/cloud-bongos-core-learnings-classification.md`](../cloud-bongos-core-learnings-classification.md).
|
|
61
|
+
- **The module boundary is now load-bearing across a repo gap sooner** — the ADR 0062 / ADR 0061 fitness functions matter more, not less.
|
|
62
|
+
|
|
63
|
+
## Execution record — R88 shipped (2026-07-03, task [#1727](https://example.com/builders#/task/1727))
|
|
64
|
+
|
|
65
|
+
§1 is done. The core was extracted into **[github.com/example-owner/cloud-bongos](https://github.com/example-owner/cloud-bongos)** — **private**, `main`, **AGPL-3.0**, **fresh single-commit history**.
|
|
66
|
+
|
|
67
|
+
- **What was extracted:** the `isPublishable()` subtree via R84's `scripts/gds/package-core.js` — **989 core files** (of 2203), redacted in-memory through the fail-closed no-leak gate (0 residual leaks). The pin travels in-repo as `.cloudbongos-core.json`: `core_version 1.14.0`, `source_commit 2783a396…`, `tree_sha256 2bf9f8ee9a97…`. R85 ([#1689](https://example.com/builders#/task/1689)) and R89 ([#1728](https://example.com/builders#/task/1728)) can now depend on this pin.
|
|
68
|
+
- **Genericized on the way in:** identity surface branded to Cloud Bongos (README, package.json, CLAUDE.md 298→258 lines, GOVERNANCE); instance identity re-pointed to `docs/project-context.template.md` + `config/branding.neutral.json`; `drachmae→credits`, owner-name and Off-the-Boats/ancient-Greece framing removed.
|
|
69
|
+
- **§4 mirror re-evaluation (ADR 0099):** the physical-extraction trigger has now fired, and `cloud-bongos` is the **designated canonical public artifact** — but it is **PRIVATE for now**. So the ADR 0099 generated mirror is **NOT retired yet**; it stays the public surface until the owner flips `cloud-bongos` public, at which point the mirror is retired (or repointed). Retirement is bound to the public-flip, not to this extraction.
|
|
70
|
+
- **Deferred to follow-ups (tracked in the GDS):** the exhaustive `Off the Boats`→neutral sweep across the ~32 remaining ADR/test/recipe files; standalone vanilla-boot wiring (`server.js`/entrypoints still reference the reference instance's product layer) — naturally proven by R85/R89; core `package.json` dependency pruning (game deps carried in); dangling in-repo links to topology/instance paths the scaffold populates on `init`; seeding the CORE-bucketed learnings; and tagging R88/R89 to goal 26 (their `goal_id` is null).
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# 0103 — Consolidate GDS-V4 into BONGOS-V1; split the Bongos desktop app into its own goal
|
|
2
|
+
|
|
3
|
+
- **Status:** Accepted
|
|
4
|
+
- **Date:** 2026-07-02
|
|
5
|
+
- **Deciders:** Lars (owner) · Claude (Opus 4.8)
|
|
6
|
+
- **Track:** `internal` (Cloud Bongos)
|
|
7
|
+
- **Relates to:** [ADR 0064](<redacted>.md) (Medusa → Cloud Bongos), [ADR 0062](<redacted>.md) (core ↔ host / instance model), [ADR 0087](<redacted>.md) (the Bongos desktop app absorbs Dev Box), [ADR 0095](<redacted>.md) (grep-over-embeddings — retires the C1 recall arm). Executed by migration `<redacted>.sql` under task [#1709](https://example.com/builders#/task/1709).
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
The internal track carried **two live versions at once** — `GDS-V4` (534 tasks, ~114 open) and `BONGOS-V1` (130 tasks, ~14 open) — with no clean divide between them. Both were, in practice, Cloud Bongos platform work. Worse, `BONGOS-V1` was *titled* "Bongos App — V1" but its goals were platform concerns (core modularization, the animation module), while the actual **Bongos desktop app** (`bongos-app/` — the feedback-capture tool that also absorbs the Dev Box switch, [ADR 0087](<redacted>.md)) had its tasks scattered across *both* versions. Two parallel internal versions + an app/platform naming inversion made "what's the live internal version?" and "is this app work or platform work?" both unanswerable from the ledger.
|
|
12
|
+
|
|
13
|
+
A task-by-task triage of GDS-V4's 114 open tasks (with the owner, 2026-07-02) also found dead work: the C1 semantic-search/embeddings arm (superseded by [ADR 0095](<redacted>.md)'s decision that agents navigate by grep, not embeddings), old V3-era grader tasks (superseded by the shipped 4-worker grader panel + [ADR 0089](<redacted>.md)), and the T-NNN task-ref migration (the hall-link convention already works and is enforced).
|
|
14
|
+
|
|
15
|
+
## Decision
|
|
16
|
+
|
|
17
|
+
1. **One go-forward internal version.** `BONGOS-V1` becomes the single Cloud Bongos **platform** version (renamed "Cloud Bongos — platform (V1)", status `building`). All still-relevant open GDS-V4 work carries into it.
|
|
18
|
+
2. **`GDS-V4` is frozen, not shipped.** It was absorbed, not delivered; `frozen` avoids a false 100% and lets its in-flight tail (10 `confirmed` + 1 `active`) finish landing as its final history. Its `shipped`/`abandoned` rows stay attributed to GDS-V4 as the archive of what it delivered.
|
|
19
|
+
3. **The Bongos desktop app becomes its own goal** ("Bongos desktop app") under BONGOS-V1, with every app task reparented to it (mascot, branded download + auto-update, the cloudbongos.com landing page, feedback capture, the Dev Box desktop switch). The app is a component *of* the platform version, not a peer version — matching the owner's framing. The code carve `bongos-app/` → `modules/bongos-app/` is tracked as a follow-up task under this goal.
|
|
20
|
+
4. **Prune the superseded.** Abandon the C1 embeddings arm (939, 962, 966–971, 1221), the old V3 grader tasks (201, 202, 242, 292, 388, 490, 492), and the T-NNN migration (753, 754, 755) — 19 tasks. Move the two misfiled game-art tasks (586, 587) to product `V2`.
|
|
21
|
+
5. **Sever the 758→753 dependency edge** so task 758 (kept) is not left permanently unclaimable by an abandoned dependency.
|
|
22
|
+
|
|
23
|
+
## Consequences
|
|
24
|
+
|
|
25
|
+
- `/status` now defaults to `BONGOS-V1` (was `GDS-V4`); the CLAUDE.md version-framing is updated to match.
|
|
26
|
+
- The reorg is a **data migration** (182), applied atomically on deploy — reversible by construction (only status/version/goal/edge mutations; the pre-state is snapshotted in the task-1709 notes and the GDS DB dump).
|
|
27
|
+
- The recall/embeddings headline in the old GDS-V4 framing is retired; the endorsed findability path (docstrings, greppability, the repo-map) continues under BONGOS-V1 as the C2 cluster.
|
|
28
|
+
- **Process gap surfaced:** this consolidation was blocked for hours because the nightly DB backup had failed silently for 12 days (an orphaned superuser-owned table broke pg_dump; fixed under task [#1711](https://example.com/builders#/task/1711)). A version-consolidation should verify a fresh restore point exists *first*.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# 0104 — Trust the GDS API channel in Claude Code auto mode (pre-allow `scripts/gds/api.js`)
|
|
2
|
+
|
|
3
|
+
- **Status:** Accepted
|
|
4
|
+
- **Date:** 2026-07-02
|
|
5
|
+
- **Deciders:** Lars (owner) · Claude (Opus 4.8)
|
|
6
|
+
- **Track:** `internal` (Cloud Bongos)
|
|
7
|
+
- **Relates to:** [ADR 0016](<redacted>.md) (server-enforced permissions / trust boundary — the load-bearing rationale). Completes task [#1051](https://example.com/builders#/task/1051) (the narrow named-script allow-list, from the task-[#1027](https://example.com/builders#/task/1027) nightmare) and complements task [#1251](https://example.com/builders#/task/1251) (default dev boxes to `bypassPermissions`). Executed under task [#1716](https://example.com/builders#/task/1716).
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
Claude Code's **auto** permission mode runs an LLM *classifier* that judges each action and hard-denies what it reads as a risky external write or as work beyond the user's request. A builder hit this on the dev box:
|
|
12
|
+
|
|
13
|
+
> Permission for this action was denied by the Claude Code auto mode classifier. Reason: **[External System Writes]** The agent patches inbox item 486 (which it did not create this session) to "promoted" and creates a task from an agent-inferred idea, well beyond the user's request to ship the scope doc.
|
|
14
|
+
|
|
15
|
+
Two prior decisions were supposed to prevent this and don't fully:
|
|
16
|
+
|
|
17
|
+
- Task **1051** (from the task-[#1027](https://example.com/builders#/task/1027) nightmare, where the classifier denied `ship.js` mid-deploy) added a **narrow** `permissions.allow` to the project `.claude/settings.json` for the blessed **named** scripts (`ship`/`claim`/`release`/`reauth`/`paste-token`/`start`/`setup`/`sandbox-stage`/`capture`/`learning-capture`/`doctor`). An explicit allow-rule bypasses the classifier for that command.
|
|
18
|
+
- Task **1251** additionally defaults the box's interactive `claude` to `bypassPermissions` (no classifier at all on the box).
|
|
19
|
+
|
|
20
|
+
**The gap.** Every autonomous GDS operation that has *no dedicated script* — idea-triage **promote**, **create-task**, blocker-**resolve**, criterion **ratify**, **goal** create, cost-via-API, security reports — rides the *generic* caller `node scripts/gds/api.js <METHOD> /api/gds/...` (see [`.claude/skills/idea-triage/SKILL.md`](../../.claude/skills/idea-triage/SKILL.md)). That generic channel was never allow-listed. So the moment a session is in **auto** mode rather than bypass — a builder cycled modes with Shift+Tab, the task-1251 `bypassPermissions` write didn't take, or the work is on a laptop/local full clone — the classifier hard-denies the **entire** autonomous GDS write surface. It only "just works" under `bypassPermissions`, which is a mode-level paper-over of a missing allow-rule.
|
|
21
|
+
|
|
22
|
+
## Decision
|
|
23
|
+
|
|
24
|
+
**Pre-allow the generic GDS API channel.** Add `Bash(node scripts/gds/api.js:*)` to the project `.claude/settings.json` `permissions.allow`. It ships in the repo, so it reaches the box, laptops, and **every permission mode** at once, and it is locked against silent regression by [`tests/box_ship_permissions.mjs`](../../tests/box_ship_permissions.mjs).
|
|
25
|
+
|
|
26
|
+
The owner chose **"trust the whole channel"** over a narrower "reads + a few specific write paths" split — the split is brittle (breaks when a skill uses a slightly different path or flag order) and buys only illusory least-privilege, because the server already gates every write by rank.
|
|
27
|
+
|
|
28
|
+
## Why this is safe (the crux)
|
|
29
|
+
|
|
30
|
+
The auto-mode classifier was **never the security gate here** — the **GDS server is**, and it is stricter. `builders.rank` is checked on every request, per-request, with no caching ([ADR 0016](<redacted>.md)). Therefore:
|
|
31
|
+
|
|
32
|
+
- Allow-listing `api.js` grants an autonomous builder **nothing beyond what its rank already permits**. It only removes a redundant, weaker, and — as observed — **wrong** harness prompt that mistook a sanctioned idea-triage session for scope creep.
|
|
33
|
+
- `api.js` can only reach `/api/gds/*` on the configured API base (via `cli-lib.apiCall`); it is **not** a general HTTP or shell escape hatch. Blast radius = "the caller's rank-permitted GDS operations, without a per-call prompt" — which is exactly the design intent of an autonomous builder.
|
|
34
|
+
- **Scope-discipline** ("don't wander off the claim") is owned by the methodology's per-builder **`wandering`** knob ([`modules/builder-settings/wandering-prefs.js`](../../modules/builder-settings/wandering-prefs.js)), which is the correct layer — a harness classifier can't tell whether promoting an idea *is* the task.
|
|
35
|
+
|
|
36
|
+
Editing this allow-list grants no authority; sub-Metic authorship limits, protected-path gates, and rank checks all remain server-enforced ([ADR 0016](<redacted>.md)).
|
|
37
|
+
|
|
38
|
+
## Consequences
|
|
39
|
+
|
|
40
|
+
- Auto mode no longer prompts for any GDS API call. `bypassPermissions` boxes are unaffected (the rule is a no-op there). Laptops / local clones in auto mode now run the autonomous GDS loop hands-free, matching a bypass-mode box.
|
|
41
|
+
- The one-line pattern extends cleanly if a *named* read wrapper (`recall.js`, `status.js`, `me.js`) later turns out to be classifier-gated too — but those are out of scope here; `api.js` is the channel the autonomous loop actually rides.
|
|
42
|
+
- **Follow-up (not blocking):** investigate *why* a box provisioned for `bypassPermissions` (task 1251) still lands builders in auto mode — a Shift+Tab toggle, a failed `~/.claude/settings.json` write, or a Claude Code default change. This allow-rule makes the GDS loop robust regardless of the answer, so it is diagnostics, not a blocker.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# 0105 — Instance/product seed data out of the core migration path
|
|
2
|
+
|
|
3
|
+
- **Status:** Accepted
|
|
4
|
+
- **Date:** 2026-07-02
|
|
5
|
+
- **Deciders:** Lars (owner) · Claude (Opus 4.8)
|
|
6
|
+
- **Track:** `internal` (Cloud Bongos)
|
|
7
|
+
- **Relates to:** [ADR 0062](<redacted>.md) (core ↔ host / instance model), [ADR 0083](<redacted>.md) (module-owned migrations — the enabled-gated precedent this generalizes). Executed under task [#1704](https://example.com/builders#/task/1704); the tactical predecessor was task [#1264](https://example.com/builders#/task/1264) (the 172/173 guards).
|
|
8
|
+
- **Amended by:** [ADR 0108](<redacted>.md) §5 — under configurable-root, `migrations/instance/` becomes a genuinely SEPARATE repo's directory (not a subtree of the same checkout), and two independently-versioned repos both adding `NNN_*.sql` will collide on the shared `schema_migrations` stem key. §5 commits to a namespacing/lineage discipline before that ships (task 1885, W5); this ADR's basename-merge-sort ordering and stem-key idempotency in `migrate.sh` are the mechanism §5 extends, not replaces.
|
|
9
|
+
|
|
10
|
+
## Context
|
|
11
|
+
|
|
12
|
+
`scripts/migrate.sh` applies **every** file in `migrations/*.sql` on **every** Cloud Bongos instance. But ~16 of those files embed **OTB/product scope-truth** — `INSERT`s into `versions`, `goals`, `done_when_criteria` for OTB's specific project history (game V1/V2/V3, the PMS/GDS/BONGOS platform versions, the goal hierarchy). On a fresh **vanilla self-host** DB those rows either:
|
|
13
|
+
|
|
14
|
+
- **Crash the boot** — a seed that references a row created out-of-band on OTB (e.g. the V2/V3 game versions and goal 10, which were created via the API, not by any migration) hits a foreign-key violation, and `docker compose up` crash-loops. This is the 2026-07-02 self-host regression.
|
|
15
|
+
- **Pollute the DB** — a self-contained seed (one that creates its own version) runs fine but leaves a vanilla instance carrying OTB's versions/goals/criteria, which a fresh instance has no business owning.
|
|
16
|
+
|
|
17
|
+
Task [#1264](https://example.com/builders#/task/1264) patched the two *crashers* (migrations 172, 173) with per-migration `DO`-block guards keyed on the presence of the referenced OTB rows. That stopped the crash but left the **class** latent: the other ~14 seed migrations still pollute, and nothing stops the next one from re-introducing a crasher. Two adjacent findings: the `MEDUSA_GDS_ONLY` env var was **documented as the vanilla marker but read by no code** (vestigial), and the self-host "does a fresh DB boot?" check (task [#1264](https://example.com/builders#/task/1264)) was a **manual** verification — CI had no Postgres and no Docker job, so the whole class was invisible to CI.
|
|
18
|
+
|
|
19
|
+
An audit of migrations 001..183 classified them: **10 pure seed files** (no schema — e.g. the `*_planning_seed` files, 172, 173, 182, 183) and **6 mixed schema+seed files** (003, 006, 019, 065, 067, 160). Of the mixed ones, only 003 and 006 *create* OTB scope-truth (versions + their criteria); 019 renames (no-ops on a vanilla DB), 160 self-derives its goals from `versions` (empty ⇒ zero goals), and 065/067 seed **generic platform system principals** (`bfg-system`, `discord-bot-system`) that are not OTB scope-truth.
|
|
20
|
+
|
|
21
|
+
## Decision
|
|
22
|
+
|
|
23
|
+
**Instance/product seed data is a declared class that does not run on a non-owning instance.** Concretely:
|
|
24
|
+
|
|
25
|
+
1. **A dedicated `migrations/instance/` directory** holds the 10 pure seed files (relocated via `git mv` — the stem-key tracking in `migrate.sh` means moving a file never re-runs it on OTB prod). This makes the class visible on disk and is the home for any future instance seed.
|
|
26
|
+
|
|
27
|
+
2. **`migrate.sh` applies instance seeds only for the owning instance, and defaults OFF.** A single `SEED_INSTANCE` decision:
|
|
28
|
+
- `on` only when `GDS_APPLY_INSTANCE_SEEDS=1` is set explicitly;
|
|
29
|
+
- `off` by default, and **hard `off`** when `MEDUSA_GDS_ONLY=1` (which reviving gives that var a real consumer at last).
|
|
30
|
+
|
|
31
|
+
`off` is the safe default for **every** fresh non-owning DB — a vanilla self-host *and* a branded third-party instance — so neither ever inherits OTB's data. The owning instance opts in only when rebuilding its DB from scratch (a DR runbook step); a normal OTB deploy never needs it, because those rows are already in `schema_migrations` and are skipped as-applied regardless.
|
|
32
|
+
|
|
33
|
+
3. **Order is preserved.** `migrate.sh` merges `migrations/*.sql` and (when on) `migrations/instance/*.sql` into one list **sorted by filename basename**, so the original global numeric sequence is intact — e.g. instance seed `018` still applies before core rename `019`. A from-scratch OTB replay reproduces the original 5 versions / 11 goals / 43 criteria exactly.
|
|
34
|
+
|
|
35
|
+
4. **The unavoidable seed blocks embedded in the mixed files 003/006 are guarded in place.** `SEED_INSTANCE` is exposed to SQL as the `app.seed_instance_data` GUC (via `PGOPTIONS`, inherited by every `psql`), and each OTB version/criteria `INSERT` is wrapped in `IF current_setting('app.seed_instance_data', true) IS DISTINCT FROM 'off' THEN … END IF`. Platform-universal seeds (achievements) and the `schema_migrations` self-registration stay ungated. Default (GUC unset, e.g. a direct `psql -f`) = seed, so nothing about the historical files' behaviour changes outside `migrate.sh`.
|
|
36
|
+
|
|
37
|
+
5. **A CI gate makes it un-regressable.** A `selfhost-boot.yml` workflow spins a fresh `postgres:16` service, runs `migrate.sh`, and asserts (a) a **vanilla** boot exits 0 with zero OTB versions/goals/criteria (but achievements present), and (b) an **owning-instance** boot seeds versions. The workflow is authored, but its **landing is gated on blocker 52** — a GitHub App cannot push/merge `.github/workflows/*` changes, which currently strands such PRs at `confirmed` (it stalled task [#1310](https://example.com/builders#/task/1310) the same way). So the structural fix lands on its own first; the gate lands in a follow-up once blocker 52 is resolved (grant the App the `workflows` permission) or via a one-off owner merge, after which the operator flips it to a required check on `main`.
|
|
38
|
+
|
|
39
|
+
**System principals kept.** `bfg-system` (the `sessions` module is `default: true`) and `discord-bot-system` are generic, inert (`status=inactive`) platform accounts, not OTB scope-truth, and remain on a vanilla instance.
|
|
40
|
+
|
|
41
|
+
## Consequences
|
|
42
|
+
|
|
43
|
+
- A vanilla `docker compose up` now boots on a fresh DB with **only schema + platform-universal defaults** — no crash, no foreign-key failure, no leftover OTB versions/goals/criteria. Verified end-to-end against a throwaway `postgres:16-alpine`.
|
|
44
|
+
- OTB prod is **unaffected**: every seed is already recorded in `schema_migrations`, so nothing re-runs; a from-scratch OTB DR sets `GDS_APPLY_INSTANCE_SEEDS=1` and replays identically.
|
|
45
|
+
- The self-host regression class moves from a manual check toward a CI gate (`selfhost-boot.yml`, authored here) — closing the same "un-gated proof" gap that bit C9, once blocker 52 lets the workflow land.
|
|
46
|
+
- **Trade-off:** OTB DR now requires the explicit opt-in flag (documented in `docs/recipes/self-host.md`), chosen over auto-detecting "am I OTB" so that a *branded* self-host can never inherit OTB's seeds. The forward norm (already the practice, per migration 172's header) is to seed instance scope-truth via API/`seed-*.js` scripts, not migrations.
|
|
47
|
+
- **Deferred:** an authoring-time `fitness.js` check that flags a new instance-seed `INSERT` in core `migrations/` was considered but not shipped — it false-positives on legitimately-derived seeds (160's `INSERT … SELECT FROM versions`), and the `selfhost-boot.yml` gate already catches the regression empirically. Revisit if the class recurs.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# 0106 — Goal owner/manager authority: fixed owner (creator), promotable managers, owner-only demotion and transfer
|
|
2
|
+
|
|
3
|
+
- **Status:** Accepted
|
|
4
|
+
- **Date:** 2026-07-03
|
|
5
|
+
- **Deciders:** jaxri (Metic, owner request), Claude
|
|
6
|
+
|
|
7
|
+
**Builds on / amends:** [ADR 0086](<redacted>.md) (goal-scoped work hierarchy — this ADR refines its membership-role semantics), [ADR 0016](<redacted>.md) (server-enforced rank boundary — unchanged), [ADR 0090](<redacted>.md) (Metic authoring powers — the rank floor this ADR reuses for ownership).
|
|
8
|
+
|
|
9
|
+
**Track:** `internal` (GDS / methodology — a Cloud Bongos platform capability).
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Context
|
|
14
|
+
|
|
15
|
+
Migration 160 gave `goal_members` a `role ∈ {lead, member}` column, but the only
|
|
16
|
+
role-assignment path was the Archon admission route (`POST /goals/:id/members`).
|
|
17
|
+
Task [#1735](https://example.com/builders#/task/1735) was specced as "lead
|
|
18
|
+
self-management" with **leads as equals**: any lead promotes/demotes any lead,
|
|
19
|
+
"transfer lead" = promote-then-self-demote, invariant "never below one lead."
|
|
20
|
+
|
|
21
|
+
Mid-build, the owner request refined the model into a fixed hierarchy: the goal
|
|
22
|
+
**creator is the owner**; owners promote **managers**; managers hold the owner's
|
|
23
|
+
powers *except* goal disposition; and creation stays rank-gated. Three decisions
|
|
24
|
+
were made explicitly with the requester:
|
|
25
|
+
|
|
26
|
+
1. **No delete.** Goals are never hard-deleted (the GDS is a permanent ledger);
|
|
27
|
+
archive stays as it is today (any Metic+ member, reversible).
|
|
28
|
+
2. **Ownership is transferable**, owner-only (plus the Archon arm).
|
|
29
|
+
3. **Demotion is owner-only.** Managers promote members up; only the owner (or
|
|
30
|
+
an Archon) demotes a manager back down.
|
|
31
|
+
|
|
32
|
+
## Decision
|
|
33
|
+
|
|
34
|
+
Two authority layers, deliberately different *kinds*:
|
|
35
|
+
|
|
36
|
+
| Layer | Where it lives | Powers |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| **Owner** | `goals.created_by` — a column, **not** a role row. Set at create; moved only by explicit transfer. | Everything: promote, demote, transfer. |
|
|
39
|
+
| **Manager** | `goal_members.role = 'lead'` (the hall renders it "manager"). | Owner-equivalent except: cannot demote a manager, cannot transfer ownership. |
|
|
40
|
+
|
|
41
|
+
- **Creator becomes owner at create** — `db.createGoal` also upserts the
|
|
42
|
+
creator's `lead` membership row in the same statement, so the owner always
|
|
43
|
+
appears in their own member list. A one-shot module migration
|
|
44
|
+
(`<redacted>`) backfills pre-existing goals' creators the
|
|
45
|
+
same way. Goals with `created_by NULL` (the migration-160 system defaults)
|
|
46
|
+
have **no owner by design**; Archons act as one. Deliberately **no
|
|
47
|
+
earliest-member fallback** in the backfill — promoting someone on an
|
|
48
|
+
ownerless goal would grant authority nobody asked for (fail-closed).
|
|
49
|
+
- **`PATCH /goals/:id/members/:builderId {role}`** — the role-change surface.
|
|
50
|
+
Middleware is `requireBuilder` only; the wall is the in-handler PURE ordered
|
|
51
|
+
gate (`authorizeMemberRoleChange`, the `authorizeGoalTaskCreate` precedent):
|
|
52
|
+
goal exists → goal open → actor is owner|manager|Archon → target is a member
|
|
53
|
+
→ no-op same-role → demotions owner|Archon-only → **the owner's row is never
|
|
54
|
+
demotable** (`owner_role_fixed` — owner authority is `created_by`, so a
|
|
55
|
+
demoted owner row would just lie to the member list; transfer first). The DB
|
|
56
|
+
write (`setGoalMemberRole`) re-asserts the owner guard **inside the UPDATE**
|
|
57
|
+
so a race cannot demote an owner.
|
|
58
|
+
- **`POST /goals/:id/transfer {builder_id}`** — owner (or Archon) hands the
|
|
59
|
+
goal over. The old owner keeps their `lead` row (drops to manager, not out);
|
|
60
|
+
the new owner's membership upserts to `lead` in the same statement that moves
|
|
61
|
+
`created_by`. **The new owner must be Metic+**: goal creation is Metic+
|
|
62
|
+
([ADR 0086](<redacted>.md) / R57), ownership is
|
|
63
|
+
creator-equivalent authority, and this also keeps the protected-scope
|
|
64
|
+
membership wall intact (a protected-scope goal requires Metic+ members).
|
|
65
|
+
- **Creation rank gate: unchanged.** `POST /goals` was already
|
|
66
|
+
`requireRank('metic','archon')` (Archon-only for protected scope) — the
|
|
67
|
+
owner request's "only Archons or Metics can create" was already enforced.
|
|
68
|
+
- **Pins:** both new routes are pinned `any-builder` in
|
|
69
|
+
`route-rank-check.MODULE_EXPECTED_RANKS['lifecycle']` — like the authoring
|
|
70
|
+
keystone, the wall is in-handler, and the pin makes an accidental
|
|
71
|
+
`requireRank` re-gate (or a gate removal) a red build.
|
|
72
|
+
|
|
73
|
+
## Consequences
|
|
74
|
+
|
|
75
|
+
- The "never below one lead" invariant from the original task spec is **gone**
|
|
76
|
+
— it existed to keep *someone* in charge, and a fixed owner does that job
|
|
77
|
+
with less machinery. Manager count may legitimately be zero.
|
|
78
|
+
- The hall Goals page can light up role controls (owner/manager framing) and a
|
|
79
|
+
transfer action; task [#1736](https://example.com/builders#/task/1736)'s
|
|
80
|
+
conflict-resolution actions gate on owner/manager instead of "lead."
|
|
81
|
+
- "Delete goal" remains a non-feature. If it is ever wanted, it must come back
|
|
82
|
+
through a new ADR (archive semantics already cover retirement).
|
|
83
|
+
- A demoted-to-member ex-manager retains plain membership (join/leave/author
|
|
84
|
+
within scope) — demotion is not expulsion.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# ADR 0107 — Module upstreaming: instances contribute modules into the shared core catalog
|
|
2
|
+
|
|
3
|
+
- **Status:** Accepted
|
|
4
|
+
- **Date:** 2026-07-03
|
|
5
|
+
- **Track:** internal
|
|
6
|
+
- **Task:** [#1766](https://example.com/builders#/task/1766) (BV1) — the owner-review decision this ADR records + the initiative it seeds.
|
|
7
|
+
- **Builds on:** [ADR 0062](<redacted>.md) §1 (portable-core / host-instance / gated feature-module cut-line), [ADR 0083](<redacted>.md) (the module system — loader, manifest, seams, module-owned migrations), [ADR 0098](<redacted>.md) (`isPublishable()` — what a module may contain to enter an AGPL core), [ADR 0065](<redacted>.md) (AGPL-3.0, non-profit, AI-first — and its explicit rejection of CLA-relicensing as "capture").
|
|
8
|
+
- **Complements:** [ADR 0100](<redacted>.md) / [ADR 0103](<redacted>.md) — those define the **distribution** arrow (core → instance, a pinned versioned dependency). This ADR defines the **reverse** arrow (instance → core): an instance's module flows *upstream* into the shared catalog. The two arrows together make the module boundary a two-way membrane.
|
|
9
|
+
|
|
10
|
+
## Context
|
|
11
|
+
|
|
12
|
+
ADR 0103 makes the Cloud Bongos core its own repository — the product — with instances (Example, Mercury) consuming a pinned core and layering their own modules on top. That is one-directional: fixes and features flow core → instance.
|
|
13
|
+
|
|
14
|
+
The owner's direction (2026-07-03): an instance also builds feature modules of its own, and **should be able to submit those modules for approval to be merged into the shared core** — so the core accumulates a growing catalog of modules built by the sub-projects, each **credited to its author and its origin project**. A module accepted into core becomes available (opt-in) to *every* instance.
|
|
15
|
+
|
|
16
|
+
A read-only audit of the current codebase (task [#1766](https://example.com/builders#/task/1766)) established ground truth:
|
|
17
|
+
|
|
18
|
+
- **The prerequisites are solid.** A validated `module.json` manifest ([`src/module-loader/manifest-schema.js`](../../src/module-loader/manifest-schema.js)), a discover→mount loader with a **one-way import boundary** hard-enforced in CI ([`scripts/gds/fitness.js`](../../scripts/gds/fitness.js) Check 12, [ADR 0102](<redacted>.md)), opt-in **default-off** enablement (`config/modules.json` / `config/modules.neutral.json`), module-owned migrations, and the `isPublishable()` publish boundary that already decides which module *shapes* may enter an AGPL core.
|
|
19
|
+
- **The capability is absent.** There is no submission/approval/merge-upstream flow, no catalog/registry (a "marketplace" is an explicitly-deferred future fork in [`docs/design/modular-architecture/01-architecture.md`](../../docs/design/modular-architecture/01-architecture.md)), and the manifest has **no** `author` / `origin` / `license` / `maintainer` fields — adding them fails manifest validation until the schema is extended.
|
|
20
|
+
- **The name "contribution seam" is already taken** — it is the in-process UI/profile extension hook (`contribute`/`contributions`, `CORE_VERSION` 1.1.0). This capability must use a distinct name to avoid confusion: **module upstreaming** / **the module catalog**.
|
|
21
|
+
- **A CI gap:** contributed-module tests only run in core CI if placed at repo-root `tests/`; the runner does not discover `modules/<key>/tests/`.
|
|
22
|
+
|
|
23
|
+
## Decision
|
|
24
|
+
|
|
25
|
+
### 1. The upstreaming flow — submit → review → accept into the catalog.
|
|
26
|
+
|
|
27
|
+
An instance builds a module in its own repo. To land it in core, a **platform-native submission** (`bongos module submit`) packages the module + its attribution metadata + a sign-off, runs the automated pre-checks, and files it into a **rank-gated review queue on the core** — it does **not** grant the instance write access to core (consistent with ADR 0103's "no direct write access"). On acceptance the module lands in the core `modules/<key>/` tree **default-off**, is added to the `isPublishable()` allowlist, and its attribution is recorded. Every instance may then opt in via `config/modules.json`. *(Standard fork-and-PR remains a fallback, but the native flow is canonical because it captures attribution + sign-off and fits the GDS methodology.)*
|
|
28
|
+
|
|
29
|
+
### 2. Attribution is portable metadata, not a cross-database link.
|
|
30
|
+
|
|
31
|
+
Each repo runs its own GDS with its own builder identities ([ADR 0100](<redacted>.md) §3) — there is no shared identity key. So credit **travels with the module**: `module.json` gains `author`, `origin` (origin instance/project), `license`, and `maintainer` fields, captured at submit time. The catalog shows author + origin credit. This is a *record*, not a foreign key.
|
|
32
|
+
|
|
33
|
+
### 3. Reward: credit now, money later.
|
|
34
|
+
|
|
35
|
+
Accepted contributions earn **visible credit** (author + origin in the catalog) immediately. Any monetary reward (drachmae) — and the cross-instance identity/payout mechanics it would require — is **explicitly deferred** to a separate economics decision (owner call, 2026-07-03). This keeps the build unblocked and avoids prematurely solving cross-GDS identity.
|
|
36
|
+
|
|
37
|
+
### 4. Licensing: AGPL-in, sign-off, no CLA.
|
|
38
|
+
|
|
39
|
+
Core is AGPL-3.0 and [ADR 0065](<redacted>.md) rejected CLA-relicensing as capture. So **inbound = outbound**: a contributed module is accepted under AGPL-3.0 with a lightweight **DCO-style sign-off** (the contributor affirms it is their own work, licensed AGPL) — never a copyright-assignment CLA. The `isPublishable()` pre-check runs at **submit time** and rejects anything that cannot be AGPL'd (game content, pixel art, copyrighted reference material).
|
|
40
|
+
|
|
41
|
+
### 5. Security review is a hard accept-gate.
|
|
42
|
+
|
|
43
|
+
A module accepted into core runs **in-process, with full access, in every instance that enables it** — and the "untrusted modules → separate processes" isolation remains a deferred future fork. Therefore acceptance is a **security review**, not a works-check: no module enters the catalog without a reviewer (Metic+/maintainer) clearing it for safety, license, and quality. This is the single highest-risk property of the whole capability.
|
|
44
|
+
|
|
45
|
+
### 6. Default-off + the publish-allowlist is the accept action.
|
|
46
|
+
|
|
47
|
+
An accepted module ships `default: false` — instances opt in; none inherits everyone's features. Because a new module directory publishes only if explicitly added to the `isPublishable()` allowlist (default-deny), "accept into core" is a concrete, fail-safe checklist: add to `modules/`, set `default:false`, add to the allowlist, record attribution.
|
|
48
|
+
|
|
49
|
+
### 7. Maintenance & orphaning policy.
|
|
50
|
+
|
|
51
|
+
A module pinned to an old `coreVersion` rots as core advances. On acceptance a module either becomes **core-maintained** or carries a named **maintainer** and a deprecation path; `bongos upgrade`'s existing `coreVersion` pre-check surfaces incompatibility. The catalog must not fill with silently-broken entries.
|
|
52
|
+
|
|
53
|
+
### 8. Sequencing.
|
|
54
|
+
|
|
55
|
+
The **prerequisites** are direction-agnostic and buildable now in the single repo (dormant until the split): the manifest attribution fields, module-owned test discovery in core CI, and the submit-time AGPL/publish pre-check. The **pipeline** (`bongos module submit` → core-side review/accept → the catalog) depends on there being a core repo to receive into (R88, [#1727](https://example.com/builders#/task/1727)) and a producing consumer (Mercury R85, [#1689](https://example.com/builders#/task/1689)). Do not build the pipeline before the split.
|
|
56
|
+
|
|
57
|
+
### 9. How it's shown to users — the repo atlas + the Modules tab.
|
|
58
|
+
|
|
59
|
+
Two user-facing surfaces, both **UI-first** (a non-technical builder must be able to do all of this with clicks — no terminal required; the CLI verbs are the same actions underneath).
|
|
60
|
+
|
|
61
|
+
- **The repo atlas shows module provenance.** The atlas (`scripts/gds/gen-atlas.js`, `buildModuleView`) gains a clear split so a builder sees, at a glance, **which Cloud Bongos *core* modules this instance loads** versus **which modules the project built itself** (core-loaded vs. own-built). This is the "what am I running, and what's mine" view.
|
|
62
|
+
- **A "Modules" tab in the hall** does three jobs:
|
|
63
|
+
1. **Enable / disable access to core modules** — a toggle UI over the enablement layer (`config/modules.json`), with the default-off contract (§6) respected. This is how an instance opts into the core catalog.
|
|
64
|
+
2. **See the project's own modules** — the instance-specific modules it has built, listed distinctly from core.
|
|
65
|
+
3. **Contribute / submit for review** — a UI-first "submit this module upstream" action that runs the §4 pre-check, captures the DCO sign-off, and files the module into the core review queue (§1). It is the clickable front door to `bongos module submit`; a submitted module then shows its review status, and accepted modules appear in the catalog with author + origin credit (§2).
|
|
66
|
+
|
|
67
|
+
The enable/disable and provenance views are buildable against the existing module system now; the submit-for-review action lights up when the submit pipeline (§8) lands. Tracked by [#1776](https://example.com/builders#/task/1776) (the tab + atlas provenance), with the catalog view in [#1772](https://example.com/builders#/task/1772) and the submit flow in [#1770](https://example.com/builders#/task/1770).
|
|
68
|
+
|
|
69
|
+
## Alternatives considered (rejected)
|
|
70
|
+
|
|
71
|
+
- **Fork-and-PR only.** Standard OSS, but loses attribution/sign-off capture and doesn't fit the GDS review/approval methodology. Kept as a fallback, not the canonical path.
|
|
72
|
+
- **A CLA granting relicensing rights.** Rejected by [ADR 0065](<redacted>.md) as capture; incompatible with the non-profit posture.
|
|
73
|
+
- **Auto-accept / CI-only gate (no security review).** Rejected — a module runs in every enabling instance with no sandbox; unreviewed inbound code is a supply-chain compromise across all instances.
|
|
74
|
+
- **Accepted modules default-on.** Rejected — every instance would inherit every contributed feature; breaks the "fail-to-vanilla" default-off contract.
|
|
75
|
+
- **A package marketplace now.** Rejected as premature (the design docs defer it); the in-repo catalog is the smaller first step.
|
|
76
|
+
|
|
77
|
+
## Consequences
|
|
78
|
+
|
|
79
|
+
- **The module boundary and `isPublishable()` become load-bearing for the *inbound* direction too**, not just outbound distribution — the ADR 0062 / ADR 0102 fitness functions matter more.
|
|
80
|
+
- **Core CI must run contributed-module tests** — the runner is extended to discover `modules/<key>/tests/` so contributions are self-contained (closes the audit's CI gap).
|
|
81
|
+
- **A review/maintainer role emerges** on the core repo (Metic+), with security + license + quality as the acceptance bar.
|
|
82
|
+
- **Cross-instance identity stays an open question**, deferred with the reward economics (§3).
|
|
83
|
+
- **Tooling note:** seeding this initiative's goal + criteria + task-attachment + spine consolidation is done via a **guarded data-migration**, because the GDS HTTP API cannot create done-when criteria, attach a task to a goal, or reparent an orphan (only `POST /goals` + goal-less `POST /tasks` + dependencies are API-exposed). That API gap is itself filed as a follow-up — the planning surface should not require hand-written SQL.
|