Skip to content

bug-hunt: judge agent writes REVIEW-BUGS.md to worktree root due to missing review path #46

Description

@skytect
Human NoteREVIEW-BUGS.md showed up in my root
Version6.0.0
Skillrapid:bug-hunt

Bug Description

The bug-hunt judge subagent writes REVIEW-BUGS.md to the worktree root (e.g. .rapid-worktrees/foundation/REVIEW-BUGS.md) instead of .planning/sets/{setId}/REVIEW-BUGS.md. The orchestrator then writes its own canonical version to the correct path, but never cleans up the judge's misplaced copy.

The two files have different formats: the worktree root copy uses the judge's role-judge.md template (H1-xxx IDs, narrative "Hunter evidence"/"Advocate response"/"Ruling" structure), while the canonical version uses the orchestrator's BUG-xxx structure.

Steps to Reproduce

  1. Run /rapid:bug-hunt on a set that uses a worktree
  2. After completion, check the worktree root directory (e.g. .rapid-worktrees/{setId}/)
  3. A REVIEW-BUGS.md exists at the worktree root in addition to the canonical copy at .planning/sets/{setId}/REVIEW-BUGS.md

Root Cause / Suggested Fix

Contradictory specifications between role definition and skill orchestrator:

  1. src/modules/roles/role-judge.md (lines 11, 19, 50) tells the judge to "Write REVIEW-BUGS.md at the review path" and expects a "Review path" input.
  2. skills/bug-hunt/SKILL.md step 3.6 (lines 228-255) spawns the judge but never passes a ## Review Path section. It only passes Findings, Challenges, Working Directory, and Instructions.
  3. skills/bug-hunt/SKILL.md step 3.8 (lines 269-276) has the orchestrator write its own REVIEW-BUGS.md to the correct path.

At runtime, the judge follows its role definition and writes REVIEW-BUGS.md, but without a review path it falls back to writing relative to the ## Working Directory (the worktree root).

Suggested fix (Option B preferred): Add "Do NOT write REVIEW-BUGS.md — only return rulings data via RAPID:RETURN" to the judge instructions in step 3.6, and update role-judge.md to remove the write responsibility. This is cleaner since the orchestrator already reformats the output with its own BUG-xxx ID scheme.

Workaround

Manually delete the misplaced file from the worktree root, or run /rapid:cleanup on the set.

Related Issues

None identified.

Co-Authored-By: Claude Opus 4.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-authoredIssue was written with AI assistancebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions