agentleFS
HazATHazAT/pi-config/skills/review/SKILL.md

review

Skill451 starsChanged 7 months agoMITView on GitHub

Coordinate a model-diverse local code review, automatically repair actionable findings with sequential workers, and re-review to a final verdict. Use for /review or when launched as an SC ensemble reviewer.

We split this skill into the rules it gives an agent

12 rules. 0 are common, 9 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 158 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read ~/.pi/agent/skills/superconductor/SKILL.md and follow its live orchestration preflight.

    line 34
  2. Distinctive:

    Start all three sessions without waiting between launches.

    line 56
  3. Very specific:

    Write the current attempt to the supplied review file before any repair.

    line 64
  4. Distinctive:

    When blocking findings remain:

    line 68
  5. Distinctive:

    Wait and read the same stable worker target.

    line 74
  6. Very specific:

    Run at most two repair rounds.

    line 78
  7. Distinctive:

    Always end with a normal assistant response containing:

    line 82
  8. Distinctive:

    Do not end after only writing or rereading the review file.

    line 91
  9. Distinctive:

    When the launch prompt identifies this session as an ensemble reviewer:

    line 97
  10. Distinctive:

    Read the supplied handovers and optional session path directly.

    line 99
  11. Distinctive:

    Run only safe, read-only, focused checks.

    line 102
  12. Distinctive:

    Do not edit files, write handovers, commit, push, or launch agents.

    line 104

“Common” is measured: kept by at least 6 in 10 of the 158 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

Review and Repair

Review for correctness, security, regressions, and acceptance-criteria gaps. Delegated reviewers remain read-only. In coordinator mode, do not edit source directly; coordinate repair workers when the review requires changes.

Coordinator Mode

1. Establish context and scope

Derive the coordinator files before continuing:

if [ -n "${PI_SESSION_FILE:-}" ]; then
  SESSION_FILE="$PI_SESSION_FILE"
elif [ -n "${CLAUDE_CODE_SESSION_ID:-}" ]; then
  SESSION_FILE="$HOME/.claude/projects/$(printf '%s' "${CLAUDE_PROJECT_DIR:-$PWD}" | tr '/.' '--')/${CLAUDE_CODE_SESSION_ID}.jsonl"
else
  echo "Error: /review requires a persistent session file (PI_SESSION_FILE or CLAUDE_CODE_SESSION_ID)." >&2
  exit 1
fi
test -f "$SESSION_FILE" || { echo "Error: session file not found: $SESSION_FILE" >&2; exit 1; }
PLAN_FILE="${SESSION_FILE%.jsonl}.plan.md"
TODOS_FILE="${SESSION_FILE%.jsonl}.todos.md"
REVIEW_FILE="${SESSION_FILE%.jsonl}.review.md"
  1. Require SESSION_FILE. Read PLAN_FILE or TODOS_FILE when each exists; they are optional.
  2. Recover intent from the current session and repository state when handovers are absent. Use the session-reader skill for focused extraction instead of parsing a large JSONL manually.
  3. Determine the exact base commit and current HEAD from managed-worktree and Git evidence. Ask only when a material scope ambiguity remains.
  4. Read ~/.pi/agent/skills/superconductor/SKILL.md and follow its live orchestration preflight.

2. Run one review attempt

Launch one model-diverse SC reviewer ensemble with three independent read-only Pi Chat UI sessions and unique attempt-scoped labels:

RolePi modelReasoningOwnsAvoids
leadopenai-codex/gpt-5.6-solhighbroad correctness, acceptance criteria, cross-report synthesisstyle-only polish
grokopenrouter/x-ai/grok-4.6configured defaultadversarial correctness, security, trust boundariesgeneral maintainability polish
kimiopenrouter/moonshotai/kimi-k3configured defaultregressions, cross-file behavior, frontend/accessibility, focused testsduplicating broad security review

At preflight, verify all three exact model IDs under the enabled pi provider with sc chat providers --json. Fail clearly rather than substituting a provider or model. Current sc team run cannot select a UI or model per role, so do not use it for this ensemble. Launch each role with sc layout run tabs, --provider pi, --ui chat, its exact --model, and --reasoning high only for the lead. The explicit Chat UI is required because SC's omitted/auto UI currently resolves delegated Pi launches to terminal mode rather than the configured Pi chat experience.

Give each role:

  • the exact diff/commit range and checkout;
  • a concise intent summary;
  • available plan/todos paths;
  • the session path only as optional fallback context;
  • its exclusive focus and the delegated contract below.

Start all three sessions without waiting between launches. Capture every returned stable target, wait for all three, and read each target's final report. Check target/provider errors and malformed or incomplete output; do not infer success from idle state.

After collecting the grok and kimi reports, send them to the same lead target for a synthesis turn. Require the lead to deduplicate claims, preserve disagreements, and return one proposed verdict with concrete findings. Wait for and read that same lead target again; do not launch a replacement lead.

Reviewers should not all run the same broad suite. Let the kimi role run focused tests when useful; the coordinator runs one definitive verification set after collecting reports.

Independently verify the lead's synthesis against the diff and specialist reports. A finding blocks approval only when it is concrete, introduced by the review range, and either P0/P1 or a P2 required by the selected acceptance criteria. P3 never blocks approval.

Write the current attempt to the supplied review file before any repair. Set APPROVED only when no blocking finding remains.

3. Repair NEEDS CHANGES automatically

When blocking findings remain:

  1. Require a clean checkout and a committed review range before automatic repair. If the reviewed implementation includes uncommitted changes, write NEEDS CHANGES and stop rather than letting a worker absorb user-owned work into a commit.
  2. Group findings into at most three coherent, dependency-ordered repair tasks. Use IDs REVIEW-FIX-<round>-<n>.
  3. Launch one source-writing Pi worker at a time through raw SC. Give it the review path, available plan/todos paths, exact findings, acceptance criteria, and checkout. Require it to read ~/.pi/agent/skills/worker/SKILL.md.
  4. Require one focused verified commit per repair task and no push. The worker must leave task-owned files clean after its final verification.
  5. Wait and read the same stable worker target. Verify its reported SHA, diff scope, checks, and clean status independently before launching the next worker.
  6. Record repair task IDs, commit SHAs, and verification in the review file.
  7. Re-run a fresh independent review attempt against the original base through the new HEAD, using new ensemble labels.

Run at most two repair rounds. Stop early and report NEEDS CHANGES when a worker blocks, verification fails, a safety decision requires the user, or blocking findings remain after round two. Do not hide or downgrade unresolved findings to force approval.

4. Finish visibly

Always end with a normal assistant response containing:

  • final verdict;
  • review-file path;
  • reviewed range;
  • repair commit SHAs;
  • remaining blocking findings or none;
  • verification results.

Do not end after only writing or rereading the review file.

The coordinator owns every handover-file write. Do not create a captain protocol, custom state store, worktree, push, PR, merge, or cleanup action.

Delegated Reviewer Contract

When the launch prompt identifies this session as an ensemble reviewer:

  • Read the supplied handovers and optional session path directly; treat them as read-only.
  • Inspect the assigned diff and trace relevant unchanged logic before judging it.
  • Stay within the assigned focus and avoid duplicating another role's scope.
  • Run only safe, read-only, focused checks. Do not run a broad suite unless your assigned focus requires it.
  • Report only concrete, introduced, actionable issues. Include priority, file/line, impact, and suggested fix.
  • Do not edit files, write handovers, commit, push, or launch agents.
  • Finish with a concise normal assistant response containing APPROVED or NEEDS CHANGES, followed by findings and evidence. Do not call sc team report; these model-pinned Chat UI reviewers are collected from their stable targets.

Priorities

  • P0: production breakage, data loss, or exploitable security flaw.
  • P1: likely functional failure or serious foot gun.
  • P2: concrete scoped improvement; blocks only when required by acceptance criteria.
  • P3: minor polish; never blocks approval.

Review File Format

# Code Review

**Verdict:** APPROVED | NEEDS CHANGES
**Session:** `/absolute/path/to/session.jsonl`
**Plan:** `/absolute/path/to/session.plan.md` | not provided
**Todos:** `/absolute/path/to/session.todos.md` | not provided
**Reviewed commits:** [base..HEAD]
**Repair rounds:** 0 | 1 | 2

## Summary
[Concise evidence-based assessment]

## Verification
- `[command]` — [result]

## Findings
### [P1] [title]
- **File:** `path/to/file:line`
- **Issue:** [specific problem]
- **Impact:** [observable consequence]
- **Suggested fix:** [concrete direction]
- **State:** open | addressed by `<sha>`

## Repair Commits
- `REVIEW-FIX-1-1` — `<sha>` — [summary and verification]

## Independent Reports
- **lead (`openai-codex/gpt-5.6-sol`, high):** [synthesized verdict and evidence]
- **grok (`openrouter/x-ai/grok-4.6`):** [verdict and evidence]
- **kimi (`openrouter/moonshotai/kimi-k3`):** [verdict and evidence]

## Residual Risks
- None | [nonblocking risk]

Omit empty findings or repair sections. Preserve concise attempt and repair evidence when replacing the file with the final verdict.

Download now (ZIP)

  • Other versions192 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 192

    1. garrytan/gstack★ 139ksame name
    2. ansible/ansible★ 71ksame name
    3. docling-project/docling★ 70ksame name
    4. traefik/traefik★ 65ksame name
    5. ClickHouse/ClickHouse★ 51ksame name
    6. temporalio/temporal★ 24ksame name
    7. tisfeng/Easydict★ 15ksame name
    8. juicedata/juicefs★ 15ksame name
    9. elie222/inbox-zero★ 13ksame name
    10. gitkraken/vscode-gitlens★ 9.9ksame name

    182 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use daily-arxiv, exp-eval and 9 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.
    • LambenthanSkill

      daily-arxiv

      每日从 arXiv 拉取新论文,过滤相关性,auto-ingest 高优先级论文,检测 SOTA 更新

      Also in 5 projects that use this

    • LambenthanSkill

      exp-eval

      实验判决门:Review LLM 独立评判实验结果 → 4 种判决路径 → 自动更新 claims confidence、ideas status、graph edges

      Also in 5 projects that use this

    • SethGammonSkill

      ascii-diagram

      Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed by math, not token prediction. Includes post-render verification.

      Also in 4 projects that use this

    • DAIR-AutoResearchSkill

      exp-pilot-eval

      Pilot result evaluation — read pilot results, apply success criteria, update idea page (pilot_result, failure_reason if failed), generate PILOT_VERDICT_REPORT. Called by /ideate Phase 5 after /exp-pilot-run.

      Also in 4 projects that use this

    • DAIR-AutoResearchSkill

      exp-pilot-run

      Pilot experiment execution — read Pilot Spec YAML, write pilot code, run experiment(Confirm with the user before operation and require the applicant to conduct manual inspection), return results. Called by /ideate Phase 5. Does NOT modify wiki pages or judge pass/fail.

      Also in 4 projects that use this

    • +5 more from Lambenthan
    • +1 more from DAIR-AutoResearch
  • In this repository14 other files it gives its agents.

Does it work?

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

Reviews can't be read right now.

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.