Quick start
In a few minutes, Claude Code will be following a rule you wrote yourself.
You need Claude Code, Go 1.27 or later, and a git repository to try this in.
1. Install stele
go install github.com/lictor-ai/stele/cmd/stele@latest
Prefer not to use Go? See the other ways to install.
2. Set up your repository
Go to the folder where you normally start Claude Code, and run:
stele init
This adds stele’s hooks to Claude Code and creates a starter stele.md.
3. Write your first rule
Open stele.md and replace what’s there with this:
scope: ["**/*.go"]
check: regex
pattern: fmt\.Print(f|ln)?\(
message: log through internal/log, not fmt.Print
Log through the shared logger in internal/log. Never print with fmt.Print,
Printf or Println.
The bottom part is the rule, in plain words. That’s what the agent reads.
The top part tells stele two things: which files the rule applies to, and how to spot a broken rule. Writing rules explains all of it.
Then compile your rules:
stele compile
4. Commit
Commit these files, so your whole team gets the same rules:
stele.mdstele.lock.claude/rules/stele-rules.md.claude/settings.json
5. Try it
Start Claude Code and ask it to add a fmt.Println to a Go file.
The agent already knows the rule, so it will probably push back or use the logger. If it writes the line anyway, stele sends back a block with the file, the line and your message, and the agent fixes it.
Next
Add stele to your pull requests, so anything that slips through still gets caught: Run stele in CI.