Skip to content

Inside Step 4 review rounds

Ilia edited this page Nov 30, 2026 · 12 revisions

A regression's fix reaches the pull request before the review. A fixing session commits and is not told to push, and the review reads only what the pull request carries: its threads hang on the pull request's lines. So run_step pushes such commits (regression_push_fix) before the local review of step 4's next session, as the step's close already did; four of them once left the review saying it had not run, for a person to push.

Who reviews is the project's choice (review in .sclaude/config.json, project_review_setting; where a feature's review runs now is project_review_mode): the review workflow on GitHub (github), the same with this machine as the backup when it cannot run (github-local), a review on this machine (local: read-only claude -p passes, local_review.sh, before each of step 4's sessions, posting their findings on the pull request), or none (off). When the review left nothing — no finding, no comment, every check green — step 4 opens no session at all and closes at once, saying which of the three it was.

A local pass's answer is taken only whole. It is text — findings as ### <path>:<line> — <title> sections, a RESOLVED: <id> — <how> line for each open thread the code no longer has and an OPEN: <id> — <what is still missing> line for one fixed only in part — posted on that thread as a Still open: reply, and handed to the next pass beside the thread with the word to leave OPEN out while it still holds — then FINDINGS: <n> and the line REVIEW: complete (DONE), written once the code-review skill and every agent it started have finished; not --json-schema structured output, which the forked skill takes for itself, its findings never reaching the session. record refuses an answer with no count, a count its headings do not add up to, no end line, or none of its findings taken by GitHub, each reason starting refused: (REFUSED). A refused pass — the first or a later one, which runs because the one before found the cap — leaves the review not done: its reason goes to the terminal, the feature's topic and the journal's spent row (refused), which the review's report counts ("Answers refused", by the reason's words, which carry no number), and the log, which keeps every pass's stderr; every refused answer is kept in local-review-refused.md. One rule for every refusal: the pass runs once more at once, on the same head — a refused answer is most often an interim one. Refused again, or its second try unable to start, the head is not taken as reviewed: the capped pass before it keeps its more, so a run on this head reads that range again (since, first; a session that pushes first moves the head, and the rest of that range is not read again), and the gate asks the person, or under [g] tries again by itself.

A pass over the commits since the last review reads every file they changed. It picks what it opens, and a fix's change to a file it passed over would be read by no pass after it: the blocks after this one read their own files. Once it answers, local_review.py unread lists the files the branch's own commits changed in its range, still there at the head, that none of its passes' conversations opened — read from their transcripts, as the review map tells a file read (seen_files). When there are any, the run is marked more (owed), as a capped one is, and one short pass reads those files' changes alone, once per head; a run that never gets to it reads the range again. A pass whose transcript is not on this machine claims nothing.

A review that cannot run on GitHub stops, or moves here. When the gate reads a red Claude review job, pr_context.py --fallback (review_fallback) asks why: Claude's limit (a 429 with the reset it names, claude's own words for a spent limit) or an API key's credit in the job's log, or a job GitHub never started for the account's spending limit, said only in the check run's annotations, or a runner that could not reach the network while the job set itself up (RUNNER: apt stopping, E:, on packages it could not fetch). Under review: github the gate stops step 4 there (review_github_stopped in review_round.sh) and says why; no session is opened, since none can fix it. Under github-local the feature moves to the local review (review_fallback_switch): the mark .sclaude/local/feature/review-fallback (<why>\t<when>\t<seen|inherited>) makes github-local read as local for that tree on both sides (project_review_mode, review_mode), the pull request is labelled no-review, and the pass runs at once. Moved for the minutes, every Actions check leaves the verdict, as under local — and so for a runner without network, whose CI ran in the same outage; moved for Claude's limit alone, only what that subscription runs on Actions does — the review workflow's jobs, @claude's, the findings check (without_review) — since the CI still runs. A limit whose named reset has passed neither stops nor moves anything: the gate runs the job again on GitHub two minutes past the reset and waits for it (review_reset_rerun); only a rerun GitHub refuses goes on to the stop or the move. The feature stays local to its end — switched back, its review would read the pull request from the start again. The main checkout's .sclaude/local/review-fallback (<until>\t<why>) keeps the machine local for new github-local features too (review_fallback_inherit, at step 3's prompt and step 4's start): until Claude's limit resets, or five hours, its window, when the log did not say, none when the reset has passed; a day for the minutes, after which the next feature tries GitHub again — a job GitHub does not start costs nothing. A longer window is never shortened by a later one. The report keeps GitHub's rounds before the move and adds the passes here after them.

Step 4 opens on its own gate. The gate every session of step 4 ends on, review_close_gate, also opens the step (entry): the local review's pass, the wait for the review in Actions, the move to the local review when the one in Actions could not run, the report and the history's ways are one code for both. Only the question differs, and on purpose: on the way in it is pr_context.py --state (review_state), which counts a person's comment anywhere and opens a session on a pull request it cannot read, since a wrong "clean" there skips the only look at what people wrote; on the way out it is --close (close_state), which reads threads and checks only, and lets the step close on what it cannot read, so that a network fault does not hold it shut — answering unknown for it and gone: merged|closed for a pull request no longer open, so that the step closes saying why rather than as a clean review (on unknown a polish round still owed goes first). On the way in the gate asks nothing and opens no session itself: a session is run_step's to open, and the questions after a session ([g]'s ceiling, "Close step 4 anyway?") have no session before them yet. A step with a session of its own already, or a review sent back (review_skippable), is not closed there and the pull request is not asked at all — nothing waited for, no move after a review that could not run — only the local pass runs for its count, or, once the person ended the search, the open threads are counted. On the way in the local pass comes before any wait, and threads it left open once the person ended the search are open whatever --state says, since that word does not count the review's own threads; run_step reads that the search ended and counts them once, for the way in and for the gate (REVIEW_KNOWN_COUNT), and a count it could not read opens the session. The ways written follow where the feature stands by its history (review_entry_place). Before step 4 (the pull request just opened, the feature standing in the Review block step 3's check led to), they start there. Left in the gate by an earlier entry, they go on from the gate's place. At the session already (resumed, a fresh session for the next round, sent back to it by the gate), or past step 4 (a hand-back, a rollback, a return from a held production), none are written (quiet). On the map this is one block, "Anything left open?", which Review leads to (with review off, "PR ready?" itself).

The local review's keys are boxes the person can see. While a pass runs (local_review_wait), s ends the search for new findings (steps.review.enough) and g lets the review go on by itself (steps.review.go_on, review_go_on); s is pressed again to take it back, g goes round auto → on → off (below), and the status line draws both as boxes until they apply — a word given twenty minutes into a pass is otherwise forgotten by the time the pass ends. With g ticked review_close_gate asks nothing: a pass that did not run runs again (REVIEW_GO_ON_RETRIES, ten in a row, then the question: one that keeps failing has a reason the person must see), the 1-3 choice after the search ended is "check the fixes", and what is open goes back to a review session — REVIEW_GO_ON_ROUNDS (30) times a step 4 (steps.review.go_on_rounds, review_go_on_round, counted afresh each step 4 and on a press of g), then it is off for that step 4 and the person is asked "Back to a review session for it?", a session sclaude closed included: rounds that never converge would otherwise go on paying all night. Before each retry of a failed pass it waits REVIEW_GO_ON_PAUSE (60s) times the retry's number, so a failure that lasts — a usage limit, the network — does not spend the retries in a minute; the wait shows the box, and g takes it off and asks at once. The friction review after each session of step 4 — a review session's, a sync's with main, a regression fix's — would stop them all the same — a plan-mode session waiting for its plan's approval — so under g it is held (friction_hold, steps.review.friction_held): the log stays, each later session's refusals added to it, and step 4 goes on to its next steps. A friction review asked for by a command typed at a terminal — sclaude friction, sclaude sync — is never held: the person is there — and so is one from the phone's menu, which opens it in a tab on the laptop and answers its session over Remote Control. Started with no terminal (a timer, the bot off WSL), it may be, and a review it cannot hold — a re-read, one cut off and resumed — waits for the terminal. The first friction review after the box comes off reads all of it — the next session's — and at the latest friction_before_retro, which sclaude done runs before the retrospective, whatever g was: every review still owed, one held, one cut off and never finished, or a log no review read (keyed unread-N). The retrospective reads the logs and the clean-up removes them, so this is their last reader; with nobody at the terminal the retrospective and the clean-up wait for it, the topic told (friction_owed puts the feature there on the map). It runs one review at a time until nothing is owed — a review resumed reads only its own batch, so the log can still be owed after it — in the fresh run after a retrospective (done_fresh) too, whose log is the retrospective's own and would go with the tree; the map draws that pass as the F on "Code changed by the retro?", the question it comes before. It holds nothing it runs, whatever g says (FRICTION_NO_HOLD), and leaves the box alone. Any friction review that reads the log reads what was held, and clears the held key. Not approved for the person: that plan is their yes to loosening a rule.

Without g, a pass that did not run asks whether to go on unreviewed, and a "no" runs the review again instead of leaving: the person was there and wants the review, and leaving made them type sclaude to get it. The question's context is only why (local-review-why, written by local_review from its subshell; ask_forget drops the lines before it). A pass whose answer is Claude's usage limit is neither refused nor retried at once: record writes limit: <reset> (LIMIT, read with quota_reset), the journal gets a spent row without a refused reason, the reset goes to local-review-limit, and the gate, instead of the question and g's counted retries, waits (review_limit_wait) until LIMIT_MARGIN past the reset, or LIMIT_RETRY from now when it is unknown or already past, telling the terminal and the topic, then runs the pass again. s is cleared when step 4 closes or the cycle is sent back; g is not. It has three states in steps.review.go_on: true and false, the person's own, which outlast step 4 closing and a hand-back — to them it is all one review, the sessions only rotate to save context — and null, where the project's sleep_mode decides (project_sleep_mode): on always, off never, auto while an /isleep night over every session is on (night.py active) — not an /isleep here one. g goes round the three — auto → on → off → auto (review_go_on_toggle) — by the state kept, not by what the night makes of auto, so a press means the same however the box was drawn; the box shows ☑, ☐, or for auto auto ☐, auto ☑ (night), auto ☑ (sleep_mode). The 30-round ceiling turns it off for that step 4 only (steps.review.go_on_ceiling, drawn ☐ (30 rounds)), cleared with the rounds' count when step 4 closes or the cycle is sent back, or by a press of g. A press at the ceiling always turns [g] on — the box was drawn off, so on is what the press asks for — and that on is the person's from then on. g during the retry wait is a press like any other and writes false.

While a review session works in its own tab (the tab wait in claude_launch_once), the terminal sclaude waits in takes the same boxes: the launch hands it PANE_KEYS in its own subshell (pane_keys_for), so no friction review after it inherits them, and review_pane_keys draws [s] and [g] and takes their keys once a second, reading the state when a key is pressed and every ten seconds. [s] said there ends the search as in a pass: after the session sclaude asks whether to check its fixes, or checks them with [g] ticked.

A session closed, reopened or kept on the person's word. Every session sclaude starts in a tab gives sclaude's own tab keys of its own (session_keys in pane.sh, called by the same tab wait before the caller's PANE_KEYS, which get any key it does not take). They change nothing in what follows a session: forward is the session's own end, again is the person's /exit. The letter says which, the case says when. The word is a file named by the session, $TMPDIR/sclaude-ctl-<session> (session_ctl_file), because the ones that act on it are other processes, or come after a code reload:

  • n writes next. The watcher (session_watch_start) writes the done marker itself, drops a review round's marker, and ends the process. For the retrospective it writes none, since its marker means "nothing to act on". In session_ended the session counts as one sclaude closed, and session_take_as_done gives the answers that end steps 1 and 2 in the session. For step 2 it marks the gate, the yes that after_step reads. For step 1 it marks the gate, so capture_plan takes the ExitPlanMode call left unanswered when the session was closed. A call the hook refused has its answer, so it is never taken. An answer written after the press (steps.plan.taken_at, the time of the watcher's marker, to the fraction of a second) does not count, because Claude Code may record the call as interrupted as it goes. The point is the turn this saves: an approval given in the dialog is read with the whole conversation behind it.
  • N writes next-later. It is closed and ended exactly as n, and session_watch_stop also leaves $TMPDIR/sclaude-stop-<pid>-<start> (stop_file). The pid and start time are sclaude's own, which its subshells share and a code reload's exec keeps; a mark left by a run that never reached a stop is not taken by a later sclaude given the same pid. It is a file rather than an exported variable, because the sessions launched before the stop copy the environment, and a sclaude run inside one of them would stop too. stop_asked stops the run at the entry of the next run_step or of remind_prod. An auto_return reaches run_step too, and stops there, so its caller says what to do by hand.
  • r writes restart: the step goes again at once, as R and the next sclaude <feature> would make it go later. The watcher treats the reopened conversation as a resumed session's watcher does: it takes off any marker, and counts nothing written before the reopening, an approval included. It then writes restarting and ends the claude process. Left to claude_launch alone, the watcher would still hold the old "its work is done" and close the reopened conversation within a poll. As after any resume, a session that does not write its marker again ends as one a person left. Without a watcher, the key writes restarting and ends the process itself. claude_launch then opens the same conversation again with --resume and no prompt, in the same loop that brings a session back after a usage limit. A restart word left over from an earlier launch is dropped as a launch begins.
  • R writes later and ends the process as /exit would. For a step's session, session_ended drops any marker, runs what follows an /exit up to and including the friction review, and returns before after_step. The next start resumes the recorded session. For any other kind, session_watch_stop exits sclaude at once, as a closed terminal would. Each of those kinds is opened again where it was by the next run, which finds its record unfinished.
  • k is a state rather than a word about the end, so it has a file of its own, $TMPDIR/sclaude-keep-<session> (session_keep_file), and r leaves it standing. The watcher closes nothing while it stands. Its marker stays, so an /exit then reads as a session that finished — unless r reopened it meanwhile, which takes the marker off as any resume does.

Every key is pressed twice within five seconds, and n and N are two different keys. The first press is said in yellow on the status line (session_keys_tail), not as a line of its own, and another key takes it off; so is k's box, which turns green when ticked. n, N, R and k need a live watcher. session_watch_start marks one with $TMPDIR/sclaude-watch-<session> (session_watched_file), which holds its kind and its pid. The watcher takes the mark off when it closes the session itself, and a mark whose pid is gone offers nothing: a launch after the close (the workshop's reopening) or after a sclaude that was killed is not offered keys that nothing would carry out. session_watch_stop tells a step's session from the rest by the kind it was given.

A session's context is bounded per round, not per session. On one pull request five rounds of fixes ran in one conversation, and every file each fix read stayed in its context. The session now fixes through subagents and keeps only the coordination. It fixes in place a finding of a line or two, and a round whose findings all sit in a few dozen lines it has already read: a subagent would read them again, and the context limit below bounds the conversation anyway — sessions that fixed such a round themselves reported it as a deviation every time. Step 4's sessions are named 4-fix-review (session_label), in the shape of the regression's fixing sessions (4-fix-preview): they fix what the review found, and the step itself is review, the phase of checks they work inside. The session never waits for the review, wherever it runs: it pushes, waits for the other checks with sclaude checks (which leaves the review's own checks out, without_review), and ends on its done marker. A watcher started beside every review session sees the marker and ends the claude process (found by --session-id/--resume and its id). Claude Code may carry a running conversation on under a new id, in a new transcript that holds all of it, and end the old one on a continued-in entry; the process keeps the id it was launched with. Everything that reads a session's transcript follows that chain to its last file (chain in session_end.py, session_transcript in state.sh), the watcher on every growth of it, a --resume opens the last id, and the workshop's write guard takes the launched id from SCLAUDE_SESSION as well as the one Claude Code reports. Step 4's gate then waits for the review of the last push in Actions, or runs it here, and review_reopen decides who takes what is open: threads from before the session go back to it; only new ones go to the same conversation while review_keep holds — its context is under REVIEW_CONTEXT_MAX_PCT (40%), read from the status line's file (review_context), and its last request (requested in session_end.py) is younger than REVIEW_CACHE_TTL less REVIEW_CACHE_MARGIN (an hour less five minutes). The prompt cache lives from the last request, not with the process: a conversation resumed within the hour reads its context from the cache as one that waited inside it would have, and one resumed after that sends it all again uncached, which costs more than a fresh session. Otherwise, or when either figure cannot be read, a fresh session opens; the session's end goes to review-context.log (done or exit, with the rounds it closed). Before, a session under GitHub's review waited for it inside sclaude checks and ended its round on a marker of its own: two ways for one round, which the map drew twice. Its snapshot of the pull request lists only the review threads still open — the resolved ones are counted, not repeated — so the new round starts with the new findings and nothing else.

Rounds fed by their own fixes are said, once. The report after each round ends on a verdict — the share acted on below its floor, the fixes feeding the review, nothing open — and on no trend of the findings per round: the person reads that off the table's column, and a rule for it (a moving average) said "climbing" over 1, 2, 1. The fixes feeding the review are said only while something is open — a thread, or a pass still running: with neither there is no round left to stop, and no stuck verdict is written. When the fixes feed the review two rounds running, over four rounds or more (stuck and feeding_streak in review_report.py), the next fresh session is preceded by a warning in the feature's topic that names the keys ending the search — s while a review pass runs, ⏭ on the topic (review_stuck_say); the terminal has the verdict in red under the report and [s] on every status line of the review, and is not told again. Said, not asked: what is open goes back to a review session unasked once the last one closed itself, or with [g] ticked (review_close_gate; a session the orchestrator closed by review_reopen), and the person ends the rounds with the review's keys — s or ⏭ for the search, n/r in sclaude's tab at once. A session the person left (/exit, Ctrl-C in sclaude's tab; SESSION_EXITED) with [g] off holds the rounds there: the step stays open until the next sclaude <feature>. Sent back unasked, it reopened the same conversation within seconds when it had committed nothing. A question here ("Back to a review session for it?") once held the rounds until somebody came to answer it, though the keys already said everything it asked; it is left only at [g]'s ceiling below. Before the keys, one two-line change took fifteen rounds unasked through a morning, the box unticked and its line promising a question; the status line now says what each key does. The count can fall and the rounds still go on, each on the last one's fixes — four fresh sessions in a row once rewrote comments the one before had written. Not on one round: a last finding that happens to sit on an earlier fix says it too.

A round opens with its findings and goes on with their fix. Each row of the report is one review run, read in the cycle's order: find (when the run started, how long it took, what it cost, what it found and how much of that sat on earlier fixes or repeated a decline), fix (the session that answered those findings, its time and cost, and what it declined — the fix is where that is decided) and result (fixed, waiting). A pull request read in review blocks adds block after the round's number: the block the run read (the journal's block) and its count among that block's runs, <block>.<n> — what the map calls "Block · round " (block_rounds); the column is left out when no run read a block. The runs are grouped once, by journal_runs — the pull request's rows from its opening on; the passes over one range, one after another in the journal, are one run, a block's first read on the head the last block left is a run of its own, and the runs go in order of time — and the map's rounds are these runs (rounds_of in review_map.py), so "Block 3 · round 7 (131)" there is row 131, 3.7, here. The session that answered a run is the one with a launch after the run began and before the next one did — its start, each launch that gave its cost and the launch taken up again (resumed) — every round begins a launch, since the session ends on its marker and the gate brings it back — never the one merely going when the run began (fixers in review_report.py); one that answered several runs labels them N.1, N.2. The fix's time runs from that launch to the next run, or to the session's end (fix_window). The report once paired each fix with the run after it, so the findings of the pull request's first run stood alone in a row before and the session that fixed them came next, with a cost and no findings.

The polish round's row. When the gate owes the polish round it records the head the clean pass read (polish_head, review_polish_owe); the round that read it — the last one, if several did — is the polish round's (polish_round, in review_report.py and review_map.py alike, read by polish_of only once the polish was taken or while it is under way; none for a feature from before the record, nor for a polish owed and dropped). Its row names its session simplify; when sessions before /simplify's fixed that round's own findings, /simplify's session gets a row of its own under the round's, which keeps its own sessions, time and cost (polish_apart) — known as /simplify's by being the first of the round's sessions begun after the moment the polish was owed (polish_owed_at, written beside polish_head); until it has begun, the round is an ordinary one, with no simplify label and no places; the brief sent to the topic still takes the round whole, its places in. The simplify row's fixed counts the places its commits changed up to the next run's head — each hunk, a deletion or a binary file too, the person's asks (asked_commit: a feat commit or a Requirement: trailer) left out (own_places). Each place counts as a finding found and fixed, like the review's own: in the row's found and fixed, in the totals, in the brief sent to the topic and in "Fixed X of Y" — once the polish session has ended; while it goes on the row waits (w) and the places are not counted yet. The review's map draws that round as a line across the icicles and a tinted column of the tree.

A finding on the fixes is one on lines they wrote. on fixes counts the threads of a run that sit within NEAR_LINES of an earlier round's fixed thread, or of a line the feature's own commits since the run before wrote — first-parent and without merges, so main merged in is no fix (fixed_lines, by the runs' headSha). By the threads alone, a round whose findings were all on a new function, the guide or a migration a fix had added read as none on the fixes. A run's took is timed from its last attempt's start (startedAt): re-run after a usage limit, it once counted the hours of the wait. The share acted on is taken over the settled findings, a run's open threads left out only while its fix goes on or no later run has finished — what a later run left open was left to somebody else.

The report is printed as each round ends, not only with the session. sclaude prints it before a review session opens on findings, and whenever sclaude checks returns on a review run in the session's tab: it writes review-checked (its exit code, the head, the time), and the review's status line in sclaude's tab (review_pane_keys) prints the report by it when a round finished since the last table — the session's own commits and resolved threads are not one, and printed the same rows again with the fix still under way. A session that took up its next rounds itself once left the terminal without a table for three rounds. The topic hears a round's numbers once, as its fix session closes: the table printed after a pass that left findings stays in the terminal, since the session's start says them there already.

What a round cost is in two parts. find cost is the review run's own cost: each pass on this machine is a headless session sclaude names, and Claude Code's account in its transcript, subagents included, is read by the journal's session (pass_cost in review_report.py, read in claude_usage.py); a pass the person stopped, or whose answer was not taken, is journaled as spent for its cost alone (spent in local_review.py), never as a reviewed head. The workflow's review runs on GitHub and shows —, which is what will never be known. fix cost is the fixing launches that began after the run and before the next one (cost_at, run_cost in steps.sh; fixes_per_round — on GitHub a launch waits for the run of its own push and ends after it, but began on the run before), so a launch that pushed nothing adds to its run instead of shifting the rest. That a launch has ended is costed, which only run_cost writes. A value that will come and has not yet is w: the run still going, findings no session has begun to fix, the launch running now, whose cost is taken when it ends. A round's result is w until its fix has ended. The total is where the review stands now: the sums of what is known, a w left out until it comes, and where every thread stands. The process map prices the passes from the same journal, on their own block. The report once showed the fixes alone under cost, the reviews left out, and put a session's whole spend on its first round after every session.

A second pull request starts its own report. A feature reopened after its merge — a retrospective's fixes, a rollback — goes on under a new pull request, in the same state and journal. The report counts only the review sessions still going when that pull request opened, and the review runs of that pull request after it (pr_created in review_report.py, less two minutes for this machine's clock; a journal row names its pull request, one written before rows did is told by the time alone); when that time cannot be read, no verdict is written. The review's map reads the runs the same way. The verdict and its warning are kept per pull request (steps.review.stuck_pr, stuck_said). A rollback or QA's hand-back reopens the feature at step 4, whose session opens the new pull request, so step 4 records it on its way in and before it closes (capture_reopened_pr in github.sh). Counted with the new one, the merged one's rounds, whose threads the report no longer reads, showed as rounds that found nothing, and the new pull request's first findings were judged with the merged one's rounds.

Leaving step 4's session does not close it on its own. After the session exits, the step closes only once the automatic review has finished with the pushed head and left nothing open: no check running or red (the findings check among them) and no unresolved review thread (pr_context.py --close). Otherwise sclaude waits for a running review and sends what is open back to a review session, unasked; a session the person left themselves with [g] off holds the step open instead, and the question — back to a session, then closing anyway — is left only at [g]'s ceiling. A findings check red only because the review on GitHub handed back before it finished ("review did not finish", UNFINISHED_TITLE, with no thread open and nothing else red) is no work for a session: both questions answer unfinished, the gate reruns the review job's run (gh run rerun, review_unfinished_rerun) once on that head by itself (.sclaude/local/feature/review-unfinished.head), and if it does not finish again asks "Go on with this head unreviewed?" — n runs it again, [g] does so for REVIEW_GO_ON_RETRIES, and a yes closes the step saying the pull request was not reviewed. Any other red is dealt with first, and on the way out so are threads the person kept (on the way in they are reported as the step closes, as on a clean entry); each rerun is waited for with a fresh REVIEW_WAIT_MAX; left open on the way in (no answer, or a rerun that would not start) the step stops, telling the terminal and the topic, rather than open a session. Two questions of the review on this machine stay: the 1-3 choice once the person ended the search (check the fixes, close, leave it), and "Go on with this head unreviewed?" after a pass that did not run. [g] answers the first itself, and takes the second's place for REVIEW_GO_ON_RETRIES (ten) retries with growing pauses, then asks it.

Minor findings and the polish round. /code-review marks each finding important, pre-existing or nit (Claude Code 2.1.328). The local review asks for the mark in each heading (### <path>:<line> — [<severity>] <title>, SEVERITY in local_review.py) and the GitHub workflow's prompt posts every finding itself; a nit or a pre-existing one opens with MINOR_MARK (<!-- sclaude:minor nit -->, pr_context.py). It is counted open like any finding; the mark is for weighing: review.md makes a minor one the readiest to propose leaving, has a pre-existing bug too big for the change filed as a sub-issue and resolved with Left as it is, filed as #<n>:, and brief says how many of the open findings are minor. Where the gate would close the step on ok (or on unknown, GitHub not answering), review_polish_due (review_gate.sh) asks whether the polish round is owed: once a feature (polished, the feature's own mark, which nothing clears), with simplify: on (project_simplify_mode), on a head the review read (not under review: off, not after the person let a head go unreviewed, not on a pull request merged or closed, which --close answers gone: merged|closed), at the last review block only, and none once the person ended the search — nor when nothing changed since step 2's own /simplify (the trees compared, not the commits). That point is steps.code.head, the head a step 2 session ended on with its own done marker and no key of sclaude's tab said (review_polish_mark, from session_ended; cleared on any other end — /exit, [n]/[N], [R] — which may follow commits no /simplify read: a longer polish, never a commit left unread; unset for a part's session, which simplifies its part alone, and under simplify: off); review_polish_base answers it only while it is still under HEAD with no merge commit between, so a rebase or main merged in falls back to the whole change. review_polish_due leaves it in REVIEW_POLISH_BASE for the gate's line, which says which reach the round has; the round's prompt asks review_polish_base again when its session opens (<polish-base> and <if:polish-since> in render_prompt). review_polish_owe marks the round due (steps.review.polish, a field of the round like the others, cleared by a rewind, a block's close and "Close step 4 anyway", after which a later step 4 owes the round again) and clears the session, and the gate sends it back as open work (open: a polish round is owed…) the ordinary way — held when the person left the last session with [g] off, counted against [g]'s ceiling; review_skippable does not skip a review whose polish is due, and render_prompt turns due into <if:polish> in review.md: /simplify over git diff <polish-base>...HEAD. The first gate after that session sets polished and clears due (review_polish_taken), so the rounds its push may start are ordinary ones. Step 2 runs /simplify too, before its demo (<if:simplify> in code.md), a part's session over git diff <part-base>...HEAD.

Every commit a step's session makes names it. sclaude launches claude with core.hooksPath pointed at sclaude/githooks through GIT_CONFIG_* in that process's environment only; its commit-msg adds Sclaude-Session: <id> — the id the issue's table and claude --resume use — at the end of the trailer block, and every hook there then runs the project's own hook of the same name. A row in the issue finds its commits with git log --grep=<id>. Commits made by hand are untouched.


Generated from docs/sclaude.md; edit it there, then rebuild with wiki/build.py.

Clone this wiki locally