---
name: spec-kitty-runtime-review
description: >-
  Review runtime-owned outputs using the Spec Kitty review workflow surface,
  then direct approval or rejection with structured feedback.
  Triggers: "review this work package", "check runtime output", "approve this step",
  "review WP", "is this WP ready to approve", "check this implementation".
  Does NOT handle: setup-only repair requests, direct implementation work,
  editorial glossary maintenance, or runtime loop advancement.
---

# spec-kitty-runtime-review

Operate the Spec Kitty review workflow surface: load review context, claim a
work package, read the generated review prompt, and issue an approve or reject
transition.

## When to Use This Skill

- Claim a completed work package for review
- Read the review prompt generated by the review workflow
- Issue an approval or rejection with structured feedback

## Step 1: Load Review Context

```bash
spec-kitty charter context --action review --json
```

The returned `text` contains governance context. The review prompt (generated
in Step 2) includes project-specific acceptance criteria and review guidance
from doctrine — do not restate those rules here.

---

## Step 2: Claim the Work Package

```bash
# Claim a specific WP (or omit WP## to auto-select from for_review lane)
spec-kitty agent action review WP## --agent <your-name>
```

This moves the WP from `for_review` to `doing` and prints the path to a
generated review prompt file. Read that path from the command output.

---

## Step 3: Read the Review Prompt

```bash
cat <prompt-file-path>
```

The review prompt contains:

- Acceptance criteria for this specific WP
- Git diff commands with the correct base branch (use those, not hardcoded `main`)
- Dependency warnings if the WP has downstream dependents
- WP isolation rules
- Completion instructions (approve/reject commands)

Follow the review prompt. It is the source of truth for what to check and how
to check it. The review criteria come from doctrine and the WP definition, not
from this skill.

---

## Step 4: Issue Verdict

Take exactly one action — never "approve with conditions".

### Approve (all acceptance criteria met)

```bash
spec-kitty agent tasks move-task WP## --to approved --note "Review passed: <summary>"
```

### Reject (acceptance criteria not met)

Write structured feedback to a temp file, then move the WP back to planned:

```bash
spec-kitty agent tasks move-task WP## --to planned --force \
  --review-feedback-file <feedback-file-path>
```

Every blocking finding must map to a specific, verifiable remediation action.

---

## Step 5: Check Downstream Impact

If you rejected and the WP has downstream dependents:

```bash
spec-kitty agent tasks status --mission <mission-slug>
```

Note dependent WPs and include a rebase warning in your feedback.

---

## Review Precedence Rules

1. **Acceptance criteria are the primary gate** — a WP meeting all criteria
   passes even if the reviewer would have done it differently
2. **The review prompt is the source of truth** — it contains the specific
   checks, criteria, and doctrine context for this WP
3. **One clear verdict per review** — approve or reject, nothing in between
4. **The reviewer does not implement fixes** — feedback must be actionable by
   the original implementing agent
