Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
816 changes: 816 additions & 0 deletions .bitcode/v40-conversation-terminal-integration.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .github/workflows/bitcode-canon-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ jobs:
if [ -f scripts/check-v40-gate5-reading-pipeline-integration.mjs ]; then
node scripts/check-v40-gate5-reading-pipeline-integration.mjs --skip-branch-check --skip-integration-tests
fi
if [ -f scripts/check-v40-gate6-conversation-terminal-integration.mjs ]; then
node scripts/check-v40-gate6-conversation-terminal-integration.mjs --skip-branch-check --skip-integration-tests
fi
fi
else
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/bitcode-gate-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ jobs:
if [ -f scripts/check-v40-gate5-reading-pipeline-integration.mjs ]; then
node scripts/check-v40-gate5-reading-pipeline-integration.mjs --skip-branch-check --skip-integration-tests
fi
if [ -f scripts/check-v40-gate6-conversation-terminal-integration.mjs ]; then
node scripts/check-v40-gate6-conversation-terminal-integration.mjs --skip-branch-check --skip-integration-tests
fi
fi
else
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
Expand Down Expand Up @@ -487,6 +490,9 @@ jobs:
if [ -f packages/protocol/test/v39-promotion-readiness.test.js ]; then
pnpm --dir packages/protocol exec node --test --test-force-exit test/v39-promotion-readiness.test.js
fi
if [ -f packages/protocol/test/v40-conversation-terminal-integration.test.js ]; then
pnpm --dir packages/protocol exec node --test --test-force-exit test/v40-conversation-terminal-integration.test.js
fi
pnpm --filter @bitcode/protocol test

- name: Test staged Reading route and Terminal harness contracts
Expand All @@ -503,6 +509,7 @@ jobs:
tests/api/conversationSessionRouteHistoryContract.test.ts \
tests/api/conversationStreamEventContract.test.ts \
tests/conversationStreamPipelineLog.test.tsx \
tests/conversationTerminalIntegrationCoverage.test.tsx \
tests/conversationTerminalHandoff.test.tsx \
tests/api/conversationPersistencePrivacyRedaction.test.ts \
tests/conversationPersistencePrivacyPanel.test.tsx \
Expand Down
7 changes: 7 additions & 0 deletions BITCODE_SPEC_V40.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ The artifact binds the currently expected Reading topology of two pipelines, fiv
The focused integration test runs the deterministic commercial Reading spine from accepted Need synthesis through many-fit Depository search, source-safe AssetPack preview, settlement/right-transfer delivery boundary, and source-safe observability coverage.
Gate 5 permits no missing, blocked, or exempt critical Reading integration row; proof rows may include topology, command ids, fixture roots, and coverage flags, but must not include secrets, raw protected prompts, raw provider responses, protected source payloads, or unpaid AssetPack source.

## V40 Gate 6 Conversation And Terminal Integration Coverage

Gate 6 closes integration coverage for the Conversation-to-Terminal boundary without changing prompt content.
The package-owned `V40ConversationTerminalIntegration` emits `.bitcode/v40-conversation-terminal-integration.json` with eight source-safe rows: Conversation Terminal handoff route contracts, Conversation stream events projected into rich execution logs, Conversation route/API persistence and branch contracts, writing workspace/source selector handoff, Terminal Reading state handoff readback, Terminal pipeline harness log streaming, Terminal transaction-cockpit authority boundaries, and Conversation/Terminal rehearsal/docs/interface parity.
The focused UAPI integration test carries a source-safe Conversation `finding_fits` handoff into Terminal route readback, verifies the five-stage enterprise Reading state at `request-fit`, adapts a Conversation stream tool event into execution-log metadata, and projects that event through the Terminal harness stream snapshot without serializing protected source, raw prompt payload, or unpaid AssetPack source.
Gate 6 permits no missing, blocked, or exempt critical Conversation/Terminal row; proof rows may include route parameters, proof roots, event ids, telemetry posture, command ids, fixture roots, and coverage flags, but must not include secrets, protected source, raw protected prompts, raw model/provider responses, wallet private material, or unpaid AssetPack source.

## V40 canonical subsystem surfaces

### Depositing and asset supply
Expand Down
1 change: 1 addition & 0 deletions BITCODE_SPEC_V40_DELTA.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Gate 5 closes with package-backed `V40ReadingPipelineIntegrationCoverage`, deter
### Gate 6: Conversation And Terminal Integration Coverage

Close cross-surface tests for Conversation, Terminal handoff, Reading state, telemetry, and source-safe disclosure.
Gate 6 closes with package-backed `V40ConversationTerminalIntegration`, deterministic `.bitcode/v40-conversation-terminal-integration.json`, protocol exports, a focused Conversation-to-Terminal integration test, source-safe rows for handoff, stream-log projection, route/API contracts, writing/source selector handoff, Terminal Reading state, harness streaming, authority boundaries, docs/rehearsal parity, and `check:v40-gate6`.

### Gate 7: Browser E2E, Accessibility, Responsive, And Visual Proof

Expand Down
8 changes: 8 additions & 0 deletions BITCODE_SPEC_V40_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,11 @@ Its generated `.bitcode/v40-reading-pipeline-integration-coverage.json` artifact
The focused asset-pack package test runs a deterministic Reading path through accepted Need synthesis, many-fit Depository search, `worthy_fit` runtime evidence, source-safe AssetPack preview, settlement/right-transfer delivery boundary, and source-safe observability coverage.
The artifact records expected totals of two Reading pipelines, eleven phases, twelve PTRR agents, forty-eight PTRR steps, one hundred forty-four ThricifiedGeneration records, and four tool surfaces.
No missing, blocked, or exempt critical Reading integration row is allowed in the Gate 5 artifact, and prompt content rewriting remains deferred to V41.

## Gate 6 implementation notes

Gate 6 is closed by `V40ConversationTerminalIntegration`.
Its generated `.bitcode/v40-conversation-terminal-integration.json` artifact binds Conversation and Terminal integration coverage to eight source-safe rows: Terminal handoff route contracts, Conversation stream events projected into rich execution logs, route/API persistence and branch contracts, writing/source selector handoff, Terminal Reading state readback, Terminal harness log streaming, transaction-cockpit authority boundaries, and rehearsal/docs/interface parity.
The focused UAPI test executes the cross-surface path from a Conversation `finding_fits` handoff into Terminal query parsing, enterprise Reading `request-fit` state, Conversation stream tool-call log metadata, and Terminal harness stream projection.
No missing, blocked, or exempt critical Conversation/Terminal integration row is allowed in the Gate 6 artifact; Conversation may carry source-safe intent only, while Terminal remains the transaction, wallet, ledger, settlement, and delivery cockpit.
Prompt and PromptPart rewriting remains deferred to V41.
4 changes: 3 additions & 1 deletion BITCODE_SPEC_V40_PARITY_MATRIX.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ This matrix records the V40 testing surfaces that must become promotion-grade be
| Visual proof | Screenshot comparisons are deterministic and reviewable | future V40 artifacts | not yet implemented |
| API integration | Route and API contracts are parseable and source-safe | `.bitcode/v40-api-integration-contracts.json` | implemented |
| Pipeline integration | Primitive and real Reading pipeline implementations are tested | `.bitcode/v40-reading-pipeline-integration-coverage.json` | implemented |
| Conversation/Terminal integration | Conversation handoff, stream logs, Terminal Reading state, and authority boundaries are tested source-safely | `.bitcode/v40-conversation-terminal-integration.json` | implemented |
| Unit coverage | Packages, primitives, isolated implementations, and real implementations have unit coverage | `.bitcode/v40-unit-coverage-inventory.json` | implemented |
| Prompt benchmark smoke | Prompt and PromptPart benchmarks run before V41 | future V40 artifacts | not yet implemented |

Expand All @@ -46,7 +47,7 @@ This matrix records the V40 testing surfaces that must become promotion-grade be
| Gate 3 | Unit coverage closure artifact | implemented |
| Gate 4 | API/route integration artifact | implemented |
| Gate 5 | Reading pipeline integration artifact | implemented |
| Gate 6 | Conversation/Terminal integration artifact | not yet implemented |
| Gate 6 | Conversation/Terminal integration artifact | implemented |
| Gate 7 | Browser/visual/accessibility/responsive artifact | not yet implemented |
| Gate 8 | Ledger/database/storage/wallet/delivery sync artifact | not yet implemented |
| Gate 9 | Local/staging rehearsal artifact | not yet implemented |
Expand All @@ -57,6 +58,7 @@ Gate 2 implementation evidence: package-backed `V40TestInventoryCoverageMatrix`
Gate 3 implementation evidence: package-backed `V40UnitCoverageInventory` emits `.bitcode/v40-unit-coverage-inventory.json` and is wired through `check:v40-gate3`.
Gate 4 implementation evidence: package-backed `V40ApiIntegrationContracts` emits `.bitcode/v40-api-integration-contracts.json` and is wired through `check:v40-gate4`.
Gate 5 implementation evidence: package-backed `V40ReadingPipelineIntegrationCoverage` emits `.bitcode/v40-reading-pipeline-integration-coverage.json` and is wired through `check:v40-gate5`.
Gate 6 implementation evidence: package-backed `V40ConversationTerminalIntegration` emits `.bitcode/v40-conversation-terminal-integration.json` and is wired through `check:v40-gate6`.

## V40 accepted boundaries

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,13 @@ generated `.bitcode/v40-reading-pipeline-integration-coverage.json`, and
Depository search, PTRR agent wiring, AssetPack preview/settlement/delivery,
telemetry/readback, Terminal harnesses, pipeline primitives, hosts, and local
staging rehearsal linkage.
V40 Gate 6 adds the package-backed `V40ConversationTerminalIntegration`,
generated `.bitcode/v40-conversation-terminal-integration.json`, and
`check:v40-gate6` to close source-safe integration coverage for Conversation
handoff route contracts, Conversation stream-to-rich-log projection,
Conversation route/API persistence and branch contracts, writing/source
selector handoff, Terminal Reading state readback, Terminal harness log
streaming, transaction-cockpit authority boundaries, and rehearsal/docs parity.
V38 Gates 1 through 11 are wired through `pnpm run check:v38-gate1`,
`pnpm run check:v38-gate2`, `pnpm run check:v38-gate3`,
`pnpm run check:v38-gate4`, `pnpm run check:v38-gate5`,
Expand Down
5 changes: 3 additions & 2 deletions SPECIFICATIONS_ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
- Current active canonical pointer: `BITCODE_SPEC.txt` -> `V39`
- Current active canon: `BITCODE_SPEC_V39.md`
- Current draft target: `BITCODE_SPEC_V40.md`.
- Current working gate: V40 Gate 5 Reading Pipeline Integration Coverage.
- Next queued gate after V40 Gate 5 closure: V40 Gate 6 Conversation And Terminal Integration Coverage.
- Current working gate: V40 Gate 6 Conversation And Terminal Integration Coverage.
- Next queued gate after V40 Gate 6 closure: V40 Gate 7 Browser E2E, Accessibility, Responsive, And Visual Proof.
- Latest closed version: V39 Commercial Reading Readiness, which promoted Depository supply indexing, enterprise five-step Reading UX, ReadNeed review/resynthesis, ReadFitsFinding many-candidate runtime, source-safe AssetPack preview and deterministic BTC quote, settlement rights delivery, operational telemetry/repair readback, interface parity, local/staging rehearsal, and V39 promotion readiness.
- Recent V39 closure anchor: V39 canonical promotion updated `BITCODE_SPEC.txt` to `V39`, generated `BITCODE_SPEC_V39_PROVEN.md`, preserved active V39 / draft V40 runtime posture, and closed commercial Reading readiness canon.
- V39 Gate 9 closure anchor: commercial Reading readiness now owns package-backed `ReadingInterfaceProductParity`, deterministic `.bitcode/v39-interface-conversation-product-parity.json`, Terminal/Conversation/API/MCP/ChatGPT/package-consumer no-bypass rows, source-safe contract readback, BTD interface root composition, focused package/interface tests, and workflow wiring through `check:v39-gate9`.
Expand All @@ -17,6 +17,7 @@
- V40 Gate 3 closure anchor: exhaustive testing now owns package-backed `V40UnitCoverageInventory` source, deterministic `.bitcode/v40-unit-coverage-inventory.json`, twelve source-safe covered unit surfaces for protocol report builders, BTD ledger/settlement/right primitives, prompt composition, PTRR agents, registry-backed tools, execution lineage/events/metrics, generic pipeline primitives, Reading AssetPack implementation units, pipeline hosts, isolated interface helpers, utility/security packages, and demonstration boundary coverage, protocol exports, package tests, workflow wiring, and `check:v40-gate3`.
- V40 Gate 4 closure anchor: exhaustive testing now owns package-backed `V40ApiIntegrationContracts` source, deterministic `.bitcode/v40-api-integration-contracts.json`, ten source-safe covered API integration surfaces for UAPI Reading/pipeline routes, execution stream routes, Conversation routes, Auxillaries/Orbitals routes, VCS/wallet/webhook routes, public activity/template routes, package API route orchestration, package API Conversation/pipeline routes, MCP execution interface contracts, and ChatGPT App action contracts, protocol exports, package tests, workflow wiring, and `check:v40-gate4`.
- V40 Gate 5 closure anchor: exhaustive testing now owns package-backed `V40ReadingPipelineIntegrationCoverage` source, deterministic `.bitcode/v40-reading-pipeline-integration-coverage.json`, nine source-safe Reading integration surfaces for pipeline topology, ReadNeed runtime, ReadFitsFinding search runtime, PTRR agent integration, preview/settlement/delivery boundaries, telemetry/repair readback, Terminal API harness integration, primitive/host integration, and local/staging rehearsal linkage, protocol exports, package tests, workflow wiring, and `check:v40-gate5`.
- V40 Gate 6 closure anchor: exhaustive testing now owns package-backed `V40ConversationTerminalIntegration` source, deterministic `.bitcode/v40-conversation-terminal-integration.json`, eight source-safe Conversation/Terminal integration surfaces for Terminal handoff route contracts, Conversation stream-to-rich-log projection, route/API persistence and branch contracts, writing/source selector handoff, Terminal Reading state readback, Terminal harness log streaming, transaction-cockpit authority boundaries, and rehearsal/docs/interface parity, protocol exports, focused UAPI integration test, package tests, workflow wiring, and `check:v40-gate6`.
- Forward planning note: V41 should focus singularly on Prompt and PromptPart implementation quality: prompts as programs. V38's inference correctness hardening and V40's testing/benchmark depth should empower V41 to examine every raw PromptPart, every composed Prompt, every benchmark, every meaningfully benchmarkable semantic part, title, template, interpolation contract, registry binding, inference callsite, and downstream parsed return type; then repartition, retitle, rewrite, catalogue, and validate them across Reading pipelines and conversational interactions. V41 should primarily harden `ReadNeedComprehensionSynthesis` and `ReadFitsFindingSynthesis` prompt surfaces while also covering conversational and other inference prompts with the same catalogue-and-benchmark discipline.
- V34 Gate 2 closure anchor: deployment-depth now owns package-backed `DeploymentHostCapabilityCatalog` and `EnvironmentLaneContract` source, deterministic `.bitcode/v34-deployment-host-capability-catalog.json` and `.bitcode/v34-environment-lane-contracts.json`, and visible `value-bearing-mainnet` blocking through `blocked_future_canon_required`.
- V34 Gate 3 closure anchor: deployment-depth now owns package-backed `DistributedExecutionRuntimeReceipt` source, deterministic `.bitcode/v34-distributed-execution-runtime-receipts.json`, `request_response_not_required` long-running work posture, and source-safe roots for pipeline, PTRR agent, ThricifiedGeneration, tool, ledger, wallet, proof, object-storage, and repair work.
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@
"generate:v40-reading-pipeline-integration": "node scripts/generate-v40-reading-pipeline-integration-coverage.mjs",
"check:v40-reading-pipeline-integration": "node scripts/generate-v40-reading-pipeline-integration-coverage.mjs --check",
"check:v40-gate5": "node scripts/check-v40-gate5-reading-pipeline-integration.mjs",
"generate:v40-conversation-terminal-integration": "node scripts/generate-v40-conversation-terminal-integration.mjs",
"check:v40-conversation-terminal-integration": "node scripts/generate-v40-conversation-terminal-integration.mjs --check",
"check:v40-gate6": "node scripts/check-v40-gate6-conversation-terminal-integration.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",
Expand Down
10 changes: 10 additions & 0 deletions packages/protocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ the real Reading pipeline topology, Need runtime, Finding Fits search runtime,
PTRR agents, preview/settlement/delivery boundaries, telemetry/readback,
Terminal harness, generic primitives, host harnesses, and local/staging
rehearsal linkage.
V40 Gate 6 adds `V40ConversationTerminalIntegration` through
`packages/protocol/src/canonical/v40-conversation-terminal-integration.js`,
`packages/protocol/test/v40-conversation-terminal-integration.test.js`,
`.bitcode/v40-conversation-terminal-integration.json`, and
`check:v40-gate6`.
The artifact is source-safe metadata only and closes integration coverage for
Conversation handoff route contracts, Conversation stream-to-rich-log
projection, route/API persistence and branch contracts, writing/source selector
handoff, Terminal Reading state readback, Terminal harness log streaming,
transaction-cockpit authority boundaries, and rehearsal/docs/interface parity.
V39 Gate 1 is wired through `check:v39-gate1` and documents the exact
Depository supply, five-step enterprise Reading UX, ReadNeed review,
ReadFitsFinding runtime, AssetPack preview, deterministic BTC quote, BTD rights
Expand Down
Loading
Loading