agentleFS
jonashertnerjonashertner/opencaselaw/AGENTS.md

opencaselaw

AGENTS.md82 starsChanged 3 months agoMITView on GitHub

OpenCaseLaw is a production Swiss legal corpus and public API. Treat this repo as live legal infrastructure: favor evidence, small reversible changes, and explicit escalation over broad autonomous edits. Before non-trivial maintenance work, read: 1. CLAUDE.md 2. ~/.claude/projects/-Users-jonashertner-caselaw-repo-1/memory/MEMORY.md 3. Relevant memory topic files from that index 4. TECHNICAL_OVERVIEW.txt 5. The private maintenance log under OPENCASELAW_PRIVATE_ROOT when set; otherwise maintenance scripts resolve opencaselaw-internal beside the primary checkout (including when invoked from a linked worktree) Verify memory claims against current code, logs,…

  • Reads credentials
  • 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 33,398 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 repository2 other files it gives its agents.

The file

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

7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before non-trivial maintenance work, read:

    line 9
  2. Distinctive:

    Verify memory claims against current code, logs, or production probes before using them as ground truth.

    line 19
  3. Very specific:

    Never add write paths to live decisions.db, reference_graph.db, or decision_structure.db.

    line 25
  4. Very specific:

    All FTS5 user input must pass through _sanitize_fts5.

    line 29
  5. Distinctive:

    Do not construct legal citation strings or direct quotations yourself.

    line 30
  6. Very specific:

    Never read or print secrets from .env*, crontab, systemd environment files, or production config.

    line 35
  7. Very specific:

    Use ops/autonomy-policy.json and scripts/agent_safe_deploy.py as the mechanical deployment guard.

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 43,423 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 - OpenCaseLaw Codex Guidance

OpenCaseLaw is a production Swiss legal corpus and public API. Treat this repo as live legal infrastructure: favor evidence, small reversible changes, and explicit escalation over broad autonomous edits.

Bootstrap

Before non-trivial maintenance work, read:

  1. CLAUDE.md
  2. ~/.claude/projects/-Users-jonashertner-caselaw-repo-1/memory/MEMORY.md
  3. Relevant memory topic files from that index
  4. TECHNICAL_OVERVIEW.txt
  5. The private maintenance log under OPENCASELAW_PRIVATE_ROOT when set; otherwise maintenance scripts resolve opencaselaw-internal beside the primary checkout (including when invoked from a linked worktree)

Verify memory claims against current code, logs, or production probes before using them as ground truth.

Hard Rules

  • Production read DBs must be opened mode=ro&immutable=1.
  • Never add write paths to live decisions.db, reference_graph.db, or decision_structure.db.
  • Preserve atomic-swap rebuild behavior; do not replace it with in-place DB writes or naive copies.
  • All FTS5 user input must pass through _sanitize_fts5.
  • Do not construct legal citation strings or direct quotations yourself. Use the project citation and verbatim-text sources.
  • New scraper data paths must use official sources, not entscheidsuche. Retire es_* feeds only after verified direct parity and no coverage loss.
  • Tests stay offline unless a target explicitly says it is a live check.
  • Never read or print secrets from .env*, crontab, systemd environment files, or production config.

Autonomous Boundary

Autonomous Codex work may measure, document, improve read-only monitoring, add offline tests, and make small non-gated fixes after verification.

In autonomous mode, stop at a proposal for changes touching:

  • publish.py, build_fts5.py, DB schemas, base_scraper.py
  • new scrapers or material scraper behavior changes
  • QC blocking behavior
  • state/**, production output DBs, billing, secrets, backup destinations, systemd deployment behavior, or paid resources

Use ops/autonomy-policy.json and scripts/agent_safe_deploy.py as the mechanical deployment guard. No commit, push, or deploy without explicit user approval plus passing make test and make verify-offline.

Maintenance Skill

For maintenance-loop, production-health, scraper-health, completeness, backup, deploy-safety, or Codex automation tasks, use the repo skill:

$opencaselaw-maintenance

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.