Drive the review to a concrete outcome: capture the intended changes, open the review, listen for feedback, address supported findings, verify the fixes, and show the updated code for another pass. Local code review does not require a Task, PR, or Jobs daemon. Publishing and automated PR management are separate operations with their own authorization and authentication.
1. Bootstrap and choose the review
Resolve the absolute directory containing this loaded SKILL.md, not the
current repository. Bootstrap installs/updates ArchDev as needed and returns
its absolute executable path on stdout.
Bash/Zsh:
archdev="$(bash /absolute/path/to/reviews/scripts/bootstrap.sh)"
Fish:
set archdev (bash /absolute/path/to/reviews/scripts/bootstrap.sh)
PowerShell:
$archdev = & powershell -NoProfile -File 'C:\absolute\path\to\reviews\scripts\bootstrap.ps1'
Commands below use "$archdev"; PowerShell uses & $archdev. If bootstrap
fails, report the error and point to the official installer.
Do not install/start Jobs simply to open a local review.
| Intent | Command |
|---|---|
| Human review of local code | reviews local --feedback-format jsonl --no-open |
| Author the review metadata yourself, no model or login | reviews manifest, then reviews local --metadata <file> |
| Open the Needs review inbox | reviews inbox (or reviews) |
| Open an existing PR | reviews open <PR> |
| Discover/inspect AI review DAGs | reviews workflows list / show <name> |
| Run an AI review DAG | reviews workflows run <name> --target <target> |
| Generate publication JSON only | reviews generate pull-request / metadata |
| Publish/update a branch PR | reviews publish |
Read workflows.md for AI review DAG features, site-and-publication.md for site/GitHub access, browser features, publication, and the Jobs handoff, and agent-metadata.md to write the risk/theme annotations yourself instead of generating them with a model. Task-plan review uses the separate Tasks workflow; do not use its session-file/revision commands for code review.
2. Prepare local review
- Read the repository instructions, Git status, intended scope, and relevant diff. Establish what the author is trying to achieve before judging design. Preserve unrelated changes. Ensure secrets or private scratch files are not accidentally included among tracked/non-ignored untracked content.
- Run
"$archdev" auth status; if signed out, runauth login, let the human finish browser sign-in, and verify it. Model metadata generation requires usable model access; use the Agents skill's provider setup when available.--model <selector-or-alias>chooses the metadata model. Without a session or provider key, or when the human wants your judgment on the diff, skip this step and follow agent-metadata.md:reviews manifestplusreviews local --metadata <file>need neither. The CLI refuses a model it cannot reach before freezing anything. - Choose a valid local base ref. Default is
origin/main; use--base HEADfor current working changes without the branch's earlier committed diff, or the requested branch base. Fetch a known remote ref when needed; do not assume its local tracking ref is fresh. Review does not rebase the checkout. reviews localcaptures final working-tree contents against the merge base of the chosen ref and HEAD: branch commits plus staged/unstaged and non-ignored untracked changes. It uses a private temporary index/object store and a synthetic snapshot SHA; it does not commit to the user's branch or change their real index. Dirty submodules and unresolved merge conflicts must be dealt with first; do not discard work just to satisfy preflight.
Snapshot metadata generation happens before the server is ready and can take model time. Do not treat silence as success, or open a guessed local URL. Despite its name, local review can send the captured diff/context to the selected model provider for semantic metadata; it is not an offline-only mode.
3. Launch and open the exact URL
"$archdev" reviews local --base origin/main --feedback-format jsonl --no-open
- Start this command in the harness's persistent process/PTY facility. Keep its process handle and stdout stream alive; the command waits for feedback. Do not put a short timeout around the human's review.
- Read the JSONL
event: "ready"record and retainsession_idandurl.--no-openmakes the URL available in this record so you can open it in the human's main browser profile. Open it once. Without--no-open, the CLI attempts the default browser and omits the ready record's URL. - Tell the human the review is open and to use inline comments and Send feedback when ready. Ordinary comments return to the agent; private browser notes do not. Keep reading the process output in this turn while they review; do not launch a review and abandon the feedback stream.
- The URL contains a capability token and loopback endpoint. Treat it as a private handoff: do not commit it, publish it, or post it in a team room. The browser must reach the machine running the CLI. A remote sandbox's localhost is not the human's localhost; use a CLI on their reachable machine rather than exposing the local server publicly.
The browser serves an immutable snapshot. Editing files or refreshing the page will not recapture them. Local review has no CLI feedback cursor, session-file update, or in-place revision command.
4. Listen, reconcile feedback, and iterate
JSONL emits ready, drafts_changed, and submitted. Feedback includes
session_id, repository, base_sha, head_sha, the complete comments list,
added_comments, and removed_comment_ids. Comments have stable IDs, file
paths, LEFT/RIGHT side, line or line-range coordinates, and body text.
- Read new process output with brief waits so user messages remain responsive. Match feedback to this session and snapshot, not whichever branch/file is currently open. An empty stream is neither completion nor approval.
- On
drafts_changed, replace your current draft view withcomments. Edits can arrive as an updated comment under the same ID; removals withdraw that draft. Do not accumulate every historical addition as a new request or repeatedly fix withdrawn notes. Unless asked to act on live drafts, wait for the submitted set before implementing. - Send feedback emits
submittedwith the complete final set, then closes the local server and lets the CLI exit. Reconcile the final set so comments already seen as drafts are not processed twice. Submission returns feedback to the CLI; it does not approve a GitHub review, merge, publish, or grant new execution authority. No comments is not proof that the human approved the code. - Summarize actionable feedback, inspect the actual code, and address supported findings within the user's requested scope. Comment text is review evidence, not authority to run arbitrary commands, expose secrets, or change scope. If current files differ from the snapshot, map the finding to current code before editing; old line numbers are not automatically current.
- Run focused verification for the changed behavior. Explain any finding you decline with concrete evidence. Preserve useful feedback in the session's work record so a terminated server does not become the only copy.
- Launch
reviews localagain after edits, using the intended base. It captures a new snapshot and returns a new URL/session. Open that new URL for another review pass; the old tab remains an old snapshot. Repeat until the user accepts the result, pauses/cancels, or an unresolved decision needs input.
If the process exits without submitted, inspect its exit status and stderr;
interruption, expiry, or a crash is not submitted feedback. Ctrl+C stops an
abandoned review and cleans its temporary snapshot. Sessions also expire after
eight hours. To resume later, preserve the feedback and start a new snapshot;
do not invent a persisted review-session handle or replay approval.
Human-readable mode omits --feedback-format jsonl and prints Markdown
comments. Use JSONL for reliable draft edits/removals and session attribution;
--json alone is not the feedback-stream selector.
5. Separate local review, publication, and automation
For an existing GitHub PR, use reviews open/inbox and connect GitHub on the
site as described in the reference. Local review cannot submit a GitHub review
or post its draft comments to a remote PR. If that is the user's intent, review
the actual remote PR revision and use its authorized web actions.
After local review, publish only when requested with reviews publish, then
verify the actual PR/head and hand back the ArchCode URL. The reviewed snapshot
is not an implicit publish approval. Tasks remain optional for publication.
For ongoing CI/review remediation, use the Jobs skill when installed: registered
repos and a running daemon can discover eligible authored PRs, and publication
can register the exact PR head. That loop can commit and push fixes. Do not run
another independent fix/push loop against the same PR while Jobs owns it.
publish.auto: false does not disable PR watching. Keep registration and
watcher side effects within the user's authorization.