speclaw AGENTS.md

speclaw AGENTS.md is an instructions file for Codex, OpenCode from esneiderbravo/speclaw. It costs 2,660 tokens per session, scanned A, original, MIT.

Repository instructions for AI coding agents working on the Speclaw project. They describe the project, its rules, required documents, and how its code is organised.

In plain words
What is it for?
Use them when working in Speclaw to understand its MCP suite, command-line tool, code graph, specification workflow, mandatory reading order, and required code-navigation process.
Why use it?
They give agents a shared set of project-specific rules, reducing the risk of making changes that conflict with the repository's standards.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/esneiderbravo/speclaw/agents-md
Clone the repo
git clone --depth 1 https://github.com/esneiderbravo/speclaw

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 speclaw AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/esneiderbravo/speclaw/agents-md.svg)](https://agentmods.dev/instructions/esneiderbravo/speclaw/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/esneiderbravo/speclaw/agents-md"><img src="https://agentmods.dev/badge/instructions/esneiderbravo/speclaw/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,660 This file is loaded in full into every session.
When invoked 2,660 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.02660 $0.02660
Opus 5 $0.01330 $0.01330
Sonnet 5 $0.00532 $0.00532
Haiku 4.5 $0.00266 $0.00266

Measured 5d ago against content hash 63dc1f3876b1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

speclaw AGENTS.md scanned grade A with 0 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 5d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md — speclaw

Operating contract for every AI agent (Claude Code, Cursor, Codex, or any other) working in this repository. These rules are STRICT and non-negotiable. Claude-specific notes: CLAUDE.md. The law: LAWS.md.

Project

  • What it is: a self-contained MCP suite + CLI that turns any repo into a spec-driven, agent-ready project — its own constitution (Foundation), local code graph (Compass), and spec-driven workflow (Lawbook). 100% local: no LLM, no cloud, no API keys.
  • Organization: Esneider Bravo · open source (MIT)
  • Stack: TypeScript (ES2022, ESM, Node16 resolution) on Node.js ≥22.16 · MCP server (@modelcontextprotocol/sdk) + Clack CLI · tree-sitter (WASM) parsing · node:sqlite code graph · Zod schemas. No frontend, no service, no LLM.

Mandatory operating rules

  1. Read LAWS.md first. It is the constitution; it binds the standards below. Open the standard that governs your change before making it. Conflicts resolve in favor of the standard; amendments go through a spec change, never silent deviation.
  2. Compass first, always — for any code question call compass_explore / compass_find / compass_explore before any grep/sed/cat/Read, including files you already know by name. Fall back to manual file tools only after Compass returns nothing useful, the graph is missing (compass_index first), or the target isn't indexed code (stylesheets, config, logs). compass_impact is grouped by module (format: flat escape hatch); prefer compass_affected_tests / speclaw affected-tests --from-diff over the full suite. compass_hotspots / speclaw hotspots ranks activity × AST health (default 90 days); compass_coupling / speclaw coupling reports Jaccard strength, in_graph, and isTestPair. Schema 9 (embedding_cache, Merkle dir_hashes, node_metrics) — reindex with speclaw index after a schema bump (8→9 migrates embeddings). Cheat sheet: docs/compass.md.
  3. Follow the lawbook workflow for every non-trivial change; archive within the same PR. Artifact volume follows the confirmed ceremony level in change.json (0=quick … 3=full); missing change.json is level 3. Propose, set, or promote with lawbook_level / speclaw lawbook level; level 0 via speclaw quick. Bugs: speclaw lawbook draft --bug, bugfix.md (repro + regression + prevention), changeType: bug; RCA first with lawbook_investigate / the investigate skill. Feature ceremony unchanged; security-withheld mode is not shipped. Rules: docs/standards/lawbook.md. Coverage: speclaw coverage / lawbook_coverage (ids like req~name~1, // Covers: comments). Drift: speclaw drift / lawbook_drift (committed lawbook/anchors/*.json, dual body/norm hashes).
  4. Run the quality gates yourself before declaring anything done — see docs/standards/testing-standards.md:
    • Lint + format: npm run check (Prettier --check + ESLint); npm run format to fix
    • Type-check + compile: npm run build (strict tsc + asset copy)
    • Tests: no unit-test runner yet — the gates above are the compile-time gates; add node:test coverage with new behavior, and verify runtime by exercising the CLI (e.g. node dist/cli/index.js …).
  5. Respect the conventions — branches <type>/<short-slug> (no ticket prefix), Conventional Commits (type(scope): imperative summary, English, lowercase), code that reads like its neighbors. See docs/standards/base-standards.md and docs/standards/conventions.md.
  6. Use the skills. ai-specs/ is the canonical home for skills, commands, and subagents, mirrored to each IDE directory via symlinks.
  7. Ask before irreversible or outward-facing actions — destructive commands; writing to a real data store (DB rows or files with real user data, including for tests — verify against an isolated/throwaway store); publishing reviews/tickets/comments.

Read the full file on GitHub · 168 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. 5d ago First seen · 168 lines · 2,660 tokens per session scan A 63dc1f3876b1

Subscribe to this mod's changes

speclaw AGENTS.md is an instructions file published in the GitHub repository esneiderbravo/speclaw (1 stars, last pushed 2d ago), licensed MIT. It adds 2,660 tokens to every session, about $0.0133 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

COG-second-brain CLAUDE.md

Instructions for huytieu/COG-second-brain, covering cog second brain — framework instructions, verification harness (opt-in, off by default), visual verification (always apply, ui/ux tasks), delegation cap (always apply) and model routing — always apply.

huytieu/COG-second-brain · 4,002 tokens

agentic-playwright skill-creator.instructions.md

Instructions for idavidov13/agentic-playwright, covering skill creator, communicating with the user, creating a skill, capture intent and interview and research.

idavidov13/agentic-playwright · 7,227 tokens

agentic-playwright debugging.instructions.md

Instructions for idavidov13/agentic-playwright, covering debugging, critical, capture defaults (this scaffold), built-in npm scripts for debugging and instructions.

idavidov13/agentic-playwright · 4,500 tokens

agentic-playwright ai-native-workflow.instructions.md

Instructions for idavidov13/agentic-playwright, covering ai-native workflow, critical, main workflow (8 phases), phase 4 — confidence-gate format (mandatory) and proposal.

idavidov13/agentic-playwright · 2,744 tokens

agentic-playwright data-strategy.instructions.md

Instructions for idavidov13/agentic-playwright, covering data strategy, critical, file locations, instructions and phase 1: classify the value you need.

idavidov13/agentic-playwright · 2,684 tokens

agentic-playwright helpers.instructions.md

Instructions for idavidov13/agentic-playwright, covering helpers, critical, file locations, instructions and phase 1: classify what you're adding.

idavidov13/agentic-playwright · 2,833 tokens