Skip to content

Commit 389ba71

Browse files
V37 Gate 11: Preserve V38 inference scope
Expand the V38 notes-only opening with source-anchored requirements for FailsafeGenerationSequence over ThricifiedGeneration, prompt and tool composition, prompt benchmarking, telemetry, and ReadFitsFindingSynthesis depository search.
1 parent 5ab3728 commit 389ba71

1 file changed

Lines changed: 98 additions & 15 deletions

File tree

BITCODE_SPEC_V38_NOTES.md

Lines changed: 98 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,113 @@ routes, tests, or package APIs that claim V38 implementation before Gate 1.
1818

1919
## Deferred from V37
2020

21-
V37 promoted Website Conversations. V38 should inspect the inference execution
22-
stack beneath PTRR agents and ensure practical FailsafeGeneration layers are
23-
specified above ThricifiedGeneration calls where agents need context
24-
preparation, large input handling, large output handling, and repairable
25-
typed-output generation.
26-
27-
Thricification remains the lowest-level inference call chain. It resolves final
28-
prompt registry composition, interpolation, and typed output. Failsafe chains
29-
may orchestrate setup and repair around those calls, but must delegate final
30-
reason, judge-reasoning, and typed response production to ThricifiedGeneration
31-
when used inside Reading pipeline agents.
21+
V37 promoted Website Conversations. V38 is inference-focused: it should correct
22+
remaining gaps in the pipeline inference stack, fully use Bitcode's existing
23+
agent, prompt, execution, tool, telemetry, and registry primitives, and bring
24+
all Reading inference surfaces to commercial-readiness without weakening any
25+
runtime boundary.
26+
27+
Source anchors already exist and must be audited before V38 implementation:
28+
29+
- `packages/agent-generics/src/steps/failsafe-sequence.ts` defines
30+
`FailsafeGenerationSequence` as prepare-concise-context, chunk-then-sum, and
31+
stitch-until-complete wrappers over `ThricifiedGeneration`.
32+
- `packages/agent-generics/src/steps/thricified-generation.ts` defines
33+
`ThricifiedGeneration` as the strict Reason, Judge, StructuredOutput chain.
34+
- `packages/agent-generics/src/agents/factories.ts` requires
35+
`factoryAgentWithPTRR` callers to provide an agent prompt plus complete
36+
Plan, Try, Refine, and Retry step prompt registries.
37+
- `packages/tools-generics/src/Tool.ts`,
38+
`packages/tools-generics/src/doc-code-tool/DocCodeToolPrompt.ts`, and
39+
`packages/tools-generics/src/doc-code-tool/formatUsableTools.ts` define the
40+
doc-comment-backed tool prompt path that inference prompts must consume.
41+
- `packages/pipelines/asset-pack/src/reading-pipeline-contract.ts`,
42+
`packages/pipelines/asset-pack/src/read-need.ts`,
43+
`packages/pipelines/asset-pack/src/depository-search.ts`, and
44+
`packages/pipelines/asset-pack/src/tools/*DepositorySearchTool*` define the
45+
current `ReadNeedComprehensionSynthesis` and
46+
`ReadFitsFindingSynthesis` contracts, tools, search result shape, and
47+
source-safe preview boundary.
48+
49+
Thricification remains the lowest-level inference call chain. It is the final
50+
place where phase, agent, step, substep, tool-documentation, and generation
51+
prompt registries are resolved, composed, interpolated, and constrained to the
52+
typed output. Failsafe chains may prepare context, chunk large inputs, summarize
53+
or stitch large outputs, retry repairable typed-output failures, and organize
54+
execution ancestry state around those calls, but inside PTRR agents they must
55+
delegate final reason, judge-reasoning, and structured typed response
56+
production to `ThricifiedGeneration`.
57+
58+
Tools remain step-owned capability executions, not hidden children of
59+
`ThricifiedGeneration`. Tool definitions must still be represented in final
60+
prompts through the doc-comment `DocCodeToolPrompt` path, composed and
61+
interpolated at the lowest inference point with the same source-safe telemetry
62+
discipline as all other prompt material.
3263

3364
## Candidate V38 workstreams
3465

35-
- Audit PTRR agent step execution so phase, agent, step, tool, Failsafe, and
36-
ThricifiedGeneration responsibilities are named without overlap.
37-
- Specify prompt registry composition from phase prompts through agent prompts,
38-
step prompts, substep prompts, and final generation prompts.
66+
- Audit every inference point in Reading pipelines, Website Conversations,
67+
tool-definition prompts, and interface-specific inference entrypoints. The
68+
audit must count base primitives and specific implementations separately:
69+
phase prompts, PTRR agent prompts, step prompts, Failsafe substep prompts,
70+
ThricifiedGeneration prompts, tool prompt definitions, prompt templates,
71+
interpolation bindings, expected context fields, raw outputs, parsed typed
72+
outputs, and repair/failure surfaces.
73+
- Specify the exact execution stack for pipeline agents without overlapping
74+
names: PipelineExecution owns phases; PTRR agents own Plan, Try, Refine, and
75+
Retry steps; FailsafeGenerationSequence owns context preparation, large input
76+
handling, large output handling, and repair orchestration; ThricifiedGeneration
77+
owns Reason, Judge, and StructuredOutput inference calls; ToolExecution owns
78+
callable tools and tool input/output receipts.
79+
- Require all PTRR agent steps to use practical FailsafeGenerationSequence
80+
layers above ThricifiedGeneration unless a source-backed exception is
81+
specified, tested, and justified. The default Reading stack should be
82+
PipelineExecution -> PTRR agent -> PTRR step -> FailsafeGenerationSequence ->
83+
ThricifiedGeneration -> provider call.
84+
- Finish prompt and PromptPart benchmarking so semantically divided
85+
PromptParts and complete Prompts are both benchmarkable. V38 Gate 1 should
86+
inventory existing `benchmarks:` doc-comment metadata, the
87+
`packages/prompts/src/benchmarking/*` runner, and all Reading and
88+
conversation prompt surfaces, then define initial benchmark suites for every
89+
prompt part and prompt used by active inference.
90+
- Complete prompt registry composition and interpolation rules from phase
91+
prompts through agent prompts, step prompts, substep prompts, final generation
92+
prompts, and tool documentation. The final inference call must expose the
93+
unrendered template identity, interpolated prompt, context bindings, selected
94+
tools, raw response, parsed output, and schema verdict to telemetry at the
95+
proper disclosure tier.
96+
- Integrate this inference work with prior telemetry. Execution ancestry
97+
state-stack data must be written, read, prepared by Failsafe layers,
98+
interpolated into prompts, maintained through retries, and streamed as
99+
source-safe phase, agent, step, Failsafe, ThricifiedGeneration, tool, input,
100+
output, and typed-result events.
101+
- Complete `ReadFitsFindingSynthesis` depository-search internals as the
102+
coupled second focus of V38. Fit-finding queries are inference-derived and
103+
must search throughout the Bitcode Depository using lexical, symbolic, path,
104+
metadata, measurement, embedding/vector, and provider-specific channels where
105+
appropriate.
106+
- Harden the depository-search tool and primitive utility stack around source
107+
embeddings, measurement embeddings, metadata embeddings, query synthesis,
108+
ranking, verification, and AssetPack synthesis handoff. Existing OpenAI
109+
embedding policy (`text-embedding-3-small`, 1536 dimensions, cosine
110+
`match_deliverable_vectors`) is an active source anchor, and V38 may specify
111+
additional LlamaIndex, Pinecone, or provider-backed channels only when their
112+
boundaries, storage, credentials, telemetry, and tests are explicit.
113+
- Preserve the economic carry-through from found fits to AssetPack settlement:
114+
selected fit deposits must remain traceable into source-safe preview,
115+
post-settlement delivery, contributor compensation, exact ledger/database
116+
synchronization, and proof receipts.
39117
- Clarify how Bitcoin, GitHub, compute, storage, and build/process boundaries
40118
are represented in long-running inference and pipeline telemetry.
41119
- Confirm that source-safe telemetry exposes prompt templates, interpolated
42120
prompts, raw provider responses, parsed typed results, repair attempts, and
43121
failed-output evidence only at their permitted disclosure tier.
44122

123+
The V38 acceptance posture is commercial inference correctness: Bitcode's
124+
ability to maximize inference intelligence must produce reliable technical
125+
intelligence measurement, labeling, fit-finding, AssetPack synthesis, and
126+
mutually beneficial depositing and Reading exchange.
127+
45128
## Non-goals during V38 opening
46129

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

0 commit comments

Comments
 (0)