Skip to content

Commit 3c7e66c

Browse files
Merge pull request #124 from engineeredsoftware/v38/gate-1-inference-stack-roadmap-opening
V38 Gate 1: Inference Stack Roadmap Opening
2 parents ab59c50 + 3664f56 commit 3c7e66c

13 files changed

Lines changed: 1202 additions & 41 deletions

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Title
22

3-
Use the version and gate prefix for gate PRs: `V37 Gate N: Concise Topical Title`.
4-
Use the version and promotion prefix for version promotion PRs: `V37 Canonical Promotion: Concise Topical Title`.
3+
Use the version and gate prefix for gate PRs: `V38 Gate N: Concise Topical Title`.
4+
Use the version and promotion prefix for version promotion PRs: `V38 Canonical Promotion: Concise Topical Title`.
55

66
## Closure
77

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ jobs:
142142
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V37 --draft-target V38
143143
node scripts/check-bitcode-spec-family.mjs --version V37 --mode promoted --current-target V37
144144
node scripts/check-v37-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check
145+
if [ -f BITCODE_SPEC_V38.md ]; then
146+
node scripts/check-bitcode-spec-family.mjs --version V38 --mode draft --current-target V37
147+
node scripts/check-v38-gate1-inference-stack-roadmap-opening.mjs --skip-branch-check
148+
fi
145149
else
146150
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
147151
exit 1
@@ -249,7 +253,15 @@ jobs:
249253
node scripts/check-bitcode-spec-family.mjs --version V37 --mode draft --current-target V36
250254
fi
251255
;;
256+
spec:\ V38*|spec:\ v38*)
257+
POINTER="$(cat BITCODE_SPEC.txt)"
258+
if [ "$POINTER" = "V38" ]; then
259+
node scripts/check-bitcode-spec-family.mjs --version V38 --mode promoted --current-target V38
260+
else
261+
node scripts/check-bitcode-spec-family.mjs --version V38 --mode draft --current-target V37
262+
fi
263+
;;
252264
*)
253-
echo "Skipping strict spec-title conformance; title is not a V29/V30/V31/V32/V33/V34/V35/V36/V37 spec change."
265+
echo "Skipping strict spec-title conformance; title is not a V29/V30/V31/V32/V33/V34/V35/V36/V37/V38 spec change."
254266
;;
255267
esac

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,10 @@ jobs:
271271
node scripts/check-bitcode-canonical-inputs.mjs --current-target V37
272272
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V37 --draft-target V38
273273
node scripts/check-v37-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check
274+
if [ -f BITCODE_SPEC_V38.md ]; then
275+
node scripts/check-bitcode-spec-family.mjs --version V38 --mode draft --current-target V37
276+
node scripts/check-v38-gate1-inference-stack-roadmap-opening.mjs --skip-branch-check
277+
fi
274278
else
275279
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
276280
exit 1

BITCODE_SPEC_V38.md

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

BITCODE_SPEC_V38_DELTA.md

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
# Bitcode Spec V38 Delta
2+
3+
## Status
4+
5+
- Version: `V38`
6+
- V38 state: active draft opening over promoted V37
7+
- Current canonical/latest target: `V37`
8+
- Prior canonical anchor: `BITCODE_SPEC_V37.md`
9+
- 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`, V38 gate-quality workflow evidence, and future V38 generated proof artifacts as gates close
11+
- 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
12+
- Spec companion: `BITCODE_SPEC_V38.md`
13+
- Notes companion: `BITCODE_SPEC_V38_NOTES.md`
14+
- Parity companion: `BITCODE_SPEC_V38_PARITY_MATRIX.md`
15+
- Generated proof appendix: `BITCODE_SPEC_V38_PROVEN.md` only after V38 promotion
16+
- Scope: V38 delta for inference stack correctness, Reading inference, fit-finding depository search, prompt benchmarking, telemetry, and promotion readiness over promoted V37 Website Conversations canon
17+
18+
## Why V38 exists
19+
20+
V37 promoted Website Conversations.
21+
That made route-local conversation sessions, streaming UI, writing, source selection, Terminal handoff, persistence, privacy, telemetry, and rehearsal visible enough for enterprise product use.
22+
23+
V38 exists because Bitcode now needs the inference stack beneath Reading, Conversations, tools, and depository search to become explicit, testable, benchmarkable, and commercially reliable.
24+
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.
25+
26+
## Accepted V38 decisions
27+
28+
- V37 remains active canon during V38 drafting.
29+
- V38 gate branches are opened from `version/v38` and merged back only when their gate acceptance criteria are closed.
30+
- V38 owns inference correctness across Reading pipelines, Website Conversations, tool-definition prompts, and interface-specific inference entrypoints.
31+
- All practical PTRR agent steps should use `FailsafeGenerationSequence` above `ThricifiedGeneration`; any exception must be source-backed, specified, and tested.
32+
- `ThricifiedGeneration` remains the lowest-level Reason, Judge, StructuredOutput chain.
33+
- Tools are step-owned capabilities, and their doc-comment definitions must be injected into final prompt material through `DocCodeToolPrompt` and `formatUsableTools`.
34+
- 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.
35+
- `ReadFitsFindingSynthesis` must discover many candidate fits above threshold, not merely one candidate, before AssetPack synthesis and settlement handoff.
36+
- Fit-finding must preserve the active OpenAI embedding policy (`text-embedding-3-small`, 1536 dimensions, cosine `match_deliverable_vectors`) unless a replacement is explicitly specified, tested, and migrated.
37+
38+
## Explicitly deferred
39+
40+
- Production-mainnet value-bearing launch remains blocked.
41+
- Bridge chain-of-record implementation remains deferred.
42+
- 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.
43+
- New LlamaIndex, Pinecone, or provider-specific search channels may be specified only after boundaries, credentials, storage, telemetry, and tests are explicit.
44+
45+
## Pre-Implementation Sequence
46+
47+
1. Open `version/v38` from promoted `main`.
48+
2. Open `v38/gate-1-inference-stack-roadmap-opening` from `version/v38`.
49+
3. Create the V38 SPEC, DELTA, NOTES, and PARITY family while preserving `BITCODE_SPEC.txt -> V37`.
50+
4. Refresh `SPECIFICATIONS_ROADMAP.md` so V37 is active canon, V38 is draft target, and post-V38 work remains coherent.
51+
5. Retarget gate-quality and canon-quality workflow posture checks to V37 active / V38 draft.
52+
6. Add `check:v38-gate1` and a V38 Gate 1 checker.
53+
7. Define V38 gates, acceptance criteria, carryforward parity rows, and promotion boundaries.
54+
8. Validate spec family, canonical inputs, canon posture, workflows, roadmap truth, README/docs, and diff hygiene.
55+
9. Push the gate branch and open a pull request to `version/v38`.
56+
57+
## Commit-Body Direction
58+
59+
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.
60+
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`.
61+
62+
## Gate Delta
63+
64+
### Gate 1: V38 Inference Stack Roadmap And Spec Opening
65+
66+
Gate 1 opens V38 correctly:
67+
68+
- V38 SPEC, DELTA, NOTES, and PARITY files exist.
69+
- `BITCODE_SPEC.txt` remains `V37`.
70+
- README, roadmap, PR template, package docs, demonstration docs, and workflows describe V37 active / V38 draft posture.
71+
- `check:v38-gate1` validates branch naming, spec family, notes, parity, roadmap truth, workflow posture, inference vocabulary, depository-search vocabulary, and promotion boundaries.
72+
- The V38 gate list is explicit before inference implementation begins.
73+
74+
### Gate 2: Inference Surface Inventory And Prompt Registry Map
75+
76+
Closure acceptance:
77+
78+
- every active Reading, Conversation, tool-definition, and interface inference point is counted;
79+
- 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;
80+
- `pnpm run check:v38-gate2` validates inventory freshness, source coverage, prompt registry coverage, source-safety boundaries, and workflow wiring.
81+
82+
### Gate 3: PTRR Failsafe And Thricified Execution Stack
83+
84+
Closure acceptance:
85+
86+
- practical PTRR steps use `FailsafeGenerationSequence` over `ThricifiedGeneration`;
87+
- Plan, Try, Refine, Retry steps preserve agent, step, Failsafe, generation, and provider-call ancestry;
88+
- exceptions are source-backed and tested;
89+
- `pnpm run check:v38-gate3` validates stack composition, typed output repair, and telemetry events.
90+
91+
### Gate 4: PromptPart And Prompt Benchmarking
92+
93+
Closure acceptance:
94+
95+
- PromptParts and complete Prompts are benchmarkable;
96+
- active Reading, Conversation, and tool-definition prompts have initial benchmark suites;
97+
- benchmark artifacts preserve prompt identities, fixtures, typed-output quality expectations, and disclosure tiers;
98+
- `pnpm run check:v38-gate4` validates benchmark runner, fixtures, reports, and source-safe metadata.
99+
100+
### Gate 5: Inference Telemetry And Disclosure Tiers
101+
102+
Closure acceptance:
103+
104+
- inference telemetry emits phase, agent, step, Failsafe, ThricifiedGeneration, tool, prompt template, interpolated prompt, raw response, parsed output, schema verdict, retry, repair, and failure events;
105+
- each event has disclosure-tier rules;
106+
- protected payloads remain blocked or redacted;
107+
- `pnpm run check:v38-gate5` validates event contracts, UI stream compatibility, API contracts, and redaction tests.
108+
109+
### Gate 6: ReadNeedComprehensionSynthesis Inference Hardening
110+
111+
Closure acceptance:
112+
113+
- Read Request to Need synthesis uses the V38 inference stack;
114+
- synthesized Needs are reviewable, resynthesizable with feedback, measurement-backed, and bounded to the original request;
115+
- storage and telemetry are source-safe and typed;
116+
- `pnpm run check:v38-gate6` validates pipeline contracts, agents, prompts, outputs, tests, and docs.
117+
118+
### Gate 7: ReadFitsFindingSynthesis Depository Search And Embeddings
119+
120+
Closure acceptance:
121+
122+
- Finding Fits uses inference-derived queries and depository search tools across lexical, symbolic, path, metadata, measurement, embedding/vector, and provider-specific channels;
123+
- candidate deposits above threshold are ranked, verified, and traceable;
124+
- embedding policy, vector dimensions, similarity metric, storage, credentials, and telemetry are explicit;
125+
- `pnpm run check:v38-gate7` validates search tools, embeddings, ranking, thresholding, tests, and generated evidence.
126+
127+
### Gate 8: AssetPack Synthesis Handoff And Economic Traceability
128+
129+
Closure acceptance:
130+
131+
- selected fits remain traceable into AssetPack synthesis;
132+
- source-safe preview and post-settlement delivery preserve visibility boundaries;
133+
- contributor compensation, ledger/database synchronization, proof receipts, and repair paths are specified and tested;
134+
- `pnpm run check:v38-gate8` validates fit-to-AssetPack receipts, settlement traceability, source-safety, and repair posture.
135+
136+
### Gate 9: Conversation And Tool-Prompt Inference Parity
137+
138+
Closure acceptance:
139+
140+
- Website Conversations and tool-definition prompts use V38 prompt registry, Failsafe, Thricified, tool prompt, telemetry, and disclosure posture;
141+
- interface-specific inference entrypoints do not bypass the stack;
142+
- `pnpm run check:v38-gate9` validates Conversation/tool parity, route contracts, UI surfaces, and prompt disclosure rules.
143+
144+
### Gate 10: Local Staging Inference And Depository Search Rehearsal
145+
146+
Closure acceptance:
147+
148+
- local and staging-testnet rehearsals run Reading inference, depository search, source-safe AssetPack preview, telemetry streaming, and blocked mainnet posture;
149+
- real non-mocked inference is exercised where credentials are available;
150+
- logs/screenshots/proofs are source-safe;
151+
- `pnpm run check:v38-gate10` validates rehearsal evidence and workflow wiring.
152+
153+
### Gate 11: V38 Promotion Readiness
154+
155+
Closure acceptance:
156+
157+
- all V38 gates are closed;
158+
- V38 generated proof appendix support exists;
159+
- promotion workflow validates V38 and commits only the canonical pointer and generated promotion artifacts;
160+
- `pnpm run check:v38-gate11` validates promotion readiness, source-safety, generated artifacts, and V39 draft posture preparation.

BITCODE_SPEC_V38_NOTES.md

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,36 @@
22

33
## Status
44

5-
- Canonical pointer: `BITCODE_SPEC.txt` -> `V37`
6-
- Active canonical anchor: `BITCODE_SPEC_V37.md`
7-
- Active generated proof appendix: `BITCODE_SPEC_V37_PROVEN.md`
8-
- V38 state: notes-only draft opening
5+
- Version: `V38`
6+
- V38 state: active draft opening over promoted V37
7+
- Current canonical/latest target: `V37`
8+
- Current active draft target: `V38`
9+
- Prior canonical anchor: `BITCODE_SPEC_V37.md`
10+
- 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`, V38 gate-quality workflow evidence, and future V38 generated proof artifacts as gates close
12+
- 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
13+
- Spec companion: `BITCODE_SPEC_V38.md`
14+
- Delta companion: `BITCODE_SPEC_V38_DELTA.md`
15+
- Parity companion: `BITCODE_SPEC_V38_PARITY_MATRIX.md`
16+
- Scope: V38 notes for inference stack correctness, prompt and PromptPart benchmarking, Reading pipeline inference, depository fit-finding, tool prompt definitions, telemetry, and promotion readiness over promoted V37 Website Conversations canon
917

10-
## Notes-only draft rule
18+
This NOTES file does not promote V38. It is binding draft guidance while V38 gates are in flight.
1119

12-
V38 begins as a notes-only draft opening, not first-gate implementation. The
13-
active implementation remains V37 until a V38 version branch and Gate 1 draft
14-
family explicitly open the V38 specification set.
20+
## Notes companion rule
1521

16-
These notes preserve candidate work without creating source identifiers,
17-
routes, tests, or package APIs that claim V38 implementation before Gate 1.
18-
They normalize and expand the loose V38 notes committed on `main`; every
19-
instruction from that loose note is retained here as source-auditable V38
20-
opening scope.
22+
This file is the V38 notes companion.
23+
Requirements are binding for V38 gate work while `BITCODE_SPEC.txt` remains `V37`.
24+
25+
## Simplified-spec reading rule
26+
27+
Read `BITCODE_SPEC.txt` first.
28+
If it points to `V37`, V37 is active canon and V38 is the active draft target only when this V38 SPEC family exists on a V38 branch.
29+
Read `BITCODE_SPEC_V38.md`, this NOTES companion, the V38 DELTA, and the V38 PARITY matrix together before implementing inference work.
30+
31+
## Concise current-system reading
32+
33+
V37 is active canon and Website Conversations are promoted.
34+
V38 is the draft target that focuses on commercial inference correctness across Reading pipelines, Conversations, tool-definition prompts, prompt benchmarking, fit-finding search, and source-safe inference telemetry.
2135

2236
## Deferred from V37
2337

@@ -128,6 +142,26 @@ ability to maximize inference intelligence must produce reliable technical
128142
intelligence measurement, labeling, fit-finding, AssetPack synthesis, and
129143
mutually beneficial depositing and Reading exchange.
130144

145+
## Gate 1 implementation notes
146+
147+
Gate 1 turns the loose V38 notes committed on `main` into the formal V38 SPEC, DELTA, NOTES, and PARITY family.
148+
The opening must preserve every instruction from those loose notes while grounding them in existing source anchors: `FailsafeGenerationSequence`, `ThricifiedGeneration`, PTRR agent factories, tool doc-comment prompt definitions, Reading pipeline contracts, depository-search tools, embedding policy, and source-safe telemetry boundaries.
149+
Gate 1 adds `check:v38-gate1`, workflow posture updates, README and package documentation posture updates, and roadmap truth for V37 active / V38 draft.
150+
151+
## V38 gate plan
152+
153+
- Gate 1: V38 Inference Stack Roadmap And Spec Opening
154+
- Gate 2: Inference Surface Inventory And Prompt Registry Map
155+
- Gate 3: PTRR Failsafe And Thricified Execution Stack
156+
- Gate 4: PromptPart And Prompt Benchmarking
157+
- Gate 5: Inference Telemetry And Disclosure Tiers
158+
- Gate 6: ReadNeedComprehensionSynthesis Inference Hardening
159+
- Gate 7: ReadFitsFindingSynthesis Depository Search And Embeddings
160+
- Gate 8: AssetPack Synthesis Handoff And Economic Traceability
161+
- Gate 9: Conversation And Tool-Prompt Inference Parity
162+
- Gate 10: Local Staging Inference And Depository Search Rehearsal
163+
- Gate 11: V38 Promotion Readiness
164+
131165
## Non-goals during V38 opening
132166

133167
- No new production route, API version, source package name, or UI label should

0 commit comments

Comments
 (0)