CodeStory AGENTS.md

Project instructions for CodeStory, including its ownership rules, setup process, product requirements, and configuration guidance.

In plain words
What is it for?
Use them when setting up a worktree, changing setup scripts, checking repository readiness, planning edits, selecting tests, or reviewing CodeStory changes.
Why use it?
They help agents establish the repository's current state and avoid conflicting work or changes that break the project's required behavior.

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/thegreencedar/codestory/agents-md
Clone the repo
git clone --depth 1 https://github.com/TheGreenCedar/CodeStory

Made for: Codex, OpenCode.

Per session 5,498 This file is loaded in full into every session.
When invoked 5,498 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.05498 $0.05498
Opus 5 $0.02749 $0.02749
Sonnet 5 $0.01100 $0.01100
Haiku 4.5 $0.00550 $0.00550

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

Security

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.

AGENTS.md · 402 lines

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.mjs for 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 project root. 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, and docs/contributors/testing-matrix.md before 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 on codestory-contracts alone and reads pinned runtime state only through the PinnedReader trait, 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 in codestory-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.

Read the full file on GitHub · 402 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 · 402 lines · 5,498 tokens per session scan A 9013f5946ca2

Subscribe to this mod's changes

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.

Related

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.

Luqueee/kivgraph · 9,652 tokens

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.

nimelkot/astra · 52 tokens

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

adder-factory/cartograph · 3,990 tokens

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.

Luqueee/kivgraph · 3 tokens

repobrain copilot-instructions.md

Copilot instructions for study8677/repobrain, covering github copilot bootstrap instructions and hard rule — query the repobrain hub first.

study8677/repobrain · 229 tokens

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

Cranot/roam-code · 14,242 tokens