You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(review): default to minimal 'reviewer' subagent on Sonnet (#364)
* feat(review): default to minimal 'reviewer' subagent on Sonnet
Ship a new 'reviewer' subagent in the DeepWork Claude plugin pinned to
Sonnet with minimal instructions, and default review dispatch to it.
Opus→Sonnet across parallel review fan-out is the dominant cost lever.
Per-rule agent overrides still take precedence.
The reviewer's tools list includes dual-wildcard MCP prefixes
(mcp__plugin_deepwork_deepwork__* and mcp__deepwork-dev__*) so the same
agent file resolves mark_review_as_passed in both production (plugin
install only) and development (dev MCP server, with or without plugin)
contexts. Spec REVIEW-REQ-006.3.c and test_formatter.py are updated in
lockstep; stale REVIEW-REQ-006.3.3b/c cross-references corrected.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address review findings — ID numbering, docs, and PLUG-REQ-001.14
- Fix test_formatter.py traceability comment IDs: restore the .3.3
hierarchy level (REVIEW-REQ-006.3.3c, .3.3b) instead of the
incorrectly shortened .3.c, .3.b format.
- Update README_REVIEWS.md example output to match current formatter
format (name/description/subagent_type/prompt fields, reviewer default).
- Add agents/ directory to CLAUDE.md and doc/architecture.md project
structure trees.
- Add PLUG-REQ-001.14 (Default Reviewer Subagent) formalizing the
reviewer agent's existence, model, tools, and behavioral constraints.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
By default, `/review` dispatches each review task to the `reviewer` subagent shipped with the DeepWork Claude plugin (`plugins/claude/agents/reviewer.md`). If you are developing against this repo with only the dev MCP server (`uv run deepwork serve`) and no plugin installed, Claude Code cannot resolve `subagent_type: reviewer` and review dispatch will fail.
539
+
540
+
To run reviews as a contributor, install the plugin alongside the dev server: `claude plugin marketplace add Unsupervisedcom/deepwork && claude plugin install deepwork@deepwork-plugins`. The plugin ships the reviewer agent file, and either MCP server prefix (`mcp__deepwork-dev__*` or `mcp__plugin_deepwork_deepwork__*`) will resolve the reviewer's tools.
description: Minimal review subagent for DeepWork review tasks. Reads a supplied instruction file, performs the review against the criteria in that file, and reports results via the DeepWork MCP mark_review_as_passed tool. Use when dispatching parallel review tasks from .deepreview rules or workflow quality gates.
4
+
model: sonnet
5
+
color: cyan
6
+
tools:
7
+
- Read
8
+
- Grep
9
+
- Glob
10
+
- Bash
11
+
- "mcp__plugin_deepwork_deepwork__*"
12
+
- "mcp__deepwork-dev__*"
13
+
---
14
+
15
+
You are a DeepWork review agent. Your only job is to execute one review task and report the result.
16
+
17
+
**Process**
18
+
19
+
1. Read the instruction file referenced in the user prompt (e.g. `@.deepwork/tmp/review_instructions/<id>.md`). The file contains the review criteria, the file(s) to review, and the expected verdict format.
20
+
2. Perform the review exactly against the criteria in that file. Use `Read`, `Grep`, `Glob`, and `Bash` to examine only the files the instructions direct you to examine.
21
+
3. When finished, call `mark_review_as_passed` with the structured verdict the instructions specify. Use whichever DeepWork MCP prefix is available in your environment (`mcp__plugin_deepwork_deepwork__mark_review_as_passed` in production; `mcp__deepwork-dev__mark_review_as_passed` in development).
22
+
4. If the instructions ask you to call additional DeepWork MCP tools (e.g. `get_configured_reviews`, `get_named_schemas`), use whichever prefix is available in your environment.
23
+
24
+
**Constraints**
25
+
26
+
- Do not edit files. You are a read-only reviewer.
27
+
- Do not explore beyond what the instructions direct. No scope creep.
28
+
- Do not add commentary outside the structured verdict the instructions request.
29
+
- If the instructions are ambiguous, apply them as literally as possible and note the ambiguity in the verdict rather than asking for clarification.
Copy file name to clipboardExpand all lines: specs/deepwork/cli_plugins/PLUG-REQ-001-claude-code-plugin.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,3 +98,12 @@ The Claude Code plugin is the primary distribution mechanism for DeepWork on the
98
98
2. The skill MUST document how DeepWork Reviews work, including `.deepreview` config format, review strategies (`individual`, `matches_together`, `all_changed_files`), and how changed files are detected.
99
99
3. The skill MUST explain how DeepSchemas automatically generate synthetic review rules.
100
100
4. The skill MUST describe workflow quality gates and how `finished_step` triggers reviews on step outputs.
101
+
102
+
### PLUG-REQ-001.14: Default Reviewer Subagent
103
+
104
+
1. The plugin MUST ship a default reviewer subagent at `plugins/claude/agents/reviewer.md`.
105
+
2. The agent's `model` frontmatter field MUST be set to `sonnet` to reduce per-review cost relative to the parent session's model.
106
+
3. The agent's `tools` frontmatter field MUST include at minimum `Read`, `Grep`, `Glob`, and `Bash`, plus DeepWork MCP tools needed for review completion (`mark_review_as_passed`) in both the production (`mcp__plugin_deepwork_deepwork__*`) and development (`mcp__deepwork-dev__*`) MCP server prefixes.
107
+
4. The agent body MUST instruct the subagent to read the instruction file from the user prompt, perform the review against the criteria in that file, and call `mark_review_as_passed` to report results.
108
+
5. The agent body MUST instruct the subagent not to edit files and not to explore beyond what the review instructions direct.
109
+
6. When the review formatter renders tasks with no per-rule agent persona specified (`agent_name` is `None`), it MUST default to `"reviewer"` as the `subagent_type` (see REVIEW-REQ-006.3.3c).
Copy file name to clipboardExpand all lines: specs/deepwork/review/REVIEW-REQ-006-cli-review-command.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ The `deepwork review` CLI command orchestrates the full DeepWork Reviews pipelin
32
32
3. For each review task, the output MUST include fields matching the Claude Code `Task` tool parameters:
33
33
a. A `name` field formatted as `"{scope_prefix}{rule_name} review of {file_or_scope}"` — for `individual` strategy, `{file_or_scope}` is the single filename; for grouped strategies, it is a summary (e.g., `"3 files"`). When the rule comes from a `.deepreview` in a subdirectory, `{scope_prefix}` MUST be `"{parent_dir_name}/"` (e.g., `"my_job/"`); for root-level `.deepreview` files, `{scope_prefix}` MUST be empty.
34
34
b. A `description` field with a short (3-5 word) summary for the task (e.g., `"Review {rule_name}"`). When the rule comes from a `.deepreview` in a subdirectory, the description MUST include the scope (e.g., `"Review my_job/{rule_name}"`).
35
-
c. A `subagent_type` field set to the agent persona name (from the rule's `agent.claude` value) or `"general-purpose"` if no persona is specified.
35
+
c. A `subagent_type` field set to the agent persona name (from the rule's `agent.claude` value) or `"reviewer"` if no persona is specified. `"reviewer"` refers to the default reviewer subagent shipped by the DeepWork Claude plugin (`plugins/claude/agents/reviewer.md`).
36
36
d. A `prompt` field referencing the instruction file path relative to the project root, prefixed with `@` (e.g., `@.deepwork/tmp/review_instructions/7142141.md`).
37
37
4. The instruction file paths MUST be relative to the project root.
38
38
5. When running inside a git worktree, the formatter MUST resolve `@file` paths relative to the main working tree root (not the worktree root), because Claude Code expands `@file` references relative to the main repo root. The main repo root MUST be detected via `git rev-parse --path-format=absolute --git-common-dir`. If git is unavailable or the directory is not a worktree, the formatter MUST fall back to using the project root.
0 commit comments