sclaude · in depth · 2026

Manageable Scalable
AI coding

From AI experiments to a controlled, repeatable engineering workflow. The orchestrator owns the process; the model does what the process asks.

DoableControllableAffordable

Companion to "Build on a laptop. Run it from a phone."

Ilia Poliakov

Why · where this started

What we tried first, with plenty of budget

I first met the problem in a large organisation that paid for several models and agents.

The multi-agent setup
Claude

architect

GPT

reviewer

Copilot

tests

Other agents

fixes, docs

All agents in one chat, each checking the others. Pleasant to watch, and of little use by the end.

What I learned

  • Different models do give genuinely different perspectives.
  • Less context means fewer tokens.
  • Agents polished corner cases no user would ever reach.
  • Code size and token cost grew faster than the value. Past a certain complexity AI struggles; strict frameworks help.
  • Then a startup asked for the same: one model in every role was voices inside one head. One idea survived: manage the context, and the tokens follow.

We did not roll it out. Speed is addictive; control has to be designed.

Why · the durable lesson

Do not make the model the process engine

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.

1 · Controlled context

A session per stage, with an explicit hand-off. Less irrelevant context, fewer tokens.

2 · Controlled models

The strongest model for judgement, a cheaper one for the PR, none for deploys and gates.

3 · Hard constraints

Allowed actions are enforced, not requested. The agent cannot leave the path.

4 · Feedback loops

Where the agent struggles is logged and turned into a better rule.

Lower token spendControlPredictable processScales without load on the team

Less spectacular than a chat of agents. The more work moves into the orchestrator, the cheaper each feature gets.

"AI doesn't fix a team; it amplifies what's already there."Google, 2025 DORA report
"Workflows offer predictability and consistency for well-defined tasks."Anthropic, Building effective agents
Why · knowledge as capital

Process, prompts and lessons become company capital

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.

What is kept
  • The process: stages, gates, prompts
  • The rules: what each step may and may not do
  • The friction: every refusal, reviewed and decided
  • The lessons: retrospectives and the rules they produced
How it spreads
  • A fix reaches every developer at their next command
  • A personal rule that proves itself becomes the team's
  • A new hire starts with everything the team has learned; sclaude doctor sets up the machine
How it teaches
  • Each retrospective tells the developer, from their own run, how to work better
  • "What went well" surfaces best practices, with evidence
  • Whoever lags gets coached from facts, not in a meeting
"Quality internal platforms provide the shared capabilities needed to scale the benefits of AI across an organization."Google, DORA AI Capabilities Model
"Check CLAUDE.md into git so your team can contribute. The file compounds in value over time."Anthropic, Claude Code best practices
The same idea in Claude Code itself: /insights reads your recent sessions and reports friction points and suggestions.Claude Code docs, Manage costs
Why · division of labour

The model handles judgement. The orchestrator handles the rest.

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

Same operation every runNo interpretationZero tokens

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.

"…finding the smallest possible set of high-signal tokens…"Anthropic, Effective context engineering
How a feature flows

One feature, one fixed path

Start

Issue

The orchestrator gathers the parent issues and the product manuals.

1 · Plan

Propose the scope, wait for a person to confirm, then plan with acceptance criteria.

read-only

2 · Code

Build and test in its own sandbox, checking the result in a real browser.

ends: approval + green tests

3 · Pull request

Update the manuals, write it up, open it.

ends: a real PR

GitHub review

An AI reviewer and CI checks run on the pull request.

4 · Review

Fix what the review and the checks found, round by round.

ends: green preview tests

Preview

Deploy the branch, run the regression against it.

QA · a person

Checks the preview and ticks the criteria in the issue.

Merge · a person

Sees criteria, checks and findings in one place.

Production

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.

The safety model

Contain. Curate. Control.

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?"

Contain

Limit the blast radius

A mistake stays inside one feature.

  • A copy of the repository and a branch per feature
  • Its own dev server, address and database
  • Its own preview; production is never a feature's target
  • A failed release rolls back without touching anyone else's
more → the next slide
Curate

Construct the agent's world

Before a session starts, the orchestrator decides what it gets.

  • The context for this stage, and nothing stale
  • The tools and permissions this stage needs
  • The model and effort the stage is worth
  • The instructions: sclaude's, the team's, the developer's
more → the steps
Control

Enforce at the moment of action

Rules are executable, not advisory.

  • Hooks refuse a forbidden command as the agent tries it
  • Merge, main and production stay a person's call
  • Every refusal is logged
  • and reviewed: the feedback loop
more → start tight
"Curation isn't approval. It is construction."Docker, The 3Cs framework
"Unlike CLAUDE.md instructions which are advisory, hooks are deterministic and guarantee the action happens."Anthropic, Claude Code best practices
How a feature flows · contain

Every feature in a sandbox of its own

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.

Its own code

A worktree

A separate copy of the repository on its own branch. Edits meet only in the pull request.

Its own address

feature.localhost

A dev server per feature behind its own address, so cookies and sign-ins stay apart.

Its own database

Supabase in Docker

Filled from the main local database or the seed. A migration reaches nothing else.

Its own preview

Vercel per branch

QA checks each feature at its own deployed address, never on a shared staging server.

  • Idle for half an hour: stopped, database included, data kept; it starts again on the next visit
  • No Docker running: sclaude starts it, and falls back to the shared database only when it cannot, saying so
  • Removed with the feature when it is done; production is never a feature's target

Parallel work without a shared mess.

How a feature flows · curate: pay for thinking

Each step gets its own model, permissions and exit

The second C, curate: for every step the orchestrator builds the agent's world, its context, tools, model and instructions.

StepModelMay doCloses only on
1 · PlanOpus · highDiscuss and write the plan; no code at allA plan a person approved, with criteria
2 · CodeOpus · mediumImplement, check in Chrome, commitA person's yes and green tests
3 · Pull requestSonnet · mediumManuals and the pull requestA pull request that exists on GitHub
4 · ReviewOpus · mediumFix findings, deploy the previewNothing left open, preview tests green
5 · EpilogueSonnet · mediumWrite the outcome into the issuesThe session actually ran
6 · RetroOpus · mediumWhat was missed, what to improveThe 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.

"Explore first, then plan, then code."Anthropic, Claude Code best practices
How a feature flows · token secrets

Six habits that cut the token bill

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.

1 · The cache lives an hour

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 habit
2 · A fresh session per step

Stale context is paid for on every message. Starting clean costs nothing; compacting a long conversation is itself a large request.

built in
3 · The right model per step

Opus where judgement matters, Sonnet for the pull request and the write-up, no model at all for deploys and gates.

built in
4 · Scripts before tokens

Deterministic work runs as scripts. A hook can cut a ten-thousand-line log to its failures before the model reads it.

built in
5 · Lean always-on context

CLI tools rather than MCP servers; workflow instructions as skills that load on demand; CLAUDE.md under 200 lines.

team habit
6 · Delegate the noisy parts

Sub-agents keep long outputs out of the main context. Agent teams cost about seven times a single session.

built in

Sources: Claude Code docs, Manage costs · Anthropic, Prompt caching.

How a feature flows · the bad days

Built for the bad days too

Regression is red

local, preview or production

→
A fixing session, twice

starting where the cause is

→
Still red? Ask a person

no endless loops

Production is red

right after the release

→
Roll back first

unless someone shipped since

→
Confirm separately

a clean check after rollback

QA sends it back

criteria left unticked

→
Rewind the cycle

to the step that must change

→
Back through QA

same criteria, same issue

A closed laptop

or a dropped connection

→
Pick up where it stopped

the same conversation

→
State kept outside

nothing lost or redone

The rule behind all four

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.

"After two failed corrections, /clear and write a better initial prompt."Anthropic, Claude Code best practices
Review and decisions · AI review done deliberately

How sclaude avoids the four ways review goes wrong

FailureWhat sclaude does about it
Finds nothingThe 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 roundsA 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 tokensOne 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 personThe 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.

"Tell the reviewer to flag only gaps that affect correctness or the stated requirements."Anthropic, Claude Code best practices
Review and decisions · where people come in

AI reviews. The person gets the decision surface.

The goal is not another review layer. It is to compress the evidence before a human decision.

Collected by GitHub and the orchestrator
  • Acceptance criteria, as QA left them
  • CI and test results, preview included
  • AI review findings, and what was done about each
  • Merge conflicts and branch status
  • Proof that the required review actually ran
One decision

Ready to merge?

MergeRequest changes

No default answer. It reads "Merge it unchecked?" when QA never saw the feature.

"Before, 16% of PRs got substantive review comments. Now 54% do." The same split: the agent reviews, approval stays human.Anthropic, Code Review for Claude Code
"A good harness should not necessarily aim to fully eliminate human input, but to direct it to where our input is most important."Birgitta Böckeler, Harness engineering
Control · the main know-how 1 of 4

Start with the tools locked down, on purpose

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.

Refused as it happens
  • Writing code while planning
  • Merging: a person's decision
  • Pushing to main, force-push, skipping hooks
  • Promoting migrations, switching to production
  • Resolving a person's review decision alone
  • Deploying to production without asking: no default answer, and "anyway" when QA never saw it

Rules come in layers

sclaude core

Merge, main, force. Nobody lifts these.

Integration presets

The usual dangers of Vercel and Supabase.

The product's team

Its own bans; may lift a preset's.

One developer

Personal additions; lifts nothing above.

But locks alone fail too

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.

Feedback loops · the main know-how · 2 of 4

Three feedback loops, three horizons

LoopWhenWhat it readsWhat it decidesWhere the change goes
Friction reviewAfter every step that hit a banEach refusal, as it happenedLift the ban, keep it as deliberate, or defer itThe product's rules, committed on the feature's branch. Ships with its pull request; the next step already runs with it
Monthly reviewOnce a monthEverything deferred, counted by class across featuresLift, ban for good, write a rule, relax a rule, or keep waitingTeam rules and the product's CLAUDE.md. A change for every product becomes a pull request to sclaude
RetrospectiveEach feature, before cleanupThe terminal recording of the whole run, the plan, the stateWhat was missed, how the person could work better, what sclaude could do betterMissed 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.

"Whenever an issue happens multiple times, the feedforward and feedback controls should be improved."Birgitta Böckeler, Harness engineering
Feedback loops · the main know-how · 3 of 4

The retrospective is how the team learns

Before a feature's sandbox is removed, a session reads everything the developer saw and typed during the whole feature, and gives three answers.

1 · What you may have missed

A warning that scrolled past, a promise a session did not keep, a follow-up never filed. Acted on while the sandbox still exists.

2 · How you could work better

Where you waited, where you went round the same loop, where an earlier or clearer answer would have saved a session.

3 · What sclaude could do better

A misleading message, a stalled step, work a session did that a script could have done. Named down to the file.

Plus: what went well

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.

The rule: facts only

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.

Feedback loops · the main know-how · 4 of 4

Where a lesson ends up, and who decides

A lesson starts with one person and climbs only as far as it proves itself.

One developer

A personal rule

Their friction review or retro writes it to their own rules in the product. It travels with their pull request.

decided by the developer
→
The product's team

A team rule

Once it proves itself, a product maintainer lifts it into the team's rules. Now everyone on the product works that way.

decided by a maintainer
→
Every product

A sclaude default

A 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 maintainers

Nothing 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.

The channel · away from the desk

The phone is a channel to the orchestrator

One question, two places

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.

Web preview on the phone

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.

The right context with it

A "Publish?" arrives with the commands it would run. Agreeing to an unseen action is not an option.

Who does what

The orchestrator

stays on the laptop and keeps the state

The Telegram bot

shows its questions, passes the answers back, opens features on the phone

The Claude app

carries the step's own conversation

Termius and code-server remain for long hands-on stretches.

Scaling to a team

One copy for everybody. One record per feature.

Nobody forks

Every command pulls the latest version first. A fix reaches the whole team at their next command.

One config file

Tests, manuals, environments, board and maintainers live in the product, set up by a guided sclaude new.

Onboarding

sclaude doctor lists what a machine lacks and the command that fixes each gap.

Private by design

Recordings and working state stay on the machine; never in git or a deployment.

Every feature leaves a record
  • Time per step, test attempts and what failed
  • Friction: what the rules refused, and what each review decided
  • Review findings and the responses
  • How far it shipped, and who ran it

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.

What it took

A simple idea, made explicit exception by exception

~42k

lines of orchestrator, bot and machine tooling

~22k

lines of tests

69

test suites, run before every push

6

steps, each with its own model and permissions

Observed in the team

10–20%

productivity improvement

~5%

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.

Manageable means

Doable

Runs on the laptops a team already has, on free tiers, installed with one script.

Controllable

A fixed path, gates on evidence, rules that hold, people at every decision.

Affordable

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.

← The stack and the phone workflow

github.com/personalautomation/SClaude · MIT