agentleFS
hermes-labs-aihermes-labs-ai/hermeneutic/AGENTS.md

hermeneutic

AGENTS.md9 starsChanged 3 months agoApache-2.0View on GitHub

This file is for AI coding agents and host applications that want to call the standalone hermeneutic CLI or Python library. Apply these priorities in order when using or extending the package: 1. Honor the user's requested scope and protect private correction data. 2. Preserve the deterministic, zero-LLM gate and its existing English behavior. Language adapters map vocabulary into that gate; synthetic fixtures cannot establish real-language coverage or authorize a change to canonical rules. 3. Validate the requested behavior in…

  • Installs packages
  • 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 35,337 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 repository4 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run hermeneutic gate on any assistant draft *before* you send it to the user when:

    line 39
  2. Distinctive:

    Add the missing evidence (run the verification commands, paste the output).

    line 52
  3. Distinctive:

    Not a model evaluator. Scores individual drafts, not aggregate quality.

    line 105
  4. Distinctive:

    Not foresight. Catches drift modes seen before.

    line 106
  5. Distinctive:

    Not a replacement for human review.

    line 107
  6. Distinctive:

    Not proof that a caller's external Router backends or repair behavior are safe.

    line 114

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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 — using hermeneutic from a coding agent

This file is for AI coding agents and host applications that want to call the standalone hermeneutic CLI or Python library.

Priority order

Apply these priorities in order when using or extending the package:

  1. Honor the user's requested scope and protect private correction data.
  2. Preserve the deterministic, zero-LLM gate and its existing English behavior. Language adapters map vocabulary into that gate; synthetic fixtures cannot establish real-language coverage or authorize a change to canonical rules.
  3. Validate the requested behavior in the owning checkout before claiming it works. Report tests, host-adapter mechanics, and live delivery separately.

What this tool does

Hermeneutic preserves correction episodes and scoped lessons for later agent tasks. By default, learn derives a source-verbatim candidate and task cue from the original episode; inspect it with lessons and activate it with confirm. An explicit user/host interpretation is optional. context retrieves bounded, attributed candidate context from task cues and an exact scope. Check applicability and current instructions before acting. revoke disables a lesson. These commands do not infer a lesson with a hidden model, install a hook, or rewrite a prompt automatically. Keep stores private and paths explicit.

The separate output plane is a fixed deterministic English draft check. It flags eight surface shapes including completion overclaiming, relayed authority, unhedged certainty, scope expansion, and unsupported quality adjectives. It does not read the personal correction corpus or run the optional Router.

The host-neutral workflow is: retrieve attributed context, check its scope, perform the task, then optionally check the output with gate --json or check_draft. A clean gate result is not evidence of successful lesson transfer.

When to invoke it

Run hermeneutic gate on any assistant draft before you send it to the user when:

  • The draft contains numeric claims (file counts, test counts, percentages, ms).
  • The draft summarizes work completed by a subagent.
  • The draft uses completion language ("done", "shipped", "all green").
  • The draft contains universal quantifiers ("every", "all", "always").
  • You want a cheap second-opinion gate that doesn't require an LLM call.

Inspect the printed verdict as well as the exit code: low-severity RISK is advisory and exits 0; raw English medium/high RISK exits 1. Mapped-language findings remain advisory even at medium/high severity and exit 0. A caller that chooses to hold a draft should either:

  1. Add the missing evidence (run the verification commands, paste the output).
  2. Hedge the claim ("appears to" / "based on N samples").
  3. Cut the unverifiable text.

Programmatic use

from hermeneutic import Router, PressureProbe

probe = PressureProbe(judge=your_llm_call)  # callable: prompt -> str

def repair(request, draft, reason):
    return your_llm_call(f"Revise: {reason}\n\n{draft}")

router = Router(probe=probe, repairer=repair)
result = router.gate(request=user_request, draft=your_draft)
if result.repaired:
    log(f"hermeneutic caught drift: {result.summary()}")
final = result.final_output

Calibration

PressureProbe ships with a generic "rigorous-skeptic" calibration. To make it match your team's standards, pass your own calibration text:

my_calibration = """
You are reviewing drafts for a security-critical product.
Bias toward HOLD when:
- Any security claim lacks a CVE or vendor-confirmed citation.
- Code changes touch authentication or crypto without a test diff.
"""
probe = PressureProbe(judge=your_llm_call, calibration=my_calibration)

Mining your own logs

Mine your own chat logs to build a personal corpus and look for candidate drift modes:

hermeneutic mine ~/your/log/dir --format claude-code --out triples.jsonl
hermeneutic bucket triples.jsonl

Mining does not change the gate. A developer may deliberately add a new pattern to src/hermeneutic/gates/regex.py only with evidence, tests, review, and a new release. The personal corpus can affect optional compile retrieval after compile-index is rerun.

What this tool is NOT

  • Not a model evaluator. Scores individual drafts, not aggregate quality.
  • Not foresight. Catches drift modes seen before; novel drifts pass through.
  • Not a replacement for human review. It's a floor-raiser.
  • Multilingual support is experimental trigger mapping into the fixed English rules. Use hermeneutic gate --lang auto or an explicit language code; mapped findings are advisory in shipped consumers; raw English findings keep their existing enforcement even in mixed-language drafts. Diagnostic severity does not imply automatic rejection. Synthetic fixture results do not establish real-language coverage. See evals/production-languages/ for deployment evidence.
  • Not proof that a caller's external Router backends or repair behavior are safe.

Working on this repository

Key paths: src/hermeneutic/ (package source), tests/ (pytest suite), scripts/smoke-installed-cli.sh (post-install CLI smoke test), evals/ (committed receipts that numeric claims must trace to).

python3 -m pip install -e ".[dev]"
ruff check src tests
python3 -m pytest -ra
python3 -m build
python3 -m pip install --force-reinstall dist/*.whl
bash scripts/smoke-installed-cli.sh

Definition of done: ruff check src tests and pytest -ra pass; every behavior change has a test; numeric claims in docs trace to a committed evals/ receipt; no existing gate rule was loosened to silence a false positive without mined evidence. See CLAUDE.md for the full agent protocol.

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.