A project's capture/ can be left by a study in the other mode, and the run only checked that the folder existed, so a Clean room build could be handed a Deep capture, and a Deep run could skip its inside study by using a Clean room one. craft.json now records the mode the current capture was studied in (capture_deep, format version 5; a version-4 capture migrates as Deep, like a saved session), and a run studies again when its capture isn't from its mode. A study clears the record before it starts, so one that fails partway leaves nothing a later run trusts, and a Clean room study removes the files only a Deep study writes (how-it-works.md, page.html, runs/). The extractor's fresh-study decision and the run queue use the same check.
In Deep mode, a builder that hadn't decompiled anything was reminded to, but whether it had was kept only for one run, and each request from the person starts a new run. So a builder that had read the original's functions earlier was told "You haven't decompiled anything yet" after every request. It's now kept in the project's craft.json, so a decompile in any run counts.
craft.json keeps the mode a builder's saved session ran in (version 4, with a migration that counts an older saved session as Deep). A build or question resumes a session only in the mode it was saved in, so Clean room never continues one that may have read inside the original, and a Deep session is kept for a later Deep run.
A project can allow, ask about or refuse each kind of builder action (web, commands, outside files, publishing, deletes outside the project, system changes, other tools); a kind it hasn't chosen follows Auto mode as before. `project_approvals_set` sets them, and an agent can only make a kind stricter, including through our CLI from its own shell. "Always" on a push, delete or system card allows that whole kind, and pushes are read word by word in every shell form.
A build whose checks keep finding no working build stops after 10 in a row, across Try again presses, until a new request starts the count again (kept in craft.json as not_working_checks), and with app/ empty the builder is asked to write the project and show its build's output instead of fixing a build that doesn't exist (refs #736).
Supersedes #776.
Co-authored-by: Fábio Soares <fabiodev1123@gmail.com>
Fixes#469. craft.json records which coding agent saved the session (agent_session_by). A build or a question continues the session only with that agent; after the builder changes, the new one starts from the brief. A follow-up to an agent with no saved session also gets the brief.
A run with no message was read as a first build, so Try again studied the
original again and gave the builder the first brief, even with its session
saved. A run now carries on when the builder has already worked, and only
runs the check when the builder had finished (awaiting_check in craft.json).
A check that returns an error couldn't look at the build at all, so it gets a
second go, and then the run says the build is finished but couldn't be checked.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A native, pure-Rust app that shows anyone how a piece of software works, with
evidence-backed answers, then helps them rebuild it. It ships a desktop app, a
CLI and an MCP server, all driven by one engine.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>