teardown — clean up plugin files

Caution

Teardown deletes brewcode project files permanently. Templates, configs, logs, plan directories, and grepai indexes are removed. The operation asks for confirmation before touching anything — unless --dry-run is passed.

Tip

Task directories and user rules are never touched. Everything under .claude/tasks/*_task/ and .claude/rules/ survives teardown unconditionally. Use --dry-run first to preview exactly what would be removed.

Quick reference

FieldValue
Command/brewcode:teardown
Arguments[--dry-run]
Modelhaiku
Contextfork
ToolsBash, Read, AskUserQuestion

When to use

  • Project wrap-up — the task batch is done and the brewcode scaffolding is no longer needed in the repo
  • Fresh start — you want to re-run /brewcode:setup on a clean slate without leftover configs
  • Disk cleanup.grepai/ indexes or log directories have grown large and are no longer useful
  • Preview before commit--dry-run shows exactly which files would go, without committing to removal

Examples

# Preview removals without deleting anything
/brewcode:teardown --dry-run

# Full teardown (prompts for confirmation)
/brewcode:teardown
# Natural language also triggers the skill
"clean up brewcode files"
"tear down brewcode setup"

Flow

  1. Receive arguments

    The skill reads $ARGUMENTS. If —dry-run is present, skip confirmation and go straight to listing. Otherwise proceed to the confirmation step.

  2. Confirm (full mode only)

    AskUserQuestion: “This will delete brewcode project files (templates, configs, logs, plans). Task directories are preserved. Proceed?” — answering No aborts with no changes made.

  3. Run teardown script

    Executes teardown.sh from $CLAUDE_SKILL_DIR/scripts/. In dry-run mode the script only prints; in full mode it deletes. The skill stops with an error if the script is missing or not executable.

  4. Print removal report

    Each removed path is listed with a ✅. Paths that were skipped (not found or preserved) are listed with ⏭️. No silent deletions.

  5. Done

    The project directory is clean. Run /brewcode:setup again at any time to re-initialise scaffolding.

Options

OptionBehavior
--dry-runList files that would be deleted — no confirmation prompt, no changes
(none)Full removal after explicit user confirmation
What teardown removes vs. keeps

Removed

PathContents
.claude/tasks/templates/PLAN.md, SPEC.md, KNOWLEDGE.jsonl starters
.claude/tasks/cfg/brewcode.config.json, brewcode.state.json
.claude/tasks/logs/Execution logs
.claude/plans/Intermediate plan files
.grepai/Semantic search indexes
.claude/skills/brewcode-review/Quorum review working files

Always preserved

PathReason
.claude/tasks/*_task/Completed task work — your artifacts
.claude/rules/User rules — not managed by brewcode
🚀

Setup

Re-initialise brewcode scaffolding after teardown.

💻

Start

Infinite task execution — the skill teardown cleans up after.

🔗

GitHub source

Source code and teardown.sh script.

📄

Brewcode overview

All brewcode skills and agents in one place.

Updating plugins

Use /brewtools:plugin-update to check and update the brewcode plugin suite in one command. See the FAQ for details.