menhir AGENTS.md

Repository-wide instructions for the Menhir project, covering how an AI coding agent should explore, modify, and verify the code. AGENTS.md is a convention for storing instructions that apply to work in a repository.

In plain words
What is it for?
It is for guiding Menhir development tasks, including code exploration, implementation, structural checks, workflow planning, and verification.
Why use it?
It gives the agent project-specific rules, such as where to start, how to handle architecture, and how to preserve unrelated changes.

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/archolith/menhir/agents-md
Clone the repo
git clone --depth 1 https://github.com/Archolith/menhir

Made for: Codex, OpenCode.

Per session 395 This file is loaded in full into every session.
When invoked 395 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.00395 $0.00395
Opus 5 $0.00198 $0.00198
Sonnet 5 $0.00079 $0.00079
Haiku 4.5 $0.00040 $0.00040

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

Security

Grade A, and why

menhir 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 2d 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 · 35 lines

What it actually says

Menhir agent instructions

These instructions apply to the entire repository.

Start here

  1. Read .agent/README.md. It is a router; do not preload all of .agent/.
  2. Follow the task-specific route it names. Read large architecture, data-model, endpoint, or memory-design references only when the task requires them.
  3. Before code exploration, confirm Menhir appears in query_structure(query_type="projects"). Use structural queries before filesystem search, and check blast_radius once per file before editing.
  4. Verify the repository root, current branch, and worktree status. Preserve unrelated changes and stage files explicitly.

Implementation rules

  • Python 3.12+, builtin generics, explicit public return types, and small composable modules.
  • Keep external LLM, embedding, Neo4j, and auth configuration in environment variables. Never commit or record secrets.
  • Extend the canonical backend/runtime and MCP contracts instead of creating parallel paths.
  • Treat stale structural anchors and incomplete indexes as inconclusive until current code is checked.
  • Use .agent/workflows/feature_planning.md before a semi-large or cross-cutting change.
  • Use .agent/workflows/code_conventions.md for code style and .agent/maintenance.md for changelog and closeout requirements.

Verification

  • Prefer focused tests from query_structure(query_type="affected_tests").
  • Routine safe suite: pytest tests/ -m unit -q (serial; do not use -n auto on the maintainer machine).
  • Live Neo4j/LLM tests require explicit opt-in and the documented environment.
  • Report commands actually run and distinguish failures from tests that were not run.

For instructions that consumer agents can copy into repositories using Menhir, see docs/templates/AGENTS.menhir.md and docs/agent-usage.md.

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. 2d ago First seen · 35 lines · 395 tokens per session scan A 39ca9cbca274

Subscribe to this mod's changes

menhir AGENTS.md is an instructions file published in the GitHub repository Archolith/menhir (2 stars, last pushed 3d ago), licensed Apache-2.0. It adds 395 tokens to every session, about $0.0020 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.