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/thegreencedar/codestory/agents-mdgit clone --depth 1 https://github.com/TheGreenCedar/CodeStoryWhat 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.05498 | $0.05498 |
| Opus 5 | $0.02749 | $0.02749 |
| Sonnet 5 | $0.01100 | $0.01100 |
| Haiku 4.5 | $0.00550 | $0.00550 |
Grade A, and why
CodeStory 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 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.
How it starts
The opening of the file, as written. The whole thing — 402 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CodeStory Agent Guide
Audience: agents and contributors changing CodeStory. This file contains the decisions that must remain visible while working; generated help, architecture pages, runbooks, and workflows own detailed mechanics.
Start Here
- Establish current truth before choosing work: inspect the current branch and
integration head, active worktrees, open PR or issue ownership, and the
release state. Do not reuse an active lane or implement routine work directly
on
dev/codestory-next. - Run
node scripts/codex-worktree-setup.mjsfor a delegated worktree. Treat its printed base, child head, PR head, and proof target as authoritative before cache repair, readiness work, or verification. When changing setup, keep the PowerShell and POSIX implementations behaviorally aligned and run the setup self-tests from the testing matrix. - Before source claims, planning edits, choosing tests, or reviewing changes,
use the canonical CodeStory grounding skill when its MCP tools are visible.
Every MCP call must carry the target repository's absolute
projectroot. Call the tool that matches the task directly; tool gating owns readiness and managed preparation. Read status only after a call fails to converge. If the MCP tools are not visible, use ordinary source inspection and report the visibility gap. CLI diagnostics do not prove that the packaged plugin MCP is live in the agent host. - For a large change, read
docs/architecture/overview.md, the owning subsystem page,docs/contributors/debugging.md, anddocs/contributors/testing-matrix.mdbefore editing.
Ownership Boundaries
codestory-contracts: shared DTOs, graph types, events, grounding and trail contracts.codestory-workspace: project discovery, inventories, refresh planning, and repository/project identity.codestory-indexer: parsing, extraction, intermediate projections, and semantic resolution.codestory-store: SQLite source of truth, snapshots, projections, and core publication.codestory-retrieval: lexical, semantic, and SCIP artifacts; immutable sidecar generations; manifests; health; and fail-closed query execution.codestory-agent: packet planning only -- prompt terms, flow requirements, evidence roles and carriers, citation scoring, and the query plan. It depends oncodestory-contractsalone and reads pinned runtime state only through thePinnedReadertrait, so it can never activate, store, execute retrieval, retry a publication, or move readiness.codestory-runtime: the only product orchestration layer. Indexing, grounding, search, packet assembly, and retrieval execution belong here. Packet planning belongs incodestory-agent.codestory-cli: command and transport parsing, output rendering, process configuration capture, and managed sidecar lifecycle boundaries. Do not move product orchestration into adapters.plugins/codestory: host hooks, the packaged launcher, MCP routing, and the canonical agent skill. Plugin routing selects a project per request and reaches product behavior through the version-matched CLI.codestory-bench: measurement and benchmark support only; it does not own product contracts.
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.
- yesterday First seen · 402 lines · 5,498 tokens per session scan A 9013f5946ca2
CodeStory AGENTS.md is an instructions file published in the GitHub repository TheGreenCedar/CodeStory (37 stars, last pushed yesterday), licensed Apache-2.0. It adds 5,498 tokens to every session, about $0.0275 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-30.
Other instructions, from other repositories
kivgraph AGENTS.md
Instructions for Luqueee/kivgraph, covering instrucciones de desarrollo de kivgraph, mapa de instrucciones, identidad del proyecto, qué pregunta contesta cada tool de kivgraph and la puerta delante de grep.
astra copilot-instructions.md
Copilot instructions for nimelkot/astra: Astra uses the official MCP Python SDK and targets Python 3.10+. The MCP server is stdio-based and exposes the same core services as the CLI.
cartograph AGENTS.md
Instructions for adder-factory/cartograph, covering existing project rule, architecture and hard requirements, step 0 — install the binary, step 1 — choose database ownership and managed local database (macos/linux).
kivgraph CLAUDE.md
Instructions for Luqueee/kivgraph, a project described as: A local MCP server for cross-repository semantic code intelligence in TypeScript and Go, backed by a persistent LadybugDB graph.
repobrain copilot-instructions.md
Copilot instructions for study8677/repobrain, covering github copilot bootstrap instructions and hard rule — query the repobrain hub first.
roam-code AGENTS.md
Instructions for Cranot/roam-code, covering agents.md — roam-code development guide, what this project is, documentation hub, where files go (private vs public) and quality discipline (from internal/dogfood/ + agi-in-md).