execlaw: Instructions file for Codex

AGENTS.md

execlaw AGENTS.md is an instructions file for Codex, OpenCode from crockpotveggies/execlaw. It costs 4,210 tokens per session, scanned C, original, Apache-2.0.

A repository guide for AI coding agents working on execlaw, a self-hosted Rust framework for building and running agents on the operator’s own hardware. It explains the codebase, its rules, structure, and design.

In plain words
What is it for?
Use it when editing execlaw: first learn how the Rust workspace and web app are organised, then follow the project’s architecture, plugin, event-log, and tool-access rules.
Why use it?
It gives an agent the project context and non-negotiable rules before it changes code. This reduces the risk of edits that conflict with the system’s architecture or security model.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions subagents; mentions Claude Code; mentions AGENTS.md.

This is crockpotveggies/execlaw's own configuration. It tells Codex and OpenCode how to work on execlaw itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything execlaw configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is -DestinationPath ../../dist/<id>-<version>.zip -Force".

Reuse

Borrowing it

Nothing to install: this file belongs to crockpotveggies/execlaw. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/crockpotveggies/execlaw/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/crockpotveggies/execlaw

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for execlaw AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/crockpotveggies/execlaw/agents-md/github.svg)](https://agentmods.dev/instructions/crockpotveggies/execlaw/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/crockpotveggies/execlaw/agents-md"><img src="https://agentmods.dev/badge/instructions/crockpotveggies/execlaw/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for execlaw AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/crockpotveggies/execlaw/agents-md"><img src="https://agentmods.dev/badge/instructions/crockpotveggies/execlaw/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,210 This file is loaded in full into every session.
When invoked 4,210 The same file — it is already loaded in full.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.04210 $0.04210
Opus 5.5 $0.01684 $0.01684
Sonnet 5.5 $0.00842 $0.00842
Haiku 4.5 $0.00421 $0.00421

Measured 2mo ago against content hash 446f717781a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 2mo 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>" \
AGENTS.md · 388 lines

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:

  1. An append-only event log (SQLite, optionally SQLCipher-encrypted). Every action is a row in state_events; replay reconstructs state.
  2. 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).
  3. 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.

  1. 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."
  2. 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.
  3. SQLite is the source of truth. No environment variables for configuration, no .env files, no shared TOML/YAML in /etc. Operator-editable config lives in config_* tables; secrets live in the SQLCipher vault keyed by an OS-keyring master key.
  4. Effects go through the outbox. The LLM never makes external HTTP calls directly. It emits a tool_use event; the host enqueues a state_outbox row with a framework-minted idempotency key; a separate relay drains it.
  5. tool_use and tool_result always pair in the same commit. Enforced by EventLog::commit_turn::enforce_tool_pairing(). If a turn fails mid-tool, a synthetic cancellation tool_result must be committed alongside.
  6. 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 --workspace must pass before any commit.
  7. Performance regressions are blocked by Criterion benchmarks. Per axiom #14, hot paths have benchmarks with explicit budgets. Don't claim a speedup without numbers.
  8. 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.
  9. Never push to main/master. The active branch is foundation. Force-pushing to anything other than your own ad-hoc branch requires explicit user permission.

Read the full file on GitHub · 388 lines

Changes

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.

  1. 2mo ago First seen · 388 lines · 4,210 tokens per session scan C 446f717781a9

Subscribe to this mod's changes

execlaw AGENTS.md is an instructions file published in the GitHub repository crockpotveggies/execlaw (5 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 4,210 tokens to every session, about $0.0168 per session on Opus 5.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.

Related

execlaw AGENTS.md compared with instructions from other repositories

execlaw AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
execlaw AGENTS.mdcrockpotveggies/execlawInstructions file52mo agoApache-2.0C4,210Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode