Agents / behavioral-regression
AGENTS.md1 starsChanged 58 days agoApache-2.0View on GitHub
A terminal consumer: nothing imports it, so its only contract is the one it keeps with itself. This directory owns the calibrated behavioural-regression detector and its ship/hold/escalate gate. Every statistic is composed from agent_core and flow_corpus primitives rather than re-derived here, and a whole run is byte-reproducible from a (BRConfig, seed) pair. - A stale claim lives in this package — do not propagate it. The __init__.py docstring says this package imports flow_protocol, and pyproject.toml declares flow-protocol as a dependency,…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository39 other files it gives its agents.
- agent-core/AGENTS.mdAGENTS.md
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- claude-foundation/AGENTS.mdAGENTS.md
- config/AGENTS.mdAGENTS.md
- corpora/AGENTS.mdAGENTS.md
- demo/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- examples/AGENTS.mdAGENTS.md
- experiments/AGENTS.mdAGENTS.md
- flow-corpus/AGENTS.mdAGENTS.md
- flow-protocol/AGENTS.mdAGENTS.md
- openspec/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- claude-foundation/CLAUDE.mdCLAUDE.md
- merge-gate-auditorSkill
- update-executive-reportSkill
- update-executive-reportSkill
- architecture-drift-guardSkill
- commonSkill
- corpus-guardianSkill
- dataset-lintSkill
- deploySkill
- e2e-matrix-sentinelSkill
- eval-corpus-forgeSkill
- hierarchical-recursive-brainstormSkill
- model-benchSkill
- openai-judgeSkill
- openspec-implementation-reviewSkill
- openspec-peer-reviewSkill
- openspec-quality-planSkill
- pre-pr-gateSkill
- project-setupSkill
- quality-gateSkill
- refactoring-decomposerSkill
- repo-invariant-reviewSkill
- test-completeness-guardSkill
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 68
Offline and deterministic, byte for byte: No network, no wall clock, no unseeded randomness.
- Very specific: line 70
No literal in the decision logic: Every threshold is a BRConfig field, overridable by construction or --set key=value, and configs …
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — behavioral-regression
A terminal consumer: nothing imports it, so its only contract is the one it keeps with itself.
This directory owns the calibrated behavioural-regression detector and its ship/hold/escalate
gate. Every statistic is composed from agent_core and flow_corpus primitives rather than
re-derived here, and a whole run is byte-reproducible from a (BRConfig, seed) pair.
Map
| Path | Role |
behavioral_regression/config.py | Frozen BRConfig — every threshold the gate reads |
behavioral_regression/generator.py, judge.py | Seeded synthetic v1/v2 pairs; the contested judge |
behavioral_regression/oracle.py | Judge validation against human labels before it is trusted |
behavioral_regression/detector.py | p(regression), intervals, and the "can't tell" bucket |
behavioral_regression/canary.py | Injected known regression plus known null; separation check |
behavioral_regression/gate.py | decide_ship — the fail-safe-to-escalate layering |
behavioral_regression/pipeline.py, report.py | The seven beats end to end; deterministic output |
behavioral_regression/version.py | SCHEMA_VERSION plus the config migration chain |
Diagram
flowchart TD
accTitle: behavioral-regression ship decision layering
accDescr: A seeded config drives the generator, judge, judge validation, detector and canary; the gate then falls to escalate whenever the canary fails to separate, the judge is unvalidated or the measurement cannot tell, holds a real regression, and ships only otherwise.
CFG["BRConfig + seed"]
GEN["generator.py<br/>seeded pairs"]
JDG["judge.py<br/>contested judge"]
VAL["oracle.py<br/>kappa + power"]
DET["detector.py<br/>estimate + cant_tell"]
CAN["canary.py<br/>separation margin"]
GATE["gate.py decide_ship"]
ESC["ESCALATE<br/>fail-safe default"]
HOLD["HOLD<br/>regression is real"]
SHIP["SHIP"]
CFG --> GEN --> JDG
JDG --> VAL
JDG --> DET
CFG --> CAN
VAL --> GATE
DET --> GATE
CAN --> GATE
GATE --> ESC
GATE --> HOLD
GATE --> SHIP
classDef here fill:#e8f0fe,stroke:#1a73e8,stroke-width:2px
class GATE hereRules that bite here
- A stale claim lives in this package — do not propagate it. The
__init__.pydocstring says this package importsflow_protocol, andpyproject.tomldeclaresflow-protocolas a dependency, but noflow_protocolimport exists anywhere in the source. The real edges areagent_coreandflow_corpus, which is exactly whatarchitecture.yamldeclares. If you genuinely need the contract types, add the import and the manifest edge together; otherwise treat the docstring and the dependency entry as drift, not as permission. - Never import
eval_harness. The airgap holds for this consumer too. The optional live judge lives ineval_harness.judgesand is wired in by the harness layer, from that side. - The gate falls safe to ESCALATE, and that is the whole design. Any new condition that cannot be evaluated escalates; none of them may shortcut to SHIP. The explicit "can't tell" bucket is an output the gate consumes, not a gap to smooth over with a default.
- Offline and deterministic, byte for byte. No network, no wall clock, no unseeded
randomness. A run must reproduce from
(BRConfig, seed)alone or the canary means nothing. - No literal in the decision logic. Every threshold is a
BRConfigfield, overridable by construction or--set key=value, and configs round-trip through the migration chain. - Reuse the statistics, do not re-derive them. Wilson, Brier and reliability bins come
from
agent_core.calibration; bootstrap deltas and the oracle kappa gate come fromflow_corpus. A second local implementation drifts from the one the gate was calibrated on.
Verify
make -C behavioral-regression checkSubagents
| Task in this directory | Agent | Why |
| Confirm whether a claimed dependency is actually imported | explorer | Read-only Grep over the package; this is how the stale flow_protocol claim was caught |
| Run the gate and isolate a determinism or coverage failure | test-runner | Has Bash; a reproducibility break shows up as a diff, not a stack trace |
Review a change to gate.py before pushing | narrow-critic | A new branch that reaches SHIP instead of ESCALATE is invisible to the linters |
See also
| Doc | Read it when |
README.md | You need the seven-beat pipeline and the reused-symbol table |
GAP_ANALYSIS.md | You need to know whether something is built, seamed or deliberately absent |
../docs/decisions/0006-behavioral-regression-detection.md | You are changing what counts as a regression or how the estimate is formed |
../architecture.yaml | You are adding an import and need the declared component edges for this package |
../flow-corpus/README.md | You are reaching for a corpus primitive and need to know what already exists |
../coverage-floors.yaml | A coverage number is in your diff and you need to know which anchors must agree |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

