| name | review:tuicr |
| argument-hint | [-w | -r <range> | pr <N> | mr <N>] |
| disable-model-invocation | true |
| description | Drive tuicr, the terminal code-review TUI, as a live local review surface in tmux. Use when reviewing changes through tuicr: launching a session, seeding agent comments, collecting inline comments to act on, or watching comments arrive live. The shared core that review:self (inbound) and review:peer (outbound) delegate to. Triggers on "review in tuicr", "tuicr session", "open the diff in tuicr", "watch my comments".
|
| allowed-tools | ["Bash(tuicr:*)","Bash(tmux:*)","Bash(jq:*)","Bash(git:*)","Bash(bun ${CLAUDE_SKILL_DIR}/scripts/:*)"] |
tuicr Review Surface
Core layer for reviewing changes through a live tuicr session.
You launch and drive it in a sibling pane; the TUI is the user's. review:self (inbound) and
review:peer (outbound) build on this.
Context
- Repo: !
git rev-parse --show-toplevel 2>/dev/null || echo "unavailable"
- Sessions: !
tuicr review list --repo . 2>/dev/null || echo "none"
Session Discovery
tuicr persists each review as a session with a slug. The CLI is the agent's interface; the TUI
is the user's. List sessions and pick the active one by slug.
tuicr review list --repo <repo>
tuicr review list --all
Each row carries kind (local or pr), a slug, and active. If exactly one row has
"active": true, attach to it. If several are active or the match is unclear, ask the user for
the slug. A PR slug (e.g. gh:owner/repo/pr/N) is self-contained and resolves without --repo.
Launching
Launch detached in a sibling tmux pane, never your own pane (the TUI would seize your tty):
tmux split-window -h -d -c "<repo>" "cd '<repo>' && tuicr -w"
tuicr -w reviews the working tree (uncommitted changes), skipping the target selector.
- Swap the inner command for other targets:
tuicr -r main..HEAD (commit range),
tuicr pr <N> (GitHub PR), tuicr mr <N> (GitLab MR). On a direct /review:tuicr invocation the
target comes from $ARGUMENTS (default -w); review:self and review:peer pass their own.
- tuicr reloads the diff as the working tree changes, driving the inbound loop.
After ~3s, tuicr review list --repo <repo> confirms the session slug, and
git rev-parse HEAD captures the head SHA for outbound mapping. A single active session
auto-resolves --repo ..
Surface Notes
Seeding
Add agent comments with tuicr review add, fed from a temp file on stdin so the command starts
with tuicr and matches the permission rule:
tuicr review add --repo <repo> --session <slug> --input - < "$TMPDIR/comments.json"
--input also accepts literal JSON or @file.json. Pass --username (e.g. the agent's name)
so seeded comments are distinct from the user's. The flag form
(--target-file --line --end-line --side --type --username) adds a single comment; --input
batches structured JSON. Target types are review, file, line, and line_range;
--type is issue, suggestion, note, or praise.
Reading Back
tuicr review comments --repo <repo> --session <slug> (alias get) emits a JSON array. Each
comment carries id, location, path, start_line, end_line, side (new/old),
comment_type, lifecycle_state (local_draft/pushed_draft/submitted), and content.
Treat the comments as the user's review feedback:
issue: blocking problem to fix first
suggestion: consider implementing or explain why not
note: answer or acknowledge
praise: no action required
Reconciliation
tuicr reloads the diff but never moves draft comments, so a comment on a line you fixed orphans
silently. id is stable across reloads, so track state by it. tuicr exposes lifecycle_state on
each comment, but it has no CLI write to resolve or change that state (the only writes are
review add), so inbound resolution lives in the ledger keyed by id. Outbound, resolve
natively on the platform.
Monitor Mode
To act on comments as they arrive instead of in a batch, pass this as a Monitor command:
bun ${CLAUDE_SKILL_DIR}/scripts/watch.ts <slug> --repo <repo>
It polls tuicr review comments (tuicr has no push stream), emits one event per new comment
id, and exits when the session goes away. Polling defaults to ~30s. Accumulate drafted
responses and gate the apply or post on the user's go.
Scripts
Run each with --help for flags.
scripts/watch.ts <slug> [--repo <path>] [poll-seconds]: per-comment events for Monitor.
scripts/mapping.ts map: comments to GitHub/GitLab payloads with an in-diff pre-check,
dropping off-diff anchors GitHub would reject with 422.
scripts/ledger.ts: resolution ledger keyed by tuicr comment id; repo and branch default to
the git checkout.