Skip to content

Virtual File Tree / In-Memory Generation #108

@lloydrichards

Description

@lloydrichards

Motivation

Apply writes directly to the filesystem with no way to generate a project in memory. This limits testing (needs temp dirs), blocks a programmatic API, prevents web-based previews, and makes JSON output mode harder since composed outcomes need resolving.

Inspiration

  • Nx: Tree abstraction -- all generators write to a virtual tree, applied to disk at the end
  • Yeoman: mem-fs + mem-fs-editor -- in-memory filesystem flushed with conflict resolution
  • better-t-stack: createVirtual() returns a VirtualFileTree without touching disk

User Story

As a tool author, I want to generate a project in memory and consume the file tree as data, without filesystem side effects.

Notes

The Plan already contains file contents for complete outcomes and seedContents + operations for composed outcomes. An in-memory mode is essentially "resolve all composed outcomes to final contents without writing." This would be a prerequisite for a future MCP server or programmatic API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions