|
1 | | -V38 should ensure PTRR agents' steps use FailsafeGenerations above (sans tools) ThricifiedGenerations (RJS per Failsafe (context preparation, large input handling, large output handling - each RJS (Thriceified) within them) |
| 1 | +# Bitcode Spec V38 Notes |
2 | 2 |
|
3 | | -Thricification is the lowest-level inference call chaining (final prompt regsitry resolutions (above call chain) to compose final form, inteprolations formatted etc.). Failsafes are also generic inference chains but delegate their internal infer down (again, in the case of PTRR agent implementations) to Thricified |
| 3 | +## Status |
4 | 4 |
|
5 | | -Ensure pipeline execution agents inference call stack is completed correctly (prompt registries and final compositions and interpolations, prompt contents and context expectations, generation implementations (Failsafes, Thricifieds) from phase->agents(PTRR)->steps->... |
| 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 |
| 9 | + |
| 10 | +## Notes-only draft rule |
| 11 | + |
| 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. |
| 15 | + |
| 16 | +These notes preserve candidate work without creating source identifiers, |
| 17 | +routes, tests, or package APIs that claim V38 implementation before Gate 1. |
| 18 | + |
| 19 | +## Deferred from V37 |
| 20 | + |
| 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. |
| 63 | + |
| 64 | +## Candidate V38 workstreams |
| 65 | + |
| 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. |
| 117 | +- Clarify how Bitcoin, GitHub, compute, storage, and build/process boundaries |
| 118 | + are represented in long-running inference and pipeline telemetry. |
| 119 | +- Confirm that source-safe telemetry exposes prompt templates, interpolated |
| 120 | + prompts, raw provider responses, parsed typed results, repair attempts, and |
| 121 | + failed-output evidence only at their permitted disclosure tier. |
| 122 | + |
| 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 | + |
| 128 | +## Non-goals during V38 opening |
| 129 | + |
| 130 | +- No new production route, API version, source package name, or UI label should |
| 131 | + carry V38 in source code during the notes-only opening. |
| 132 | +- No Bitcoin, GitHub, compute, storage, or build/process runtime boundary may |
| 133 | + be weakened while the inference execution stack is being clarified. |
| 134 | +- No V38 gate may begin until Gate 1 creates the full draft family and updates |
| 135 | + the roadmap from this notes-only posture. |
0 commit comments