Skip to content

Commit 4cd5808

Browse files
V38 Gate 9: Close conversation tool-prompt parity
Route quick-response Conversation through the same PTRR/Failsafe/Thricified stack as the comprehensive variation, removing the single-step bypass. Add the package-backed V38ConversationToolPromptInferenceParity artifact, generator, checker, protocol tests, generated evidence, docs, roadmap updates, and workflow wiring. Validation: pnpm run check:v38-gate9; pnpm run check:v38-gate2; pnpm run check:v38-gate4; pnpm --filter @bitcode/api build; pnpm --filter @bitcode/protocol typecheck; pnpm --dir packages/chatgptapp exec tsc --noEmit --pretty false; bash scripts/check-import-casing.sh; bash scripts/find-uppercase-raw-promptparts.sh; git diff --check.
1 parent e4e0113 commit 4cd5808

22 files changed

Lines changed: 1461 additions & 42 deletions

.bitcode/v38-conversation-tool-prompt-inference-parity.json

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

.bitcode/v38-inference-surface-inventory.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,7 @@
352352
"conversation.tool_call",
353353
"conversation.completion_decision"
354354
],
355-
"knownGapIds": [
356-
"quick-response-single-step-is-inventoried-for-v38-gate9-repair"
357-
],
355+
"knownGapIds": [],
358356
"providerCallCount": 36,
359357
"primitiveStack": [
360358
"PipelineExecution",
@@ -1206,8 +1204,7 @@
12061204
],
12071205
"knownGapIds": [
12081206
"gate3-validates-ptrr-failsafe-thricified-call-stack-against-this-inventory",
1209-
"initial-benchmark-suite-completion-owned-by-v38-gate4",
1210-
"quick-response-single-step-is-inventoried-for-v38-gate9-repair"
1207+
"initial-benchmark-suite-completion-owned-by-v38-gate4"
12111208
],
12121209
"readingPipelinesCovered": true,
12131210
"conversationSurfacesCovered": true,

.bitcode/v38-prompt-benchmark-report.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,8 +1881,7 @@
18811881
"knownCarryForwardGapIds": [
18821882
"gate5-streams-benchmark-linked-inference-telemetry-with-disclosure-tiers",
18831883
"gate6-hardens-read-need-comprehension-prompt-return-types",
1884-
"gate7-hardens-read-fits-finding-query-prompt-benchmarking",
1885-
"gate9-applies-benchmark-report-to-conversation-tool-prompt-parity"
1884+
"gate7-hardens-read-fits-finding-query-prompt-benchmarking"
18861885
]
18871886
},
18881887
"failures": [],

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ jobs:
166166
if [ -f scripts/check-v38-gate8-assetpack-synthesis-economic-traceability.mjs ]; then
167167
node scripts/check-v38-gate8-assetpack-synthesis-economic-traceability.mjs --skip-branch-check --skip-package-tests # check:v38-gate8
168168
fi
169+
if [ -f scripts/check-v38-gate9-conversation-tool-prompt-inference-parity.mjs ]; then
170+
node scripts/check-v38-gate9-conversation-tool-prompt-inference-parity.mjs --skip-branch-check --skip-package-tests # check:v38-gate9
171+
fi
169172
fi
170173
else
171174
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
@@ -295,6 +295,9 @@ jobs:
295295
if [ -f scripts/check-v38-gate8-assetpack-synthesis-economic-traceability.mjs ]; then
296296
node scripts/check-v38-gate8-assetpack-synthesis-economic-traceability.mjs --skip-branch-check --skip-package-tests # check:v38-gate8
297297
fi
298+
if [ -f scripts/check-v38-gate9-conversation-tool-prompt-inference-parity.mjs ]; then
299+
node scripts/check-v38-gate9-conversation-tool-prompt-inference-parity.mjs --skip-branch-check --skip-package-tests # check:v38-gate9
300+
fi
298301
fi
299302
else
300303
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
@@ -396,6 +399,9 @@ jobs:
396399
if [ -f packages/protocol/test/v38-assetpack-synthesis-economic-traceability.test.js ]; then
397400
pnpm --dir packages/protocol exec node --test --test-force-exit test/v38-assetpack-synthesis-economic-traceability.test.js
398401
fi
402+
if [ -f packages/protocol/test/v38-conversation-tool-prompt-inference-parity.test.js ]; then
403+
pnpm --dir packages/protocol exec node --test --test-force-exit test/v38-conversation-tool-prompt-inference-parity.test.js
404+
fi
399405
pnpm --filter @bitcode/protocol test
400406
401407
- name: Test staged Reading route and Terminal harness contracts

BITCODE_SPEC_V38.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- Prior canonical anchor: `BITCODE_SPEC_V37.md`
99
- Prior generated proof appendix: `BITCODE_SPEC_V37_PROVEN.md`
1010
- Active canonical pointer during draft opening: `BITCODE_SPEC.txt` -> `V37`
11-
- Generated structured artifact inventory: draft `.bitcode/v38-spec-family-report.json`, `.bitcode/v38-canonical-input-report.json`, `.bitcode/v38-canon-posture-drift-report.json`, `.bitcode/v38-inference-surface-inventory.json`, `.bitcode/v38-ptrr-failsafe-thricified-stack.json`, `.bitcode/v38-prompt-benchmark-report.json`, `.bitcode/v38-disclosure-boundary-report.json`, `.bitcode/v38-read-need-comprehension-inference-hardening.json`, `.bitcode/v38-read-fits-finding-search-embeddings.json`, `.bitcode/v38-assetpack-synthesis-economic-traceability.json`, V38 gate-quality workflow evidence, and future V38 generated proof artifacts as gates close
11+
- Generated structured artifact inventory: draft `.bitcode/v38-spec-family-report.json`, `.bitcode/v38-canonical-input-report.json`, `.bitcode/v38-canon-posture-drift-report.json`, `.bitcode/v38-inference-surface-inventory.json`, `.bitcode/v38-ptrr-failsafe-thricified-stack.json`, `.bitcode/v38-prompt-benchmark-report.json`, `.bitcode/v38-disclosure-boundary-report.json`, `.bitcode/v38-read-need-comprehension-inference-hardening.json`, `.bitcode/v38-read-fits-finding-search-embeddings.json`, `.bitcode/v38-assetpack-synthesis-economic-traceability.json`, `.bitcode/v38-conversation-tool-prompt-inference-parity.json`, V38 gate-quality workflow evidence, and future V38 generated proof artifacts as gates close
1212
- Source parity state: V38 source-side inference stack, prompt benchmarking, Reading pipeline, depository-search, telemetry, rehearsal, workflow, and promotion surfaces are draft-required until their gates close
1313
- Notes companion: `BITCODE_SPEC_V38_NOTES.md`
1414
- Delta companion: `BITCODE_SPEC_V38_DELTA.md`
@@ -128,6 +128,8 @@ The artifact has `source-safe-assetpack-synthesis-economic-traceability-metadata
128128

129129
Gate 9 brings Website Conversations, tool-definition prompts, and interface-specific inference entrypoints to the same registry, Failsafe, Thricified, tool prompt, telemetry, and disclosure posture as Reading.
130130
Conversation inference must reuse the inference primitives without becoming a parallel Protocol authority.
131+
Gate 9 is closed by the package-backed `V38ConversationToolPromptInferenceParity` source, deterministic `.bitcode/v38-conversation-tool-prompt-inference-parity.json` artifact, Conversation stream/telemetry tests, Terminal execution-log rendering test, ChatGPT App tool prompt/admission tests, generator, checker, and workflow wiring.
132+
The artifact has `source-safe-conversation-tool-prompt-inference-parity-metadata` disclosure posture and records 8 parity rows, 34 source predicates, PTRR coverage for comprehensive and quick-response Conversation variations, prompt registry and step prompt coverage, typed output schemas, source-safe stream telemetry, rich execution-log UI projection, DocCodeToolPrompt formatting, ToolPromptRegistry hierarchy, ChatGPT App doc-code prompt carriers, and interface entrypoint no-bypass posture without exposing protected source, raw prompt text, raw provider response content, unpaid AssetPack source, credentials, wallet private material, private settlement payloads, or global ledger authority.
131133

132134
### Gate 10: Local Staging Inference And Depository Search Rehearsal
133135

@@ -481,14 +483,14 @@ Inherited V20 operator-quality artifacts remain the baseline for operator-visibl
481483

482484
### Exact generated-artifact inventory matrix
483485

484-
Exact generated-artifact inventory matrix includes `.bitcode/v38-spec-family-report.json`, `.bitcode/v38-canonical-input-report.json`, `.bitcode/v38-canon-posture-drift-report.json`, `.bitcode/v38-inference-surface-inventory.json`, `.bitcode/v38-ptrr-failsafe-thricified-stack.json`, `.bitcode/v38-prompt-benchmark-report.json`, `.bitcode/v38-disclosure-boundary-report.json`, `.bitcode/v38-read-need-comprehension-inference-hardening.json`, and later `.bitcode/v38-*` gate artifacts.
486+
Exact generated-artifact inventory matrix includes `.bitcode/v38-spec-family-report.json`, `.bitcode/v38-canonical-input-report.json`, `.bitcode/v38-canon-posture-drift-report.json`, `.bitcode/v38-inference-surface-inventory.json`, `.bitcode/v38-ptrr-failsafe-thricified-stack.json`, `.bitcode/v38-prompt-benchmark-report.json`, `.bitcode/v38-disclosure-boundary-report.json`, `.bitcode/v38-read-need-comprehension-inference-hardening.json`, `.bitcode/v38-read-fits-finding-search-embeddings.json`, `.bitcode/v38-assetpack-synthesis-economic-traceability.json`, `.bitcode/v38-conversation-tool-prompt-inference-parity.json`, and later `.bitcode/v38-*` gate artifacts.
485487

486488
### V38InferenceSurfaceInventory
487489

488490
`V38InferenceSurfaceInventory` is the Gate 2 source-safe inference surface inventory.
489491
It is owned by `packages/protocol/src/canonical/inference-surface-inventory.js`, exported by `packages/protocol/src/index.js`, type-declared by `packages/protocol/src/index.d.ts`, tested by `packages/protocol/test/v38-inference-surface-inventory.test.js`, generated by `scripts/generate-v38-inference-surface-inventory.mjs`, checked by `scripts/check-v38-gate2-inference-surface-inventory.mjs`, and serialized to `.bitcode/v38-inference-surface-inventory.json`.
490492
It records the current active Reading and Conversation inference surface map as source-safe metadata: `ReadNeedComprehensionSynthesis`, `ReadFitsFindingSynthesis`, Website Conversation inference, stream-event interface entrypoints, doc-comment-backed tool prompt definitions, prompt registry and benchmark coverage, and the execution primitive stack.
491-
Its current count contract is 52 PTRR steps across 156 FailsafeGenerationSequence / ThricifiedGeneration chains and 468 provider-call slots, with known V38 repair gaps explicitly carried forward to later gates instead of hidden.
493+
Its current count contract is 52 PTRR steps across 156 FailsafeGenerationSequence / ThricifiedGeneration chains and 468 provider-call slots. Gate 9 removes the quick-response Conversation single-step repair marker by routing that variation through the same PTRR/Failsafe/Thricified stack while preserving the inventory row as source-safe metadata.
492494

493495
### V38PtrrFailsafeThricifiedStack
494496

@@ -501,6 +503,13 @@ Its current source-predicate contract is 69/69 passed predicates, 9 rows, 52 PTR
501503

502504
V38 specifying generated artifacts include inference inventory, prompt benchmark, telemetry disclosure, depository search, AssetPack handoff, rehearsal, and promotion readiness reports.
503505

506+
### V38ConversationToolPromptInferenceParity
507+
508+
`V38ConversationToolPromptInferenceParity` is the Gate 9 source-safe Conversation and tool-definition prompt parity contract.
509+
It is owned by `packages/protocol/src/canonical/conversation-tool-prompt-inference-parity.js`, exported by `packages/protocol/src/index.js`, type-declared by `packages/protocol/src/index.d.ts`, tested by `packages/protocol/test/v38-conversation-tool-prompt-inference-parity.test.js`, generated by `scripts/generate-v38-conversation-tool-prompt-inference-parity.mjs`, checked by `scripts/check-v38-gate9-conversation-tool-prompt-inference-parity.mjs`, and serialized to `.bitcode/v38-conversation-tool-prompt-inference-parity.json`.
510+
It records `source-safe-conversation-tool-prompt-inference-parity-metadata`: comprehensive and quick-response Conversation PTRR variations, Conversation agent and step prompt registries, typed output schemas, stream events, telemetry proof hooks, execution-log rendering, DocCodeToolPrompt formatting, ToolPromptRegistry hierarchy, ChatGPT App doc-code prompt carriers, read-access and organization-authority checks, and interface entrypoint no-bypass posture.
511+
Its current source-predicate contract is 34/34 passed predicates, 8 rows, upstream roots from V38 Gates 2, 4, and 5, and no protected source, raw prompt text, raw provider response content, unpaid AssetPack source, credentials, wallet private material, private settlement payloads, global ledger authority claim, or `_legacy/` source roots.
512+
504513
### V38InferenceTelemetryDisclosureReport
505514

506515
`V38InferenceTelemetryDisclosureReport` is the Gate 5 source-safe inference telemetry and disclosure tier contract.

BITCODE_SPEC_V38_DELTA.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- Current canonical/latest target: `V37`
88
- Prior canonical anchor: `BITCODE_SPEC_V37.md`
99
- Prior generated proof appendix: `BITCODE_SPEC_V37_PROVEN.md`
10-
- Generated structured artifact inventory: draft `.bitcode/v38-spec-family-report.json`, `.bitcode/v38-canonical-input-report.json`, `.bitcode/v38-canon-posture-drift-report.json`, `.bitcode/v38-inference-surface-inventory.json`, `.bitcode/v38-ptrr-failsafe-thricified-stack.json`, `.bitcode/v38-prompt-benchmark-report.json`, `.bitcode/v38-disclosure-boundary-report.json`, `.bitcode/v38-read-need-comprehension-inference-hardening.json`, `.bitcode/v38-read-fits-finding-search-embeddings.json`, `.bitcode/v38-assetpack-synthesis-economic-traceability.json`, V38 gate-quality workflow evidence, and future V38 generated proof artifacts as gates close
10+
- Generated structured artifact inventory: draft `.bitcode/v38-spec-family-report.json`, `.bitcode/v38-canonical-input-report.json`, `.bitcode/v38-canon-posture-drift-report.json`, `.bitcode/v38-inference-surface-inventory.json`, `.bitcode/v38-ptrr-failsafe-thricified-stack.json`, `.bitcode/v38-prompt-benchmark-report.json`, `.bitcode/v38-disclosure-boundary-report.json`, `.bitcode/v38-read-need-comprehension-inference-hardening.json`, `.bitcode/v38-read-fits-finding-search-embeddings.json`, `.bitcode/v38-assetpack-synthesis-economic-traceability.json`, `.bitcode/v38-conversation-tool-prompt-inference-parity.json`, V38 gate-quality workflow evidence, and future V38 generated proof artifacts as gates close
1111
- Source parity state: V38 source-side inference stack, prompt benchmarking, Reading pipeline, depository-search, telemetry, rehearsal, workflow, and promotion surfaces are draft-required until their gates close
1212
- Spec companion: `BITCODE_SPEC_V38.md`
1313
- Notes companion: `BITCODE_SPEC_V38_NOTES.md`
@@ -174,7 +174,10 @@ Closure acceptance:
174174

175175
- Website Conversations and tool-definition prompts use V38 prompt registry, Failsafe, Thricified, tool prompt, telemetry, and disclosure posture;
176176
- interface-specific inference entrypoints do not bypass the stack;
177-
- `pnpm run check:v38-gate9` validates Conversation/tool parity, route contracts, UI surfaces, and prompt disclosure rules.
177+
- `V38ConversationToolPromptInferenceParity` is package-backed in `packages/protocol/src/canonical/conversation-tool-prompt-inference-parity.js` and generated to `.bitcode/v38-conversation-tool-prompt-inference-parity.json`;
178+
- the generated artifact is `source-safe-conversation-tool-prompt-inference-parity-metadata` and covers comprehensive and quick-response Conversation PTRR variations, prompt registries, typed output schemas, source-safe stream telemetry, rich execution-log rendering, DocCodeToolPrompt formatting, ToolPromptRegistry hierarchy, ChatGPT App doc-code prompt carriers, and interface no-bypass posture;
179+
- the current closure contract is 8 rows, 34 passed source predicates, Conversation/API/uapi/ChatGPT App tests, no protected source, raw prompt text, raw provider response content, unpaid AssetPack source, credentials, private wallet material, private settlement payload, global ledger authority claim, or `_legacy/` source roots;
180+
- `pnpm run check:v38-gate9` validates Conversation/tool parity, route contracts, UI surfaces, prompt disclosure rules, package tests, artifact freshness, and workflow wiring.
178181

179182
### Gate 10: Local Staging Inference And Depository Search Rehearsal
180183

BITCODE_SPEC_V38_NOTES.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- Current active draft target: `V38`
99
- Prior canonical anchor: `BITCODE_SPEC_V37.md`
1010
- Prior generated proof appendix: `BITCODE_SPEC_V37_PROVEN.md`
11-
- Generated structured artifact inventory: draft `.bitcode/v38-spec-family-report.json`, `.bitcode/v38-canonical-input-report.json`, `.bitcode/v38-canon-posture-drift-report.json`, `.bitcode/v38-inference-surface-inventory.json`, `.bitcode/v38-ptrr-failsafe-thricified-stack.json`, `.bitcode/v38-prompt-benchmark-report.json`, `.bitcode/v38-disclosure-boundary-report.json`, `.bitcode/v38-read-need-comprehension-inference-hardening.json`, `.bitcode/v38-read-fits-finding-search-embeddings.json`, `.bitcode/v38-assetpack-synthesis-economic-traceability.json`, V38 gate-quality workflow evidence, and future V38 generated proof artifacts as gates close
11+
- Generated structured artifact inventory: draft `.bitcode/v38-spec-family-report.json`, `.bitcode/v38-canonical-input-report.json`, `.bitcode/v38-canon-posture-drift-report.json`, `.bitcode/v38-inference-surface-inventory.json`, `.bitcode/v38-ptrr-failsafe-thricified-stack.json`, `.bitcode/v38-prompt-benchmark-report.json`, `.bitcode/v38-disclosure-boundary-report.json`, `.bitcode/v38-read-need-comprehension-inference-hardening.json`, `.bitcode/v38-read-fits-finding-search-embeddings.json`, `.bitcode/v38-assetpack-synthesis-economic-traceability.json`, `.bitcode/v38-conversation-tool-prompt-inference-parity.json`, V38 gate-quality workflow evidence, and future V38 generated proof artifacts as gates close
1212
- Source parity state: V38 source-side inference stack, prompt benchmarking, Reading pipeline, depository-search, telemetry, rehearsal, workflow, and promotion surfaces are draft-required until their gates close
1313
- Spec companion: `BITCODE_SPEC_V38.md`
1414
- Delta companion: `BITCODE_SPEC_V38_DELTA.md`
@@ -204,6 +204,14 @@ The current generated report covers 9 rows, 18 required receipt fields, BTD/Asse
204204
Before settlement, the Reader may inspect only measurements, roots, fit ids, score posture, proof posture, ownership boundary, settlement boundary, and BTC quote. Protected source, the full AssetPack patch, source-bearing manifests, and licensed read payloads remain withheld.
205205
After settlement, protected source and pull-request delivery become admissible only when BTC fee finality, BTD range, ownership/license rows, journal rows, ledger anchor, database readback, object storage, and reconciliation agree.
206206

207+
## Gate 9 implementation notes
208+
209+
Gate 9 closes Conversation and tool-prompt inference parity by binding Website Conversation variations, tool-definition prompts, interface-specific entrypoints, and ChatGPT App tool carriers to the same V38 prompt registry, PTRR/Failsafe/Thricified, telemetry, and disclosure posture used by Reading.
210+
`V38ConversationToolPromptInferenceParity` and `.bitcode/v38-conversation-tool-prompt-inference-parity.json` record comprehensive and quick-response Conversation PTRR variations, Conversation agent and Plan/Try/Refine/Retry step prompts, typed output schemas, Conversation stream events, telemetry proof hooks, rich execution-log rendering, DocCodeToolPrompt formatting, ToolPromptRegistry hierarchy, ChatGPT App doc-code prompt carriers, read-access checks, organization-authority checks, and interface no-bypass rows as `source-safe-conversation-tool-prompt-inference-parity-metadata`.
211+
Gate 9 removes the quick-response single-step repair marker from the inference inventory by routing the quick-response variation through `factoryAgentWithPTRR` with the same agent prompt, step prompt registries, and final `ConversationRetrySchema`.
212+
The prompt benchmark report no longer carries the Gate 9 Conversation/tool parity follow-up because the Gate 9 artifact binds prompt benchmark roots to source-safe Conversation/tool prompt parity evidence.
213+
The current generated report covers 8 rows, 34 source predicates, upstream V38 Gate 2 inventory root, Gate 4 prompt benchmark root, Gate 5 disclosure root, and no protected source, raw prompt text, raw provider response content, unpaid AssetPack source, credentials, wallet private material, private settlement payloads, global ledger authority claim, or `_legacy/` source roots.
214+
207215
## V38 gate plan
208216

209217
- Gate 1: V38 Inference Stack Roadmap And Spec Opening

0 commit comments

Comments
 (0)