Work04
Agent rules
The rules my AI coding agents work under, across every codebase I run.
Several AI coding agents can work on my projects at the same time. Without rules, one overwrites another, publishes something I never approved, or ends a session on three paragraphs I have to decode to find the one thing that is mine.
Decisions, marked on the work
Authority receipt, this website
- session
- s20261013-2001-3dae50
- mission
- PW-REFOUNDRY-001
- worktree
- build/pw-refoundry-001, claimed
- started at
- bdc4d57
- writer lease
- 2 hours, then reissue
- repositoryWrite
- allow
- localIntegration
- allow
- branchPublication
- deny
- pullRequestCreate
- deny
- pullRequestMerge
- deny
- deployment
- allow
- productionMutation
- allow
-
Mark 1: Seven separate permissions
Editing code does not include publishing it. Each session gets seven switches, set from the brief that started it. This one could write, integrate and deploy, and could not push to a public repository or open a pull request.
-
Mark 2: No two agents share a working copy
Every session works in its own Git worktree and claims it before the first write, so parallel agents never overwrite each other.
-
Mark 3: Permission runs out
A writer lease lasts two hours. After that the session is reissued from the brief, never quietly extended.
How every session must end
DONE - nothing needs you. <one clause: what is live / recorded / where>. Safe to close this chat.
NEEDS YOU - <the single action> -> <the exact consequence>. Reply approved / not approved. Work is saved; this is still open.
BLOCKED - {what} after {tried}. Reply fix and I will take care of it, or explain for the full picture. Work is saved; this is still open.
OVER TO YOU - <the act only a human can perform> -> <what it unblocks>. Nothing is waiting on me. Work is saved; this is still open.
-
Mark 4: Every session ends on one of four lines
Done, needs you, blocked, or over to you. One read tells me whether anything is mine to do, and a reply like "approved" only answers the question it was asked.
When an agent skipped a written rule, I added a check that refuses the action, so the rule holds whether or not an agent remembers it. The rules now run across 29 registered codebases.
What I did
- Wrote the session rules and decided what each agent may do alone
- Turned repeated mistakes into checks that refuse the action
- Built this site under them: the receipt above is the real one