home / skills / shotaiuchi / dotclaude / wf4-review

wf4-review skill

/dotclaude/skills/wf4-review

This skill creates and reviews Plan, code, or PR status records for wf4-review, updating documentation and state transitions to streamline development.

npx playbooks add skill shotaiuchi/dotclaude --skill wf4-review

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.7 KB
---
name: wf4-review
description: Planまたはコードのレビュー記録を作成
argument-hint: "[plan | code | pr]"
---

**Always respond in Japanese.**

# /wf4-review

Create review records for Plan, implementation code, or PR status.

## Usage

```
/wf4-review [subcommand]
```

## Subcommands

- `(none)` or `plan`: Review the Plan
- `code`: Review implementation code
- `pr`: Check and review PR status

## Processing

### 1. Check Prerequisites

Get active work. Set review path: `docs/wf/<work-id>/04_REVIEW.md`.

### 2. Plan Review (Default)

Review Plan from these perspectives:

- **Completeness**: All Spec requirements covered, test plan included, rollback procedure clear
- **Feasibility**: Work volume per step reasonable, dependencies correct, risks assessed
- **Quality**: Coding conventions, performance impact, security

Record in `04_REVIEW.md` using template `~/.claude/templates/04_REVIEW.md`.

### 3. Code Review

Get diff via `git diff <base>...HEAD`. Review: code style, error handling, test coverage, security, performance.

### 4. PR Review

Check via `gh pr view --json number,state,reviews,checks`. Display: PR state, CI checks status, review approvals/requests, blocking issues, next action.

### 5. Update state.json

Set `current: "wf4-review"`. Set `next` based on result:
- Approved → `"wf5-implement"`
- Changes requested → `"wf3-plan"`
- Needs discussion → `"wf4-review"` (another review needed)

### 6. Completion Message

Show file path, result (Approved/Request Changes/Needs Discussion), findings count (Must Fix/Should Fix/Suggestions), next step.

## Notes

- Always record review results
- Must Fix items are mandatory to resolve
- Keep history for multiple reviews

Overview

This skill creates structured review records for Plans, implementation code, or PR status and stores them in the project review path. It enforces a consistent checklist-driven approach so teams capture completeness, feasibility, and quality concerns. The skill updates workflow state and provides a clear next action based on review outcomes.

How this skill works

The skill locates the active work and writes review output to docs/wf/<work-id>/04_REVIEW.md using a standardized template. For plan reviews it validates coverage, test and rollback plans, feasibility, and quality aspects. For code it collects diffs (git diff <base>...HEAD) and inspects style, error handling, tests, security, and performance. For PRs it queries GitHub (gh pr view --json ...) and summarizes CI, approvals, and blocking issues.

When to use it

  • Before implementation to validate the Plan and test/rollback readiness
  • When a feature branch is ready for code scrutiny or merging
  • On pull requests to capture CI and reviewer status
  • When you need an auditable record of review findings and decisions
  • When workflow state must transition based on review result

Best practices

  • Always write the review into docs/wf/<work-id>/04_REVIEW.md using the template
  • Classify findings as Must Fix / Should Fix / Suggestions and keep them actionable
  • Include test plans and rollback steps when assessing feasibility
  • Run git diff and CI checks before producing the code/PR review
  • Update state.json current and next fields to reflect the outcome

Example use cases

  • Review a deployment plan to ensure rollback and test steps are present
  • Evaluate a feature branch diff for missing error handling or security flaws
  • Summarize PR status for stakeholders: CI results, approvals, and blockers
  • Produce an audit trail for repeated reviews across multiple iterations
  • Decide next workflow step automatically (approve, request changes, or re-review)

FAQ

Where is the review saved?

Reviews are saved to docs/wf/<work-id>/04_REVIEW.md following the specified template.

How does the skill decide the next workflow step?

It sets state.json current to wf4-review and next to wf5-implement if approved, wf3-plan if changes requested, or wf4-review for further discussion.