repo-review
Use when you need a multi-perspective review of this repo. Spawns 6 specialized reviewers (git expert, agentic UX, human UX, nix expert, FP/DRY expert, consistency auditor). Aggregates findings, deduplicates, respects recorded decisions, and proposes changes with human approval.
- License 许可
- Unlicense
- 最近更新
- 2026-11-15
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- repo-review
- description
- Use when you need a multi-perspective review of this repo. Spawns 6 specialized reviewers (git expert, agentic UX, human UX, nix expert, FP/DRY expert, consistency auditor). Aggregates findings, deduplicates, respects recorded decisions, and proposes changes with human approval.
- argument-hint
- [full | scope:<path> | decisions-only]
02 资源文件 13
- 参考文档personalities/agentic-ux.md3.4 KB
- 参考文档personalities/consistency-auditor.md2.9 KB
- 参考文档personalities/fp-dry-expert.md3.9 KB
- 参考文档personalities/git-expert.md1.9 KB
- 参考文档personalities/human-ux.md2.3 KB
- 参考文档personalities/nix-expert.md2.5 KB
- 参考文档references/config-parity.md36 B
- 参考文档references/git-absorb.md33 B
- 参考文档references/git-branchless.md37 B
- 参考文档references/git-revise.md33 B
- 参考文档references/philosophy.md33 B
- 参考文档references/recommended-config.md41 B
- 参考文档review-policy.md5.3 KB
03 SKILL.md 正文
Multi-perspective repo review with parallel specialized reviewers. Human approves all changes. Implementation uses this repo's own skills.
Model Tiers
This skill uses three model tiers. Express these as intent — the tool runtime maps them to available models.
| Tier | Intent | Examples |
|---|---|---|
| TRIAGE | Fast, cheap. Filtering, classification, scoring. | Pre-flight checks, confidence scoring, eligibility |
| REVIEW | Standard depth. Read code, find issues, research. | The 6 reviewer personalities |
| CRITICAL | Deepest analysis. Synthesis, debate, judgment. | Aggregation, debate resolution, finding validation |
When spawning agents, include the tier in the description:
[TRIAGE]agents: usemodel: "haiku"if available[REVIEW]agents: use default model (sonnet-class)[CRITICAL]agents: usemodel: "opus"if available
Tools that don't support model selection use their default for all tiers.
Pre-flight [TRIAGE]
Spawn a [TRIAGE] pre-flight agent that:
-
Loads review policy — reads
review-policy.mdfrom this skill's directory. -
Loads existing decisions — reads all files in
docs/decisions/at the repo root. -
Determines scope from
$ARGUMENTS:fullor empty — review entire reposcope:<path>— review only files under the given pathdecisions-only— skip review, only run decision reinforcement/decay
-
Gathers context:
- List of files in scope (with line counts)
- Recent git log (last 20 commits) for historical context
- Any TODO.md or known issues
-
Returns: scope, decision log, file list, context summary.
Phase 1: Fan-Out (Parallel Review) [REVIEW]
Spawn 6 [REVIEW] reviewer subagents in parallel using the Agent tool. Each gets:
- Their personality prompt (from
personalities/in this skill's directory) - The review policy
- The full decision log
- The scope (which files to focus on)
- The reference docs from
references/in this skill's directory — these are distilled, indexed upstream docs (produced by/index-repo-docs) and should be treated as authoritative baseline knowledge. Reviewers should read them BEFORE doing external research to avoid re-discovering what's already documented. - Read-only access to the repo
- Git blame/history context: tell each reviewer to run
git logandgit blameon files they're reviewing to understand change context. Flag issues that were introduced recently vs pre-existing.
Each reviewer:
- Reads the files in scope
- Runs
git blameon files with findings to confirm whether issues are new (introduced in recent commits) or pre-existing - Does web research for current best practices in their domain
- Checks findings against the decision log (skip accepted decisions with confidence >= 0.5 unless new contradicting evidence is found)
- Searches for new evidence that reinforces or weakens existing decisions
- Returns structured JSON findings per the output schema in review-policy.md
IMPORTANT: Tell each subagent to return findings as a JSON array in a fenced
code block tagged json. Findings that match an accepted decision
(confidence >= 0.5) should be SKIPPED — do not include them.
Only return a decision_updates array if there are CHALLENGES (findings that
contradict accepted decisions with new evidence). Do NOT report reinforcements
or slow-decay — the orchestrator handles confidence maintenance silently.
Phase 2: Confidence Scoring [TRIAGE]
For each finding from Phase 1, spawn a [TRIAGE] scoring agent that receives:
- The finding (description, file, evidence)
- The decision log
- The review policy's false positive rubric (below)
The scoring agent returns a confidence score 0–100:
- 0: Not confident. False positive, doesn't survive scrutiny, or is pre-existing (introduced before recent work).
- 25: Somewhat confident. Might be real, might be false positive. Stylistic issue not explicitly called out in CLAUDE.md or coding standards.
- 50: Moderately confident. Real issue but minor or infrequent. Not important relative to the rest of the repo.
- 75: Highly confident. Verified real issue, will impact functionality, or directly mentioned in coding standards. Existing approach is insufficient.
- 100: Absolutely certain. Confirmed, will happen frequently, evidence directly proves it.
False positive rubric (give to scoring agents verbatim):
These are NOT real findings:
- Pre-existing issues not introduced in recent work
- Something that looks wrong but is intentional (check git blame)
- Issues a linter, typechecker, or formatter would catch (treefmt, deadnix, statix, cspell handle these)
- General quality concerns not in CLAUDE.md or coding standards
- Issues with explicit suppression comments (lint ignore, etc.)
- Functionality changes that are clearly intentional
- Issues on lines not modified in recent work
Score each finding independently. Run scoring agents in parallel.
Filter: Keep findings scoring 75 or 100; drop 0, 25 and 50. Scoring agents must emit one of the five rubric values above — no interpolation. The cutoff used to sit at 80, which is the one value the scale never anchors, so a scorer had no textual basis for landing either side of it.
Phase 3: Aggregate [CRITICAL]
Spawn a [CRITICAL] aggregation agent that receives all findings that survived the confidence filter. This agent:
-
Deduplicates by
(file, line_range):- If 2+ reviewers flag the same area, merge into one finding
- Keep the best description (most specific, best evidence)
- Note agreement count and which reviewers agreed
-
Applies change threshold (from review-policy.md):
highseverity → recommended change- 3+ reviewer agreement → recommended change
- Contradicts decision with confidence < 0.5 → recommended change
- Everything else → observation
-
Checks decision contradictions:
- If a finding contradicts an accepted decision with confidence >= 0.5, DO NOT mark it as a recommended change. Flag for Phase 4.
-
Processes decision updates:
- Merge reinforcement/decay observations across reviewers
- Apply confidence adjustments per the formulas in review-policy.md
-
Validates findings: demote a recommended change to observation unless its
evidencefield contains at least one of — a URL, a verbatim quote of the offending text, or afile:linereference. Prose asserting a problem with none of those three is vague regardless of its severity label.
Phase 4: Debate (Only If Needed) [CRITICAL]
If any findings contradict accepted decisions (confidence >= 0.5):
Spawn a [CRITICAL] debate agent that receives:
- The contradicting finding(s) with evidence
- The original decision with its evidence log
- Arguments from the reviewer(s) who flagged it
The debate agent evaluates both sides and returns a recommendation:
- Uphold: The decision stands. Add the new evidence as a consideration but don't change the decision.
- Challenge: The decision should be re-evaluated. Lower confidence and flag for human review.
- Supersede: Strong evidence warrants a new decision. Draft the replacement for human approval.
Phase 5: Report
Present the aggregated report to the user. Format:
## Review Report
### Recommended Changes (N findings)
1. **[HIGH]** file.md:42 — description (confidence: 92)
Evidence: ...
Suggestion: ...
Reviewers: git-expert, consistency-auditor (2/6 agree)
2. ...
### Observations (N findings)
1. **[LOW]** file.md:10 — description (confidence: 85)
...
### Decision Challenges (requires consensus)
(Only shown if a finding contradicts an accepted decision)
### Proposed New Decisions
(Only shown if reviewers identify an architectural choice worth recording)
Decisions are for **design choices that could be re-litigated** — not bug
fixes. "Use programs.git.settings not extraConfig" is a bug fix. "Keep
disable-model-invocation true" is a decision. The test: would a reasonable
person argue for the opposite approach? If yes, record it. If no, just fix it.
### Status: CLEAN | N findings
One-line summary: "Clean — no recommended changes" or "N recommended
changes, M observations".
Omit from the report:
- Decision reinforcements (confidence bumps with no action needed)
- Decision slow-decay (no action until challenge threshold)
- Findings that match accepted decisions (already decided, skip silently)
- Findings filtered by confidence scoring (< 80)
The goal is convergence: each run should produce fewer findings. If findings persist across runs, either the fix wasn't applied or the decision log is missing an entry. A clean report means the review system is working.
Phase 6: Human Approval and Implementation
ALL changes require human approval. Do not modify any files without explicit confirmation.
After presenting the report, ask the user:
Which recommended changes would you like to implement? You can:
- Accept all recommended changes
- Cherry-pick specific findings by number
- Dismiss findings with reasoning (adds to decision log)
- Accept decision updates
- Approve/reject proposed new decisions
Wait for the user's response. Do not proceed without approval.
Implementation — USE THIS REPO'S SKILLS
Once the user approves changes, implement them using the stacked workflow skills. Do NOT make changes via raw git commands. The implementation flow is:
-
Run
/stack-summaryon the current stack to understand what exists and where approved changes should land. -
Determine distribution: Can approved changes be absorbed into existing unmerged commits (via
/stack-fix), or do they need new commits?- Consistency fixes (stale references, naming) → absorb into the commit that
introduced the inconsistency using
/stack-fix - New content (new decision records, new reference content) → new commits
- Structural changes (reorganization) →
/stack-planto plan the commits
- Consistency fixes (stale references, naming) → absorb into the commit that
introduced the inconsistency using
-
Plan the implementation using
/stack-planif new commits are needed. Present the plan to the user for approval before executing. -
Execute changes:
- Use
/stack-fixfor absorbing fixes into existing commits - Use
/stack-planfor building new commits - Use
/stack-splitif an existing commit needs splitting
- Use
-
Update decision records: Write new decisions to
docs/decisions/, update confidence scores and evidence logs on existing decisions. -
Verify with
/stack-testif a test command is available.
Tips
- First run on a repo will produce more findings. Subsequent runs should be shorter as decisions accumulate and findings get fixed.
- The
decisions-onlyargument is useful for periodic confidence maintenance without a full review. - Reviewers that find no issues should still report decision reinforcements.
- If the report is overwhelming, focus on
highseverity first.lowseverity observations are informational only. - Decision files in
docs/decisions/are part of the repo and go through normal PR review. They are not auto-committed. - The confidence scoring pass dramatically reduces false positives. If too many findings are filtered, lower the threshold from 80 to 60.
- [CRITICAL] tier agents cost more but catch synthesis errors that cheaper models miss. Don't skip the aggregation/debate phases.
04 同仓库更多 Skills
stack-test
Use when you need to run tests or formatters across commits in a stack. Use INSTEAD of manual git test run or looping git checkout + test. Prevents: testing every commit when only the tip has to pass, unbounded parallel jobs exhausting memory, cache misunderstandings.
stack-summary
Use when you need to audit, analyze, or review stack quality before restructuring. Produces a structured summary with per-commit classification, philosophy audit, and violation flags. Output feeds directly into /stack-plan restructure mode. Use INSTEAD of manual git log inspection.
stack-submit
Use when you need to push, submit, or create pull requests for a commit stack. Rebases only the current stack onto upstream main, validates, and pushes INSTEAD of manual git sync + git submit + PR/MR creation. Handles branch creation, stacked PR/MR creation with correct base branches.
stack-split
Use when you need to break up, split, or decompose a large commit into smaller atomic commits. Use INSTEAD of manual git rebase -i + edit or git reset HEAD^. Prevents: non-working intermediate commits, wrong split ordering, missed downstream restack.
stack-plan
Use when you need to plan commits, restructure a stack, or commit uncommitted work as organized atomic commits. Builds a stack from a description, uncommitted work, or existing commits INSTEAD of dumping everything into one monolithic commit with git add -A && git commit, or manual git rebase -i, git reset --soft, or ad-hoc git move sequences. Prevents: wrong commit ordering, forward references, git move -F panics, untested intermediates.
stack-fix
Use when you need to fix, correct, or update content in an earlier commit — line-level edits, content moves, or structural changes. Absorbs staged changes into correct stack commits INSTEAD of running git absorb or git commit --fixup via Bash, or hand-running git prev + edit + git amend + git restack --merge. Prevents: missed dry-run preview, leftover staged changes going unnoticed, forgetting to restack. Falls back to guided manual amend when absorb cannot route hunks.