Make Claude Code follow your repository’s rules.
Write your rules once in stele.md. stele shows them to the agent before it writes, checks what it wrote, and checks again in CI.
What breaks a rule gets caught
After a write, a blocking violation goes back to the agent as a block, and the agent is told to fix it. In CI, stele check fails the job.
$ stele check main.go:6:2: error 573549ea-7f0b-47ec-ad30-db25284a3d2a "Log through the shared logger in internal/log. Never print w…": log through internal/log, not fmt.Print main.go:7:10: error 2de7574e-7106-4986-8ce6-996d06e2703a "Never put credentials in code, config or tests. Read them fr…" 3 rules valid checked 1 file: 2 errors
Three moments, one set of rules
Before a write
The agent is shown the rules for the file.
After a write
The lines it wrote are checked against rules with a regex check.
In CI
stele check checks the changed files.
One Go binary, no daemon, no model. No network calls, except stele publish, which you run yourself. About 0.1 s per write, measured on Windows.
Rules respected
Quick start
$ go install github.com/lictor-ai/stele/cmd/stele@latest $ cd your-project && stele init $ $EDITOR stele.md && stele compile
Commit what stele init and stele compile wrote, start Claude Code, and the rules apply. Add stele check to CI to catch the rest.
Where it stops
stele makes the rules hard to miss. It doesn’t make them impossible to break.
| Limit | What covers it |
|---|---|
| A missing, crashed or timed-out hook lets writes through. | stele check in CI |
| Bash, NotebookEdit and PowerShell writes aren’t checked. | stele check in CI |
| The agent can ignore the rules. | blocks after a write, then CI |
| A regex sees text, not code. | precise patterns, review |
| Rules are chosen by path, not by task. | few unscoped rules |