Code review

From yimwoo/hotl-plugin · View interactive version

Code review is an AI agent skill from the GitHub repository yimwoo/hotl-plugin. Use after completing implementation steps and before merging — reviews against plan and HOTL contracts.

How to use this skill

Skill file

HOTL Code Review

User-facing entry point for getting a code review. Dispatches the full code-reviewer agent by default; falls back to inline review when subagents aren't available.

Process

1. Gather Context

Resolve base branch (fallback ladder — use the first that succeeds):

  1. PR base branch: gh pr view --json baseRefName
  2. Repo default branch: git symbolic-ref refs/remotes/origin/HEAD
  3. main
  4. master

Resolve review scope:

Detect workflow file:

Extract contracts from workflow frontmatter if available (intent, constraints, success_criteria, risk_level).

Gather verification evidence:

2. Dispatch Review

If subagents are available (Claude Code, Codex):

Dispatch the code-reviewer role as a subagent via the Agent tool. Use the structured dispatch template from requesting-code-review:

If subagents are not available (Cline, weaker runtimes):

Run inline review in the current session using the same output contract. See "Inline Fallback" below.

3. Return Findings

Verdict Model

Direct reviews use the final-review verdict model:

Review Lifecycle

code-review              = user-facing entry point for getting a review
requesting-code-review   = internal executor/orchestration entry point
receiving-code-review    = follow-up handler for acting on findings

Output Contract

Both dispatched and inline reviews must conform to docs/contracts/code-review-output.md. Every review must contain these 6 sections in order: Scope (with verification evidence), Reviewed Dimensions, Findings, What Was Not Covered, Residual Risks, Verdict.

Platform-Native Annotation Dedup

When the platform emits platform-native annotations for localized findings (e.g., ::code-comment in Codex, inline GitHub review comments), do not restate those findings verbatim in the Findings section. Instead, use the grouped one-liner format defined in the output contract.

Inline Fallback

When subagents are not available, run the review inline using the same output contract. The inline review must produce identical 6-section structure — not a weaker format.

Dimensions

Plan alignment (when workflow provided):

When no workflow: state "Plan alignment: skipped (no workflow provided)"

Code quality and design:

Security and reliability:

Performance and boundary conditions:

Removal and simplification:

HOTL governance:

Findings Format

Every finding must include:

- [SEVERITY]: file/path:line — description
  Why: [why this matters]
  Fix: [expected remediation direction]

For localized issues: file:line is required. For scope-level findings: provide the narrowest evidence available.

Severity Levels

BLOCK issues must be resolved before claiming done.

Clean Review

Per the output contract, when a dimension has no findings it must still state what was checked, what was not covered, and residual risks. Additionally, the review must always include sections 4 (What Was Not Covered) and 5 (Residual Risks) even when no individual dimension has findings.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.