Skip to content

Commit 862db27

Browse files
V48 (specification-implementation): Extract SDIVF base into packages/generic-pipelines/SDIVF
Establish the Pipeline inheritance hierarchy as primitive → base → product: pipelines-generics (Pipeline/PhaseDelegator) → generic-pipelines-sdivf (Setup-[DIV]*-Finish) → pipeline-asset-pack (SynthesizeAssetPacks; future SettleAssetPacks). Own factorySDIVFExecutorPipeline/factorySDIVFPipeline/ SDIVFPhase in @bitcode/generic-pipelines-sdivf; re-export from pipelines-generics for compatibility; wire AssetPack and docs/tests/jest maps.
1 parent b886d0f commit 862db27

27 files changed

Lines changed: 1157 additions & 506 deletions

BITCODE_SPEC_V48_NOTES.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,3 +1491,18 @@ SOURCE_LAYOUT:
14911491
| Edge-case handler | Real concern modules + thin class facade |
14921492

14931493
Navigation map: `FAMILIARIZATION.md`. Layout contract: `internal-docs/BITCODE_SOURCE_LAYOUT.md`.
1494+
1495+
1496+
## SDIVF base package (Garrett, 2026-07-13)
1497+
1498+
Pipeline inheritance hierarchy is now explicit:
1499+
1500+
```
1501+
@bitcode/pipelines-generics # Pipeline / PhaseDelegator primitives
1502+
→ @bitcode/generic-pipelines-sdivf # packages/generic-pipelines/SDIVF
1503+
→ @bitcode/pipeline-asset-pack # SynthesizeAssetPacks (future SettleAssetPacks)
1504+
```
1505+
1506+
`factorySDIVFExecutorPipeline` / `factorySDIVFPipeline` / `SDIVFPhase` live in
1507+
`@bitcode/generic-pipelines-sdivf`. AssetPack imports the base package directly.
1508+
`pipelines-generics` re-exports for compatibility.

FAMILIARIZATION.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,23 @@ pipeline-local tools e.g. AssetPackLexicalDepositorySearchTool
142142
### 3.3 Pipelines
143143

144144
```
145-
@bitcode/pipelines-generics Pipeline, PhaseDelegator, SDIVF factories, streaming
145+
@bitcode/pipelines-generics Pipeline, PhaseDelegator, composition, streaming
146146
147-
@bitcode/pipeline-asset-pack SynthesizeAssetPacks SDIVF (deposit | read modes)
148-
@bitcode/pipeline-hosts Inline host + Vercel Sandbox harness
147+
@bitcode/generic-pipelines-sdivf SDIVF *base* loop (Setup-[DIV]*-Finish)
148+
149+
@bitcode/pipeline-asset-pack SynthesizeAssetPacks (deposit | read);
150+
future SettleAssetPacks extends SDIVF base
151+
@bitcode/pipeline-hosts Inline host + Vercel Sandbox harness
149152
```
150153

151154
**SDIVF** = Setup → Discovery → Implementation → Validation → Finish
152155
(Discovery/Implementation/Validation may loop up to `maxIterations`).
153156

157+
Package path: `packages/generic-pipelines/SDIVF/` (`@bitcode/generic-pipelines-sdivf`).
158+
Product pipelines supply phase executors/agents; they do not reimplement the DIV loop.
159+
`pipelines-generics` re-exports SDIVF for compatibility — prefer importing
160+
`@bitcode/generic-pipelines-sdivf` in new code.
161+
154162
Product UI says **Pipeline**. Low-level packages may still say `execution` /
155163
`Execution` — do **not** rename `execution-generics` blindly.
156164

@@ -227,7 +235,8 @@ Grouped by role. Names are `@bitcode/<name>` unless noted.
227235
| `execution-generics` | `Execution` state tree, `Executor`, sequential/parallel/pipe |
228236
| `agent-generics` | Agent = Executor + PTRR + failsafes + generations |
229237
| `tools-generics` | `Tool` class, factories, MCP bridges |
230-
| `pipelines-generics` | Pipeline / PhaseDelegator / SDIVF factories / stream hooks |
238+
| `pipelines-generics` | Pipeline / PhaseDelegator primitives / stream hooks (re-exports SDIVF) |
239+
| `generic-pipelines-sdivf` | SDIVF base loop (`packages/generic-pipelines/SDIVF`) |
231240
| `llm-generics` | Pure LLM call contracts |
232241
| `registry` | Hierarchical registry (Prompt is a Registry) |
233242
| `prompts` | Prompt + PromptPart + **all** raw prompt parts |
@@ -562,7 +571,7 @@ as if they were source of product law.
562571
| --- | --- |
563572
| Executor composition | `execution-generics` sequential/parallel/pipe |
564573
| Agent PTRR | `agent-generics` |
565-
| Phase pipeline | `pipelines-generics` SDIVF factories |
574+
| Phase pipeline | `generic-pipelines-sdivf` base (via `pipelines-generics` primitives) |
566575
| Registry hierarchy | `registry``Prompt` |
567576
| Source-safe allowlist | pipeline streaming + deposit UI contracts |
568577
| Thin HTTP route | validate → dispatch → return id; long work off-request |

internal-docs/BITCODE_SOURCE_LAYOUT.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,9 @@ packages/
192192
src/
193193
product-analytics.ts
194194
btd/ # BTD measurement, journal, settlement, authority
195-
pipelines/ # AssetPack synthesis pipelines (SDIVF, …)
196-
pipelines-generics/
195+
pipelines-generics/ # Pipeline / PhaseDelegator primitives
196+
generic-pipelines/SDIVF/ # SDIVF base Pipeline (extends pipelines-generics)
197+
pipelines/asset-pack/ # SynthesizeAssetPacks (extends SDIVF base)
197198
agent-generics/ # PTRR agents (not product “Pipeline” UI)
198199
execution-generics/ # low-level executor primitives
199200
prompts/
@@ -248,8 +249,11 @@ bitcode/
248249
│ │ ├── journal.ts
249250
│ │ ├── operational-health.ts
250251
│ │ └── ...
252+
│ ├── pipelines-generics/ # Pipeline / PhaseDelegator primitives
253+
│ ├── generic-pipelines/
254+
│ │ └── SDIVF/ # @bitcode/generic-pipelines-sdivf base
251255
│ ├── pipelines/
252-
│ │ └── asset-pack/ # SynthesizeAssetPacks SDIVF, …
256+
│ │ └── asset-pack/ # SynthesizeAssetPacks (extends SDIVF)
253257
│ ├── agent-generics/
254258
│ ├── execution-generics/
255259
│ ├── prompts/

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"packages/*",
1111
"packages/generic-tools/*",
1212
"packages/generic-agents/*",
13+
"packages/generic-pipelines/*",
1314
"packages/pipelines/*",
1415
"uapi",
1516
"admin"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# generic-pipelines
2+
3+
Base pipeline implementations that extend `@bitcode/pipelines-generics` primitives.
4+
5+
## Hierarchy
6+
7+
```
8+
@bitcode/pipelines-generics # Pipeline / PhaseDelegator / composition primitives
9+
10+
@bitcode/generic-pipelines-sdivf # SDIVF base loop (this folder: SDIVF/)
11+
12+
@bitcode/pipeline-asset-pack # SynthesizeAssetPacks (and future SettleAssetPacks)
13+
```
14+
15+
## Packages
16+
17+
| Path | Package name | Role |
18+
| --- | --- | --- |
19+
| `SDIVF/` | `@bitcode/generic-pipelines-sdivf` | Setup-[Discovery-Implementation-Validation]*-Finish base |
20+
21+
Product pipelines supply phase agents/executors; they do not reimplement the DIV loop.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Jest configuration for @bitcode/generic-pipelines-sdivf
3+
*/
4+
module.exports = {
5+
preset: 'ts-jest/presets/js-with-ts',
6+
testEnvironment: 'node',
7+
testMatch: ['**/__tests__/**/*.test.(ts|tsx)'],
8+
roots: ['<rootDir>'],
9+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
10+
moduleNameMapper: {
11+
'^@bitcode/generic-pipelines-sdivf$': '<rootDir>/src/index.ts',
12+
'^@bitcode/pipelines-generics$': '<rootDir>/../../pipelines-generics/src/index.ts',
13+
'^@bitcode/pipelines-generics/(.*)$': '<rootDir>/../../pipelines-generics/src/$1',
14+
'^@bitcode/execution-generics$': '<rootDir>/../../execution-generics/src/index.ts',
15+
'^@bitcode/execution-generics/(.*)$': '<rootDir>/../../execution-generics/src/$1',
16+
'^@bitcode/agent-generics$': '<rootDir>/../../agent-generics/src/index.ts',
17+
'^@bitcode/agent-generics/(.*)$': '<rootDir>/../../agent-generics/src/$1',
18+
'^@bitcode/registry$': '<rootDir>/../../registry/src/index.ts',
19+
'^@bitcode/prompts$': '<rootDir>/../../prompts/src/index.ts',
20+
'^@bitcode/doc-comment$': '<rootDir>/../../pipelines-generics/src/__mocks__/doc-comment.ts',
21+
'^@bitcode/tools-generics$': '<rootDir>/../../pipelines-generics/src/__mocks__/tools-generics.ts',
22+
'^@bitcode/llm-generics$': '<rootDir>/../../llm-generics/src/index.ts',
23+
'^@bitcode/orm$': '<rootDir>/../../orm/src/index.ts',
24+
'^@bitcode/streams$': '<rootDir>/../../streams/src/index.ts',
25+
'^@bitcode/logger$': '<rootDir>/../../logger/src/index.ts',
26+
},
27+
globals: {
28+
'ts-jest': {
29+
tsconfig: '<rootDir>/../../../tsconfig.json',
30+
diagnostics: false,
31+
},
32+
},
33+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "@bitcode/generic-pipelines-sdivf",
3+
"version": "1.0.0",
4+
"description": "SDIVF base Pipeline implementation: Setup-[Discovery-Implementation-Validation]*-Finish extending pipelines-generics primitives",
5+
"main": "src/index.ts",
6+
"types": "src/index.ts",
7+
"exports": {
8+
".": "./src/index.ts",
9+
"./sdivf-factory": "./src/sdivf-factory.ts",
10+
"./sdivf-phases": "./src/sdivf-phases.ts"
11+
},
12+
"scripts": {
13+
"build": "tsc --noEmit",
14+
"typecheck": "tsc --noEmit",
15+
"test": "pnpm exec jest --config jest.config.cjs --passWithNoTests"
16+
},
17+
"dependencies": {
18+
"@bitcode/execution-generics": "workspace:*",
19+
"@bitcode/agent-generics": "workspace:*",
20+
"@bitcode/pipelines-generics": "workspace:*"
21+
},
22+
"devDependencies": {
23+
"@types/jest": "^29.5.12",
24+
"@types/node": "^20.0.0",
25+
"jest": "^29.7.0",
26+
"ts-jest": "^29.1.1",
27+
"typescript": "^5.0.0"
28+
}
29+
}

0 commit comments

Comments
 (0)