Add DeepWork Reviews — automated code review system#229
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.deepreviewYAML config files.deepreviewfiles 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 reviewerdeepwork review --instructions-for claudediscovers configs, diffs the branch, matches changed files, and generates parallel review task instructions for Claude Codeindividual(one review per file),matches_together(all matches in one review),all_changed_files(tripwire — any match triggers full-changeset review).deepreviewfile and line)--filesoption and stdin pipe support for explicit file lists (bypasses git diff)review(runs reviews, acts on findings, iterates) andconfigure_reviews(helps set up.deepreviewfiles)README_REVIEWS.mdusage documentation symlinked into the pluginNew files
src/deepwork/review/— Full implementation (config, discovery, matcher, instructions, formatter, schema)src/deepwork/cli/review.py— CLI commandspecs/deepwork/review/REQ-001throughREQ-007— Requirementstests/unit/review/— 122 unit tests (7 test files)plugins/claude/skills/review/andplugins/claude/skills/configure_reviews/— Plugin skillsREADME_REVIEWS.md— Usage documentationTest plan
uv run pytest tests/unit/review/ -v— 122 tests passuv run ruff check src/deepwork/review/ src/deepwork/cli/review.py— Cleanuv run mypy src/deepwork/review/ src/deepwork/cli/review.py— Clean.deepreviewfile, make changes, rundeepwork review --instructions-for claude--filesoption and stdin pipe🤖 Generated with Claude Code