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.
- docs/llms.txtllms.txt
- opencaselaw-maintenanceSkill
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
- Distinctive: line 9
Before non-trivial maintenance work, read:
- Distinctive: line 19
Verify memory claims against current code, logs, or production probes before using them as ground truth.
- Very specific: line 25
Never add write paths to live decisions.db, reference_graph.db, or decision_structure.db.
- Very specific: line 29
All FTS5 user input must pass through _sanitize_fts5.
- Distinctive: line 30
Do not construct legal citation strings or direct quotations yourself.
- Very specific: line 35
Never read or print secrets from .env*, crontab, systemd environment files, or production config.
- Very specific: line 51
Use ops/autonomy-policy.json and scripts/agent_safe_deploy.py as the mechanical deployment guard.
≈ “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.
Files
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:
CLAUDE.md~/.claude/projects/-Users-jonashertner-caselaw-repo-1/memory/MEMORY.md- Relevant memory topic files from that index
TECHNICAL_OVERVIEW.txt- The private maintenance log under
OPENCASELAW_PRIVATE_ROOTwhen set; otherwise maintenance scripts resolveopencaselaw-internalbeside 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, ordecision_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
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.

