Skip to content

Commit 0ae8cd7

Browse files
V44 Gate 2: Add economic domain model
Adds the package-backed V44EconomicDomainModel, deterministic v44-economic-domain-model artifact, generator/checker scripts, protocol tests, package exports, and workflow hooks. Updates V44 specification, roadmap, README, and protocol docs to close Gate 2 around source-safe economic object contracts, receipt taxonomy, value labels, and forbidden payload boundaries. Validation: pnpm run check:v44-gate1; pnpm run generate:v44-economic-domain-model; pnpm run check:v44-economic-domain-model; pnpm run check:v44-gate2; 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; node scripts/check-bitcode-canonical-inputs.mjs --current-target V43; pnpm --filter @bitcode/protocol typecheck; pnpm --filter @bitcode/protocol test; git diff --cached --check.
1 parent 91a8d49 commit 0ae8cd7

18 files changed

Lines changed: 1746 additions & 20 deletions

.bitcode/v44-economic-domain-model.json

Lines changed: 906 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/bitcode-canon-quality.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,9 @@ jobs:
364364
if [ -f BITCODE_SPEC_V44.md ]; then
365365
node scripts/check-bitcode-spec-family.mjs --version V44 --mode draft --current-target V43
366366
node scripts/check-v44-gate1-scaled-economy-roadmap-opening.mjs --skip-branch-check
367+
if [ -f scripts/check-v44-gate2-economic-domain-model.mjs ]; then
368+
node scripts/check-v44-gate2-economic-domain-model.mjs --skip-branch-check --skip-package-tests
369+
fi
367370
fi
368371
else
369372
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2

.github/workflows/bitcode-gate-quality.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,9 @@ jobs:
493493
if [ -f BITCODE_SPEC_V44.md ]; then
494494
node scripts/check-bitcode-spec-family.mjs --version V44 --mode draft --current-target V43
495495
node scripts/check-v44-gate1-scaled-economy-roadmap-opening.mjs --skip-branch-check
496+
if [ -f scripts/check-v44-gate2-economic-domain-model.mjs ]; then
497+
node scripts/check-v44-gate2-economic-domain-model.mjs --skip-branch-check --skip-package-tests
498+
fi
496499
fi
497500
else
498501
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
@@ -528,6 +531,9 @@ jobs:
528531
if [ "$POINTER" = "V43" ] && [ -f scripts/check-v44-gate1-scaled-economy-roadmap-opening.mjs ]; then
529532
node scripts/check-v44-gate1-scaled-economy-roadmap-opening.mjs --skip-branch-check
530533
fi
534+
if [ "$POINTER" = "V43" ] && [ -f scripts/check-v44-gate2-economic-domain-model.mjs ]; then
535+
node scripts/check-v44-gate2-economic-domain-model.mjs --skip-branch-check --skip-package-tests
536+
fi
531537
if [ "$POINTER" != "V43" ]; then
532538
if [ -f scripts/check-v43-gate1-packs-read-deposit-roadmap.mjs ]; then
533539
node scripts/check-v43-gate1-packs-read-deposit-roadmap.mjs --skip-branch-check

BITCODE_SPEC_V44.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,23 @@ compensation statements, governance decisions, and repair cases. It must label
184184
estimate, quote, observed payment, final settlement, contributor allocation,
185185
delivery, and repair states distinctly.
186186

187+
Gate 2 closes through `V44EconomicDomainModel` in
188+
`packages/protocol/src/canonical/v44-economic-domain-model.js`, deterministic
189+
`.bitcode/v44-economic-domain-model.json`, `generate:v44-economic-domain-model`,
190+
`check:v44-economic-domain-model`, and `check:v44-gate2`. The artifact names
191+
EnterprisePackPortfolio, PackPortfolioPosition, PackMarketSignal,
192+
ReadDemandSignal, UnfitNeedSignal, DepositSupplyOpportunity,
193+
ReadingBudgetPolicy, AssetPackQuotePolicy, ProcurementApprovalReceipt,
194+
DepositorEarningStatement, ContributorCompensationStatement,
195+
PackEconomicStatement, OrganizationPackPolicy, PackGovernanceDecision,
196+
ScaledNetworkRehearsalReceipt, and PortfolioRepairCase as source-safe economic
197+
objects. The receipt taxonomy names portfolio-position, market-signal,
198+
quote-state, settlement-state, compensation-statement, governance-decision,
199+
repair-case, budget-policy, supply-opportunity, and network-rehearsal. It does
200+
not expose protected source, unpaid AssetPack source, raw prompts, provider
201+
payloads, credentials, wallet private material, private settlement payloads, or
202+
value-bearing mainnet operation.
203+
187204
## V44 Gate 3 Packs Portfolio Search And Market Intelligence
188205

189206
Gate 3 must evolve `/packs` from activity master-detail into portfolio and
@@ -561,7 +578,7 @@ quality, accessibility, visual inspectability, and generated quality evidence.
561578
| `.bitcode/v44-spec-family-report.json` | aggregate proof verdict | draft-required |
562579
| `.bitcode/v44-canonical-input-report.json` | generated artifact inventories | draft-required |
563580
| `.bitcode/v44-canon-posture-drift-report.json` | active/draft posture | draft-required |
564-
| `.bitcode/v44-economic-domain-model.json` | economic domain model | planned |
581+
| `.bitcode/v44-economic-domain-model.json` | economic domain model | implemented-source-safe |
565582
| `.bitcode/v44-packs-portfolio-market-intelligence.json` | Packs portfolio and market intelligence | planned |
566583
| `.bitcode/v44-reading-budget-quote-policy.json` | Reading budget and quote policy | planned |
567584
| `.bitcode/v44-depositor-earnings-supply-opportunities.json` | depositor earnings and supply opportunities | planned |
@@ -629,7 +646,10 @@ explicit later launch authority, or economic receipts cannot reconcile.
629646

630647
## V44 validation canon
631648

632-
Gate 1 validates with `pnpm run check:v44-gate1`,
649+
Gate 1 validates with `pnpm run check:v44-gate1`. Gate 2 validates with
650+
`pnpm run generate:v44-economic-domain-model`,
651+
`pnpm run check:v44-economic-domain-model`, and `pnpm run check:v44-gate2`.
652+
Shared draft posture validates with
633653
`node scripts/check-bitcode-spec-family.mjs --version V44 --mode draft --current-target V43`,
634654
`node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V43 --draft-target V44`,
635655
and `git diff --check`.
@@ -700,7 +720,7 @@ Inherited.
700720
| `.bitcode/v44-spec-family-report.json` | aggregate proof verdict | draft-required |
701721
| `.bitcode/v44-canonical-input-report.json` | exact generated-artifact inventory | draft-required |
702722
| `.bitcode/v44-canon-posture-drift-report.json` | active/draft posture | draft-required |
703-
| `.bitcode/v44-economic-domain-model.json` | economic domain model | planned |
723+
| `.bitcode/v44-economic-domain-model.json` | economic domain model | implemented-source-safe |
704724
| `.bitcode/v44-packs-portfolio-market-intelligence.json` | portfolio and market intelligence | planned |
705725
| `.bitcode/v44-reading-budget-quote-policy.json` | budget and quote policy | planned |
706726
| `.bitcode/v44-depositor-earnings-supply-opportunities.json` | depositor earning opportunity | planned |
@@ -715,6 +735,7 @@ Inherited.
715735
`.bitcode/v44-spec-family-report.json`,
716736
`.bitcode/v44-canonical-input-report.json`, and
717737
`.bitcode/v44-canon-posture-drift-report.json` are the opening artifacts.
738+
Gate 2 adds deterministic `.bitcode/v44-economic-domain-model.json`.
718739

719740
### Shared generated-artifact fields
720741

BITCODE_SPEC_V44_DELTA.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
## Status
44

55
- Version: `V44`
6-
- V44 state: draft opened for scaled engineering economy and tokenized AssetPack network work over promoted V43
6+
- V44 state: draft Gate 2 economic domain model work over promoted V43
77
- Current canonical/latest target: `V43`
88
- Prior canonical anchor: `BITCODE_SPEC_V43.md`
99
- Prior generated proof appendix: `BITCODE_SPEC_V43_PROVEN.md`
10-
- Generated structured artifact inventory: no V44 generated artifacts are canonical at Gate 1; later gates must create source-safe `.bitcode/v44-*` artifacts
11-
- Source parity state: Gate 1 aligns specification, roadmap, docs, workflow, package script, and checker posture only
10+
- Generated structured artifact inventory: Gate 2 adds deterministic `.bitcode/v44-economic-domain-model.json`
11+
- Source parity state: Gate 2 binds package-backed economic object contracts, receipt taxonomy, docs, workflow, package script, checker, and protocol tests
1212
- Notes companion: `BITCODE_SPEC_V44_NOTES.md`
1313
- Delta companion: `BITCODE_SPEC_V44_DELTA.md`
1414
- Parity companion: `BITCODE_SPEC_V44_PARITY_MATRIX.md`
@@ -32,6 +32,9 @@ settlements, contributors, compensation statements, and repair states.
3232
settlement, contributor allocation, delivery, or repair state.
3333
- Keep source-safety stronger than UX convenience.
3434
- Keep value-bearing mainnet blocked until a later explicit launch version.
35+
- Bind Gate 2 economic contracts in package code before route/API/UI surfaces
36+
consume portfolio, quote, settlement, compensation, governance, or repair
37+
objects.
3538

3639
## V44 gate plan
3740

@@ -53,6 +56,11 @@ APIs, budget policy engines, compensation statement materialization, governance
5356
runtime enforcement, scaled rehearsal scripts, and V44 promotion workflow until
5457
their owning gates.
5558

59+
V44 Gate 2 closes the source-safe economic domain model and receipt taxonomy
60+
only. It does not implement route dashboards, quote engines, settlement
61+
observation, compensation payout execution, organization wallet authority, or
62+
scaled rehearsals.
63+
5664
## Pre-Implementation Sequence
5765

5866
1. Open V44 spec family, roadmap, checker, package script, workflow posture,
@@ -70,7 +78,10 @@ their owning gates.
7078

7179
## Validation direction
7280

73-
Gate 1 validates with `pnpm run check:v44-gate1`,
81+
Gate 1 validates with `pnpm run check:v44-gate1`. Gate 2 validates with
82+
`pnpm run generate:v44-economic-domain-model`,
83+
`pnpm run check:v44-economic-domain-model`, and `pnpm run check:v44-gate2`.
84+
Shared draft posture validates with
7485
`node scripts/check-bitcode-spec-family.mjs --version V44 --mode draft --current-target V43`,
7586
`node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V43 --draft-target V44`,
7687
and `git diff --check`.

BITCODE_SPEC_V44_NOTES.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
## Status
44

55
- Version: `V44`
6-
- V44 state: draft notes opened for scaled engineering economy work over promoted V43
6+
- V44 state: draft notes include Gate 2 economic domain model work over promoted V43
77
- Current canonical/latest target: `V43`
88
- Prior canonical anchor: `BITCODE_SPEC_V43.md`
99
- Prior generated proof appendix: `BITCODE_SPEC_V43_PROVEN.md`
10-
- Generated structured artifact inventory: V44 notes bind planning language only until later generated `.bitcode/v44-*` artifacts exist
11-
- Source parity state: notes align roadmap, docs, and workflow posture for active V43 / draft V44
10+
- Generated structured artifact inventory: Gate 2 adds deterministic `.bitcode/v44-economic-domain-model.json`
11+
- Source parity state: notes align roadmap, docs, workflow posture, package source, generated artifact, and receipt taxonomy for active V43 / draft V44
1212
- Scope: V44 notes for digitizing and tokenizing scaled engineering economies through enterprise AssetPack portfolio, market intelligence, BTD/BTC accounting, governance, and compensation operation
1313
- Last fully realized canonical target preserved in source: `V43`
1414

@@ -82,3 +82,15 @@ wallet private material, or private settlement payloads.
8282
Gate 1 is intentionally a posture gate. It opens the V44 family and validates
8383
that the repo now understands V43 active / V44 draft. It must not implement
8484
later economic products under a loose roadmap commit.
85+
86+
## Gate 2 note
87+
88+
Gate 2 names the economic objects before later gates render or execute them.
89+
The package-backed receipt taxonomy distinguishes portfolio-position,
90+
market-signal, quote-state, settlement-state, compensation-statement,
91+
governance-decision, repair-case, budget-policy, supply-opportunity, and
92+
network-rehearsal receipts. Its value labels remain estimate, quote, observed
93+
payment, final settlement, contributor allocation, delivery, and repair state.
94+
This is intentionally source-safe: it carries identifiers, roots, states, and
95+
contracts, not protected source, unpaid AssetPack source, raw prompts, provider
96+
payloads, credentials, wallet private material, or private settlement payloads.

BITCODE_SPEC_V44_PARITY_MATRIX.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
## Status
44

55
- Version: `V44`
6-
- V44 state: draft parity opened for scaled engineering economy and tokenized AssetPack network work
6+
- V44 state: draft parity includes Gate 2 economic domain model work
77
- Current canonical/latest target: `V43`
88
- Prior canonical anchor: `BITCODE_SPEC_V43.md`
99
- Prior generated proof appendix: `BITCODE_SPEC_V43_PROVEN.md`
10-
- Generated structured artifact inventory: V44 parity begins as planning metadata; later gates must close generated `.bitcode/v44-*` artifacts
11-
- Source parity state: Gate 1 requires spec/docs/workflow/checker parity only
10+
- Generated structured artifact inventory: Gate 2 adds deterministic `.bitcode/v44-economic-domain-model.json`
11+
- Source parity state: Gate 2 requires package/docs/workflow/checker/test parity for the economic receipt taxonomy
1212
- Scope: parity for V44 enterprise economic operation over promoted V43 product routes
1313
- Last fully realized canonical target preserved in source: `V43`
1414

@@ -28,8 +28,8 @@ artifacts, workflow checks, and local/staging rehearsal receipts.
2828

2929
| Area | Required V44 result | Current judgment |
3030
| --- | --- | --- |
31-
| Gate 1 roadmap | V43 active / V44 draft posture, spec family, docs, workflow, package script, checker | drafted |
32-
| Economic domain model | Portfolio positions, market signals, quote states, settlement states, statements, repair cases | drafted |
31+
| Gate 1 roadmap | V43 active / V44 draft posture, spec family, docs, workflow, package script, checker | implemented |
32+
| Economic domain model | Portfolio positions, market signals, quote states, settlement states, statements, repair cases | implemented |
3333
| Packs portfolio | `/packs` portfolio search, market intelligence, saved filters, economic facets | drafted |
3434
| Reading procurement | Budget, quote policy, approval thresholds, purchase governance | drafted |
3535
| Depositor earnings | ROI, demand, compensation opportunity, supply recommendations | drafted |
@@ -43,8 +43,8 @@ artifacts, workflow checks, and local/staging rehearsal receipts.
4343

4444
| Area | Required V44 result | Current judgment |
4545
| --- | --- | --- |
46-
| Source safety | No protected source, unpaid source, raw prompts, provider payloads, credentials, wallet secrets | drafted |
47-
| Economic labels | Estimate, quote, observed payment, settlement, allocation, delivery, repair are distinct | drafted |
46+
| Source safety | No protected source, unpaid source, raw prompts, provider payloads, credentials, wallet secrets | implemented |
47+
| Economic labels | Estimate, quote, observed payment, settlement, allocation, delivery, repair are distinct | implemented |
4848
| Ledger reconciliation | Portfolio statements reconcile to receipts before finality | drafted |
4949
| Route authority | `/packs`, `/read`, `/deposit` do not bypass protocol law | drafted |
5050
| Tests and proofs | Each gate has generated artifacts, package tests, route tests, and workflow checks | drafted |

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,18 @@ local/staging-testnet rehearsal, and polished economic operation through
289289
`/packs`, `/read`, and `/deposit`. Gate 1 is specification, roadmap,
290290
documentation, workflow, and checker posture only.
291291

292+
V44 Gate 2 adds `V44EconomicDomainModel`,
293+
`.bitcode/v44-economic-domain-model.json`,
294+
`generate:v44-economic-domain-model`, `check:v44-economic-domain-model`, and
295+
`check:v44-gate2`. It defines source-safe contracts for portfolio positions,
296+
market signals, quote states, settlement states, compensation statements,
297+
governance decisions, and repair cases while keeping economic values labeled
298+
as estimate, quote, observed payment, final settlement, contributor
299+
allocation, delivery, or repair state. Gate 2 does not expose protected source,
300+
unpaid AssetPack source, raw prompts, provider payloads, credentials, wallet
301+
private material, private settlement payloads, or value-bearing mainnet
302+
operation.
303+
292304
Exchange is inherited V36 canon: market-wide activity master-detail, buy/sell/
293305
bid/ask/cancel/accept/settle/history flows, AssetPack range trading,
294306
rights-transfer review, pricing/liquidity/wrapper analysis, settlement

SPECIFICATIONS_ROADMAP.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
- Current active canonical pointer: `BITCODE_SPEC.txt` -> `V43`
66
- Current active canon: `BITCODE_SPEC_V43.md`
77
- Current draft target: `BITCODE_SPEC_V44.md`.
8-
- Current working gate: V44 Gate 1 Scaled Engineering Economy Roadmap Opening.
9-
- 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.
8+
- Current working gate: V44 Gate 2 Economic Domain Model And Receipt Taxonomy.
9+
- Next queued work after V44 Gate 2: `/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.
1010
- 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.
1111
- 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.
1212
- 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.
13+
- V44 Gate 2 closure anchor: scaled engineering economy now owns package-backed `V44EconomicDomainModel`, deterministic `.bitcode/v44-economic-domain-model.json`, source-safe object contracts for EnterprisePackPortfolio, PackPortfolioPosition, PackMarketSignal, ReadDemandSignal, UnfitNeedSignal, DepositSupplyOpportunity, ReadingBudgetPolicy, AssetPackQuotePolicy, ProcurementApprovalReceipt, DepositorEarningStatement, ContributorCompensationStatement, PackEconomicStatement, OrganizationPackPolicy, PackGovernanceDecision, ScaledNetworkRehearsalReceipt, and PortfolioRepairCase, receipt taxonomy coverage for portfolio positions, market signals, quote states, settlement states, compensation statements, governance decisions, repair cases, budget policies, supply opportunities, and network rehearsals, distinct estimate/quote/observed payment/final settlement/contributor allocation/delivery/repair labels, source-safe forbidden payload checks, package exports, protocol tests, workflow wiring, and `check:v44-gate2`.
1314
- 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.
1415
- 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.
1516
- 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.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,9 @@
359359
"check:v43-promotion-readiness": "node scripts/generate-v43-promotion-readiness-report.mjs --check",
360360
"check:v43-gate10": "node scripts/check-v43-gate10-promotion-readiness.mjs",
361361
"check:v44-gate1": "node scripts/check-v44-gate1-scaled-economy-roadmap-opening.mjs",
362+
"generate:v44-economic-domain-model": "node scripts/generate-v44-economic-domain-model.mjs",
363+
"check:v44-economic-domain-model": "node scripts/generate-v44-economic-domain-model.mjs --check",
364+
"check:v44-gate2": "node scripts/check-v44-gate2-economic-domain-model.mjs",
362365
"generate:v38-inference-surface-inventory": "node scripts/generate-v38-inference-surface-inventory.mjs",
363366
"check:v38-inference-surface-inventory": "node scripts/generate-v38-inference-surface-inventory.mjs --check",
364367
"check:v38-gate2": "node scripts/check-v38-gate2-inference-surface-inventory.mjs",

0 commit comments

Comments
 (0)