Skip to content

Commit 0a4f52b

Browse files
Merge pull request #116 from engineeredsoftware/v37/gate-6-conversation-terminal-handoff
V37 Gate 6: Conversation Terminal Handoff
2 parents 5c4e93e + 138e868 commit 0a4f52b

28 files changed

Lines changed: 3714 additions & 41 deletions

.bitcode/v37-conversation-terminal-handoff.json

Lines changed: 1860 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
@@ -121,6 +121,9 @@ jobs:
121121
if [ -f scripts/check-v37-gate5-conversation-source-selector.mjs ]; then
122122
node scripts/check-v37-gate5-conversation-source-selector.mjs --skip-branch-check
123123
fi
124+
if [ -f scripts/check-v37-gate6-conversation-terminal-handoff.mjs ]; then
125+
node scripts/check-v37-gate6-conversation-terminal-handoff.mjs --skip-branch-check
126+
fi
124127
fi
125128
else
126129
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@ jobs:
250250
if [ -f scripts/check-v37-gate5-conversation-source-selector.mjs ]; then
251251
node scripts/check-v37-gate5-conversation-source-selector.mjs --skip-branch-check
252252
fi
253+
if [ -f scripts/check-v37-gate6-conversation-terminal-handoff.mjs ]; then
254+
node scripts/check-v37-gate6-conversation-terminal-handoff.mjs --skip-branch-check
255+
fi
253256
fi
254257
else
255258
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
@@ -339,6 +342,7 @@ jobs:
339342
tests/api/conversationSessionRouteHistoryContract.test.ts \
340343
tests/api/conversationStreamEventContract.test.ts \
341344
tests/conversationStreamPipelineLog.test.tsx \
345+
tests/conversationTerminalHandoff.test.tsx \
342346
tests/conversationSourceSelector.test.tsx \
343347
tests/conversationWritingWorkspace.test.tsx \
344348
tests/auxillariesExternalsPane.test.tsx \

BITCODE_SPEC_V37.md

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

55
- Version: `V37`
6-
- V37 state: draft implementation; Gate 5 closes ConversationSourceSelector source selection and context policy over active V36 Exchange canon
6+
- V37 state: draft implementation; Gate 6 closes ConversationTerminalHandoff transaction handoff over active V36 Exchange canon
77
- Current canonical/latest target: `V36`
88
- Prior canonical anchor: `BITCODE_SPEC_V36.md`
99
- Prior generated proof appendix: `BITCODE_SPEC_V36_PROVEN.md`
10-
- Generated structured artifact inventory: draft `.bitcode/v37-spec-family-report.json`, `.bitcode/v37-canonical-input-report.json`, `.bitcode/v37-canon-posture-drift-report.json`, `.bitcode/v37-conversation-session-route-history.json`, `.bitcode/v37-conversation-stream-event-contract.json`, `.bitcode/v37-conversation-writing-workspace.json`, and `.bitcode/v37-conversation-source-selector.json`
11-
- Source parity state: V37 source parity includes Gate 1 spec family, roadmap, docs, workflow, and checker posture, Gate 2 package-owned ConversationSession route-history contracts, Gate 3 package-owned ConversationStreamEvent stream UI/event contracts, Gate 4 package-owned ConversationWritingWorkspace fullscreen writing contracts, and Gate 5 package-owned ConversationSourceSelector source/context policy contracts
10+
- Generated structured artifact inventory: draft `.bitcode/v37-spec-family-report.json`, `.bitcode/v37-canonical-input-report.json`, `.bitcode/v37-canon-posture-drift-report.json`, `.bitcode/v37-conversation-session-route-history.json`, `.bitcode/v37-conversation-stream-event-contract.json`, `.bitcode/v37-conversation-writing-workspace.json`, `.bitcode/v37-conversation-source-selector.json`, and `.bitcode/v37-conversation-terminal-handoff.json`
11+
- Source parity state: V37 source parity includes Gate 1 spec family, roadmap, docs, workflow, and checker posture, Gate 2 package-owned ConversationSession route-history contracts, Gate 3 package-owned ConversationStreamEvent stream UI/event contracts, Gate 4 package-owned ConversationWritingWorkspace fullscreen writing contracts, Gate 5 package-owned ConversationSourceSelector source/context policy contracts, and Gate 6 package-owned ConversationTerminalHandoff transaction handoff contracts
1212
- Active canonical pointer during draft opening: `BITCODE_SPEC.txt` -> `V36`
1313
- Notes companion: `BITCODE_SPEC_V37_NOTES.md`
1414
- Delta companion: `BITCODE_SPEC_V37_DELTA.md`
@@ -158,6 +158,37 @@ package tests, UI tests, docs, workflow wiring, selector kind coverage,
158158
governance coverage, allowed/denied/retry preview states, rights and
159159
settlement posture, proof roots, event ids, and source-safe preview metadata.
160160

161+
## V37 Gate 6 ConversationTerminalHandoff canon
162+
163+
Gate 6 implements `ConversationTerminalHandoff` as the package-owned
164+
transaction handoff contract from Website Conversations into the Bitcode
165+
Terminal. It owns source-safe handoff envelopes for Depositing, Reading,
166+
Finding Fits, Exchange, settlement, and delivery workflows. It emits
167+
`.bitcode/v37-conversation-terminal-handoff.json` with
168+
`source-safe-conversation-terminal-handoff-metadata`, deterministic row roots,
169+
deterministic detail roots, workflow ids, field ids, authority boundary ids,
170+
policy states, proof roots, event ids, source evidence roots, and source-safe
171+
disclosure limits.
172+
173+
Conversation handoff is not execution. Conversations may prepare source-safe
174+
transaction intent, preserve a route-local conversation id, selected
175+
transaction id, repository anchor, source selector summaries, a user-readable
176+
summary, policy result, proof root, and Terminal detail focus. The Terminal
177+
remains the transaction cockpit and the only website surface that may proceed
178+
into ledger, wallet, settlement, Exchange, delivery, and BTD ownership actions.
179+
Conversation handoff payloads must not expose protected source, raw protected
180+
prompts, protected model responses with source, provider tokens, wallet
181+
private material, settlement private payloads, unpaid AssetPack source, ledger
182+
write authority, wallet signing authority, or a Terminal authority bypass.
183+
184+
The Terminal route reads `conversationHandoff=1` context as source-safe
185+
operator context. It may display the workflow, policy state, proof root,
186+
repository anchor, source selector count, and handoff summary before the
187+
operator chooses any Terminal action. `check:v37-gate6` validates package
188+
source, generated artifact freshness, package tests, UI tests, Terminal route
189+
tests, docs, workflow wiring, workflow coverage, authority boundaries,
190+
proof roots, event ids, and source-safe handoff metadata.
191+
161192
## Inherited V36 Exchange canon
162193

163194
The promoted V36 sections below remain inherited canonical law for Exchange.

BITCODE_SPEC_V37_DELTA.md

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

55
- Version: `V37`
6-
- V37 state: draft implementation; this delta records the V36-to-V37 Website Conversations opening through Gate 4 ConversationWritingWorkspace fullscreen writing contracts
6+
- V37 state: draft implementation; this delta records the V36-to-V37 Website Conversations opening through Gate 6 ConversationTerminalHandoff transaction handoff contracts
77
- Current canonical/latest target: `V36`
88
- Prior canonical anchor: `BITCODE_SPEC_V36.md`
99
- Prior generated proof appendix: `BITCODE_SPEC_V36_PROVEN.md`
10-
- Generated structured artifact inventory: draft `.bitcode/v37-spec-family-report.json`, `.bitcode/v37-canonical-input-report.json`, `.bitcode/v37-canon-posture-drift-report.json`, `.bitcode/v37-conversation-session-route-history.json`, `.bitcode/v37-conversation-stream-event-contract.json`, and `.bitcode/v37-conversation-writing-workspace.json`
11-
- Source parity state: V37 source parity begins at Gate 1 with spec family, roadmap, docs, workflow, and checker posture; Gate 2 adds package-owned ConversationSession route-history contracts; Gate 3 adds package-owned ConversationStreamEvent contracts and stream UI binding; Gate 4 adds package-owned ConversationWritingWorkspace fullscreen composer contracts
10+
- Generated structured artifact inventory: draft `.bitcode/v37-spec-family-report.json`, `.bitcode/v37-canonical-input-report.json`, `.bitcode/v37-canon-posture-drift-report.json`, `.bitcode/v37-conversation-session-route-history.json`, `.bitcode/v37-conversation-stream-event-contract.json`, `.bitcode/v37-conversation-writing-workspace.json`, `.bitcode/v37-conversation-source-selector.json`, and `.bitcode/v37-conversation-terminal-handoff.json`
11+
- Source parity state: V37 source parity begins at Gate 1 with spec family, roadmap, docs, workflow, and checker posture; Gate 2 adds package-owned ConversationSession route-history contracts; Gate 3 adds package-owned ConversationStreamEvent contracts and stream UI binding; Gate 4 adds package-owned ConversationWritingWorkspace fullscreen composer contracts; Gate 5 adds package-owned ConversationSourceSelector context policy; Gate 6 adds package-owned ConversationTerminalHandoff transaction handoff contracts
1212
- Spec companion: `BITCODE_SPEC_V37.md`
1313
- Notes companion: `BITCODE_SPEC_V37_NOTES.md`
1414
- Parity companion: `BITCODE_SPEC_V37_PARITY_MATRIX.md`
@@ -148,6 +148,13 @@ Closure acceptance:
148148
- handoff routes preserve transaction ids, repository anchors, source selectors, user-readable summary, policy result, and proof roots;
149149
- `pnpm run check:v37-gate6` validates handoff contracts, route tests, Terminal integration tests, docs, telemetry, and workflow wiring.
150150

151+
Gate 6 closure adds package-backed `ConversationTerminalHandoff` source,
152+
`.bitcode/v37-conversation-terminal-handoff.json`,
153+
`source-safe-conversation-terminal-handoff-metadata`, Depositing, Reading,
154+
Finding Fits, Exchange, settlement, and delivery handoff workflow rows,
155+
Terminal route context parsing, source-safe handoff UI binding, package tests,
156+
UI tests, Terminal route tests, workflow wiring, and `check:v37-gate6`.
157+
151158
### Gate 7: Conversation Persistence Privacy And Redaction
152159

153160
Gate 7 defines durable storage and privacy controls.

BITCODE_SPEC_V37_NOTES.md

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

55
- Version: `V37`
6-
- V37 state: draft implementation; Gate 4 closes ConversationWritingWorkspace fullscreen writing mode and composer workspace over active V36 Exchange canon
6+
- V37 state: draft implementation; Gate 6 closes ConversationTerminalHandoff transaction handoff over active V36 Exchange canon
77
- Current canonical/latest target: `V36`
88
- Current active draft target: `V37`
99
- Prior canonical anchor: `BITCODE_SPEC_V36.md`
1010
- Prior generated proof appendix: `BITCODE_SPEC_V36_PROVEN.md`
11-
- Generated structured artifact inventory: draft `.bitcode/v37-spec-family-report.json`, `.bitcode/v37-canonical-input-report.json`, `.bitcode/v37-canon-posture-drift-report.json`, `.bitcode/v37-conversation-session-route-history.json`, `.bitcode/v37-conversation-stream-event-contract.json`, and `.bitcode/v37-conversation-writing-workspace.json`
12-
- Source parity state: V37 source parity begins at Gate 1 with spec family, roadmap, docs, workflow, and checker posture; Gate 2 adds package-owned ConversationSession route-history contracts; Gate 3 adds package-owned ConversationStreamEvent stream contracts; Gate 4 adds package-owned ConversationWritingWorkspace fullscreen composer contracts
11+
- Generated structured artifact inventory: draft `.bitcode/v37-spec-family-report.json`, `.bitcode/v37-canonical-input-report.json`, `.bitcode/v37-canon-posture-drift-report.json`, `.bitcode/v37-conversation-session-route-history.json`, `.bitcode/v37-conversation-stream-event-contract.json`, `.bitcode/v37-conversation-writing-workspace.json`, `.bitcode/v37-conversation-source-selector.json`, and `.bitcode/v37-conversation-terminal-handoff.json`
12+
- Source parity state: V37 source parity begins at Gate 1 with spec family, roadmap, docs, workflow, and checker posture; Gate 2 adds package-owned ConversationSession route-history contracts; Gate 3 adds package-owned ConversationStreamEvent stream contracts; Gate 4 adds package-owned ConversationWritingWorkspace fullscreen composer contracts; Gate 5 adds package-owned ConversationSourceSelector context policy; Gate 6 adds package-owned ConversationTerminalHandoff transaction handoff contracts
1313
- Scope: draft notes for website Conversations work after V36 Exchange depth and after the V28 ChatGPT App MVP proved the interface path.
1414

1515
This NOTES file does not promote V37. It is binding draft guidance while V37 gates are in flight.
@@ -103,6 +103,25 @@ source, unpaid AssetPack source, private BTD material, wallet private material,
103103
provider tokens, protected prompts/responses, settlement private payloads, and
104104
global ledger authority claims remain outside Conversations.
105105

106+
## Gate 6 implementation notes
107+
108+
ConversationTerminalHandoff contracts are source-safe transaction-intent
109+
contracts, not Terminal execution, ledger writes, or wallet signing. Gate 6
110+
adds `.bitcode/v37-conversation-terminal-handoff.json`,
111+
`buildConversationTerminalHandoff`, the route-facing handoff helper, the
112+
handoff component, Terminal route context parsing, package tests, UI tests,
113+
Terminal route tests, and `check:v37-gate6`.
114+
115+
The required workflows are Depositing, Reading, Finding Fits, Exchange,
116+
settlement, and delivery. Handoff envelopes may carry conversation id,
117+
transaction id, repository anchor, source selector summaries, a source-safe
118+
summary, policy result, Terminal route, transaction detail, proof root, and
119+
event id. They must not carry protected source, raw protected prompts,
120+
protected model responses with source, provider tokens, wallet private
121+
material, settlement private payloads, unpaid AssetPack source, ledger write
122+
authority, wallet signing authority, or a Terminal authority bypass. The
123+
Terminal remains the transaction cockpit.
124+
106125
## V37 gate plan
107126

108127
- Gate 1: V37 Conversations Roadmap And Spec Opening

0 commit comments

Comments
 (0)