Add /dispatch command for adversarial-reviewer

Packages review findings into Gitea issues and a retrievable handoff
file. Target project picks up dispatched work via /resume dispatch.
Closes the review-request → review → dispatch → resume loop.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-22 20:47:34 +01:00
parent 39a807d7ac
commit 82532302c1

View File

@@ -0,0 +1,100 @@
# Dispatch Review Findings — /dispatch
Package review findings into Gitea issues and a retrievable handoff for the target project. Run this after `/review` or after any conversation in adversarial-reviewer that produced actionable findings.
## Arguments
$ARGUMENTS is optional. It can be:
- A project name: `server-management`, `music-management`, `ersatztv`, `wiim-now-playing`, `media-management`, `homelab-docs`
- Empty — deduce from conversation context (which project was reviewed, which project has findings)
## Steps
### 1. Identify the Target Project
If no argument given, determine the target from conversation context:
- Which project was just reviewed?
- Which project has the open findings or action items?
- If findings span multiple projects, ask which to dispatch first (run `/dispatch` once per target)
Map project name to Gitea repo owner/name and local path:
- `server-management``timothy/server-management`, `~/server-management`
- `music-management``timothy/music-management`, `~/music-management`
- `ersatztv``timothy/ersatztv`, `~/ersatztv`
- `wiim-now-playing``timothy/wiim-now-playing`, `~/wiim-now-playing`
- `media-management``timothy/media-management`, `~/media-management`
- `homelab-docs``timothy/homelab-docs`, `~/homelab-docs`
### 2. Collect Findings
Gather all actionable findings from the current conversation:
- Review findings (from `/review` or ad-hoc discussion)
- Bug reports, feature requests, or operational issues identified
- Cross-project requests (e.g., "needs an NFS mount" → server-management)
For each finding, determine:
- Title (concise, imperative)
- Body (what's wrong, why it matters, what to do)
- Severity/priority
- Whether it needs `[PLAN-MODE]` tag
### 3. File Gitea Issues
For each finding that doesn't already have an issue:
- Create an issue in the target repo via `mcp__gitea__create_issue`
- Note the issue number
Skip findings that already have open issues — just reference the existing issue number.
### 4. Create Dispatch Handoff
Write (or overwrite) a handoff file at:
`~/.claude/projects/-Users-timothy-adversarial-reviewer/memory/handoff_dispatch_[project].md`
Use this format:
```markdown
---
name: Dispatch to [project]
description: Review findings dispatched to [project] on [date]
type: project
---
# Dispatch to [project] — [date]
## Source
adversarial-reviewer — [brief context: what review triggered this, conversation topic]
## Issues Filed
- [repo]#[N]: [title] [PLAN-MODE if tagged]
- [repo]#[N]: [title]
## Priority Order
1. [issue ref] — [why this is first, what it unblocks]
2. [issue ref] — [context]
## Context the Implementer Needs
- [key context that isn't in the issue body — operational state, dependencies, gotchas]
- [vault doc references if relevant: "see Docker/Music Pipeline.md#beets for current config"]
## Acceptance Criteria
- [what "done" looks like for this dispatch — all issues closed? specific state achieved?]
```
### 5. Update MEMORY.md
If this is a new handoff file, add a pointer to it in adversarial-reviewer's MEMORY.md.
### 6. Close Review Request (if applicable)
If this dispatch originated from a review request issue (filed by `/review` from another project), close that adversarial-reviewer issue with a comment linking to the dispatched issues.
### 7. Output Resume Instruction
Tell the user:
```
Dispatched [N] findings to [project] ([N] new issues, [N] existing).
Run /resume dispatch in ~/[project] to pick up this work.
```