docs: route code reviews to rev, scope crit to plans/live/HTML

Rev hooks are installed globally; entry files describe the injected flow
plus a manual fallback (codex has no hooks). Crit skill redirects code
diffs to rev.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
naps62
2026-08-03 10:12:00 +00:00
parent cb525048a4
commit 1efa691b04
3 changed files with 29 additions and 3 deletions
+15 -1
View File
@@ -18,7 +18,21 @@
@~/.claude/operating.md @~/.claude/operating.md
## Crit reviews ## Rev code reviews
- Code-change reviews use the always-on rev server on `:7373`. A review is
just a URL — never start crit or any per-review server for code diffs.
- Global hooks do the plumbing: SessionStart injects the review URL and full
instructions in any rev-known repo, and a Stop hook prompts to (re)arm the
comment watcher (`~/tea/yolo/rev/scripts/rev-watch.sh <dir>`, background).
Follow the injected instructions; there is nothing to set up.
- Fallback if no instructions were injected: URL is
`http://<host>:7373/review?dir=<url-encoded worktree>&base=<base>`;
long-poll `GET /api/comments?dir=&since=&wait=1`, reply in-thread via
`POST /api/comments` with author `"agent"` + `parentId`, never mark
threads resolved.
## Crit reviews (plans, live pages, HTML files — code diffs go to rev)
- **`crit live` / `crit preview` write comments to a local review FILE, not an API** — there is NO notification and `crit fetch` does NOT apply (it needs a prior `crit share`). `/api/comments` on the daemon is the WRONG place (stays `[]`). If I launched the crit server myself, I must poll the review file myself. - **`crit live` / `crit preview` write comments to a local review FILE, not an API** — there is NO notification and `crit fetch` does NOT apply (it needs a prior `crit share`). `/api/comments` on the daemon is the WRONG place (stays `[]`). If I launched the crit server myself, I must poll the review file myself.
- **Whenever I start a `crit live`/`crit preview` review for the user, immediately arm the watcher so they don't have to babysit it:** - **Whenever I start a `crit live`/`crit preview` review for the user, immediately arm the watcher so they don't have to babysit it:**
`~/.claude/scripts/crit-watch.sh` — run it via the Bash tool with `run_in_background: true`. It auto-finds the active live/preview review file (`~/.crit/reviews/<id>/review.json`), baselines existing comment IDs, and re-invokes me with any NEW comments once they settle. When it fires: read the comments, address them, **reply to each via `crit comment --reply-to <id> <body>`**, then re-arm the watcher. Keep doing this until the user says they're done. `~/.claude/scripts/crit-watch.sh` — run it via the Bash tool with `run_in_background: true`. It auto-finds the active live/preview review file (`~/.crit/reviews/<id>/review.json`), baselines existing comment IDs, and re-invokes me with any NEW comments once they settle. When it fires: read the comments, address them, **reply to each via `crit comment --reply-to <id> <body>`**, then re-arm the watcher. Keep doing this until the user says they're done.
+6 -1
View File
@@ -20,7 +20,12 @@
@/home/naps62/tea/yolo/agent-skills/claude-md/code-comments.md @/home/naps62/tea/yolo/agent-skills/claude-md/code-comments.md
## Crit ## Rev code reviews
- For code-change reviews, hand the user a URL on the always-on rev server: `http://localhost:7373/review?dir=<url-encoded abs worktree path>&base=<base>`. Do not start crit for code diffs.
- Poll `GET http://localhost:7373/api/comments?dir=<dir>&since=<cursor>&wait=1` (seed the cursor from an initial call); reply in-thread via `POST /api/comments` with author `"agent"` and `parentId` = root comment id. Never mark threads resolved.
## Crit (plans, live pages, HTML files — code diffs go to rev)
- `crit live` and `crit preview` write to a local review file; poll that file, not an API. `crit fetch` needs a prior `crit share` and does not apply here. - `crit live` and `crit preview` write to a local review file; poll that file, not an API. `crit fetch` needs a prior `crit share` and does not apply here.
- When starting a live review, run `~/.claude/scripts/crit-watch.sh` in the background. Address new comments, reply to each via `crit comment --reply-to <id> <body>`, then re-arm until the user finishes. - When starting a live review, run `~/.claude/scripts/crit-watch.sh` in the background. Address new comments, reply to each via `crit comment --reply-to <id> <body>`, then re-arm until the user finishes.
+8 -1
View File
@@ -7,7 +7,14 @@ argument-hint: "[file|url]"
# Review with Crit # Review with Crit
Review and revise code changes, plans, live pages (running dev servers, staging URLs), or local HTML files using `crit` for inline comment review. Review and revise plans, live pages (running dev servers, staging URLs), or local HTML files using `crit` for inline comment review.
> **Code changes go to rev, not crit.** The always-on rev server reviews any
> worktree at `http://<host>:7373/review?dir=<url-encoded dir>&base=<base>`,
> and global hooks inject the full flow automatically. If this skill was
> invoked for a code diff / branch review, hand out the rev URL instead and
> follow the hook-injected instructions. Use crit only for the modes rev
> doesn't cover: plan files, live pages, local HTML.
## Step 1: Pass arguments to `crit` ## Step 1: Pass arguments to `crit`