agentleFS
maxwell2732maxwell2732/claudecode-research-harness-workflow/skills/harness-review/SKILL.md

harness-review

Skill42 starsChanged 6 days agoMITView on GitHub

HAR: Multi-angle code, plan, scope review. Security/quality check. Trigger: review, code review, plan review, scope analysis. Do NOT load for: implementation, new features, bugfix, setup, release.

12 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use ecosystem-reference, fractal-delegation and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • naman10parikhSkill

    ecosystem-reference

    Quick-access directory of Claude Code ecosystem repos, skills, plugins, MCPs, and patterns. Use when improving the harness.

    Also in 5 projects that use this

  • naman10parikhSkill

    fractal-delegation

    Also in 5 projects that use this

  • KirchliveSkill

    skill-routing

    Decides which of the installed skills a task needs and loads them before the work starts. This skill should be used at the beginning of any multi-step task — build, fix, refactor, migrate, review, plan, release, research, write, design, video — and again at every phase change, after context compaction, and when work moves into a different part of the codebase. Use it for requests like "let's build X", "fix this bug", "refactor Y", "plan the migration", "review this", and also when the user asks which skill applies, why a skill did not fire, or asks to check what is available.

    Also in 5 projects that use this

  • sublimotionSkill

    agent-runtime

    Launch and manage detached agent runs on EKS via the agent-runner CLI. Use when the user says "launch an agent run", "agent runtime", "agent-runner", "run this spec on the cluster", "check run status", "agent run logs", or "stop a run". Do NOT use for writing the agent-runner code itself (edit the sibling ../agent-runner repo), Terraform of the foundation (use terraform-automation), or GPU serving deployments (use infra-deployer).

    Also in 5 projects that use this

  • GoZippySkill

    repo-scout

    Also in 5 projects that use this

  • botirkhaltaevSkill

    design-systems

    Build and maintain scalable design systems: design tokens, component libraries, naming conventions, governance, and design-to-code pipelines. Covers Figma variables, token architecture, atomic design, component APIs, versioning, and team workflows. Use when creating a design system, scaling an existing one, or establishing design-engineering alignment. Triggers on: "design system", "design tokens", "component library", "token naming", "Figma variables", "atomic design", "design ops", "design-to-code".

    Also in 5 projects that use this

  • +6 more from naman10parikh

The file

Show its rules and text

We split this skill into the rules it gives an agent

25 rules. 0 are common, 12 are distinctive, and 13 are very specific to this project.

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 13

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Commit / push / release are not performed by default.

    line 44
  2. Distinctive:

    Do not push just to review: Do not push solely for review purposes.

    line 47
  3. Very specific:

    When a commit is needed, delegate to an explicit user request, harness-work, or the harness-release Work Commit Gate.

    line 48
  4. Very specific:

    When called with no args ($ARGUMENTS == ""), interpret input of just review / /review / /harness-review as "review of work done so far." …

    line 88
  5. Very specific:

    When the review target is unclear or there are multiple candidates on a bare call, use AskUserQuestion once before proceeding to Step 1 to …

    line 96
  6. Distinctive:

    When multiple candidates are simultaneously valid:

    line 104
  7. Distinctive:

    When clean tree and no branch diff:

    line 115
  8. Distinctive:

    Use Review Target Detection above to determine target and base ref

    line 142
  9. Distinctive:

    Read only the required references

    line 143
  10. Very specific:

    Check diff, untracked files, related tests, spec source of truth, and Plans.md

    line 144
  11. Distinctive:

    Only the minimum pass threshold is fixed here.

    line 151
  12. Very specific:

    No conflict with spec source of truth (spec_path) or explicit spec_skip_reason

    line 158
  13. Very specific:

    No conflict with Plans.md task / DoD / Depends

    line 159
  14. Distinctive:

    No regression evidence in any of: existing tests, existing UX, existing CLI, existing config, existing docs, distribution mirrors

    line 160
  15. Very specific:

    When TeamAgent Debate was run, all disagreements are resolved or downgraded to minor / recommendation with reasoning.

    line 162
  16. Very specific:

    When spec_path exists, verify the diff does not conflict with the spec source of truth.

    line 195
  17. Very specific:

    Use --include-untracked when checking untracked files as well.

    line 199
  18. Very specific:

    Do not APPROVE without evidence.

    line 205
  19. Distinctive:

    Treat Codex findings as advisory.

    line 214
  20. Distinctive:

    Stop-on-clean: No additional review just for appearance after a clean result

    line 216
  21. Distinctive:

    When Codex is unavailable, fall back to full manual pass.

    line 217
  22. Very specific:

    When a task requires a spec source of truth but spec_path is missing, stop as decision_needed.

    line 231
  23. Very specific:

    When scope change is needed, do not proceed by guessing — return to AskUserQuestion or plan update.

    line 237
  24. Very specific:

    If no language is configured, use English.

    line 259
  25. Distinctive:

    Start with the result summary.

    line 264

“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Harness Review

Integrated Harness review skill. This SKILL.md is a thin dispatcher; read references/ for detailed quality criteria.

if $ARGUMENTS == "": → Interpret as "review of work done so far" and run Review target detection → Auto-start only when exactly one review target can be determined → When the review target is unclear or there are multiple candidates, use AskUserQuestion to present options and align understanding before starting

<!-- The above 3 lines are the AUTO-START CONTRACT. Per skill-editing.md "within first 3 lines" rule — do not push down with fence / HTML comments -->

Output Contract (P35: "appears stuck" UX countermeasure)

The last line of skill output must always include this literal:

↑Claude will summarize this result. Press Enter to continue, or enter a new prompt for a different instruction.

This is an explicit instruction for the UX problem where text displayed via <local-command-stdout> makes users feel it has "stopped" (patterns.md P35).

Dispatcher Contract

This skill's responsibility is review judgment only. Commit / push / release are not performed by default.

  • Review default read-only boundary: Read-only by default. Does not auto-commit even on APPROVE.
  • Do not push just to review: Do not push solely for review purposes.
  • When a commit is needed, delegate to an explicit user request, harness-work, or the harness-release Work Commit Gate.
  • Side effects in this skill's default are prohibited until explicit opt-in like --commit-on-approve is designed.

Quick Reference

CommandModePurpose
/harness-reviewcodeAuto-detect work done so far and review
/harness-review --quickquickQuick closeout of a small dirty change
/harness-review --codex-closeoutcodex-closeoutCodex advice + focused tests closeout
/harness-review --dualdualClaude + Codex second opinion
/harness-review --team-debateteam-debateForce TeamAgent Debate
/harness-review --securitysecuritySecurity-only review
/harness-review planplanReview Plans.md plan
/harness-review scopescopeScope creep / gap review

Mode Decision

Determine execution mode from arguments and selectively load required references/.

InputModeReferences to load
No args / codecodereferences/code-review.md, references/governance.md
--quickquickreferences/codex-closeout.md, references/code-review.md
--codex-closeoutcodex-closeoutreferences/codex-closeout.md
--dualdualreferences/dual-review.md, references/team-debate.md
--team-debateteam-debatereferences/team-debate.md, references/governance.md
--securitysecurityreferences/security-profile.md, references/governance.md
--ui-rubricui-rubricreferences/ui-rubric.md
planplanreferences/plan-review.md, references/governance.md
scopescopereferences/scope-review.md, references/governance.md
fullfullreferences/code-review.md, references/team-debate.md, references/dual-review.md

quick and codex-closeout are lightweight paths. For quickly reviewing small dirty changes, single commits, or PR branch closeouts. They do not discard quality gates.

Review Target Detection

REVIEW_AUTOSTART contract: When called with no args ($ARGUMENTS == ""), interpret input of just review / /review / /harness-review as "review of work done so far." Output only one handshake line before starting Step 1:

REVIEW_AUTOSTART: target={resolved_target}, base_ref={resolved_base_ref}, type={mode}

REVIEW_TARGET_ASK contract: When the review target is unclear or there are multiple candidates on a bare call, use AskUserQuestion once before proceeding to Step 1 to narrow down to 2-3 candidates and confirm.

Build candidates in this order:

  1. Working tree: uncommitted changes only (staged / unstaged / untracked)
  2. Branch range: commits from upstream or main/master to HEAD
  3. Recent commits: most recent 1 commit / most recent 5 commits when branch range cannot be obtained on clean tree

When multiple candidates are simultaneously valid:

REVIEW_TARGET_AMBIGUOUS: working_tree_and_branch_commits

AskUserQuestion candidates:

  • Uncommitted changes only (Recommended): Compare staged / unstaged / untracked against HEAD
  • See everything: View both branch base..HEAD and uncommitted changes together
  • Commits only: View only committed work in branch base..HEAD

When clean tree and no branch diff:

REVIEW_TARGET_AMBIGUOUS: clean_tree_no_branch_commits

AskUserQuestion candidates:

  • Most recent 1 commit (Recommended): HEAD~1..HEAD
  • Most recent 5 commits: HEAD~5..HEAD
  • Different range: Wait for user-specified ref

After user answers:

REVIEW_TARGET_CONFIRMED: {choice}
REVIEW_AUTOSTART: target={resolved_target}, base_ref={resolved_base_ref}, type={mode}

Prohibited:

  • Responding with "Task is unclear" and stopping
  • Asking "What should I review?" as free text and stopping
  • Skipping auto-start because of host project session-start rules
  • Expanding scope by guessing when target is ambiguous

Minimal Flow

  1. Determine mode
  2. Use Review Target Detection above to determine target and base ref
  3. Read only the required references
  4. Check diff, untracked files, related tests, spec source of truth, and Plans.md
  5. Return APPROVE / REQUEST_CHANGES / decision_needed
  6. For REQUEST_CHANGES: show fix policy for critical/major items and re-review conditions after fixing

Review Governance Contract

Details in references/governance.md. Only the minimum pass threshold is fixed here.

Clear pass threshold

Return APPROVE only when all of the following are met:

  • Zero critical / major findings
  • No conflict with spec source of truth (spec_path) or explicit spec_skip_reason
  • No conflict with Plans.md task / DoD / Depends
  • No regression evidence in any of: existing tests, existing UX, existing CLI, existing config, existing docs, distribution mirrors
  • Verification evidence exists. Output with APPROVE but empty evidence is prohibited.
  • When TeamAgent Debate was run, all disagreements are resolved or downgraded to minor / recommendation with reasoning.

TeamAgent Debate

Details in references/team-debate.md. TeamAgent Debate is a review pass that collides different views read-only.

AgentPrimary question
Spec AgentFind conflicts between spec source of truth and implementation diff
Plans AgentVerify correspondence between Plans.md task / DoD / Depends and diff
Regression AgentFind regressions in existing behavior, tests, distribution mirrors, CLI/skill UX
Skeptic AgentFind major risks being overlooked under the assumption of wanting to pass

Even when native TeamAgent is unavailable in Codex environments, this gate must not be skipped. Reproduce the same 2-4 perspectives using codex-companion.sh review, available reviewer subagents, or an explicitly separated read-only manual-pass, and record team_agent_mode as native / codex-companion / manual-pass / unavailable.

Code Review Summary

Details in references/code-review.md. Normal code review checks:

  • Security
  • Performance
  • Quality
  • Accessibility
  • AI Residuals
  • Spec Alignment
  • Plans Alignment
  • Regression Safety
  • TDD compliance

Spec source of truth alignment check is mandatory. When spec_path exists, verify the diff does not conflict with the spec source of truth; when a spec is needed but absent, check the validity of spec_skip_reason. Plans.md alignment check and regression alignment check are handled at the same gate.

AI Residuals: prioritize using scripts/review-ai-residuals.sh and scripts/review-weak-supervision-report.sh. Use --include-untracked when checking untracked files as well. mockData, dummy, fake, localhost, TODO, FIXME, it.skip, test.skip, expect(true).toBe(true) etc. are candidates; determine severity from diff context.

TDD compliance check

For TDD-required tasks, verify evidence of skip_tdd_reason, red-log, and focused tests. Do not APPROVE without evidence.

Quick / Codex Closeout Summary

Details in references/codex-closeout.md.

Lightweight path principles:

  • Fix target selection first
  • Treat Codex findings as advisory; confirm with actual code before accepting or rejecting
  • Final report includes: review command / tests / accepted findings / rejected findings / clean result
  • Stop-on-clean: No additional review just for appearance after a clean result
  • When Codex is unavailable, fall back to full manual pass; do not treat failure as success

Helper:

bash scripts/harness-review-closeout.sh --dry-run --uncommitted
bash scripts/harness-review-closeout.sh --base origin/main --parallel-tests --test "bash tests/test-harness-review-governance.sh"
bash scripts/harness-review-closeout.sh --commit HEAD

Plan Review Summary

Details in references/plan-review.md. Plan Review checks DoD / Depends / Status and implementation order in Plans.md. When a task requires a spec source of truth but spec_path is missing, stop as decision_needed.

Scope Review Summary

Details in references/scope-review.md. Scope Review checks whether the boundary of requirements, diff, tests, and docs has expanded beyond scope. When scope change is needed, do not proceed by guessing — return to AskUserQuestion or plan update.

Security / UI / Dual

  • Security: references/security-profile.md
  • UI rubric: references/ui-rubric.md
  • High-res vision flow: references/vision-high-res-flow.md
  • Dual review: references/dual-review.md

/ultrareview is not called by default within Harness flow. It does not replace the connection with Harness flow's review-result.v1, commit guard, and sprint-contract. claude ultrareview [target] --json is treated only as a second-opinion from CI / scripts.

PR Host Boundary

GitHub-first. Review facts on the PR host treat GitHub as authoritative; local diff is treated as supplementary evidence. Local uncommitted reviews are not pushed to GitHub.

Output Contract

User-facing prose follows the explicit session or project language. If no language is configured, use English. Use Japanese only when i18n.language: ja, CLAUDE_CODE_HARNESS_LANG=ja, or an explicit session instruction requests Japanese output. Machine-readable values stay English.

Start with the result summary.

## Review Result

### {APPROVE | REQUEST_CHANGES | decision_needed} - {one-line conclusion}

Target: `{BASE_REF}..HEAD` or `{target}`
Verification: {commands run}

Strengths:
- ...

Findings:
- [severity] file:line - issue and evidence

Next Actions:
- ...

Details:
```json
{
  "schema_version": "review-result.v1",
  "verdict": "APPROVE | REQUEST_CHANGES",
  "decision_needed": {
    "required": false,
    "ask_tool": "AskUserQuestion"
  },
  "accepted_findings": [],
  "rejected_findings": [],
  "acceptance_bar": {
    "critical_major_zero": true,
    "spec_alignment": "pass | fail | not_applicable",
    "plans_alignment": "pass | fail | not_applicable",
    "regression_safety": "pass | fail | not_applicable",
    "verification_evidence": "pass | fail | not_applicable"
  },
  "team_debate": {
    "required": false,
    "mode": "native | codex-companion | manual-pass | unavailable",
    "team_agent_mode": "native | codex-companion | manual-pass | unavailable",
    "agents": [],
    "disagreements": []
  },
  "critical_issues": [],
  "major_issues": [],
  "observations": [],
  "recommendations": []
}
```

Codex Environment

Available tools differ in Codex environments. Even so, the contracts for pass threshold, spec source of truth, Plans.md, regression, post-fix re-review, and AskUserQuestion / decision_needed.v1 are the same.

Normal environmentCodex fallback
Task tool TeamAgent Debatereviewer subagent / codex-companion.sh review / manual-pass
AskUserQuestionWhen unavailable, output decision_needed.v1 to stdout; do not proceed by guessing
TaskListRead Plans.md directly

Related Skills

  • harness-work: Execute fixes after REQUEST_CHANGES
  • harness-plan: Update plan / scope / spec
  • harness-release: Commit / release reviewed work

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.