trustcard: Instructions file for Codex

AGENTS.md

trustcard AGENTS.md is an instructions file for Codex, OpenCode from davidnichols-ops/trustcard. It costs 2,467 tokens per session, scanned A, original, MIT.

Repository instructions for agents working on trustcard, a project that provides cryptographic identity, policy, receipts, behavioral checks, evidence storage, and HTTP-based client support for MCP servers.

In plain words
What is it for?
Orienting agents in the trustcard codebase, following its security and protocol documentation, understanding its main libraries, and running the correct test command.
Why use it?
They give agents the project’s required reading, architecture map, commands, and test-running rules so changes fit the repository and tests do not hang.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is davidnichols-ops/trustcard's own configuration. It tells Codex and OpenCode how to work on trustcard 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 trustcard configures →

Reuse

Borrowing it

Nothing to install: this file belongs to davidnichols-ops/trustcard. 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/davidnichols-ops/trustcard/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/davidnichols-ops/trustcard

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 trustcard AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/davidnichols-ops/trustcard/agents-md.svg)](https://agentmods.dev/instructions/davidnichols-ops/trustcard/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/davidnichols-ops/trustcard/agents-md"><img src="https://agentmods.dev/badge/instructions/davidnichols-ops/trustcard/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,467 This file is loaded in full into every session.
When invoked 2,467 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.1 $0.02467 $0.02467
Opus 5 $0.01234 $0.01234
Sonnet 5 $0.00493 $0.00493
Haiku 4.5 $0.00247 $0.00247

Measured 6d ago against content hash cad671ded43a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

trustcard 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 6d 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 · 161 lines

How it starts

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

trustcard — repo knowledge for agents

What this is

trustcard is cryptographic trust infrastructure for MCP servers, and the start of a protocol-neutral trust substrate for executable capabilities. v3.0.3 builds on v1 identity/provenance/v2 policy/receipts with three new layers:

  1. Behavioral verification (lib/behavior.js) — sandboxed, deterministic probing that can fail a server whose static contract is unchanged.
  2. Evidence substrate (lib/evidence.js, lib/evidence-store.js) — content-addressed, immutable observations.
  3. HTTP/SSE transport parity (lib/client-http.js) — experimental streamable-http and SSE client.

Read docs/INDEX.md first, then docs/SECURITY-MODEL.md, docs/SPEC.md, and docs/BEHAVIOR.md.

Commands

  • Test: npm testnode --test test/*.test.js (529 tests, all should pass)
    • IMPORTANT: the test/*.test.js glob is required. Bare node --test also matches test/helpers.js and the fixture servers, which hang the runner (child processes keep stdio open). Don't "simplify" the glob away.
    • The glob must be unquoted in the package.json script so the shell expands it before Node receives the paths; a quoted glob becomes a literal path.
  • CLI: node bin/mcp-trustcard.js <subcommand> (keygen/manifest/sign/verify/ diff/pin/pins/fingerprint/scan/gen-manifest/inspect/auth-issue/auth-verify/ behavior/evidence)
  • Also bin/mcp-proxy.js and bin/mcp-http-proxy.js for call-time enforcement.
  • No runtime deps. Pure Node stdlib. Don't add dependencies.

Architecture map (lib/)

  • canon.js — RFC 8785 (JCS) canonicalization. Every digest depends on this being byte-exact. Numbers use ECMAScript shortest round-trip with e+n/e-n exponents, no -0; keys sorted by UTF-16 code units. RFC test vectors in test/canon.test.js.
  • hash.jsdigest(value) = "sha256:"+base64url(SHA256(JCS(value))). signingPayload() excludes BOTH signature and manifestDigest.
  • identity.js — semantic projection for tool/server digests. Semantic: name, description, inputSchema, outputSchema, annotations{title, readOnlyHint, destructiveHint, idempotentHint, openWorldHint}, execution. Volatile (excluded): top-level title, icons, tags, _meta.
  • diff.js — five-level taxonomy NONE<SYNTACTIC<NON_BREAKING<ANNOTATION_DOWNGRADE<PERMISSION_CHANGE<BREAKING. Compatible = ≤NON_BREAKING.
  • change.js — multi-axis change vector (interface/permission/implementation/ provenance) for descriptors.
  • trust.js — state machine UNKNOWN→OBSERVED→PINNED→MISMATCH/SUSPECT→REVOKED. REVOKED is sticky. trustLevel() projects onto TRUSTED/VERIFIED/OBSERVED/UNTRUSTED/REVOKED.
  • provenance.js — manifest build/sign/verify. Ed25519 via node:crypto. Signed manifests carry expiresAt; verifyManifest rejects expired ones.
  • manifest.js — proxy-enforcement manifest. buildManifest includes expiresAt (default 90 days); checkCall blocks all calls when expired. --allow-tool records manualOverride: true. --require-scopes adds requiredScopes per tool.
  • pin.js — TOFU pin store (servers + publisher keys), atomic writes, fail-closed on corrupt file.
  • session.js — live connection: negotiates protocol, verifies handshake binding, subscribes to notifications/tools/list_changed → re-diff.
  • guard.js — the enforcement gate. wrapClient/session.call route every tools/call through guard.authorizeCall. Modes: enforce/audit/off. Emits signed, chained receipts when given a receiptKey.
  • middleware.jswrapClient(rawClient, {guard, session}); re-verifies toolset digest on every tools/list.
  • policy.js — Gate 2 per-invocation authorization: composable rule predicates (allowTools, denyTools, constrainArg, forbidArg, restrictToolToEnvironments, requireApprovalForDestructive, requireScopes) + ScopedDecisions. Verdict precedence: deny > require-approval > allow. Rule predicates that throw fail closed. defaultVerdict defaults to allow; set to deny for default-deny.
  • auth.js — Per-agent auth scope enforcement. DevIssuer (HMAC-SHA256 JWT-like tokens), IdpIntrospector (RFC 7662 OAuth 2.1 token introspection), TokenValidator (local first, then introspection), scopeSatisfies (wildcards * and prefix:*), extractToken/stripAuth.
  • rotation.js — old-key-signs-new-key rotation certificates + self-signed revocation certificates.
  • behavior.jsv3. Behavioral verification engine. Exports SandboxRuntime, InputGenerator, OutputComparator, BehaviorEngine, BehaviorReport, BehaviorFinding, RegressionCorpus, ReferenceObservation. Key invariant: static identity can pass while behavioral verification fails.
  • evidence.js / evidence-store.js / evidence-adapters.jsv3. Content-addressed evidence records and local store. Records are immutable; corrections use supersedes. EVIDENCE_LAYERS is the predicate registry.
  • evidence-predicates.js — predicate and layer vocabulary for evidence.
  • existence.js — existence probes for npm and GitHub repos (evidence layer).
  • observe.js, fingerprint.js, receipts.js, report.js, checks.js — scan, identity card, reproducibility, rendering.
  • danger-detector.js — three-engine fusion: heuristic, semantic (TF-IDF), injection markers.
  • descriptor.js — protocol-neutral capability descriptor. interfaceDigest() is byte-equal to toolDigest(). implementationIdentity is typed (npm-dist/source/unresolved). buildDescriptor/signDescriptor/ verifyDescriptor and manifest⇄descriptor adapters.
  • mcp-server.js — minimal framework for well-behaved MCP servers. examples/bruce-lee/ is the reference server.
  • client-http.jsv3. MCP streamable-http and SSE client. Experimental; McpHttpClient matches McpStdioClient interface.
  • redact.js — auth-token and sensitive-value redaction helpers.

Read the full file on GitHub · 161 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. 6d ago First seen · 161 lines · 2,467 tokens per session scan A cad671ded43a

Subscribe to this mod's changes

trustcard AGENTS.md is an instructions file published in the GitHub repository davidnichols-ops/trustcard (4 stars, last pushed 17d ago), licensed MIT. It adds 2,467 tokens to every session, about $0.0123 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-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens