Skip to main content
ClaudeWave
Skill1.3k repo starsupdated today

spec-kitty-runtime-review

The spec-kitty-runtime-review skill automates Spec Kitty's review workflow by loading review context, claiming work packages for evaluation, reading generated review prompts with acceptance criteria, and issuing approval or rejection decisions. Use this skill when you need to review completed work packages, verify them against project-specific acceptance criteria and doctrine rules, check contract round-trip examples for payload and schema conformance, and transition work items through the governance pipeline with structured feedback.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/Priivacy-ai/spec-kitty /tmp/spec-kitty-runtime-review && cp -r /tmp/spec-kitty-runtime-review/src/doctrine/skills/spec-kitty-runtime-review ~/.claude/skills/spec-kitty-runtime-review
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# 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 3.5: Contract Round-Trip Check

If the mission ships a `kitty-specs/<mission>/contracts/` directory, walk it
before issuing a verdict. Contracts pin concrete examples (payloads, CLI
invocations, schema fragments, error messages, allowed-value sets) that the
implementation must round-trip verbatim. Vocabulary or shape drift here is
invisible to spec-level review and surfaces late at mission-review or
downstream consumption time.

1. **Enumerate** — `ls kitty-specs/<mission>/contracts/`. If the directory is
   absent, record a one-line note ("no contracts/ artifact") and skip to
   Step 4.
2. **Filter** — for each contract file, decide whether this WP touches the
   symbols, payloads, or commands it pins. Skipped files get a one-line note
   ("orthogonal to WP##").
3. **Walk every concrete example** — extract every YAML block, JSON snippet,
   CLI invocation, schema fragment, and error message in the in-scope
   contracts. Verify the implementation **accepts inputs and produces
   outputs verbatim**: singular vs plural, default values, enum members,
   exit codes, flag names — all of it.
4. **SSOT cross-check** — if a contract pins a closed set (allowed values,
   registered triggers, enum members), require **one assertion that mirrors
   the runtime constant against its test-side or doc-side copy byte-for-
   byte**. If the WP introduces such a constant without that mirror
   assertion, reject.
5. **Verdict** — any contradiction between the implementation and a contract
   example is a **BLOCKER**, cited as `contract file:line` plus
   `impl symbol`. Contracts are spec artifacts, not preferences.

---

## 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