check-pr
無料Check an externally created PR for coding rule violations against memory/INDEX.md atoms and docs/architecture/code-review-rules.md.
日本語の概要は準備中です。原文の説明を表示しています。
Review, repair and steward the nightly Codex debt-sweep PR (branch codex/daily-debt/<date>). Judges every commit GOOD / REPAIR / REVERT, triages the bot review findings through /fix, lands one round-1 commit, files follow-up issues, then stewards the PR itself with a 3-round ceiling. Run by the 08:00 UTC cloud routine; also '/debt-review', '/debt-review 1789'.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
The Codex runner (.codex/cron/run-daily-debt.sh) opens one PR a night on
codex/daily-debt/<YYYY-MM-DD>, ~25 commits, built and tested but never reviewed.
Green is not good: this skill decides which commits are worth keeping, repairs or
reverts the rest, deals with the bot findings, and gets the PR mergeable for Peter.
Peter merges. Never merge, never force-push, never rewrite the branch's history.
Budget: 3 review rounds total for this PR (Peter, 2026-09-22), and this run's commit is round 1.
$ARGUMENTS names a PR number; otherwise take the newest open codex/daily-debt/* PR
(not just today's: a late runner can open it after 08:00, and it skips nights while one is
open):
gh pr list --repo peterdrier/Humans --state open --limit 200 --json number,headRefName,createdAt --jq '[.[] | select(.headRefName | startswith("codex/daily-debt/"))] | sort_by(.createdAt) | last'
Stop with one line, touching nothing, when: no PR; it is not open; or it already has a
commit carrying a Review-round: trailer or a comment starting ## Debt review (a
previous run owns it). Otherwise subscribe_pr_activity for it now, before any review
work, so no bot event between here and §6 is lost. In a cloud run (CLAUDE_CODE_REMOTE=true) check out the head
branch in the repo root; locally use a worktree under .claude/worktrees/. Push by URL
(push-by-url-in-cloud).
List the PR's non-merge commits and pair each with its line in the PR body (the claimed
intent). Fan out: one pd:orch-opus-medium worker per ~6 commits, read-only, each given the
commit shas, their PR-body lines, and this brief:
For each commit: read
git show <sha>and the code around it at the PR head (not just the hunk). Verdict GOOD, REPAIR (right idea, specific defect, fix is small and certain — say exactly what) or REVERT (wrong, unsafe, or net-negative). Judge againstAGENTS.md,docs/architecture/peters-hard-rules.md,docs/architecture/code-review-rules.md, and everymemory/INDEX.mdatom whose trigger matches the files (read the atom). Specifically: behaviour actually preserved or actually fixed; no other section's tables; no new public surface without a defensible reason; user-facing strings in all six cultures with section-prefixed keys; invariant doc updated for behaviour changes; tests not weakened; no dead code left behind (orphaned constants, unused overloads); not bookkeeping dressed as a fix. Default to GOOD for a plain, correct change — style is not a defect. Return a tablesha | claim | verdict | reason (≤20 words) | repair (if REPAIR)and nothing else.
Spot-check any REVERT or REPAIR verdict yourself against the code before accepting it.
A REPAIR you are not certain of is a REVERT. A reverted commit's ledger/doc edits go with
it — git revert handles that.
Run the /fix gates on every unresolved thread (Codex, Claude bot,
Gemini; both repos) at round 1. A finding on a commit you are reverting is resolved as
REVERTED — <sha> reverted in <new sha>, no other triage. A finding that points at the
same defect as a REPAIR verdict is fixed by that repair. Print the /fix triage table.
Ledger first. The runner prints Open rows: <before> → <after> under ## Ledger.
Check that the run worked already-found rows before new finds, and that each row it added
says why it could not be fixed tonight — if you can fix one here, do. A row that was only
reworded or moved is not a close.
Re-check Needs-Peter rows, then elevate. Codex's Needs Peter list is a claim, not
a verdict — something Codex couldn't fix may be fixable here. Take the list in order and
verify each row against the code. Apply debt-sweep-standing-policy
(D1–D13) first: a rule-prescribed contract change is pre-approved (D1), internal types are
never public surface (D2), and D5–D9/D13 rows close outright. Elevate a row only when it truly
needs Peter's decision (a NEW interface, service or endpoint, or a policy no rule answers),
never because the fix looked hard:
Follow-up issues (the /fix §5 criteria: real, P2+, not already tracked, out of this
PR's scope) — plus any debt a REVERT verdict leaves unfixed that is worth doing properly —
go on peterdrier/Humans (issue-home-routing;
a cloud run cannot write upstream), each with a **Section:** line and a link to the
thread or commit.
git revert --no-commit each REVERT (newest first), apply every REPAIR and every /fix
FIX, then one commit:
Debt review: revert <n>, repair <m>, fix <k> findings
Reverted: <sha> <claim> — <reason>
Repaired: <sha> <claim> — <what>
Fixed: <file:line> <finding>
Review-round: 1
Gate: dotnet build Humans.slnx -v quiet with 0 errors, then
dotnet test Humans.slnx -v quiet --no-build with no Failed!
(Humans.Integration.Tests self-skip). Red → fix it inside this same commit; if a repair
can't go green, turn it into a revert. Never push red. Nothing to change → no commit.
Push, then reply in every thread with its verdict and the sha, react, resolve (mechanics:
pr-review-feedback-handling).
One PR comment, starting ## Debt review:
Rounds spent: 1 of 3 and the pushed shaNo hand-off: this session is the steward (subscribed since §1). End the
turn with the summary below, and on every wake follow the pd:steward skill's
wake protocol, with the .claude/steward.md overlay, with Ceiling: 3 (rounds spent: 1, or 0 if §4 pushed nothing). Round
workers are pd:orch-opus-medium via Task, per the round-worker brief with Ceiling: 3. At the ceiling, or
when the PR is merged or closed, unsubscribe_pr_activity and stop.
Summary: PR URL, verdict counts (good / repaired / reverted), findings fixed / declined / filed, issues filed, pushed sha.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Check an externally created PR for coding rule violations against memory/INDEX.md atoms and docs/architecture/code-review-rules.md.
日本語の概要は準備中です。原文の説明を表示しています。
Two-phase memory hygiene. Phase 1: scan external Claude Code memory (~/.claude/projects/<slug>/memory/) for durable rules to migrate into the repo and entries already duplicated by repo atoms. Phase 2: audit in-repo memory/, CLAUDE.md, docs/architecture/, and docs/sections/ for dead links, duplication, drift, and bloat.
日本語の概要は準備中です。原文の説明を表示しています。
Autonomous themed tech-debt cleanup. Reads docs/architecture/debt-ledger.yml, rotates to the least-recently-served debt theme, works it for a time budget (default 2h) or until drained, opens one PR, and asks judgment questions inline at the end. Use for daily debt burndown without Peter pointing at a target: grandfathered analyzer rules, architecture-test baselines, obsolete-field reads, cross-section stitching.
日本語の概要は準備中です。原文の説明を表示しています。
Scrap and regenerate the in-flight EF migrations on the current branch as one consolidated migration. Use when migrations have accumulated mid-development cruft (added/removed columns, stacked add-column-to-existing-table fixes, hand-edited SQL that needs to come out, schema changes that should have been one migration but ended up as five), or when the branch has merged main and its migrations are now stuck mid-chain so `dotnet ef migrations remove` is unsafe. Triggers on phrases like 'regen the migrations', 'redo these migrations', 'scrap and regen migrations', 'consolidate the in-flight migrations', 'redo the migration stack', or any time an agent hits the mid-chain situation in `memory/architecture/migration-regen-after-rebase.md`.
日本語の概要は準備中です。原文の説明を表示しています。
Use when a sprint tracking issue (label `sprint`) on peterdrier/Humans needs working — routine-fired cloud runs, or any unattended session told to execute the sprint queue.
日本語の概要は準備中です。原文の説明を表示しています。
End-of-session cleanup for coding and project work. Use when the user says "finish", "wrap up", "done for now", or any variation of ending a work session.
日本語の概要は準備中です。原文の説明を表示しています。