# Mine Implementation Review

> Use when mine-orchestrate Phase 3 runs the post-execution quality gate. Reviews changed files against design doc and task files using a Sonnet subagent.

- Skill: `nodejsmith/mine-implementation-review` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add nodejsmith/mine-implementation-review`
- Raw SKILL.md: https://api.skillmd.com/api/skills/nodejsmith/mine-implementation-review/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: NodeJSmith (https://skillmd.com/u/nodejsmith)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/nodejsmith/mine-implementation-review

---


# Implementation Review

Post-execution quality gate. After `/mine-orchestrate` finishes, this reviews the full implementation against the original design doc and task files. Uses a Sonnet subagent for structured review across 7 categories.

## Arguments

$ARGUMENTS — path to a feature directory (`design/specs/NNN-feature/`) or a `design.md` file. The caller may append `--test-command-file <path>` to provide a previously confirmed canonical test command. If empty, find the most recently modified `design/specs/*/design.md` and confirm before proceeding.

---

## Phase 1: Read the Design Doc, Task Files, and Changed Files

### Locate the feature directory

First parse `$ARGUMENTS`: extract the optional `--test-command-file <path>` pair, then treat the remaining single positional argument as `<feature_path>`. Reject unknown flags, a missing flag value, or more than one positional argument instead of guessing.

If `<feature_path>` points to a `design/specs/NNN-*/` directory, use it directly.

If `<feature_path>` points to a `design.md` file, the feature directory is one level up.

If `<feature_path>` is empty:

```
Glob: design/specs/*/design.md
```

Sort by modification time, take the most recent. The feature directory is one level up. Confirm:

```
AskUserQuestion:
  question: "Found feature at <feature_dir>. Review its implementation?"
  header: "Confirm feature"
  multiSelect: false
  options:
    - label: "Yes — review it"
    - label: "No — let me specify the path"
      description: "Tell me the correct feature directory and I'll use that"
```

### Read design doc and task files

Read `<feature_dir>/design.md` in full.

Read all `<feature_dir>/tasks/T*.md` files in order. If no task files exist, proceed with design-only review and note this in the summary.

### Collect changed files

Run `git-branch-diff-files` to find which files were changed since the branch diverged from its base. This handles base-branch detection automatically (closest remote branch, then default branch fallback):

```bash
git-branch-diff-files
```

If still empty (e.g., no commits yet), fall back to:

```bash
git diff --name-only HEAD~1
```

Read each changed file. If the list is large (more than 15 files), prioritize files referenced in the task Prompt sections first.

---

## Phase 2: Dispatch Reviewer Subagent

### Review output path

Run `get-skill-tmpdir mine-impl-review` and use `<dir>/review.md` for the review output.

### Read reviewer prompt

Read `${CLAUDE_CONFIG_DIR:-~/.claude}/skills/mine-implementation-review/reviewer-prompt.md`.

### Launch review subagent

If `--test-command-file <path>` was provided, read that file and use its exact non-empty contents. Do not rediscover or substitute a different command. If the path is missing, unreadable, or empty, stop and report the broken handoff. When no path was provided, follow `${CLAUDE_CONFIG_DIR:-~/.claude}/references/common/testing.md` to discover and confirm the canonical command. If no test command exists, use `no test suite`.

Launch a `standard-worker` subagent. Pass this prompt (fill in bracketed values):

```
You are reviewing a completed caliper v2 feature implementation.

## Design doc
<full design.md content>

## Task files
<full content of each T*.md in order, separated by "--- T<NN> ---" headers>

## Changed files
<for each changed file: filename header + full content>

## Canonical test command
<discovered command, or `no test suite`>

## Your instructions
<full reviewer-prompt.md content>

Write your complete structured review to: <temp file path>
```

The subagent will write the review to the temp file.

---

## Phase 3: Present Findings

Read the temp file. Format the results clearly:

1. **Checklist results** — one line per item: `N. <name>: PASS|WARN|FAIL — note`
2. **Verdict** — PASS, FAIL, or ABANDON (bold, prominent)
3. **Summary** — 2-3 sentences from the subagent
4. **Blocking issues** — if verdict is FAIL or ABANDON
5. **Suggestions** — non-blocking notes, if any

Phase 3 is the final output. The caller (`mine-orchestrate`) handles all gate logic, status updates, and next-step decisions. This skill does not prompt the user or update `design.md`.

