Skip to content

Inside The workshop

Ilia edited this page Nov 30, 2026 · 4 revisions

sclaude's live checkout is read-only to every session it runs — sclaude_guard_args in steps.sh hands write-guard.py --readonly $INSTRUMENTS for the steps, the reviews and the epilogue alike — and no session pushes it or a worktree of it (OWN_CHECKOUT in forbidden-commands.py). Every other session runs from that checkout, and a hook edited there changes all of them on their next call; the repository is public, and a session works from a private product. Steps used to commit and push its main themselves, and the review sessions could not touch it at all, so a clear bug in a hook waited a month in a deferred file.

A program written in the line itself — a heredoc fed to python3 -, a node -e — names no target the way cp does, so the guard reads the program: one that holds a write (PROGRAM_WRITES) and runs in a read-only place is refused, since a relative path there lands in it. One that only reads passes, and so does one run elsewhere. A step's session once rewrote a file in the closed workshop that way, while the Edit that would have put it back was refused. A script in a file is still out of sight.

What the guard cannot name — rsync, patch, an unpacked archive — is caught after a review session by the checkout's own state (instruments_unchanged): commits alone over a clean tree are said quietly, anything else loudly. A fast-forward to what origin/main has — sclaude's own, or a person's pull — counts as commits; one to a branch of its own does not. A maintainer's squash before a push counts as commits once it is on origin/main and holds everything the reset dropped; a reset that threw unpublished commits away stays loud. When Claude processes have their working directory in the checkout itself (instruments_workers), the loud warning lists them, by pid and directory, after the session watched: a session that ran its own review loop there, committing and then rebasing, was once blamed on the review watched, which cannot commit.

A session changes sclaude in its tree's workshop instead (workshop.sh): a worktree of the checkout at <tree>/.sclaude/local/instruments, made from origin/main by the first sclaude core-open and shared by every session of the tree — a feature's, or a monthly review's. Inside the product's tree, since the session may already write there without a prompt, and under .sclaude/local, which git, the product's tools and every upload leave alone. A maintainer's workshop is on a branch nobody sees (workshop/<time>), since what reaches main is one squashed commit; anybody else's is the branch its pull request comes from, dev/<name>-<time> — never named after the feature, since the repository is public.

Who may write there. .sclaude/local/instruments.json, the record beside it (workshop.py), lists the sessions in approved. write-guard.py --workshop DIR treats the workshop as read-only for any other session, and the record as read-only for all; a refusal there names the workshop, not the live checkout (CLOSED_REASON). sclaude core-open adds the session that runs it, which it knows by SCLAUDE_SESSION (claude_launch exports it). forbidden-commands.py lets that call through only under --step friction (the retrospective, the friction review, the monthly review), which all start in plan mode, so the plan the person approved is the yes. A step's session is refused it: what in sclaude got in its way goes to the friction log — the refusal itself lands there — and the friction review after the session changes sclaude. Only those sessions' prompts carry the workshop's paragraph (workshop_rules, prompts/_workshop.md), and the process map marks them W.

Every session's write guard reads leniently (--lenient): a target it cannot tell — a loop's "$f", a $( … ), a directory in a variable — is refused only when the command names the checkout or the workshop at all, and the refusal says that the target could not be told. Steps write through variables all day, and a review now runs the workshop's tests in loops; the strict reading refused those for naming nothing. A plain git fetch in the checkout is allowed — no refspec, and only the flags that read (FETCH_READS) — since it only reads origin into the remote-tracking refs. sreview's state in the checkout's git directory stays writable (--allow), since reviewing a workshop's change writes it.

Finished, and reviewed. The session commits in the workshop, reviews its change and runs sclaude core-ready, which refuses uncommitted work and records the head as ready. For a maintainer of sclaude the review is sreview: core-ready wants sreview's mark of a finished run at that head ($S/branches/<branch>.reviewed, workshop_sreview_mark). For anybody else it is whatever review they choose, named with --review, and the maintainer's review of the pull request is the gate.

One question for every stop. Whatever stops a change on its way out is the person's question, workshop_decide: "Send, reopen or drop?", with what stopped it shown — what is missing from a change not finished, the red tests and their log, the lines that may name the product with the commits, the files and where they go, or why main or the push could not be reached. Send publishes it as it is: after red tests, a refused push or a preparation that failed it checks it again from the start — a maintainer's on the main it goes onto — and pushes it; and given after the lines and the commits were shown it overrides sclaude.leaks and sclaude.contribute (off asks as ask does: the person who sends after seeing them takes the risk knowingly). Reopen sends the session that made the change back into the same conversation, told what stopped it (WORKSHOP_RESUME for a change not finished, WORKSHOP_REOPEN_WORD otherwise; the session's launch is kept in the record's reopen). Drop empties the workshop and keeps what it held, committed as it was left, under refs/sclaude/dropped/<time> in sclaude's checkout (workshop_drop). A change not finished offers reopen and drop only; one whose session cannot be reopened (where it ran is gone), drop only. Nothing is decided for the person: unanswered, or while they are away (review_go_on: [g] ticked by hand or by sleep_mode, a night), the question is asked again whenever the tree is opened (workshop_pending, at a start, at the done step and for a monthly review's kept trees; a ready change goes through its checks again first, since main or the tests may have moved), and sclaude done will not clear the tree while the workshop holds anything. sclaude core-send is a send typed by hand: the checks run again as at an opening without showing the commits, and lines that may name the product, red tests, a failed preparation or a failed push still stop it with the question. A context too long for the phone is asked at the terminal alone, so that a send from the phone never covers lines it did not show. In the feature's history these are red, asked, reopened and dropped, beside sent-back, main and pr.

Publishing, from claude_launch once the session exits (workshop_after_session): with the head ready, workshop_publish fetches origin/main; for a maintainer it rebases onto it and squashes it into one commit (squash-message: the first commit that is not a review round leads, the rest are listed, the trailers merged) — main out of reach or a conflict is the question. Only the workshop's own commits go: one the live checkout's main holds (work not pushed yet, brought in by a rebase onto it, whatever that checkout stands on) or a branch checked out in another worktree holds (workshop_own_commits) is left out (workshop_drop_foreign), named under "left out" in the list, and stays unpublished where it was; a commit of the workshop's own that needs it is the question, the workshop as it was, and so is any such commit on the way to a pull request, whose branch is not rebuilt. It checks the change for the product's details (workshop.py leaks: the product's repository and folder names, the feature's slug and branch, the package's name, #12-like numbers and pull-request or issue references, and paths of the product's own files, in the added lines and the commit messages); the check asks nothing itself — sclaude.leaks auto shows the lines and lets them go, anything else hands them to the question after the tests, and a send is kept for the lines it was shown (leaks_ok), so a retry does not ask about them and a line not shown then does. It runs the tests the change touches in a clean environment, a line on the terminal for each as it runs, each in a session of its own with no terminal (Ctrl-C and a closed tab are passed on to it, workshop_tests; the output goes to .sclaude/local/instruments-tests.log beside the workshop, one file per tree). Red right after the session that made the change reopens that session, unasked (WORKSHOP_RED_WORD, with the red files and the log): it still has the change in mind, and a flaky test or one red on the base is as much its to fix. Twice at most; then it is the question. Green, it is asked when there is something to ask — a hit, or sclaude.contribute other than send — and otherwise goes on unasked. A maintainer's goes to HEAD:main; where sclaude.update is auto, the live checkout is fast-forwarded to it when nothing else runs from it (workshop_live_update), so the next session runs the fix (elsewhere it says sclaude update); the next sclaude start does it otherwise, and a checkout holding commits of its own that origin lacks is told to bring them on top (pull --rebase). Anybody else's goes unsquashed to its branch and its one pull request (instruments_propose from the workshop; a push that failed is not taken for sent, and is the question). When sclaude done's retrospective publishes and moves sclaude's code, the clean-up goes on in a fresh run, which sclaude starts itself (done_fresh), and does not ask about the retrospective again. A feature on done whose pass through production got to the clean-up for its pull request and the release production still carries (prod_pass.ended) goes straight to the clean-up when opened, without production and the epilogue again. The live checkout's state, which the reviews compare before and after, leaves out what sending a workshop's change records in the shared config: the fork remote and the dev/ and workshop/ branches.

Unfinished. A change uncommitted, or not marked ready at its head, is not published: the question offers reopen — the same conversation, with WORKSHOP_RESUME in place of its prompt (claude_again_args), naming what is missing (workshop_missing): uncommitted work, sreview's mark at the head, or core-ready not run (a sreview the person stopped with "stop" marks the head too) — or drop. Under sclaude.contribute off no session should have made a change: core-open refuses, and workshop_rules gives the sessions _workshop-closed.md in place of _workshop.md. When the tree goes, workshop_remove takes the workshop with it; by then the question has been answered (sclaude done waits for it), and anything a removal elsewhere finds unpublished is committed as it was left, kept on its branch in the checkout, and named.

The reviews' own refusals no longer reach the step's friction log (_friction.py skips --step friction): a retrospective's refused push sat there until the next step's review read it as that step's friction. Nor do hooks run by hand: a payload without the hook_event_name Claude Code always sends (heard in _friction.py) is a probe — a review checking its fix — and is refused as before but not logged; it had reached the log as a step's friction, with a step name of the probe's own.

The workshop opened by hand. sclaude workshop (improve/workbench.sh), which the bot's 🛠 button runs in a tab on the laptop, belongs to no tree and no product: the person wants something of sclaude and a session does it with them, answered over Remote Control. The script only makes the place — a worktree of the checkout from origin's main, beside it as sclaude-workshop-<time> (not under a name that begins with the checkout's path, which write-guard would read as naming the checkout), on workshop/<time> — and starts the session in plan mode, with the live checkout read-only and sreview's folder allowed (sclaude_guard_args), leniently, as a step's guard. A machine with sclaude.contribute off gets none. Everything else is the session's, by its prompt (prompts/workbench.md): asking what to change, following CLAUDE.md, the tests, /sreview for a maintainer, and publishing on the person's word — squashed onto main, or a pull request from dev/<name>-… for anybody else. None of the tree workshop's machinery (core-open, core-ready, the publication when the session ends) is involved. When the session ends the worktree goes if what it holds is proven on main: nothing uncommitted, and both its head and the branch it was made on either there themselves or such that a merge into main would change nothing (after a rebase or squash merge, committed and reverted, a merge's own edits counted). Otherwise — or while git cannot tell — it stays, with claude --resume on the conversation the session went on in (session_latest; workbench_published, workbench_close). Never by patch-id, which once took a change differing only in indentation for the workshop's: a pull request whose lines main has edited since no longer merges cleanly, and is kept for the person to remove. Each press also removes the earlier workshops that are on main by now and that no session still works in (workbench_busy).


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

Clone this wiki locally