
requesting-code-review
by axiomantic
Multi-platform AI assistant skills and workflows. Serious engineering. Also fun.
SKILL.md
name: requesting-code-review description: "Use when completing tasks, implementing major features, or before merging"
Requesting Code Review
Invariant Principles
- Phase gates are blocking - Never proceed to next phase without meeting exit criteria
- Evidence over opinion - Every finding must cite specific code location and behavior
- Critical findings are non-negotiable - No Critical finding may be deferred or ignored
- SHA persistence - Always use reviewed_sha from manifest, never current HEAD
- Traceable artifacts - Each phase produces artifacts for resume and audit capability
Phase-Gated Workflow
Reference: patterns/code-review-formats.md for output schemas.
Phase 1: PLANNING
Input: User request, git state Output: Review scope definition
- Determine git range (BASE_SHA..HEAD_SHA)
- List files to review (exclude generated, vendor, lockfiles)
- Identify plan/spec document if available
- Estimate review complexity (file count, line count)
Exit criteria: Git range defined, file list confirmed
Phase 2: CONTEXT
Input: Phase 1 outputs Output: Reviewer context bundle
- Extract relevant plan excerpts (what should have been built)
- Gather related code context (imports, dependencies)
- Note any prior review findings if re-review
- Prepare context for code-reviewer agent
Exit criteria: Context bundle ready for dispatch
Phase 3: DISPATCH
Input: Phase 2 context Output: Review findings from agent
Agent: agents/code-reviewer.md
The code-reviewer agent provides:
- Approval Decision Matrix (verdict determination)
- Evidence Collection Protocol (systematic evidence gathering)
- Review Gates (ordered checklist: Security, Correctness, Plan Compliance, Quality, Polish)
- Suggestion Format (GitHub suggestion blocks)
- Collaborative communication style
- Invoke code-reviewer agent with context
- Pass: files, plan reference, git range, description
- Block until agent returns findings
- Validate findings have required fields (location, evidence)
Exit criteria: Valid findings received
Phase 4: TRIAGE
Input: Phase 3 findings Output: Categorized, prioritized findings
- Sort findings by severity (Critical first)
- Group by file for efficient fixing
- Identify quick wins vs substantial fixes
- Flag any findings needing clarification
Exit criteria: Findings triaged and prioritized
Phase 5: EXECUTE
Input: Phase 4 triaged findings Output: Fixes applied
- Address Critical findings first (blocking)
- Address High findings (blocking threshold)
- Address Medium/Low as time permits
- Document deferred items with rationale
Exit criteria: Blocking findings addressed
Phase 6: GATE
Input: Phase 5 fix status Output: Proceed/block decision
- Apply severity gate rules (see Gate Rules below)
- Determine if re-review needed
- Update review status
- Report final verdict
Exit criteria: Clear proceed/block decision with rationale
Gate Rules
Reference: patterns/code-review-taxonomy.md for severity definitions.
Blocking Rules
| Condition | Result |
|---|---|
| Any Critical unfixed | BLOCKED - must fix before proceed |
| Any High unfixed without rationale | BLOCKED - fix or document deferral |
| >=3 High unfixed | BLOCKED - systemic issues |
| Only Medium/Low/Nit unfixed | MAY PROCEED |
Re-Review Triggers
MUST re-review when:
- Critical finding was fixed (verify fix correctness)
-
=3 High findings fixed (check for regressions)
- Fix adds >100 lines of new code
- Fix modifies files outside original review scope
MAY skip re-review when:
- Only Low/Nit/Medium addressed
- Fix is mechanical (rename, formatting, typo)
Deferral Documentation
When deferring a High finding, document:
- Finding ID and summary
- Reason for deferral (time constraint, follow-up planned, risk accepted)
- Follow-up tracking (ticket number, target date)
- Explicit acknowledgment of risk
Artifact Contract
Each phase produces deterministic output files for traceability and resume capability.
Artifact Directory
~/.local/spellbook/reviews/<project-encoded>/<timestamp>/
Where <project-encoded> follows spellbook conventions (path with slashes replaced by dashes).
Phase Artifacts
| Phase | Artifact | Description |
|---|---|---|
| 1 | review-manifest.json | Git range, file list, metadata |
| 2 | context-bundle.md | Plan excerpts, code context |
| 3 | review-findings.json | Raw findings from agent |
| 4 | triage-report.md | Prioritized, grouped findings |
| 5 | fix-report.md | What was fixed, what deferred |
| 6 | gate-decision.md | Final verdict with rationale |
Manifest Schema
{
"timestamp": "ISO 8601",
"project": "project name",
"branch": "branch name",
"base_sha": "merge base commit",
"reviewed_sha": "head commit at review time",
"files": ["list of reviewed files"],
"complexity": {
"file_count": 0,
"line_count": 0,
"estimated_effort": "small|medium|large"
}
}
SHA Persistence
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です