anda: Instructions file for Codex

AGENTS.md

anda AGENTS.md is an instructions file for Codex, OpenCode from ldclabs/anda. It costs 2,181 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for AI coding agents working in a Rust workspace that builds reusable AI-agent runtimes. They describe the project layout, which rules apply where, and boundaries for runtime code.

In plain words
What is it for?
Use them when navigating the repository, deciding where new code belongs, and checking the required workflow before making changes.
Why use it?
They give an agent the project context and working rules it needs before changing code, reducing misplaced edits and broken conventions.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions subagents; mentions AGENTS.md.

This is ldclabs/anda's own configuration. It tells Codex and OpenCode how to work on anda itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything anda configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ldclabs/anda. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ldclabs/anda/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/ldclabs/anda

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for anda AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ldclabs/anda/agents-md/github.svg)](https://agentmods.dev/instructions/ldclabs/anda/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/ldclabs/anda/agents-md"><img src="https://agentmods.dev/badge/instructions/ldclabs/anda/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for anda AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ldclabs/anda/agents-md"><img src="https://agentmods.dev/badge/instructions/ldclabs/anda/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,181 This file is loaded in full into every session.
When invoked 2,181 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.02181 $0.02181
Opus 5.5 $0.00872 $0.00872
Sonnet 5.5 $0.00436 $0.00436
Haiku 4.5 $0.00218 $0.00218

Measured 20d ago against content hash 88cad3d3be26, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

anda 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 20d 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 · 207 lines

How it starts

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

AGENTS.md

Guidance for AI coding agents working in this repository.

Agent Workflow

  • Work independently as the current agent. Do not spawn or delegate work to subagents.
  • Before editing, run git status --short, confirm the current branch, and inspect existing diffs in the files you intend to change. Preserve the user's existing work; do not overwrite or revert unrelated files or changes.
  • Use rg for search and focused reads before editing. Do not assume module boundaries from filenames alone.
  • Before committing, review the final diff and stage only the files or hunks belonging to the requested task.
  • At completion, briefly summarize the changes, the checks actually run and their results, and any checks not run or blocked. Never report an unrun check as passing. When committing, include the branch and commit ID in the summary.

Repository Shape

anda is a Rust workspace for composable AI agent runtimes.

  • anda_core: stable traits, shared data models, context capabilities, JSON schema helpers, and RPC helpers.
  • anda_engine: runtime orchestration, contexts, model adapters, tools, hooks, memory, subagents, and reusable extensions.
  • anda_engine_server: HTTP server layer for exposing engines.
  • anda_cli: CLI entrypoint for configured engine servers.
  • anda_web3_client: Web3 integration for non-TEE environments.
  • docs/architecture.md: source-level runtime architecture.
  • MCP_INTEGRATION.md: MCP host/client design and boundaries.

Keep anda_core small and dependency-light. Runtime integrations belong in anda_engine or higher-level crates unless the shared contract genuinely needs to change.

Working Rules

  • Inspect the exact code and docs relevant to the request before editing.
  • Preserve user or agent changes already present in the working tree. Do not revert unrelated dirty files.
  • Prefer small, behavior-focused changes over broad refactors.
  • Keep public API changes coherent across code, docs, examples, and tests.
  • Use workspace dependencies from the root Cargo.toml; do not add duplicate per-crate versions unless there is a clear reason.
  • Keep generated schemas and protocol-visible names stable. Agent, tool, and provider names must satisfy the function-name rules: lowercase ASCII letters, digits, underscores, and hyphens, starting with a lowercase letter, max 64 bytes.
  • Never use oneOf, anyOf or allOf in a model-facing schema: tool and agent parameters, MCP-exposed tool schemas, and structured-output schemas. Anthropic rejects them at the top level of a tool's input_schema and fails the whole request with a 400 (KIP's top-level oneOf once broke every Brain pass on Claude); strict modes reject them anywhere. Write a nullable field as a type list ("type": ["string", "null"]), alternatives of distinct types as one schema with a type list, and tagged variants as one object with an enum discriminator and the variant-only fields nullable or optional (see memory_tool_schema). Enforce cross-field rules such as "exactly one of command or operations" when parsing the arguments, and state them in the descriptions. schemars derives these keywords from Option<Struct> and enums, so check the generated JSON (extension_tool_definitions_are_strict_and_union_free). The Anthropic adapter drops top-level combinators only as a safety net for external MCP schemas; it is not a way to keep them in our own.
  • When changing model/provider conversion code, preserve raw-history and tool/user message boundaries. Do not merge tool outputs into user messages or lose provider-specific content unless the existing code explicitly does so.
  • ContentPart / chat_history is the persisted, provider-neutral history. Provider per-turn intermediate state (Anthropic thinking.signature, Gemini thoughtSignature) belongs in CompletionRequest::raw_history, which every adapter sends ahead of the converted chat_history and which is scoped to one in-process reasoning round. Do not add provider-specific fields to ContentPart to carry such state — an adapter dropping it on the way in is correct by design. Do fix the reverse: converting out of ContentPart must never emit something the provider rejects (e.g. a thinking block with an empty signature); omit it instead.

Read the full file on GitHub · 207 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. 20d ago Changed · -1 lines · -3 tokens per session 88cad3d3be26
  2. 28d ago Changed · +14 lines · +263 tokens per session 120a15e0012f
  3. 1mo ago Changed · +10 lines · +135 tokens per session dc5d059a3768
  4. 2mo ago First seen · 184 lines · 1,786 tokens per session scan A 0bfa439aaf8a

Subscribe to this mod's changes

anda AGENTS.md is an instructions file published in the GitHub repository ldclabs/anda (448 stars, last pushed 18d ago), licensed Apache-2.0. It adds 2,181 tokens to every session, about $0.0087 per session on Opus 5.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-09-01.

Related

anda AGENTS.md compared with instructions from other repositories

anda AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
anda AGENTS.mdldclabs/andaInstructions file44818d agoApache-2.0A2,181Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode