dh-review
Verify a plan sub-task against acceptance criteria, scope, done-when; review diff, validation, regression risk; structured verdict to tasks/review.md. Plan Alignment Mode (fast execution) is a separate mode: no sub-task selection, no diff review, no code review — it compares plan.md with plan_fast.md and writes tasks/review-fast.md (pre-execution) or tasks/review-fast-final.md (plan-end). Use after implementation, to review/verify the sub-task, or to check fast-plan alignment.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 8
- Forks
- 1
01 前言 Front Matter
- name
- dh-review
- license
- MIT
- metadata
- { "audience": "developers", "workflow": "development" }
- description
- Verify a plan sub-task against acceptance criteria, scope, done-when; review diff, validation, regression risk; structured verdict to tasks/review.md. Plan Alignment Mode (fast execution) is a separate mode: no sub-task selection, no diff review, no code review — it compares plan.md with plan_fast.md and writes tasks/review-fast.md (pre-execution) or tasks/review-fast-final.md (plan-end). Use after implementation, to review/verify the sub-task, or to check fast-plan alignment.
- allowed-tools
- read, write, bash
- compatibility
- opencode, copilot, antigravity
03 SKILL.md 正文
Verify that a single sub-task implementation meets its plan-defined acceptance criteria, stays within scope, and passes code quality review. Write the findings to ./docs/plans/<plan-slug>/tasks/review.md; Plan Alignment Mode writes to the caller-specified fast report instead (see below).
Core Rules
- Read the plan to find the active sub-task and its criteria — via
dh_plan_read({ slug }) when available, else manual read of./docs/plans/<plan-slug>/plan.mdfollowing the phased marker rules. If the plan does not exist, stop and report that no plan was found. The plan tools are exposed by the project-scopedhMCP server; under Code Mode they are called astools.dh.<tool>, anddh_<tool>is the tool's normalized name (permission actions matchdh_*). - This skill is loop step 2.3 (
dh-review+dh-code-review); the full loop 1–5 lives in repo-root AGENTS.md (pointer only, no duplication). - Do not review code outside the sub-task scope.
- Resolve the review agent (standard review only): read
## Agent Selectioninplan.mdand use its Review row. If the section or row is absent or stale, run the selection protocol in../dh-planning/references/agent-selection.md, record the row, and continue. A selected reviewer that is unavailable and has no capability fallback stops the run — never substitute silently. - Delegate code quality checks to the selected review agent — do not duplicate the
dh-code-reviewskill. - Write all findings to
./docs/plans/<plan-slug>/tasks/review.md. Exception: Plan Alignment Mode writes to the caller-specified path — defaulttasks/review-fast.md(pre-execution) ortasks/review-fast-final.md(plan-end). - Use severity levels from the
dh-code-reviewskill: P0 (blocking), P1 (high), P2 (medium), P3 (low). - If no sub-task is In Progress, review the most recently Completed sub-task and state that assumption.
- Graph-assisted impact (standard review only): when the project graph is indexed, use the
dh-code-queryskill on changed symbols —callers/calleesfor untested call paths,importersfor boundary impact,implementors/overridesfor contract changes, andtests-reachingfor coverage. Confirm each row in the diff or source; do not raise a finding from graph output alone. Plan Alignment Mode never uses this.
Plan Alignment Mode (fast execution)
A separate mode, not a variant of the sub-task review. Trigger it when the
caller asks to compare plan.md with plan_fast.md for fast execution.
Skip Workflow Steps 1–7 entirely. In this mode there is no sub-task
selection, no diff review, no review-agent delegation, no dh-code-review, and
no dh-domain-check. This mode performs no code review and writes no
standard review report.
Input: phase: pre-execution | plan-end, plus the report path.
pre-execution— validate a newly created or resumed mirror.plan_fast.mdmay be ahead ofplan.mdonly in statuses;plan.mdahead of the mirror is a finding.plan-end— validate the final mirror. Phase/sub-task statuses must match exactly in both files.
Read ./docs/plans/<plan-slug>/plan.md and
./docs/plans/<plan-slug>/plan_fast.md (dh_plan_read; manual fallback).
Allowed differences (never findings):
plan_fast.mdintentionally omits## Objective,## Requirements Snapshot,## Scope,## Assumptions and Constraints,## Risks and Areas Requiring Care,## Core concepts,## Visual Context,## Agent Selection, and## Open Questions. Compare the## Phasesregion and sub-task fields againstplan.md, and useplan.mdfor requirements/scope checks. Do not flag those omitted top-level sections as missing.- The fast sections
## Fast Execution Policy,## Alignment Contract, and## Final Verification. - Status progression (within the phase rules above).
Compare: phase/sub-task coverage, IDs, titles, and order; requirements
mapping (Related Requirements); acceptance criteria; done-when; scope
boundaries. Missing, extra, reordered, or renamed phases/sub-tasks, altered
requirements/criteria, or any scope change → P0/P1.
Status findings
pre-execution: mismatch → P2;plan.mdahead of the mirror → P1.plan-end: any mismatch → P1 (the close is blocked until both are identical).
Report: always write to the caller-specified path; default
./docs/plans/<plan-slug>/tasks/review-fast.md for pre-execution and
./docs/plans/<plan-slug>/tasks/review-fast-final.md for plan-end (a distinct
file from the pre-execution report). Never overwrite tasks/review.md or the
pre-execution report. Keep the standard verdict shape
(**Verdict:** Approve / Approve with comments / Request changes).
Verdict: Request changes when any P0/P1 remains; Approve with comments
for P2/P3 only; Approve when fully aligned. Misalignment is fixed in
plan_fast.md; this mode never authorizes editing plan.md scope.
Review Dimensions
Review the implementation against these dimensions, in order:
1. Acceptance criteria fulfillment
- Does the implementation meet every acceptance criterion from the sub-task?
- Are there any missing features or partial implementations?
- Are the done-when conditions satisfied?
2. Scope compliance
- Does the implementation stay within the sub-task's in-scope boundaries?
- Has it introduced work explicitly listed as out of scope?
- Have unrelated files been modified?
3. Validation and testing
- Does the implementation include appropriate tests (unit, integration) as suggested?
- Can the validation commands from the sub-task be run successfully?
- Are edge cases from the sub-task's cautionary points handled?
- use MCP Chrome tools if possible to validate the work via web and include the results in the review report.
4. Regression risk
- Could the changes break existing functionality outside the sub-task scope?
- Are there API, config, or interface changes that affect other parts of the system?
5. Architecture and domain integrity (software projects only)
- For cross-module or architectural changes: delegate to
dh-domain-checkskill to validate the implementation still respects DDD bounded contexts and SOLID principles. - Are the module boundaries, dependencies, and interfaces consistent with the architecture defined during planning?
6. Code quality (delegated)
- Delegate to the plan's selected review agent for detailed code quality review using the
dh-code-reviewskill. - Incorporate the reviewer's findings into the final report.
Workflow
Step 1: Read plan context
Read the plan (via dh_plan_read when available; fallback: manual read of ./docs/plans/<plan-slug>/plan.md) and extract:
- The active sub-task: the one marked
In Progresswithin the firstIn Progressphase. If none is In Progress, use the most recently Completed sub-task and explicitly state that assumption in the review report. - The sub-task's phase (
Phase N), which the review report may note to support the orchestrator's phase-completion tracking - Its acceptance criteria, done-when conditions, and scope boundaries
- Any testing suggestions or validation commands
Step 2: Review diff against criteria
Examine the implementation changes (via git diff against base branch) and evaluate against the first four review dimensions (acceptance criteria, scope, validation, regression).
Step 3: Delegate architecture validation (software projects only)
If the sub-task involves cross-module changes, architectural decisions, or interface definitions that affect bounded contexts, delegate to dh-domain-check skill to validate the implementation against DDD principles and SOLID compliance. Incorporate findings into the review report.
Step 4: Delegate code quality review
Ask the plan's selected review agent to perform a detailed code review using the dh-code-review skill. Provide the active sub-task's context and acceptance criteria for awareness. Instruct the reviewer to focus on code-level correctness, security, and robustness. The plan-level acceptance criteria verification (does the feature exist and behave as specified?) is handled directly in Steps 1-2 and should not be duplicated.
Step 5: Consolidate findings
Combine your plan-level review (steps 1–2), the dh-domain-check architecture findings (step 3), and the selected review agent's code quality findings (step 4) into a single structured report.
Step 6: Write review report
Write findings to ./docs/plans/<plan-slug>/tasks/review.md using this format:
# Sub-Task Review: [Sub-task title]
**Reviewed against:** Sub-task from plan.md
**Overall risk:** High / Medium / Low
**Verdict:** Approve / Approve with comments / Request changes
## Acceptance Criteria Verification
| Criteria | Status | Notes |
|---|---|---|
| [AC 1 description] | PASS/FAIL | [Evidence] |
## Findings
### [P0] Blocking
### [P1] High
### [P2] Medium
### [P3] Low
## Validation Results
- Tests present: [yes/no — details]
- Validation commands: [pass/fail — evidence]
- Edge cases from sub-task: [handled/missed — details]
## Regression Risk Assessment
- Breaking changes detected: [none / list with impact]
- Interface/config changes affecting other components: [none / list]
## Scope Compliance
- In scope: [verified]
- Out of scope detected: [none / list]
## Suggested Next Steps
- [ ] Action items from findings
Step 7: Return verdict
Return the review verdict to the caller. If P0/P1 findings exist, recommend fixes before proceeding.
References
../dh-planning/references/agent-selection.md: review-role resolution and re-validation.dh-code-reviewskill: the detailed code review methodology delegated to the selected review agent.dh-domain-checkskill: architecture validation for cross-module changes (software projects only).
Doc search
Documentation management: delegate create / update / delete / retrieve of generated documents (excluding docs/plans) to the best available documentation agent (bundled documentation capability as fallback) — the main and only documentation owner (see dh-create-documentation).
Search generated documentation quickly: notesmd-cli search-content "<term>" --vault "<project-name>" or obsidian search query="<term>" (fallback: rg --glob '*.md' "<term>" docs/).
04 同仓库更多 Skills
dh-simplify
Review changed code for reuse, quality, and efficiency (three parallel reviews), then fix findings directly. Use after making changes or when asked to clean up, refactor, simplify, or improve this code.
dh-setup
Audit system software, configure user MCPs/plugins, scaffold project QA (hooks + per-stack tools), bootstrap docs/architecture with the selected architecture agent, and write harness directives into AGENTS.md. Use to check requirements or setup the environment.
dh-semver
Apply strict Semantic Versioning — analyze commits since the last tag to determine the bump type (major/minor/patch from conventional commit prefixes), generate an automated changelog grouped by breaking changes, features, fixes, and chores, and create a git tag locally without pushing until confirmed, handling both conventional commits and manual version decisions. Use when preparing a release, invoked by dh-execute-plan after plan completion and dh-final-review for release readiness, or when the user asks "what version is next?", "bump version", "generate changelog", "tag release", or "what changed since last release?".
dh-resume-plan
Resume a paused phased plan from docs/plans/<slug>/handoff.md: validate the contract, detect drift, rehydrate context, mark the handoff resumed, and continue via dh-execute-plan resume mode. Use when the user says "resume the plan", "continue where we stopped", "pick up the plan", or "resume after a pause".
dh-preflight
Run tests, linters, static analysis as a release gate: auto-detect tooling, check dirty state, pass/fail verdict with actionable failures (no auto-fixes). Use to run preflight, pre-release check, or validate before release.
dh-planning
Write phased plans to ./docs/plans/<slug>/plan.md: phases with sub-tasks, requirements mapping (stable IDs), scope, acceptance criteria. SDD gate: invoke dh-grill-sdd when ./docs/plans/<slug>/sdd.md is absent. Use to plan this or create a plan.