RepoGrammar CLAUDE.md

Repository-specific instructions for Claude Code, including rules about authority, file locations, mirrored guides, architecture, and verification. They act as a working contract for agents editing the RepoGrammar codebase.

In plain words
What is it for?
Guiding agents before and after code changes, keeping source under src/, maintaining matching agent guides, and running the repository's guard and verification workflow.
Why use it?
They reduce accidental changes in the wrong directories, conflicting instruction files, unsynchronised guides, or code that skips the repository's required checks.

Instructions file

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/sioyooo/repogrammar/claude-md
Clone the repo
git clone --depth 1 https://github.com/SioYooo/RepoGrammar
Per session 1,978 This file is loaded in full into every session.
When invoked 1,978 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.01978 $0.01978
Opus 5 $0.00989 $0.00989
Sonnet 5 $0.00396 $0.00396
Haiku 4.5 $0.00198 $0.00198

Measured yesterday against content hash f1a42bff0e58, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

RepoGrammar CLAUDE.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 yesterday.

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.

Origin

This is a copy

100% identical to RepoGrammar AGENTS.md — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

CLAUDE.md · 86 lines

How it starts

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

Repository Agent Contract

Authority

  • This file and its mirror are the repository's compact, mandatory agent contract. They must remain byte-for-byte identical.
  • Read docs/README.md, then the relevant files under .agents/skills/, .agents/memories/, and docs/ before changing code.
  • After editing either mirrored guide, immediately run cargo run --quiet --bin repo-guard -- sync-agent-guides --from <edited-file>.
  • Do not create nested AGENTS.md, CLAUDE.md, override files, or competing instruction files without explicit maintainer approval.

Repository Boundaries

  • Put all source, executable, test, benchmark, migration-tool, fixture-source, and automation-tool code under src/.
  • Outside src/, only manifests, lockfiles, configuration, documentation, non-code assets, and generated build output are allowed.
  • Rust tests live beside modules under #[cfg(test)], in src/rust/integration_tests/, or in another documented path under src/.
  • Keep nontrivial CI and repository automation logic in src/rust/bin/repo_guard.rs; declarative workflow files may only invoke it.
  • Respect the module boundaries and dependency direction defined in docs/architecture/.

Change Discipline

  • Inspect repository status and existing instructions before editing. Preserve unrelated user changes.
  • Make the smallest coherent change. Do not perform unrelated refactors, broad formatting, dependency upgrades, or speculative rewrites.
  • For nontrivial implementation work, use parallel agent teams where independent slices exist. Assign disjoint ownership, preserve other agents' and users' edits, and integrate results only through the main session after review.
  • After implementation, inspect the changed code logic before accepting or merging agent-team output into the main session. Verify behavior with the required checks and resolve conflicts semantically, not by blindly choosing one side.
  • During active implementation, batch validation at coherent feature or workstream checkpoints instead of running tests after every small helper or subchange. Run early targeted tests only when they materially unblock diagnosis or protect high-risk behavior; final required checks still gate completion, commit, and merge.
  • Every code change must include corresponding tests and documentation changes in the same atomic commit.
  • Current v0.1 implementation planning is tracked in docs/plans/v0.1-parallel-development-plan.md, docs/plans/python-v0.1-implementation-plan.md, and durable memories under .agents/memories/. Update those plan/memory files whenever phase scope, Python v0.1 analysis, CodeGraph provider integration, or UNKNOWN policy changes.
  • Update normative requirements in docs/, reusable workflows in .agents/skills/, durable learned context in .agents/memories/, and only cross-cutting mandatory rules in this mirrored contract.
  • Never leave duplicated requirements inconsistent. Update the canonical document and every affected reference.

Read the full file on GitHub · 86 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. yesterday First seen · 86 lines · 1,978 tokens per session scan A f1a42bff0e58

Subscribe to this mod's changes

RepoGrammar CLAUDE.md is an instructions file published in the GitHub repository SioYooo/RepoGrammar (0 stars, last pushed 20d ago), licensed MIT. It adds 1,978 tokens to every session, about $0.0099 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to RepoGrammar AGENTS.md, differing in 0 lines, and is treated as a copy.

Related

Other instructions, from other repositories

open-design AGENTS.md

AGENTS.md instructions for nexu-io/open-design, covering directory guide, core documentation index, workspace directories, inactive or placeholder directories and development workflow.

nexu-io/open-design · 10,311 tokens

ORG2 AGENTS.md

AGENTS.md instructions for org2AI/ORG2, covering agents.md — agent skill routing for orgii, skill routing table, root-cause-first bug fixing, default delivery flow and ui copy conventions.

org2AI/ORG2 · 3,019 tokens

flameox AGENTS.md

Instructions for morluto/flameox, covering repository guidelines, product direction, project structure & module organization, build, test, and development commands and coding style & naming conventions.

morluto/flameox · 1,170 tokens

open-design CLAUDE.md

Claude Code instructions for nexu-io/open-design, a project described as: 🎨 Best DeepSeek Harness Design Plugin. The open-source Claude Design alternative. 🖥️ Local-first desktop app. 🖼️ Your coding agent becomes the design engine: prototypes, landing pages, dashboards, slides, images & video — real files…

nexu-io/open-design · 5 tokens

Agent-Memory-Bridge AGENTS.md

Instructions for zzhang82/Agent-Memory-Bridge, covering agent memory bridge contributor instructions, setup and checks, architecture boundaries, mutation and migration invariants and benchmark expectations.

zzhang82/Agent-Memory-Bridge · 1,089 tokens

dreamd AGENTS.md

Instructions for botzrDev/dreamd, covering agents.md — dreamd, what this repo builds, repository layout, build and test and architectural conventions — read before making changes.

botzrDev/dreamd · 15,040 tokens