Skip to content
LEX
Keyboard: press / or Command K to ask or jump, backtick to open the terminal.

LEX · the pass

Order ticket

Ticket

#

From
Time
Order

Fire it

EN · DE · ES

Back to the Lab

AI & agents02 / 12

Agent Studio

A Claude Code engineering studio with deterministic routing and hard gates

Status
Working, not deployed
Period
2026 →
Role
Design and development, end to end
For
Internal tooling for my own projects.
ORCH

Experience it

Illustration of real tooling: a scripted walk-through, not a recording of a live session.

One task through the studio

turn endYouMain agentOpusExploreHaikuimplementerSonnetSessionStartguard_bashguard_reusestop_gateBashEditTests

Current step · Step 1 of 16

Request arrives

A task is typed into the session: add a small feature to an existing project.

Message · You → Main agent

Step log

  1. 01 Request arrives[Message]
  2. 02 SessionStart injects the project briefing[Hook · allow]
  3. 03 Main agent plans[Message]
  4. 04 Delegates a read-only search to Explore[Delegate]
  5. 05 Explore reports back[Message]
  6. 06 Delegates the change to implementer[Delegate]
  7. 07 Implementer tries a shell command[Tool call]
  8. 08 guard_bash asks or denies[Hook · blocked]
  9. 09 Implementer creates a new file[Tool call]
  10. 10 guard_reuse blocks the duplicate[Hook · blocked]
  11. 11 Implementer extends the existing file[Tool call]
  12. 12 Tests run[Tool call]
  13. 13 Stop gate fails[Gate · fail]
  14. 14 Agent fixes the cause[Tool call]
  15. 15 Stop gate passes[Gate · pass]
  16. 16 Done[Message]

Problem

Working with AI agents is unreliable when every session improvises its own model choice, rules and checks. Quality depends on luck and on how carefully the last prompt was written.

Agent Studio is the working environment I build with: three plugins, thirteen specialist agents and sixteen skills, wired together with hooks that stop bad changes before they land.

Case study

Each agent pins its own model and effort level in its definition, so routing is a fact of the setup and not a decision made per session. An architect runs on Opus at extra-high effort, an implementer on Sonnet at medium, a scribe on Haiku at low, and a separate escalation tier exists for the hard cases.

Hooks enforce the rules. They deny dangerous shell commands and enforce conventional commits, keep secrets and lockfiles out of reach, block duplicate files and definitions on the first attempt, and run the project's own lint, validation and test gates before a turn may end.

Architecture

Three plugins (studio, studio-web, studio-ai) hold the agents and skills. Seven hook registrations across five events implement the guards for bash, files, reuse and the stop gate, which allows at most three attempts and scans for placeholders.

Engineering decisions

  1. Model and effort pinned per agent, so cost and quality are predictable.
  2. Rules enforced by hooks that act, not by instructions the model may forget.
  3. A reuse guard that blocks duplicates on the first attempt.
  4. The writer and the reviewer are always different contexts.

Challenges & trade-offs

Making guards strict enough to matter without making them a source of friction, which is why the stop gate caps retries and the hooks are covered by their own tests.

Verified results

  • 3 plugins, 13 specialist agents, 16 skills
  • 7 hook registrations over 5 events, 31 hook tests
  • Working locally; private

Status labels are factual: nothing here is presented as more finished than it is.

Stack

Ask or jump

Type a question or a name. Navigation is deterministic — no chatbot.

Press / or ⌘K