agentleFS
roli-lpciroli-lpci/rule-audit/llms.txt

rule-audit

llms.txt3 starsChanged 3 months agoApache-2.0View on GitHub

Static analyzer for LLM system prompts. Parses a prompt into normative rules and reports logical contradictions, coverage gaps, priority ambiguities, meta-rule paradoxes, and absolute-rule edge cases. Pure Python, zero LLM dependency, deterministic. Part of the Hermes Labs reliability stack. rule-audit is, roughly, a linter for AI system prompts. Given a raw prompt string, it extracts normative rules, classifies their modality (MUST / MUST_NOT / SHOULD / MAY), scores absoluteness, and finds pairs that conflict. For each finding it renders a…

  • Installs packages

The file

We split this llms.txt into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is 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.

  • 1

    Very specific

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

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

    Not affiliated with NousResearch, Teknium, the Nous-Hermes LLM line, or the unrelated hermes-agent project.

    line 48

≈ “Common” is an estimate: at least 1 in 5 of the 1,484 llms.txt 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
llms.txt
# Owner: Hermes Labs - https://hermes-labs.ai

# rule-audit

> Static analyzer for LLM system prompts. Parses a prompt into normative rules and reports logical contradictions, coverage gaps, priority ambiguities, meta-rule paradoxes, and absolute-rule edge cases. Pure Python, zero LLM dependency, deterministic. Part of the Hermes Labs reliability stack.

rule-audit is, roughly, a linter for AI system prompts. Given a raw prompt string, it extracts normative rules, classifies their modality (MUST / MUST_NOT / SHOULD / MAY), scores absoluteness, and finds pairs that conflict. For each finding it renders a concrete example scenario with a suggested attack vector and mitigation — illustrative starting points for testing, not verified exploits. No API keys, no network, no LLM calls.

Install: `pip install rule-audit`. Python 3.9+. Apache-2.0 licensed.

## Docs

- [README](README.md): Install, quickstart, CLI and Python API usage, architecture overview.
- [SPEC](SPEC.md): Full technical spec — parsing algorithm, contradiction detection methodology, severity calibration, data model, performance characteristics, known limitations.
- [ROADMAP](ROADMAP.md): planned work — see the file for current status.
- [CLAUDE](.claude/CLAUDE.md): Project conventions for AI agents editing this repo.
- [AGENTS](AGENTS.md): Public API surface, extension points (`_KEYWORD_CLUSTERS`, detector functions), conventions, don'ts.
- [CHANGELOG](CHANGELOG.md): Release history.
- [CONTRIBUTING](CONTRIBUTING.md): How to add detectors, clusters, severity rules. Tests required.

## Examples

- [samples/basic_assistant.txt](samples/basic_assistant.txt): Minimal helpful-assistant prompt with built-in contradictions.
- [samples/code_assistant.txt](samples/code_assistant.txt): Code-assistant system prompt with permission/refusal conflicts.
- [samples/content_moderator.txt](samples/content_moderator.txt): Moderation prompt with absolute-vs-nuanced tensions.
- [samples/customer_support.txt](samples/customer_support.txt): Support prompt with policy-vs-empathy ambiguity.
- [samples/enterprise_rag.txt](samples/enterprise_rag.txt): RAG-based enterprise prompt with retrieval-scope conflicts.
- [benchmarks/README](benchmarks/README.md): Per-sample finding counts and how to reproduce them; the regression gate lives in `tests/test_benchmark.py`.

## Related

- [hermes-jailbench](https://github.com/hermes-labs-ai/hermes-jailbench): Dynamic jailbreak regression suite — complements rule-audit's static analysis with live-endpoint testing.
- [colony-probe](https://github.com/hermes-labs-ai/colony-probe): Prompt-confidentiality audit (system-prompt reconstruction via multi-turn probing).
- [lintlang](https://github.com/hermes-labs-ai/lintlang): Static linter for agent configs and tool descriptions — complementary to rule-audit (structure vs logical content).
- [Hermes Labs](https://hermes-labs.ai): AI reliability tooling.

## Optional

- [LICENSE](LICENSE): Apache-2.0.
- [SECURITY](SECURITY.md): Responsible disclosure — security@hermes-labs.ai.
- [CITATION](CITATION.cff): How to cite.


## About Hermes Labs

Hermes Labs is an agentic infrastructure company building the reliability layer for autonomous systems. More at [hermes-labs.ai](https://hermes-labs.ai).

Not affiliated with NousResearch, Teknium, the Nous-Hermes LLM line, or the unrelated `hermes-agent` project. Different companies, different work.

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.