Skip to content

Add DeepWork Reviews — automated code review system#229

Merged
nhorton merged 16 commits intomainfrom
deep_review
Feb 23, 2026
Merged

Add DeepWork Reviews — automated code review system#229
nhorton merged 16 commits intomainfrom
deep_review

Conversation

@nhorton
Copy link
Contributor

@nhorton nhorton commented Feb 22, 2026

Summary

  • Adds a complete automated code review system driven by .deepreview YAML config files
  • Users place .deepreview files anywhere in their project tree (like .gitignore) to define review policies — what files to match, how to group them, and what instructions to give the reviewer
  • deepwork review --instructions-for claude discovers configs, diffs the branch, matches changed files, and generates parallel review task instructions for Claude Code
  • Three review strategies: individual (one review per file), matches_together (all matches in one review), all_changed_files (tripwire — any match triggers full-changeset review)
  • Supports inline or file-referenced instructions, agent personas, additional context flags, and policy traceability (each generated review links back to its source .deepreview file and line)
  • --files option and stdin pipe support for explicit file lists (bypasses git diff)
  • Two new plugin skills: review (runs reviews, acts on findings, iterates) and configure_reviews (helps set up .deepreview files)
  • README_REVIEWS.md usage documentation symlinked into the plugin

New files

  • src/deepwork/review/ — Full implementation (config, discovery, matcher, instructions, formatter, schema)
  • src/deepwork/cli/review.py — CLI command
  • specs/deepwork/review/REQ-001 through REQ-007 — Requirements
  • tests/unit/review/ — 122 unit tests (7 test files)
  • plugins/claude/skills/review/ and plugins/claude/skills/configure_reviews/ — Plugin skills
  • README_REVIEWS.md — Usage documentation

Test plan

  • uv run pytest tests/unit/review/ -v — 122 tests pass
  • uv run ruff check src/deepwork/review/ src/deepwork/cli/review.py — Clean
  • uv run mypy src/deepwork/review/ src/deepwork/cli/review.py — Clean
  • Manual: create a .deepreview file, make changes, run deepwork review --instructions-for claude
  • Manual: test --files option and stdin pipe

🤖 Generated with Claude Code

nhorton and others added 16 commits February 22, 2026 16:14
…iles

Implements a complete review system that lets users define `.deepreview` YAML
config files throughout their project tree. When `deepwork review` runs, it
discovers these configs, diffs the branch, matches changed files against rules,
and generates parallel review task instructions for Claude Code.

Key features:
- Three review strategies: individual, matches_together, all_changed_files
- Hierarchical config placement (like .gitignore)
- Inline or file-referenced review instructions
- Agent personas per platform
- Policy traceability (each review links back to its source rule)
- Explicit file list via --files or stdin pipe (skips git diff)
- Two new plugin skills: `review` (run reviews) and `configure_reviews`

Includes 7 REQ spec files, full implementation in src/deepwork/review/,
CLI command, 122 unit tests, and README_REVIEWS.md usage documentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rule

- Rename formatter output fields to match Claude Code Task tool parameters
  (Name→name, Agent→subagent_type, add description field)
- Default subagent_type to "general-purpose" instead of "Default"
- Add python_code_review rule referencing doc/code_review_standards.md
- Update REQ-006, SKILL.md, and tests to match new format

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add .deepreview config with requirements_traceability rule using requirements-reviewer agent
- Move deepreview schema to src/deepwork/schemas/ to match REQ-001.7.1
- Fix REQ-004.9.1 function signature to match implementation
- Add 13 tests for REQ-003 sub-requirements (changed file detection)
- Add test for REQ-006.5.3 (write error exits with code 1)
- Add full traceability comment blocks to ~90 tests
- Update module docstrings with "validates REQ-NNN" in all review test files
- Update requirements-reviewer agent: clarify directionality, make project-agnostic
- Update review skill: per-finding questions with multiple fix approach options
- Update configure_reviews skill: offer to run /review after configuration
- Add review MCP tool and related server/doc changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The repair workflow's errata step now removes legacy `deepwork serve`
entries from the repo's .mcp.json file, since this is handled by the
plugin system.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a job fails to parse, the error message now suggests running
`/deepwork:repair` so the agent knows how to resolve the issue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a `description` field (string, max 256 chars) as a required property
on each review rule. Update the JSON schema, config parser, dataclass,
all .deepreview files, README_REVIEWS.md examples, and test fixtures.

Also fix integration test skip condition for nested Claude sessions and
simplify CLAUDE.md dev environment instructions to use uv directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduces a new `get_configured_reviews` tool that lists configured
.deepreview rules with optional file-based filtering. Also adds a
python_lint review rule, post-commit reminder hook, and updates specs
and docs to reflect the description field requirement and new tool.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…, add traceability

- Fix *.egg-info glob pattern bug in discovery._SKIP_DIRS (set membership
  doesn't support globs; now uses endswith check)
- Promote _match_rule and _format_source_location to public API in matcher.py
- Surface discovery errors in mcp.py instead of silently discarding them
- Remove duplicate tests in test_mcp.py that didn't test platform behavior
- Add formal two-line traceability comments to all REQ-007/REQ-008 tests
- Update review infrastructure: python_lint instructions, review skill,
  requirements_traceability rule, and post-commit hook wording
- Apply ruff format and mypy type annotations across test files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Removes nix dependency from the validate workflow, using uv + setup-python
directly (matching other workflows). Splits the single job into three
parallel jobs (lint, typecheck, tests) so each shows as a separate check
line on PRs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The nix dev shell now wraps the claude binary with --plugin-dir flags
automatically, using the real binary's store path to avoid circular
PATH lookup. The standalone ./claude script is no longer needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merges the separate lint and typecheck CI jobs into one. Adds
enable-cache: true to all setup-uv steps across all workflows and
removes the redundant manual cache step in copilot-setup-steps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nhorton nhorton added this pull request to the merge queue Feb 23, 2026
Merged via the queue into main with commit f8d6442 Feb 23, 2026
9 checks passed
@nhorton nhorton deleted the deep_review branch February 23, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant