nettee / nettee/worktree-kit

feat: add interactive stale worktree cleanup with wtk clean

Open
#33 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2
Forks
0
Avg merge
28m
Merged PRs (30d)
1

Description

What to build

Add wtk clean, an interactive command for cleaning up leftover/stale worktrees. The command should inspect candidate worktrees, explain why each one appears safe or risky to remove, show a confidence level for cleanup, and support confirmed batch cleanup.

The goal is to make cleanup safer and more transparent than manually deleting directories or running low-level Git commands.

Acceptance criteria

  • wtk clean discovers leftover/stale worktree cleanup candidates.
  • Each candidate includes a human-readable explanation and a cleanup confidence level, such as high/medium/low.
  • The command is interactive by default and requires explicit confirmation before deleting/pruning anything.
  • Users can select multiple candidates and clean them in one confirmed batch.
  • Low-confidence or ambiguous candidates are clearly marked and are not silently cleaned.
  • The command fails fast with a clear error if required repository/worktree state cannot be determined.
  • Tests cover discovery, confidence classification, confirmation flow, cancellation, and batch cleanup behavior.

Blocked by

None - can start immediately

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the CLI entry point for wtk clean and the Git worktree state needed to discover candidates. Use the acceptance criteria to define done: explained confidence levels, explicit interactive confirmation, cancellation and batch behavior, safe handling of ambiguous candidates, fail-fast errors, and tests for each flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.