AGENTS.md and CLAUDE.md. With Learn requirements from context files turned on in a configuration profile, Zenable reads those files and proposes requirements from them on the Proposals page.
Fair warning: this gets a bit complicated. There are a lot of edge cases, and we’re committed to being transparent about how it works. So here’s the main flow, then every edge case, one picture each.
Every case on this page is drawn the same way: the main flow, with what the case changes coloured and numbered. Each one also has a slide; use See it as a slide to open it.
Three words this page uses
- Passage: a piece of text in a context file, such as one bullet in
AGENTS.md. - Draft: what Zenable writes from a passage, in requirement form, before anything is filed. One passage gives at most three drafts. Text that says how to run or build the repository is not a rule and gives no draft.
- Requirement: a requirement stored in Zenable, whatever its state.
How Zenable decides what to propose
For each draft, Zenable asks these questions in order and stops at the first yes:- Was this passage learned before, and did its rule change? Zenable proposes an edit of that requirement.
- Does a requirement already demand the same thing, and apply here? Nothing is filed.
- Does a requirement demand the same thing, but not apply here? Zenable proposes a scope addition.
- Is it close to a requirement a person wrote? Zenable files one proposal with two choices: a new requirement, or an edit of theirs.
- None of these? Zenable proposes a new requirement.
How to read the pictures
Every case is the same picture in three parts: your repository, Zenable, and your decision. Nothing moves between cases, so you only look at what is different.- Grey: the same as the main flow. Teal: what this case changes. Amber: waits. Red: stops here; what comes after it fades out.
- A number marks each change, and each section says how many changes it has.
- Zenable compares the two parts of a requirement separately: what it demands, then where it applies. = means the same, ≠ different, ≈ close.
The main flow
- A pull request that changes a context file is merged.
- Zenable drafts a requirement in two parts: what it demands, and where it applies.
- It compares the draft with your nearest requirements: what each demands, then where each applies.
- Nothing demands it yet, so it proposes a new requirement on the Proposals page.
- A person, or an Agent Policy they set up, accepts it, and it is live.
What happens when…
Main flows
A new rule is merged
The main flow
A new rule is merged
The main flow
Learning is turned on
2 changes
Learning is turned on
2 changes
- No merge needed: Zenable reads the context files already on the default branch.
- Each rule Zenable does not have yet becomes its own proposal.
A learned rule is edited
2 changes
A learned rule is edited
2 changes
- The requirement was learned from this line, and the line changed.
- An edit of that requirement, showing what changed.
A requirement you have, in a new place
3 changes
A requirement you have, in a new place
3 changes
- A requirement already demands it, but not in this repository or folder.
- A scope addition: apply that requirement here too.
- Accepting widens where the requirement applies. Its wording does not change.
A requirement you have, already here
2 changes
A requirement you have, already here
2 changes
- A requirement already demands it, and already applies here.
- Stops: Nothing is new, so nothing is proposed.
Close to a requirement a person wrote
3 changes
Close to a requirement a person wrote
3 changes
- A requirement a person wrote demands something close, but not the same.
- One proposal with two choices: a new requirement, or an edit of theirs.
- Accepting one choice dismisses the other. An Agent Policy picks the higher-scoring choice that clears its bar.
Your decisions win
You edited it, then the file changed
2 changes
You edited it, then the file changed
2 changes
- A person changed the text of the learned requirement.
- Stops: Later file changes are not proposed for it.
You declined it, and the file still says it
2 changes
You declined it, and the file still says it
2 changes
- You declined this requirement before.
- Waits: The same words are never proposed again. New words for it wait 60 days.
The file changes before you decide
1 change
The file changes before you decide
1 change
The file changes while you review
1 change
The file changes while you review
1 change
- Waits: You edited the proposal, or it is in approval, so it is left alone. The new text waits until you decide.
A merge or split is pending
1 change
A merge or split is pending
1 change
- Waits: A merge or split of that requirement is waiting for a decision. Zenable compares again once it is decided.
You declined a scope addition
2 changes
You declined a scope addition
2 changes
- You declined applying this requirement here before.
- Stops: That place is never proposed again for it.
What a rule demands, and where
Only where it applies changes
2 changes
Only where it applies changes
2 changes
- “In .py files” became “in .py and .go”: the demand is the same.
- A scope addition for .go files. The text is not edited.
The text says where it applies
2 changes
The text says where it applies
2 changes
- “In .py files, use type hints” splits into what it demands and where it applies.
- The new requirement says “use type hints”, scoped to .py files. Only file types and paths become a scope.
The file now says fewer places
2 changes
The file now says fewer places
2 changes
- The file limits a rule that the requirement applies more widely.
- Stops: Zenable never narrows a requirement. Narrow it in Zenable if you want to.
One rule in several places
2 changes
One rule in several places
2 changes
- Two folders in one repository state the same rule.
- One proposal, covering both folders.
Two repositories, same rule
2 changes
Two repositories, same rule
2 changes
- Another repository’s proposal for the same rule is waiting.
- Added to that proposal while nobody has touched it. Once it is live, this is a scope addition instead.
A company requirement says it
2 changes
A company requirement says it
2 changes
- A company or marketplace requirement already demands it.
- Stops: If it does not apply here, the banner says so.
What Zenable reads
Which files are read
1 change
Which files are read
1 change
- AGENTS.md, CLAUDE.md, rules folders, and files you name on the profile. Never skills, or text the Zenable CLI writes.
Where it applies is unclear
1 change
Where it applies is unclear
1 change
- Stops: The file limits where it applies in a form its vendor does not document. Zenable never guesses; the banner names the file.
A file cannot be read
1 change
A file cannot be read
1 change
- Waits: Over 128 KiB, past the 100-file limit, or the host failed. The banner names it, and it is tried again later.
A file imports another
2 changes
A file imports another
2 changes
A rule is removed
2 changes
A rule is removed
2 changes
- The rule is no longer in the file.
- Stops: The requirement stays as it is. Remove it in Zenable if you want to.
A file or repository moves
3 changes
A file or repository moves
3 changes
- A renamed repository causes no work. A moved file is the same text in a new place.
- Usually a duplicate. At most, its new folder is a scope addition.
- Stops: Usually nothing is proposed.
Not a rule, or several
1 change
Not a rule, or several
1 change
- How-to text gives no draft. A passage gives one draft per rule, up to three: here, type hints and docstrings.
How drafts are matched
Close to a requirement, but different
2 changes
Close to a requirement, but different
2 changes
- Close, but a code change could break one without the other.
- Learned from this line: an edit. From another file: a new requirement. Written by a person: two choices.
An edit changes the kind of rule
2 changes
An edit changes the kind of rule
2 changes
- “Always use type hints” became “when adding a public function, use type hints”.
- The edit takes the new kind of requirement: it applies when a public function is added.
Zenable's own pull request is merged
3 changes
Zenable's own pull request is merged
3 changes
- You merge a pull request that AI Context Refinement opened.
- The file now states a requirement you already have.
- Stops: Nothing is proposed.
Limits and failures
Credits run out
1 change
Credits run out
1 change
- Waits: Proposals use credits from the installation’s pool. When it is empty, the rest wait until there are credits again.
The hourly limit is reached
1 change
The hourly limit is reached
1 change
- Waits: A repository gets at most 25 proposals an hour; the rest arrive over the next hours.
Something fails
1 change
Something fails
1 change
Turned off and on, or a repository joins
1 change
Turned off and on, or a repository joins
1 change
- Turned back on: only what changed since is read. A repository that joins is read in full.
Something is held back
1 change
Something is held back
1 change