- Version:
V38 - V38 state: canonical promotion complete; this delta records the promoted V37-to-V38 inference correctness closure set
- Current canonical/latest target:
V38 - Canonical proof-source commit:
57173a81fc05a70b6b4b922ebe88add8bfa7f64e - Prior canonical anchor:
BITCODE_SPEC_V37.md - Prior generated proof appendix:
BITCODE_SPEC_V37_PROVEN.md - Generated structured artifact inventory: active canonical
.proofs/v38/spec-family-report.json,.proofs/v38/canonical-input-report.json,.proofs/v38/canon-posture-drift-report.json,.proofs/v38/inference-surface-inventory.json,.proofs/v38/ptrr-failsafe-thricified-stack.json,.proofs/v38/prompt-benchmark-report.json,.proofs/v38/disclosure-boundary-report.json,.proofs/v38/read-need-comprehension-inference-hardening.json,.proofs/v38/read-fits-finding-search-embeddings.json,.proofs/v38/assetpack-synthesis-economic-traceability.json,.proofs/v38/conversation-tool-prompt-inference-parity.json,.proofs/v38/local-staging-inference-depository-search-rehearsal.json,.proofs/v38/promotion-readiness-report.json, V38 gate-quality and promotion workflow evidence, andBITCODE_SPEC_V38_PROVEN.mdas the generated proof appendix for V38 promotion - Source parity state: V38 source-side inference inventory, PTRR Failsafe Thricified stack, prompt benchmark report, inference telemetry disclosure law, ReadNeedComprehensionSynthesis hardening, ReadFitsFindingSynthesis search embeddings, AssetPack synthesis economic traceability, Conversation/tool prompt parity, local/staging inference rehearsal, workflow, and promotion surfaces are canonicalized in the promoted V38 file family
- Spec companion:
BITCODE_SPEC_V38.md - Notes companion:
BITCODE_SPEC_V38_NOTES.md - Parity companion:
BITCODE_SPEC_V38_PARITY_MATRIX.md - Generated proof appendix:
BITCODE_SPEC_V38_PROVEN.mdonly after V38 promotion - Scope: V38 canonical delta for inference correctness over promoted V37 Website Conversations canon
V37 promoted Website Conversations. That made route-local conversation sessions, streaming UI, writing, source selection, Terminal handoff, persistence, privacy, telemetry, and rehearsal visible enough for enterprise product use.
V38 exists because Bitcode now needs the inference stack beneath Reading, Conversations, tools, and depository search to become explicit, testable, benchmarkable, and commercially reliable. V38 closes implementation gaps in how PTRR agents, Failsafe chains, ThricifiedGeneration, prompt registries, PromptParts, tool prompts, telemetry, context ancestry, and Reading search/synthesis work together.
- V37 remains active canon during V38 drafting.
- V38 gate branches are opened from
version/v38and merged back only when their gate acceptance criteria are closed. - V38 owns inference correctness across Reading pipelines, Website Conversations, tool-definition prompts, and interface-specific inference entrypoints.
- All practical PTRR agent steps should use
FailsafeGenerationSequenceaboveThricifiedGeneration; any exception must be source-backed, specified, and tested. ThricifiedGenerationremains the lowest-level Reason, Judge, StructuredOutput chain.- Tools are step-owned capabilities, and their doc-comment definitions must be injected into final prompt material through
DocCodeToolPromptandformatUsableTools. - Prompt registry composition, interpolation bindings, raw responses, parsed typed results, schema verdicts, retries, repairs, and execution ancestry roots must be telemetry-visible at permitted disclosure tiers.
ReadFitsFindingSynthesismust discover many candidate fits above threshold, not merely one candidate, before AssetPack synthesis and settlement handoff.- Fit-finding must preserve the active OpenAI embedding policy (
text-embedding-3-small, 1536 dimensions, cosinematch_deliverable_vectors) unless a replacement is explicitly specified, tested, and migrated.
- Production-mainnet value-bearing launch remains blocked.
- Bridge chain-of-record implementation remains deferred.
- V38 does not reopen BTD supply law, Exchange law, or Bitcoin settlement law except for inference and fit-finding traceability needed by AssetPack preview and post-settlement delivery.
- New LlamaIndex, Pinecone, or provider-specific search channels may be specified only after boundaries, credentials, storage, telemetry, and tests are explicit.
- Open
version/v38from promotedmain. - Open
v38/gate-1-inference-stack-roadmap-openingfromversion/v38. - Create the V38 SPEC, DELTA, NOTES, and PARITY family while preserving
BITCODE_SPEC.txt -> V37. - Refresh
SPECIFICATIONS_ROADMAP.mdso V37 is active canon, V38 is draft target, and post-V38 work remains coherent. - Retarget gate-quality and canon-quality workflow posture checks to V37 active / V38 draft.
- Add
check:v38-gate1and a V38 Gate 1 checker. - Define V38 gates, acceptance criteria, carryforward parity rows, and promotion boundaries.
- Validate spec family, canonical inputs, canon posture, workflows, roadmap truth, README/docs, and diff hygiene.
- Push the gate branch and open a pull request to
version/v38.
V38 gate commit bodies should describe the closed gate, inference surfaces, prompt/promptpart changes, pipeline or tool changes, generated proof artifacts, tests, telemetry/disclosure boundaries, and accepted deferrals.
The eventual V38 promotion commit body must name all closed V38 gates, generated inference proof artifacts, prompt benchmark reports, Reading pipeline evidence, depository-search evidence, source-safe telemetry evidence, local/staging rehearsal proof, promotion workflow evidence, and the BITCODE_SPEC.txt pointer change from V37 to V38.
Gate 1 opens V38 correctly:
- V38 SPEC, DELTA, NOTES, and PARITY files exist.
BITCODE_SPEC.txtremainsV37.- README, roadmap, PR template, package docs, demonstration docs, and workflows describe V37 active / V38 draft posture.
check:v38-gate1validates branch naming, spec family, notes, parity, roadmap truth, workflow posture, inference vocabulary, depository-search vocabulary, and promotion boundaries.- The V38 gate list is explicit before inference implementation begins.
Closure acceptance:
- every active Reading, Conversation, tool-definition, and interface inference point is counted;
- phase, PTRR agent, step, Failsafe, ThricifiedGeneration, tool, prompt, PromptPart, interpolation binding, context field, output schema, failure surface, storage target, and stream target inventories are package-backed and generated;
pnpm run check:v38-gate2validates inventory freshness, source coverage, prompt registry coverage, source-safety boundaries, and workflow wiring.
Closure implementation:
V38InferenceSurfaceInventoryis now package-backed inpackages/protocol/src/canonical/inference-surface-inventory.jsand generated to.proofs/v38/inference-surface-inventory.json.- The generated artifact is
source-safe-inference-surface-metadataand coversReadNeedComprehensionSynthesis,ReadFitsFindingSynthesis, Website Conversations, tool-definition prompts, interface entrypoints, prompt registry coverage, and execution primitive rows. - The current inventory count is 52 PTRR steps, 156 Failsafe/Thricified chains, 468 provider-call slots, and 9 tool/tool-definition surfaces, with known follow-on gaps carried to later V38 gates.
Closure acceptance:
- practical PTRR steps use
FailsafeGenerationSequenceoverThricifiedGeneration; - Plan, Try, Refine, Retry steps preserve agent, step, Failsafe, generation, and provider-call ancestry;
- exceptions are source-backed and tested;
pnpm run check:v38-gate3validates stack composition, typed output repair, and telemetry events.
Closure implementation:
V38PtrrFailsafeThricifiedStackis now package-backed inpackages/protocol/src/canonical/ptrr-failsafe-thricified-stack.jsand generated to.proofs/v38/ptrr-failsafe-thricified-stack.json.- The generated artifact is
source-safe-ptrr-failsafe-thricified-stack-metadataand provesfactoryAgentWithPTRR, all four PTRR step factories,FailsafeGenerationSequence,ThricifiedGeneration, substep prompt/context/telemetry storage, step-owned tool postprocess boundaries, and Gate 2 count binding. - The current stack contract passes 69 source predicates and binds 52 PTRR steps to 156 Failsafe sequences, 156 ThricifiedGeneration chains, and 468 provider-call slots without serializing protected source, credentials, raw protected prompts, or unpaid AssetPack source.
Closure acceptance:
- PromptParts and complete Prompts are benchmarkable;
- Prompt benchmarking remains source-safe and registry-backed;
- active Reading, Conversation, and tool-definition prompts have initial benchmark suites;
- benchmark artifacts preserve prompt identities, fixtures, typed-output quality expectations, and disclosure tiers;
pnpm run check:v38-gate4validates benchmark runner, fixtures, reports, and source-safe metadata.
Closure implementation:
V38PromptBenchmarkReportis now package-backed inpackages/protocol/src/canonical/prompt-benchmark-report.jsand generated to.proofs/v38/prompt-benchmark-report.json.- The generated artifact is
source-safe-prompt-benchmark-metadataand covers benchmark infrastructure, generic PTRR/Failsafe/ThricifiedGeneration PromptParts,ReadNeedComprehensionSynthesisPromptParts,ReadFitsFindingSynthesisPromptParts, complete Reading Prompt registries, Website Conversation Prompts, and DocCodeToolPrompt surfaces. - The current benchmark report records 7 rows, 13 source-safe fixtures, 24 typed-output quality expectations, 38 passed source predicates, 443 active PromptPart doc-comments, 39 complete Prompt doc-comments, 465 benchmark definitions, 275 PromptPart exports, and 85 Prompt constructions without serializing raw prompt text, protected source, raw provider responses, credentials, or unpaid AssetPack source.
Closure acceptance:
- inference telemetry emits phase, agent, step, Failsafe, ThricifiedGeneration, tool, prompt template, interpolated prompt, raw response, parsed output, schema verdict, retry, repair, and failure events;
- each event has disclosure-tier rules;
- protected payloads remain blocked or redacted;
pnpm run check:v38-gate5validates event contracts, UI stream compatibility, API contracts, and redaction tests.
Closure implementation:
V38InferenceTelemetryDisclosureReportis now package-backed inpackages/protocol/src/canonical/inference-telemetry-disclosure-report.jsand generated to.proofs/v38/disclosure-boundary-report.json.- The generated artifact is
source-safe-inference-telemetry-disclosure-metadataand covers pipeline phase, PTRR agent step, Failsafe sequence, ThricifiedGeneration, tool execution, prompt template interpolation, raw response to parsed output schema, and stream UI/storage projection rows. - The report binds 13 required telemetry levels and 12 disclosure tier ids to allowed payload fields, forbidden payload classes, proof roots, fail-closed states, V35 telemetry taxonomy roots, V37 stream-event roots, V38 Gate 2 inventory roots, V38 Gate 3 PTRR/Failsafe/Thricified roots, and V38 Gate 4 prompt benchmark roots.
- The raw provider response boundary is private or root-only: public rows can expose raw response presence, roots, typed output shape, schema verdict, retry/repair posture, and source-safe inference audit shapes, but not raw provider response content, raw protected prompts, protected source, unpaid AssetPack source, credentials, private wallet material, or private settlement payloads.
Closure acceptance:
- Read Request to Need synthesis uses the V38 inference stack and emits a
ReadNeedComprehensionSynthesisInferenceReceipton the produced Need; - synthesized Needs are reviewable, resynthesizable with feedback, measurement-backed, and bounded to the original request;
- storage and telemetry are source-safe and typed, including phase ids, agent ids, PTRR step ids, Failsafe sequence ids, ThricifiedGeneration ids, prompt template ids, interpolation keys, output schema ids, telemetry ids, and proof roots;
V38ReadNeedComprehensionInferenceHardeningis now package-backed inpackages/protocol/src/canonical/read-need-comprehension-inference-hardening.jsand generated to.proofs/v38/read-need-comprehension-inference-hardening.json;- the generated artifact is
source-safe-read-need-comprehension-inference-hardening-metadataand covers request normalization, Need comprehension, Need measurement, Need review, source-safe inference receipts, route/UI resynthesis support, accepted-Need admission boundary, and V38 Gates 2 through 5 roots; - the current count contract is 5 rows, 4 phases, 4 PTRR agents, 16 PTRR steps, 48 Failsafe sequences, 48 ThricifiedGeneration chains, 144 provider-call slots, 22 passed source predicates, and no protected source, raw provider response content, credentials, unpaid AssetPack source, private wallet material, private settlement payload, or
_legacy/source roots; pnpm run check:v38-gate6validates pipeline contracts, agents, prompts, outputs, tests, docs, artifact freshness, and workflow wiring.
Closure acceptance:
- Finding Fits uses inference-derived queries and depository search tools across lexical, symbolic, path, metadata, measurement, embedding/vector, and provider-specific channels;
- candidate deposits above threshold are ranked, verified, and traceable;
- embedding policy, vector dimensions, similarity metric, storage, credentials, and telemetry are explicit;
V38ReadFitsFindingSearchEmbeddingsis now package-backed inpackages/protocol/src/canonical/read-fits-finding-search-embeddings.jsand generated to.proofs/v38/read-fits-finding-search-embeddings.json;- the generated artifact is
source-safe-read-fits-finding-search-embeddings-metadataand covers accepted-Need admission, source-safe query planning, many-fit discovery, embedding/vector policy, threshold ranking, selected-fit provenance, and the source-safe search receipt; - the current count contract is 7 rows, 7 phases, 8 PTRR agents, 32 PTRR steps, 96 Failsafe sequences, 96 ThricifiedGeneration chains, 288 provider-call slots, 4 tool contracts, 7 search channels, default 12 above-threshold selected-candidate slots, active OpenAI
text-embedding-3-small/ 1536 dimensions / cosine /match_deliverable_vectors, 23 passed source predicates, and no protected source, raw provider response content, credentials, unpaid AssetPack source, private wallet material, private settlement payload, or_legacy/source roots; pnpm run check:v38-gate7validates search tools, embeddings, ranking, thresholding, tests, and generated evidence.
Closure acceptance:
- selected fits remain traceable into AssetPack synthesis;
- source-safe preview and post-settlement delivery preserve visibility boundaries;
- contributor compensation, ledger/database synchronization, proof receipts, and repair paths are specified and tested;
V38AssetPackSynthesisEconomicTraceabilityis now package-backed inpackages/protocol/src/canonical/assetpack-synthesis-economic-traceability.jsand generated to.proofs/v38/assetpack-synthesis-economic-traceability.json;- the generated artifact is
source-safe-assetpack-synthesis-economic-traceability-metadataand covers selected-fit handoff, source-safe preview, disclosure leak scanning, deterministic BTC quote, BTD receipts, source-to-shares compensation, settlement unlock, post-settlement delivery, ledger/database reconciliation, repair paths, and harness evidence projection; - the current closure contract is 9 rows, 18 required receipt fields, BTD/AssetPack/harness package tests, and no protected source, raw provider response content, unpaid AssetPack source, credentials, wallet private material, private settlement payload, or
_legacy/source roots; pnpm run check:v38-gate8validates fit-to-AssetPack receipts, settlement traceability, source-safety, and repair posture.
Closure acceptance:
- Website Conversations and tool-definition prompts use V38 prompt registry, Failsafe, Thricified, tool prompt, telemetry, and disclosure posture;
- interface-specific inference entrypoints do not bypass the stack;
V38ConversationToolPromptInferenceParityis package-backed inpackages/protocol/src/canonical/conversation-tool-prompt-inference-parity.jsand generated to.proofs/v38/conversation-tool-prompt-inference-parity.json;- the generated artifact is
source-safe-conversation-tool-prompt-inference-parity-metadataand 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; - 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; pnpm run check:v38-gate9validates Conversation/tool parity, route contracts, UI surfaces, prompt disclosure rules, package tests, artifact freshness, and workflow wiring.
Closure acceptance:
- local and staging-testnet rehearsals run Reading inference, depository search, source-safe AssetPack preview, telemetry streaming, and blocked mainnet posture;
- real non-mocked inference is exercised where credentials are available;
- logs/screenshots/proofs are source-safe;
pnpm run check:v38-gate10validates rehearsal evidence and workflow wiring.
Closure implementation:
V38LocalStagingInferenceDepositorySearchRehearsalis now package-backed inpackages/protocol/src/canonical/local-staging-inference-depository-search-rehearsal.jsand generated to.proofs/v38/local-staging-inference-depository-search-rehearsal.json.- The generated artifact is
source-safe-local-staging-inference-depository-search-rehearsal-metadataand covers local Vercel Sandbox harness opt-in, staging-testnet bounded real-inference preflight, ReadNeedComprehensionSynthesis plus ReadFitsFindingSynthesis exercise, many-fit depository search, source-safe AssetPack preview, telemetry streaming and database readback, live credential gates, ledger/database synchronization posture, and blocked value-bearing mainnet posture. - The current closure contract is 8 rehearsal rows, 2 lanes, V38 Gates 2 through 9 proof roots, harness/search/route/UI package tests, and no protected source, raw prompt text, raw provider response content, live rehearsal log payload, unpaid AssetPack source, credentials, wallet private material, private settlement payload, production-mainnet value-bearing admission, or
_legacy/source roots.
Closure acceptance:
- all V38 gates are closed;
- V38 generated proof appendix support exists;
- promotion workflow validates V38 and commits only the canonical pointer and generated promotion artifacts;
pnpm run check:v38-gate11validates promotion readiness, source-safety, generated artifacts, and V39 draft posture preparation.
Closure implementation:
V38InferencePromotionReadinessReportis now package-backed inpackages/protocol/src/canonical/inference-promotion-readiness-report.jsand generated to.proofs/v38/promotion-readiness-report.json.- The generated artifact is
source-safe-inference-promotion-readiness-metadataand covers all V38 Gate 2 through Gate 10 artifacts,BITCODE_SPEC_V38_PROVEN.mdsupport, V38 promotion command dry-run support,v38-canon-promotion.yml, gate/canon workflow postures, spec-family/runtime promotion support, proven-generator support, active V38 / draft V39 post-promotion readiness, and blocked value-bearing mainnet posture. - promotion scripts support V38 through
node scripts/promote-bitcode-canon.mjs --version V38 --commit HEAD --dry-run,scripts/prepare-bitcode-spec-family-promotion.mjs --version V38, andscripts/prepare-bitcode-runtime-canon-promotion.mjs --version V38 --next-draft V39. - draft-mode Gate 11 freshness validates the standalone readiness artifact, while promoted-mode Gate 11 accepts the proof-wrapped readiness artifact emitted by the V38 canonical promotion generator.
- The current closure contract is 9 V38 gate artifacts, 5 generated proof outputs, source-safe promotion evidence, and no protected source, raw protected prompt text, raw provider response content, unpaid AssetPack source, credentials, wallet private material, private settlement payload, production-mainnet value-bearing admission, or
_legacy/source roots.