You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bb65595
Browse filesBrowse the repository at this point in the historyBrowse files
Add review checks and a skill for fresh-context reviews
The review-changes skill runs when the owner says a change is ready.
It briefs fresh subagents with the task in the owner's words, what
done means, and the decisions made, never the author's opinion. A
task review always runs; a blast-radius review runs for code or
config others rely on; a code review runs per check. Each finding is
fixed, dismissed with evidence, or left open for the owner.
Reviewers work in their own git worktree with the change copied in.
- .agents/checks/ has six checks, each saying what to report and
what is fine: tests, the editor's design, the file format, the app
boundary, privacy, and words. CLAUDE.md points to them.
- scripts/rules.test.mjs checks one rule in code: format.ts uses only
the Markdown parser.
- The learn skill now knows review checks, after tests and script
checks.
- docs/agents.md says when to ask for a review or a release, what each
check covers, and how to improve the system.
- Reviewed with the skill itself: a task review and two check
reviews. Their findings are fixed, including a worktree recipe that
now runs pnpm verify, and a rule test that now also catches
`export ... from` and `import()`.
description: Reviews a change with fresh reviewers who see the task and the diff but none of the author's reasoning, then settles each finding with evidence. Use when the owner says "review this", "ready for a PR", "before I merge", or "before a release".
4
+
---
5
+
6
+
# Review a change
7
+
8
+
A review costs several agent runs. Run it when the owner says the change is ready, or asks for a
9
+
review. While you work, `pnpm verify` is the check.
10
+
11
+
1.**Run `pnpm verify`.** Review only a change that passes it.
12
+
2.**Check what reviewers will see:**`git status --short`. Ask the owner about any untracked file
13
+
that doesn't belong to the change. Never `git add -A`.
14
+
3.**Write the brief.** Give the task in the owner's words, what done means, and the decisions
15
+
made. Say where to read the change: `git diff <base>` for every commit and edit since the base
16
+
branch, and the untracked files from `git status`. Never give your opinion of the change, or
17
+
where you think the problems are. Add this rule, word for word, with the paths filled in:
18
+
> The working tree is read-only for you. To run or break code, make your own worktree, copy
19
+
> in the uncommitted and untracked files, and link the installed packages:
Copy file name to clipboardExpand all lines: docs/agents.md
+54-6Lines changed: 54 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,11 @@ is proof; "I read the code" is not.
14
14
hasn't passed.
15
15
3.**Ask first:** Claude Code asks you before it pushes or merges.
16
16
4.**Skills** give each kind of work its first step and its proof: verify, fix a bug, build a
17
-
feature, refactor, learn from a mistake.
18
-
5.**CI** runs `pnpm verify` on GitHub for every push to `main` and every pull request.
19
-
6.**`CLAUDE.md`** tells every agent session what done means, which skill to use, and how tests
17
+
feature, refactor, learn from a mistake, review.
18
+
5.**Review:** when you say a change is ready, fresh reviewers check it against the task and the
19
+
checks in `.agents/checks/`.
20
+
6.**CI** runs `pnpm verify` on GitHub for every push to `main` and every pull request.
21
+
7.**`CLAUDE.md`** tells every agent session what done means, which skill to use, and how tests
20
22
are written.
21
23
22
24
## Rules, and what holds them
@@ -29,6 +31,9 @@ is proof; "I read the code" is not.
29
31
| Fix a bug with a failing test first; refactor without changing assertions | The `fix-bug` and `refactor` skills | Asked |
30
32
| Expected values written by hand; each new test seen failing once |`CLAUDE.md`| Asked |
31
33
| Instructions name only files and `pnpm` commands that exist, and each skill says when to use it |`scripts/docs.test.mjs`, in `pnpm verify`| Checked |
34
+
| The file format code uses only the Markdown parser |`scripts/rules.test.mjs`, in `pnpm verify`| Checked |
35
+
| Reviewers see the task and the diff, never the author's reasoning | The `review-changes` skill | Asked |
36
+
| Tests not weakened, the editor's design, saved files, the app boundary, privacy, and plain words | The six checks in `.agents/checks/`| Reviewed, when a review runs |
32
37
| Never weaken a check to pass it |`CLAUDE.md`| Asked |
33
38
| Say what was not verified |`CLAUDE.md`| Asked |
34
39
@@ -92,7 +97,8 @@ them without being asked.
92
97
|`fix-bug`| Anything broken | A test that fails on the exact symptom | Undo the fix: the test fails. Restore it: it passes. |
93
98
|`build-feature`| Anything new | Read the closest feature; settle your decisions in one round | One test per behavior, written first |
94
99
|`refactor`| Structure only | Tests that pin today's behavior | The same tests pass, with their expected values untouched |
95
-
|`learn`| A correction, or a mistake that repeats | Pick the strongest structure: type, test, script check, then a line of text | The check fails when the mistake is made on purpose |
100
+
|`learn`| A correction, or a mistake that repeats | Pick the strongest structure: type, test, script check, review check, then a line of text | The check fails when the mistake is made on purpose |
101
+
|`review-changes`| A change you call ready | Write a brief with your words, never the author's opinion | Each finding fixed, dismissed with evidence, or left open for you |
96
102
97
103
## Asking for work
98
104
@@ -101,6 +107,8 @@ them without being asked.
101
107
| A bug fix | What you did, what happened, what should happen | Confirm Claude's restatement if the report was vague |
102
108
| A feature | What it should do, and how you'd check it works | Answer the decisions Claude lists, all at once |
103
109
| A refactor | What should get easier, and that behavior must not change | Read the list of tests whose expected values stayed the same |
110
+
| A review | "Review this", or "it's ready for a PR" | Decide on the findings left open |
111
+
| A release | "Ready to release: review it, then build and install the app" | Read the open findings first. After the install, open the app and try the change. |
104
112
105
113
Any request works better with:
106
114
@@ -115,6 +123,46 @@ them. Start a new session for unrelated work, so it starts with a clean context.
115
123
116
124
Then read the report's "Not verified" part. Try in the app what Claude couldn't.
117
125
126
+
## Review
127
+
128
+
Run a review when a change is ready for a pull request or a release, or whenever you ask. It
129
+
costs several agent runs, so it doesn't run on its own. During work, `pnpm verify` is the check.
130
+
131
+
The `review-changes` skill briefs fresh subagents with the task in your words, what done means,
132
+
and the decisions made. They never see the author's opinion of the change.
133
+
134
+
-**A task review**, always: missing pieces, changes nobody asked for, and tests that would pass
135
+
with the feature broken.
136
+
-**A blast-radius review**, when the change touches code or config others rely on: the file
137
+
format, the layers, the Rust commands, the app and permission config, or `scripts/`. It names
138
+
the one fact that makes the change safe, and proves it by running code.
139
+
-**A code review** for each check that fits the change:
140
+
141
+
| Check | Covers |
142
+
| --- | --- |
143
+
|`.agents/checks/tests.md`| Tests not weakened, new behavior tested |
144
+
|`.agents/checks/editor.md`| How the editor is built: layers, commands, plain Markdown in the document |
145
+
|`.agents/checks/file-format.md`| Saved files keep the user's writing, and old files still open |
146
+
|`.agents/checks/app-boundary.md`| What the web view may ask the Mac to do: files, links, the keychain, `claude`|
147
+
|`.agents/checks/privacy.md`| No keys, real personal writing, or machine paths in a public repository |
148
+
|`.agents/checks/words.md`| Plain UI text and docs, and instructions that agree with each other and the code |
149
+
150
+
There are no translations to check: the UI is English only.
151
+
152
+
Reviewers work in their own git worktree, with the change copied in, never in the shared tree. Each finding is settled with
153
+
evidence: the cited line for what the diff shows, a test or command for behavior. A finding is
154
+
fixed, dismissed with that evidence, or left open for you.
155
+
156
+
## Improving the system
157
+
158
+
- When a mistake repeats, say so. The `learn` skill turns it into the strongest check that holds
159
+
it, and updates the rules table above.
160
+
- When a review keeps finding the same kind of problem, turn it into a test if code can catch it.
161
+
If it needs judgment, add it to a check in `.agents/checks/`, with what to report and what is
162
+
fine.
163
+
- Prefer code to words: a test or a step in `pnpm verify` holds whether or not an agent
164
+
remembers.
165
+
118
166
## `pnpm verify`
119
167
120
168
It runs, in order, and prints one line per check:
@@ -140,8 +188,8 @@ It runs, in order, and prints one line per check:
140
188
checks anyway, for example after `rustup update`.
141
189
-**Only docs changed** since the last pass: nothing to check. It records the new tree. Docs are
142
190
`docs/`, `LICENSE`, and Markdown outside `src/` and `src-tauri/`, but not the instructions:
143
-
`CLAUDE.md`, `README.md`, `docs/agents.md`, and everything in `.claude/`. The docs test reads
144
-
those, so a change to them runs every check.
191
+
`CLAUDE.md`, `README.md`, `docs/agents.md`, and everything in `.claude/` and `.agents/`. The docs
192
+
test reads those, so a change to them runs every check.
145
193
-**Only CI files changed** (`.github/`): local checks can't see them. It records nothing, even
146
194
with `--force`. Push and read the CI run.
147
195
- It finds `cargo` on `PATH`, in `~/.cargo/bin`, or in Homebrew's rustup folder. Without cargo it
0 commit comments