From 1efa691b044da82b6fb5bb0154ddf7ed0e970f1a Mon Sep 17 00:00:00 2001 From: naps62 Date: Mon, 3 Aug 2026 10:12:00 +0000 Subject: [PATCH] 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 --- entry/CLAUDE.md | 16 +++++++++++++++- entry/codex-AGENTS.md | 7 ++++++- skills/crit/SKILL.md | 9 ++++++++- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/entry/CLAUDE.md b/entry/CLAUDE.md index 1dbac77..eea3467 100644 --- a/entry/CLAUDE.md +++ b/entry/CLAUDE.md @@ -18,7 +18,21 @@ @~/.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 `, background). + Follow the injected instructions; there is nothing to set up. +- Fallback if no instructions were injected: URL is + `http://:7373/review?dir=&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. - **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//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 `**, then re-arm the watcher. Keep doing this until the user says they're done. diff --git a/entry/codex-AGENTS.md b/entry/codex-AGENTS.md index 96f9201..77ad1a8 100644 --- a/entry/codex-AGENTS.md +++ b/entry/codex-AGENTS.md @@ -20,7 +20,12 @@ @/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=&base=`. Do not start crit for code diffs. +- Poll `GET http://localhost:7373/api/comments?dir=&since=&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. - 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 `, then re-arm until the user finishes. diff --git a/skills/crit/SKILL.md b/skills/crit/SKILL.md index c181f2d..5d4bf41 100644 --- a/skills/crit/SKILL.md +++ b/skills/crit/SKILL.md @@ -7,7 +7,14 @@ argument-hint: "[file|url]" # 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://:7373/review?dir=&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`