Jesse Anderson ·
Enable autonomous work by defining a protected enclave
Draw an explicit line between the work an agent can finish on its own and the changes that need your approval.

This article is part of Can an Agent Really Own an Ecosystem?, a series about building an agent that can take responsibility across an ecosystem.
K.O.R.A. kept coming back to ask whether she was allowed to fix things. Eventually I worked out why: I’d never told her where the line was.
Some of what she touches is ordinary code. Some of it is the prompts and machinery that decide how she behaves. Treating those the same gets you one of two agents: one that asks permission for a typo, or one that quietly rewrites the rules she operates under. I’d met both.
So I drew the line, wrote it down, and made the system check it. I call it the enclave.
It’s a list, not a lock
The enclave is a manifest: one plain-text file in the repository listing the paths whose changes need my approval before they merge. An illustrative version:
# Changes to these paths need approval to merge.
# Everything else merges without asking.
.enclave
CANONICAL_CONTRACT.md
prompts/
src/kernel.py
src/tool_surface.py
src/secret_registry.py
A trailing slash means “everything under this folder.” No trailing slash means that exact file. That’s the whole format.
K.O.R.A.’s own list covers her prompts, her contract, the kernel that runs her tasks, her tool surface, and the code that decides which secrets get masked. These are the places where an edit changes how she behaves everywhere, which is exactly where I’d like a human to look first.
The line is about merging, not editing
This is the part I got wrong in my own head for a while.
Enclave files are not off limits. She can read them, edit them, test the change and open a pull request. What she can’t do is merge it without approval. The check runs when she tries to merge, and it asks one question: does this pull request touch an enclave path?
If it doesn’t, she merges on her own. If it does, she gets back a structured approval_required result and asks me to approve that specific pull request.
That distinction matters because a gate can quietly become an exit. If protected code means “a human’s problem,” every defect near it becomes my investigation. Here, she investigates and writes the fix either way. I decide whether the protected change lands.

The boundary is also a permission
I didn’t build the enclave only to protect files. I built it so she’d know where she could move freely.
Before it, “should I ask?” had no stable answer, so she asked a lot. With it, the rule is simple: if it isn’t in the enclave, fix it. If it is, fix it and ask me to approve the merge. Either way the work is hers.
After the boundaries were explicit, she pulled me into work much less. I’d call that a qualitative improvement, not a measured result, and she still asks when something legitimately needs me. But the “am I allowed?” conversations mostly stopped.
Protect the boundary itself
An enclave that can be edited freely isn’t much of one. K.O.R.A.’s manifest lists itself, so removing a path from it is a protected change too.
The merge check also reads the manifest from the target branch, not from the pull request. Otherwise a change could delete its own protection in the same diff and wave itself through. The same check refuses to let the agent-facing merge tool approve itself.
Keep it small
An enclave that covers everything is just a permission prompt with better branding. Protect what defines the agent’s behavior and authority: instructions, the contract, the execution machinery, the tool surface and the secret boundary. Leave the rest to merge normally.
Also resist the urge to grow it every time something goes wrong. Each addition is another place she waits for me, so each one should be there on purpose.
What it doesn’t do
The enclave is a merge-approval rule. It isn’t a sandbox, it doesn’t isolate credentials, and a path list can’t prove that every behavior-changing file is on it. Signing, moving value and deployment have their own controls.
It also only covers repositories that have a manifest. Where there isn’t one, her merges follow the ordinary rules instead.
Try the boundary before trusting it
Run these in a safe repository:
- An ordinary change merges without approval.
- A change touching an enclave path is refused with a structured approval request.
- The approved path merges the same change.
- A change that removes an enclave entry, or the manifest itself, is treated as protected.
- A refusal leaves the prepared fix in place and doesn’t turn into a request for me to do the work.
If the agent can finish the ordinary work without me and the protected work needs me only for the decision, the line is in the right place. If I’m still the one investigating protected defects, I’ve built a lock, not an enclave.