From AI experiments to a controlled, repeatable engineering workflow. The orchestrator owns the process; the model does what the process asks.
Companion to "Build on a laptop. Run it from a phone."
Ilia Poliakov
I first met the problem in a large organisation that paid for several models and agents.
architect
reviewer
tests
fixes, docs
All agents in one chat, each checking the others. Pleasant to watch, and of little use by the end.
What I learned
We did not roll it out. Speed is addictive; control has to be designed.
Prompts are not guarantees. Even with explicit instructions and IMPORTANT warnings, a model invents statuses, switches language and ignores predefined options, and over time the process drifts. So the process moved into code.
A session per stage, with an explicit hand-off. Less irrelevant context, fewer tokens.
The strongest model for judgement, a cheaper one for the PR, none for deploys and gates.
Allowed actions are enforced, not requested. The agent cannot leave the path.
Where the agent struggles is logged and turned into a better rule.
Less spectacular than a chat of agents. The more work moves into the orchestrator, the cheaper each feature gets.
Today each developer keeps their own prompts, workarounds and tricks, and the tools change faster than anyone writes a tutorial. Here all of it lives in git, where it compounds instead of walking out of the door.
Remembers which step every feature is on, and resumes after any interruption
Gathers the context for each step and renders its prompt
Sets up a sandbox per feature: worktree, dev server, database
Runs the tests locally, on the preview and on production
Deploys, and rolls production back when it goes red
Keeps the issue, the pull request and the board up to date
If a script can do it, the model should not.
The token budget goes to planning, writing and reviewing code, which is where a model is actually better than a script.
The orchestrator gathers the parent issues and the product manuals.
Propose the scope, wait for a person to confirm, then plan with acceptance criteria.
read-only
Build and test in its own sandbox, checking the result in a real browser.
ends: approval + green tests
Update the manuals, write it up, open it.
ends: a real PR
An AI reviewer and CI checks run on the pull request.
Fix what the review and the checks found, round by round.
ends: green preview tests
Deploy the branch, run the regression against it.
Checks the preview and ticks the criteria in the issue.
Sees criteria, checks and findings in one place.
Deploy, run the production tests, roll back if red.
Then: an epilogue writes the outcome into the issue and every parent, so an epic shows where it stands. A retrospective reads the whole run and proposes what to do better.
Docker's three layers for agent security, applied to a whole coding workflow. Each one is a separate answer to "what if the agent gets it wrong?"
A mistake stays inside one feature.
Before a session starts, the orchestrator decides what it gets.
Rules are executable, not advisory.
The first C, contain the blast radius. With an agent per feature a developer runs several in parallel, and in one shared checkout they collide: one migration wipes another's data, one sign-in signs you out of the next.
A separate copy of the repository on its own branch. Edits meet only in the pull request.
A dev server per feature behind its own address, so cookies and sign-ins stay apart.
Filled from the main local database or the seed. A migration reaches nothing else.
QA checks each feature at its own deployed address, never on a shared staging server.
Parallel work without a shared mess.
The second C, curate: for every step the orchestrator builds the agent's world, its context, tools, model and instructions.
| Step | Model | May do | Closes only on |
|---|---|---|---|
| 1 · Plan | Opus · high | Discuss and write the plan; no code at all | A plan a person approved, with criteria |
| 2 · Code | Opus · medium | Implement, check in Chrome, commit | A person's yes and green tests |
| 3 · Pull request | Sonnet · medium | Manuals and the pull request | A pull request that exists on GitHub |
| 4 · Review | Opus · medium | Fix findings, deploy the preview | Nothing left open, preview tests green |
| 5 · Epilogue | Sonnet · medium | Write the outcome into the issues | The session actually ran |
| 6 · Retro | Opus · medium | What was missed, what to improve | The session finished |
Every step starts a fresh session. Only the approved plan, with its criteria, is carried forward. Nothing stale leaks into the next step.
A step closes on evidence, never on a model saying "done". Ctrl-C, a usage limit or a closed laptop closes nothing; the conversation resumes.
The kind of know-how that used to live in one person's head. Most of it is built into the flow; the rest is shared as team practice.
A subscription keeps the prompt cache for an hour (five minutes on credits or an API key). Warm, the context is re-read at a tenth of the price or less; cold, it is paid in full. Take on no more parallel features than you can answer within the hour.
team habitStale context is paid for on every message. Starting clean costs nothing; compacting a long conversation is itself a large request.
built inOpus where judgement matters, Sonnet for the pull request and the write-up, no model at all for deploys and gates.
built inDeterministic work runs as scripts. A hook can cut a ten-thousand-line log to its failures before the model reads it.
built inCLI tools rather than MCP servers; workflow instructions as skills that load on demand; CLAUDE.md under 200 lines.
team habitSub-agents keep long outputs out of the main context. Agent teams cost about seven times a single session.
built inSources: Claude Code docs, Manage costs · Anthropic, Prompt caching.
local, preview or production
starting where the cause is
no endless loops
right after the release
unless someone shipped since
a clean check after rollback
criteria left unticked
to the step that must change
same criteria, same issue
or a dropped connection
the same conversation
nothing lost or redone
Every branch ends in something you can check, or in a question to a person.
Never in a loop, never in silence. The orchestrator handles it, so nobody has to remember it.
| Failure | What sclaude does about it |
|---|---|
| Finds nothing | The review must actually run on the latest commit. A green check that reviewed nothing is shown as such, and the step waits for a running review. |
| Endless rounds | A decision a person made is recorded as "left as it is" and the next review is told not to raise it again. A fix that would undo an earlier fix is stopped and put to the person. |
| Burns tokens | One round per session: a fresh, small context with only the threads still open. Fixes go to sub-agents, and suggested new abstractions are weighed against the review surface they add. |
| Stalls on a person | The agent fixes and replies. The person only sees the few findings it disagrees with, as an explicit yes or no question. |
Review runs in GitHub Actions or on the developer's own machine. Findings that are real but out of scope go to the monthly review rather than being fixed now or lost.
The goal is not another review layer. It is to compress the evidence before a human decision.
Ready to merge?
No default answer. It reads "Merge it unchecked?" when QA never saw the feature.
An agent with every tool open starts steering the work: it picks the scope, merges what it likes, touches what it should not. Then the model controls development, not us.
Rules come in layers
Merge, main, force. Nobody lifts these.
The usual dangers of Vercel and Supabase.
Its own bans; may lift a preset's.
Personal additions; lifts nothing above.
A ban that blocks real work makes people fight the tool, switch it off or work around it. Locking down works only when someone reads what the locks caught.
Tight by default. Loosened by evidence, never by habit.
The third C, control: executable rules, then a loop that reads what they caught.
| Loop | When | What it reads | What it decides | Where the change goes |
|---|---|---|---|---|
| Friction review | After every step that hit a ban | Each refusal, as it happened | Lift the ban, keep it as deliberate, or defer it | The product's rules, committed on the feature's branch. Ships with its pull request; the next step already runs with it |
| Monthly review | Once a month | Everything deferred, counted by class across features | Lift, ban for good, write a rule, relax a rule, or keep waiting | Team rules and the product's CLAUDE.md. A change for every product becomes a pull request to sclaude |
| Retrospective | Each feature, before cleanup | The terminal recording of the whole run, the plan, the state | What was missed, how the person could work better, what sclaude could do better | Missed work: back through the cycle from step 3. Process lessons: the person and the team. Tool lessons: to the maintainers |
One refusal is an anecdote; the same class in five features is a pattern. The monthly review sets aside what later work overturned, applied or made moot, then decides on the count, not on how convincing one entry reads.
Before a feature's sandbox is removed, a session reads everything the developer saw and typed during the whole feature, and gives three answers.
A warning that scrolled past, a promise a session did not keep, a follow-up never filed. Acted on while the sandbox still exists.
Where you waited, where you went round the same loop, where an earlier or clearer answer would have saved a session.
A misleading message, a stalled step, work a session did that a script could have done. Named down to the file.
Each retro also names what worked and is worth keeping. Across a team, that is how best practices surface: from real features, with evidence, without a meeting.
Every point quotes a line from the recording or names a file and field. An empty section is a fine answer. Nothing is padded to look useful.
A lesson starts with one person and climbs only as far as it proves itself.
Their friction review or retro writes it to their own rules in the product. It travels with their pull request.
decided by the developerOnce it proves itself, a product maintainer lifts it into the team's rules. Now everyone on the product works that way.
decided by a maintainerA lesson that holds everywhere is collected as a proposal and goes to sclaude as a deliberate pull request. Every machine gets it on its next command.
decided by sclaude's maintainersNothing changes the process by accident. Everything that should change it, can.
Review sessions never edit sclaude itself: a hook keeps them out. They change the product, and leave sclaude's maintainers a note.
Each question goes to the terminal and to Telegram at once; the first answer counts and the terminal carries on by itself. Silent while you sit at that terminal.
The feature running on the laptop opens full screen inside Telegram, with an address bar and no Tailscale on the phone. Only your account gets in.
A "Publish?" arrives with the commands it would run. Agreeing to an unseen action is not an option.
Who does what
stays on the laptop and keeps the state
shows its questions, passes the answers back, opens features on the phone
carries the step's own conversation
Termius and code-server remain for long hands-on stretches.
Every command pulls the latest version first. A fix reaches the whole team at their next command.
Tests, manuals, environments, board and maintainers live in the product, set up by a guided sclaude new.
sclaude doctor lists what a machine lacks and the command that fixes each gap.
Recordings and working state stay on the machine; never in git or a deployment.
Evidence, not status meetings.
The lead reads a summary table in each issue. Across features the records give the four DORA metrics from real cycles, gathered into a team repository if the product names one.
lines of orchestrator, bot and machine tooling
lines of tests
test suites, run before every push
steps, each with its own model and permissions
Observed in the team
productivity improvement
fewer tokens in the first weeks
Project observations, not universal benchmarks.
AI speed is easy to buy. Control is what has to be designed.
Principles used: Docker 3Cs · Anthropic workflows and context engineering · Claude Code best practices · Böckeler on harness engineering · DORA.
Runs on the laptops a team already has, on free tiers, installed with one script.
A fixed path, gates on evidence, rules that hold, people at every decision.
Tokens spent on thinking only. Everything repeatable is a script.
The orchestrator owns the process. AI does what the process asks. Building it is closer to project management than to programming: design the flow, set the constraints, track the deviations, resolve the conflicts between rules.
github.com/personalautomation/SClaude · MIT