Why AI validators must verify against real code
In microsoft/amplifier-foundation, four validate-* recipes check bundles and agents. Generating a rule is cheap. But a validator only helps if its verdict can be believed.
So the real question: were the generated rules actually right?
The Domain Validator Authoring Guide records it plainly: "50% of initial rules were inaccurate when traced against actual code behavior." Plausible-sounding is not the same as correct.
What did those wrong rules actually claim?
Commit 0ec3efd ("align validator recipes with actual code behavior", Brian Krabach, 2026-01-28) removed and downgraded rules that the code disproved.
Wrong rules are only half the trust problem, though.
The guide names it: "Without explicit PASS thresholds, validators will always find something to suggest. This creates user frustration and distrust." "PASS WITH SUGGESTIONS feels like failure."
The fix has two halves — start with what earns each rule its severity.
A litmus test sets the level: it's an ERROR only if the code actually raises or fails, a WARNING if only docs enforce it, otherwise a SUGGESTION.
Verifying rules is half the fix. The other half is knowing when to stop.
The validate-agents recipe spells out four explicit PASS criteria. Meet them all and the agent passes clean — the validator stops finding things.
But thresholds only earn trust if a deterministic check applies them first.
<example> block.[]).In validate-agents, Phase 2.5 "Quality Classification" is a deterministic bash/Python step. If every agent passes, it sets requires_llm_analysis = False — and the LLM phases are skipped.
The verdict is earned by code, so the validator's word is trusted again.
Verify every rule against real code, set explicit PASS thresholds, and run deterministic checks first, AI second — that's how a validator earns back trust.
Shipped & iterated on main
Source repo: microsoft/amplifier-foundation (origin); ramparte/amplifier-foundation is the "fork" remote. Verified on local branch fix/session-naming-timeout-configurable at HEAD 0965a34.
Data as of: 2026-04-09 · Status: DOMAIN_VALIDATOR_GUIDE.md is the "definitive reference"; validate-agents.yaml at version 1.2.4.
Commands run:
git remote -v — confirmed origin = microsoft/amplifier-foundation.grep -n '50%' docs/DOMAIN_VALIDATOR_GUIDE.md — line 121: "50% of initial rules were inaccurate."grep -n 'Always Finds\|distrust' docs/DOMAIN_VALIDATOR_GUIDE.md — lines 37, 39, 43-46.git show --stat 0ec3efd — "align validator recipes with actual code behavior" (Brian Krabach, 2026-01-28).sed -n '233,265p' docs/DOMAIN_VALIDATOR_GUIDE.md — ERROR/WARNING/SUGGESTION table + litmus test.sed -n '38,42p' recipes/validate-agents.yaml — four explicit PASS thresholds.grep -n 'PHASE 2.5\|quality-classification\|requires_llm_analysis' recipes/validate-agents.yaml — lines 582, 587-588, 702, 809.wc -l amplifier_foundation/validator.py tests/test_validator.py — 305 / 254 lines.git shortlog -sn (guide + validate recipes) — 27 Brian Krabach / 1 Diego Colombo / 1 Salil Das.Primary contributor: Brian Krabach (27 of 29 combined commits, brkrabac@microsoft.com); also Diego Colombo (#123) and Salil Das (#151).
Gaps: "The 50% Rule" name and the And/But/Therefore framing are the storyteller's synthesis — the guide states "50% of initial rules were inaccurate" but not the phrase "The 50% Rule." "Ignored as noise" paraphrases "user frustration and distrust." PR merge status (#123/#127/#151) taken from local git log subjects only, not confirmed via gh.