Skip to content

feat(scaffold-core): materializer/ module — refactor facts→files path #218

@stackbilt-admin

Description

@stackbilt-admin

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions