Skip to main content
Your team writes rules for its coding agents in files like 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.
A requirement has two parts that Zenable keeps apart: what it demands of the code, and where it applies, which is its scope. When Zenable compares a draft with your requirements, it compares what they demand. Where they apply is checked on its own.

How Zenable decides what to propose

For each draft, Zenable asks these questions in order and stops at the first yes:
  1. Was this passage learned before, and did its rule change? Zenable proposes an edit of that requirement.
  2. Does a requirement already demand the same thing, and apply here? Nothing is filed.
  3. Does a requirement demand the same thing, but not apply here? Zenable proposes a scope addition.
  4. Is it close to a requirement a person wrote? Zenable files one proposal with two choices: a new requirement, or an edit of theirs.
  5. None of these? Zenable proposes a new requirement.
A person, or an Agent Policy, decides every proposal. A file never changes a requirement by itself.

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 merged rule becomes a proposed requirement. A merged rule becomes a proposed requirement.
  1. A pull request that changes a context file is merged.
  2. Zenable drafts a requirement in two parts: what it demands, and where it applies.
  3. It compares the draft with your nearest requirements: what each demands, then where each applies.
  4. Nothing demands it yet, so it proposes a new requirement on the Proposals page.
  5. A person, or an Agent Policy they set up, accepts it, and it is live.
What counts as a duplicate? A requirement that demands the same thing: any code change that breaks one also breaks the other. Wording doesn’t matter. Where each applies is compared separately, so the same demand somewhere else widens the existing requirement instead of making a copy. See it as a slide

What happens when…

Main flows

A merged rule becomes a proposed requirement.A merged rule becomes a proposed requirement.This is the main flow; every other case is drawn as changes to it.What counts as a duplicate? A requirement that demands the same thing: any code change that breaks one also breaks the other. Wording doesn’t matter. Where each applies is compared separately, so the same demand somewhere else widens the existing requirement instead of making a copy.See it as a slide
Turned on? The rules already there are read.Turned on? The rules already there are read.
  1. No merge needed: Zenable reads the context files already on the default branch.
  2. Each rule Zenable does not have yet becomes its own proposal.
See it as a slide
Edit a learned rule? You get an edit.Edit a learned rule? You get an edit.
  1. The requirement was learned from this line, and the line changed.
  2. An edit of that requirement, showing what changed.
Why an edit and not a new requirement? The requirement came from this exact line. When the line changes, the requirement follows it, so you review one edit instead of ending up with two requirements.See it as a slide
Same rule elsewhere? It now applies here too.Same rule elsewhere? It now applies here too.
  1. A requirement already demands it, but not in this repository or folder.
  2. A scope addition: apply that requirement here too.
  3. Accepting widens where the requirement applies. Its wording does not change.
Why widen it instead of adding a new requirement? The demand already exists; only where it applies is new. Widening it keeps one requirement in two places, so a later edit reaches both instead of two copies drifting apart.See it as a slide
Already have it? Nothing is proposed.Already have it? Nothing is proposed.
  1. A requirement already demands it, and already applies here.
  2. Stops: Nothing is new, so nothing is proposed.
Why is “All functions” a duplicate of “Public functions”? Any change that breaks the new rule also breaks the one you have, and yours already applies to this repository. The new rule adds nothing.See it as a slide
Close to one you wrote? You pick.Close to one you wrote? You pick.
  1. A requirement a person wrote demands something close, but not the same.
  2. One proposal with two choices: a new requirement, or an edit of theirs.
  3. Accepting one choice dismisses the other. An Agent Policy picks the higher-scoring choice that clears its bar.
Why not just edit theirs? A person wrote it, so Zenable never changes it on its own. You choose: keep theirs and add a new requirement, or edit theirs. The record keeps which you chose, who chose it, and why.See it as a slide

Your decisions win

You edited it? Your edit wins.You edited it? Your edit wins.
  1. A person changed the text of the learned requirement.
  2. Stops: Later file changes are not proposed for it.
Why does the file stop updating it? Once a person edits a learned requirement, it is theirs. Proposing file changes on top would undo their decision.See it as a slide
Declined it? It is not asked again.Declined it? It is not asked again.
  1. You declined this requirement before.
  2. Waits: The same words are never proposed again. New words for it wait 60 days.
Why wait before asking again? A decline is a decision. Asking the same question again right away ignores it; new wording gets a fresh look once 60 days have passed.See it as a slide
Changed before you decided? The proposal follows.Changed before you decided? The proposal follows.
  1. The waiting proposal takes the newest text.
See it as a slide
Already reviewing it? It is left alone.Already reviewing it? It is left alone.
  1. Waits: You edited the proposal, or it is in approval, so it is left alone. The new text waits until you decide.
See it as a slide
Merge pending? It waits for that.Merge pending? It waits for that.
  1. Waits: A merge or split of that requirement is waiting for a decision. Zenable compares again once it is decided.
See it as a slide
Declined it here? Not asked again.Declined it here? Not asked again.
  1. You declined applying this requirement here before.
  2. Stops: That place is never proposed again for it.
See it as a slide

What a rule demands, and where

Only the place changed? It is widened.Only the place changed? It is widened.
  1. “In .py files” became “in .py and .go”: the demand is the same.
  2. A scope addition for .go files. The text is not edited.
Why isn’t this an edit? Only where the rule applies changed, not what it demands. Widening where the existing requirement applies keeps its wording and history as they are.See it as a slide
The rule names a place? That becomes its scope.The rule names a place? That becomes its scope.
  1. “In .py files, use type hints” splits into what it demands and where it applies.
  2. The new requirement says “use type hints”, scoped to .py files. Only file types and paths become a scope.
Why move “in .py files” out of the text? A requirement says what code must do; its scope says where. Kept apart, the same demand found for another file type widens one requirement instead of making a near-copy.See it as a slide
The file says fewer places? Nothing is narrowed.The file says fewer places? Nothing is narrowed.
  1. The file limits a rule that the requirement applies more widely.
  2. Stops: Zenable never narrows a requirement. Narrow it in Zenable if you want to.
Why not narrow it? Narrowing removes checks somewhere else, perhaps on code this file never covers. That is a decision for a person.See it as a slide
Same rule in two folders? One proposal.Same rule in two folders? One proposal.
  1. Two folders in one repository state the same rule.
  2. One proposal, covering both folders.
See it as a slide
Two repositories, one rule? One proposal.Two repositories, one rule? One proposal.
  1. Another repository’s proposal for the same rule is waiting.
  2. Added to that proposal while nobody has touched it. Once it is live, this is a scope addition instead.
See it as a slide
Your company has it? Nothing is proposed.Your company has it? Nothing is proposed.
  1. A company or marketplace requirement already demands it.
  2. Stops: If it does not apply here, the banner says so.
See it as a slide

What Zenable reads

Which files? Context files only.Which files? Context files only.
  1. AGENTS.md, CLAUDE.md, rules folders, and files you name on the profile. Never skills, or text the Zenable CLI writes.
See it as a slide
Unclear where it applies? Not read.Unclear where it applies? Not read.
  1. Stops: The file limits where it applies in a form its vendor does not document. Zenable never guesses; the banner names the file.
Why not make a best guess? A wrong guess applies a rule to code it was never meant for. Naming the file in the banner lets you fix the frontmatter instead.See it as a slide
Can't be read? It is tried again.Can't be read? It is tried again.
  1. Waits: Over 128 KiB, past the 100-file limit, or the host failed. The banner names it, and it is tried again later.
See it as a slide
A file imports another? It is read as one.A file imports another? It is read as one.
  1. @AGENTS.md is read as part of CLAUDE.md.
  2. Its rules apply where CLAUDE.md applies.
See it as a slide
Rule deleted? The requirement stays.Rule deleted? The requirement stays.
  1. The rule is no longer in the file.
  2. Stops: The requirement stays as it is. Remove it in Zenable if you want to.
Why not remove the requirement too? A line deleted from a file is easy to miss in review. Removing a requirement changes what is checked everywhere it applies, so a person decides.See it as a slide
Moved or renamed? Usually nothing.Moved or renamed? Usually nothing.
  1. A renamed repository causes no work. A moved file is the same text in a new place.
  2. Usually a duplicate. At most, its new folder is a scope addition.
  3. Stops: Usually nothing is proposed.
See it as a slide
Not a rule, or several? None, or up to three.Not a rule, or several? None, or up to three.
  1. How-to text gives no draft. A passage gives one draft per rule, up to three: here, type hints and docstrings.
See it as a slide

How drafts are matched

Close, but different? Its source decides.Close, but different? Its source decides.
  1. Close, but a code change could break one without the other.
  2. Learned from this line: an edit. From another file: a new requirement. Written by a person: two choices.
Why does the source matter? Zenable follows a line it learned from, keeps rules from other files separate so refinement can merge them later, and never changes what a person wrote without asking.See it as a slide
A different kind of rule? The edit follows.A different kind of rule? The edit follows.
  1. “Always use type hints” became “when adding a public function, use type hints”.
  2. The edit takes the new kind of requirement: it applies when a public function is added.
See it as a slide
Zenable's own pull request? Nothing is proposed.Zenable's own pull request? Nothing is proposed.
  1. You merge a pull request that AI Context Refinement opened.
  2. The file now states a requirement you already have.
  3. Stops: Nothing is proposed.
See it as a slide

Limits and failures

No credits left? Proposals wait.No credits left? Proposals wait.
  1. Waits: Proposals use credits from the installation’s pool. When it is empty, the rest wait until there are credits again.
See it as a slide
Lots of rules at once? 25 an hour.Lots of rules at once? 25 an hour.
  1. Waits: A repository gets at most 25 proposals an hour; the rest arrive over the next hours.
See it as a slide
Something failed? The next hour retries.Something failed? The next hour retries.
  1. Waits: The next hourly run picks it up. Nothing is proposed twice.
See it as a slide
Turned back on? Only what changed is read.Turned back on? Only what changed is read.
  1. Turned back on: only what changed since is read. A repository that joins is read in full.
See it as a slide
Something held back? A banner says why.Something held back? A banner says why.
  1. The profile and the Proposals page list what is waiting, and why.
See it as a slide