index AGENTS.md

A set of instructions for developing Index, an early-stage software product. It explains the repository structure, development style, service layers, and rules for keeping changes small and direct.

In plain words
What is it for?
It helps agents locate API and protocol code, implement narrowly scoped requests, update callers, remove obsolete code, and follow the project's testing and release rules.
Why use it?
It prevents unnecessary abstractions, compatibility layers, refactors, and future-facing features that would make the code harder to change.

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

Made for: Codex, OpenCode.

Per session 3,125 This file is loaded in full into every session.
When invoked 3,125 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.03125 $0.03125
Opus 5 $0.01563 $0.01563
Sonnet 5 $0.00625 $0.00625
Haiku 4.5 $0.00313 $0.00313

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

Security

Grade A, and why

index 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 · 257 lines

How it starts

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

AGENTS.md

How we build

This is an early-stage product. Everything is provisional and can be rewritten as we learn. Keep the codebase small and direct.

  • Build the smallest thing that does what was asked. Use one code path. Do not add options, flags, fallbacks, configuration, or abstractions for a case that does not exist today. Do not handle unreachable states.
  • Every changed line traces to the request. No drive-by refactors, renames, reformatting, or incidental improvements. Mention a discovery briefly instead of fixing it without scope.
  • Change in place, do not layer. Rewrite the old behavior, update every caller in this repository, and delete what becomes dead, including tests. Do not add legacy*/v2 twins, adapters, deprecated re-exports, or compatibility paths.
  • Compatibility is optional. If preserving an old API, behavior, or data needs a migration, dual read, or parallel path, make the breaking change and state it in the PR. For public protocol changes, follow the release rules below.
  • Do not build for later. Record a future idea in one sentence and wait until it is requested. Prefer deleting unused code, tests, docs, and fixtures to retaining them just in case.

If the request appears to require substantially more, state why and deliver the smallest useful version.

Repository map and boundaries

This is a Bun monorepo. The table below is the whole architecture map; commands, conventions, and workflow appear later in this file. There is no docs/ directory. It was deleted on 2026-08-28 and is not being restored.

Path Responsibility
packages/protocol @indexnetwork/protocol: domain graphs, agents, tools, MCP server, and host interfaces. Published to npm and used by external integrators.
services/api Bun HTTP host and workers. Wires infrastructure (Drizzle/Postgres, Redis, OpenRouter) into the protocol.
apps/web Vite + React Router SPA. src/services/*.ts are typed API clients, not business logic.
apps/mac Swift WKWebView shell around a self-contained React bundle.
packages/cli, packages/claude-plugin, packages/hermes-plugin HTTP/MCP clients mirrored to public repositories. Their dependencies must be exact pins; run bun run check:subtree-parity when they change.

Read the full file on GitHub · 257 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. 2d ago First seen · 257 lines · 3,125 tokens per session scan A 901cbcc7edf3

Subscribe to this mod's changes

index AGENTS.md is an instructions file published in the GitHub repository indexnetwork/index (132 stars, last pushed 3d ago), licensed MIT. It adds 3,125 tokens to every session, about $0.0156 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.