@bongos/core 1.19.714 → 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 +488 -413
- 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/copy-inventory.md +15 -13
- package/docs/copy-registry.json +35 -17
- 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 +36 -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/hall-ui/public/watch.css +6 -0
- package/modules/hall-ui/public/watch.js +52 -6
- 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/backfill-task-rewards.js +9 -4
- 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/credit_log_single_writer.mjs +94 -0
- package/tests/currency_label.mjs +11 -4
- package/tests/go_live.mjs +144 -0
- package/tests/helpers.mjs +8 -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
- package/tests/watch_roster_self_row.mjs +289 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
- **Date:** 2026-06-26
|
|
5
5
|
- **Deciders:** Lars (Archon), Claude
|
|
6
6
|
|
|
7
|
-
**Builds on:** [ADR 0008](
|
|
7
|
+
**Builds on:** [ADR 0008](0008-family-based-tile-generation.md) (family-based multi-frame generation — the grader/loop we extend), [ADR 0083](0083-modular-architecture-strangler-build-plan.md) (modular architecture — this ships as a module), [ADR 0062](0062-medusa-instance-model-decoupling.md) / [ADR 0081](0081-tool-agnostic-design-layer.md) (neutral-contract adapter pattern — the pluggable generator backend), [ADR 0024](0024-multi-agent-system-architecture.md) (grade-before-ship pattern).
|
|
8
8
|
|
|
9
9
|
**Track:** `internal` (a Cloud Bongos platform capability — the art pipeline).
|
|
10
10
|
|
|
@@ -24,7 +24,7 @@ External practice confirms the cause: plain reference-prompting (what closed Gem
|
|
|
24
24
|
|
|
25
25
|
Two empirical wins this session shaped the decision: (1) a **recursive "draw the frame halfway between these two" inbetween** request *does* produce a coherent intermediate pose with Gemini; (2) **the platform already has the right machinery** — the family pipeline.
|
|
26
26
|
|
|
27
|
-
**The key finding:** the existing **family pipeline** ([ADR 0008](
|
|
27
|
+
**The key finding:** the existing **family pipeline** ([ADR 0008](0008-family-based-tile-generation.md); `art/pipeline/family_*.py` + `art/template/families.json`) is already a consistent-character, multi-frame **grade-and-audit loop**. `family_orchestrator.run_family()` generates N frames of one individual in a single sheet, slices them, runs **cross-frame deterministic coherence** (`family_checks.run_all` — silhouette area/height variance = "same size", palette/luminance coherence = "same look"), then a **Gemini family review** that already scores a **`character_identity`** criterion ("do ALL frames depict the SAME individual?"), and **loops with `t5_anchor_refine`** which re-feeds the strongest prior cell as a locked anchor. Walk cycles (`player_walk`, 6 frames) and a peck cycle (`chickens`) already ship through it. It is tuned for **32×32 pixel-art tiles** (palette-snap, fixed size) — not our full-res painterly mascot — but the *architecture, loop, cost-ledger, regression-guard, and Gemini-review flow* are exactly what we need.
|
|
28
28
|
|
|
29
29
|
The owner's directive (2026-06-26): **don't reinvent the loop — use existing infrastructure and flows; keep the per-frame grader criteria proposed below.** And build it **correctly, as a reusable Cloud Bongos module**, since consistent generative animation is a general platform capability, not a one-off.
|
|
30
30
|
|
|
@@ -36,7 +36,7 @@ The owner's directive (2026-06-26): **don't reinvent the loop — use existing i
|
|
|
36
36
|
|
|
37
37
|
### 1. Approach: Gemini + grade-and-audit, pluggable backend (option A)
|
|
38
38
|
|
|
39
|
-
Closed Gemini caps raw consistency at "reference-conditioning" (it drifts). We compensate with the **grader/audit loop**: every candidate frame is scored against the character's model sheet, and failures are regenerated with the failure fed back as a fix-hint, escalating only when stuck. The **generator backend is an adapter** (the [ADR 0062](
|
|
39
|
+
Closed Gemini caps raw consistency at "reference-conditioning" (it drifts). We compensate with the **grader/audit loop**: every candidate frame is scored against the character's model sheet, and failures are regenerated with the failure fed back as a fix-hint, escalating only when stuck. The **generator backend is an adapter** (the [ADR 0062](0062-medusa-instance-model-decoupling.md)/[0081](0081-tool-agnostic-design-layer.md) neutral-contract pattern): Gemini today; a future **LoRA-on-open-model** ("level 2") or an **image-to-video** model can slot in *without touching the grader*. LoRA is explicitly **deferred**, not chosen — it needs training infra and an open model; we adopt it only if the Gemini pass-rate proves too low.
|
|
40
40
|
|
|
41
41
|
### 2. Reuse the family pipeline as the grader + loop
|
|
42
42
|
|
|
@@ -65,7 +65,7 @@ A non-pixel-art post-process: background removal (`rembg`) + warm-fringe despill
|
|
|
65
65
|
|
|
66
66
|
### 7. Package as a Cloud Bongos module
|
|
67
67
|
|
|
68
|
-
Per [ADR 0083](
|
|
68
|
+
Per [ADR 0083](0083-modular-architecture-strangler-build-plan.md) + [`docs/modules-contract.md`](../modules-contract.md). **Contract — input:** a character *model sheet* (canonical reference image(s) + identity prose + style + size/anchor spec + per-criterion tolerances) + an *action spec* (key poses + frame budget + fps). **Output:** a graded, consistent, registered frame set + a manifest (frame order, fps, anchors). The rubric/tolerances and the generator backend are **config-driven** so any instance can animate its own characters.
|
|
69
69
|
|
|
70
70
|
### 8. The grader criteria (owner-approved)
|
|
71
71
|
|
|
@@ -112,7 +112,7 @@ Created as GDS tasks under **BONGOS-V1**, in the **"Cloud Bongos animation modul
|
|
|
112
112
|
6. **Pose-match + transition coherence** — order-aware neighbor-delta deterministic check + the `pose_match` criterion (the genuine gap) *(dep 4, 5)*.
|
|
113
113
|
7. **Recursive inbetween layer** — keyframes → recursive Gemini midpoints to target count; each graded by the per-frame checks *(dep 2, 3)*.
|
|
114
114
|
8. **Sequence assembly + manifest** — order, fps (on twos/ones), anchors → sprite set + manifest *(dep 7)*.
|
|
115
|
-
9. **Package as a Cloud Bongos module** — manifest/seam per [ADR 0083](
|
|
115
|
+
9. **Package as a Cloud Bongos module** — manifest/seam per [ADR 0083](0083-modular-architecture-strangler-build-plan.md); config-driven rubric + pluggable backend *(dep 4, 5, 6, 8)*.
|
|
116
116
|
10. **First consumer: Bongo Buddha — 8 actions** — produce idle/laugh/yawn/sleep/kick/docile/reach/fall via the module; finish widget [#1523](https://example.com/builders#/task/1523) *(dep 9)*.
|
|
117
117
|
11. **`character-review` skill** — human wrapper over `run_family` for the painterly path (sibling to `otb-design-review`) *(dep 5)*.
|
|
118
118
|
12. **(future / spike)** learned-embedding identity scorer (DINOv2/CLIP) — "level 2" if vision-identity + pHash prove insufficient.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
- **Date:** 2026-06-26
|
|
5
5
|
- **Deciders:** Lars (Archon), Claude
|
|
6
6
|
|
|
7
|
-
**Builds on:** [ADR 0024](
|
|
7
|
+
**Builds on:** [ADR 0024](0024-multi-agent-system-architecture.md) (the MAS grader — the worker-panel we extend), [ADR 0083](0083-modular-architecture-strangler-build-plan.md) (modular architecture — graders register through the module seam), [ADR 0081](0081-tool-agnostic-design-layer.md) (one grader parameterized by work-type), [ADR 0088](0088-consistent-character-generative-animation.md) (the first module-owned specialized grader — the `character_anim` family review), [ADR 0062](0062-medusa-instance-model-decoupling.md) (neutral-contract adapter pattern — applied here to the *model provider*), [ADR 0016](0016-trust-boundary-server-enforced-permissions.md) / [ADR 0043](0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md) (server-enforced trust boundary the gate must not weaken), [ADR 0080](0080-llm-cache-api-transport-and-trust-model.md) (an external model result that gates a ship is a content-injection surface).
|
|
8
8
|
|
|
9
9
|
**Track:** `internal` (a Cloud Bongos platform capability — the build pipeline's quality gate).
|
|
10
10
|
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
|
|
13
13
|
## Context
|
|
14
14
|
|
|
15
|
-
Every shipped task passes a **grader** before it lands: the MAS worker-panel ([ADR 0024](
|
|
15
|
+
Every shipped task passes a **grader** before it lands: the MAS worker-panel ([ADR 0024](0024-multi-agent-system-architecture.md)) for code (`src/bongos/grader.js` + `src/bongos/grader-workers/`), the Gemini vision review for pixel-art ([ADR 0008](0008-family-based-tile-generation.md); `art/pipeline/family_review.py`), and now a module-specific review for animation ([ADR 0088](0088-consistent-character-generative-animation.md)). The gate works and is the backbone of letting AI agents ship unattended. But four limits are now in the way:
|
|
16
16
|
|
|
17
17
|
1. **The grader is single-vendor.** Both the code panel and the vision review run on a model from the same lab that *built* the work (Claude grades Claude; Gemini grades Gemini-generated art). Today's only mitigation is *cross-family within Anthropic* — Opus author → Sonnet grader (`selectGraderModel`, `src/bongos/grader.js`). The research below shows that an author and a judge from the **same family share correlated blind spots** and the judge **inflates its own family's work by 10–25%**. An independent reviewer from a *different* lineage is the single highest-leverage quality lever we have.
|
|
18
18
|
|
|
19
19
|
2. **All grading spend rides the Claude bill.** Every worker in the panel is an Opus/Sonnet call. Grading is *additive* to the build spend (the builder already paid Claude to write the code; we pay Claude again to grade it). On a bootstrapped <$5K/yr budget that doubling is real, and it's the wrong place to spend — review is a verification task a cheaper independent model can do well.
|
|
20
20
|
|
|
21
|
-
3. **There is no clean way for a module to own its grader.** [ADR 0088](
|
|
21
|
+
3. **There is no clean way for a module to own its grader.** [ADR 0088](0088-consistent-character-generative-animation.md) added an animation grader by *extending the art pipeline in place*; the DINOv2 identity scorer is wired as a Python-only `families.json` flag. Each new work-type bolts its grader on by hand. [ADR 0081](0081-tool-agnostic-design-layer.md) already called for "one grader parameterized by type," and [ADR 0083](0083-modular-architecture-strangler-build-plan.md) gives us the mechanism (the module seam) — but nothing yet routes grading through it. The owner asked the right question directly: *should a work-type's grader live in that module, or in a general grader module?*
|
|
22
22
|
|
|
23
|
-
4. **The grader is hard-wired to two work-types (code, vision).** A third (`ui`, [ADR 0081](
|
|
23
|
+
4. **The grader is hard-wired to two work-types (code, vision).** A third (`ui`, [ADR 0081](0081-tool-agnostic-design-layer.md)) and a fourth (animation, [ADR 0088](0088-consistent-character-generative-animation.md)) are arriving. A new module (say, audio, or 3D) has no path to grading at all.
|
|
24
24
|
|
|
25
25
|
### What the research says (mid-2026)
|
|
26
26
|
|
|
@@ -33,7 +33,7 @@ A thorough literature + market sweep this session (sources at the foot of this A
|
|
|
33
33
|
- **Binary pass/fail + a forced written critique beats 1–5 Likert.** Judges can't reliably tell a 3 from a 4; scores cluster at 6–7. Our panel already uses a 6.0 threshold + per-worker verdicts — consistent with best practice.
|
|
34
34
|
- **Open-weight models are now genuinely good critics.** For code: DeepSeek V3.2/V4 (MIT), Qwen3-Coder (Apache-2.0), GLM-4.6/5 (MIT) score 70–80%+ on SWE-bench Verified; purpose-built judges (Atla Selene, Prometheus 2) are trained specifically for rubric scoring. For vision: Qwen2.5-VL / Qwen3-VL and InternVL3.5 (Apache/MIT) have native-resolution encoders (the key feature for reading small sprites) and rival closed VLMs on MMMU/OCRBench. *Caveat:* several headline 2026 numbers are vendor-reported; treat them as provisional and pin/evaluate the exact checkpoint we adopt.
|
|
35
35
|
- **Hosting math is decisive.** A few-thousand-grades/month workload costs **~$1–5/mo** on a pay-per-call API (DeepInfra is consistently cheapest; e.g. Llama-class 70B ≈ $0.10/$0.32 per 1M tokens; DeepSeek/Qwen comparable, with near-free prompt-caching on the fixed rubric). Self-hosting a GPU is **~$200+/mo idle** and never breaks even at our volume. The grader prompt is mostly a *fixed rubric* sent every call — **cheap cached input crushes the bill.**
|
|
36
|
-
- **Off-the-shelf frameworks exist but don't fit.** `promptfoo` is the closest (MIT, Node-native, built-in panel voting, vision, points at any open endpoint) — but it was acquired by OpenAI in March 2026, and we already have a sophisticated worker-panel grader of exactly this shape. We **extend our own**, borrowing `promptfoo`'s patterns, rather than adopt a vendor-owned framework against an AGPL/non-profit posture ([ADR 0065](
|
|
36
|
+
- **Off-the-shelf frameworks exist but don't fit.** `promptfoo` is the closest (MIT, Node-native, built-in panel voting, vision, points at any open endpoint) — but it was acquired by OpenAI in March 2026, and we already have a sophisticated worker-panel grader of exactly this shape. We **extend our own**, borrowing `promptfoo`'s patterns, rather than adopt a vendor-owned framework against an AGPL/non-profit posture ([ADR 0065](0065-agpl-nonprofit-ai-first-governance.md)).
|
|
37
37
|
|
|
38
38
|
### Owner decisions (2026-06-26)
|
|
39
39
|
|
|
@@ -60,13 +60,13 @@ select work-type grader → gather evidence → run deterministic pre-passes
|
|
|
60
60
|
→ persist grade + per-judge signals + cost → promote / fall-through
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
A **module contributes only the three things that are specific to its work-type**, registered through the seam (`api.seams.registerProvider`, [ADR 0083](
|
|
63
|
+
A **module contributes only the three things that are specific to its work-type**, registered through the seam (`api.seams.registerProvider`, [ADR 0083](0083-modular-architecture-strangler-build-plan.md)):
|
|
64
64
|
|
|
65
65
|
- a **rubric** — the named criteria + thresholds for this work-type (the data the art pipeline keeps in `rubric.json`, the code panel in `grader-rubric.json`);
|
|
66
66
|
- an **evidence-gatherer** — what the judges see (a git diff for code; a rendered screenshot for `ui`; a sliced frame-set + model sheet for animation);
|
|
67
67
|
- optional **specialized critics** — deterministic checks (palette-snap, transition-coherence, DINOv2 identity) or a custom LLM worker, when the generic rubric judge isn't enough.
|
|
68
68
|
|
|
69
|
-
So the answer to the owner's question — *"under each module, or in a general grader module?"* — is **both, split by concern**: the **orchestration, ensemble, aggregation, gate, persistence, and security pre-passes are central** (write once, consistent everywhere); the **rubric + evidence + specialist critics are module-owned** (the part that genuinely differs). Enable the animation module → its `character_anim` grader is automatically available; disable it → the engine simply has one fewer registered work-type. This is exactly the seam [ADR 0088](
|
|
69
|
+
So the answer to the owner's question — *"under each module, or in a general grader module?"* — is **both, split by concern**: the **orchestration, ensemble, aggregation, gate, persistence, and security pre-passes are central** (write once, consistent everywhere); the **rubric + evidence + specialist critics are module-owned** (the part that genuinely differs). Enable the animation module → its `character_anim` grader is automatically available; disable it → the engine simply has one fewer registered work-type. This is exactly the seam [ADR 0088](0088-consistent-character-generative-animation.md)'s grader and the DINOv2 scorer already want; we are formalizing it as `grader.workType.<key>` providers rather than hand-wiring.
|
|
70
70
|
|
|
71
71
|
A **grader registry** in core resolves `task.kind` / `discipline` → the registered work-type grader (falling back to the code grader), mirroring the dispatch the art pipeline already does on family `kind`. There is no separate "general grader module" — the generic machinery *is* the core engine; modules register against it.
|
|
72
72
|
|
|
@@ -83,14 +83,14 @@ This generalizes the existing worker panel two ways: the four *lenses* (narc / q
|
|
|
83
83
|
|
|
84
84
|
### 3. The model provider is an adapter; run open models via a hosted API (owner decision 3)
|
|
85
85
|
|
|
86
|
-
Following the [ADR 0062](
|
|
86
|
+
Following the [ADR 0062](0062-medusa-instance-model-decoupling.md)/[ADR 0081](0081-tool-agnostic-design-layer.md) neutral-contract pattern, **how a judge's model is called is an adapter behind a `ModelProvider` port**, not hard-coded. `selectGraderModel()` (today a Claude-only `if/else` in `src/bongos/grader.js`) is replaced by a small provider registry:
|
|
87
87
|
|
|
88
88
|
- **`anthropic`** — the existing Claude path (Anthropic API).
|
|
89
89
|
- **`openai-compatible`** — a single adapter that speaks the OpenAI chat-completions shape, which covers **DeepInfra, OpenRouter, Together, Fireworks, Groq, vLLM, and Ollama** by base-URL + key alone. This is the open-weight path.
|
|
90
90
|
|
|
91
|
-
Default open-model transport: a **hosted pay-per-call API (DeepInfra or OpenRouter)** — no box to run, ~$1–5/mo at our volume (§Cost). The same adapter could point at a self-hosted endpoint later without code change, but self-hosting is explicitly *not* adopted now. **Model choice, provider, base-URL, and panel composition are instance config** (the [ADR 0062](
|
|
91
|
+
Default open-model transport: a **hosted pay-per-call API (DeepInfra or OpenRouter)** — no box to run, ~$1–5/mo at our volume (§Cost). The same adapter could point at a self-hosted endpoint later without code change, but self-hosting is explicitly *not* adopted now. **Model choice, provider, base-URL, and panel composition are instance config** (the [ADR 0062](0062-medusa-instance-model-decoupling.md) host-owned pattern), so any Cloud Bongos instance picks its own judges; this also pre-positions for GDS-V4's per-builder model preferences ([idea #30](https://example.com/builders#/idea/30)).
|
|
92
92
|
|
|
93
|
-
The open-model key is a new secret (BYOK, like the Gemini art key — [ADR 0073](
|
|
93
|
+
The open-model key is a new secret (BYOK, like the Gemini art key — [ADR 0073](0073-builder-needs-signal-and-byok-gemini-key.md)). **Requires the owner's spend go-ahead** before any live call (CLAUDE.md §4).
|
|
94
94
|
|
|
95
95
|
### 4. Aggregating heterogeneous judges: normalize, then median-plus-hard-veto
|
|
96
96
|
|
|
@@ -108,11 +108,11 @@ Because aggregation cannot manufacture independence the panel doesn't have, we *
|
|
|
108
108
|
|
|
109
109
|
### 6. Deterministic pre-passes stay authoritative and zero-LLM (security)
|
|
110
110
|
|
|
111
|
-
The two deterministic server-side guards — route-rank ([ADR 0016](
|
|
111
|
+
The two deterministic server-side guards — route-rank ([ADR 0016](0016-trust-boundary-server-enforced-permissions.md)) and permission-path ([ADR 0043](0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md)) — **remain exactly as they are**: zero-LLM, server-re-run on authoritative data, downgrade-only. **No LLM verdict — Claude or open — can ever upgrade a deterministic fail to pass.** The ensemble grades *quality*; the deterministic gate enforces the *trust boundary*. An external model's verdict that gates a ship is a content-injection surface ([ADR 0080](0080-llm-cache-api-transport-and-trust-model.md)): so open-model verdicts are (a) advisory-plus-veto only, never sole authority over a protected path; (b) logged with model id + provider + raw response in `signals` for audit; (c) subject to the same server-side re-verification envelope as the Claude panel. For pixel-exact properties (palette, grid, dimensions) the **deterministic checks remain the authority** — VLMs are documented to misread fine detail; the vision judge is for aesthetic/semantic critique only ([ADR 0088](0088-consistent-character-generative-animation.md) already draws this line).
|
|
112
112
|
|
|
113
113
|
### 7. Reuse, don't rebuild
|
|
114
114
|
|
|
115
|
-
The worker-contract (`buildPrompt` / `extractJson` / `computeVerdict`), the `runWorker` parallel runner, the `task_grades` + `grade_attempts` schema, the trivial-diff fast-path, and the server-side guard envelope are **kept**. This ADR generalizes their *inputs* (which model, which rubric, which evidence) — it does not throw them away. The content-addressed LLM cache ([ADR 0077](
|
|
115
|
+
The worker-contract (`buildPrompt` / `extractJson` / `computeVerdict`), the `runWorker` parallel runner, the `task_grades` + `grade_attempts` schema, the trivial-diff fast-path, and the server-side guard envelope are **kept**. This ADR generalizes their *inputs* (which model, which rubric, which evidence) — it does not throw them away. The content-addressed LLM cache ([ADR 0077](0077-content-addressed-llm-cache.md)) applies unchanged and now memoizes open-model calls too.
|
|
116
116
|
|
|
117
117
|
---
|
|
118
118
|
|
|
@@ -141,7 +141,7 @@ The worker-contract (`buildPrompt` / `extractJson` / `computeVerdict`), the `run
|
|
|
141
141
|
- **Cascade (cheap open model first, Claude only on disagreement).** Rejected by the owner for the default — more moving parts and harder-to-predict behavior than a flat small ensemble. (It remains a possible *future* cost optimization behind the same provider abstraction.)
|
|
142
142
|
- **Self-host the open models on a GPU box.** Rejected — ~$200+/mo idle, never breaks even at our volume; competes with the game server. The adapter leaves the door open if privacy ever demands it.
|
|
143
143
|
- **Adopt `promptfoo` (or another framework) wholesale.** Rejected — we already have a worker-panel grader of this exact shape; `promptfoo` is now OpenAI-owned, against our governance posture. We borrow its patterns (panel voting, open-endpoint judges) and extend our own.
|
|
144
|
-
- **A separate top-level "grader module."** Rejected — it would either re-implement the core loop (duplication) or *be* the core loop (then it's just core). The split in §1 (central engine + module-contributed rubric/evidence/critic) is cleaner and matches [ADR 0083](
|
|
144
|
+
- **A separate top-level "grader module."** Rejected — it would either re-implement the core loop (duplication) or *be* the core loop (then it's just core). The split in §1 (central engine + module-contributed rubric/evidence/critic) is cleaner and matches [ADR 0083](0083-modular-architecture-strangler-build-plan.md).
|
|
145
145
|
- **A big jury (5–9 judges) for maximum robustness.** Rejected on the *"Nine Judges"* evidence — returns saturate by ~5 and correlated errors gut large panels; a small audited panel is both cheaper and more honest.
|
|
146
146
|
|
|
147
147
|
---
|
|
@@ -164,13 +164,13 @@ A build cluster under GDS-V4 (or its successor), staged so nothing destabilizes
|
|
|
164
164
|
|
|
165
165
|
1. **`ModelProvider` port + `openai-compatible` adapter** — generalize `selectGraderModel`; add provider registry + per-instance config; BYOK open-model key. (No behavior change; Claude still the only judge.)
|
|
166
166
|
2. **Heterogeneous aggregation layer** — z-score/rank normalization + median + hard-veto, config-driven in the rubric. (Still Claude-only; proves the math.)
|
|
167
|
-
3. **Grader registry + work-type seam** — `grader.workType.<key>` providers; route `task.kind` → rubric + evidence-gatherer + critics; migrate the code panel, the art/vision review ([ADR 0008](
|
|
167
|
+
3. **Grader registry + work-type seam** — `grader.workType.<key>` providers; route `task.kind` → rubric + evidence-gatherer + critics; migrate the code panel, the art/vision review ([ADR 0008](0008-family-based-tile-generation.md)/[ADR 0088](0088-consistent-character-generative-animation.md)), and the `ui` path ([ADR 0081](0081-tool-agnostic-design-layer.md)) onto it.
|
|
168
168
|
4. **Add the first open judge — advisory only** — it grades and logs to `signals`, but does not gate. Pick the checkpoint by live evaluation, not vendor numbers.
|
|
169
169
|
5. **Error-correlation audit routine** — replay labeled grades; report κ + pairwise error-correlation; choose panel composition.
|
|
170
170
|
6. **Promote open judges to voting** — once the audit shows agreement with owner decisions; tune veto thresholds.
|
|
171
171
|
7. **Vision ensemble** — add an open VLM (Qwen-VL / InternVL) as an independent second opinion to Gemini for art/animation, deterministic checks still authoritative.
|
|
172
172
|
|
|
173
|
-
Roll out behind a flag (the [ADR 0079](
|
|
173
|
+
Roll out behind a flag (the [ADR 0079](0079-value-gated-autonomous-engagement.md) "build disabled, arm later" pattern); the deterministic security gate is never flagged off.
|
|
174
174
|
|
|
175
175
|
---
|
|
176
176
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# 0090 — Metic gains task authoring: create / promote / edit + dependency & criteria shaping
|
|
2
2
|
|
|
3
|
-
- **Status:** Accepted — one line amended by [ADR 0152](
|
|
3
|
+
- **Status:** Accepted — one line amended by [ADR 0152](0152-metic-task-abandonment.md) (2026-07-27): `POST /tasks/:id/abandon`, listed below under "What stays Archon-only", moved to Metic+ alongside create/promote/edit, paired with an `abandoned → backlog` restore on `/promote`. The rest of this ADR stands.
|
|
4
4
|
- **Date:** 2026-06-26
|
|
5
5
|
- **Deciders:** Lars (Archon), Claude
|
|
6
6
|
|
|
7
|
-
**Builds on / amends:** [ADR 0016](
|
|
7
|
+
**Builds on / amends:** [ADR 0016](0016-trust-boundary-server-enforced-permissions.md) (server-enforced rank boundary — unchanged), [ADR 0018](0018-three-rank-model-goes-live.md) (three-rank model — this ADR re-ranks one row of its table), [ADR 0034](0034-thetes-graduated-newcomer-rank.md) (Thetes graduated-newcomer rank), [ADR 0086](0086-goal-scoped-work-hierarchy.md) (goal-scoped work hierarchy — the safer, scope-bounded path this ADR sits beside).
|
|
8
8
|
|
|
9
9
|
**Track:** `internal` (GDS / methodology — a Cloud Bongos platform capability).
|
|
10
10
|
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
|
|
13
13
|
## Context
|
|
14
14
|
|
|
15
|
-
Under the three-rank model ([ADR 0018](
|
|
15
|
+
Under the three-rank model ([ADR 0018](0018-three-rank-model-goes-live.md)), **task authoring was Archon-only**: `POST /tasks`, `PATCH /tasks/:id`, `POST /tasks/:id/promote`, and the task↔dependency / task↔criterion CRUD all carried `requireRank('archon')`. A Metic — the Archon-approved *working* rank — could already do the higher-trust judgment work of **idea triage** (`PATCH /inbox/:id`), **blocker review**, and **planning/priority sessions**, but could not turn the ideas they triaged into the tasks those ideas became. They had to hand each one back to the Archon to author.
|
|
16
16
|
|
|
17
17
|
That is an incoherent trust line. A rank trusted to decide *which ideas become work* (triage) but not trusted to *write the work down* (author a task) creates a bottleneck precisely at the Archon, for no security gain — the Metic already directs the plan; they just can't record it.
|
|
18
18
|
|
|
19
19
|
Lars's directive (2026-06-26): **"If a Metic can run idea triage, they should be able to seed tasks."** Allow Metics to create, promote, and edit tasks now; setting rank and closing versions stay Archon. Explicitly: *"we can tighten up security later."*
|
|
20
20
|
|
|
21
|
-
This is deliberately broader and simpler than [ADR 0086](
|
|
21
|
+
This is deliberately broader and simpler than [ADR 0086](0086-goal-scoped-work-hierarchy.md), which solves the *lower-rank* (xenos/thetes) version of the same problem with a tightly scoped, module-bounded `POST /goals/:id/tasks` grant. ADR 0086's careful scope-subset wall is the right tool for letting an *untrusted* builder author within a fence; for the *trusted* Metic, the owner chose the blunt grant: full task authoring, no fence.
|
|
22
22
|
|
|
23
23
|
## Decision
|
|
24
24
|
|
|
@@ -43,7 +43,7 @@ The dependency + criteria CRUD move alongside create/edit so a Metic can fully *
|
|
|
43
43
|
|
|
44
44
|
Opening `PATCH /tasks/:id` to Metic also exposes two fields that were previously gated *only* by the route being Archon-only — neither had a field-level check. We split them by what they actually are:
|
|
45
45
|
|
|
46
|
-
- **`requires_rank`** stays open to Metic. `db.updateTaskRequiresRank` clamps the value **up** to the auto-derived floor ([ADR 0084](
|
|
46
|
+
- **`requires_rank`** stays open to Metic. `db.updateTaskRequiresRank` clamps the value **up** to the auto-derived floor ([ADR 0084](0084-auto-derived-per-task-rank-floor.md)), so a Metic can only *raise* who may claim a task — never open a sensitive task to a lower rank. Raising a claim floor grants the Metic nothing; it is genuine task-shaping ("this needs a higher rank").
|
|
47
47
|
- **`security_sensitive`** stays **Archon-only**, enforced by a new in-handler `rankMeetsThreshold(rank, ['archon'])` check in the PATCH handler. It is a security control, not a planning field: it suppresses the ship→Discord broadcast (routes it to the Archon-only `#security-ship-feed`, task 990) and feeds the auto-derived rank floor. Letting a Metic flip an existing task to `security_sensitive: false` would lower a flag-only-sensitive task's floor and un-suppress its broadcast — a weakening of an existing control, outside "author/shape a task." Setting it at **create** time (`POST /tasks`) is left open to Metic: a brand-new task has no existing sensitivity to clear, and setting the flag *on* only ratchets restriction up.
|
|
48
48
|
|
|
49
49
|
### What stays Archon-only
|
|
@@ -51,7 +51,7 @@ Opening `PATCH /tasks/:id` to Metic also exposes two fields that were previously
|
|
|
51
51
|
- **Setting rank** (`PATCH /builders/:id/rank`) and **closing versions** — the two authorities Lars named as never-delegated.
|
|
52
52
|
- `POST /tasks/:id/abandon` (terminal scope removal — the inverse of promote; a destructive lifecycle kill).
|
|
53
53
|
- `POST /tasks/:id/confirm` (grader-bypass — must not let a builder push their own work past a failed grade — [#231](https://example.com/builders#/task/231)).
|
|
54
|
-
- The **cross-tier polymorphic** `POST|DELETE /dependencies` and goal-scope edges ([ADR 0086](
|
|
54
|
+
- The **cross-tier polymorphic** `POST|DELETE /dependencies` and goal-scope edges ([ADR 0086](0086-goal-scoped-work-hierarchy.md) §5) — reshaping `{task,goal,criterion}` order across shared workspaces is a wider blast radius than wiring one task's own deps, and stays pinned Archon.
|
|
55
55
|
- `POST /versions`, peer-vote tally, override-request adjudication, newcomer-restock.
|
|
56
56
|
|
|
57
57
|
### Downgrade protection
|
|
@@ -61,10 +61,10 @@ Opening `PATCH /tasks/:id` to Metic also exposes two fields that were previously
|
|
|
61
61
|
## Consequences
|
|
62
62
|
|
|
63
63
|
- **Metics can now run the full triage→author loop** — promote an idea to a task and shape it — without the Archon. The delegation bottleneck at the owner is removed for the trusted working rank.
|
|
64
|
-
- **Larger trusted surface.** A Metic is now a `requireRank('metic')` away from authoring any task in any open version (subject to the per-task `requires_rank` floor on *claiming*, [ADR 0084](
|
|
64
|
+
- **Larger trusted surface.** A Metic is now a `requireRank('metic')` away from authoring any task in any open version (subject to the per-task `requires_rank` floor on *claiming*, [ADR 0084](0084-auto-derived-per-task-rank-floor.md), which is unaffected). This is the "tighten later" debt Lars accepted: there is no per-version, per-module, or per-goal fence on a Metic's authoring the way ADR 0086 fences a lower rank. A future ADR can narrow this (e.g. fold Metic authoring into the goal-scope model) without re-litigating the principle.
|
|
65
65
|
- **ADR 0018's table changes.** Its row *"Create / promote / edit tasks, deps, confirm, done-when scope — Metic ❌ / Archon ✅"* is now split: create/promote/edit/deps are ✅ for Metic; confirm and version-scope stay ❌. The ADR 0018 file is annotated with a pointer here rather than rewritten (ADRs are append-only history).
|
|
66
66
|
- **ADR 0086 still stands** for xenos/thetes — its module-scoped `POST /goals/:id/tasks` grant is the only authoring path for sub-Metic ranks, and its scope-subset + protected-path walls are untouched. This ADR only widens the *Metic* line.
|
|
67
|
-
- **Trust boundary intact** ([ADR 0016](
|
|
67
|
+
- **Trust boundary intact** ([ADR 0016](0016-trust-boundary-server-enforced-permissions.md)): enforcement is still server-side, per-request, no cache. Editing a doc or `CLAUDE.md` grants nothing; the route's `requireRank('metic','archon')` is the authority.
|
|
68
68
|
|
|
69
69
|
## Alternatives considered
|
|
70
70
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
**Status:** Accepted (2026-06-26) · task [#1570](https://example.com/builders#/task/1570) (BV1.R67) · criterion **C7 `gds-core-modularized`** (BONGOS-V1) · planning [session 2026-06-26](../session-logs/<redacted>.md)
|
|
4
4
|
|
|
5
|
-
**Amends:** [ADR 0083](
|
|
5
|
+
**Amends:** [ADR 0083](0083-modular-architecture-strangler-build-plan.md) — the strangler build plan. ADR 0083 §"The four module moves" cut the four *feature* modules (dev-box, game, discord, art-pipeline) around an undifferentiated core. This ADR extends the same strangler to the **core itself**: it bounds the kernel as a real artifact and defines how a *core domain* becomes a module. It changes nothing about 0083's five rules, the loader, or the fitness ratchet — it gives the "kernel" 0083 kept referring to a concrete file roster, and the "carve `db.js` per-domain" 0083 mentioned ([02 §3](../design/modular-architecture/02-module-map.md)) a mechanism.
|
|
6
6
|
|
|
7
|
-
**Builds on:** [ADR 0016](
|
|
7
|
+
**Builds on:** [ADR 0016](0016-trust-boundary-server-enforced-permissions.md) (server-enforced rank boundary — the kernel *is* the trust boundary), [ADR 0043](0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md) (protected paths), [ADR 0086](0086-goal-scoped-work-hierarchy.md) (module-scope-map), [ADR 0062](0062-medusa-instance-model-decoupling.md) (core↔host split — same "neutral contract, swappable behind it" shape).
|
|
8
8
|
|
|
9
|
-
**Relates to:** [ADR 0095](
|
|
9
|
+
**Relates to:** [ADR 0095](0095-cross-agent-context-management.md) — the *findability* complement to this ADR's *structural* scoping (authored alongside it): 0091 bounds how much an agent loads (kernel + per-domain modules); 0095 helps the agent find the right place within it (docstrings, greppability, retrieval). The module-header doc-comment convention 0095 adopts is authored per module the carve here defines.
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
- **Date:** 2026-06-27
|
|
5
5
|
- **Deciders:** Lars (Archon), Claude
|
|
6
6
|
|
|
7
|
-
**Builds on:** [ADR 0083](
|
|
7
|
+
**Builds on:** [ADR 0083](0083-modular-architecture-strangler-build-plan.md) (modular architecture — the module this capability ships as), [ADR 0089](0089-modular-multi-model-adversarial-grader.md) (the `ModelProvider` `openai-compatible` adapter the on-prem inference target reuses, and its decisive hosting-cost finding), [ADR 0062](0062-medusa-instance-model-decoupling.md) (core↔host decoupling — the warehouse box is host-instance config, not portable core), [ADR 0081](0081-tool-agnostic-design-layer.md) (swappable adapters against a neutral contract), [ADR 0031](0031-cloud-dev-environments-for-builders.md) (cloud dev boxes — a workload a later phase may partly displace), [ADR 0060](0060-gds-retrieval-layer.md) (recall/embeddings — a consumer), [ADR 0088](0088-consistent-character-generative-animation.md) (the per-character LoRA deferred as "needs GPU training + an open model" — a workload this enables), [ADR 0016](0016-trust-boundary-server-enforced-permissions.md) / [ADR 0043](0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md) (server-enforced trust boundary the box must never weaken), [ADR 0033](0033-discord-bot-service-principal.md) (the precedent for a useful service that sits *outside* the trust boundary).
|
|
8
8
|
|
|
9
9
|
**Track:** `internal` (a portable Cloud Bongos platform capability).
|
|
10
10
|
|
|
@@ -12,30 +12,30 @@
|
|
|
12
12
|
|
|
13
13
|
## Context
|
|
14
14
|
|
|
15
|
-
Example wants to stand up a physical server inside the warehouse to (a) cut software-hosting cost, (b) get cheaper access to open-weight LLMs and code, and (c) capture other on-prem advantages. OTB runs on a <$5K/yr budget ([CLAUDE.md §4](../../CLAUDE.md)): a ~$14/mo DigitalOcean droplet for prod, cloud LLM APIs (Claude for code, Gemini for art), and per-builder cloud dev boxes ([ADR 0031](
|
|
15
|
+
Example wants to stand up a physical server inside the warehouse to (a) cut software-hosting cost, (b) get cheaper access to open-weight LLMs and code, and (c) capture other on-prem advantages. OTB runs on a <$5K/yr budget ([CLAUDE.md §4](../../CLAUDE.md)): a ~$14/mo DigitalOcean droplet for prod, cloud LLM APIs (Claude for code, Gemini for art), and per-builder cloud dev boxes ([ADR 0031](0031-cloud-dev-environments-for-builders.md)). The largest *variable* cost is LLM spend.
|
|
16
16
|
|
|
17
17
|
This ADR records the **scope-of-use** decision — the first of the four phases the owner set: *scope use → scope build → hardware setup → software use* — and the shape the capability ships in. The build, hardware, and software phases are task-pending.
|
|
18
18
|
|
|
19
19
|
### The reframe: a portable module + a host-specific target
|
|
20
20
|
|
|
21
|
-
A warehouse server is *hardware*; a Cloud Bongos module is *software that mounts into a running instance* ([ADR 0083](
|
|
21
|
+
A warehouse server is *hardware*; a Cloud Bongos module is *software that mounts into a running instance* ([ADR 0083](0083-modular-architecture-strangler-build-plan.md)). So "the hosting module" is **not** "the server in a folder." Following the core↔host split already used for branding ([ADR 0062](0062-medusa-instance-model-decoupling.md)) and design tools ([ADR 0081](0081-tool-agnostic-design-layer.md)):
|
|
22
22
|
|
|
23
23
|
- **The `hosting` module (portable core):** a broker, default-**OFF**, that exposes labeled compute/storage **seams** and resolves each to a configured **target**. The default target is today's cloud/APIs, so a vanilla instance behaves exactly as it does now (fail-to-vanilla, like the loader with no `modules/`).
|
|
24
24
|
- **The warehouse box (host-instance config):** one **on-prem target** an adapter points at, declared in OTB's instance config — not in portable code. Another Cloud Bongos instance declares none and stays all-cloud.
|
|
25
25
|
|
|
26
26
|
Two properties fall straight out, and they answer the two standing objections to on-prem:
|
|
27
27
|
|
|
28
|
-
1. **Nothing depends on the box.** Each seam resolves through `resolveOptional(port, cloudDefaultFn)` ([ADR 0083](
|
|
28
|
+
1. **Nothing depends on the box.** Each seam resolves through `resolveOptional(port, cloudDefaultFn)` ([ADR 0083](0083-modular-architecture-strangler-build-plan.md)); a target marked unreachable falls back to cloud per-call. The box is an opportunistic cost-saver, never a single point of failure. (This is also why public, real-time prod — the game's Colyseus rooms — stays in the cloud: you can't fail a live socket over mid-session.)
|
|
29
29
|
2. **Every Example instance shares it.** The owner chose to size and abstract the box as a shared backend across all Example Cloud Bongos instances — one GPU amortized across projects is what raises utilization enough to matter.
|
|
30
30
|
|
|
31
31
|
### Honest economics — what the GPU is and isn't good for
|
|
32
32
|
|
|
33
|
-
[ADR 0089](
|
|
33
|
+
[ADR 0089](0089-modular-multi-model-adversarial-grader.md)'s market sweep is decisive and we adopt it rather than relitigate: **at low volume, pay-per-call open-model APIs (DeepInfra / OpenRouter) beat self-hosting** — a few-thousand-calls/month workload is ~$1–5/mo on API, and a fixed, cached prompt crushes the bill. A self-hosted GPU only wins when it is *kept busy* or when per-call cloud pricing is high.
|
|
34
34
|
|
|
35
35
|
So the warehouse GPU earns its keep on a **narrower** set than "all inference":
|
|
36
36
|
|
|
37
37
|
- **GPU-bound batch generation** — art image-gen at volume across instances (priced per-image in the cloud).
|
|
38
|
-
- **Model fine-tuning / training** — the per-character LoRA [ADR 0088](
|
|
38
|
+
- **Model fine-tuning / training** — the per-character LoRA [ADR 0088](0088-consistent-character-generative-animation.md) deferred as "level-2 (needs GPU training + an open model)"; cloud charges steep per-GPU-hour, an owned card amortizes.
|
|
39
39
|
- **Always-busy bulk jobs** — overnight eval/analysis at a scale that saturates the card.
|
|
40
40
|
|
|
41
41
|
The **non-GPU wins** stand on their own:
|
|
@@ -56,7 +56,7 @@ Conversely — correcting an earlier hand-wave in this session — **embeddings
|
|
|
56
56
|
|
|
57
57
|
## Decision
|
|
58
58
|
|
|
59
|
-
**Ship a portable `hosting` module (default-OFF, fail-to-vanilla) that brokers compute and storage workloads to configured hosting targets through kernel seams, reusing the [ADR 0089](
|
|
59
|
+
**Ship a portable `hosting` module (default-OFF, fail-to-vanilla) that brokers compute and storage workloads to configured hosting targets through kernel seams, reusing the [ADR 0089](0089-modular-multi-model-adversarial-grader.md) `ModelProvider` adapter contract for inference. A GPU box in the Example warehouse is OTB's first on-prem target — one adapter backend declared in host-instance config, shared across Example instances, with automatic cloud fallback so nothing ever depends on the box.**
|
|
60
60
|
|
|
61
61
|
### 1. The module shape
|
|
62
62
|
|
|
@@ -76,18 +76,18 @@ The module registers providers; consumers resolve via `resolveOptional(port, clo
|
|
|
76
76
|
|
|
77
77
|
| Seam | Consumer(s) | Conservative-posture target |
|
|
78
78
|
|---|---|---|
|
|
79
|
-
| `inference.run` | grader ([ADR 0089](
|
|
79
|
+
| `inference.run` | grader ([ADR 0089](0089-modular-multi-model-adversarial-grader.md)), eval cron | API by default; on-prem only when saturated / data-local |
|
|
80
80
|
| `imagegen.run` | art-pipeline | **on-prem GPU** (batch) when up, else Gemini |
|
|
81
81
|
| `embeddings.embed` | recall ([ADR 0060](0060-gds-retrieval-layer.md)) | API (cheap) by default; on-prem opportunistic |
|
|
82
|
-
| `training.run` | art-pipeline (LoRA, [ADR 0088](
|
|
82
|
+
| `training.run` | art-pipeline (LoRA, [ADR 0088](0088-consistent-character-generative-animation.md) L2) | **on-prem GPU** |
|
|
83
83
|
| `storage.put/get` | backups, art assets | **on-prem NAS** + offsite copy |
|
|
84
84
|
|
|
85
|
-
Inference does **not** reinvent [ADR 0089](
|
|
85
|
+
Inference does **not** reinvent [ADR 0089](0089-modular-multi-model-adversarial-grader.md): the on-prem target is just one more `openai-compatible` `ModelProvider` endpoint (vLLM / Ollama) alongside the hosted ones. The hosting module adds the *target selection + health/fallback + sharing config* around it.
|
|
86
86
|
|
|
87
87
|
### 3. Network + trust boundary
|
|
88
88
|
|
|
89
89
|
- **Ingress:** the cloud instance reaches the warehouse box over an **outbound tunnel the box initiates** (e.g. Cloudflare Tunnel or WireGuard) — no open inbound ports, no static-IP requirement, no DDoS exposure at the warehouse. This sidesteps the whole residential/commercial-internet problem.
|
|
90
|
-
- **Trust boundary ([ADR 0016](
|
|
90
|
+
- **Trust boundary ([ADR 0016](0016-trust-boundary-server-enforced-permissions.md) / [ADR 0043](0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md)):** the box runs jobs and holds model weights, but authority stays server-enforced in the cloud GDS. The box sits **outside** the trust boundary — like Discord ([ADR 0033](0033-discord-bot-service-principal.md)): it can compute, it can never grant rank or land code. A compromised box can degrade or poison *non-shipping* outputs (hence the conservative posture, and the grader staying authoritative), never escalate permissions.
|
|
91
91
|
|
|
92
92
|
### 4. How this subproject is filed (the durable home)
|
|
93
93
|
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
**Status:** Accepted (2026-06-27) · task [#1627](https://example.com/builders#/task/1627) (BV1.R76) · criterion **C7 `gds-core-modularized`** (BONGOS-V1) · owner-greenlit
|
|
4
4
|
|
|
5
|
-
**Amends:** [ADR 0091](
|
|
5
|
+
**Amends:** [ADR 0091](0091-bounding-the-kernel-and-db-carve.md) — which carved the first two core domains (memory R72, grading R73) and **explicitly deferred tranche 2 "per owner."** The owner greenlit tranche 2 on 2026-06-27. This ADR fixes the order, the remaining kernel ports, and the lifecycle endgame; it changes nothing about 0091's kernel roster, the carve mechanism, or the fitness ratchet — those ship as reusable infrastructure.
|
|
6
6
|
|
|
7
|
-
**Builds on:** [ADR 0083](
|
|
7
|
+
**Builds on:** [ADR 0083](0083-modular-architecture-strangler-build-plan.md) (the strangler plan + 5 module rules), [02 module-map](../design/modular-architecture/02-module-map.md) (the import-graph evidence + the decided ~16-module roster), [04 module-lifecycle](../design/modular-architecture/04-module-lifecycle.md) (the seam/port mechanism).
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
## Context
|
|
12
12
|
|
|
13
|
-
Tranche 1 ([ADR 0091](
|
|
13
|
+
Tranche 1 ([ADR 0091](0091-bounding-the-kernel-and-db-carve.md)) did two things: it **proved the core-carve pattern** on the two cleanest-slicing domains (memory, grading — demonstrated by [`scripts/gds/coreB-carve-proof.sh`](../../scripts/gds/coreB-carve-proof.sh), R74), and it **shipped the infrastructure** every later carve reuses — the bounded kernel roster + `KERNEL_FILES` fitness ratchet (R70), the doorway with `withTx` (R68), the per-domain `db.js` slice pattern + `db-kernel.js` (R69), and the `grade` kernel **port** (R73). That infrastructure is generic: each remaining core domain is now a *pure carve* copying R72/R73, with **no new scaffolding**.
|
|
14
14
|
|
|
15
15
|
What remains is the bulk of the core: ~8 cohesive domains + the two web UIs + the lifecycle state machine ([02 §6](../design/modular-architecture/02-module-map.md) roster). The import-graph scan ([02 §2](../design/modular-architecture/02-module-map.md)) already told us which slice cleanly (economy, ideas, security alongside the proven memory/grading) and which is the coupled cluster (the lifecycle — `tasks → grader/github-push/ship-broadcast`). This ADR turns that evidence into a sequence.
|
|
16
16
|
|
|
@@ -38,11 +38,11 @@ Per [02 §2](../design/modular-architecture/02-module-map.md) (import-graph, not
|
|
|
38
38
|
|
|
39
39
|
### 2. economy registers the `reward` kernel port — the twin of `grade`
|
|
40
40
|
|
|
41
|
-
The lifecycle invokes two domain capabilities at ship: **grade** (already a port, R73) and **reward** (credit allocation — `applyGrade`/credit-log). [02 §3/§4](../design/modular-architecture/02-module-map.md) and the [04 lifecycle](../design/modular-architecture/04-module-lifecycle.md) seam design both name `reward` as the second illustrative port. R77 makes it real: economy `registerProvider('reward', …)` at boot; the lifecycle resolves `seams.resolveOptional('reward')` instead of importing economy. This is why **economy is first and lifecycle is last** — by the time the state machine is carved, every capability it calls is already a kernel port, so the lifecycle module imports only the kernel + resolves ports (the [ADR 0091 §4](
|
|
41
|
+
The lifecycle invokes two domain capabilities at ship: **grade** (already a port, R73) and **reward** (credit allocation — `applyGrade`/credit-log). [02 §3/§4](../design/modular-architecture/02-module-map.md) and the [04 lifecycle](../design/modular-architecture/04-module-lifecycle.md) seam design both name `reward` as the second illustrative port. R77 makes it real: economy `registerProvider('reward', …)` at boot; the lifecycle resolves `seams.resolveOptional('reward')` instead of importing economy. This is why **economy is first and lifecycle is last** — by the time the state machine is carved, every capability it calls is already a kernel port, so the lifecycle module imports only the kernel + resolves ports (the [ADR 0091 §4](0091-bounding-the-kernel-and-db-carve.md) rule, applied to the whole cluster).
|
|
42
42
|
|
|
43
43
|
### 3. The lifecycle stays ONE module, carved last
|
|
44
44
|
|
|
45
|
-
Do **not** split tasks/claims/versions/ship apart ([02 §4](../design/modular-architecture/02-module-map.md), restated in [ADR 0091](
|
|
45
|
+
Do **not** split tasks/claims/versions/ship apart ([02 §4](../design/modular-architecture/02-module-map.md), restated in [ADR 0091](0091-bounding-the-kernel-and-db-carve.md) alternatives). Keep the state machine whole; the only edges it keeps are kernel + the grade/reward ports. Carving it last means the `db.js` residue at the end is exactly the lifecycle slice + `db-kernel.js` — the shape ADR 0091 §2 predicted.
|
|
46
46
|
|
|
47
47
|
### 4. Every carve is proof-gated; C7 is satisfied by R87
|
|
48
48
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Status:** Accepted (2026-06-27)
|
|
4
4
|
**Track:** internal
|
|
5
|
-
**Builds on:** [ADR 0061](
|
|
5
|
+
**Builds on:** [ADR 0061](0061-context-layer-decomposition.md) (context layers), [ADR 0063](0063-generated-repo-map-symbol-skeleton.md) (generate-don't-narrate), [ADR 0062 §8](0062-medusa-instance-model-decoupling.md) (generated artifacts), [ADR 0083](0083-modular-architecture-strangler-build-plan.md) / [ADR 0091](0091-bounding-the-kernel-and-db-carve.md) (module system), [ADR 0056](0056-prod-deploy-script-mirror-and-healthcheck-retry.md) (hand-installed deploy script), the world-snapshot precedent (`scripts/snapshots/maybe-render-on-deploy.sh`).
|
|
6
6
|
**Promotes:** [idea #457](https://example.com/builders#/idea/457). **Tasks:** [#1640](https://example.com/builders#/task/1640) (this), [#1641](https://example.com/builders#/task/1641) (doc-generator migration).
|
|
7
7
|
|
|
8
8
|
## Context
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Status:** Proposed (owner-directed 2026-06-27; pending claim + companion ADR)
|
|
4
4
|
**Track:** internal
|
|
5
|
-
**Builds on:** [ADR 0060](0060-gds-retrieval-layer.md) (recall / retrieval layer), [ADR 0063](
|
|
5
|
+
**Builds on:** [ADR 0060](0060-gds-retrieval-layer.md) (recall / retrieval layer), [ADR 0063](0063-generated-repo-map-symbol-skeleton.md) (generated repo-map symbol skeleton), [ADR 0094](0094-repo-atlas-self-drawing-codebase-map.md) (repo atlas), [ADR 0049](0049-split-parallel-safety-contract.md) (touches[] advisory), [ADR 0082](0082-server-side-merge-conflict-auto-resolution.md) (server-side conflict resolver), [ADR 0091](0091-bounding-the-kernel-and-db-carve.md) (memory module carve), [ADR 0026](0026-bfg-memory-hygiene-and-cross-builder-learning.md) / [ADR 0027](0027-bfg-session-inefficiency-evaluator.md) (BFG memory).
|
|
6
6
|
**Pairs with:** a companion owner-authored ADR on **grep vs. a semantic/embedding retrieval layer**. This ADR deliberately does **not** decide that question — every item below is independent of which retrieval mechanism we run.
|
|
7
7
|
**Sources evaluated:** [graphify](https://github.com/safishamsi/graphify) (MIT, Python) and [claude-mem](https://github.com/thedotmack/claude-mem) (Apache-2.0, JavaScript), in the 2026-06-27 research session.
|
|
8
8
|
|
|
@@ -13,12 +13,12 @@ We evaluated two mature, widely-starred Claude-Code tools that overlap our inter
|
|
|
13
13
|
- **graphify** — turns a codebase + docs into a queryable knowledge graph (tree-sitter AST + LLM-inferred edges + Leiden clustering), shipped as a `/graphify` skill + MCP server.
|
|
14
14
|
- **claude-mem** — automatic persistent session memory (lifecycle hooks capture every tool use → AI-compressed summaries → reinjected next session), backed by SQLite + a Chroma vector DB.
|
|
15
15
|
|
|
16
|
-
Both overlap things we already run — recall ([ADR 0060](0060-gds-retrieval-layer.md)), the generated repo-map ([ADR 0063](
|
|
16
|
+
Both overlap things we already run — recall ([ADR 0060](0060-gds-retrieval-layer.md)), the generated repo-map ([ADR 0063](0063-generated-repo-map-symbol-skeleton.md)) and the repo atlas ([ADR 0094](0094-repo-atlas-self-drawing-codebase-map.md)), the carved memory module ([ADR 0091](0091-bounding-the-kernel-and-db-carve.md)), the `learnings` table, and `touches[]`/merge-collision handling ([ADR 0049](0049-split-parallel-safety-contract.md), [ADR 0082](0082-server-side-merge-conflict-auto-resolution.md)).
|
|
17
17
|
|
|
18
18
|
**Neither fits wholesale**, for reasons specific to us:
|
|
19
19
|
- graphify is **Python** — a foreign runtime bolted beside a Node/Postgres codebase; it could only ever sit *next to* the GDS, never inside it.
|
|
20
20
|
- claude-mem's architecture is **local-first, single-developer** (a per-machine daemon + local SQLite + a Chroma vector service pulling in a Python/`uv` dependency). We are **centralized and multi-builder** (memory syncs to one Postgres on the droplet, rank-scoped, with the BFG doing cross-builder work). The shape is wrong.
|
|
21
|
-
- graphify's graph has **no rank-scoping**; committing a full-repo graph would expose permission-core structure to low-rank builders, against [ADR 0016](
|
|
21
|
+
- graphify's graph has **no rank-scoping**; committing a full-repo graph would expose permission-core structure to low-rank builders, against [ADR 0016](0016-trust-boundary-server-enforced-permissions.md).
|
|
22
22
|
- Both run an **open-core commercial play** (graphify → Penpax; claude-mem → a server/team beta), and claude-mem additionally endorses an associated **memecoin** — governance signals that argue against *depending* on either, though not against reading them.
|
|
23
23
|
- Claude Code itself deliberately favours **live agentic search over a prebuilt index** (freshness, simplicity) — the philosophy we already follow with lexical recall + a generated map.
|
|
24
24
|
|
|
@@ -30,8 +30,8 @@ Adopt the following eight concepts. Each is reimplemented in-stack; none require
|
|
|
30
30
|
|
|
31
31
|
### From graphify (the "Tier-2" borrows)
|
|
32
32
|
|
|
33
|
-
- **G1 — Symbol-level collision detection.** Move `touches[]` overlap from *path-prefix* to *symbol/dependency* awareness (`src/bongos/path-match.js` `touchesOverlap`/`matchOne`, consumed by `claims.js`). **Why:** path-prefix over-flags — two tasks editing different functions in one big file (e.g. `db.js`) are falsely serialized, costing parallelism — and under-detects, missing cross-file collisions where one task changes a symbol another file depends on. [ADR 0049](
|
|
34
|
-
- **G2 — AST-based repo-map upgrade.** Replace the regex symbol extractor with a real parser via the `extractFile()` seam [ADR 0063](
|
|
33
|
+
- **G1 — Symbol-level collision detection.** Move `touches[]` overlap from *path-prefix* to *symbol/dependency* awareness (`src/bongos/path-match.js` `touchesOverlap`/`matchOne`, consumed by `claims.js`). **Why:** path-prefix over-flags — two tasks editing different functions in one big file (e.g. `db.js`) are falsely serialized, costing parallelism — and under-detects, missing cross-file collisions where one task changes a symbol another file depends on. [ADR 0049](0049-split-parallel-safety-contract.md) already cut the *cost of being wrong* (touches is advisory, backfilled from the real diff); this attacks the *accuracy of the forecast*, the remaining lever. `git merge` stays the ground-truth backstop.
|
|
34
|
+
- **G2 — AST-based repo-map upgrade.** Replace the regex symbol extractor with a real parser via the `extractFile()` seam [ADR 0063](0063-generated-repo-map-symbol-skeleton.md) explicitly left for this (`scripts/gds/gen-repo-map.js`). **Why:** the regex extractor is server-JS-only, conflates two symbols that share a name, and builds no call graph. A parser (tree-sitter, **WASM build** — which sidesteps the `node-gyp` native-compile cost that [ADR 0063](0063-generated-repo-map-symbol-skeleton.md) rejected) gives polyglot coverage (the Python `art/` pipeline, client `public/game/` JS, SQL), real symbol resolution, and a dependency graph. That graph is the **substrate G1 needs**, and it feeds [ADR 0094](0094-repo-atlas-self-drawing-codebase-map.md)'s atlas **truer edges** than today's `fitness.js` regex-on-`require` facts. This is the one item with a (vendored, no-native-build) dependency cost; accepted for the payoff.
|
|
35
35
|
- **G3 — Surface the "why," forward-facing.** Extract design rationale (`# WHY:`/`# HACK:`/docstrings + ADR rationale) and attach it to the code it explains, surfaced *at the moment of work* rather than left in an archive. **Why:** we already *pay* to capture "why" (the ADR culture, the `# WHY:` convention) — but capture ≠ surfacing, and our builders are memoryless AI agents with a strong instinct to "tidy" load-bearing code, re-breaking solved problems (the fences in our own learnings/memory log). Cheap first cut: feed `# WHY:` + ADR rationale into the recall index; later, auto-inject the governing ADR when an agent opens a file it covers.
|
|
36
36
|
|
|
37
37
|
### From claude-mem (concepts 1–5)
|
|
@@ -39,7 +39,7 @@ Adopt the following eight concepts. Each is reimplemented in-stack; none require
|
|
|
39
39
|
- **C1 — Progressive-disclosure retrieval with token-cost visibility.** Layer recall into *cheap index → batch detail*: return a compact index first (IDs + titles, ~tens of tokens each), then fetch full bodies only for the few the agent selects (`modules/memory/routes/search.js`, `scripts/gds/recall.js`, the recall skill). **Why:** recall returns a flat list of snippets today; layering it yields ~10× fewer tokens per query (claude-mem's documented figure), which compounds across every session and serves the $5K / token-frugal posture directly. **Independent of grep-vs-semantic** — it's a presentation/cost pattern over whatever retrieval leg(s) the companion ADR chooses.
|
|
40
40
|
- **C2 — Hook graceful-degradation policy.** Codify one rule across the hook fleet (`.claude/hooks/*`, memory-sync in `ship.js`, the Conductor): an **infrastructure** failure (ECONNREFUSED / timeout / 5xx) → **exit 0, never block** the builder; a **code bug** (4xx / TypeError) → **exit 2, block** so it's fixed. **Why:** we run many hooks; a droplet hiccup must never freeze a session mid-work. (The unreachable-API condition encountered while authoring this very ADR is the canonical example.)
|
|
41
41
|
- **C3 — Memory-usefulness feedback loop.** Record whether a recalled chunk / learning was actually used, and let that signal drive ranking and decay (`modules/memory`, `learnings`). **Why:** nothing today tracks whether recalled knowledge helped; a usefulness signal lets high-value memory rise and dead weight fade, keeping the corpus high-signal as it grows. Pairs naturally with graphify's `save-result` (useful / dead_end / corrected).
|
|
42
|
-
- **C4 — `<private>` content-exclusion marker.** A tag an agent can wrap around sensitive content so it never enters the memory store (`modules/memory` ingest; complements the BFG transcript scrub). **Why:** a simple, explicit opt-out that reinforces the trust boundary ([ADR 0016](
|
|
42
|
+
- **C4 — `<private>` content-exclusion marker.** A tag an agent can wrap around sensitive content so it never enters the memory store (`modules/memory` ingest; complements the BFG transcript scrub). **Why:** a simple, explicit opt-out that reinforces the trust boundary ([ADR 0016](0016-trust-boundary-server-enforced-permissions.md)) — secrets, permission-core internals, sub-Metic-sensitive material fenced out at the source.
|
|
43
43
|
- **C5 — Windowed content-hash dedup.** On write, hash `(session + title + body)` and, if the same hash reappears within a short window, reuse the existing row instead of inserting (`modules/memory`, `learnings.js`). **Why:** stops near-duplicate memory/learning entries; complements the existing `source_ref` soft-idempotency.
|
|
44
44
|
|
|
45
45
|
## What we decline (and why)
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
- **Date:** 2026-06-27
|
|
5
5
|
- **Deciders:** Lars (owner) · Claude (Opus 4.8)
|
|
6
6
|
- **Track:** `internal` (Cloud Bongos / context + retrieval)
|
|
7
|
-
- **Relates to:** [ADR 0083](
|
|
7
|
+
- **Relates to:** [ADR 0083](0083-modular-architecture-strangler-build-plan.md) / [ADR 0091](0091-bounding-the-kernel-and-db-carve.md) — the modular decomposition is the *structural* half of low-context AI navigation; this ADR is the *findability* half (see Context). Also [ADR 0094](0094-repo-atlas-self-drawing-codebase-map.md) (the codebase map), [ADR 0061](0061-context-layer-decomposition.md) / [ADR 0063](0063-generated-repo-map-symbol-skeleton.md) (the context layers it feeds). Companion: [ADR 0095-a](0095-borrowed-memory-and-retrieval-concepts.md) — adopts the memory/retrieval *concepts* and explicitly defers the grep-vs-semantic decision to this ADR (the two collided on `0095` in parallel; see the index note).
|
|
8
8
|
|
|
9
9
|
## Context
|
|
10
10
|
|
|
11
|
-
Cloud Bongos is an AI-first build platform, and today its agent-facing surface is shaped almost entirely for one tool — Claude Code: the always-loaded root `CLAUDE.md` ([ADR 0061](
|
|
11
|
+
Cloud Bongos is an AI-first build platform, and today its agent-facing surface is shaped almost entirely for one tool — Claude Code: the always-loaded root `CLAUDE.md` ([ADR 0061](0061-context-layer-decomposition.md)), the `.claude/` skills + hooks, a lexical-first retrieval layer ([ADR 0060](0060-gds-retrieval-layer.md)), and a generated repo-map ([ADR 0063](0063-generated-repo-map-symbol-skeleton.md)). The owner wants Cloud Bongos instances to be editable across many agentic coding tools (Claude Code, OpenAI Codex, Cursor, …). That raises two questions a future version must answer:
|
|
12
12
|
|
|
13
13
|
1. **Retrieval** — how do we make a repo navigable by tools that find code by literal text search ("grep"), and is a meaning-based ("semantic") retrieval layer worth its recurring cost and index-drift?
|
|
14
14
|
2. **Portability** — how should the agent-facing contract (instructions, commands, enforcement, capabilities) be structured so it isn't hardwired to one tool?
|
|
@@ -20,10 +20,10 @@ The durable findings:
|
|
|
20
20
|
- **Agents navigate by grep, not embeddings.** Claude Code, Codex, and Cursor all default to literal search (generate query → grep → read → iterate). Anthropic and Sourcegraph both *removed* embedding indexes from their code tools (precision on exact identifiers, freshness/anti-staleness, privacy, cost); Cursor keeps embeddings but only *alongside* grep and fights staleness with incremental Merkle-tree re-indexing. So a literal-search-friendly repo is the high-leverage, low-cost target.
|
|
21
21
|
- **Greppability is mostly free, write-time discipline that doesn't rot:** distinctive (not generic) names, "the Grep Test" (never construct or dispatch identifiers dynamically), one concept = one name (don't re-case across boundaries), unique whole log/error strings, flat namespaces. Generic identifiers are the single biggest documented retrieval-killer for agents.
|
|
22
22
|
- **The best "semantic layer" is meaning written into the source.** Docstrings, module headers, READMEs, and ADRs co-locate concept words with the symbol — which helps grep, agentic search, *and* any future embedding, at zero recurring cost and zero index-drift (the "index" is the version-controlled text). OTB already has the structural half (the generated repo-map with a CI freshness gate) and the ADR/README half; the missing piece is per-symbol/per-module docstrings + consistent concept vocabulary.
|
|
23
|
-
- **Cross-tool portability is an adapter problem** — one canonical source per concern + thin per-tool adapters: instructions → an `AGENTS.md`-style canonical file with thin per-tool pointers; commands → plain CLI (already true — slash-commands wrap `scripts/gds/*.js`); enforcement → server/git/CI, never tool hooks (already true — the trust boundary, [ADR 0016](
|
|
23
|
+
- **Cross-tool portability is an adapter problem** — one canonical source per concern + thin per-tool adapters: instructions → an `AGENTS.md`-style canonical file with thin per-tool pointers; commands → plain CLI (already true — slash-commands wrap `scripts/gds/*.js`); enforcement → server/git/CI, never tool hooks (already true — the trust boundary, [ADR 0016](0016-trust-boundary-server-enforced-permissions.md)); capabilities → MCP (already cross-tool). This is the [ADR 0062](0062-medusa-instance-model-decoupling.md) / [0081](0081-tool-agnostic-design-layer.md) core↔host / swappable-adapter pattern applied to the agent surface.
|
|
24
24
|
- **The Cloud Bongos shape:** *how a repo is managed for agents* becomes a project-init **profile** that provisions the right adapter set (which context files, which command wrappers, which retrieval posture, which enforcement). It is a start-of-project decision because naming conventions and whether to stand up an embedding pipeline are expensive to retrofit.
|
|
25
25
|
|
|
26
|
-
**Relationship to the modular decomposition ([ADR 0083](
|
|
26
|
+
**Relationship to the modular decomposition ([ADR 0083](0083-modular-architecture-strangler-build-plan.md) / [ADR 0091](0091-bounding-the-kernel-and-db-carve.md)).** These were authored alongside this ADR and are the *other half* of the same goal — an AI agent that navigates the codebase at low context cost. The decomposition bounds *how much* an agent must load: a domain becomes a module reached through one doorway, not a 6k-LOC monolith (0091's explicit "AI-scoping payoff"). This ADR is the complementary *findability* layer — meaning written into the source so the agent locates the right module/symbol by search. They compose directly: **the module-header doc-comments decided here are authored per module precisely because 0091 makes the module the unit of scoping**, and each sits beside that module's nested `CLAUDE.md` and the generated repo-map ([ADR 0063](0063-generated-repo-map-symbol-skeleton.md)). The deferred `AGENTS.md` adapter + per-project agent profile are likewise the agent-surface counterpart to 0091's core↔module boundaries.
|
|
27
27
|
|
|
28
28
|
## Decision
|
|
29
29
|
|
|
@@ -53,6 +53,6 @@ Everything else from the research is recorded below as **deferred** — explicit
|
|
|
53
53
|
|
|
54
54
|
## C4 — `<private>` content-exclusion marker (shipped, task [#1661](https://example.com/builders#/task/1661))
|
|
55
55
|
|
|
56
|
-
An agent can wrap sensitive content in a `<private>…</private>` fence so it **never** enters the memory/learning store nor the recall index — the explicit, write-time opt-out that reinforces the trust boundary ([ADR 0016](
|
|
56
|
+
An agent can wrap sensitive content in a `<private>…</private>` fence so it **never** enters the memory/learning store nor the recall index — the explicit, write-time opt-out that reinforces the trust boundary ([ADR 0016](0016-trust-boundary-server-enforced-permissions.md)) and complements the BFG transcript scrub: secrets, permission-core internals, and sub-Metic-sensitive material fenced out *at the source*.
|
|
57
57
|
|
|
58
58
|
Implementation (all in `modules/memory`): a pure `stripPrivate()` in `search-chunker.js` removes every `<private>…</private>` region and is applied at **every** ingest/persist entry point — `storeMemoryFile`, `storeMemoryFilesBatch`, and the BFG cross-builder `bfgWriteMemoryFile` in `memory.js`; `createLearning` in `learnings.js` (title + body); and `chunkMarkdown` (the recall index) itself. The match is **case-insensitive and whitespace-tolerant** (`<private>`, `<PRIVATE>`, `< private >`) and **fail-closed**: an unbalanced `<private>` with no matching close strips to end-of-content, so a half-typed marker can't leak the secret it was meant to hide. A learning whose entire body is fenced strips to empty and is rejected like any other empty body.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
## Context — the problem
|
|
9
9
|
|
|
10
10
|
Every task carries a `credits_reward` integer — the in-world example payout when it
|
|
11
|
-
ships ([ADR 0023](
|
|
11
|
+
ships ([ADR 0023](0023-kind-multipliers-and-idea-bonus.md), [ADR 0054](0054-session-token-reward-cost-plus.md)).
|
|
12
12
|
That column was created with `NOT NULL DEFAULT 0` (migration `003_pms.sql`). Nothing in
|
|
13
13
|
the lifecycle ever required it to be set, so the default path was:
|
|
14
14
|
|
|
@@ -73,7 +73,7 @@ next promotion or claim of an unrewarded task.
|
|
|
73
73
|
|
|
74
74
|
## Anti-gaming — the reward stays author-set
|
|
75
75
|
|
|
76
|
-
[ADR 0023](
|
|
76
|
+
[ADR 0023](0023-kind-multipliers-and-idea-bonus.md) makes `credits_reward` an author-set,
|
|
77
77
|
review-gated value on purpose (auto-deriving it from `est_minutes` would be trivially
|
|
78
78
|
gameable — inflate the estimate, inflate the payout). This ADR preserves that stance:
|
|
79
79
|
|
|
@@ -138,7 +138,7 @@ first. That is friction the methodology doesn't want — the goal is "no task is
|
|
|
138
138
|
|
|
139
139
|
### Anti-gaming — the cap + the audit (this reverses ADR 0023's strict author-set stance, narrowly)
|
|
140
140
|
|
|
141
|
-
[ADR 0023](
|
|
141
|
+
[ADR 0023](0023-kind-multipliers-and-idea-bonus.md) made `credits_reward` strictly
|
|
142
142
|
author-set precisely because auto-deriving it from `est_minutes` is gameable (inflate the
|
|
143
143
|
estimate → inflate the pay). Auto-assigning at the gate crosses that line — so two guards
|
|
144
144
|
contain the blast radius:
|
|
@@ -154,7 +154,7 @@ contain the blast radius:
|
|
|
154
154
|
change is itself visible on the task. The assignment is never silent.
|
|
155
155
|
|
|
156
156
|
3. **The PRIMARY pay driver is unchanged and ungameable.** Builder earnings are driven by the
|
|
157
|
-
**cost-plus session reward** ([ADR 0054](
|
|
157
|
+
**cost-plus session reward** ([ADR 0054](0054-session-token-reward-cost-plus.md)) —
|
|
158
158
|
`round(true_cost_usd × 1.20)` per shipped session, derived from real token cost, not from
|
|
159
159
|
any author-set or auto-derived per-task number. The per-task `credits_reward` is a modest,
|
|
160
160
|
capped floor on top of that; capping it keeps the gameable lever small.
|
|
@@ -198,7 +198,7 @@ zeros waiting to be filled in.
|
|
|
198
198
|
primary point, promote/claim the safety net.
|
|
199
199
|
|
|
200
200
|
The **cap + anti-gaming reasoning is unchanged** — the same `REWARD_SUGGESTION_CAP` bounds the
|
|
201
|
-
auto-assigned floor, and the ungameable cost-plus session reward ([ADR 0054](
|
|
201
|
+
auto-assigned floor, and the ungameable cost-plus session reward ([ADR 0054](0054-session-token-reward-cost-plus.md))
|
|
202
202
|
remains the **primary** pay driver. This per-task value stays a modest, capped, audited floor; it
|
|
203
203
|
just now lands at birth instead of at first-work.
|
|
204
204
|
|