pr-walkthrough
Visual walkthrough of a PR or branch: what changed, how the code flows now, what it impacts, optionally how it matches a spec, plus a separate retrospective of the coding session. Disposable output, never committed.
- License 许可
- MIT
- 最近更新
- 2026-11-04
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- pr-walkthrough
- description
- Visual walkthrough of a PR or branch: what changed, how the code flows now, what it impacts, optionally how it matches a spec, plus a separate retrospective of the coding session. Disposable output, never committed.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档agents/openai.yaml157 B
- 参考文档references/diagrams.md3.5 KB
- 参考文档references/mermaid.md3.6 KB
- 参考文档references/template.md4.8 KB
03 SKILL.md 正文
A walkthrough is the reading guide for one change: it teaches a human what the code does and how it lands on the project. When the change came from a spec, it also grades the diff against that spec. The user passes a PR number or URL, a branch, or a fixed point (main, a sha), and optionally a spec link. Produce it from the diff and the repo.
The output is disposable: a reading aid for this review, not a document the repo maintains. It lives in a self-ignoring folder at the repo root and never enters git. The slug is pr-<n> for a PR, otherwise the branch name (the current branch for a bare fixed point) with / replaced by -.
.walkthroughs/<slug>/
.gitignore contains `*`, so the folder ignores itself
WALKTHROUGH.md the reading guide, diagrams inline as Mermaid fences
RETRO.md the retrospective of the session that produced the change
Process
-
Pin the change. Read the change in place; the user's checkout and working tree stay as they are.
- PR:
gh pr view <n> --json number,title,body,baseRefName,headRefName,headRefOid,commits, thengit fetch origin <baseRefName> pull/<n>/head. The fixed point isorigin/<baseRefName>. Capturegit diff origin/<baseRefName>...<headRefOid>(same asgh pr diff <n>) andgit log origin/<baseRefName>..<headRefOid> --oneline. Read head files withgit show <headRefOid>:<path>. - Branch: the fixed point is
git merge-base <default-branch> <branch>. Capturegit diff <fixed-point>...<branch>andgit log <fixed-point>..<branch> --oneline. - Fixed point: capture
git diff <fixed-point>...HEADandgit log <fixed-point>..HEAD --oneline.
Ask the user for the fixed point only when none resolves. Create the output folder with its
.gitignore. Done when the fixed point resolves, the diff is non-empty, andgit status --ignored --shortshows!! .walkthroughs/. - PR:
-
Decide the spec branch. Three cases:
- The user passed a spec link: use it, skip the hunt.
- No link passed: ask the user one question, "Is there a spec or issue this change implements? Give the link, or say none." Hunt only on a yes: PR body and commit messages → issue (
#123,Closes #45, tracker URL; fetch perdocs/agents/issue-tracker.mdwhen present) → spec (a blueprint underdocs/blueprints/, a file underdocs/orspecs/matching the branch or feature, or a spec section in the issue body). Record each hop. - The user says none: mark spec
noneand go straight to step 3.
Done when the spec resolves to a path or URL, or is marked
none. Without a spec, Link chain and Spec match drop from the doc and nothing else changes. -
Read the change as modules, not hunks. Group the diff by module. For each module: what it did before, what it does now, and which other modules call it (
grepthe symbols the diff touches to find dependents). Facts are your job; dispatch a sub-agent for the dependents sweep on a large diff. Done when every changed file sits under one module and every changed public symbol has its callers listed. -
Write
WALKTHROUGH.mdfromreferences/template.md. Fill every section in order. Draw the diagrams in place perreferences/diagrams.md: change map, flow after the change, blast radius, a before-and-after pair for each flow whose behavior changed, and a class diagram for each data type the diff adds or changes. With a spec, fill Spec match by walking the spec's decisions one by one and grading each with the template's status vocabulary, citingpath:lineevidence from the diff. Done when every section is filled and every fence renders. -
Write
RETRO.md. Find the session that produced the change: the current one only if this conversation wrote the diff; otherwise the logs the user names, or a search of the session logs for the head branch or commit shas. Read../retro/SKILL.md(theretroskill; its step 2 names the log folders) and follow its steps 1–3 against that session. In place of its step 4, write the candidates, in severity order, intoRETRO.mdin the shape at the end of the template. When no session is found,RETRO.mdholds the single lineNo session logs available. -
Edit the prose of both docs against
../to-blueprint/references/prose.md, then run the completion check.
Completion check
git status --ignored --shortshows!! .walkthroughs/and no tracked or untracked file under it.- Every file in the diff appears in the Change map under exactly one module.
- Every changed public symbol appears in Impact with its callers, or is marked
no callers. Every changed data type is a node in Data types changed, never pasted code. - With a spec: every decision in it has a status row with evidence, and every hunk not traceable to the spec is listed under Not in the spec.
- Every diagram is a Mermaid fence within budget, with a
Figure:line. - Reading order lists every changed file once, in the order a newcomer should open them.
RETRO.mdexists and holds theretrocandidates or the no-logs line.
Report the folder path, the spec-match totals (done, partial, missing, deviated, deferred) or no spec, and the retro candidate count.
04 同仓库更多 Skills
explainroo
Make an explainer video (MP4) with a voice-over using explainroo. The voice is made on this computer and no API key is needed. Use when the user asks for an explainer, how-to, walkthrough, launch or tutorial video, an animated diagram with a voice-over, or a short for YouTube, Reels or TikTok.
unslop
Cut AI tells from prose a human will read. Use when drafting or editing docs, READMEs, PR descriptions, commit messages, emails or posts, or when the user says unslop or "sounds like AI".
technical-writing
Layered technical-writing standard (Diátaxis, Google style, STE, Global English) for docs, RFCs, READMEs, PR descriptions and commit messages.
no-comments
Spawn Comment Sicko, fix accepted findings, and offer encodings for claimed constraints.
ponytail
Lazy senior dev mode: the smallest change that fully solves the task, and a reply a busy human understands in one read. Use on any coding task (writing, fixing, refactoring, reviewing, choosing dependencies) and when the user says "ponytail", "be lazy", "simplest solution", "yagni", or complains about over-engineering or bloat. Levels: lite, full (default), ultra.
ponytail-review
Quality review of a change: is the logic right, is it safe, does it hold under real load, is risky code tested, is it fast enough, and is every line needed. Reads the connected code, not only the diff. Each finding is explained in plain English. Use for "review this", "code review", "review the last commit", "review my PR", "is this over-engineered", /ponytail-review.