Docs
Guide

Enforce the rules in AGENTS.md

Turn the rules you keep in AGENTS.md, CLAUDE.md or Cursor rules into requirements that Kibi links to the code, shows before every edit and checks before every commit.

AGENTS.md and its relatives (CLAUDE.md, .cursor/rules, GEMINI.md) are a good place to tell an agent how to work. They are a weak place to keep product rules. The file is prose that the agent may or may not read, it grows until the important line is lost, and nothing checks that the code still does what it says.

Kibi keeps the instruction file short and moves the rules that must hold into requirements it can check.

Instructions versus requirements

  • Instructions describe how to work: run the tests, use the project's formatter, open a pull request against develop. These stay in AGENTS.md.
  • Requirements describe what the software must keep doing: "a user owns at most five workspaces", "password reset signs out every other session". These belong in Kibi, where each one is linked to the code that implements it and the tests that verify it.

What Kibi adds to a rule

It is shown at the moment it matters. With a Kibi plugin, the hook before an edit names the requirement the file implements, what it must keep true, why it exists and the decision behind it. The rule reaches the agent even when the instruction file was never read.

Your rules cannot be quietly rewritten. A rule you stated is recorded as firm and points at your words. Only another firm decision can replace it, so the agent is told to ask you first. A choice the agent made is a default that a later agent may replace with evidence. When your request conflicts with any recorded rule, the agent names it and asks.

It is checked, not just read. kibi check and the pre-commit gate report code that no requirement owns, requirements that contradict each other and scenarios a current requirement forbids. With the test Kibi level, a requirement also needs a test with fresh evidence before it counts as tested.

The instruction file stays in step. kibi init adds a short Kibi section to AGENTS.md that tells every agent the knowledge base exists, to search it before changing behaviour, and to record a rule you state. It does not copy the requirements into the file.

Moving existing rules into Kibi

Bootstrap reads the sources you point it at, which can include AGENTS.md, your wiki and your issue tracker. It proposes requirements that each cite where they came from, and writes nothing until you approve the plan. Start with the quick start, and see modeling requirements for how a rule becomes requirements, scenarios and facts.