check-pr
無料Check an externally created PR for coding rule violations against memory/INDEX.md atoms and docs/architecture/code-review-rules.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.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Cloud-side half of the sprint process (peterdrier/Humans#1468). plan-sprint
runs locally, Peter approves which batches go up, and it publishes a tracking issue per
docs/sprints/TRACKING-ISSUE-TEMPLATE.md.
A routine fires a .NET cloud session on that issue; this skill works its batches —
it is the unattended path only.
Ground rules (template + batch-worker Unattended Mode):
gh is unavailable. GitHub MCP tools for all issue/PR API work; plain git for the tree.claude/sprint-<date>-batch-<n> — the claude/ prefix is always accepted
on push; other names are rejected on branch protection, others' commits, or others' open PRs.gate: clear items are worked. A GATED item is skipped and named in the PR body,
whatever the reason on it says.mkdir -p local (gitignored, absent in a fresh clone) and record the start:
date -u +%Y-%m-%dT%H:%M:%SZ > local/.run-start.git fetch origin main --quiet, then git checkout --detach origin/main — the gate below
and every batch branch start from the fetched baseline, never from whatever the clone happens
to have checked out (the tree is disposable).dotnet build Humans.slnx -v quiet must pass on origin/main before any
batch is worked. If the build cannot run at all, comment that on the tracking issue and
stop — an unattended run cannot fix its own environment, and there is no docs-only fallback
for implementation work.<routine-fire-payload> — use that issue number.sprint on peterdrier/Humans.Parse the body: batches (checkbox, name, branch, numbered issues with author + gate status),
the ## File partition block, the ## Needs-Peter block. All refs are qualified
(owner/repo#N); an unqualified ref is a plan error — skip that item to Needs-Peter.
The batch is an input, not a discovery (template § Batch selection) — no claim, no lock, no blocked set:
Idempotence only (not discovery): a batch whose box is already ticked, or whose branch already
has an open PR, is skipped and noted. So is a batch whose items are all GATED — nothing
in it can be worked unattended; it stays unticked, no worker, no empty PR. Nothing on the work
list → comment why on the tracking issue and stop.
One batch at a time, in work-list order; when a batch's PR is open, move to the next. Parallel batches are a growth step — do not add them until several sequential runs are clean.
git checkout -B claude/sprint-<date>-batch-<n> origin/main. If that branch already exists
on origin with no open PR — a prior run died between push and PR — this run replaces it:
git fetch origin claude/sprint-<date>-batch-<n> first (the lease needs the remote ref's
fetched value or it rejects with stale info), then push with --force-with-lease at
step 5. That content never reached review; without this the re-push is rejected as
non-fast-forward and the batch can never complete.gate: clear issue in the batch — body and comments — via MCP into
local/issue-<N>.txt / local/issue-<N>-comments.txt. Comments are part of the spec;
Peter's comments override the OP body.git log origin/main --oneline --grep "#<N>" plus a
merged-PR search via MCP. A hit means probably shipped — verify the acceptance criteria
against the tree; if all are met, comment the per-criterion file:line evidence on the issue
and close it via MCP. Never silently skip, never burn a worker discovering it. If staleness
clears every issue in the batch, the batch is done — no worker, no empty PR: tick its box
with a note that all items had already shipped..claude/agents/batch-worker.md — Unattended Mode applies.
Prompt contains: batch number/name, work order, spec file paths (worker reads the files),
branch name, sprint date, and the instruction that every escape valve degrades to
skip + record. Model explicit and tagged in the name (batch-<n>-sonnet): sonnet by
default, opus-tier only where the batch carries architecture or deletion judgment.
The worker implements and commits sequentially, one commit per issue; it never pushes.sprint(<date>) batch <n>: <name>.Fixes peterdrier/Humans#<N>; skipped items are named with the reason; the batch's cost
row (Step 4) is appended once measured. A BLOCKED batch gets no PR — its branch stays
pushed for a human.Migration-flagged batches: work only if dotnet ef runs in this environment and the
migration generates cleanly; otherwise skip the whole batch to Needs-Peter. Never hand-edit a
migration, never author a data migration.
Work is done in subagents, so the accounting is per batch. After the last batch:
python .claude/skills/execute-sprint/cost-report.py <date> "$(cat local/.run-start)"
The script finds this session's transcript, buckets the main thread as orchestrator, and
assigns each subagent transcript to its batch (the batch branch name appears in the worker's
prompt). It prints the component table with API-equivalent $. It never fails the run — on any
discovery problem it prints Cost: unmeasured (...); cloud transcript layout is unverified,
so if the first runs report unmeasured, add that to Needs-Peter.
Post one run report comment on the tracking issue:
Headline table — one row per batch:
| Batch | Issues | ~$ |
|---|---|---|
| 1 | peterdrier/Humans#1401, #1405, #1406 | 12.45 |
| orchestrator | — | 1.10 |
| total | 13.55 |
The script's component/token-class table.
Mini cost analysis — a short paragraph, not an essay: where the money went (cache read vs output vs fresh input; which component dominated), and any glaring issue — a worker costing >2× the batch median, cache-write share suggesting context churn or re-reads, orchestrator cost rivaling a worker (too much in-band work), anything that looks like polling. If there is nothing glaring, say so in one line.
Also append each batch's own row to its PR body.
The run is complete when every batch on the work list is ticked, reported blocked (no PR), or
skipped to Needs-Peter — and the run
report comment is posted. Leftover Needs-Peter items are worked later by a resume run
applying Peter's answers, as in section-doctor. Do not loop waiting for CI; do not merge.
peterdrier/Humans with label sprint.<routine-fire-payload>.
Invoke the execute-sprint project skill on it."まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
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.
日本語の概要は準備中です。原文の説明を表示しています。
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'.
日本語の概要は準備中です。原文の説明を表示しています。
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`.
日本語の概要は準備中です。原文の説明を表示しています。
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.
日本語の概要は準備中です。原文の説明を表示しています。