Part of #212.
Scope
Move and refactor stackbilt-web/src/lib/scaffold-materializer.ts into packages/scaffold-core/src/materializer/. This is the TarotScript-origin path (facts Record → files) and is distinct from the intention→files path in codegen/.
Files to create
| File |
Responsibility |
index.ts |
materializeScaffold(facts, intention) → MaterializerResult — main entry point |
adf.ts |
.ai/core.adf, .ai/state.adf, .ai/manifest.adf generators |
project.ts |
wrangler.toml, package.json, src/index.ts, test/index.test.ts, README.md generators |
Note on two paths
The package exposes two separate entry points:
buildScaffold(intention) — the intention→files path (classify → governance → codegen)
materializeScaffold(facts) — the facts→files path (TarotScript scaffold-cast output → files)
Both produce ScaffoldFile[] with identical shape. The materializer path is kept for backwards compatibility with TarotScript consumers.
Tests
Parity test: given the same project shape, buildScaffold and materializeScaffold must produce structurally equivalent output (same file paths, same binding declarations).
Part of #212.
Scope
Move and refactor
stackbilt-web/src/lib/scaffold-materializer.tsintopackages/scaffold-core/src/materializer/. This is the TarotScript-origin path (facts Record → files) and is distinct from the intention→files path incodegen/.Files to create
index.tsmaterializeScaffold(facts, intention) → MaterializerResult— main entry pointadf.ts.ai/core.adf,.ai/state.adf,.ai/manifest.adfgeneratorsproject.tswrangler.toml,package.json,src/index.ts,test/index.test.ts,README.mdgeneratorsNote on two paths
The package exposes two separate entry points:
buildScaffold(intention)— the intention→files path (classify → governance → codegen)materializeScaffold(facts)— the facts→files path (TarotScript scaffold-cast output → files)Both produce
ScaffoldFile[]with identical shape. The materializer path is kept for backwards compatibility with TarotScript consumers.Tests
Parity test: given the same project shape,
buildScaffoldandmaterializeScaffoldmust produce structurally equivalent output (same file paths, same binding declarations).