本文へ移動
cccskills
無料GitHub で公開

debt-review

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'.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md7.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Debt review — validate the nightly Codex PR

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.

1. Find the PR — or stop

$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).

2. Judge every commit

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 against AGENTS.md, docs/architecture/peters-hard-rules.md, docs/architecture/code-review-rules.md, and every memory/INDEX.md atom 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 table sha | 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.

3. Triage the bot findings

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:

  • Fixable without a decision (including D1 shapes) → fix it in the round-1 commit and delete the row; list D1 changes under Pre-approved contract changes in the PR body.
  • Stale (already fixed) or D5 close / D6–D9 not debt → delete the row.
  • Truly needs Peter → write it in D3 format, answerable cold (what the code does today, what would change, why it matters, a yes/no proposal with a concrete signature — never the row id alone); search for an existing issue first (cite it instead of filing), file the rest, and delete each elevated row in the round-1 commit with the issue in the commit message. At most three new issues per review, follow-ups below included — everything past the cap stays in the ledger for a later night. Never bulk-file.

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.

4. One commit, then the gate

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).

5. Report on the PR

One PR comment, starting ## Debt review:

  • the commit verdict table (all commits, one row each)
  • the /fix triage table
  • issues filed, owner-qualified, and the rows they replaced
  • the ledger line: open rows before → after this review
  • Rounds spent: 1 of 3 and the pushed sha
  • a one-line recommendation: merge, merge after steward rounds, or close (more than half the substantive commits reverted)

6. Steward it yourself

No 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-pr

無料

Check an externally created PR for coding rule violations against memory/INDEX.md atoms and docs/architecture/code-review-rules.md.

日本語の概要は準備中です。原文の説明を表示しています。

nobodies-collective/Humans32026年10月7日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

nobodies-collective/Humans32026年10月7日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

nobodies-collective/Humans32026年10月7日 更新

ef-regen

無料

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`.

日本語の概要は準備中です。原文の説明を表示しています。

nobodies-collective/Humans32026年10月7日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

nobodies-collective/Humans32026年10月7日 更新

finish

無料

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.

日本語の概要は準備中です。原文の説明を表示しています。

nobodies-collective/Humans32026年10月7日 更新

nobodies-collective のスキルをすべて見る

このスキルの問題を報告する