A short run
An agent adds to a web page and commits it. complier only lets the commit through if the page's check passed after the agent's last edit.
You need complier installed, with complier doctor saying ready. See Install.
Get a page to work on
A small page with a check script (it fails if a link is broken or the title is missing). Its complier workflows come with it, in
.complier/:git clone https://github.com/kavishsathia/complier-loop-test ~/loop-test cd ~/loop-testRead the contract
It's in
.complier/short/workflow.csp. Running the check is a call like any other, and its result,doneif it passed orfailedif not, decides what comes next:Unchecked = Permit(edit, \ _ @ Unchecked) [] Permit(check, \ v @ (if v == done then Checked else Unchecked)) [] Deny(commit, Unchecked) Checked = Permit(edit, \ _ @ Unchecked) [] Permit(check, \ v @ (if v == done then Checked else Unchecked)) [] Permit(commit, \ _ @ SKIP) Agent = ControllableCHAOS System = prioritise(Agent [| {|attempt, allow, deny, result, refuse|} |] ComplierGuard(Policy), <{|attempt|}, {refuse}>)Next to it,
claude-code.yamlsays which of Claude Code's tool calls count asedit,checkandcommit.Start the machine
FDR proves the contract and the CEL verifier proves the unit before anything runs:
complier machine up short .complier/shortThen watch it in a second terminal. Every call shows up as allowed, denied or refused, and every result as it comes back:
complier machine log short --followStart Claude Code on it
Back in the first terminal:
COMPLIER_MACHINE=short COMPLIER_ROLE=dev claude --plugin-dir ~/.complier/pluginThen give it the task, which is also in
.complier/short/prompt.md:Add two more birds to index.html, each with a short note, then commit with `git commit -am "..."`. Before committing, run the page's check with `python3 check.py`: the commit is only allowed if that check passed after your last edit.What to look for
- A commit before the check, or after an edit since the last check, is denied, with the reason.
- Try breaking the page (ask the agent to link to a file that doesn't exist): the check fails, the result is
failed, and the commit stays denied until a later check passes. - Once the commit is through, the log ends with
finished. Stop the machine withcomplier machine down short.