ZenCODE: Instructions file for Codex

AGENTS.md

ZenCODE AGENTS.md is an instructions file for Codex, OpenCode from gerardogrisolini/ZenCODE. It costs 1,765 tokens per session, scanned A, original, MIT.

Repository instructions for ZenCODE, a Swift package whose command-line program runs on macOS, Linux, and WSL. They describe the project structure, compatibility rules, build commands, and testing conventions.

In plain words
What is it for?
Use them when building, testing, documenting, or modifying ZenCODE and its Swift modules.
Why use it?
They help an AI assistant change the code without breaking public interfaces, saved data formats, dependencies, or platform support.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/gerardogrisolini/zencode/agents-md/github.svg)](https://agentmods.dev/instructions/gerardogrisolini/zencode/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/gerardogrisolini/zencode/agents-md"><img src="https://agentmods.dev/badge/instructions/gerardogrisolini/zencode/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 ZenCODE AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/gerardogrisolini/zencode/agents-md"><img src="https://agentmods.dev/badge/instructions/gerardogrisolini/zencode/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,765 This file is loaded in full into every session.
When invoked 1,765 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.01765 $0.01765
Opus 5.5 $0.00706 $0.00706
Sonnet 5.5 $0.00353 $0.00353
Haiku 4.5 $0.00177 $0.00177

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

Security

Grade A, and why

ZenCODE 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 8d 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 · 55 lines

How it starts

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

AGENTS.md

Project

  • ZenCODE is a Swift 6.4 package whose main executable is zen; it runs on macOS, Linux, and WSL with remote model providers.
  • Package.swift is authoritative for the root products, target dependencies, platforms, and build settings. The packages under Sources/Features and Sources/ZenCRON have their own manifests and are outside the root graph.
  • Docs/architecture.md is the compatibility and dependency-direction contract. Preserve public modules, executable names, wire formats, persisted formats, feature identities, and task-graph ownership unless an explicit migration changes them.
  • Update CHANGELOG.md whenever a change is user-visible or otherwise warrants a release note.
  • Composition starts at Sources/zen/CLI/ZenCODEMain.swift; shared session coordination is centered on AgentCoreSessionRunner, backend state is behind AgentCoreBackend, and direct-tool dispatch is behind DirectToolExecutor.

Architecture Map

  • zen is the only executable composition root and the only layer that selects and injects a remote model backend. ZenCODECore owns the shared runtime; terminal UI, Telegram, and ACP adapt that runtime without moving transport-specific types into neutral Agent or Remote domains.
  • The reusable target flow is ToolCore → FeatureKit → LocalToolsSupport, with FeatureMCPBridgeKit depending only on FeatureKit and ToolCore. ZenCODECore consumes these support targets and ZenPackageMetadata; keep dependency-light contracts in the lowest viable layer and never introduce a dependency on zen.
  • Sources/Features/<Feature> contains standalone Swift packages, not root targets. Each optional feature owns its product, implementation, policy, tests, and thin executable; generic feature-process and MCP machinery belongs in FeatureKit or FeatureMCPBridgeKit, never feature-specific behavior.
  • Sources/ZenCRON is the standalone, dependency-free package of ZenCRON, the host that cron runs for scheduled prompts and that spawns zen; /setup builds it into <support>/bin/ZenCRON. It is neither a feature nor a composition root. Its binary must stay stable (macOS ties the permissions of cron jobs to it): raise its host version only when its behaviour changes, and keep its PATH search identical to ZenCronJobCommand.locateZen(onPath:).
  • AgentCoreSessionRunner is the session-level coordinator and injects one SessionTaskOrchestrator into every backend. The orchestrator is the sole mutable owner of task DAGs and checkpoints; backend recreation must not replace or discard that state.
  • DirectToolExecutor is the authorization and dispatch boundary for direct tools. Delegated-agent tool grants normally come from configured profiles, not model-authored arguments or task metadata; a child resolved to the coordinator's same profile inherits the coordinator's effective session allowlist.
  • Provider generation is remote-only and provider-agnostic runtime state stays local. Shared HTTP/SSE/WebSocket behavior belongs under Remote/Generation; authentication remains separate from generation transport.
  • Persisted state lives under the support directory (default ~/.zencode, overridable with ZENCODE_SUPPORT_DIRECTORY) and includes settings, sessions, task checkpoints, permissions, feature manifests, and per-workspace memory graphs. Presentation trees, live shared chat, and unfinished Planner clarification state are intentionally transient and must not enter snapshots or checkpoints.
  • Treat Docs/architecture.md as authoritative for compatibility surfaces, ownership details, persistence formats, and migration rules. Structural changes must preserve observable behavior, use direct imports/dependencies, update registries/scripts/parity checks together, and receive focused characterization tests before moving persistence- or wire-sensitive paths.

Read the full file on GitHub · 55 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. 8d ago Changed · +2 lines · +162 tokens per session 1b9b45229a63
  2. 23d ago Changed · +43 tokens per session 128393edc60b
  3. 27d ago Changed · +19 tokens per session ddb097b03a3c
  4. 1mo ago Changed · +4 tokens per session d63e8d97912d
  5. 2mo ago Changed · +11 lines · +453 tokens per session 8f70a7577771
  6. 2mo ago First seen · 42 lines · 1,084 tokens per session scan A fd01e6e7cde7

Subscribe to this mod's changes

ZenCODE AGENTS.md is an instructions file published in the GitHub repository gerardogrisolini/ZenCODE (11 stars, last pushed yesterday), licensed MIT. It adds 1,765 tokens to every session, about $0.0071 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-08-31.

Related

ZenCODE AGENTS.md compared with instructions from other repositories

ZenCODE AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ZenCODE AGENTS.mdgerardogrisolini/ZenCODEInstructions file11yesterdayMITA1,765Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,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