Context
Stack Effect already applies plans to an in-memory filesystem for CLI dry-runs and Recipe Builder previews. The current preview path prepares the virtual repository, runs Apply, reads the generated files, and builds the preview response.
This works today, but it makes preview-specific code responsible for workspace setup and result capture.
Benefits
- Give CLI previews, browser previews, and tests one consistent way to run Apply in isolation.
- Keep filesystem setup, path mapping, repository seeding, and cleanup in one module.
- Ensure the Apply result and captured files describe the same workspace state.
- Provide a reusable foundation for stronger catalog tests and future programmatic consumers.
Expected changes
- Introduce a scaffold-layer module that materializes an Apply intent inside an isolated workspace.
- Let callers inspect the Apply outcome and resulting files without knowing how the filesystem is wired.
- When a caller plans and applies in one workflow, ensure both operations observe the same owned workspace.
- Keep the existing preview response stable unless consumers clearly benefit from a change.
- Keep Effect VFS volume and snapshot types internal unless a stable consumer needs them.
This should remain narrower than #181. It owns isolated workspace creation, seeding, path wiring, and result capture—not end-to-end workflow orchestration, user decisions, presentation, Finalize, or configuration mutation. It must not replace Plan or Apply with filesystem state.
Repository-state authority and drift semantics remain owned by #175. This issue consumes that contract when preparing and materializing the workspace.
Done when
Blocked by
Related
Context
Stack Effect already applies plans to an in-memory filesystem for CLI dry-runs and Recipe Builder previews. The current preview path prepares the virtual repository, runs Apply, reads the generated files, and builds the preview response.
This works today, but it makes preview-specific code responsible for workspace setup and result capture.
Benefits
Expected changes
This should remain narrower than #181. It owns isolated workspace creation, seeding, path wiring, and result capture—not end-to-end workflow orchestration, user decisions, presentation, Finalize, or configuration mutation. It must not replace Plan or Apply with filesystem state.
Repository-state authority and drift semantics remain owned by #175. This issue consumes that contract when preparing and materializing the workspace.
Done when
Blocked by
Related