dispatch-review-guard.en — Claude Code rule: install
dispatch-review-guard.en is a Claude Code rule that checks review markers before a task is dispatched to a subagent.
Apache-2.0 ★ 262 updated 2026-11-17
.claude/rules/dispatch-review-guard.en.mdWhat dispatch-review-guard.en does
dispatch-review-guard.en validates the marker attached to each dispatched request. Research, small changes, one-off scripts, and code reviews use their respective exemptions, while a review request must include the user's quoted words. The reviewer stores its conclusion in a file under {{REVIEWS}}/, and each review file can be consumed once.
The main session does not edit code files directly; a subagent handles those changes. A document must first be registered with {{PYTHON}} {{HOOKS}}/doc-ok.py <file>. Prompts, SPEC files, and agent definitions are excluded from that document check. The ~/.claude, /tmp, and wiki directories are exempt.
Research from directories listed in HOOK_RESEARCHER_DIRS goes to researcher, or to Sonnet when named explicitly. Teammate names come from HOOK_TEAMMATES; directories without this configuration are unaffected.
What it helps with
- check a dispatch marker before assigning work
- store a review conclusion in a separate file
- route research to the
researcherteammate - register a document with
doc-ok.pybefore editing - keep the main session from editing code directly
Example prompts for the agent
- Review this change and write the conclusion to a file under
{{REVIEWS}}/. - Send research from a directory in
HOOK_RESEARCHER_DIRStoresearcher. - Edit
README.mdthrough a subagent after registering it with{{PYTHON}} {{HOOKS}}/doc-ok.py.
How to install dispatch-review-guard.en
Manually: put the files in place
.claude/rules/dispatch-review-guard.en.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/dispatch-review-guard.en.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/dispatch-review-guard.en.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/dispatch-review-guard.en.mdManually: put the files in place
.clinerules/dispatch-review-guard.en.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about dispatch-review-guard.en
How do I install dispatch-review-guard.en in Claude Code?
Place the file at .claude/rules/dispatch-review-guard.en.md.
What does dispatch-review-guard.en do?
It validates dispatch markers, routes research and review work to subagents, and blocks direct code edits from the main session.
What does dispatch-review-guard.en need to work?
It needs {{PYTHON}}, the {{HOOKS}}/doc-ok.py script, directories configured in HOOK_RESEARCHER_DIRS, and teammate names supplied through HOOK_TEAMMATES.
Source text
dispatch-review-guard.en.md · Apache-2.0
- Review marks on a dispatch (dispatch-review-guard): a prompt without a mark passes; a mark is checked as follows
- research, small change, one-off script, code review: 【免审:调研】【免审:小改动】【免审:一次性脚本】【免审:代码审查】 — passes;
- a review: start with 【审稿】 and quote the user's own words verbatim (in 「」 or “” or ""); the reviewer writes its conclusion (containing 审稿结论) to `{{REVIEWS}}/<name>.md`;
- a reviewed action may carry 【已审:{{REVIEWS}}/<name>.md】 naming that review file; each file can be used once.
The main session does not edit code files itself; a subagent does. `~/.claude`, `/tmp` and the wiki directory are exempt. Before editing a document, register it with `{{PYTHON}} {{HOOKS}}/doc-ok.py <file>` (prompts, SPECs and agent definitions are not documents).
- In HOOK_RESEARCHER_DIRS, dispatch research to researcher (or explicitly Sonnet). Unconfigured directories are unaffected. Configure teammate names through HOOK_TEAMMATES.
© zuiho-kai · Apache-2.0 · zuiho-kai/bothouse