โ ๐ฆ๐๐ป๐ฑ๐ฎ๐ ๐๐ผ๐ณ๐ณ๐ฒ๐ฒ & ๐๐ผ๐ฑ๐ฒ: ๐๐ผ๐ ๐๐ผ ๐ฌ๐ผ๐ ๐ฆ๐๐ผ๐ฝ ๐๐น๐ฎ๐๐ฑ๐ฒ ๐๐ผ๐ฑ๐ฒ ๐ณ๐ฟ๐ผ๐บ ๐ฅ๐๐ป๐ป๐ถ๐ป๐ด ๐๐๐ฎ๐?
One of the interesting challenges Iโve been dealing with in my Spec-Driven Development (SDD) work is how to give Claude Code enough autonomy to build software while ensuring it knows when to stop and ask for help.
Iโm using Claude Code, GitHub Spec-Kit and a set of custom harnesses to analyse requirements, break them into features, tasks and phases, then progressively build and verify the application - ๐ต๐ฉ๐ช๐ด ๐ณ๐ถ๐ฏ๐ด ๐ญ๐ข๐ณ๐จ๐ฆ๐ญ๐บ ๐ถ๐ฏ๐ข๐ต๐ต๐ฆ๐ฏ๐ฅ๐ฆ๐ฅ, ๐ช๐ฏ๐ค๐ญ๐ถ๐ฅ๐ช๐ฏ๐จ ๐ฐ๐ท๐ฆ๐ณ๐ฏ๐ช๐จ๐ฉ๐ต.
The challenge isnโt just getting Claude to do the work. ๐๐โ๐ ๐ฝ๐ฟ๐ฒ๐๐ฒ๐ป๐๐ถ๐ป๐ด ๐ถ๐ ๐ณ๐ฟ๐ผ๐บ ๐ด๐ผ๐ถ๐ป๐ด ๐ฑ๐ผ๐๐ป ๐ฟ๐ฎ๐ฏ๐ฏ๐ถ๐ ๐ต๐ผ๐น๐ฒ๐, ๐ฟ๐ฒ๐ฝ๐ฒ๐ฎ๐๐ฒ๐ฑ๐น๐ ๐ฎ๐๐๐ฒ๐บ๐ฝ๐๐ถ๐ป๐ด ๐๐ป๐๐๐ฐ๐ฐ๐ฒ๐๐๐ณ๐๐น ๐ณ๐ถ๐ ๐ฒ๐ ๐ผ๐ฟ ๐บ๐ฎ๐ธ๐ถ๐ป๐ด ๐ฑ๐ฒ๐ฐ๐ถ๐๐ถ๐ผ๐ป๐ ๐ถ๐ ๐๐ต๐ผ๐๐น๐ฑ๐ปโ๐.
Iโve approached this with several layers of control, separating what is enforced deterministically from what requires the agent to exercise judgement.
๐๐ฎ๐ฟ๐ฑ ๐ฐ๐ผ๐ป๐๐ฟ๐ผ๐น๐: ๐ง๐ต๐ถ๐ป๐ด๐ ๐๐น๐ฎ๐๐ฑ๐ฒ ๐ฐ๐ฎ๐ป๐ป๐ผ๐ ๐ป๐ฒ๐ด๐ผ๐๐ถ๐ฎ๐๐ฒ.
I have a Python session guard integrated into Claude Code through hooks that checks every action, including subagent activity. It enforces limits such as 450 calls per session, 200 calls without meaningful progress and an eight-hour session ceiling. It also blocks prohibited actions.
A PowerShell orchestration script checks the environment before launching each phase, verifies completion and decides whether another iteration is required - including self-tests.
๐ฆ๐ผ๐ณ๐ ๐ฐ๐ผ๐ป๐๐ฟ๐ผ๐น๐: ๐ช๐ต๐ฒ๐ฟ๐ฒ ๐๐น๐ฎ๐๐ฑ๐ฒ ๐ป๐ฒ๐ฒ๐ฑ๐ ๐ท๐๐ฑ๐ด๐ฒ๐บ๐ฒ๐ป๐.
CLAUDE.md, feature-specific notes and Spec-Kit skills define how the work should proceed and, importantly, when Claude should stop and escalate.
For example, Claude can make routine implementation decisions within agreed boundaries. But when it encounters something requiring a business or architectural decision, it needs to stop and ask me.
There are also explicit limits on repeatedly attempting fixes, waiting for CI, and continuing when unexpected failures accumulate.
๐ ๐ผ๐ป๐ถ๐๐ผ๐ฟ๐ถ๐ป๐ด: ๐๐ป๐ผ๐๐ถ๐ป๐ด ๐๐ต๐ฎ๐โ๐ ๐ต๐ฎ๐ฝ๐ฝ๐ฒ๐ป๐ถ๐ป๐ด ๐๐ถ๐๐ต๐ผ๐๐ ๐ถ๐ป๐๐ฒ๐ฟ๐ณ๐ฒ๐ฟ๐ถ๐ป๐ด.
A dashboard, run files and notifications let me monitor progress without having to supervise every action.
๐ ๐ ๐ฎ๐ฝ๐ฝ๐ฟ๐ผ๐ฎ๐ฐ๐ต ๐ถ๐ ๐ฑ๐ฒ๐น๐ถ๐ฏ๐ฒ๐ฟ๐ฎ๐๐ฒ: wherever I can replace a probabilistic control with a deterministic one, I do. Prompt-based controls are for situations that require judgement. The objective isnโt to constrain Claude - allow it to make the decisions itโs qualified and authorized to make, while reliably escalating those that need human judgement.
Designing an engineering environment in which agents can work independently, within clearly defined boundaries, with appropriate controls and accountability is becoming the most interesting part of the SDD work.
