Skip to content

Host each Flect app in a persistent incremental frontend workspace #33

Description

@robinbraemer

Outcome

Give the agent and the visible frontend one fast, persistent, canonical application workspace. Flect must host an ordinary browser-compatible app well enough that the agent can create, run, inspect, and revise it continuously instead of passing source through disposable mirrors, full rebuilds, capsule packaging, and review gates.

Required behavior

  • Make one versioned source workspace the authority used by agent tools, Git history, dependency resolution, builds, and the live canvas.
  • Keep the compiler, module graph, preview route, and required Workers warm across edits.
  • Invalidate and rebuild only affected modules and assets; use HMR or an equivalent state-preserving update when safe.
  • Keep the last successful frontend running while a new edit builds or fails.
  • Persist verified package graphs and reuse them offline after the first successful resolution.
  • Give the agent bounded file, patch, search, build, test, and process-lifecycle tools over that same workspace.
  • Prevent repository reference checkouts such as .repos/effect, generated evidence, caches, and unrelated worktrees from entering the Vite watch graph.
  • Use the same host contract in a normal browser and the packaged WebView.
  • Keep capsule creation, signing, installation, and sharing outside the interactive edit path.

Acceptance criteria

  • A clean checkout with the pinned toolchain completes frozen dependency installation and starts the browser development host without manual repair.
  • Starting Flect causes no reload storm from the pinned Effect reference checkout or other excluded directories.
  • Vanilla, React, Vue, and Svelte browser-compatible fixtures can stay running while source, CSS, and assets update incrementally.
  • A text or CSS patch becomes visible without a full application reload; a component patch preserves unaffected state where the framework supports it.
  • Fifty consecutive edits reuse the warm host, remain inside the performance and memory budgets, and leave no orphan Workers or preview routes.
  • A failed compile preserves the prior interactive canvas and returns source-located diagnostics to the agent.
  • A warmed dependency graph rebuilds with registry access disabled.
  • Exported source remains an ordinary recognizable Git repository and is not coupled to a proprietary build service.

Non-goals

  • Full Node, native-addon, lifecycle-script, or arbitrary Vite-plugin compatibility in the browser.
  • Using capsule installation as the normal authoring loop.
  • Giving generated code ambient filesystem, network, credential, or native authority.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:authoringBrowser authoring, building, and source importenhancementNew feature or requestpriority:P0Immediate product-loop or correctness prioritystatus:implementedImplemented and locally verified; awaiting publication workflow

    Type

    No type

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions