agentleFS
ianshankianshank/Agents/behavioral-regression/AGENTS.md

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,…

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
  1. Very specific:

    Offline and deterministic, byte for byte: No network, no wall clock, no unseeded randomness.

    line 68
  2. Very specific:

    No literal in the decision logic: Every threshold is a BRConfig field, overridable by construction or --set key=value, and configs …

    line 70

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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

PathRole
behavioral_regression/config.pyFrozen BRConfig — every threshold the gate reads
behavioral_regression/generator.py, judge.pySeeded synthetic v1/v2 pairs; the contested judge
behavioral_regression/oracle.pyJudge validation against human labels before it is trusted
behavioral_regression/detector.pyp(regression), intervals, and the "can't tell" bucket
behavioral_regression/canary.pyInjected known regression plus known null; separation check
behavioral_regression/gate.pydecide_ship — the fail-safe-to-escalate layering
behavioral_regression/pipeline.py, report.pyThe seven beats end to end; deterministic output
behavioral_regression/version.pySCHEMA_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 here

Rules that bite here

  • 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, but no flow_protocol import exists anywhere in the source. The real edges are agent_core and flow_corpus, which is exactly what architecture.yaml declares. 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 in eval_harness.judges and 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 BRConfig field, 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 from flow_corpus. A second local implementation drifts from the one the gate was calibrated on.

Verify

make -C behavioral-regression check

Subagents

Task in this directoryAgentWhy
Confirm whether a claimed dependency is actually importedexplorerRead-only Grep over the package; this is how the stale flow_protocol claim was caught
Run the gate and isolate a determinism or coverage failuretest-runnerHas Bash; a reproducibility break shows up as a diff, not a stack trace
Review a change to gate.py before pushingnarrow-criticA new branch that reaches SHIP instead of ESCALATE is invisible to the linters

See also

DocRead it when
README.mdYou need the seven-beat pipeline and the reused-symbol table
GAP_ANALYSIS.mdYou need to know whether something is built, seamed or deliberately absent
../docs/decisions/0006-behavioral-regression-detection.mdYou are changing what counts as a regression or how the estimate is formed
../architecture.yamlYou are adding an import and need the declared component edges for this package
../flow-corpus/README.mdYou are reaching for a corpus primitive and need to know what already exists
../coverage-floors.yamlA coverage number is in your diff and you need to know which anchors must agree

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.