AGENT SKILL

dh-final-review

Plan sign-off: verify all sub-tasks Completed, full diff vs sdd.md, release checks (artifact-check/preflight), semver recommendation, binding verdict to tasks/review.md. Use to final review, sign off, or close a plan.

License 许可
MIT
最近更新
2026-11-10
Stars
★ 8
Forks
1

01 前言 Front Matter

name
dh-final-review
license
MIT
metadata
{ "audience": "developers", "workflow": "development" }
description
Plan sign-off: verify all sub-tasks Completed, full diff vs sdd.md, release checks (artifact-check/preflight), semver recommendation, binding verdict to tasks/review.md. Use to final review, sign off, or close a plan.
allowed-tools
read, write, bash
compatibility
opencode, copilot, antigravity

03 SKILL.md 正文

Produce a comprehensive final sign-off review for a completed plan. Verify all sub-tasks are done, review the full diff against sdd.md requirements, delegate in-depth review to the plan's selected final-review agent, and issue a binding verdict.

Core Rules

  • Read ./docs/plans/<plan-slug>/sdd.md as the source of truth for requirements.
  • Read the plan (via dh_plan_read when available; fallback: manual read of ./docs/plans/<plan-slug>/plan.md) to verify sub-task AND phase completion. The plan tools are exposed by the project-scope dh MCP server; under Code Mode they are called as tools.dh.<tool>, and dh_<tool> is the tool's normalized name (permission actions match dh_*).
  • If any sub-task is not Completed (and therefore any phase is not Completed), stop and report which tasks remain — do not proceed to full review.
  • This skill is loop step 4 (dh-final-review); the full loop 1–5 lives in repo-root AGENTS.md (pointer only, no duplication).
  • Perform full-diff review against the entire scope, not just individual sub-tasks.
  • Resolve the final-review agent: read ## Agent Selection in plan.md and use its Final 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 (fast mode: in tasks/review.md, per the fast-mode recording rule below), and continue. A selected agent that is unavailable and has no capability fallback stops sign-off — never substitute silently.
  • Delegate in-depth code review to the selected final-review agent (which uses the dh-code-review skill).
  • Write the final report to ./docs/plans/<plan-slug>/tasks/review.md.
  • Use severity levels: P0 (blocking), P1 (high), P2 (medium), P3 (low).
  • Do not modify any implementation files — this skill is review-only.
  • If sdd.md does not exist, use plan.md's requirements snapshot as the fallback requirements source.
  • For software projects: run dh-artifact-check and dh-preflight for release readiness validation, and determine the recommended version bump with the dh-semver skill in the final report.
  • Fast mode: when invoked by dh-execute-plan-fast, reuse the pre-run preflight/artifact-check/semver results it already recorded instead of re-running them.
  • Fast-mode recording: when a plan_fast.md mirror exists (fast mode), never edit plan.md content to record findings or selection rows — any body edit changes source_sha256 and invalidates the mirror. Write the verdict to ./docs/plans/<plan-slug>/tasks/review.md and update statuses with dh_plan_fast_update_status (or the manual dual edit of the matching status lines in plan.md and plan_fast.md).

Workflow

Step 1: Verify plan completion

Read the plan (via dh_plan_read when available; fallback: manual read) and check every sub-task AND phase status:

  • All sub-tasks must be Completed and every phase must be Completed (a phase is Completed only when all its sub-tasks are). If any sub-task is Pending or In Progress, list them, note their phase, and stop — do not proceed.
  • Every sub-task must carry a non-empty Delegated to agent that matches an agent in ## Agent Selection. List missing/unknown values and stop; do not sign off a plan that skipped its delegation contract.
  • If the plan has no sub-tasks at all, report that the plan is empty and stop.

Step 2: Read the requirements

Read ./docs/plans/<plan-slug>/sdd.md and extract:

  • All requirements with their IDs (R1, R2, ...)
  • Acceptance criteria (AC1, AC2, ...)
  • Scope boundaries (in-scope and out-of-scope items)
  • Constraints and edge cases

If sdd.md does not exist, fall back to the Requirements Snapshot section in plan.md.

Step 3: Plan-level completion scan

Generate the full diff (git diff main...HEAD or git diff $(git merge-base main HEAD)) and perform a lightweight scan — do not deeply review code here. Check only:

  • Are all files listed in each sub-task present?
  • Are there any missing deliverables (empty files, stubs where real implementation was expected)?
  • Are there cross-sub-task integration gaps (e.g., Sub-Task 2 expects a file Sub-Task 3 was supposed to create)?
  • Per-phase completion: list each Phase N with its status and confirm no phase was marked Completed with open sub-tasks (blocker rule 2.4: never mark a phase around a blocker).
  • Graph-assisted integration scan: when the project graph is indexed, use the dh-code-query skill on the changed symbols — callers/importers for missed integration points, tests-reaching for untested call sites, implementors/overrides for contract breaks. Confirm each candidate in the diff or source before reporting it.
  • Are there obvious scope violations (out-of-scope items implemented)?

Step 4: Delegate in-depth review

Ask the plan's selected final-review agent to perform the comprehensive final review using the dh-code-review skill — this is where requirements mapping, AC verification, and code-quality checks happen. Provide:

  • The full requirements from sdd.md
  • The plan's acceptance criteria
  • The full diff context

The selected final-review agent writes its findings to ./docs/plans/<plan-slug>/tasks/review.md and returns a verdict.

After it completes, read its findings from ./docs/plans/<plan-slug>/tasks/review.md.

Step 4a: Release readiness check (software projects only)

For software projects only — before producing the final verdict:

  1. Run the dh-artifact-check skill to validate that production builds compile and deployment scripts pass.
  2. Run the dh-preflight skill to execute the full test suite, linters, and static analysis as a formal release gate.
  3. If either check fails with P0/P1 findings, mark the corresponding requirement as FAIL in the final report.
  4. Determine the appropriate version bump with the dh-semver skill based on the plan scope (major for breaking changes, minor for features, patch for fixes).
  5. For non-software projects: skip this entire step.

Step 5: Produce final verdict

Consolidate your own full-scope findings (Steps 1–3), the release readiness results (Step 4a), and the selected final-review agent's findings into a single final report:

# Final Plan Review: [Plan title]

**Plan slug:** [plan-slug]
**Review against:** sdd.md requirements
**Overall risk:** High / Medium / Low
**Verdict:** Approve / Approve with comments / Request changes

## Plan Completion Status

| Phase | Sub-task | Delegated agent | Status | Notes |
|---|---|---|---|---|
| [Phase 1] | [Sub-task 1.1] | [agent-id] | Completed | [Brief note] |

Per-phase completion: [Phase 1: Completed — N/N sub-tasks; Phase 2: Completed — M/M sub-tasks; …]

## Requirements Verification

| Requirement | Status | Evidence |
|---|---|---|
| R1: [description] | PASS/FAIL | [Evidence] |
| AC1: [description] | PASS/FAIL | [Evidence] |

Any requirement marked FAIL must have a corresponding finding below with an appropriate severity level. A FAIL on a core requirement (R1–R5) is P0; a FAIL on an acceptance criterion is P1.

## Findings

### [P0] Blocking
### [P1] High
### [P2] Medium
### [P3] Low

## Integration Assessment

- Cross-sub-task integration issues: [none / list]
- Regression risk across the full scope: [low/medium/high]

## Release Readiness (software projects only)

- `dh-artifact-check` build validation: [pass/fail — details]
- `dh-preflight` test/lint gate: [pass/fail — details]
- Recommended version bump (via `dh-semver`): [major/minor/patch]
- Changelog generated: [yes/no]

## Sign-off Verdict

**Verdict:** [Approve / Approve with comments / Request changes]
**Recommendation:** [Merge / Fix P0/P1 findings and re-review / Rejected]

Step 6: Return verdict

Return the sign-off verdict to the caller. If P0/P1 findings exist, recommend fixes before merge. If all clear, confirm plan readiness.

References

  • ../dh-planning/references/agent-selection.md: final-review-role resolution and re-validation.
  • dh-code-review skill: the in-depth review methodology used by the selected final-review agent.
  • dh-artifact-check skill: build validation for release readiness (software projects only).
  • dh-preflight skill: full test/lint gate for release readiness (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

andrescevp
andrescevp/development-harness

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.

★ 8
andrescevp
andrescevp/development-harness

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.

★ 8
andrescevp
andrescevp/development-harness

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?".

★ 8
andrescevp
andrescevp/development-harness

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.

★ 8
andrescevp
andrescevp/development-harness

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".

★ 8
andrescevp
andrescevp/development-harness

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.

★ 8