checkup
Periodic architectural review — critically re-examines existing design choices, hunts duplication, flags refactor candidates, checks conventions
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Periodic architectural review — critically re-examines existing design choices, hunts duplication, flags refactor candidates, checks conventions
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Periodic documentation review — checks docs/ hygiene, verifies features.md / planned.md / architecture.md / README.md / CLAUDE.md match implementation, and audits the mdbook manual against actual CLI flags, keybindings, and shipped file-type support.
Analyze a target — a crate, a module within a crate, or a single file — for its surface within peek, its place in the architecture, its API, its correctness, and its efficiency. Produces an overview followed by findings. Catches obvious bugs, not a deep edge-case bug hunt.
Scoped code review — determines the change scope (explicit, discussion, or git), picks a source of truth (discussion, new docs, or code), then reviews the changes for correctness, doc agreement, doc coverage, convention adherence, duplicated shapes that want a shared abstraction, hand-rolled complex logic that wants a named/shared function, and unit-test coverage of complex logic.
Generate a 1-3 sentence user-facing highlight blurb for the next release. Reads commits since the last tag, filters out internal refactors / docs / tests / CI / chores, summarises only what a peek user would notice. Output is text the user pastes into the release workflow input after review. Use when user says "release highlight", "highlight for next release", "what's new", "release notes blurb", "/release-highlight".
| name | checkup |
| description | Periodic architectural review — critically re-examines existing design choices, hunts duplication, flags refactor candidates, checks conventions |
| disable-model-invocation | true |
| context | fork |
| agent | general-purpose |
A critical architectural review of the peek codebase. The goal is not to confirm the code follows its own conventions — it usually does. The goal is to find where the architecture itself has drifted, where past decisions no longer fit, and where the code has grown duplication or debt that the conventions don't catch.
Precision over recall. A short report of real issues beats a long report padded with speculation. Every finding the user must dismiss as "already considered" or "not actually a problem" is a tax on the review's value. If you are not confident a finding is a real problem right now, do not report it. Better to ship five solid findings than twenty mixed ones.
Be skeptical of the code — and equally skeptical of your own findings before they go in the report.
Read these to understand the intended design — then judge the code against it, and judge the design itself against reality:
docs/architecture.md — design principles, data flow, key abstractionsdocs/conventions.md — coding rules and patternsCLAUDE.md — file map and the three north stars (clean architecture,
stream don't load, low cognitive load)docs/checkup-findings.md — open findings and wontfix records from
prior rounds. Do not re-report anything recorded there: open items are
already known, wontfix records are settled decisions. The records are
not immunity, though — if the cited situation has changed (the code
moved, the declining rationale no longer holds, a stated reopen trigger
fired), it is your responsibility to revalidate and surface it as a
new finding that says explicitly what changed since the record.git log --oneline -30 — recent direction; what's been churningThe three north stars are the lens. But also question them: a north star can be violated, and a past decision that honoured one can fall out of step as the codebase grows.
This is the core of the review. For each significant abstraction — trait, central dispatch table, shared manager, "shared" helper module, per-type module shape — ask hard questions:
match file_type chain re-growing in a place compose_modes was
meant to eliminate. A parameter list that crossed into "should be a
struct" three params ago.unwrap() / expect() / panic! on
non-test paths, blocking whole-file reads where streaming is the norm,
allocation in render hot paths, error handling that's Result on one
path and swallowed on its twin.Name the trade-off concretely. "This was reasonable when X; now Y, so it costs Z." Propose a direction, even if rough.
Actively search for repetition the conventions don't flag:
For each cluster: list every site, then either propose the unifying abstraction or argue why the duplication should stay. The project values low cognitive load over dogmatic DRY — three short copies a reader can hold in their head can beat one abstraction they must chase across four files. Make that call explicitly; don't just demand DRY.
Check existing rationale before reporting a dedup candidate. If the duplicated sites carry comments explaining why they are not unified (e.g. "kept separate because X differs in subtle way Y", "tried to merge in commit Z, reverted because…"), read them and judge whether the rationale still holds against the current code. If it does, drop the finding silently — do not report it just to make the user re-litigate a settled decision. Only report it if the rationale is clearly stale or wrong, and say why it's stale.
The mechanical checks — quicker, lower-value, but still worth a pass:
PeekTheme::paint() (raw ANSI outside the
ui.rs status-line composition)Registry / compose_modes dispatchpub(crate) or privatedocs/features.md status out of date vs. the actual codeBefore each candidate finding goes in the report, run it through this filter. Drop anything that fails — do not pad the report with weak items.
If after this filter a severity group is empty, leave it empty. Empty is an honest result; padded is not.
Lead with what's most worth changing — the highest-leverage findings, architecture and duplication first. Then the rest, grouped:
Number every finding with a severity-class ID so it's easy to refer
to later: H / M / L + a sequential number within that class (H1,
H2, M1, L1, …), numbered from 1 per class in report order. The IDs
are local to this report — a handle for the user, not stable tracker IDs.
Each finding: **H1** path:line — what's wrong, *why it matters now*, concrete fix or direction. For refactor candidates, sketch the target
shape. If you considered and rejected a related finding (e.g. a
dedup candidate where the existing rationale still holds), do not
mention it — silence is the right outcome.
Rules: