Skip to content

AI coding agents

Pyahu puts baseline-specific guides and project instructions in the repository, where a coding agent works. Its build runs the same automated quality checks on changes written by people or by agents. This page shows what an agent gets, how to set up Claude Code, and what the guides changed when we measured it.

What Where What the agent does with it
Instructions for compatible coding tools AGENTS.md, imported by CLAUDE.md Learns the layout, the rules the build enforces, which guide to read before each area, and which Pyahu projects the project already uses
The guides of the project’s baseline .agents/skills/pyahu-production-guides/ Reads the step behind a change, offline and for the versions the project has, and names it so a reviewer can check
A shared vocabulary CHECKLIST.md, IDs such as DB-03 Reviews a service item by item, and respects the exceptions the team wrote down
A build that judges the result the quality checks, build/reports/pyahu/quality.json Reads the first failure: the check, the command that reproduces it and the guide step that explains the fix
A stack file that checks itself pyahu.yaml, pyahu validate Gets an exact error, with the fix, when it writes a service the Pyahu CLI does not offer
Docs for tools that read a URL llms.txt, each guide as .md, pyahu.io/llms.txt Finds the one guide a task needs, and how the Pyahu projects connect

The generator writes all of it into every project (ADR 0009). Nothing in it is specific to one tool, so a team that uses several agents gives them all the same instructions.

There is nothing to install. The project’s CLAUDE.md imports AGENTS.md, which sends Claude Code to the guides in .agents/skills/pyahu-production-guides/. To check, ask Claude Code which guide it would read before changing the database: it names guides/database.md of that folder. Then ask for a change the way you would ask a colleague, for example “cache the ping count in Valkey”.

The settings below are optional. Put them in .claude/settings.json and commit it, so the whole team gets them.

With the Pyahu CLI 0.19.0 or later, this hook runs pyahu validate after Claude Code changes the stack file with its Edit or Write tool. When the file is invalid, the hook exits with code 2, so Claude Code receives the validation error and can correct it:

{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"if": "Edit(**/pyahu.yaml)",
"command": "cd \"$CLAUDE_PROJECT_DIR\" && out=$(PYAHU_NO_UPDATE_CHECK=1 pyahu --no-input validate 2>&1) || { echo \"$out\" >&2; exit 2; }"
}
]
}
]
}
}

A change made through a shell command does not trigger it. When we tried it, Claude Code first wrote a valkey: service; the hook returned the CLI’s error, and Claude Code changed it to redis: before it finished.

Claude Code asks before it runs a command. These rules let it run the build and the commands that only read the local stack:

{
"permissions": {
"allow": [
"Bash(./gradlew build)",
"Bash(./gradlew test)",
"Bash(./gradlew integrationTest)",
"Bash(./gradlew check)",
"Bash(./gradlew spotlessApply)",
"Bash(mise tasks)",
"Bash(mise run compile)",
"Bash(mise run check)",
"Bash(mise run deps:status)",
"Bash(pyahu validate *)",
"Bash(pyahu status *)",
"Bash(pyahu services *)",
"Bash(pyahu describe *)",
"Bash(pyahu logs *)",
"Bash(pyahu env *)"
],
"ask": [
"Bash(mise run deps:down)",
"Bash(pyahu down *)",
"Bash(pyahu restore *)"
]
}
}

Both blocks go in the same file. The Gradle rules match those exact commands, so another task, such as publish, still asks; add a rule for each other command you want to allow. Direct pyahu down and pyahu restore commands and the task that stops the stack need approval; the rules do not look inside task scripts, so allow a task only after reading what it runs. Claude Code applies a repository’s allow rules once you accept its trust prompt, the first time you open the folder in an interactive session. With the build allowed, Claude Code runs ./gradlew build and reads build/reports/pyahu/quality.json when a check fails, as AGENTS.md tells it.

Claude Code loads a skill from .claude/skills/, not from .agents/skills/. It reads the guides through AGENTS.md either way. To also get /pyahu-production-guides, for a review against the checklist for example, link the folder:

Terminal window
mkdir -p .claude/skills
ln -s ../../.agents/skills/pyahu-production-guides .claude/skills/pyahu-production-guides

Then /pyahu-production-guides review this service against the checklist reports each item as pass, fail or not applicable, with its ID and the step that explains it.

Copy the guides of the release you follow and point AGENTS.md to them:

Terminal window
git clone --depth 1 --branch v0.1-b9 https://github.com/pyahu/initializer /tmp/pyahu-initializer
mkdir -p .agents/skills
cp -R /tmp/pyahu-initializer/skills/pyahu-production-guides .agents/skills/
## Pyahu guides
Before changing an area, read its guide in `.agents/skills/pyahu-production-guides/` (`SKILL.md` is the index) and
follow the step that fits the task. Say so when its "When this is not for you" applies, and name the guide and step
behind each change.

Then create or update CLAUDE.md with a line @AGENTS.md, so Claude Code reads it whatever its version and settings. For a Spring Boot service, the checklist shows what a review would find; the generator shows the files the guides describe.

Copy the folder to ~/.claude/skills/pyahu-production-guides/ instead. Claude Code then offers the guides in any project. In a generated project, AGENTS.md still sends it to the repository’s own copy, written for that project’s baseline.

  • Codex reads AGENTS.md and finds the guides in .agents/skills/ as a skill: nothing to set up. It took part in the evaluation below.
  • GitHub Copilot, Cursor and the other tools that read AGENTS.md get the same instructions. We have not evaluated them yet.

What the guides changed: a first evaluation

Section titled “What the guides changed: a first evaluation”

Exploratory and file-only: no builds or runtime tests, nine checklist items we chose, 12 runs per condition, two model judges, and two revisions of the instructions. It shows where the guides help and is not a guarantee of quality.

We gave Claude Code and Codex the same three tasks on a freshly generated project, twice: as generated, and without the “Pyahu in this project” section of AGENTS.md and the guides. Claude Opus and Codex then rated each change against checklist items the project’s files do not show, with a rule per item that accepts any implementation that does what it asks. Documentation files, added and removed comment-only lines and matching guide citations were filtered from what they read. An item counts as met only when both judges say so; they agreed on 71 of 72 assessments.

Task Checklist items With the guides Without them
Cache the ping count in Valkey CACHE-03, 05, 07, 08 15 of 16 10 of 16
Publish an event to RabbitMQ, on a project with Docker Compose RMQ-02, 04, 05, 06 16 of 16 3 of 16
Add a column to a table DB-09 4 of 4 1 of 4
Selected checklist-item assessments, 12 runs per condition 35 of 36 14 of 36

What the runs showed:

  • The project already shows where things go. With or without the guides, both agents put the new dependency in the file the project uses and the column in a new changeset, and none installed a tool of its own.
  • The guides matter most where the knowledge is specific. Publisher confirms, a wait on each confirm, quorum queues declared as beans and a lock timeout on a schema change: 20 of 20 with the guides, 4 of 20 without. Caching is better known: 15 of 16 against 10 of 16.
  • A name an agent cannot guess breaks a change. The stack file calls Valkey redis. Without the guides, Claude Code wrote valkey: in every run, a file the CLI rejects. AGENTS.md now lists the keys, and the hook above turns the CLI’s error into a fix.

The runs are from 29 November 2026, with the agents’ default models. The tasks, the changes, every rating with its reason and the limits are in evals/agents, and go run ./cmd/agenteval runs them again.

The guides tell an agent how; the build checks what it can check. Neither decides what the product should do, or whether a guide’s advice fits a case it does not cover: each guide’s When this is not for you says where it stops, and the agent should say so when it applies. Review the change as you would review a colleague’s, starting from the guide steps it names.