Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/crockpotveggies/execlaw/agents-mdgit clone --depth 1 https://github.com/crockpotveggies/execlawWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/crockpotveggies/execlaw/agents-md)<a href="https://agentmods.dev/instructions/crockpotveggies/execlaw/agents-md"><img src="https://agentmods.dev/badge/instructions/crockpotveggies/execlaw/agents-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.04210 | $0.04210 |
| Opus 5 | $0.02105 | $0.02105 |
| Sonnet 5 | $0.00842 | $0.00842 |
| Haiku 4.5 | $0.00421 | $0.00421 |
Grade C, and why
execlaw AGENTS.md scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
unreadable). Don't `rm -rf ~/.execlaw/` without explicit user Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -X DELETE "http://127.0.0.1:3031/api/admin/plugins/<id>" \ How it starts
The opening of the file, as written. The whole thing — 388 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Guide for AI coding agents (Claude Code, Cursor, Aider, etc.) working on this repo. The product itself is also a coding-capable agent platform — this doc is about agents editing execlaw, not agents running on execlaw.
If you are an agent and you have not yet read docs/architecture.md,
do that first. The rest of this file assumes you've internalised the
12 design principles in §2 of that doc.
1. What this codebase is
execlaw is a self-hosted Rust agent framework. Single-operator, runs on the operator's hardware, no cloud LLMs ever. It's built around three load-bearing abstractions:
- An append-only event log (SQLite, optionally SQLCipher-encrypted).
Every action is a row in
state_events; replay reconstructs state. - A plugin framework that loads ZIP bundles at runtime — manifest declares tools, sidecars, transports, identity providers, OAuth clients, webhook routes. Two runtime tiers: script (Rhai) and subprocess (JSON-RPC).
- A trust ladder + Rule of Two policy gate that decides which tools the agent can call given the principal's trust class and the turn's sensitivity.
The Rust workspace lives in crates/. The SPA lives in web/.
First-party plugins live in plugins/. Documentation lives in
docs/ (architecture, agent-model, plugins, sidecar-supervisor,
runner-design, voice-followups). Inline source comments still
cite MIGRATION_PLAN.md §X for historical rationale; the file
itself was retired once its content was distributed across the
in-tree docs.
2. Non-negotiable rules
These are axioms. Violating any of them will require a re-do.
- No cloud LLMs. Anthropic, OpenAI, Gemini, Mistral cloud — none of them, on any code path, ever. Inference happens against a local OpenAI-compatible endpoint (vLLM / OpenArc / similar). If a feature seems to require a cloud LLM, the answer is "design it differently or don't ship it."
- Plugins, not hardcoded built-ins. If a host crate references a
specific plugin id by name in production code (e.g.
if plugin_id == "signal"), that's a leak. The host knows about plugins only through manifest-declared surfaces (registry lookups, capability gates). Test fixtures and doc-comment examples are fine. - SQLite is the source of truth. No environment variables for
configuration, no
.envfiles, no shared TOML/YAML in/etc. Operator-editable config lives inconfig_*tables; secrets live in the SQLCipher vault keyed by an OS-keyring master key. - Effects go through the outbox. The LLM never makes external HTTP
calls directly. It emits a
tool_useevent; the host enqueues astate_outboxrow with a framework-minted idempotency key; a separate relay drains it. tool_useandtool_resultalways pair in the same commit. Enforced byEventLog::commit_turn::enforce_tool_pairing(). If a turn fails mid-tool, a synthetic cancellationtool_resultmust be committed alongside.- Tests are mandatory for non-trivial code. Per the project's
axiom #13, every non-trivial function, every invariant, every public
API has tests. Security-critical code has adversarial tests.
cargo test --workspacemust pass before any commit. - Performance regressions are blocked by Criterion benchmarks. Per axiom #14, hot paths have benchmarks with explicit budgets. Don't claim a speedup without numbers.
- Never create commits without explicit human approval. A user asking you to fix a bug is not the same as authorising a commit. Wait for "commit", "push", or equivalent before invoking git.
- Never push to
main/master. The active branch isfoundation. Force-pushing to anything other than your own ad-hoc branch requires explicit user permission.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 388 lines · 4,210 tokens per session scan C 446f717781a9
execlaw AGENTS.md is an instructions file published in the GitHub repository crockpotveggies/execlaw (5 stars, last pushed 24d ago), licensed Apache-2.0. It adds 4,210 tokens to every session, about $0.0210 per session on Opus 5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.