check-pr
無料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.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Two surfaces:
~/.claude/projects/<slug>/memory/ (per-machine; never hardcode the path)memory/, CLAUDE.md, docs/architecture/design-rules.md, docs/architecture/code-review-rules.md, docs/sections/Repo memory/ is the source of truth for durable project rules (syncs via git). External holds only about-Peter / user-pref entries and active-PR working state. Read memory/META.md before working.
external — Phase 1 onlyrepo — Phase 2 onlyreport-only — full report, no changesmemory/process/always-use-worktree.md selects. Locally that is a worktree at .claude/worktrees/cleanup-memory-<date> and the main checkout is never edited; in a cloud run it is the repo root on the branch.Slug = absolute git root with :, /, \ replaced by -. Example: H:\source\Humans → H--source-Humans.
PROJECT_ROOT="$(git rev-parse --show-toplevel)"
REPO_NAME="$(basename "$PROJECT_ROOT")"
EXT_DIR=""
for d in "$HOME"/.claude/projects/*/memory; do
[ -f "$d/MEMORY.md" ] || continue
parent_slug="$(basename "$(dirname "$d")")"
if echo "$parent_slug" | grep -qi "$REPO_NAME" \
|| grep -qiE "(humans|nobodies)" "$d/MEMORY.md" 2>/dev/null; then
EXT_DIR="$d"; break
fi
done
if [ -z "$EXT_DIR" ]; then
SLUG="$(printf '%s' "$PROJECT_ROOT" | sed 's|[:/\\]|-|g')"
candidate="$HOME/.claude/projects/$SLUG/memory"
[ -d "$candidate" ] && EXT_DIR="$candidate"
fi
If still empty, ask Peter — do not guess. Phase 1 has nothing to do on a fresh machine; skip to Phase 2.
Classify every file in $EXT_DIR:
| Bucket | Criteria | Action |
|---|---|---|
| A. Already in repo | Body substantively present in a repo atom (verify content, not filename) | Delete from external after Peter approves |
| B. About-Peter / user-pref | Working style, tool preferences, interaction rules | Keep |
| C. Active-PR / ephemeral | Mentions in-flight branch/PR/worktree or "in progress" state | Keep |
| D. Durable rule, not in repo | Imperative rule with Why:/How to apply:, architecture/process/code-convention | Migrate |
If a repo atom is weaker than the external version (drops a constraint or "why"), treat as D and propose strengthening the atom — don't just mark it A.
ls "$EXT_DIR". Read MEMORY.md first — it indexes everything and often pre-classifies files.*.md under $EXT_DIR.memory/**/*.md by content (naming conventions diverge: external uses feedback_foo_bar.md, repo uses bucket/foo-bar.md).rm "$EXT_DIR/<file>". Update $EXT_DIR/MEMORY.md to drop index lines.EnterWorktree into it (mandatory; without this, edits land in the main checkout), in a cloud run just check the branch out in the repo root — then write memory/<bucket>/<kebab-name>.md (frontmatter per memory/META.md), add INDEX line (alphabetical within bucket), commit, push, open PR. Do NOT delete the external file in the same PR — wait until the migration PR merges.memory/INDEX.md, memory/META.md, memory/**/*.md, CLAUDE.md, docs/architecture/design-rules.md, docs/architecture/code-review-rules.md, docs/architecture/coding-rules.md, docs/sections/*.md
Each finding: severity (BLOCK / IMPORTANT / NIT), location, what's wrong, proposed fix.
memory/INDEX.md line → verify file exists. Missing → BLOCK.memory/<bucket>/*.md → verify INDEX entry exists. Missing → BLOCK.description: frontmatter (BLOCK if missing). INDEX one-liner must share at least one substantive noun with the atom's description — catches drift. Do NOT flag wording differences; by design the INDEX line is a tighter compression.architecture/, code/, process/, product/) per META.md definitions → IMPORTANT.docs/architecture/design-rules.md:
memory/META.md). Over by >20% → IMPORTANT. Candidates to atomize: bulleted rules under "Critical:"/"Important:"/"Rule:" headings, detailed concept sections for narrow tasks. Keep: architecture overview, build commands, terminology, git workflow basics.docs/architecture/coding-rules.md should be a redirect-only stub to memory/INDEX.md. Any crept-in content → IMPORTANT.coding-rules.md references pointing at it for substantive content → IMPORTANT.design-rules.md → NIT.docs/sections/*.md — dead citations to atoms or design-rules sections → IMPORTANT.Consolidated report grouped by severity → present to Peter → apply approved fixes on a new branch + PR, in the same workspace pattern as Phase 1. BLOCK first; IMPORTANT next; NIT only if Peter opts in.
report-only: stop after each phase's report.
memory/process/rules-maintenance.md/freshness-sweepまだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
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'.
日本語の概要は準備中です。原文の説明を表示しています。
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.
日本語の概要は準備中です。原文の説明を表示しています。