Skip to content

[Request]: init/bootstrap cannot create a site in a directory that already holds a frontend #814

Closed

Description

@jimhoyd

Problem or use case

This came up while building urlcode bootstrap for #807, in PR #813.

A common starting point is a directory that already holds a prebuilt frontend, for example frontend/ with a built SPA. urlcode init refuses a destination that holds user files. So urlcode bootstrap DIR --create, which hands off to init, cannot create a site around the frontend. It reports the refusal, keeps the files, and leaves the agent to improvise the layout, which is where the nested app/app and the wrong-root asset paths seen in #807's trials come from.

Proposed behavior and alternatives

Choose one:

  • Let init adopt a non-empty directory when every existing entry is outside the files init would write. It would never overwrite anything, would list what it left alone, and would still refuse on any collision.
  • Alternatively, keep refusing but have init and bootstrap print the exact supported layout, such as creating the site next to the frontend and copying its build into app/.

Either way, any change must stay idempotent and must never overwrite a user file.

Evidence

Observed in the #807 agent's work: test/bootstrap.test.ts asserts that the refusal keeps the files. Not otherwise reproduced or measured with agents.


Generated by Claude Code

Activity

  1. added
    enhancement
    ai-first
    on Sep 27, 2026
  2. jimhoyd commented on Sep 27, 2026

    @jimhoyd
    CollaboratorAuthor

    Decision (owner, 2026-09-27): init adopts a non-empty directory when nothing collides with its write set. It never overwrites, refuses and lists any collisions, and reports what it left alone. bootstrap --create follows the same rule.


    Generated by Claude Code

  3. added
    in-progress
    on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-firstenhancementin-progress

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions