Skip to content
This repository was archived by the owner on Nov 25, 2026. It is now read-only.
This repository was archived by the owner on Nov 25, 2026. It is now read-only.

Two-phase destructive operations: --dry-run and refuse-if-unknown-files for every script that deletes #139

Open

Description

@CloneOfAlex

Describe your idea

Any script that deletes (scaffold-setup-skill.py rmtree, cleanup-legacy.py, the cleanup_legacy_* paths in the merge scripts) should support --dry-run, print the exact plan, and refuse to delete a directory containing files it didn't create unless --force is given.

Why is this needed?

#96 and the scaffold-setup-skill regenerate bug both lose user data, and in both the script reported success. A dry-run plan makes the LLM-driven setup flow show the user what will be deleted before it happens, which matches BMad's human-in-the-loop principle.

How should it work?

  • --dry-run outputs the same JSON with would_remove: [...].
  • A manifest (.bmad-generated.json) written by scaffolders lists files they own. Cleanup only removes files listed there.
  • The setup SKILL.md runs dry-run first and asks for confirmation unless -H (headless) is set.

PR

Happy to help implement this if the direction is agreed.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions