capsule AGENTS.md

A project guide for coding agents working on Capsule, a specification and reference implementation for a software format. It explains the project’s structure, tools, coding style, and required checks.

In plain words
What is it for?
Use it when changing the specification or its Python and TypeScript implementations, including linting, type checking, tests, and conformance checks.
Why use it?
It gives an agent the project-specific rules it needs to make compatible changes and run the right validation.

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

Made for: Codex, OpenCode.

Per session 1,080 This file is loaded in full into every session.
When invoked 1,080 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.01080 $0.01080
Opus 5 $0.00540 $0.00540
Sonnet 5 $0.00216 $0.00216
Haiku 4.5 $0.00108 $0.00108

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

Security

Grade A, and why

capsule 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 · 90 lines

How it starts

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

AGENTS.md: capsule

Capsule Protocol Specification (CPS) plus reference implementations. Open source, Apache 2.0 with patent grant. The spec in spec/ is the source of truth, not any single implementation.

Stack

  • Spec: spec/ plus conformance/ (16 valid + 15 negative golden vectors). Language-agnostic.
  • Python reference: reference/python/ publishes qp-capsule on PyPI. Python 3.11+, pynacl, hatchling.
  • TypeScript reference: reference/typescript/ publishes @quantumpipes/capsule on npm. TypeScript 5.9+ strict, Node 20.19+, ESM-only.
  • Ecosystem libraries (not in this repo): capsule-go, capsule-litellm.

Commands

Python (always cd reference/python first):

make install      # pip install -e ".[storage,dev]"
make lint         # ruff check src/ tests/
make typecheck    # mypy src/qp_capsule/ (strict)
make test         # pytest, 100% coverage enforced (--cov-fail-under=100)
make test-golden  # golden conformance vectors only
make test-all     # lint + typecheck + test + golden

TypeScript (always cd reference/typescript first):

npm ci
npm run lint         # tsc --noEmit
npm test             # vitest run
npm run conformance  # golden fixtures only

Structure

spec/                  CPS v1.0 specification, URI scheme, VERSION
conformance/           golden vectors every implementation must pass
reference/python/      qp-capsule (src/, tests/, Makefile, pyproject.toml)
reference/typescript/  @quantumpipes/capsule (src/, tests/, package.json)
docs/                  architecture, security, 11 compliance mappings
examples/              language-agnostic example Capsules
nist-submission/       NIST materials

Style

  • No em dashes anywhere in code, commits, or docs. Use commas, periods, colons, parentheses.
  • Python: type hints on all public functions, async where I/O happens, mypy strict, filterwarnings = ["error"] (any new warning fails CI).
  • TypeScript: strict mode, ESM-only (.js extensions in imports).
  • Crypto allowlist: SHA3-256 (FIPS 202), Ed25519 (FIPS 186-5), ML-DSA-65 (FIPS 204), AES-256-GCM (FIPS 197). Never MD5, SHA1, RSA, 3DES, RC4. ECDSA-P256 only for an ephemeral authentication assertion where interop requires it, never for a capsule signature.

Read the full file on GitHub · 90 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 · 90 lines · 1,080 tokens per session scan A 5e74f72bd980

Subscribe to this mod's changes

capsule AGENTS.md is an instructions file published in the GitHub repository quantumpipes/capsule (11 stars, last pushed 10d ago), licensed Apache-2.0. It adds 1,080 tokens to every session, about $0.0054 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.