Review: Fix cleanup-worktrees.sh repo list (re-review)
Verdict: READY
Template Completeness
- [x] Type — Bug
- [x] Lineage — standalone, references spec and plan docs
- [x] Repo — forgejo_admin/claude-custom
- [x] What Broke — clear description of stale REPO_DIRS array (minor nit: says "missing 13" but AC lists 15 additions)
- [x] Repro Steps — step-by-step with line numbers, corrected from v1 review
- [x] Expected Behavior — 22 active repos target
- [x] Environment — hook file, event, counts
- [x] Acceptance Criteria — 5 criteria, all testable
- [x] Related — project, SOP, and previous review references
All required bug template sections present. Template is complete.
Traceability
- [x] story:pm-scope — present on board item #509
- [x] arch:worktree — present on board item #509
- [x] Forgejo issue — forgejo_admin/claude-custom#195, open
All three traceability legs present.
File Targets
- [x]
hooks/cleanup-worktrees.shlines 15-25 — verified: REPO_DIRS array at those exact lines with 9 entries - [x] Remove
pal-e-api— verified: does NOT exist on disk - [x] Remove
pal-e-sdk— verified: does NOT exist on disk - [x] Keep
pal-e-mcp— verified: EXISTS on disk at~/pal-e-mcp(v1 error corrected) - [x] Keep
palworld-server— verified: EXISTS on disk at~/palworld-server(v1 error corrected) - [x] Keep
pal-e-platform,pal-e-app,pal-e-services,claude-custom,basketball-api— all verified on disk - [x] Add
pal-e-docs— verified on disk - [x] Add
pal-e-docs-sdk— verified on disk - [x] Add
pal-e-deployments— verified on disk - [x] Add
westside-app— verified on disk - [x] Add
westside-contracts— verified on disk - [x] Add
mcd-tracker-api— verified on disk - [x] Add
mcd-tracker-app— verified on disk - [x] Add
minio-sdk— verified on disk - [x] Add
minio-api— verified on disk - [x] Add
pal-e-mail— verified on disk - [x] Add
minio-playground— verified on disk - [x] Add
mcd-tracker-playground— verified on disk - [x] Add
tmux-custom— verified on disk - [x] Add
pal-e-docs-playground— verified on disk - [x] Add
westside-playground— verified on disk
All 22 repos independently verified on disk via
[ -d "$d/.git" ]. All 5 errors from v1 review have been corrected in the updated issue body.Repo Placement
OK. Fix is in claude-custom, issue is filed on claude-custom. Single-repo, single-file change.
Dependencies
Board items #507 (Pre-spawn freshness hook) and #508 (Post-merge worktree cleanup) are sibling worktree items in next_up. No blocking dependency — this bug fix is independent. All three share the same brainstorm lineage.
Acceptance Criteria
5 criteria, all verifiable by an agent:
- AC1 (remove 2 stale repos) — verifiable via grep/diff
- AC2 (keep 7 existing repos) — verifiable via array inspection
- AC3 (add 15 missing repos) — verifiable via grep
- AC4 (final count = 22) — verifiable via wc -l on array
- AC5 (existing hook logic unchanged) — verifiable via diff excluding REPO_DIRS block
All criteria are machine-testable. No ambiguity.
Blast Radius
REPO_DIRS is only used in hooks/cleanup-worktrees.sh. No other scripts reference it. The hook is wired via settings.json line 37. Blast radius is minimal. Note: 72 git repos exist on disk total; the 22 targeted repos match the "active project repos" listed in MEMORY.md. The remaining ~50 are SDK/MCP/archived repos — reasonable to exclude from worktree cleanup.Decomposition
1 file target, 5 acceptance criteria, estimated under 2 minutes agent time. No decomposition needed.
Recommendation
[BODY](cosmetic, non-blocking) "What Broke" says "missing 13 active repos" but AC lists 15 repos to add. The AC is authoritative — the prose count is stale. An implementing agent should follow the AC, not the prose.
No blocking issues. Ticket is ready for execution.
Previous Review
v1 review (
review-509-2026-03-27) found 5 errors — all 5 have been corrected in the updated issue body:pal-e-mcpno longer incorrectly marked for removal (kept)pal-e-docs-mcpno longer incorrectly listed as addition (does not exist)palworld-serverno longer incorrectly marked for removal (kept)- 6 missing repos (
pal-e-mail,minio-playground,mcd-tracker-playground,tmux-custom,pal-e-docs-playground,westside-playground) now included in additions - Target count updated from 15 to 22