@bongos/core 1.19.715 → 1.19.724
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.bongos-core.json +472 -407
- package/.claude/skills/backlog-review/SKILL.md +3 -3
- package/.claude/skills/blocker-review/SKILL.md +1 -1
- package/.claude/skills/blocker-solve/SKILL.md +2 -2
- package/.claude/skills/builder-reauth/SKILL.md +1 -1
- package/.claude/skills/builder-redteam/SKILL.md +1 -1
- package/.claude/skills/builder-ship/SKILL.md +1 -1
- package/.claude/skills/builder-start/SKILL.md +1 -1
- package/.claude/skills/design/SKILL.md +2 -2
- package/.claude/skills/feedback/SKILL.md +1 -1
- package/.claude/skills/goal-create/SKILL.md +1 -1
- package/.claude/skills/goal-review/SKILL.md +2 -2
- package/.claude/skills/idea-triage/SKILL.md +5 -5
- package/.claude/skills/merge-mode/SKILL.md +4 -4
- package/.claude/skills/new-project/SKILL.md +17 -17
- package/.claude/skills/planning-session/SKILL.md +11 -11
- package/.claude/skills/recall/SKILL.md +2 -2
- package/.claude/skills/strand-fix/SKILL.md +1 -1
- package/.devcontainer/README.md +2 -2
- package/CONTRIBUTING.md +2 -2
- package/GOVERNANCE.md +4 -4
- package/clients/bongos-client/README.md +1 -1
- package/clients/bongos-client/bongos-client.global.js +4 -0
- package/clients/bongos-client/index.cjs +4 -0
- package/clients/bongos-client/index.d.ts +5 -0
- package/clients/bongos-client/index.mjs +4 -0
- package/config/branding.neutral.json +4 -2
- package/docs/adr/0001-stack-choice-single-vps.md +2 -2
- package/docs/adr/0002-digitalocean-over-hetzner.md +1 -1
- package/docs/adr/0008-google-chat-oauth-user-auth.md +1 -1
- package/docs/adr/0009-autotile-architecture.md +1 -1
- package/docs/adr/0011-terrain-id-rendering-model.md +3 -3
- package/docs/adr/0013-paths-as-object-overlays-with-autotile-dispatch.md +1 -1
- package/docs/adr/0014-families-canonical-over-vocabulary.md +1 -1
- package/docs/adr/0015-task-dependencies-and-auto-promotion.md +1 -1
- package/docs/adr/0016-trust-boundary-server-enforced-permissions.md +1 -1
- package/docs/adr/0018-three-rank-model-goes-live.md +3 -3
- package/docs/adr/0020-security-model-public-stub.md +9 -9
- package/docs/adr/0021-per-builder-skill-model-preferences.md +2 -2
- package/docs/adr/0022-secrets-policy.md +5 -5
- package/docs/adr/0024-cloneable-repo-local-first-memory.md +3 -3
- package/docs/adr/0024-multi-agent-system-architecture.md +10 -10
- package/docs/adr/0025-offsite-backup-vendor-digitalocean-spaces.md +1 -1
- package/docs/adr/0025-structured-criterion-task-link.md +1 -1
- package/docs/adr/0026-bfg-memory-hygiene-and-cross-builder-learning.md +13 -13
- package/docs/adr/0027-bfg-session-inefficiency-evaluator.md +14 -14
- package/docs/adr/0029-status-page-outage-resilience.md +1 -1
- package/docs/adr/0030-builders-hall-live-updates.md +1 -1
- package/docs/adr/0031-cloud-dev-environments-for-builders.md +7 -7
- package/docs/adr/0032-discord-mirror-of-gds.md +3 -3
- package/docs/adr/0033-discord-bot-service-principal.md +4 -4
- package/docs/adr/0034-thetes-graduated-newcomer-rank.md +1 -1
- package/docs/adr/0035-builder-onboarding-three-paths.md +4 -4
- package/docs/adr/0036-builders-subdomain-and-ui-reorg.md +1 -1
- package/docs/adr/0037-discord-channel-management.md +1 -1
- package/docs/adr/0038-chromebook-ttyd-cloudflare-tunnel.md +5 -5
- package/docs/adr/0039-setup-first-onboarding-ux.md +6 -6
- package/docs/adr/0040-remote-control-default-browser-onramp.md +3 -3
- package/docs/adr/0041-temporary-grader-bypass-killswitch.md +2 -2
- package/docs/adr/0042-builder-self-deploy-ci-auto-merge.md +5 -5
- package/docs/adr/0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md +2 -2
- package/docs/adr/0044-mediterranean-palette-replacement.md +1 -1
- package/docs/adr/0044-per-box-live-game-preview.md +1 -1
- package/docs/adr/0046-sandbox-first-review-gate.md +1 -1
- package/docs/adr/0047-discord-bugs-intake-anti-abuse.md +1 -1
- package/docs/adr/0049-split-parallel-safety-contract.md +1 -1
- package/docs/adr/0050-device-flow-admission-invite-gated-by-default.md +2 -2
- package/docs/adr/0051-full-session-transcript-corpus.md +2 -2
- package/docs/adr/0052-sandbox-for-everyone-game-only-preview.md +1 -1
- package/docs/adr/0053-scoped-dev-box-session.md +1 -1
- package/docs/adr/0054-session-token-reward-cost-plus.md +7 -7
- package/docs/adr/0055-server-mediated-branch-publish.md +2 -2
- package/docs/adr/0056-prod-deploy-script-mirror-and-healthcheck-retry.md +3 -3
- package/docs/adr/0057-container-cost-ledger.md +1 -1
- package/docs/adr/0057-discord-archon-approval-channels.md +2 -2
- package/docs/adr/0058-automatic-gate-surface-gatekeeper.md +6 -6
- package/docs/adr/0059-single-approval-remove-devbox-approval-gate.md +11 -11
- package/docs/adr/0060-gds-retrieval-layer.md +3 -3
- package/docs/adr/0061-context-layer-decomposition.md +2 -2
- package/docs/adr/0062-medusa-instance-model-decoupling.md +5 -5
- package/docs/adr/0063-generated-repo-map-symbol-skeleton.md +2 -2
- package/docs/adr/0064-rename-medusa-to-cloud-bongos.md +3 -3
- package/docs/adr/0065-agpl-nonprofit-ai-first-governance.md +5 -5
- package/docs/adr/0066-generated-file-map-sections.md +2 -2
- package/docs/adr/0067-session-start-fast-forward-pull.md +1 -1
- package/docs/adr/0068-shared-art-key-for-newcomers.md +1 -1
- package/docs/adr/0069-hall-live-channel-sse-decouple.md +3 -3
- package/docs/adr/0070-deterministic-session-card-delivery.md +1 -1
- package/docs/adr/0071-box-confirm-before-destroyed-and-drift-reconcile.md +2 -2
- package/docs/adr/0072-bongos-app-mac-signed-first-windows-deferred.md +2 -2
- package/docs/adr/0072-dev-box-code-staleness-visibility.md +2 -2
- package/docs/adr/0073-builder-needs-signal-and-byok-gemini-key.md +3 -3
- package/docs/adr/0073-secrets-scan-exclude-uri-detector.md +2 -2
- package/docs/adr/0076-in-session-deterministic-compaction.md +2 -2
- package/docs/adr/0077-content-addressed-llm-cache.md +2 -2
- package/docs/adr/0078-deterministic-first-cron.md +3 -3
- package/docs/adr/0079-value-gated-autonomous-engagement.md +2 -2
- package/docs/adr/0080-llm-cache-api-transport-and-trust-model.md +3 -3
- package/docs/adr/0081-tool-agnostic-design-layer.md +3 -3
- package/docs/adr/0082-server-side-merge-conflict-auto-resolution.md +2 -2
- package/docs/adr/0083-modular-architecture-strangler-build-plan.md +3 -3
- package/docs/adr/0085-remove-default-per-builder-spend-cap.md +2 -2
- package/docs/adr/0086-goal-scoped-work-hierarchy.md +15 -15
- package/docs/adr/0087-bongos-app-architecture-and-handoff-contract.md +5 -5
- package/docs/adr/0087-compete-on-governance-not-tooling-cursor.md +1 -1
- package/docs/adr/0088-consistent-character-generative-animation.md +5 -5
- package/docs/adr/0089-modular-multi-model-adversarial-grader.md +15 -15
- package/docs/adr/0090-metic-task-authoring.md +8 -8
- package/docs/adr/0091-bounding-the-kernel-and-db-carve.md +3 -3
- package/docs/adr/0092-hosting-module-and-on-prem-target.md +11 -11
- package/docs/adr/0093-tranche-2-core-carve-sequence.md +5 -5
- package/docs/adr/0094-repo-atlas-self-drawing-codebase-map.md +1 -1
- package/docs/adr/0095-borrowed-memory-and-retrieval-concepts.md +6 -6
- package/docs/adr/0095-cross-agent-context-management.md +5 -5
- package/docs/adr/0096-require-reward-before-workable.md +5 -5
- package/docs/adr/0097-one-active-claim-per-session-and-worktree-binding.md +2 -2
- package/docs/adr/0097-retroactive-reward-backfill.md +4 -4
- package/docs/adr/0098-public-mirror-publish-manifest.md +3 -3
- package/docs/adr/0099-delayed-redacted-mirror-export.md +1 -1
- package/docs/adr/0100-two-repo-instance-model.md +6 -6
- package/docs/adr/0101-goal-hierarchy-phase-5-judge-membership-reward.md +9 -9
- package/docs/adr/0102-finish-bounding-the-kernel.md +1 -1
- package/docs/adr/0103-core-first-extraction-cloud-bongos-trunk.md +6 -6
- package/docs/adr/0103-gdsv4-bongos-consolidation.md +3 -3
- package/docs/adr/0104-trust-gds-api-channel-in-auto-mode.md +3 -3
- package/docs/adr/0105-instance-seed-migrations-out-of-core.md +2 -2
- package/docs/adr/0106-goal-owner-manager-authority.md +2 -2
- package/docs/adr/0107-module-upstreaming-contribution-to-core-catalog.md +6 -6
- package/docs/adr/0108-instance-composition-configurable-root.md +6 -6
- package/docs/adr/0109-self-describing-openapi-and-hosted-docs.md +3 -3
- package/docs/adr/0110-untrack-whole-file-generated-nav-docs.md +1 -1
- package/docs/adr/0111-instance-hosting-provisioning-module.md +18 -18
- package/docs/adr/0112-private-goals-invitations-join-requests.md +7 -7
- package/docs/adr/0113-sandbox-studio-descope-superseded-by-0044-0052.md +1 -1
- package/docs/adr/0114-instance-docs-discovery-contract.md +4 -4
- package/docs/adr/0115-scheduled-routines-portability.md +1 -1
- package/docs/adr/0117-api-versioning-and-deprecation-policy.md +1 -1
- package/docs/adr/0118-api-contract-source-of-truth-code-first.md +1 -1
- package/docs/adr/0120-pay-on-land-and-builder-owned-rebase-gate.md +2 -2
- package/docs/adr/0121-greenfield-vs-brownfield-onboarding-adopt-existing-repo.md +1 -1
- package/docs/adr/0122-onboarding-diagram-renders-deploy-rendered-off-git.md +3 -3
- package/docs/adr/0123-box-idle-sweep-autosave-before-destroy.md +1 -1
- package/docs/adr/0124-typed-api-response-bodies.md +2 -2
- package/docs/adr/0125-control-plane-scaffolds-standalone-instance-repo.md +2 -2
- package/docs/adr/0126-dedicated-cloudbongos-control-plane-droplet.md +3 -3
- package/docs/adr/0127-cross-box-fleet-observability.md +1 -1
- package/docs/adr/0128-provisioning-runner-privilege-and-db-auth-model.md +3 -3
- package/docs/adr/0129-cloudbongos-control-plane-pull-deploy.md +4 -4
- package/docs/adr/0130-provision-remote-exec-over-ssh.md +4 -4
- package/docs/adr/0131-rank-scoped-skill-visibility.md +2 -2
- package/docs/adr/0132-cohost-fleet-control-plane-migration.md +2 -2
- package/docs/adr/0133-github-app-manifest-onboarding-signin.md +1 -1
- package/docs/adr/0134-private-first-npm-distribution.md +3 -3
- package/docs/adr/0135-module-upstream-submission-interim-queue.md +1 -1
- package/docs/adr/0136-update-channel-subscription-policy.md +2 -2
- package/docs/adr/0137-upstream-publish-policy-manual-owner-gated.md +6 -6
- package/docs/adr/0138-bundled-module-deps-declared-per-module.md +4 -4
- package/docs/adr/0142-project-context-is-prose-only.md +2 -2
- package/docs/adr/0143-onboarding-repo-picker-oauth-scope.md +2 -2
- package/docs/adr/0144-devbox-rehome-onto-cloudbongos-plane.md +2 -2
- package/docs/adr/0145-free-hosted-project-tier-isolation-and-domain-separation.md +2 -2
- package/docs/adr/0146-configurable-reward-mode-cost-plus-only.md +4 -4
- package/docs/adr/0147-standalone-live-docs-regen.md +1 -1
- package/docs/adr/0149-bongos-dev-local-launcher.md +1 -1
- package/docs/adr/0150-box-first-boot-bringup-vendored-instances.md +3 -3
- package/docs/adr/0151-governance-permissions-as-atom-ranks-as-roles.md +20 -20
- package/docs/adr/0152-landing-gate-served-by-the-core-app.md +2 -2
- package/docs/adr/0152-metic-task-abandonment.md +7 -7
- package/docs/adr/0153-sequential-chain-runner.md +1 -1
- package/docs/adr/0154-goal-owner-criterion-authoring.md +7 -7
- package/docs/adr/0155-adopt-private-repo-widen-oauth-scope.md +2 -2
- package/docs/adr/0156-user-set-display-name-wins.md +1 -1
- package/docs/adr/0157-archon-is-rank-and-identity-only.md +10 -10
- package/docs/adr/0158-choke-point-verdict-taxonomy.md +1 -1
- package/docs/adr/0159-merge-gate-reconciliation.md +1 -1
- package/docs/adr/0160-main-audit-repo-verifiable-caller.md +1 -1
- package/docs/adr/0161-publish-on-merge.md +2 -2
- package/docs/adr/0163-legacy-display-name-resolution.md +1 -1
- package/docs/adr/0165-instances-hookless-by-default.md +1 -1
- package/docs/adr/0166-module-maintenance-and-deprecation-policy.md +3 -3
- package/docs/adr/0167-gate-trust-link-agpl-default.md +2 -2
- package/docs/adr/0167-module-catalog-source-vs-provenance.md +3 -3
- package/docs/adr/0169-bongos-serve-server-bring-up.md +1 -1
- package/docs/adr/0171-profile-rollup-join-and-consent.md +1 -1
- package/docs/adr/0172-editable-rank-roles-substrate-axis.md +2 -2
- package/docs/adr/0172-per-craft-compensation-ideator-credit-lane.md +4 -4
- package/docs/adr/0173-legacy-multi-ship-shortfall-not-backfilled.md +1 -1
- package/docs/adr/0174-government-terminology-ranks-not-roles.md +1 -1
- package/docs/adr/0177-goal-membership-kind.md +3 -3
- package/docs/adr/0178-the-copy-desk-flag-and-queue.md +1 -1
- package/docs/adr/0179-board-membership-predicate-grammar.md +1 -1
- package/docs/adr/0181-teardown-state-gate-and-address-retention.md +1 -1
- package/docs/adr/0182-project-visibility-two-axes.md +1 -1
- package/docs/adr/0183-criteria-close-themselves.md +1 -1
- package/docs/adr/0184-ship-requires-an-assurance.md +1 -1
- package/docs/adr/0185-spark-handoff-credit-split.md +1 -1
- package/docs/adr/0186-per-project-idea-templates.md +1 -1
- package/docs/adr/0187-collab-four-decisions.md +1 -1
- package/docs/adr/0187-oauth-handshake-cookie-lifetime.md +1 -1
- package/docs/adr/0188-patrol-runs-on-ci-not-the-server.md +2 -2
- package/docs/adr/0189-baseline-floors-and-the-freeze-detector.md +2 -2
- package/docs/adr/0191-majority-and-the-author-who-may-not-decide-alone.md +1 -1
- package/docs/adr/0192-a-category-orients-and-authorises-nothing.md +2 -2
- package/docs/adr/0193-pause-task-scoped-box-slices.md +1 -1
- package/docs/adr/0195-adr-numbers-are-checked-like-migration-numbers.md +2 -2
- package/docs/adr/0196-chrome-world-token-contract-and-the-landing-sheets.md +2 -2
- package/docs/adr/0197-the-ui-design-module.md +1 -1
- package/docs/adr/0198-third-party-skill-vendoring-policy.md +1 -1
- package/docs/adr/0203-doorway-changelog-out-of-module-api.md +2 -2
- package/docs/adr/0204-the-apex-is-dark-only.md +2 -2
- package/docs/adr/0205-federated-checkin-needs-the-hubs-own-signin-witness.md +1 -1
- package/docs/adr/0206-own-scoped-session-revocation-no-absolute-ceiling.md +1 -1
- package/docs/adr/0207-connections-implementation-departures-and-honest-limits.md +1 -1
- package/docs/adr/0208-application-lifecycle-the-handle-waits-and-the-vouch-has-no-minter.md +2 -2
- package/docs/adr/0209-one-budget-for-the-account-existence-oracle.md +1 -1
- package/docs/adr/0210-scouting-graduates-on-an-instance-asserted-owner-claim.md +1 -1
- package/docs/adr/0212-connections-on-the-profile-surface-and-addressing.md +1 -1
- package/docs/adr/0213-platform-terms-acceptance-is-the-hubs-own-witness.md +2 -2
- package/docs/adr/0215-the-recruiter-sliver-is-a-ceiling-not-a-step.md +6 -6
- package/docs/adr/0216-a-fake-pool-interpreter-must-fail-loudly-not-silently-ignore.md +2 -2
- package/docs/adr/0217-rank-gates-inviting-not-viewing.md +1 -1
- package/docs/adr/0218-the-apex-root-web-surface.md +2 -2
- package/docs/adr/0219-a-look-is-a-branding-pack-the-style-library.md +1 -1
- package/docs/adr/0220-an-in-house-rebuilt-skill-is-a-first-party-skill.md +1 -1
- package/docs/adr/0221-the-impeccable-method-is-one-skill-with-sub-command-playbooks.md +2 -2
- package/docs/adr/0222-the-image-family-under-the-hero-only-rule.md +2 -2
- package/docs/adr/0223-the-detector-is-two-tiers-in-the-kit.md +3 -3
- package/docs/adr/0224-module-skills-reach-the-core-checkout-as-untracked-self-ignored-copies.md +1 -1
- package/docs/adr/0225-privacy-suppresses-cross-project-surfaces-only.md +1 -1
- package/docs/adr/0226-one-stale-timer-reporting-degrades-enforcement-refuses.md +1 -1
- package/docs/adr/0227-a-task-network-map-is-refused-the-goal-graph-is-the-map.md +1 -1
- package/docs/adr/0230-a-look-skill-is-a-composition-grammar-the-palette-is-the-pack.md +1 -1
- package/docs/adr/0231-the-style-session-an-owner-authors-a-look-inside-the-contract.md +2 -2
- package/docs/adr/0232-rot-is-derived-not-swept-and-water-is-the-only-new-verb.md +2 -2
- package/docs/adr/0233-a-copy-proposal-is-a-task-carrying-a-patch.md +2 -2
- package/docs/adr/0234-idea-routing-capture-time-promotion-landing-matrix-homeless-inbox.md +2 -2
- package/docs/adr/0235-a-fix-category-is-kindbug-under-a-goal-no-column-required.md +11 -11
- package/docs/adr/0236-many-ideas-one-task-the-lineage-key-is-the-pair.md +5 -5
- package/docs/adr/0237-a-starter-bundle-is-a-preset-over-the-always-on-core-keyed-by-declared-type.md +5 -5
- package/docs/adr/0238-the-join-door-is-a-provisioning-settings-policy-key.md +1 -1
- package/docs/adr/0239-a-recommendation-is-a-table-that-carries-its-own-reason.md +4 -4
- package/docs/adr/0240-a-skipped-module-picker-stores-nothing-and-resolves-the-bundle-on-read.md +4 -4
- package/docs/adr/0241-the-artist-gate-is-a-per-project-deploy-gate-that-reads-a-state.md +1 -1
- package/docs/adr/0242-a-cascade-is-a-declaration-table-on-the-event-that-already-exists.md +2 -2
- package/docs/adr/0243-a-bundle-adjustment-belongs-to-the-bundle-not-the-advice-about-it.md +4 -4
- package/docs/adr/0244-a-catalog-search-is-a-view-over-the-rows-never-an-edit-to-the-selection.md +3 -3
- package/docs/adr/0245-the-way-back-into-an-optional-step-is-that-step-s-own-answer-route.md +7 -7
- package/docs/adr/0246-catalog-membership-is-a-projection-not-a-federation-side-effect.md +1 -1
- package/docs/adr/0247-the-join-door-is-one-composed-answer-and-dark-matter-has-no-live-verdict-yet.md +2 -2
- package/docs/adr/0248-a-hub-project-s-owner-is-the-provisioning-row-carried-on-a-port.md +3 -3
- package/docs/adr/0249-the-invite-step-is-the-done-panel-s-first-act-not-a-rail-step.md +3 -3
- package/docs/adr/0250-strict-versioning-the-version-boundary-is-the-scope-gate.md +6 -6
- package/docs/adr/0251-a-suggestion-of-who-to-invite-is-a-recruiting-surface-and-owes-the-opt-out.md +5 -5
- package/docs/adr/0252-the-self-hosted-visibility-report-is-a-pull-and-auto-appear-buys-a-retraction-lever.md +19 -19
- package/docs/adr/0253-the-takedown-lever-has-two-writers-and-provenance-is-a-column.md +2 -2
- package/docs/adr/0254-a-relayed-link-is-contained-downward-or-it-is-not-published.md +6 -6
- package/docs/adr/0255-a-public-lists-ordering-is-part-of-its-payload.md +2 -2
- package/docs/adr/0256-the-visibility-ceiling-is-the-sign-in-gate-too-and-the-reader-moves-to-the-composer.md +3 -3
- package/docs/adr/0257-auth-resolves-before-the-hall-mounts-anything.md +1 -1
- package/docs/adr/0258-the-public-cli-is-a-generated-client-package-not-the-published-core.md +1 -1
- package/docs/adr/0259-a-projects-departure-from-the-public-list-is-public.md +7 -7
- package/docs/adr/0260-the-application-is-the-consent-and-the-echo-is-the-gate.md +4 -4
- package/docs/adr/0261-a-preselect-always-carries-a-reason-the-bundle-summary-is-the-floor.md +1 -1
- package/docs/adr/0262-a-bug-never-lands-in-the-inbox.md +1 -1
- package/docs/adr/0263-how-a-version-closes.md +3 -3
- package/docs/adr/0264-the-ten-working-areas.md +3 -3
- package/docs/adr/0265-work-with-no-goal-and-the-order-the-cut-needs.md +5 -5
- package/docs/adr/0266-the-board-room-is-its-own-surface-reachable-by-whoever-may-vote.md +2 -2
- package/docs/adr/0267-unanimity-and-the-revise-and-re-sit-loop.md +1 -1
- package/docs/adr/0268-the-constitution-comes-from-two-roots.md +3 -3
- package/docs/adr/0269-the-cli-session-store-is-host-keyed-at-a-fixed-anchor.md +1 -1
- package/docs/adr/0270-rank-floor-derives-without-a-prediction.md +2 -2
- package/docs/adr/0271-the-ideator-surface-is-two-halves.md +3 -3
- package/docs/adr/0272-a-craft-is-an-identity-not-a-toolchain.md +4 -4
- package/docs/adr/0273-hall-nav-can-gate-on-a-permission.md +1 -1
- package/docs/adr/0274-one-kernel-three-role-packs.md +1 -1
- package/docs/adr/0275-one-source-for-a-written-role-responsibility.md +1 -1
- package/docs/adr/0276-the-skill-listing-budget-cannot-hold-every-trigger.md +1 -1
- package/docs/adr/0277-a-box-is-in-use-only-while-a-human-is-attached.md +1 -1
- package/docs/adr/0278-a-gated-project-still-takes-applications.md +2 -2
- package/docs/adr/0279-an-upgrade-is-proven-by-the-served-version-not-the-health-check.md +1 -1
- package/docs/adr/0280-the-unattended-lane-may-drive-a-co-tenant-because-the-roster-is-the-decision.md +1 -1
- package/docs/adr/0281-an-instance-identity-is-its-own-unix-account-and-pg-role.md +2 -2
- package/docs/adr/README.md +294 -294
- package/docs/api/openapi.json +72 -5
- package/docs/api-reference.md +8 -2
- package/docs/architecture.md +22 -22
- package/docs/branding-contract.md +5 -5
- package/docs/canonical-permissions.md +22 -22
- package/docs/design/hall-direction-v2.md +3 -3
- package/docs/design/landing-page-direction-v2.md +1 -1
- package/docs/design/projects-hub-direction-v2.md +1 -1
- package/docs/file-map.md +3 -1
- package/docs/module-api-changelog.md +34 -1
- package/docs/modules-contract.md +25 -25
- package/docs/onboarding/browser-terminal-guide.md +1 -1
- package/docs/onboarding/diagrams/README.md +3 -3
- package/docs/onboarding/drachmae-and-karma.md +13 -13
- package/docs/onboarding/primer.md +7 -7
- package/docs/packs/artist.md +1 -1
- package/docs/packs/ideator.md +1 -1
- package/docs/project-context.template.md +3 -3
- package/docs/recipes/builder-box-lifecycle.md +5 -5
- package/docs/recipes/claude-design-loop.md +1 -1
- package/docs/recipes/core-release-pipeline.md +55 -14
- package/docs/recipes/figma-design-loop.md +1 -1
- package/docs/recipes/gds-db-backup.md +2 -2
- package/docs/recipes/instance-deploy.md +2 -2
- package/docs/recipes/instance-service-restart.md +3 -3
- package/docs/recipes/local-dev.md +2 -2
- package/docs/recipes/managed-settings-remote-control.md +3 -3
- package/docs/recipes/memory-backup.md +4 -4
- package/docs/recipes/memory-sync-conflicts.md +2 -2
- package/docs/recipes/multi-builder-merge.md +2 -2
- package/docs/recipes/ops-gotchas.md +4 -4
- package/docs/recipes/overnight-builder.md +1 -1
- package/docs/recipes/packaging-the-core.md +6 -6
- package/docs/recipes/private-npm-distribution.md +5 -5
- package/docs/recipes/search-index-ingestion.md +3 -3
- package/docs/recipes/self-host.md +5 -5
- package/docs/recipes/server-bring-up.md +1 -1
- package/docs/recipes/ship-and-regrade.md +2 -2
- package/docs/recipes/standalone-live-docs.md +1 -1
- package/docs/recipes/ui-look-before-you-ship.md +1 -1
- package/docs/recipes/upgrading-the-core.md +2 -2
- package/docs/recipes/work-on-a-task-from-your-dev-box.md +6 -6
- package/docs/research/cursor-competitive-analysis.md +3 -3
- package/docs/research/llm-model-agnostic-and-cheaper-grader.md +7 -7
- package/migrations/core_240_artist_gate_indexes.sql +48 -0
- package/migrations/core_240_goal_members_drop_legacy_role.sql +79 -0
- package/modules/dev-box/app/src/vendor/bongos-client.cjs +4 -0
- package/modules/lifecycle/cascade.js +37 -9
- package/modules/lifecycle/db-claims.js +5 -2
- package/modules/lifecycle/db-goals.js +4 -3
- package/modules/lifecycle/db-overrides.js +117 -4
- package/modules/lifecycle/db-tasks.js +63 -0
- package/modules/lifecycle/migrations/lifecycle_001_goal_first_leads.sql +12 -4
- package/modules/lifecycle/module.json +2 -1
- package/modules/lifecycle/pg-constraint-fail.js +49 -0
- package/modules/lifecycle/routes/artist-gate.js +101 -0
- package/modules/lifecycle/routes/claims.js +13 -1
- package/modules/lifecycle/routes/lifecycle.js +6 -0
- package/modules/lifecycle/routes/task-write-routes.js +7 -0
- package/modules/lifecycle/routes/tasks.js +24 -0
- package/modules/lifecycle/task-classifier.js +10 -1
- package/modules/lifecycle/tests/cascade.mjs +43 -0
- package/modules/provisioning/provisioning.js +79 -3
- package/modules/provisioning/routes/provisioning.js +6 -1
- package/modules/provisioning/tests/provisioning.mjs +8 -8
- package/modules/security/secret-scrub.js +40 -4
- package/modules/status-ui/public/README.md +1 -1
- package/modules/ui-design/docs/design-contract.md +2 -2
- package/modules/ui-design/kit/README.md +1 -1
- package/modules/ui-design/kit/serve.js +1 -0
- package/modules/ui-design/skills/README.md +6 -6
- package/modules/ui-design/skills/brandkit/SKILL.md +1 -1
- package/modules/ui-design/skills/design-taste-frontend/SKILL.md +1 -1
- package/modules/ui-design/skills/design-taste-frontend-v1/SKILL.md +1 -1
- package/modules/ui-design/skills/gpt-taste/SKILL.md +1 -1
- package/modules/ui-design/skills/high-end-visual-design/SKILL.md +1 -1
- package/modules/ui-design/skills/image-to-code/SKILL.md +1 -1
- package/modules/ui-design/skills/imagegen-frontend-mobile/SKILL.md +1 -1
- package/modules/ui-design/skills/imagegen-frontend-web/SKILL.md +1 -1
- package/modules/ui-design/skills/impeccable/SKILL.md +1 -1
- package/modules/ui-design/skills/industrial-brutalist-ui/SKILL.md +1 -1
- package/modules/ui-design/skills/minimalist-ui/SKILL.md +1 -1
- package/modules/ui-design/skills/redesign-existing-projects/SKILL.md +1 -1
- package/modules/ui-design/skills/stitch-design-taste/SKILL.md +1 -1
- package/modules/ui-design/skills/style/SKILL.md +2 -2
- package/modules/ui-design/styles/README.md +3 -3
- package/modules/ui-design/styles/blueprint/DESIGN.md +1 -1
- package/modules/ui-design/styles/chrome-world/DESIGN.md +1 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/scripts/gds/audit-rank-roles.js +172 -0
- package/scripts/gds/build-cli-package.js +1 -0
- package/scripts/gds/claim.js +94 -9
- package/scripts/gds/fitness.js +8 -8
- package/scripts/gds/go-live.js +139 -5
- package/scripts/gds/land-watch.js +13 -5
- package/scripts/gds/mirror-redact.js +13 -2
- package/scripts/gds/package-core.js +11 -3
- package/scripts/gds/release.js +55 -0
- package/scripts/gds/ship-land.js +10 -2
- package/scripts/gds/ship-regen.js +41 -8
- package/scripts/gds/start.js +7 -4
- package/scripts/gds/worktree-claim-guard.js +27 -1
- package/scripts/public-mirror-export.js +17 -4
- package/src/bongos/api-errors.js +9 -0
- package/src/bongos/artist-gate.js +204 -0
- package/src/branding.js +15 -0
- package/src/module-api.js +34 -1
- package/tests/api_path_404.mjs +28 -0
- package/tests/artist_gate.mjs +234 -0
- package/tests/artist_gate_release.mjs +283 -0
- package/tests/artist_gate_route.mjs +174 -0
- package/tests/box_scope_predicate.mjs +117 -0
- package/tests/claim_error_surface.mjs +163 -1
- package/tests/cli_exit_no_abort.mjs +256 -3
- package/tests/currency_label.mjs +11 -4
- package/tests/go_live.mjs +144 -0
- package/tests/main_worktree_busy_reason.mjs +167 -0
- package/tests/membership_kind_lockstep.mjs +88 -0
- package/tests/mirror_redact.mjs +14 -0
- package/tests/module_api.mjs +6 -0
- package/tests/provision_settings_apply.mjs +13 -5
- package/tests/provisioning_settings.mjs +11 -7
- package/tests/provisioning_settings_apply.mjs +4 -4
- package/tests/provisioning_settings_env.mjs +59 -7
- package/tests/public_mirror_export.mjs +12 -0
- package/tests/rank_roles_audit.mjs +114 -0
- package/tests/scrubber_corpus.mjs +70 -2
- package/tests/start_rebase_warning.mjs +50 -0
- package/tests/task_field_bounds_match_db.mjs +140 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Self-hosting Cloud Bongos (Docker)
|
|
2
2
|
|
|
3
|
-
Bring up a vanilla Cloud Bongos instance — the build platform + builders' hall + status dashboard, with no game — on any machine with Docker. Shipped by V4.R63 ([task #1202](https://example.com/builders#/task/1202), [ADR 0062](../adr
|
|
3
|
+
Bring up a vanilla Cloud Bongos instance — the build platform + builders' hall + status dashboard, with no game — on any machine with Docker. Shipped by V4.R63 ([task #1202](https://example.com/builders#/task/1202), [ADR 0062](../adr/0062-medusa-instance-model-decoupling.md)).
|
|
4
4
|
|
|
5
|
-
> **Relation to configurable-root ([ADR 0108](../adr
|
|
5
|
+
> **Relation to configurable-root ([ADR 0108](../adr/0108-instance-composition-configurable-root.md)):** this is the **single-checkout** self-host shape — the whole repo (core + config) is baked into one image, so `resolveCoreRoot()` and `resolveInstanceRoot()` ([`src/instance-config.js`](../../src/instance-config.js)) both resolve to `/app` inside the container. ADR 0108 does not deprecate this path — it stays the cheap, supported shape for a quick reskin (this is how `cloudbongos.com` runs). The *installed-as-a-dependency* shape (a consumer repo running `npm install @bongos/core`) is the separate, heavier path ADR 0108 targets for a project that wants its own repo and its own upgrade cadence — see [`docs/recipes/packaging-the-core.md`](packaging-the-core.md).
|
|
6
6
|
|
|
7
7
|
## One command
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ docker compose up
|
|
|
13
13
|
That builds the image, starts Postgres, applies the build-system migrations (game-module migrations are skipped — this is a Bongos-only instance), and serves the builders' hall at **http://localhost:3000**.
|
|
14
14
|
|
|
15
15
|
- The instance is **vanilla** by default: the neutral Cloud Bongos brand, every feature module (game, art pipeline, Discord, dev boxes) **off**. `.dockerignore` keeps the host's `config/branding.json` and `config/modules.json` out of the image, so it resolves to `config/branding.neutral.json` + `config/modules.neutral.json`.
|
|
16
|
-
- **No OTB scope-truth is seeded.** OTB/product data (game versions, goals, done-when criteria) lives in opt-in seed migrations under `migrations/instance/` (plus a few guarded blocks in the mixed files 003/006). `scripts/migrate.sh` skips them unless `GDS_APPLY_INSTANCE_SEEDS=1`, so a fresh DB comes up with only the schema and platform-universal defaults (ranks, achievements) — no crash, no foreign-key failures, no leftover versions. Platform system principals (`bfg-system`, `discord-bot-system`) are generic and remain. See task 1704 / [ADR 0105](../adr
|
|
16
|
+
- **No OTB scope-truth is seeded.** OTB/product data (game versions, goals, done-when criteria) lives in opt-in seed migrations under `migrations/instance/` (plus a few guarded blocks in the mixed files 003/006). `scripts/migrate.sh` skips them unless `GDS_APPLY_INSTANCE_SEEDS=1`, so a fresh DB comes up with only the schema and platform-universal defaults (ranks, achievements) — no crash, no foreign-key failures, no leftover versions. Platform system principals (`bfg-system`, `discord-bot-system`) are generic and remain. See task 1704 / [ADR 0105](../adr/0105-instance-seed-migrations-out-of-core.md).
|
|
17
17
|
- **No prod topology** is referenced: the database is a local container, the credentials are local demo values, and the app reaches Postgres over TCP via `PG*` env (see `docker-compose.yml`).
|
|
18
18
|
|
|
19
19
|
To stop and wipe: `docker compose down -v` (the `-v` drops the `cloudbongos-db` volume).
|
|
@@ -35,7 +35,7 @@ Author `config/branding.json` from the neutral starter — see [the branding con
|
|
|
35
35
|
|
|
36
36
|
**Or scaffold it with `bongos init`** ([task #1204](https://example.com/builders#/task/1204)): a short interview (or `bongos init --from spec.json` for a hands-free / CI run) that writes both config files, **seeds your first version + its done-when goal**, and **files the human-only kickoff steps** (register a GitHub OAuth app, first owner sign-in, repo binding, admission) as real tracked tasks — so a fresh instance has a claimable queue on day one instead of an empty hall. It never invents your branding (it points you at the fill prompt for that). Preview the whole plan with `bongos init --dry-run`.
|
|
37
37
|
|
|
38
|
-
**Production hosting, optional (the `provisioning` module — [ADR 0111](../adr
|
|
38
|
+
**Production hosting, optional (the `provisioning` module — [ADR 0111](../adr/0111-instance-hosting-provisioning-module.md) §3).** If you enable the `provisioning` module and answer the interview's hosting questions (shape — co-tenant `$0` or a dedicated droplet — bring-your-own domain, credential ref, tier), init turns those answers into a real **provisioning request** (a queued `provision` intent the control-plane runner drains) instead of only filing a manual "production topology" task. The two irreducibly-human legs — the GitHub OAuth app and the first owner sign-in — stay guided/manual. If the module isn't enabled on the target instance, init falls back to the manual production-topology task, so nothing is silently skipped.
|
|
39
39
|
|
|
40
40
|
## Configuration surface
|
|
41
41
|
|
|
@@ -43,7 +43,7 @@ Author `config/branding.json` from the neutral starter — see [the branding con
|
|
|
43
43
|
|---|---|---|
|
|
44
44
|
| `PGHOST` / `PGPORT` / `PGUSER` / `PGPASSWORD` / `PGDATABASE` | Postgres connection (read by both the app pool and the migration runner) | the local `db` service |
|
|
45
45
|
| `HOST` / `PORT` | bind address inside the container | `0.0.0.0` / `3000` |
|
|
46
|
-
| `MEDUSA_GDS_ONLY` | `1` = hard force-skip the OTB **instance-seed** migrations (`migrations/instance/`) — belt-and-suspenders over the default. A vanilla instance never wants OTB's versions/goals/criteria (task 1704 / [ADR 0105](../adr
|
|
46
|
+
| `MEDUSA_GDS_ONLY` | `1` = hard force-skip the OTB **instance-seed** migrations (`migrations/instance/`) — belt-and-suspenders over the default. A vanilla instance never wants OTB's versions/goals/criteria (task 1704 / [ADR 0105](../adr/0105-instance-seed-migrations-out-of-core.md)). | `1` |
|
|
47
47
|
| `GDS_APPLY_INSTANCE_SEEDS` | `1` = opt IN to applying the bundled OTB instance-seed migrations. Default (unset) = **skip** — so a self-host never inherits OTB scope-truth. Only the owning instance sets this, and only when rebuilding its DB from scratch (DR). | unset |
|
|
48
48
|
| `BONGOS_PUBLIC_ORIGIN` | public origin for OAuth callbacks etc. | `http://localhost:3000` |
|
|
49
49
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Recipe — putting your instance on a real host (`bongos serve`)
|
|
2
2
|
|
|
3
|
-
> [ADR 0169](../adr
|
|
3
|
+
> [ADR 0169](../adr/0169-bongos-serve-server-bring-up.md), task [#1002398](https://cloudbongos.com/builders#/task/1002398). The server half of [`local-dev.md`](local-dev.md) / [ADR 0149](../adr/0149-bongos-dev-local-launcher.md): the **same** boot path `bongos dev` runs on your laptop, on a VPS.
|
|
4
4
|
|
|
5
5
|
## The short version
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
1. **`completed`** — the claim resolves once local verification (smoke) passes. **The claim is consumed here.**
|
|
14
14
|
2. **`confirmed`** — the v2 subagent quality grader (the 4-worker panel: Narc · Quality · Hacker · Efficiency Monger) passes. **Verified, but not yet paid.**
|
|
15
|
-
3. **`shipped`** — branch auto-merged to `main` + deployed; the Discord `#ship-news` broadcast fires. **Credits land here** ([ADR 0120](../adr
|
|
15
|
+
3. **`shipped`** — branch auto-merged to `main` + deployed; the Discord `#ship-news` broadcast fires. **Credits land here** ([ADR 0120](../adr/0120-pay-on-land-and-builder-owned-rebase-gate.md) pays on land, not on confirm) — so a task stranded at `confirmed` is unpaid until it lands.
|
|
16
16
|
|
|
17
17
|
The grader reads **committed history** (`merge-base origin/main HEAD`…`HEAD`), independent of touches[] — so the diff it judges is whatever you've committed on the branch, not your working tree.
|
|
18
18
|
|
|
@@ -69,4 +69,4 @@ This writes a `task_grades` row with `grader_kind='lars'` so the audit trail sho
|
|
|
69
69
|
|
|
70
70
|
- Learning `#43` — "Recover a task stuck at 'completed': re-grade standalone, then /merge-mode" (the manual procedure this recipe automates).
|
|
71
71
|
- [`/merge-mode`](../../.claude/skills/merge-mode/SKILL.md) — lands `confirmed → shipped` when auto-merge bailed.
|
|
72
|
-
- [ADR 0024](../adr
|
|
72
|
+
- [ADR 0024](../adr/0024-multi-agent-system-architecture.md) — the MAS grader panel.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Recipe — live-updating docs on a STANDALONE instance
|
|
2
2
|
|
|
3
3
|
**Read before:** standing up / debugging a standalone instance whose `docs/` is empty or stale.
|
|
4
|
-
**Decision of record:** [ADR 0147](../adr
|
|
4
|
+
**Decision of record:** [ADR 0147](../adr/0147-standalone-live-docs-regen.md) (builds on [ADR 0110](../adr/0110-untrack-whole-file-generated-nav-docs.md) / [ADR 0108](../adr/0108-instance-composition-configurable-root.md)).
|
|
5
5
|
|
|
6
6
|
## The mental model — which doc refreshes where
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Look before you ship — the ui-design kit
|
|
2
2
|
|
|
3
|
-
> The `ui-design` module's kit (`modules/ui-design/kit/`, [task 1003320](https://cloudbongos.com/builders#/task/1003320), [ADR 0197](../adr
|
|
3
|
+
> The `ui-design` module's kit (`modules/ui-design/kit/`, [task 1003320](https://cloudbongos.com/builders#/task/1003320), [ADR 0197](../adr/0197-the-ui-design-module.md)): a stub, a renderer/auditor, the interaction probes, the mock checker and the contrast probe any builder points at any surface of any instance. Plain Node; the browser is the system Edge or Chrome (nothing is downloaded). The `/design` playbook sends you here.
|
|
4
4
|
|
|
5
5
|
The loop is five commands and one habit: **stub → render → probe → read the shots → fix in one batch → re-run once.** A surface describes itself in two small JSON files beside it; the kit never hardcodes a page.
|
|
6
6
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **This is one leg of three.** For the whole path from a change on core `main` to a live instance — including how to tell whether *this* instance takes a vendored tarball or a registry version — start at [the core release pipeline](core-release-pipeline.md).
|
|
4
4
|
>
|
|
5
|
-
> The R86 update-consumption channel ([ADR 0100](../adr
|
|
5
|
+
> The R86 update-consumption channel ([ADR 0100](../adr/0100-two-repo-instance-model.md) §2, [ADR 0103](../adr/0103-core-first-extraction-cloud-bongos-trunk.md) §4, task [#1690](https://example.com/builders#/task/1690)). How a **two-repo consumer instance** — one that installs `@bongos/core` as a vendored-tarball dependency — pulls the core from version N → N+1. Tooling: [`scripts/gds/upgrade.js`](../../scripts/gds/upgrade.js) (`bongos upgrade`). First proven live on emersonian-circles 1.15.0 → 1.16.0 (task [#1976](https://example.com/builders#/task/1976)).
|
|
6
6
|
|
|
7
7
|
## What the channel does
|
|
8
8
|
|
|
@@ -76,7 +76,7 @@ By default (`--rollback-on-failure`, ON unless `--no-rollback-on-failure`) the c
|
|
|
76
76
|
|
|
77
77
|
## Subscribing to updates — unattended patch-only auto-upgrade (task 2150 / ADR 0136)
|
|
78
78
|
|
|
79
|
-
The sections above are the *manual* `bongos upgrade`. The **subscription** runs it for you, on a cadence, safely — the "subscribe to regular updates" experience. Policy: **patch-only by default, health-gated with auto-rollback, opt-in, autonomy-gated** (full rationale in [ADR 0136](../adr
|
|
79
|
+
The sections above are the *manual* `bongos upgrade`. The **subscription** runs it for you, on a cadence, safely — the "subscribe to regular updates" experience. Policy: **patch-only by default, health-gated with auto-rollback, opt-in, autonomy-gated** (full rationale in [ADR 0136](../adr/0136-update-channel-subscription-policy.md)).
|
|
80
80
|
|
|
81
81
|
**Per-instance channel** bounds how far an unattended upgrade may jump:
|
|
82
82
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
> Your dev box serves your **rank scope**: Metic+ boxes carry the **whole repo**;
|
|
4
4
|
> newcomer (starter) boxes carry the safe starter surface. Task-scoped slices are
|
|
5
|
-
> **paused** per [ADR 0193](../adr
|
|
6
|
-
> machinery from [ADR 0148](../adr
|
|
5
|
+
> **paused** per [ADR 0193](../adr/0193-pause-task-scoped-box-slices.md) (the
|
|
6
|
+
> machinery from [ADR 0148](../adr/0148-task-scoped-box-source-access.md) remains;
|
|
7
7
|
> `BOX_TASK_SCOPE=on` re-enables it). Your GitHub token never leaves the server —
|
|
8
8
|
> see "How git works on a box" below, and
|
|
9
|
-
> [ADR 0150](../adr
|
|
9
|
+
> [ADR 0150](../adr/0150-box-first-boot-bringup-vendored-instances.md) for how the
|
|
10
10
|
> box comes up.
|
|
11
11
|
|
|
12
12
|
## TL;DR
|
|
@@ -27,7 +27,7 @@ waiting for the box's ~10-minute refresh.
|
|
|
27
27
|
## How git works on a box — read this BEFORE diagnosing "stuck"
|
|
28
28
|
|
|
29
29
|
The box holds **no stored git credential, ever** — and that is the design, not a
|
|
30
|
-
fault ([ADR 0055](../adr
|
|
30
|
+
fault ([ADR 0055](../adr/0055-server-mediated-branch-publish.md)):
|
|
31
31
|
|
|
32
32
|
- **Reads are server-mediated, per request.** Every remote git operation goes
|
|
33
33
|
through `/usr/local/bin/otb-git-credential`, which asks the control plane
|
|
@@ -57,7 +57,7 @@ box-written — don't edit it).
|
|
|
57
57
|
`.claude/`), build tooling (`scripts/`, `src/bongos/`), `docs/`, `infra/`,
|
|
58
58
|
`tests/`, and the sandbox-runnable product code. Rank, checked live by the
|
|
59
59
|
server, is what bounds a box — not the task you claimed
|
|
60
|
-
([ADR 0193](../adr
|
|
60
|
+
([ADR 0193](../adr/0193-pause-task-scoped-box-slices.md)).
|
|
61
61
|
|
|
62
62
|
## Step by step
|
|
63
63
|
|
|
@@ -118,5 +118,5 @@ one-claim-per-session). To move to a different task:
|
|
|
118
118
|
the cron does on its schedule.
|
|
119
119
|
- **A fresh box comes up with the code already cloned.** If a box ever comes up
|
|
120
120
|
*bare* (no code, no terminal), that's the packaging bug
|
|
121
|
-
[ADR 0150](../adr
|
|
121
|
+
[ADR 0150](../adr/0150-box-first-boot-bringup-vendored-instances.md) fixed on the
|
|
122
122
|
control plane — flag it rather than working around it.
|
|
@@ -175,8 +175,8 @@ And the reframe that matters most: **Cloud Bongos is free and non-profit, so it
|
|
|
175
175
|
|
|
176
176
|
| Cloud Bongos's defensible axis | Why Cursor structurally can't match it |
|
|
177
177
|
|---|---|
|
|
178
|
-
| **Open / AGPL-3.0, no lock-in** ([ADR 0065](../adr
|
|
179
|
-
| **Self-host + full data control** ([ADR 0062](../adr
|
|
178
|
+
| **Open / AGPL-3.0, no lock-in** ([ADR 0065](../adr/0065-agpl-nonprofit-ai-first-governance.md)) | A $29B+ venture co. *sells* lock-in; AGPL §13 anti-capture is antithetical to its model |
|
|
179
|
+
| **Self-host + full data control** ([ADR 0062](../adr/0062-medusa-instance-model-decoupling.md) instance model) | SaaS multi-tenant is how it gets margin + telemetry; self-host canonical is the opposite |
|
|
180
180
|
| **Model-agnostic / BYO-key, zero markup** | Its economics *depend* on the inference relationship; BYO-key removes the revenue and the supplier risk |
|
|
181
181
|
| **Governance / methodology layer** (claim→ship→grade, multi-builder, trust boundary) | Cursor 3 is *starting* on team governance — but for closed, per-seat, supervised use, not agent-authored multi-builder accountability |
|
|
182
182
|
| **Non-profit** | Investors require the opposite; it can't credibly be "not monetizing you" |
|
|
@@ -248,7 +248,7 @@ For an AI-first **orchestration** platform, rank threats by *"does it manage aut
|
|
|
248
248
|
- "$60B valuation / SpaceX-xAI acquisition (2026)" — **excluded as not credible** (low-quality sources). The credible April-2026 datapoint is the TechCrunch "$2B at ~$50B, in talks" line.
|
|
249
249
|
- "$200/mo plan ≈ $5,000 in real compute" — abstained; directionally consistent with negative-margin reporting, specific figure unverified.
|
|
250
250
|
|
|
251
|
-
**Internal (our positioning, read 2026-06-22):** [ADR 0065](../adr
|
|
251
|
+
**Internal (our positioning, read 2026-06-22):** [ADR 0065](../adr/0065-agpl-nonprofit-ai-first-governance.md) (AGPL / non-profit / AI-first), [ADR 0062](../adr/0062-medusa-instance-model-decoupling.md) (instance model, core↔host split), [`GOVERNANCE.md`](../../GOVERNANCE.md) (anti-capture principles); companion deep-research doc `component-based-dev-research.md` (uncommitted, module-system research, 2026-06-21).
|
|
252
252
|
|
|
253
253
|
---
|
|
254
254
|
|
|
@@ -12,7 +12,7 @@ This is a **doc-only research spike** — no code, migration, or config changed
|
|
|
12
12
|
- **Phase 1 — Tools/coupling audit.** A concrete inventory of *where* the platform is hard-wired to Anthropic/Claude today, file by file, so a build cluster knows exactly what to touch.
|
|
13
13
|
- **Phase 2 — Architecture path.** A recommended sequence to (a) a `ModelProvider` abstraction layer and (b) a cheaper grader, with trade-offs.
|
|
14
14
|
|
|
15
|
-
**Relationship to [ADR 0089](../adr
|
|
15
|
+
**Relationship to [ADR 0089](../adr/0089-modular-multi-model-adversarial-grader.md).** The *direction* for both goals was already decided with the owner on 2026-06-26 and recorded in ADR 0089 (Accepted; build task-pending): a central work-type-parameterized grading engine, a cross-family ensemble (Claude + hosted open-weight judges), a `ModelProvider` adapter, and a hosted pay-per-call API for the open leg. **This spike does not re-decide any of that** — it supplies the missing input ADR 0089's "Implementation (task-pending)" section presumes: the *grounded coupling map* of the current codebase. Where this doc and ADR 0089 touch the same ground, ADR 0089 is the decision and this doc is the implementation reconnaissance feeding it.
|
|
16
16
|
|
|
17
17
|
> **Confidence marks:** ✅ verified against the live file this session · 🔧 my synthesis / recommendation · ⚠️ caveat or open question for the owner/build cluster.
|
|
18
18
|
|
|
@@ -27,9 +27,9 @@ This is a **doc-only research spike** — no code, migration, or config changed
|
|
|
27
27
|
|
|
28
28
|
The good news for the build: **there is one chokepoint.** Almost every platform LLM call funnels through `grader.runSubagent({prompt, opts})` (and its cached sibling `runSubagentCached`). Architect-audit and the routine runner reuse it; the only spawns that *don't* go through it are a couple of CLI scripts that call `spawn('claude', …)` directly. So a `ModelProvider` port introduced **at `runSubagent`** captures the overwhelming majority of the surface in one place. ✅
|
|
29
29
|
|
|
30
|
-
**The cheaper grader is the same lever pulled differently.** Grading is purely *additive* spend (we pay Claude to write the code, then pay Claude again — Opus/Sonnet — to grade it). The grader prompt is mostly a **fixed rubric sent every call**, which makes it the ideal candidate for (a) a cheaper open-weight judge via the same `openai-compatible` adapter and (b) prompt-cache amortization (already partly handled by the content-addressed LLM cache, [ADR 0077](../adr
|
|
30
|
+
**The cheaper grader is the same lever pulled differently.** Grading is purely *additive* spend (we pay Claude to write the code, then pay Claude again — Opus/Sonnet — to grade it). The grader prompt is mostly a **fixed rubric sent every call**, which makes it the ideal candidate for (a) a cheaper open-weight judge via the same `openai-compatible` adapter and (b) prompt-cache amortization (already partly handled by the content-addressed LLM cache, [ADR 0077](../adr/0077-content-addressed-llm-cache.md)). 🔧
|
|
31
31
|
|
|
32
|
-
**Recommended sequence (detail in §6):** introduce the `ModelProvider` port at `runSubagent` with the existing Claude path as the only registered provider (zero behavior change) → add an `openai-compatible` adapter (DeepInfra/OpenRouter, BYOK, owner spend approval) → generalize `selectGraderModel` into a provider+model registry → run one open judge **advisory-only** (logs, does not gate) → promote to voting once the error-correlation audit ([ADR 0089](../adr
|
|
32
|
+
**Recommended sequence (detail in §6):** introduce the `ModelProvider` port at `runSubagent` with the existing Claude path as the only registered provider (zero behavior change) → add an `openai-compatible` adapter (DeepInfra/OpenRouter, BYOK, owner spend approval) → generalize `selectGraderModel` into a provider+model registry → run one open judge **advisory-only** (logs, does not gate) → promote to voting once the error-correlation audit ([ADR 0089](../adr/0089-modular-multi-model-adversarial-grader.md) §5) shows agreement. This is exactly ADR 0089's staging; this doc just pins each stage to the real files.
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
@@ -82,7 +82,7 @@ The main builder session runs inside the **Claude Code CLI harness** itself, whi
|
|
|
82
82
|
|
|
83
83
|
### 2.5 What is NOT coupled (already abstracted, leave alone)
|
|
84
84
|
|
|
85
|
-
- **The content-addressed LLM cache** ([ADR 0077](../adr
|
|
85
|
+
- **The content-addressed LLM cache** ([ADR 0077](../adr/0077-content-addressed-llm-cache.md), `api.llmCache`) — provider-agnostic by shape; memoizes any `{prompt, model}` call. No change needed; it's a free win for the open leg. ✅
|
|
86
86
|
- **The worker contract** (`buildPrompt`/`extractJson`/`computeVerdict` in `modules/grading/grader-workers/`) — model-independent; it builds a prompt and parses JSON. A different model that returns the same JSON schema slots in with no worker change. ✅
|
|
87
87
|
- **The deterministic pre-passes** (route-rank, permission-path — `routeRankCheck`/`permissionPathCheck`) — zero-LLM, no model coupling, and per ADR 0089 §6 they **must stay** the authoritative security gate regardless of which model grades quality. ✅
|
|
88
88
|
- **The art/vision pipeline** (`modules/art-pipeline/`, Gemini) — a *separate* provider coupling (Google, not Anthropic). ADR 0089 §7 folds it into the same work-type seam later; out of scope for *this* spike's Anthropic-focused audit but flagged so the build cluster knows the second provider exists. ⚠️
|
|
@@ -153,7 +153,7 @@ This matches ADR 0089 §3's `ModelProvider` decision exactly. The cost field abs
|
|
|
153
153
|
|
|
154
154
|
### 4.4 Trust boundary (non-negotiable, from ADR 0089 §6)
|
|
155
155
|
|
|
156
|
-
An open-model verdict that gates a ship is a **content-injection surface** ([ADR 0080](../adr
|
|
156
|
+
An open-model verdict that gates a ship is a **content-injection surface** ([ADR 0080](../adr/0080-llm-cache-api-transport-and-trust-model.md)). The abstraction must preserve:
|
|
157
157
|
|
|
158
158
|
- **Deterministic pre-passes stay authoritative + zero-LLM.** No LLM verdict (Claude or open) can upgrade a route-rank / permission-path fail to pass. The provider port grades *quality* only. ✅
|
|
159
159
|
- **Server-side guards (`serverSideGuards`) stay downgrade-only.** The existing envelope (re-run deterministic checks server-side, implausible-pass plausibility bound) is provider-independent and must wrap an open judge's verdict identically. ✅
|
|
@@ -223,5 +223,5 @@ Per the task's instruction, this doc lists recommended follow-ups rather than cr
|
|
|
223
223
|
## 9. Sources
|
|
224
224
|
|
|
225
225
|
- The live repo, read 2026-06-28: `modules/grading/grader.js`, `modules/grading/grader-workers/index.js`, `modules/grading/CLAUDE.md`, `src/bongos/llm-pricing.js`, `src/bongos/cascade-dispatch.js`, `modules/builder-settings/skill-prefs.js`, `scripts/gds/ci-grade.js`, `scripts/gds/architect-audit.js`, `scripts/gds/session-cost.js`, `scripts/gds/run-routine.js`.
|
|
226
|
-
- [ADR 0089 — Modular, multi-model adversarial grader](../adr
|
|
227
|
-
- [ADR 0028 — Honest LLM spend accounting](../adr
|
|
226
|
+
- [ADR 0089 — Modular, multi-model adversarial grader](../adr/0089-modular-multi-model-adversarial-grader.md) (the accepted direction this spike grounds; includes the external literature + market sweep — self-preference, PoLL, *Nine Judges*, open-weight model licenses, hosting math).
|
|
227
|
+
- [ADR 0028 — Honest LLM spend accounting](../adr/0028-honest-llm-spend-accounting.md), [ADR 0077 — Content-addressed LLM cache](../adr/0077-content-addressed-llm-cache.md), [ADR 0080 — LLM cache API transport & trust model](../adr/0080-llm-cache-api-transport-and-trust-model.md), [ADR 0062 — Instance-model decoupling](../adr/0062-medusa-instance-model-decoupling.md), [ADR 0021 — Per-builder skill model preferences](../adr/0021-per-builder-skill-model-preferences.md).
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
-- core_240 — index the two reads the artist gate rides on (task 1003575, ADR 0241).
|
|
2
|
+
--
|
|
3
|
+
-- A CORE migration, not a lifecycle one: both `tasks` and `task_override_requests`
|
|
4
|
+
-- are core tables, and ADR 0083 §5 lets a module migration touch only its own
|
|
5
|
+
-- `lifecycle_`-namespaced tables. (fitness.js enforces that, and caught this.)
|
|
6
|
+
--
|
|
7
|
+
-- WHY NOW. Two reads key on this pair and neither had an index behind it:
|
|
8
|
+
--
|
|
9
|
+
-- findTaskBySourceRef the create-vector idempotency read (task 386) — every
|
|
10
|
+
-- POST /tasks, every capture re-run, every cascade filing.
|
|
11
|
+
-- listOpenArtistReviews the artist gate's state read (task 1003575) — a route
|
|
12
|
+
-- any builder can call AND one every go-live calls, on a
|
|
13
|
+
-- table that only grows.
|
|
14
|
+
--
|
|
15
|
+
-- Without it both are sequential scans of `tasks`. The gate one is the sharper
|
|
16
|
+
-- edge: a deploy should not get slower because the board got bigger.
|
|
17
|
+
--
|
|
18
|
+
-- NOT UNIQUE, deliberately, and this is the same reasoning findTaskBySourceRef's
|
|
19
|
+
-- own comment records: `tasks` already carries historical (source, source_ref)
|
|
20
|
+
-- duplicates, so a UNIQUE index would fail to BUILD on deploy and take the
|
|
21
|
+
-- migration with it. Application-level idempotency stays the mechanism; this is
|
|
22
|
+
-- only about how the row is found.
|
|
23
|
+
--
|
|
24
|
+
-- PARTIAL on `source IS NOT NULL`: the overwhelming majority of tasks are
|
|
25
|
+
-- hand-filed with no source at all, and indexing those rows buys nothing — both
|
|
26
|
+
-- queries always bind a source.
|
|
27
|
+
--
|
|
28
|
+
-- IF NOT EXISTS so a re-run is a no-op (the migration runner's contract). No
|
|
29
|
+
-- CONCURRENTLY: the runner wraps each migration in a transaction, and this index
|
|
30
|
+
-- is small enough that the brief lock is not worth leaving the transaction for.
|
|
31
|
+
|
|
32
|
+
-- PLAIN BTREE, not text_pattern_ops, and that is a decision rather than an
|
|
33
|
+
-- oversight. Under a non-C collation Postgres cannot turn `source_ref LIKE
|
|
34
|
+
-- 'prefix%'` into a range bound on that column by itself — but both queries bind
|
|
35
|
+
-- `source` by EQUALITY first, so the scan is already bounded to one source's rows
|
|
36
|
+
-- and the LIKE is a cheap filter within it. A text_pattern_ops index would help
|
|
37
|
+
-- only a caller that matched a prefix WITHOUT naming a source, which neither
|
|
38
|
+
-- query does and which would be the wrong query anyway. Revisit if one appears.
|
|
39
|
+
CREATE INDEX IF NOT EXISTS idx_tasks_source_ref
|
|
40
|
+
ON tasks (source, source_ref)
|
|
41
|
+
WHERE source IS NOT NULL;
|
|
42
|
+
|
|
43
|
+
-- The gate's other leg: "does this task have an approved override request?",
|
|
44
|
+
-- asked as a NOT EXISTS for every candidate review. The open-request uniqueness
|
|
45
|
+
-- index is keyed on (task_id) WHERE status='open', so it cannot serve a lookup
|
|
46
|
+
-- for 'approved' rows.
|
|
47
|
+
CREATE INDEX IF NOT EXISTS idx_task_override_requests_task_status
|
|
48
|
+
ON task_override_requests (task_id, status);
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
-- core_240_goal_members_drop_legacy_role.sql — THE CONTRACT PHASE of the fourth
|
|
2
|
+
-- "role" rename (task 1003089). core_220 was the expand phase; ADR 0177 records
|
|
3
|
+
-- the two-step, ADR 0174 reserves the word `role` for the three crafts.
|
|
4
|
+
--
|
|
5
|
+
-- forward-unsafe: drop-column + set-not-null on goal_members — safe because core 1.19.238 (task 1003013) stopped reading the dropped column and live serves 1.19.689.
|
|
6
|
+
--
|
|
7
|
+
-- The pragma's first line is the whole claim on purpose: the acknowledgement
|
|
8
|
+
-- regex in scripts/gds/lint-migrations.js captures ONE line, so a reason spread
|
|
9
|
+
-- over a paragraph records nothing a reader of the lint output can check.
|
|
10
|
+
-- Both operations are INTENTIONAL and gated, and this is the step core_220
|
|
11
|
+
-- wrote down in advance. `bongos upgrade` auto-rollback
|
|
12
|
+
-- reverts the CODE PIN but NOT the DB, so the question a pragma has to answer
|
|
13
|
+
-- is "what is the oldest release a rollback could restore, and does it read
|
|
14
|
+
-- the dropped column?". The release that stopped reading `goal_members.role`
|
|
15
|
+
-- is core 1.19.238 (task 1003013, merged as 4738e3dd); cloudbongos.com serves
|
|
16
|
+
-- 1.19.689 — ~450 releases past it — verified at claim time with
|
|
17
|
+
-- `curl -s https://cloudbongos.com/version` and
|
|
18
|
+
-- `node scripts/gds/deploy-divergence.js`. There is no live reader of `role`
|
|
19
|
+
-- left to strand. Ships with a fresh backup (`node scripts/gds/backup.js
|
|
20
|
+
-- trigger`) and its own deploy window, same risk class as government_001.
|
|
21
|
+
--
|
|
22
|
+
-- THE FRESH-INSTALL HALF, which is not obvious from the column alone: the last
|
|
23
|
+
-- writer of `role` was not application code at all but a MODULE migration —
|
|
24
|
+
-- modules/lifecycle/migrations/lifecycle_001_goal_first_leads.sql, which runs
|
|
25
|
+
-- AFTER the core migrations on every fresh install and named the old column in
|
|
26
|
+
-- both its INSERT list and its ON CONFLICT arm. A DROP here without that edit
|
|
27
|
+
-- would not have shown up on this instance (the module migration is already in
|
|
28
|
+
-- `schema_migrations`, so it never re-runs) and would have broken `cloudbongos
|
|
29
|
+
-- init` for every NEW instance instead. It is renamed in the same change, and
|
|
30
|
+
-- tests/membership_kind_lockstep.mjs pins that no writer of the old name is left.
|
|
31
|
+
--
|
|
32
|
+
-- Idempotent: safe to re-run, including after the column is already gone.
|
|
33
|
+
|
|
34
|
+
BEGIN;
|
|
35
|
+
|
|
36
|
+
-- 1. The lockstep goes FIRST. The function body names NEW.role, and Postgres does
|
|
37
|
+
-- not dependency-track plpgsql bodies — a trigger left behind would not block
|
|
38
|
+
-- the DROP, it would fail at the next write to the table instead.
|
|
39
|
+
DROP TRIGGER IF EXISTS goal_members_membership_kind_lockstep ON goal_members;
|
|
40
|
+
DROP FUNCTION IF EXISTS goal_members_membership_kind_lockstep();
|
|
41
|
+
|
|
42
|
+
-- 2. The last backfill, guarded on the column still being there so a re-run after
|
|
43
|
+
-- the DROP is a no-op rather than an error. core_220 backfilled at expand time
|
|
44
|
+
-- and the trigger has held the pair in step since, so this is expected to touch
|
|
45
|
+
-- zero rows; it runs because "expected zero" is not "provably zero" on an
|
|
46
|
+
-- instance that spent a release accepting writes from two code paths.
|
|
47
|
+
DO $$
|
|
48
|
+
BEGIN
|
|
49
|
+
IF EXISTS (
|
|
50
|
+
SELECT 1 FROM pg_attribute
|
|
51
|
+
WHERE attrelid = 'goal_members'::regclass
|
|
52
|
+
AND attname = 'role'
|
|
53
|
+
AND NOT attisdropped
|
|
54
|
+
) THEN
|
|
55
|
+
EXECUTE 'UPDATE goal_members SET membership_kind = role WHERE membership_kind IS NULL';
|
|
56
|
+
END IF;
|
|
57
|
+
END $$;
|
|
58
|
+
|
|
59
|
+
-- 3. Any row the trigger never saw (there should be none) resolves to the same
|
|
60
|
+
-- default the old column carried since migration 160, so step 5 cannot fail
|
|
61
|
+
-- the whole migration on a single stray NULL.
|
|
62
|
+
UPDATE goal_members SET membership_kind = 'member' WHERE membership_kind IS NULL;
|
|
63
|
+
|
|
64
|
+
-- 4. The old noun leaves the schema. Its CHECK constraint and column default go
|
|
65
|
+
-- with it; core_220's goal_members_membership_kind_check already carries the
|
|
66
|
+
-- same ('lead','member') rule on the new column.
|
|
67
|
+
ALTER TABLE goal_members DROP COLUMN IF EXISTS role;
|
|
68
|
+
|
|
69
|
+
-- 5. The two guarantees core_220 deliberately deferred to this step. They were
|
|
70
|
+
-- unsafe to state while an older release could still write only `role`; now
|
|
71
|
+
-- that nothing does, the column can carry them itself instead of resting on a
|
|
72
|
+
-- trigger surviving.
|
|
73
|
+
ALTER TABLE goal_members ALTER COLUMN membership_kind SET NOT NULL;
|
|
74
|
+
ALTER TABLE goal_members ALTER COLUMN membership_kind SET DEFAULT 'member';
|
|
75
|
+
|
|
76
|
+
INSERT INTO schema_migrations (version) VALUES ('core_240_goal_members_drop_legacy_role')
|
|
77
|
+
ON CONFLICT DO NOTHING;
|
|
78
|
+
|
|
79
|
+
COMMIT;
|
|
@@ -125,6 +125,10 @@ function createClient(opts = {}) {
|
|
|
125
125
|
// GET /analytics/builder/{id} — rank: any-builder — GET /analytics/builder/:id
|
|
126
126
|
getAnalyticsBuilderId: (args) => request("GET", "/analytics/builder/{id}", { hasBody: false }, args),
|
|
127
127
|
},
|
|
128
|
+
"artistGate": {
|
|
129
|
+
// GET /artist-gate — rank: any-builder — GET /artist-gate
|
|
130
|
+
getArtistGate: (args) => request("GET", "/artist-gate", { hasBody: false }, args),
|
|
131
|
+
},
|
|
128
132
|
"auditLog": {
|
|
129
133
|
// GET /audit-log — rank: metic+archon — GET /audit-log
|
|
130
134
|
getAuditLog: (args) => request("GET", "/audit-log", { hasBody: false }, args),
|
|
@@ -73,9 +73,13 @@
|
|
|
73
73
|
// 'engineer'). This is the whole point of the mechanism: the
|
|
74
74
|
// discipline of the generated task is not the discipline of the
|
|
75
75
|
// ship that caused it.
|
|
76
|
-
// when(task) a predicate over the shipped task row
|
|
77
|
-
// a throw is caught and treated as "no
|
|
78
|
-
// predicate must not stop the other
|
|
76
|
+
// when(task, ctx) a predicate over the shipped task row and the run CONTEXT.
|
|
77
|
+
// Must be pure and total — a throw is caught and treated as "no
|
|
78
|
+
// match", because a broken predicate must not stop the other
|
|
79
|
+
// rules. `ctx` is the per-run policy the runner resolved (today:
|
|
80
|
+
// `{ artistGate }`), injected rather than read, so this file keeps
|
|
81
|
+
// its "importable with nothing behind it" property. A rule that
|
|
82
|
+
// does not care about policy simply ignores the second argument.
|
|
79
83
|
// title(task) / body(task) the generated task's title and description.
|
|
80
84
|
// kind optional task kind; must be one the classifier knows
|
|
81
85
|
// (task-classifier.VALID_KINDS). Defaults to 'unclassified' —
|
|
@@ -151,7 +155,14 @@ const CASCADES = Object.freeze([
|
|
|
151
155
|
kind: 'unclassified',
|
|
152
156
|
// The anti-recursion guard (source !== CASCADE_SOURCE) is FIRST so a
|
|
153
157
|
// cascade-generated task is rejected before any other test runs.
|
|
154
|
-
|
|
158
|
+
//
|
|
159
|
+
// The project's artist_gate at 'off' means "not generated" (ADR 0241 §2's
|
|
160
|
+
// table, task 1003575) — the one level at which this rule files nothing. It
|
|
161
|
+
// is read from ctx, never from branding, so the predicate stays pure; an
|
|
162
|
+
// absent ctx (a caller that resolved no policy) files, because the gate's
|
|
163
|
+
// default is 'strict' and silence must not be read as an opt-out.
|
|
164
|
+
when: (t, ctx) => (ctx || {}).artistGate !== 'off'
|
|
165
|
+
&& t.source !== CASCADE_SOURCE && hasCopyOrVisualWork(t),
|
|
155
166
|
title: (t) => `Artist review: the copy and visuals that shipped in task ${t.id}`,
|
|
156
167
|
body: artistReviewBody,
|
|
157
168
|
}),
|
|
@@ -201,13 +212,13 @@ function validateCascades(rules = CASCADES) {
|
|
|
201
212
|
// ---------------------------------------------------------------------------
|
|
202
213
|
|
|
203
214
|
// The task rows a shipped task cascades into. Pure: no database, no clock, no
|
|
204
|
-
// side effect — hand it a task-shaped object
|
|
205
|
-
// the specs that would be filed.
|
|
215
|
+
// side effect — hand it a task-shaped object, a rule table and the run's policy
|
|
216
|
+
// context and it returns the specs that would be filed.
|
|
206
217
|
//
|
|
207
218
|
// A rule whose `when` THROWS is treated as no-match and reported in `errors`,
|
|
208
219
|
// never propagated: one broken predicate must not cost the other rules their
|
|
209
220
|
// tasks, and it certainly must not reach the ship.
|
|
210
|
-
function cascadesFor(task, rules = CASCADES) {
|
|
221
|
+
function cascadesFor(task, rules = CASCADES, ctx = {}) {
|
|
211
222
|
const matched = [];
|
|
212
223
|
const errors = [];
|
|
213
224
|
if (!task || task.id == null) return { matched, errors: ['no task'] };
|
|
@@ -216,7 +227,7 @@ function cascadesFor(task, rules = CASCADES) {
|
|
|
216
227
|
if (shape.length) { errors.push(`cascade "${rule && rule.key}": ${shape.join('; ')}`); continue; }
|
|
217
228
|
let hit = false;
|
|
218
229
|
try {
|
|
219
|
-
hit = rule.when(task) === true;
|
|
230
|
+
hit = rule.when(task, ctx) === true;
|
|
220
231
|
} catch (e) {
|
|
221
232
|
errors.push(`cascade "${rule.key}": when() threw (${e && e.message}) — treated as no match`);
|
|
222
233
|
continue;
|
|
@@ -281,6 +292,14 @@ function cascadeTaskSpec(rule, task) {
|
|
|
281
292
|
// goal_id / version_id / discipline)
|
|
282
293
|
// deps.findTaskBySourceRef({...}) -> an existing row or null
|
|
283
294
|
// deps.createTask(spec) -> the created row
|
|
295
|
+
// deps.artistGateMode() -> 'off' | 'advisory' | 'strict' — the
|
|
296
|
+
// project's artist gate (ADR 0241). Injected
|
|
297
|
+
// so this file reads no branding pack; a
|
|
298
|
+
// reader that throws leaves the context key
|
|
299
|
+
// undefined, which FILES (the gate's own
|
|
300
|
+
// default is 'strict', and a policy read
|
|
301
|
+
// that failed must not silently behave like
|
|
302
|
+
// 'off').
|
|
284
303
|
// deps.log -> optional { info, error }
|
|
285
304
|
async function runCascadesForShip(shipped, deps = {}) {
|
|
286
305
|
const report = { created: [], skipped: [], errors: [] };
|
|
@@ -292,7 +311,16 @@ async function runCascadesForShip(shipped, deps = {}) {
|
|
|
292
311
|
const task = deps.getTask ? await deps.getTask(id) : null;
|
|
293
312
|
if (!task) { report.errors.push(`cascade: task ${id} not readable after ship`); return report; }
|
|
294
313
|
|
|
295
|
-
|
|
314
|
+
// The per-run policy context. Resolved once, outside the rule loop, and
|
|
315
|
+
// never allowed to cost the run: a reader that throws is reported and leaves
|
|
316
|
+
// the key undefined rather than suppressing every rule that consults it.
|
|
317
|
+
const ctx = {};
|
|
318
|
+
if (typeof deps.artistGateMode === 'function') {
|
|
319
|
+
try { ctx.artistGate = deps.artistGateMode(); }
|
|
320
|
+
catch (e) { report.errors.push(`cascade: artistGateMode() threw (${e && e.message}) — policy unread`); }
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
const { matched, errors } = cascadesFor(task, deps.rules || CASCADES, ctx);
|
|
296
324
|
report.errors.push(...errors);
|
|
297
325
|
|
|
298
326
|
for (const { rule, spec } of matched) {
|
|
@@ -94,8 +94,11 @@ async function claimTask({ taskId, builderId, worktreeName, headSha, creatorSess
|
|
|
94
94
|
|
|
95
95
|
// ADR 0120 part 3: the needs_rebase claim gate. A builder who owes a rebase
|
|
96
96
|
// on any un-landed confirmed task (flagged by the reconciler, part 2) is
|
|
97
|
-
// blocked from taking on NEW work until they LAND it (
|
|
98
|
-
// re-ship
|
|
97
|
+
// blocked from taking on NEW work until they LAND it (`git merge origin/main`
|
|
98
|
+
// + re-ship — task 1002788: MERGE, never rebase, because the branch is already
|
|
99
|
+
// published and server-mediated publish is append-only, so rewriting it makes
|
|
100
|
+
// the task permanently un-landable while the gate keeps their queue shut)
|
|
101
|
+
// or RELEASE it — both clear the flag. Their
|
|
99
102
|
// already-active claims are untouched (we only refuse fresh claims, never
|
|
100
103
|
// freeze in-flight work). Since the reward now lands only on ship (part 1),
|
|
101
104
|
// the builder is motivated to clear it; since it gates their queue, they
|
|
@@ -527,9 +527,10 @@ async function achieveGoalIfComplete({ goalId }, deps = {}) {
|
|
|
527
527
|
// precedent). membershipKind defaults to 'member'.
|
|
528
528
|
|
|
529
529
|
// THE COLUMN IS `membership_kind` (task 1003013, ADR 0177 — ADR 0174 reserves the
|
|
530
|
-
// other word for the three crafts). The
|
|
531
|
-
//
|
|
532
|
-
//
|
|
530
|
+
// other word for the three crafts). The rename is COMPLETE: core_240 (task
|
|
531
|
+
// 1003089) dropped the legacy column and its lockstep trigger, and the new column
|
|
532
|
+
// now carries NOT NULL + DEFAULT 'member' itself rather than resting on that
|
|
533
|
+
// trigger. There is no second spelling left to keep in step.
|
|
533
534
|
//
|
|
534
535
|
// ARRIVING AS A MEMBER CLOSES ANY PENDING ASK (task 1002888 / idea 1000688).
|
|
535
536
|
// The membership write used to be a bare upsert that never looked at
|