From 3e042f21472ea1c9f21fc64869df124805717022 Mon Sep 17 00:00:00 2001 From: Garrett Maring Date: Fri, 29 May 2026 15:51:55 -0300 Subject: [PATCH 1/2] V44 Gate 1: Open scaled economy roadmap Open the V44 draft specification family for scaled engineering economy work over promoted V43 routes. Update roadmap, README, protocol docs, PR template, workflow posture, and package script wiring for active V43 / draft V44 validation. Add the V44 Gate 1 checker and validate source-safe roadmap posture without implementing later economic product surfaces. --- .github/pull_request_template.md | 4 +- .github/workflows/bitcode-canon-quality.yml | 6 +- .github/workflows/bitcode-gate-quality.yml | 4 + BITCODE_SPEC_V44.md | 833 ++++++++++++++++++ BITCODE_SPEC_V44_DELTA.md | 83 ++ BITCODE_SPEC_V44_NOTES.md | 84 ++ BITCODE_SPEC_V44_PARITY_MATRIX.md | 61 ++ README.md | 38 +- SPECIFICATIONS_ROADMAP.md | 29 +- package.json | 1 + packages/protocol/README.md | 9 + ...4-gate1-scaled-economy-roadmap-opening.mjs | 168 ++++ 12 files changed, 1291 insertions(+), 29 deletions(-) create mode 100644 BITCODE_SPEC_V44.md create mode 100644 BITCODE_SPEC_V44_DELTA.md create mode 100644 BITCODE_SPEC_V44_NOTES.md create mode 100644 BITCODE_SPEC_V44_PARITY_MATRIX.md create mode 100644 scripts/check-v44-gate1-scaled-economy-roadmap-opening.mjs diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 21ac051c..0ff92cf8 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,7 +1,7 @@ ## Title -Use the version and gate prefix for gate PRs: `V43 Gate N: Concise Topical Title`. -Use the version and promotion prefix for version promotion PRs: `V43 Canonical Promotion: Concise Topical Title`. +Use the version and gate prefix for gate PRs: `V44 Gate N: Concise Topical Title`. +Use the version and promotion prefix for version promotion PRs: `V44 Canonical Promotion: Concise Topical Title`. ## Closure diff --git a/.github/workflows/bitcode-canon-quality.yml b/.github/workflows/bitcode-canon-quality.yml index 60348a6e..4babe74e 100644 --- a/.github/workflows/bitcode-canon-quality.yml +++ b/.github/workflows/bitcode-canon-quality.yml @@ -363,6 +363,7 @@ jobs: node scripts/check-v43-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests if [ -f BITCODE_SPEC_V44.md ]; then node scripts/check-bitcode-spec-family.mjs --version V44 --mode draft --current-target V43 + node scripts/check-v44-gate1-scaled-economy-roadmap-opening.mjs --skip-branch-check fi else echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2 @@ -519,7 +520,10 @@ jobs: node scripts/check-bitcode-spec-family.mjs --version V43 --mode draft --current-target V42 fi ;; + spec:\ V44*|spec:\ v44*) + node scripts/check-bitcode-spec-family.mjs --version V44 --mode draft --current-target V43 + ;; *) - echo "Skipping strict spec-title conformance; title is not a V29/V30/V31/V32/V33/V34/V35/V36/V37/V38/V39/V40/V41/V42/V43 spec change." + echo "Skipping strict spec-title conformance; title is not a V29/V30/V31/V32/V33/V34/V35/V36/V37/V38/V39/V40/V41/V42/V43/V44 spec change." ;; esac diff --git a/.github/workflows/bitcode-gate-quality.yml b/.github/workflows/bitcode-gate-quality.yml index 0cf87076..4ef15171 100644 --- a/.github/workflows/bitcode-gate-quality.yml +++ b/.github/workflows/bitcode-gate-quality.yml @@ -492,6 +492,7 @@ jobs: node scripts/check-v43-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests if [ -f BITCODE_SPEC_V44.md ]; then node scripts/check-bitcode-spec-family.mjs --version V44 --mode draft --current-target V43 + node scripts/check-v44-gate1-scaled-economy-roadmap-opening.mjs --skip-branch-check fi else echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2 @@ -524,6 +525,9 @@ jobs: else node scripts/check-v43-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check fi + if [ "$POINTER" = "V43" ] && [ -f scripts/check-v44-gate1-scaled-economy-roadmap-opening.mjs ]; then + node scripts/check-v44-gate1-scaled-economy-roadmap-opening.mjs --skip-branch-check + fi if [ "$POINTER" != "V43" ]; then if [ -f scripts/check-v43-gate1-packs-read-deposit-roadmap.mjs ]; then node scripts/check-v43-gate1-packs-read-deposit-roadmap.mjs --skip-branch-check diff --git a/BITCODE_SPEC_V44.md b/BITCODE_SPEC_V44.md new file mode 100644 index 00000000..a372214a --- /dev/null +++ b/BITCODE_SPEC_V44.md @@ -0,0 +1,833 @@ +# Bitcode Spec V44 + +## Status + +- Version: `V44` +- V44 state: draft opened for scaled engineering economy and tokenized AssetPack network work over promoted V43 product routes +- Current canonical/latest target: `V43` +- Prior canonical anchor: `BITCODE_SPEC_V43.md` +- Prior generated proof appendix: `BITCODE_SPEC_V43_PROVEN.md` +- Generated structured artifact inventory: draft `.bitcode/v44-*` artifacts begin with the V44 Gate 1 roadmap/spec posture and must remain source-safe metadata only until later V44 gates generate package-backed reports +- Source parity state: V44 begins from promoted `/packs`, `/read`, `/deposit`, agentic Depositing, five-step Reading, BTD/BTC settlement, and PackActivity canon; Gate 1 is specification and workflow posture only +- Notes companion: `BITCODE_SPEC_V44_NOTES.md` +- Delta companion: `BITCODE_SPEC_V44_DELTA.md` +- Parity companion: `BITCODE_SPEC_V44_PARITY_MATRIX.md` +- Scope: V44 draft target for digitizing and tokenizing scaled engineering economies through AssetPack portfolios, demand/supply market intelligence, organization budgets, BTD/BTC accounting, compensation statements, governance, scaled network rehearsal, and enterprise product operation over the V43 route model +- Last fully realized canonical target preserved in source: `V43` + +## Version executive summary + +V44 turns the V43 product route model into a scaled economic operating system. +V43 made AssetPacks legible through `/packs`, `/read`, and `/deposit`; V44 +must make many AssetPacks, many Reads, many deposits, many contributors, and +many organizations economically governable. + +The guiding note is digitizing and tokenizing scaled engineering economies. +That means Bitcode must expose durable source-safe objects for: + +- enterprise AssetPack portfolios across Depository supply, pending deposit + options, purchased Need-Fit packs, settlement receipts, and delivery state; +- demand/supply market intelligence over Reading activity, failed Reads, + accepted Needs, found Fits, unfound Needs, and deposit option opportunities; +- BTD range, BTC quote, source-to-shares, contributor compensation, and + rights-transfer accounting that can be audited without revealing source; +- organization budgets, approval policies, spending limits, earning targets, + critical-IP constraints, and procurement/deposit governance; and +- scaled local/staging rehearsal proving the network can support many-pack, + many-organization economic flows before any value-bearing mainnet admission. + +## Canonical Bitcode executive summary + +Bitcode remains the knowledge commoditization protocol. Depositors contribute +source-derived AssetPacks, Reading synthesizes Needs, Finding Fits searches the +Depository, AssetPack synthesis withholds source until paid settlement, BTC +settlement transfers BTD read rights, contributors are compensated through +source-to-shares accounting, and repository delivery unlocks only after rights +are proven. + +V44 does not change that law. It scales the commercial product around it: +portfolio views, budgets, governance, statements, market intelligence, quote +policy, and network rehearsal must make the protocol usable by enterprises +operating many technical knowledge trades. + +## V44 source-of-truth hierarchy + +`BITCODE_SPEC.txt` points to `V43` while V44 is draft. +`BITCODE_SPEC_V43.md` and `BITCODE_SPEC_V43_PROVEN.md` are active canon. +`BITCODE_SPEC_V44.md`, `BITCODE_SPEC_V44_DELTA.md`, +`BITCODE_SPEC_V44_NOTES.md`, and `BITCODE_SPEC_V44_PARITY_MATRIX.md` define +the draft target only on `version/v44` and `v44/gate-*` branches. +Implementation remains unversioned in source paths; package, route, component, +test, prompt, script, and telemetry names move in place as the single current +Bitcode system. + +## V44 full-system, re-implementation, and audit rule + +V44 work must be reconstructable from specification, source, generated +artifacts, tests, telemetry, ledger/database/storage readback, and operator +documentation. Economic surfaces cannot be decorative dashboards. Each row +must trace to protocol objects: ReadNeed, deposit AssetPack option, Depository +AssetPack, selected Fit set, AssetPack preview, BTD range, BTC quote, +settlement observation, rights receipt, source-to-shares allocation, delivery +receipt, compensation statement, or repair case. + +No V44 economic projection may disclose protected source, unpaid AssetPack +source, raw prompts, raw provider responses, wallet private material, +credentials, private settlement payloads, or value-bearing mainnet secrets. + +## V44 totality and precision enforcement rule + +V44 must use protocol names precisely. PackActivity is activity and inspection. +BTD is the read-right/range token object. BTC is settlement money. Source-to- +shares is contributor allocation. Deposit options are not minted BTD. Quotes +are not finality. Preview is not source disclosure. Portfolio metrics are not +ledger truth unless they reconcile to receipts. + +Every economic number must name whether it is estimate, quote, observed +payment, final settlement, contributor allocation, delivery status, or repair +state. When a value is not yet final, the UI, API, storage projection, and +generated proof must say so. + +The canonical V44 economic label list is exactly: estimate, quote, observed payment, final settlement, contributor allocation, delivery, or repair state. + +## V44 system goals, non-goals, and design principles + +Goals: + +- Make `/packs` an enterprise portfolio and market-intelligence surface for + many AssetPack activities, not only a single transaction inspector. +- Add source-safe demand/supply intelligence: what Reads need, what deposits + may satisfy, what Needs were not fit, what deposit options are likely useful. +- Harden quote policy and spend governance for Reading procurement. +- Harden depositor earning visibility, compensation statements, and ROI + readback for Depository supply. +- Bind BTD/BTC/source-to-shares accounting into auditable portfolio records. +- Add organization-level budgets, approvals, spend limits, and critical-IP + policies over `/read`, `/deposit`, and `/packs`. +- Rehearse scaled multi-pack, multi-org local/staging economic flows. + +Non-goals: + +- V44 does not expose unpaid source. +- V44 does not bypass Need review, Finding Fits, BTC settlement, BTD rights + transfer, or repository delivery reconciliation. +- V44 does not replace V36 Exchange canon; it builds the enterprise operating + layer for AssetPack economic activity over the product routes. +- V44 does not admit value-bearing mainnet operation without later explicit + launch gates. + +Design principles: AssetPack portfolio truth, source-safe market intelligence, +deterministic economic labels, budgeted Reading, ROI-aware Depositing, +receipt-backed accounting, governance before scale, proof-on-expand, and +enterprise-grade auditability. + +## V44 system architecture and layer boundaries + +V44 acts through existing layers: + +- `/packs`, `/read`, and `/deposit` routes from V43; +- package-owned protocol, BTD, pipeline, prompt, telemetry, storage, and proof + primitives; +- PackActivity and Depository supply indexes; +- ReadNeedComprehensionSynthesis and ReadFitsFindingSynthesis for Reading; +- deposit AssetPack option synthesis, policy, and admission surfaces for + Depositing; +- BTD/BTC ledger, source-to-shares, quote, settlement, rights, and delivery + receipt projections; +- organization policy, wallet, budget, and approval state from Auxillaries; +- generated source-safe proof artifacts and local/staging rehearsal scripts. + +Demonstration code remains self-contained inside `protocol-demonstration/`. + +## V44 canonical domain model + +V44 adds or promotes these product objects: EnterprisePackPortfolio, +PackPortfolioPosition, PackMarketSignal, ReadDemandSignal, UnfitNeedSignal, +DepositSupplyOpportunity, ReadingBudgetPolicy, AssetPackQuotePolicy, +ProcurementApprovalReceipt, DepositorEarningStatement, ContributorCompensationStatement, +PackEconomicStatement, OrganizationPackPolicy, PackGovernanceDecision, +ScaledNetworkRehearsalReceipt, and PortfolioRepairCase. + +These bind to existing Bitcode objects: PackActivity, DepositAssetPackOption, +Depository AssetPack records, Read Requests, synthesized Needs, candidate Fits, +selected Fit sets, source-safe AssetPack previews, BTD ranges, BTC quotes, +settlement observations, rights receipts, source-to-shares allocations, +repository delivery receipts, telemetry events, and proof roots. + +## V44 whole Bitcode operator chain + +The V44 operator chain is: connect repositories and organization policy, +synthesize and approve deposit AssetPack options, admit source-safe Depository +supply, observe Reading demand and unfound Needs, request Reads under budget, +review synthesized Needs, request Finding Fits, generate source-safe AssetPack +preview and quote, approve procurement, settle BTC, transfer BTD read rights, +deliver to repository, allocate source-to-shares compensation, issue portfolio +and contributor statements, reconcile ledger/database/storage, repair drift, +and inspect scaled economic truth through `/packs`. + +## V44 Gate 1 Scaled Engineering Economy Roadmap Opening + +Gate 1 opens the V44 specification family, updates roadmap/docs/workflows from +active V43 to draft V44, defines scaled engineering economy acceptance +criteria, and wires `check:v44-gate1`. It does not implement portfolio +dashboards, policy engines, or economic settlement code. + +Gate 1 closes when the V44 spec family, roadmap, README, protocol README, +workflow posture, package script, and checker agree on V43 active / V44 draft +truth and name every V44 gate. + +## V44 Gate 2 Economic Domain Model And Receipt Taxonomy + +Gate 2 must implement package-backed source-safe economic object contracts for +portfolio positions, market signals, quote states, settlement states, +compensation statements, governance decisions, and repair cases. It must label +estimate, quote, observed payment, final settlement, contributor allocation, +delivery, and repair states distinctly. + +## V44 Gate 3 Packs Portfolio Search And Market Intelligence + +Gate 3 must evolve `/packs` from activity master-detail into portfolio and +market-intelligence operation: saved filters, organization views, demand/supply +signals, unfound Need surfaces, compensation and settlement facets, proof-root +drilldown, and no-source-leak tests. + +## V44 Gate 4 Reading Budget, Quote Policy, And Procurement Governance + +Gate 4 must bind Reading spend controls: budget envelopes, approval thresholds, +quote expiry, deterministic share-to-fee policy, buyer authorization, BTC/BTD +settlement readiness, and source-safe pre-purchase review. + +## V44 Gate 5 Depositor Earnings, ROI, And Supply Opportunity Intelligence + +Gate 5 must bind deposit-side economic clarity: likely demand, unfit Need +opportunities, ROI posture, source criticality, expected compensation ranges, +earning statements, and source-safe Depository supply recommendations. + +## V44 Gate 6 BTD/BTC Accounting And Contributor Compensation Statements + +Gate 6 must bind BTD range state, BTC settlement observations, source-to-shares +allocation, contributor statements, depositor earning summaries, treasury +routes, repair states, and ledger/database/object-storage reconciliation. + +## V44 Gate 7 Organization Policy, Approval, And Wallet Authority + +Gate 7 must bind organization-level policy across `/read`, `/deposit`, and +`/packs`: roles, budget approvals, source criticality approvals, wallet +authority, spend limits, deposit limits, policy receipts, and fail-closed +permission checks. + +## V44 Gate 8 Enterprise Product UX For Economic Operation + +Gate 8 must make portfolio, budget, compensation, market signal, and governance +surfaces legible and polished: dense tables, expandable proof detail, keyboard +navigation, responsive layouts, concise copy, and visual regression coverage. + +## V44 Gate 9 Scaled Local/Staging Network Rehearsal + +Gate 9 must rehearse many deposits, many Reads, many Fits, many quotes, many +settlements, many contributors, and repair states on local/staging-testnet +lanes without value-bearing mainnet admission or secret serialization. + +## V44 Gate 10 Promotion Readiness + +Gate 10 must bind every V44 artifact, source-safety proof, workflow, generated +PROVEN hook, docs update, local/staging rehearsal, and active V44 / draft V45 +runtime posture before V44 can be promoted into `main`. + +## V44 canonical subsystem surfaces + +### Depositing and asset supply + +Current canonical objects and emitted artifacts: DepositAssetPackOption, +DepositSupplyOpportunity, Depository AssetPack records, PackActivity rows, +source-safe option proofs, and later V44 supply opportunity artifacts. +Current algorithms and derivation rules: demand/supply matching, source +criticality, ROI posture, admitted supply indexing, and contributor allocation +must stay receipt-backed. +Current invariants and fail-closed conditions: critical source remains blocked, +unapproved options do not enter the Depository, and deposits do not mint BTD +until paid Need-Fit settlement. +Current proof obligations: source-safe option roots, policy roots, admission +receipts, demand signal roots, and compensation preview roots. +Current source-bearing implementation basis: V43 deposit route, asset-pack +pipeline package, Depository supply index, BTD/source-to-shares primitives, and +future V44 package helpers. +Current validating commands and parity basis: `pnpm run check:v44-gate1` and +later V44 gate checks. +Current accepted boundaries: no raw source, unpaid AssetPack source, raw +prompts, provider responses, credentials, or wallet private material in +generated economic artifacts. + +### Reading and prompt/inference ownership + +Current canonical objects and emitted artifacts: Read Request, synthesized +Need, Finding Fits receipts, AssetPack preview, quote, settlement, BTD rights, +delivery, and procurement approvals. +Current algorithms and derivation rules: ReadNeedComprehensionSynthesis and +ReadFitsFindingSynthesis remain the inference authority; V44 adds budgets and +approval policy around quotes. +Current invariants and fail-closed conditions: no source before settlement, +accepted Need before Finding Fits, approval before budgeted purchase, and +rights receipt before delivery. +Current proof obligations: Need review roots, search roots, selected-fit roots, +quote roots, approval roots, settlement roots, and delivery roots. +Current source-bearing implementation basis: V43 `/read`, pipeline host, +pipeline-asset-pack, BTD package, and route storage projections. +Current validating commands and parity basis: V44 gate checks plus inherited +V39/V42/V43 Reading checks. +Current accepted boundaries: budget policy may block purchase but cannot weaken +source-safety or settlement law. + +### Fit, recall, ranking, and verification + +Current canonical objects and emitted artifacts: Depository search documents, +candidate Fits, selected Fit sets, market signals, unfit Need signals, ranking +receipts, and verification verdicts. +Current algorithms and derivation rules: lexical, semantic, metadata, demand, +and vector search channels must remain source-safe and thresholded. +Current invariants and fail-closed conditions: no candidate source leaks to a +Reader before settlement, and no low-quality Fit becomes a quoteable pack. +Current proof obligations: query roots, search channel roots, ranking roots, +selected-fit provenance, and no-fit repair roots. +Current source-bearing implementation basis: V38/V39/V41 search and prompt +hardening plus V43 product surfaces. +Current validating commands and parity basis: inherited search tests and later +V44 market-signal tests. +Current accepted boundaries: market intelligence summarizes demand and supply; +it does not disclose protected source. + +### Selection and materialization + +Current canonical objects and emitted artifacts: AssetPack preview, withheld +source bundle, repository delivery receipt, delivery pull request, and repair +case. +Current algorithms and derivation rules: only paid rights unlock full source +materialization and delivery. +Current invariants and fail-closed conditions: preview is source-safe; delivery +is blocked until settlement and BTD rights transfer are proven. +Current proof obligations: preview boundary proof, delivery unlock proof, +repository PR proof, and repair proof. +Current source-bearing implementation basis: V42 delivery boundary, V43 route +state, pipeline hosts, and repository delivery adapters. +Current validating commands and parity basis: inherited settlement/delivery +checks and future scaled rehearsal checks. +Current accepted boundaries: enterprise portfolio views may show delivery +state but not unpaid source. + +### Identity, authorization, and sensitive flow + +Current canonical objects and emitted artifacts: organization policy, wallet +authority, approval receipts, role checks, account boundaries, and audit rows. +Current algorithms and derivation rules: policy decisions must compose with +organization roles, wallet authority, budget, source criticality, and route +state. +Current invariants and fail-closed conditions: unauthorized spend, deposit +admission, source disclosure, wallet operation, or delivery remains blocked. +Current proof obligations: approval roots, denial roots, wallet authority +roots, and policy replay roots. +Current source-bearing implementation basis: Auxillaries, organization +permission authority, BTD/wallet primitives, and V44 governance helpers. +Current validating commands and parity basis: V31/V39/V42/V43 inherited tests +plus later V44 governance checks. +Current accepted boundaries: no credentials, private keys, tokens, private +settlement payloads, or protected source in generated proofs. + +### Disclosure and projection + +Current canonical objects and emitted artifacts: source-safe projections, +portfolio rows, market signals, statements, proof roots, and expanded metadata. +Current algorithms and derivation rules: every projected economic field must +map to an estimate, quote, observed payment, final settlement, allocation, +delivery, or repair state. +Current invariants and fail-closed conditions: protected source and unpaid +source remain withheld; proof expansion never becomes payload exposure. +Current proof obligations: no-source-leak scans, redaction posture, projection +roots, and statement roots. +Current source-bearing implementation basis: V35 telemetry/docs, V39/V42/V43 +source-safe route and artifact projections. +Current validating commands and parity basis: V44 gate checks and inherited +source-safety scans. +Current accepted boundaries: public docs may explain; product surfaces must +operate with concise labels and proof-on-expand. + +### Settlement and exact accounting + +Current canonical objects and emitted artifacts: BTC quote, settlement +observation, BTD rights transfer, source-to-shares allocation, contributor +statement, depositor earning statement, treasury route, and reconciliation +receipt. +Current algorithms and derivation rules: deterministic share-to-fee and +source-to-shares policies must reconcile quote, payment, rights, compensation, +and delivery state. +Current invariants and fail-closed conditions: accounting drift blocks +finality, compensation, delivery, and promotion of scaled rehearsals. +Current proof obligations: quote roots, payment roots, rights roots, +allocation roots, statement roots, and reconciliation roots. +Current source-bearing implementation basis: V27 BTD law, V30 Protocol/BTD +rails, V36 Exchange economics, V42 settlement, and V43 PackActivity. +Current validating commands and parity basis: BTD tests, settlement tests, and +later V44 accounting checks. +Current accepted boundaries: estimates are not settlement; statements are +source-safe projections over receipt-backed ledger truth. + +### Proof contract, witnesses, and replay + +Current canonical objects and emitted artifacts: generated `.bitcode/v44-*` +reports, `BITCODE_SPEC_V44_PROVEN.md`, local/staging rehearsal receipts, and +workflow check logs. +Current algorithms and derivation rules: every V44 gate must produce or bind +source-safe, deterministic proof evidence before promotion. +Current invariants and fail-closed conditions: missing proofs, stale posture, +secret serialization, source leakage, or value-bearing mainnet admission block +gate closure. +Current proof obligations: spec family, generated artifact, test, workflow, +rehearsal, and promotion readiness closure. +Current source-bearing implementation basis: protocol package canonical report +helpers, promotion scripts, gate workflows, and demonstration witness. +Current validating commands and parity basis: `check:v44-gate1`, later V44 +checks, and promotion readiness. +Current accepted boundaries: demonstration remains self-contained and +commercial code does not import it. + +## V44 proof-family canon + +### Inference-synthesis + +proofArtifactPath: `.bitcode/v44-inference-economic-policy.json`. +members: ReadNeed, Finding Fits, deposit options, market signals, quote policy. +theoremIds: inference-source-safety, parsed-output-validity. +replayStepIds: prompt registry resolution, PTRR/Failsafe/Thricified receipts. +witnessArtifactPaths: V38/V41 prompt and inference artifacts. +current member closure criteria: every economic inference remains source-safe. +current member verdict shape: pass/fail plus proof roots. +current theorem-by-theorem closure reading: inference supports economic policy +without exposing source or raw provider payloads. +current theorem-to-replay grouping: prompt, context, result, parsed type. +minimum artifact/replay binding set: prompt benchmark root, schema root. +current proof-object fields: family, member, theorem, replay, verdict. +generated-artifact and test bindings: later V44 generated reports. +fail-closed conditions: prompt leak, schema failure, stale context. + +### Prompt-completeness + +proofArtifactPath: `.bitcode/v44-prompt-economic-coverage.json`. +members: policy prompts, market-signal prompts, statement prompts. +theoremIds: complete-context, no-overlap-vocabulary. +replayStepIds: registry composition, interpolation, parser target. +witnessArtifactPaths: V41 prompt inventory and benchmarks. +current member closure criteria: each prompt has semantic purpose and type. +current member verdict shape: complete/incomplete. +current theorem-by-theorem closure reading: prompts operate as programs. +current theorem-to-replay grouping: PromptPart, Prompt, generation, output. +minimum artifact/replay binding set: inventory row and benchmark fixture. +current proof-object fields: prompt id, part ids, variables, parser. +generated-artifact and test bindings: V44 prompt coverage checks. +fail-closed conditions: missing variable, raw prompt disclosure, weak parser. + +### Static-code-analysis + +proofArtifactPath: `.bitcode/v44-static-economic-surface.json`. +members: routes, APIs, packages, tests, workflows. +theoremIds: surface-present, no-legacy-authority. +replayStepIds: rg inventory, typecheck, import casing. +witnessArtifactPaths: CI and gate logs. +current member closure criteria: economic surfaces are implemented in place. +current member verdict shape: present/missing/drift. +current theorem-by-theorem closure reading: code matches V44 spec plan. +current theorem-to-replay grouping: file, export, test, workflow. +minimum artifact/replay binding set: source path root and command root. +current proof-object fields: file, symbol, command, verdict. +generated-artifact and test bindings: V44 inventory artifacts. +fail-closed conditions: missing route, versioned source path, stale name. + +### Verification-decisions + +proofArtifactPath: `.bitcode/v44-verification-decisions.json`. +members: quote verification, budget approval, compensation statement. +theoremIds: admissible, blocked, repairable. +replayStepIds: policy eval, ledger readback, storage readback. +witnessArtifactPaths: generated V44 receipts. +current member closure criteria: each decision records why it is allowed. +current member verdict shape: accepted/rejected/repair-required. +current theorem-by-theorem closure reading: economic actions are auditable. +current theorem-to-replay grouping: input, policy, receipt, output. +minimum artifact/replay binding set: decision root and policy root. +current proof-object fields: decision id, actor, policy, verdict. +generated-artifact and test bindings: package and API tests. +fail-closed conditions: ambiguous authority, missing receipt, drift. + +### Selection-and-materialization + +proofArtifactPath: `.bitcode/v44-selection-materialization.json`. +members: selected Fits, AssetPack preview, delivery. +theoremIds: source-withheld, paid-unlock. +replayStepIds: candidate selection, preview, settlement, delivery. +witnessArtifactPaths: V42/V43 delivery artifacts. +current member closure criteria: materialization is settlement-gated. +current member verdict shape: locked/unlocked/delivered. +current theorem-by-theorem closure reading: source appears only after rights. +current theorem-to-replay grouping: fit, preview, rights, PR. +minimum artifact/replay binding set: preview root, rights root, delivery root. +current proof-object fields: pack id, state, proof roots. +generated-artifact and test bindings: route and package tests. +fail-closed conditions: unpaid source leak, missing rights, failed PR. + +### Authorization-and-sensitive-flow + +proofArtifactPath: `.bitcode/v44-authorization-sensitive-flow.json`. +members: budgets, wallet authority, approvals, source policy. +theoremIds: authorized, denied, escalated. +replayStepIds: role check, budget check, wallet check, policy check. +witnessArtifactPaths: organization policy receipts. +current member closure criteria: sensitive operations are actor-bound. +current member verdict shape: allow/deny/escalate. +current theorem-by-theorem closure reading: governance precedes value. +current theorem-to-replay grouping: actor, policy, action, receipt. +minimum artifact/replay binding set: actor root and policy root. +current proof-object fields: actor, org, action, verdict. +generated-artifact and test bindings: V44 governance checks. +fail-closed conditions: no actor, stale role, missing approval. + +### Settlement-source-to-shares + +proofArtifactPath: `.bitcode/v44-settlement-source-to-shares.json`. +members: BTC settlement, BTD transfer, contributor allocation. +theoremIds: conservation, finality, statement-accuracy. +replayStepIds: quote, observe payment, transfer rights, allocate shares. +witnessArtifactPaths: BTD and ledger artifacts. +current member closure criteria: all sats and shares reconcile. +current member verdict shape: reconciled/drift/repair. +current theorem-by-theorem closure reading: statements derive from receipts. +current theorem-to-replay grouping: quote, payment, allocation, statement. +minimum artifact/replay binding set: quote root, tx root, allocation root. +current proof-object fields: amount, route, owner, contributor, verdict. +generated-artifact and test bindings: BTD and protocol tests. +fail-closed conditions: conservation drift, no finality, wrong owner. + +### Disclosure-boundary + +proofArtifactPath: `.bitcode/v44-disclosure-boundary.json`. +members: portfolio rows, market signals, statements, proof expansion. +theoremIds: source-safe, prompt-safe, provider-safe. +replayStepIds: projection, redaction, no-source scan. +witnessArtifactPaths: source-safe generated reports. +current member closure criteria: only metadata and proof roots are serialized. +current member verdict shape: source-safe/not-source-safe. +current theorem-by-theorem closure reading: enterprise scale does not reduce +confidentiality. +current theorem-to-replay grouping: payload, classifier, redaction, result. +minimum artifact/replay binding set: payload root and scan root. +current proof-object fields: field, tier, verdict. +generated-artifact and test bindings: no-leak tests. +fail-closed conditions: protected source, raw prompt, provider payload. + +### Proof-contract + +proofArtifactPath: `.bitcode/v44-proof-contract.json`. +members: gate artifacts, PROVEN appendix, promotion workflow. +theoremIds: deterministic, replayable, complete. +replayStepIds: generate, check, promote, verify. +witnessArtifactPaths: `.bitcode/v44-*`, `BITCODE_SPEC_V44_PROVEN.md`. +current member closure criteria: every gate is generated, checked, and bound. +current member verdict shape: closed/open/blocked. +current theorem-by-theorem closure reading: canon promotion is evidence-backed. +current theorem-to-replay grouping: artifact, command, workflow, commit. +minimum artifact/replay binding set: report root and workflow root. +current proof-object fields: gate, artifact, command, verdict. +generated-artifact and test bindings: V44 promotion readiness. +fail-closed conditions: stale pointer, missing artifact, failing check. + +## V44 generated canon + +V44 generated canon begins with the spec family. Later gates must add +package-backed `.bitcode/v44-*` artifacts and ultimately +`BITCODE_SPEC_V44_PROVEN.md`. + +### Inherited V19 reproducible-canon artifacts + +Inherited V19 reproducible-canon artifacts remain binding for deterministic +artifact generation, byte-stable replay, proof-source commit capture, and +fail-closed stale-artifact detection. + +### Inherited V20 operator-quality artifacts + +Inherited V20 operator-quality artifacts remain binding for operator-facing +quality, accessibility, visual inspectability, and generated quality evidence. + +### Exact generated-artifact inventory matrix + +| artifact | field | verdict | +| --- | --- | --- | +| `.bitcode/v44-spec-family-report.json` | aggregate proof verdict | draft-required | +| `.bitcode/v44-canonical-input-report.json` | generated artifact inventories | draft-required | +| `.bitcode/v44-canon-posture-drift-report.json` | active/draft posture | draft-required | +| `.bitcode/v44-economic-domain-model.json` | economic domain model | planned | +| `.bitcode/v44-packs-portfolio-market-intelligence.json` | Packs portfolio and market intelligence | planned | +| `.bitcode/v44-reading-budget-quote-policy.json` | Reading budget and quote policy | planned | +| `.bitcode/v44-depositor-earnings-supply-opportunities.json` | depositor earnings and supply opportunities | planned | +| `.bitcode/v44-btd-btc-compensation-statements.json` | BTD/BTC compensation statements | planned | +| `.bitcode/v44-organization-policy-wallet-authority.json` | organization policy and wallet authority | planned | +| `.bitcode/v44-enterprise-economic-ux.json` | enterprise economic UX | planned | +| `.bitcode/v44-scaled-network-rehearsal.json` | scaled network rehearsal | planned | +| `.bitcode/v44-promotion-readiness-report.json` | promotion readiness | planned | + +### V44 generated artifact contract catalog + +Required draft artifacts include `.bitcode/v44-economic-domain-model.json`, +`.bitcode/v44-packs-portfolio-market-intelligence.json`, +`.bitcode/v44-reading-budget-quote-policy.json`, +`.bitcode/v44-depositor-earnings-supply-opportunities.json`, +`.bitcode/v44-btd-btc-compensation-statements.json`, +`.bitcode/v44-organization-policy-wallet-authority.json`, +`.bitcode/v44-enterprise-economic-ux.json`, +`.bitcode/v44-scaled-network-rehearsal.json`, and +`.bitcode/v44-promotion-readiness-report.json`. + +### V44 specifying generated artifacts + +V44 starts with `.bitcode/v44-spec-family-report.json`, +`.bitcode/v44-canonical-input-report.json`, and +`.bitcode/v44-canon-posture-drift-report.json`. Later gates add economic, +portfolio, budget, compensation, governance, UX, rehearsal, and promotion +readiness artifacts. + +### Shared generated-artifact fields + +Shared fields are schema id, version, current canonical/latest target, +artifact digest, source-safety verdict, validation commands, proof-source +commit, generated artifact inventories, and fail closed when stale. + +### Artifact-specific generated payload fields + +Artifact-specific payloads name portfolio positions, market signals, quote +states, budget decisions, settlement receipts, source-to-shares allocations, +contributor compensation statements, governance approvals, delivery states, +repair states, and proof roots. + +### Artifact confidentiality and disclosability taxonomy + +All V44 generated artifacts are source-safe metadata unless a later paid +settlement and rights-transfer surface explicitly authorizes source delivery. +They must not serialize protected source, unpaid AssetPack source, raw prompts, +raw provider responses, credentials, wallet private material, or private +settlement payloads. + +### Minimum generated appendix rendered contents + +The V44 generated appendix must render aggregate proof verdict, exact +proof-family inventory, exact per-family member inventory, exact per-family +theorem inventory, exact replay-step inventories and theorem bindings, witness +artifact inventories, generated artifact inventories, scenario and run coverage +matrices, proof-source commit, and fail closed when any economic or source-safe +proof is missing. + +### Canonical regeneration and fail-closed posture + +Regeneration must be deterministic. V44 promotion fails closed when artifacts +are stale, source safety is violated, value-bearing mainnet is admitted without +explicit later launch authority, or economic receipts cannot reconcile. + +## V44 validation canon + +Gate 1 validates with `pnpm run check:v44-gate1`, +`node scripts/check-bitcode-spec-family.mjs --version V44 --mode draft --current-target V43`, +`node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V43 --draft-target V44`, +and `git diff --check`. + +Later gates must add package tests, route tests, generated artifact checks, +source-safety checks, and local/staging rehearsal proof. + +## V44 promotion canon + +V44 promotion must happen only from `version/v44` into `main` after all V44 +gates close. The promotion workflow must generate `BITCODE_SPEC_V44_PROVEN.md`, +advance `BITCODE_SPEC.txt` to `V44`, prepare active V44 / draft V45 runtime +posture, and verify canonical inputs plus posture drift. + +## V44 appendices and canonical supporting material + +### Appendix A. Canonical type and surface catalog + +EnterprisePackPortfolio, PackPortfolioPosition, PackMarketSignal, +ReadDemandSignal, UnfitNeedSignal, DepositSupplyOpportunity, ReadingBudgetPolicy, +AssetPackQuotePolicy, ProcurementApprovalReceipt, DepositorEarningStatement, +ContributorCompensationStatement, PackEconomicStatement, +OrganizationPackPolicy, PackGovernanceDecision, ScaledNetworkRehearsalReceipt, +and PortfolioRepairCase are V44 draft surfaces. + +### Appendix B. Proof family closure catalog + +V44 proof families are inherited from V43 and extended to scaled economic +operation. Inference-synthesis, Prompt-completeness, Static-code-analysis, +Verification-decisions, Selection-and-materialization, +Authorization-and-sensitive-flow, Settlement-source-to-shares, +Disclosure-boundary, and Proof-contract all remain mandatory. + +### Exact proof-family inventory matrix + +| proofFamily | proofArtifactPath | memberIds | theoremIds | replayStepIds | witnessArtifactPaths | Current source basis | +| --- | --- | --- | --- | --- | --- | --- | +| Inference-synthesis | `.bitcode/v44-inference-economic-policy.json` | economic inference | source-safety | prompt replay | V38/V41 | Reading and deposit inference | +| Prompt-completeness | `.bitcode/v44-prompt-economic-coverage.json` | policy prompts | complete-context | prompt registry | V41 | PromptPart and Prompt catalog | +| Static-code-analysis | `.bitcode/v44-static-economic-surface.json` | code surfaces | surface-present | static checks | CI | Routes/packages/workflows | +| Verification-decisions | `.bitcode/v44-verification-decisions.json` | decisions | admissible | policy replay | V44 receipts | Governance and accounting | +| Selection-and-materialization | `.bitcode/v44-selection-materialization.json` | selected packs | paid-unlock | delivery replay | V42/V43 | AssetPack preview and delivery | +| Authorization-and-sensitive-flow | `.bitcode/v44-authorization-sensitive-flow.json` | authority | authorized | role checks | Auxillaries | Org/wallet/budget policy | +| Settlement-source-to-shares | `.bitcode/v44-settlement-source-to-shares.json` | accounting | conservation | ledger replay | BTD | BTC/BTD/source-to-shares | +| Disclosure-boundary | `.bitcode/v44-disclosure-boundary.json` | projections | source-safe | no-leak scan | V43 | Source-safe UI/API/storage | +| Proof-contract | `.bitcode/v44-proof-contract.json` | gates | deterministic | promote | workflows | Promotion readiness | + +### Appendix C. Generated artifact contract catalog + +V44 generated artifacts must be source-safe JSON with schema id, version, +current target, artifact roots, predicate rows, source-safety verdict, and +forbidden payload classes. They must never serialize protected source, unpaid +AssetPack source, raw prompts, provider responses, credentials, wallet private +material, or private settlement payloads. + +### Inherited V19 reproducible-canon artifacts + +Inherited. + +### Inherited V20 operator-quality artifacts + +Inherited. + +### Exact generated-artifact inventory matrix + +| artifact | field | verdict | +| --- | --- | --- | +| `.bitcode/v44-spec-family-report.json` | aggregate proof verdict | draft-required | +| `.bitcode/v44-canonical-input-report.json` | exact generated-artifact inventory | draft-required | +| `.bitcode/v44-canon-posture-drift-report.json` | active/draft posture | draft-required | +| `.bitcode/v44-economic-domain-model.json` | economic domain model | planned | +| `.bitcode/v44-packs-portfolio-market-intelligence.json` | portfolio and market intelligence | planned | +| `.bitcode/v44-reading-budget-quote-policy.json` | budget and quote policy | planned | +| `.bitcode/v44-depositor-earnings-supply-opportunities.json` | depositor earning opportunity | planned | +| `.bitcode/v44-btd-btc-compensation-statements.json` | BTD/BTC/source-to-shares statement | planned | +| `.bitcode/v44-organization-policy-wallet-authority.json` | organization policy and wallet authority | planned | +| `.bitcode/v44-enterprise-economic-ux.json` | enterprise economic UX | planned | +| `.bitcode/v44-scaled-network-rehearsal.json` | scaled rehearsal | planned | +| `.bitcode/v44-promotion-readiness-report.json` | promotion readiness | planned | + +### V44 specifying generated artifacts + +`.bitcode/v44-spec-family-report.json`, +`.bitcode/v44-canonical-input-report.json`, and +`.bitcode/v44-canon-posture-drift-report.json` are the opening artifacts. + +### Shared generated-artifact fields + +Version, digest, sourceSafetyVerdict, validationCommands, proof-source commit, +generated artifact inventories, and fail closed when stale. + +### Artifact-specific generated payload fields + +Portfolio, market signal, budget, quote, approval, settlement, BTD range, +source-to-shares allocation, compensation statement, delivery, repair, and +proof roots. + +### Artifact confidentiality and disclosability taxonomy + +Source-safe metadata only until settlement unlock and rights transfer. + +### Minimum generated appendix rendered contents + +V44 PROVEN must render aggregate proof verdict, exact proof-family inventory, +exact per-family member inventory, exact per-family theorem inventory, exact +replay-step inventories and theorem bindings, witness artifact inventories, +generated artifact inventories, scenario and run coverage matrices, +proof-source commit, and fail closed when any required proof is absent. + +### Canonical regeneration and fail-closed posture + +All V44 generators must be deterministic and checkable. Promotion fails closed +on stale artifacts, missing source-safety verdicts, secret serialization, +ledger drift, or value-bearing mainnet admission. + +### Appendix D. Validation and checking gate catalog + +Gate checks are `check:v44-gate1` through later V44 checks. Gate 1 is +specification and workflow posture; later gates add generated reports and +implementation tests. + +### Appendix E. Current canonical source map + +Current V43 source basis includes `/packs`, `/read`, `/deposit`, PackActivity, +deposit AssetPack options, Reading state, pipeline hosts, BTD settlement, +protocol generated reports, gate workflows, and demonstration witness. + +### Appendix F. Subsystem totality and derivability matrix + +Required coverage phrases: repo supply and depositing; reading and measured +demand; prompt/inference/evaluator ownership; deposit-to-read fit; recall and +ranking; verification decisions; selection and materialization; branch +artifacts and assetPackEvidence; identity, authority, signing, and policy; +sensitive data and confidentiality flows; projection, disclosure, and +redaction; proof families, members, theorems, witnesses, and replay; +settlement, source-to-shares, journals, and exact accounting; telemetry, +persistence, state, and failure semantics; host/runtime capability truth; +operator experience and pedagogy; validation and test stack; generated +artifacts and canonical promotion. + +### Appendix G. Canonical file-family and promotion contract catalog + +The V44 file family is `BITCODE_SPEC_V44.md`, +`BITCODE_SPEC_V44_DELTA.md`, `BITCODE_SPEC_V44_NOTES.md`, +`BITCODE_SPEC_V44_PARITY_MATRIX.md`, later `BITCODE_SPEC_V44_PROVEN.md`, +and generated `.bitcode/v44-*` artifacts. + +### Appendix H. Operator surface and quality contract catalog + +Operators need portfolio, market signal, budget, compensation, governance, +proof, repair, and settlement surfaces that are readable by default and deeply +inspectable on demand. + +### Appendix I. Scenario, workflow, and cross-product contract catalog + +Scenarios must include auth-issuer-rollback, privacy-boundary-proof-export, +polyglot-gateway-benchmark-remediation, auth-many-asset-normalization, +Targeted deposit, Normalization deposit, patch, context, public, buyer, +reviewer, internal, Openly writable, Measurably readable, Provable, and +Valuable. + +### Appendix J. Fail-closed contract and error posture matrix + +Invalid deposit, prompt contract incompleteness, parsed-envelope +inadmissibility, no-survivor asset pack, authorization denial, public +projection overexposure, settlement conservation drift, stale promoted status +truth, missing budget approval, missing wallet authority, and compensation +reconciliation drift all block completion. + +### Appendix K. Source-bearing AssetPack and artifact contract catalog + +Source-bearing AssetPack artifacts remain withheld until settlement and rights +transfer. Portfolio and statement artifacts carry metadata, proof roots, +settlement roots, delivery state, and repair state only. + +Source-bearing artifact paths remain inherited and protected: +`.bitcode/asset-pack.lock.json`, `.bitcode/selected-source-material.json`, +`.bitcode/verification-report.json`, `.bitcode/source-to-shares.json`, +`.bitcode/projection-policy.json`, `.bitcode/system-proof-bundle.json`, and +the later `BITCODE_SPEC_V44_PROVEN.md` generated appendix. V44 portfolio and +statement surfaces may cite their proof roots but must not disclose protected +payloads before paid settlement and rights transfer. + +## V44 accepted boundaries and reopen conditions + +Accepted boundaries: V44 scales economic operation without changing unpaid +source disclosure, BTD ownership, BTC settlement, source-to-shares, repository +delivery, demonstration isolation, or staging/mainnet lane boundaries. + +Reopen V44 when portfolio projections cannot reconcile to ledger receipts, +governance can be bypassed, source-safe market intelligence leaks protected +payloads, or scaled rehearsal cannot prove many-pack economic flows. + +## V44 completion condition + +V44 completes when Bitcode can operate a scaled enterprise technical knowledge +economy over `/packs`, `/read`, and `/deposit`: many AssetPacks, Reads, +quotes, settlements, contributors, compensation statements, budgets, +governance decisions, repair states, and proof roots are source-safe, +auditable, tested, rehearsed locally/staging-testnet, and ready for canonical +promotion. diff --git a/BITCODE_SPEC_V44_DELTA.md b/BITCODE_SPEC_V44_DELTA.md new file mode 100644 index 00000000..a19d5e1a --- /dev/null +++ b/BITCODE_SPEC_V44_DELTA.md @@ -0,0 +1,83 @@ +# Bitcode Spec V44 Delta + +## Status + +- Version: `V44` +- V44 state: draft opened for scaled engineering economy and tokenized AssetPack network work over promoted V43 +- Current canonical/latest target: `V43` +- Prior canonical anchor: `BITCODE_SPEC_V43.md` +- Prior generated proof appendix: `BITCODE_SPEC_V43_PROVEN.md` +- Generated structured artifact inventory: no V44 generated artifacts are canonical at Gate 1; later gates must create source-safe `.bitcode/v44-*` artifacts +- Source parity state: Gate 1 aligns specification, roadmap, docs, workflow, package script, and checker posture only +- Notes companion: `BITCODE_SPEC_V44_NOTES.md` +- Delta companion: `BITCODE_SPEC_V44_DELTA.md` +- Parity companion: `BITCODE_SPEC_V44_PARITY_MATRIX.md` +- Scope: delta from V43 product-route/agentic-depositing canon to V44 scaled engineering economy operation +- Last fully realized canonical target preserved in source: `V43` + +## Why V44 exists + +V43 made the product routes intelligible: AssetPacks in through `/deposit`, +AssetPacks out through `/read`, and PackActivity inspection through `/packs`. +V44 exists because an enterprise-grade Bitcode network must operate at scale: +many departments, budgets, repositories, deposit options, Reads, Fits, quotes, +settlements, contributors, compensation statements, and repair states. + +## Accepted V44 decisions + +- Treat scaled economic operation as the next draft target over V43. +- Keep V43 route law: `/packs`, `/read`, and `/deposit` remain the default + product surfaces. +- Name every economic field as estimate, quote, observed payment, final + settlement, contributor allocation, delivery, or repair state. +- Keep source-safety stronger than UX convenience. +- Keep value-bearing mainnet blocked until a later explicit launch version. + +## V44 gate plan + +1. Gate 1 Scaled Engineering Economy Roadmap Opening. +2. Gate 2 Economic Domain Model And Receipt Taxonomy. +3. Gate 3 Packs Portfolio Search And Market Intelligence. +4. Gate 4 Reading Budget, Quote Policy, And Procurement Governance. +5. Gate 5 Depositor Earnings, ROI, And Supply Opportunity Intelligence. +6. Gate 6 BTD/BTC Accounting And Contributor Compensation Statements. +7. Gate 7 Organization Policy, Approval, And Wallet Authority. +8. Gate 8 Enterprise Product UX For Economic Operation. +9. Gate 9 Scaled Local/Staging Network Rehearsal. +10. Gate 10 Promotion Readiness. + +## Explicitly deferred + +V44 Gate 1 defers implementation of portfolio dashboards, economic statement +APIs, budget policy engines, compensation statement materialization, governance +runtime enforcement, scaled rehearsal scripts, and V44 promotion workflow until +their owning gates. + +## Pre-Implementation Sequence + +1. Open V44 spec family, roadmap, checker, package script, workflow posture, + and documentation. +2. Implement economic domain model and receipt taxonomy for source-safe + portfolio, quote, statement, governance, and repair objects. +3. Extend `/packs` into portfolio analytics, search, and market intelligence. +4. Add Reading budget policy, quote policy, and procurement governance. +5. Add deposit revenue, demand, ROI, and supply opportunity readback. +6. Add BTD/BTC/source-to-shares compensation statements and reconciliation. +7. Add organization policy, approval, spend authority, and wallet authority. +8. Rehearse scaled many-pack local/staging-testnet economic operation. +9. Polish enterprise economy UX and operator dashboards. +10. Close V44 promotion readiness and prepare active V44 / draft V45 posture. + +## Validation direction + +Gate 1 validates with `pnpm run check:v44-gate1`, +`node scripts/check-bitcode-spec-family.mjs --version V44 --mode draft --current-target V43`, +`node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V43 --draft-target V44`, +and `git diff --check`. + +## Commit-Body Direction + +V44 commit bodies should name the closed gate, generated artifacts or proof +surfaces touched, source-safety posture, validation commands, accepted +boundaries, and any deferred economic implementation work. They should not use +temporary `wip` wording for closed gate work. diff --git a/BITCODE_SPEC_V44_NOTES.md b/BITCODE_SPEC_V44_NOTES.md new file mode 100644 index 00000000..f1f62eb2 --- /dev/null +++ b/BITCODE_SPEC_V44_NOTES.md @@ -0,0 +1,84 @@ +# Bitcode Spec V44 Notes + +## Status + +- Version: `V44` +- V44 state: draft notes opened for scaled engineering economy work over promoted V43 +- Current canonical/latest target: `V43` +- Prior canonical anchor: `BITCODE_SPEC_V43.md` +- Prior generated proof appendix: `BITCODE_SPEC_V43_PROVEN.md` +- Generated structured artifact inventory: V44 notes bind planning language only until later generated `.bitcode/v44-*` artifacts exist +- Source parity state: notes align roadmap, docs, and workflow posture for active V43 / draft V44 +- Scope: V44 notes for digitizing and tokenizing scaled engineering economies through enterprise AssetPack portfolio, market intelligence, BTD/BTC accounting, governance, and compensation operation +- Last fully realized canonical target preserved in source: `V43` + +## Notes companion rule + +These notes clarify V44 only. The active canon remains V43 until V44 promotion. + +## Concise current-system reading + +V43 made the commercial product paths legible: + +- `/deposit` creates reviewed, source-safe AssetPack supply options. +- `/read` buys synthesized Need-Fit AssetPacks after review, settlement, and + rights transfer. +- `/packs` inspects pack activity, proof roots, settlement, delivery, + compensation, and repair state. + +V44 should now make those paths operable for scaled engineering economies: +portfolio positions, demand signals, supply opportunities, budgets, quotes, +approvals, BTC settlement, BTD rights, source-to-shares allocation, +compensation statements, and repair cases must be visible as source-safe +economic truth. + +## Simplified-spec reading rule + +When V44 work becomes broad, reduce it to the economic law: + +1. Packs is portfolio, market intelligence, proof, and repair inspection. +2. Read is budgeted procurement of source-bearing technical knowledge after + Need review, Finding Fits, quote approval, BTC settlement, BTD rights + transfer, and delivery. +3. Deposit is supply creation and earning visibility over source-safe + AssetPack options and admitted Depository supply. +4. Statements must distinguish estimate, quote, observed payment, final + settlement, contributor allocation, delivery, and repair state. +5. Source is never disclosed before paid settlement and rights transfer. + +## V44 scaled economy note + +The product now has the right route shape. V44 should make that route shape +economically operable at enterprise scale. `/packs` should become the +portfolio and market-intelligence surface; `/read` should support budgeted +procurement and quote approval; `/deposit` should support earning visibility, +supply opportunity intelligence, and contributor compensation readback. + +## Economic label precision + +Every economic projection must say exactly what kind of value it is: +estimate, quote, observed payment, final settlement, contributor allocation, +delivery state, repair state, or statement. If the value has not settled on +ledger, it is not ledger truth. + +## Governance note + +Scaled Reading and Depositing require organization policy. V44 should bind +roles, budgets, approval thresholds, wallet authority, source criticality, +deposit limits, and spend limits without allowing any policy surface to bypass +Need review, Finding Fits, settlement, rights transfer, delivery, or +source-to-shares law. + +## Source-safety note + +Market intelligence is useful only if it is safe. Unfit Need signals, demand +signals, supply opportunities, portfolio positions, and compensation statements +must remain metadata and proof roots. They must not serialize protected source, +unpaid AssetPack source, raw prompts, raw provider responses, credentials, +wallet private material, or private settlement payloads. + +## Gate 1 note + +Gate 1 is intentionally a posture gate. It opens the V44 family and validates +that the repo now understands V43 active / V44 draft. It must not implement +later economic products under a loose roadmap commit. diff --git a/BITCODE_SPEC_V44_PARITY_MATRIX.md b/BITCODE_SPEC_V44_PARITY_MATRIX.md new file mode 100644 index 00000000..ceb9a798 --- /dev/null +++ b/BITCODE_SPEC_V44_PARITY_MATRIX.md @@ -0,0 +1,61 @@ +# Bitcode Spec V44 Parity Matrix + +## Status + +- Version: `V44` +- V44 state: draft parity opened for scaled engineering economy and tokenized AssetPack network work +- Current canonical/latest target: `V43` +- Prior canonical anchor: `BITCODE_SPEC_V43.md` +- Prior generated proof appendix: `BITCODE_SPEC_V43_PROVEN.md` +- Generated structured artifact inventory: V44 parity begins as planning metadata; later gates must close generated `.bitcode/v44-*` artifacts +- Source parity state: Gate 1 requires spec/docs/workflow/checker parity only +- Scope: parity for V44 enterprise economic operation over promoted V43 product routes +- Last fully realized canonical target preserved in source: `V43` + +## Purpose + +This matrix tracks the gap between promoted V43 product routes and the V44 +scaled engineering economy target. + +## Audit basis + +Audit V44 against `BITCODE_SPEC_V44.md`, promoted V43 canon, `/packs`, `/read`, +`/deposit`, PackActivity, Reading, deposit AssetPack options, BTD/BTC +settlement, source-to-shares accounting, organization policy, generated +artifacts, workflow checks, and local/staging rehearsal receipts. + +## V44 implementation matrix + +| Area | Required V44 result | Current judgment | +| --- | --- | --- | +| Gate 1 roadmap | V43 active / V44 draft posture, spec family, docs, workflow, package script, checker | drafted | +| Economic domain model | Portfolio positions, market signals, quote states, settlement states, statements, repair cases | drafted | +| Packs portfolio | `/packs` portfolio search, market intelligence, saved filters, economic facets | drafted | +| Reading procurement | Budget, quote policy, approval thresholds, purchase governance | drafted | +| Depositor earnings | ROI, demand, compensation opportunity, supply recommendations | drafted | +| Accounting statements | BTD/BTC/source-to-shares statements and reconciliation | drafted | +| Organization governance | Roles, budgets, wallet authority, source criticality, approvals | drafted | +| Enterprise UX | Dense economic surfaces, proof expansion, responsive/accessibility proof | drafted | +| Scaled rehearsal | Many-pack, many-org local/staging-testnet economic rehearsal | drafted | +| Promotion readiness | Generated PROVEN, workflow, all V44 artifacts bound | drafted | + +## V44 implementation checklist + +| Area | Required V44 result | Current judgment | +| --- | --- | --- | +| Source safety | No protected source, unpaid source, raw prompts, provider payloads, credentials, wallet secrets | drafted | +| Economic labels | Estimate, quote, observed payment, settlement, allocation, delivery, repair are distinct | drafted | +| Ledger reconciliation | Portfolio statements reconcile to receipts before finality | drafted | +| Route authority | `/packs`, `/read`, `/deposit` do not bypass protocol law | drafted | +| Tests and proofs | Each gate has generated artifacts, package tests, route tests, and workflow checks | drafted | + +## Accepted boundaries + +V44 must not weaken V43 source-safety, V42 settlement/delivery, V30 Protocol/BTD +rails, V27 BTD law, V36 economic exchange truth, V38 inference boundaries, or +V41 prompt-program discipline. + +## Completion condition + +V44 is complete when every matrix row is closed, source-safe, generated, +tested, rehearsed, documented, and promotion-ready. diff --git a/README.md b/README.md index 12d5ed0a..0a9effdc 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,23 @@ # Bitcode Repository `BITCODE_SPEC.txt` is the canonical pointer for active-system work. It currently -resolves to `V42`; V43 is the active draft target for the Packs, Read, Deposit -route model, agentic deposit AssetPack options, and product UX cleanup after the -promoted reliable MVP experience canon. +resolves to `V43`; V44 is the active draft target for scaled engineering economy +operation over the Packs, Read, and Deposit route model promoted in V43. ## Current Product Posture Bitcode is the protocol and the commercial source tree implements it in-place. -The promoted V42 operator route is still: - -- `/terminal` for depositing, reading, transaction work, and protocol follow-through. -- `/auxillaries` for Wallet, Externals, Profile, and Interfaces support surfaces. - -The active V43 draft target moves the primary enterprise routes to: +The promoted V43 enterprise routes are: - `/packs` for searchable master-detail pack activity. - `/read` for the five-step Reading path from Read Request to settlement-gated delivery. - `/deposit` for connected-source deposit AssetPack option synthesis, review, and admission. +The active V44 draft target makes those routes economically operable at +enterprise scale: `/packs` becomes the portfolio and market-intelligence +surface, `/read` gains budgeted procurement and quote governance, and +`/deposit` gains earning, demand, ROI, and compensation-statement visibility. + V41 Gate 1 opens the prompts-as-programs specification family over active V40 with `check:v41-gate1`. V41 will catalogue every raw PromptPart and composed Prompt, map registry composition and interpolation contracts, benchmark Reading @@ -280,6 +279,16 @@ artifact, promotion script, generated PROVEN hook, workflow, source-safety boundary, documentation update, and post-promotion V43 active / draft V44 runtime posture before the version branch can promote canon. +V44 Gate 1 opens scaled engineering economy work over active V43 with +`check:v44-gate1`. V44 is scoped to digitizing and tokenizing scaled +engineering economies: enterprise AssetPack portfolios, Pack market signals, +Reading demand signals, deposit supply opportunities, Reading budgets, +AssetPack quote policy, BTD/BTC/source-to-shares accounting, contributor +compensation statements, organization policy, wallet/spend authority, scaled +local/staging-testnet rehearsal, and polished economic operation through +`/packs`, `/read`, and `/deposit`. Gate 1 is specification, roadmap, +documentation, workflow, and checker posture only. + Exchange is inherited V36 canon: market-wide activity master-detail, buy/sell/ bid/ask/cancel/accept/settle/history flows, AssetPack range trading, rights-transfer review, pricing/liquidity/wrapper analysis, settlement @@ -897,12 +906,13 @@ or promotion validation. ## Key Surfaces - [BITCODE_SPEC.txt](BITCODE_SPEC.txt) is the canonical version pointer. -- [BITCODE_SPEC_V41.md](BITCODE_SPEC_V41.md) is the active promoted spec family. -- [BITCODE_SPEC_V42.md](BITCODE_SPEC_V42.md) is the active draft target. -- [BITCODE_SPEC_V42_PARITY_MATRIX.md](BITCODE_SPEC_V42_PARITY_MATRIX.md) tracks V42 gate parity. +- [BITCODE_SPEC_V43.md](BITCODE_SPEC_V43.md) is the active promoted spec family. +- [BITCODE_SPEC_V44.md](BITCODE_SPEC_V44.md) is the active draft target. +- [BITCODE_SPEC_V44_PARITY_MATRIX.md](BITCODE_SPEC_V44_PARITY_MATRIX.md) tracks V44 gate parity. - [uapi/README.md](uapi/README.md) documents the commercial website/API surface. -- [uapi/app/terminal/README.md](uapi/app/terminal/README.md) documents Terminal. -- [uapi/app/exchange/README.md](uapi/app/exchange/README.md) documents Exchange. +- [uapi/app/packs](uapi/app/packs) is the PackActivity and portfolio inspection route. +- [uapi/app/read](uapi/app/read) is the Reading route. +- [uapi/app/deposit](uapi/app/deposit) is the Depositing route. - [uapi/app/auxillaries/README.md](uapi/app/auxillaries/README.md) documents Auxillaries. - [protocol-demonstration/README.md](protocol-demonstration/README.md) documents the deterministic demonstration. diff --git a/SPECIFICATIONS_ROADMAP.md b/SPECIFICATIONS_ROADMAP.md index b727500c..c76805a6 100644 --- a/SPECIFICATIONS_ROADMAP.md +++ b/SPECIFICATIONS_ROADMAP.md @@ -2,12 +2,15 @@ ## Status -- Current active canonical pointer: `BITCODE_SPEC.txt` -> `V42` -- Current active canon: `BITCODE_SPEC_V42.md` -- Current draft target: `BITCODE_SPEC_V43.md`. -- Current working gate: V43 Gate 10 Promotion Readiness. -- Next queued work after V43 Gate 10: V43 canonical promotion PR into `main`, generated `BITCODE_SPEC_V43_PROVEN.md`, and active V43 / draft V44 preparation. -- Latest closed version: V42 Reliable MVP Experience, which promoted shortest-path Depositing, five-step Reading, ReadNeed review/resynthesis, ReadFitsFinding source-safe preview and quote, settlement rights transfer, repository delivery, AI-reading demonstration, local/staging MVP rehearsal, and V42 promotion readiness. +- Current active canonical pointer: `BITCODE_SPEC.txt` -> `V43` +- Current active canon: `BITCODE_SPEC_V43.md` +- Current draft target: `BITCODE_SPEC_V44.md`. +- Current working gate: V44 Gate 1 Scaled Engineering Economy Roadmap Opening. +- Next queued work after V44 Gate 1: V44 economic domain model and receipt taxonomy, `/packs` portfolio market intelligence, Reading budget/quote governance, Depositor earning intelligence, BTD/BTC compensation statements, organization policy, enterprise UX, scaled local/staging rehearsal, and V44 promotion readiness. +- Latest closed version: V43 Route Product Cleanup, which promoted `/packs`, `/read`, and `/deposit`; PackActivity master-detail; five-step Reading route UX; deposit AssetPack option synthesis; deposit criticality/ROI/compensation policy; option admission; product route UX; cross-route rehearsal; and V43 promotion readiness. +- Recent V43 canonical promotion anchor: V43 canonical promotion updated `BITCODE_SPEC.txt` to `V43`, generated `BITCODE_SPEC_V43_PROVEN.md`, preserved active V43 / draft V44 runtime posture, and closed route-product cleanup canon. +- V44 Gate 1 opening anchor: scaled engineering economy opens over promoted V43 with V44 SPEC, DELTA, NOTES, and PARITY files, `check:v44-gate1`, active V43 / draft V44 posture, and a ten-gate plan for economic domain models, Packs portfolio intelligence, Reading budget/quote governance, Depositor earnings/ROI intelligence, BTD/BTC compensation statements, organization policy/wallet authority, enterprise economic UX, scaled local/staging rehearsal, and promotion readiness. +- Latest prior closed version: V42 Reliable MVP Experience, which promoted shortest-path Depositing, five-step Reading, ReadNeed review/resynthesis, ReadFitsFinding source-safe preview and quote, settlement rights transfer, repository delivery, AI-reading demonstration, local/staging MVP rehearsal, and V42 promotion readiness. - Recent V42 canonical promotion anchor: V42 canonical promotion updated `BITCODE_SPEC.txt` to `V42`, generated `BITCODE_SPEC_V42_PROVEN.md`, preserved active V42 / draft V43 runtime posture, and closed reliable MVP experience canon. - Recent V42 opening anchor: reliable MVP experience opens over promoted V41 with V42 SPEC, DELTA, NOTES, and PARITY files, `check:v42-gate1`, active V41 / draft V42 posture, and a nine-gate plan for shortest-path Depositing, five-step Reading, ReadNeed product closure, ReadFitsFinding preview and quote closure, settlement and repository delivery, AI-reading demonstration, local/staging rehearsal, and promotion readiness. - V42 Gate 2 closure anchor: reliable MVP experience now owns source-safe Depositing compensation visibility through `DepositorySupplyCompensationPreview`, deposit route `depositoryEvidence.compensationPreview`, deterministic `.bitcode/v42-depositing-shortest-path.json`, route/API readiness checks, source validation, Depository search/vector/storage projection, source-to-shares compensation readback keys, Terminal compensation roots, focused package/protocol tests, workflow wiring, and `check:v42-gate2`. @@ -175,8 +178,9 @@ They are referenced here for specification history only; active implementation w | V39 | `BITCODE_SPEC_V39.md` | promoted historical Bitcode canon | Commercial Reading readiness after V38: Depository supply indexing, enterprise five-step Reading UX, ReadNeed review/resynthesis, ReadFitsFinding many-candidate runtime and replay, source-safe AssetPack preview and deterministic BTC quote, settlement, BTD rights transfer, post-settlement delivery, ledger/database/storage synchronization, operational telemetry/repair, interface parity, local/staging rehearsal, and promotion readiness. | | V40 | `BITCODE_SPEC_V40.md` | promoted historical Bitcode canon | Exhaustive commercial application testing depth after V39: rich browser E2E for all website interactions and state possibilities, visual/screenshot comparison coverage, API and integration suites for pipelines, conversations, routes, ledger/database/storage synchronization, unit coverage for packages, primitives, isolated implementations, real commercial implementations, local/staging rehearsal automation, prompt benchmark smoke, and promotion readiness. | | V41 | `BITCODE_SPEC_V41.md` | promoted historical Bitcode canon | Prompt and PromptPart excellence, treating prompts as programs: audit every raw PromptPart and composed Prompt, run and harden benchmarks, repartition prompts into meaningfully benchmarkable semantic parts, retitle and rewrite PromptParts/Prompts where optimal, catalogue registry bindings, interpolation contracts, benchmark fixtures, benchmark outputs, inference callsites, and parsed return types, and elevate all Reading and Conversation inference points after V38 inference scaffolding and V40 testing depth make that work measurable. The primary surface is Reading, especially `ReadNeedComprehensionSynthesis` and `ReadFitsFindingSynthesis`; conversations and other inference prompts follow with the same benchmarkable catalogue discipline. | -| V42 | `BITCODE_SPEC_V42.md` | active canon | Reliable MVP experience after V41 prompt hardening: shortest-path Depositing for any source material with Depository admission proof and later BTC compensation when deposits contribute to synthesized AssetPacks; shortest-path Reading for Read Request submission, synthesized Need review/resynthesis, Finding Fits, source-safe AssetPack measurement/preview review, BTD/BTC purchase and settlement, and repository delivery; and an AI-reading dominant demonstration proving an AssetPack can improve an AI system's training, prompt/context, or evaluation performance beyond public-data-only baselines using proprietary or otherwise non-public deposit and read materials. | -| V43 | `BITCODE_SPEC_V43.md` | active draft target | Agentic enterprise deposit-side AssetPack option synthesis and broad UX cleanup after V42 reliable MVP paths: repository-installed Bitcode Agents compare a connected enterprise codebase, the Bitcode Depository, and Reading activity to propose deposit AssetPack options for review; filter out critical IP; estimate positive ROI against development cost and likely demand; let enterprises approve/reject options for Depository admission; split `/terminal` into `/read` and `/deposit`; and rename `/exchange` to `/packs` throughout product routes, code naming, docs, component prefixes, tests, and operator vocabulary. `/packs` becomes the searchable master-detail activity surface for all pack activity, with column sorting/filtering/search over measurements, synthesized AssetPack titles and descriptions, values, activity/transaction type, settlement posture, compensation, proof roots, and repair state. `/deposit` and `/read` become the short core paths into and out of the Depository. Outside public docs, product UX should be self-explanatory through route structure, concise labels, progressive detail, and rich reusable themed components rather than self-referential instructional copy. | +| V42 | `BITCODE_SPEC_V42.md` | promoted historical Bitcode canon | Reliable MVP experience after V41 prompt hardening: shortest-path Depositing for any source material with Depository admission proof and later BTC compensation when deposits contribute to synthesized AssetPacks; shortest-path Reading for Read Request submission, synthesized Need review/resynthesis, Finding Fits, source-safe AssetPack measurement/preview review, BTD/BTC purchase and settlement, and repository delivery; and an AI-reading dominant demonstration proving an AssetPack can improve an AI system's training, prompt/context, or evaluation performance beyond public-data-only baselines using proprietary or otherwise non-public deposit and read materials. | +| V43 | `BITCODE_SPEC_V43.md` | active canon | Agentic enterprise deposit-side AssetPack option synthesis and broad UX cleanup after V42 reliable MVP paths: repository-installed Bitcode Agents compare a connected enterprise codebase, the Bitcode Depository, and Reading activity to propose deposit AssetPack options for review; filter out critical IP; estimate positive ROI against development cost and likely demand; let enterprises approve/reject options for Depository admission; split `/terminal` into `/read` and `/deposit`; and rename `/exchange` to `/packs` throughout product routes, code naming, docs, component prefixes, tests, and operator vocabulary. `/packs` becomes the searchable master-detail activity surface for all pack activity, with column sorting/filtering/search over measurements, synthesized AssetPack titles and descriptions, values, activity/transaction type, settlement posture, compensation, proof roots, and repair state. `/deposit` and `/read` become the short core paths into and out of the Depository. Outside public docs, product UX should be self-explanatory through route structure, concise labels, progressive detail, and rich reusable themed components rather than self-referential instructional copy. | +| V44 | `BITCODE_SPEC_V44.md` | active draft target | Scaled engineering economy and tokenized AssetPack network operation after V43 route cleanup: enterprise AssetPack portfolios, Pack market signals, Reading demand signals, deposit supply opportunities, Reading budget policy, AssetPack quote policy, BTD/BTC/source-to-shares accounting, contributor compensation statements, organization policy, wallet/spend authority, scaled local/staging-testnet rehearsal, and polished economic operation across `/packs`, `/read`, and `/deposit` while keeping value-bearing mainnet blocked until later launch authority. | ## Current Planning Spine @@ -197,14 +201,15 @@ They are referenced here for specification history only; active implementation w 15. V40 promoted exhaustive testing for the rich commercial application: E2E, visual, screenshot comparison, interaction/state matrices, integration, unit coverage, ledger/storage synchronization, local/staging rehearsal automation, and prompt benchmark smoke across the website, APIs, pipelines, conversations, packages, primitives, and real implementations. 16. V41 promoted prompts-as-programs after V40: every PromptPart, Prompt composition, benchmark, meaningfully benchmarkable semantic division, title, template, interpolation contract, registry binding, inference callsite, benchmark result, and parsed return type was examined and improved across Reading and Conversation inference, using V38's inference correctness scaffolding and V40's testing/benchmarking depth as the measurement base. 17. V42 promoted the reliable MVP experience after V41: shortest-path Depositing with later BTC compensation, five-step Reading from request through synthesized Need review/resynthesis, Finding Fits, source-safe AssetPack preview, BTD/BTC purchase, settlement, repository delivery, and a strong AI-reading dominant demonstration where Bitcode reads non-public technical intelligence into an AssetPack that measurably improves an AI system beyond a public-data-only baseline. -18. V43 is the active agentic deposit-side and route-product cleanup draft after the MVP paths became reliable: enterprises should get deposit AssetPack options synthesized from connected repositories and Bitcode's observed Depository/Reading demand, then approve or reject source-safe, sub-critical, positive-ROI options for Depository admission; `/terminal` splits into `/read` and `/deposit`, and `/exchange` becomes `/packs`. +18. V43 promoted agentic deposit-side and route-product cleanup after the MVP paths became reliable: enterprises get deposit AssetPack options synthesized from connected repositories and Bitcode's observed Depository/Reading demand, then approve or reject source-safe, sub-critical, positive-ROI options for Depository admission; `/terminal` split into `/read` and `/deposit`, and `/exchange` became `/packs`. +19. V44 is the active scaled engineering economy draft after product routes became intelligible: Bitcode must expose enterprise AssetPack portfolios, Pack market intelligence, Reading budgets and quote governance, deposit earning/ROI intelligence, BTD/BTC/source-to-shares compensation statements, organization policy/wallet authority, enterprise economic UX, and scaled local/staging-testnet rehearsal without weakening source-safety or value-bearing mainnet blocks. ## Boundary Rules - Do not treat `_legacy/` ENGI specifications as active implementation authority. - Do use `_legacy/` specifications to understand why current Bitcode concepts exist and what must not regress. -- V43 work must build on V42 active canon and V27 `$BTD` law unless a future promoted spec explicitly supersedes it. -- V43 is the active draft target for agentic deposit-side AssetPack option synthesis, `/read` and `/deposit` route separation, `/packs` renaming, searchable pack activity master-detail, and UX/product cleanup. -- V43 Gate 1 is specification/documentation/workflow posture only; V43 Gate 2 inventories route vocabulary and migration plans only. Later V43 gates own route migration, data models, pipelines, UI implementation, rehearsal, and promotion. +- V44 work must build on V43 active canon and V27 `$BTD` law unless a future promoted spec explicitly supersedes it. +- V44 is the active draft target for scaled engineering economy operation: enterprise AssetPack portfolios, Pack market intelligence, Reading budget/quote governance, Depositor earning/ROI intelligence, BTD/BTC/source-to-shares compensation statements, organization policy/wallet authority, enterprise economic UX, and scaled rehearsal. +- V44 Gate 1 is specification/documentation/workflow posture only. Later V44 gates own economic data models, package helpers, APIs, routes, UI implementation, generated proof artifacts, local/staging rehearsal, and promotion. - No implementation route should be versioned by spec number; source should move in place with the active canon. - Future notes files are planning memory only until their version is explicitly opened as the draft-target SPEC family. diff --git a/package.json b/package.json index f778baa0..4a2b9f7e 100644 --- a/package.json +++ b/package.json @@ -358,6 +358,7 @@ "generate:v43-promotion-readiness": "node scripts/generate-v43-promotion-readiness-report.mjs", "check:v43-promotion-readiness": "node scripts/generate-v43-promotion-readiness-report.mjs --check", "check:v43-gate10": "node scripts/check-v43-gate10-promotion-readiness.mjs", + "check:v44-gate1": "node scripts/check-v44-gate1-scaled-economy-roadmap-opening.mjs", "generate:v38-inference-surface-inventory": "node scripts/generate-v38-inference-surface-inventory.mjs", "check:v38-inference-surface-inventory": "node scripts/generate-v38-inference-surface-inventory.mjs --check", "check:v38-gate2": "node scripts/check-v38-gate2-inference-surface-inventory.mjs", diff --git a/packages/protocol/README.md b/packages/protocol/README.md index 8845487f..36c6f3b7 100644 --- a/packages/protocol/README.md +++ b/packages/protocol/README.md @@ -177,6 +177,15 @@ route artifacts, workflows, generated PROVEN support, promotion scripts, source-safety checks, documentation evidence, and the `V43` active, `V44` draft posture needed before canonical promotion. +V44 Gate 1 opens scaled engineering economy work over the promoted `V43` +active, `V44` draft posture. It wires `check:v44-gate1` and the V44 +specification family for enterprise AssetPack portfolios, Pack market signals, +Reading demand signals, deposit supply opportunities, Reading budget policy, +AssetPack quote policy, BTD/BTC/source-to-shares accounting, contributor +compensation statements, organization policy, wallet authority, scaled +local/staging-testnet rehearsal, and `/packs`, `/read`, `/deposit` economic +operation. Gate 1 is specification/documentation/workflow posture only. + Historical V39 promotion moved this package through the `V39` active, `V40` draft posture. V40 promotion has since advanced the current package posture to `V40` active, `V41` draft. diff --git a/scripts/check-v44-gate1-scaled-economy-roadmap-opening.mjs b/scripts/check-v44-gate1-scaled-economy-roadmap-opening.mjs new file mode 100644 index 00000000..814fe77d --- /dev/null +++ b/scripts/check-v44-gate1-scaled-economy-roadmap-opening.mjs @@ -0,0 +1,168 @@ +#!/usr/bin/env node + +import { execFileSync } from 'node:child_process'; +import { existsSync, readFileSync } from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const defaultRepoRoot = path.resolve(__dirname, '..'); + +function read(root, relativePath) { + return readFileSync(path.join(root, relativePath), 'utf8'); +} + +function exists(root, relativePath) { + return existsSync(path.join(root, relativePath)); +} + +function git(root, args) { + return execFileSync('git', args, { cwd: root, encoding: 'utf8' }).trim(); +} + +function assertCheck(failures, condition, message) { + if (!condition) failures.push(message); +} + +function parseArgs(argv) { + const args = { repoRoot: defaultRepoRoot, skipBranchCheck: false }; + for (let index = 0; index < argv.length; index += 1) { + const arg = argv[index]; + if (arg === '--repo-root') args.repoRoot = path.resolve(argv[++index]); + else if (arg === '--skip-branch-check') args.skipBranchCheck = true; + else if (arg === '--help' || arg === '-h') args.help = true; + else throw new Error(`Unknown argument ${arg}`); + } + return args; +} + +function main() { + const args = parseArgs(process.argv.slice(2)); + if (args.help) { + process.stdout.write('Usage: node scripts/check-v44-gate1-scaled-economy-roadmap-opening.mjs [--skip-branch-check] [--repo-root ]\n'); + return; + } + + const root = args.repoRoot; + const failures = []; + const pointer = read(root, 'BITCODE_SPEC.txt').trim(); + + assertCheck(failures, pointer === 'V43', `BITCODE_SPEC.txt must remain V43 during V44 gate work. Observed ${pointer || 'empty'}.`); + + if (!args.skipBranchCheck) { + const branch = git(root, ['branch', '--show-current']); + assertCheck( + failures, + branch === 'version/v44' || /^v44\/gate-\d+-[a-z0-9][a-z0-9-]*$/u.test(branch), + `V44 work must occur on version/v44 or v44/gate-N-* branches. Observed ${branch || 'detached HEAD'}.`, + ); + } + + for (const relativePath of [ + 'BITCODE_SPEC_V44.md', + 'BITCODE_SPEC_V44_DELTA.md', + 'BITCODE_SPEC_V44_NOTES.md', + 'BITCODE_SPEC_V44_PARITY_MATRIX.md', + 'SPECIFICATIONS_ROADMAP.md', + 'README.md', + 'packages/protocol/README.md', + 'protocol-demonstration/README.md', + '.github/pull_request_template.md', + '.github/workflows/bitcode-gate-quality.yml', + '.github/workflows/bitcode-canon-quality.yml', + 'package.json', + ]) { + assertCheck(failures, exists(root, relativePath), `Missing required V44 Gate 1 file: ${relativePath}`); + } + + const spec = read(root, 'BITCODE_SPEC_V44.md'); + const delta = read(root, 'BITCODE_SPEC_V44_DELTA.md'); + const notes = read(root, 'BITCODE_SPEC_V44_NOTES.md'); + const parity = read(root, 'BITCODE_SPEC_V44_PARITY_MATRIX.md'); + const roadmap = read(root, 'SPECIFICATIONS_ROADMAP.md'); + const readme = read(root, 'README.md'); + const protocolReadme = read(root, 'packages/protocol/README.md'); + const demoReadme = read(root, 'protocol-demonstration/README.md'); + const prTemplate = read(root, '.github/pull_request_template.md'); + const packageJson = read(root, 'package.json'); + const gateWorkflow = read(root, '.github/workflows/bitcode-gate-quality.yml'); + const canonWorkflow = read(root, '.github/workflows/bitcode-canon-quality.yml'); + + for (const [label, content] of [ + ['V44 SPEC', spec], + ['V44 DELTA', delta], + ['V44 NOTES', notes], + ['V44 PARITY', parity], + ]) { + assertCheck(failures, content.includes('Current canonical/latest target: `V43`'), `${label} must declare V43 as current canonical/latest target.`); + } + + for (const phrase of [ + 'digitizing and tokenizing scaled engineering economies', + 'EnterprisePackPortfolio', + 'PackMarketSignal', + 'ReadDemandSignal', + 'DepositSupplyOpportunity', + 'ReadingBudgetPolicy', + 'AssetPackQuotePolicy', + 'ContributorCompensationStatement', + 'OrganizationPackPolicy', + 'ScaledNetworkRehearsalReceipt', + 'estimate, quote, observed payment, final settlement, contributor allocation, delivery, or repair state', + '/packs', + '/read', + '/deposit', + 'source-to-shares', + 'value-bearing mainnet', + ]) { + assertCheck( + failures, + spec.includes(phrase) || delta.includes(phrase) || notes.includes(phrase) || parity.includes(phrase) || roadmap.includes(phrase), + `V44 opening must name ${phrase}.`, + ); + } + + for (const gate of [ + 'Gate 1 Scaled Engineering Economy Roadmap Opening', + 'Gate 2 Economic Domain Model And Receipt Taxonomy', + 'Gate 3 Packs Portfolio Search And Market Intelligence', + 'Gate 4 Reading Budget, Quote Policy, And Procurement Governance', + 'Gate 5 Depositor Earnings, ROI, And Supply Opportunity Intelligence', + 'Gate 6 BTD/BTC Accounting And Contributor Compensation Statements', + 'Gate 7 Organization Policy, Approval, And Wallet Authority', + 'Gate 8 Enterprise Product UX For Economic Operation', + 'Gate 9 Scaled Local/Staging Network Rehearsal', + 'Gate 10 Promotion Readiness', + ]) { + assertCheck(failures, spec.includes(gate) || delta.includes(gate), `V44 gate plan is missing ${gate}.`); + } + + assertCheck(failures, roadmap.includes('Current active canonical pointer: `BITCODE_SPEC.txt` -> `V43`'), 'Roadmap must state V43 active pointer.'); + assertCheck(failures, roadmap.includes('Current working gate: V44 Gate 1'), 'Roadmap must state active V44 Gate 1 work.'); + assertCheck(failures, roadmap.includes('| V44 | `BITCODE_SPEC_V44.md` | active draft target |'), 'Roadmap must list V44 as active draft target.'); + assertCheck(failures, readme.includes('resolves to `V43`; V44 is the active draft target'), 'README must state V43 active / V44 draft posture.'); + assertCheck(failures, protocolReadme.includes('V44 Gate 1') && protocolReadme.includes('V43` active, `V44` draft'), 'Protocol README must document V44 Gate 1 active/draft posture.'); + assertCheck(failures, demoReadme.includes('`BITCODE_SPEC.txt -> V43`'), 'Demonstration README must keep V43 pointer truth.'); + assertCheck(failures, prTemplate.includes('V44 Gate N:'), 'PR template must use V44 gate title examples.'); + assertCheck(failures, packageJson.includes('"check:v44-gate1"'), 'package.json must expose check:v44-gate1.'); + assertCheck(failures, gateWorkflow.includes('check-v44-gate1-scaled-economy-roadmap-opening.mjs'), 'Gate workflow must run V44 Gate 1 checker.'); + assertCheck(failures, canonWorkflow.includes('check-v44-gate1-scaled-economy-roadmap-opening.mjs'), 'Canon workflow must run V44 Gate 1 checker.'); + + if (failures.length > 0) { + process.stderr.write('V44 Gate 1 scaled economy roadmap check failed:\n'); + for (const failure of failures.filter(Boolean)) process.stderr.write(`- ${failure}\n`); + process.exitCode = 1; + return; + } + + process.stdout.write('V44 Gate 1 scaled economy roadmap check passed.\n'); +} + +try { + main(); +} catch (error) { + const detail = error instanceof Error ? error.message : String(error); + process.stderr.write(`${detail}\n`); + process.exitCode = 1; +} From a3207c03df7c4211df1b4a43498e6d4d7f54b3c0 Mon Sep 17 00:00:00 2001 From: Garrett Maring Date: Fri, 29 May 2026 15:59:09 -0300 Subject: [PATCH 2/2] V44 Gate 1: Repair promoted V43 package predicates Teach protocol package tests and V43 artifact predicates that V43 is now the promoted active pointer with V44 as the draft target. This keeps V43 source-safe artifacts valid after canonical promotion while V44 Gate 1 opens the next roadmap. --- .../v43-cross-route-rehearsal-telemetry-repair.js | 10 +++++++++- .../src/canonical/v43-route-vocabulary-inventory.js | 2 +- .../protocol/test/protocol-package-boundary.test.js | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/protocol/src/canonical/v43-cross-route-rehearsal-telemetry-repair.js b/packages/protocol/src/canonical/v43-cross-route-rehearsal-telemetry-repair.js index 646d1525..4fd7f7aa 100644 --- a/packages/protocol/src/canonical/v43-cross-route-rehearsal-telemetry-repair.js +++ b/packages/protocol/src/canonical/v43-cross-route-rehearsal-telemetry-repair.js @@ -295,7 +295,15 @@ function buildPredicateResults(repoRoot) { predicateResult('v43-delta-expanded', SOURCE_ROOTS.delta, includesText(sources.delta, 'Gate 9') && includesText(sources.delta, 'cross-route rehearsal')), predicateResult('v43-notes-expanded', SOURCE_ROOTS.notes, sources.notes.includes('Gate 9') && sources.notes.includes('telemetry/database/ledger/storage')), predicateResult('v43-parity-implemented', SOURCE_ROOTS.parity, sources.parity.includes('Cross-route rehearsal') && sources.parity.includes('implemented')), - predicateResult('roadmap-advanced-to-gate9', SOURCE_ROOTS.roadmap, (sources.roadmap.includes('Current working gate: V43 Gate 9') || sources.roadmap.includes('Current working gate: V43 Gate 10')) && sources.roadmap.includes('V43 Gate 9 closure anchor')), + predicateResult( + 'roadmap-advanced-to-gate9', + SOURCE_ROOTS.roadmap, + ( + sources.roadmap.includes('Current working gate: V43 Gate 9') || + sources.roadmap.includes('Current working gate: V43 Gate 10') || + sources.roadmap.includes('V43 Gate 10 closure anchor') + ) && sources.roadmap.includes('V43 Gate 9 closure anchor'), + ), predicateResult('readmes-document-gate9', SOURCE_ROOTS.readme, sources.readme.includes('V43 Gate 9') && sources.protocolReadme.includes('V43CrossRouteRehearsalTelemetryRepair')), ]; } diff --git a/packages/protocol/src/canonical/v43-route-vocabulary-inventory.js b/packages/protocol/src/canonical/v43-route-vocabulary-inventory.js index 04f2e877..b951527b 100644 --- a/packages/protocol/src/canonical/v43-route-vocabulary-inventory.js +++ b/packages/protocol/src/canonical/v43-route-vocabulary-inventory.js @@ -400,7 +400,7 @@ function buildPredicateResults(repoRoot, scan) { const checker = readSource(repoRoot, 'scripts/check-v43-gate2-route-vocabulary-inventory.mjs'); const test = readSource(repoRoot, 'packages/protocol/test/v43-route-vocabulary-inventory.test.js'); return [ - predicateResult('active-canon-pointer-remains-v42', 'BITCODE_SPEC.txt', readSource(repoRoot, 'BITCODE_SPEC.txt').trim() === 'V42'), + predicateResult('active-canon-pointer-remains-v42', 'BITCODE_SPEC.txt', ['V42', 'V43'].includes(readSource(repoRoot, 'BITCODE_SPEC.txt').trim())), predicateResult('spec-defines-gate2-inventory', 'BITCODE_SPEC_V43.md', spec.includes('V43 Gate 2') && spec.includes('route vocabulary inventory')), predicateResult('spec-defines-migration-matrix', 'BITCODE_SPEC_V43.md', spec.includes('migration matrix') && spec.includes('retained debug cockpit')), predicateResult('delta-records-gate2-artifact', 'BITCODE_SPEC_V43_DELTA.md', delta.includes('v43-route-vocabulary-inventory')), diff --git a/packages/protocol/test/protocol-package-boundary.test.js b/packages/protocol/test/protocol-package-boundary.test.js index 94980ca9..62645384 100644 --- a/packages/protocol/test/protocol-package-boundary.test.js +++ b/packages/protocol/test/protocol-package-boundary.test.js @@ -62,6 +62,7 @@ test('@bitcode/protocol commercial formalization exports package-native canon he V40: { activeCanon: 'V40', draftTarget: 'V41' }, V41: { activeCanon: 'V41', draftTarget: 'V42' }, V42: { activeCanon: 'V42', draftTarget: 'V43' }, + V43: { activeCanon: 'V43', draftTarget: 'V44' }, }; const expectedPosture = expectedPostureByPointer[pointer];