kanea: Instructions file for Codex

AGENTS.md

kanea AGENTS.md is an instructions file for Codex, OpenCode from m18h/kanea. It costs 4,775 tokens per session, scanned A, original, Apache-2.0.

A set of rules for coding agents working on Kanea, a Go program that runs and manages containerized services along with networking, security, a dashboard, and deployment features.

In plain words
What is it for?
It is for guiding code changes, tests, validation, and design decisions in the Kanea repository.
Why use it?
It tells agents which project documents and technical constraints to follow, helping keep changes consistent with Kanea's architecture and release requirements.

Instructions file for CodexOpenCode

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

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is # docs/ is still hand-written and links ../style.css, so deleting the.

Reuse

Borrowing it

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/m18h/kanea/agents-md.svg)](https://agentmods.dev/instructions/m18h/kanea/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/m18h/kanea/agents-md"><img src="https://agentmods.dev/badge/instructions/m18h/kanea/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,775 This file is loaded in full into every session.
When invoked 4,775 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.04775 $0.04775
Opus 5 $0.02388 $0.02388
Sonnet 5 $0.00955 $0.00955
Haiku 4.5 $0.00477 $0.00477

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

Security

Grade A, and why

kanea 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 7d 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 · 237 lines

How it starts

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

AGENTS.md: Kanea

Guidance for AI agents (and humans) working in this repository. Read this before writing any code.

What this is

Kanea is a lightweight, single-binary container orchestration platform written in Go, "container orchestration in one binary." It runs services on containerd, networks them with its own eBPF datapath (nothing from the Kubernetes stack underneath, and since PRD v1.36 no Cilium either), terminates TLS with Let's Encrypt, and ships a React + shadcn/ui dashboard, an MCP server for AI agents, GitOps pipelines (kaniko), eBPF-driven autoscaling, and S3-backed state replication.

PRD.md is the north star. It is complete and internally consistent (v1.106). Every architectural decision, naming rule, milestone, and risk is specified there. When this file and the PRD disagree, the PRD wins, and the disagreement means one of them needs an amendment.

Current status

Every subsystem the PRD specifies is built and released. What is still owed before v1.0 is evidence rather than code: the real-hardware runs no test can stand in for are tracked, with dates, in docs/VALIDATION.md.

The decision record lives in docs/DECISIONS.md: the per-subsystem status table, the per-amendment "things a change is most likely to trip over" bullets, Deliberately not built, Known limits, and the spike log. Read that file's bullets for any area before changing it, and treat an apparent gap as a decision until that document says otherwise: several of the most tempting "fixes" in this codebase are listed there as refusals.

Recurring design rules

Cross-cutting patterns the decision record applies over and over. Each is one sentence here; the bullets in docs/DECISIONS.md carry the details and the history.

  1. SpecHash discipline (the R23 lesson): a new Desired field needs omitempty and an explicit decision about whether it is hash material; a missing omitempty rolls every alloc on the node at upgrade, and pre-existing records must serialize byte-identically, pinned by test.
  2. A record with an empty spec hash is adopted, never rolled - that is what stops a kanead upgrade from replacing every alloc on the node.
  3. "No data" is never zero: absence and a measured zero lead to opposite decisions, in the time series, the evaluator, the exporter and the dashboard alike.
  4. A control that cannot be enforced is refused, never silently dropped (R21).
  5. Parse-time and apply-time checks are duplicated on purpose, with shared exported cores (CheckCapabilities, ParseEnvRef, ...) so the two paths cannot drift.
  6. Client-side conversion never bakes in node-dependent values: toDesired runs in the CLI, MCP and the pipeline, so TLS modes, pull-policy defaults and their kin are resolved on the node.
  7. Server-owned fields (Generation, PinnedImage) are carried over by handleApply, never reset by a client's apply.
  8. Small constants are deliberately duplicated across package boundaries (CapabilityNone, ownershipRefusedBy, MaxBcryptCost) - matching them by import would point a dependency the wrong way; they are not DRY violations.
  9. Attacker-chosen keys are never persisted, and every map keyed by one is bounded, with refusals counted: a cap nobody can see is indistinguishable from a leak.
  10. Steady state writes nothing: an unchanged value is never rewritten, because a Store write is a CDC change and an S3 upload.
  11. Anything added to a published snapshot must be added to its equality check, or it publishes exactly once and never again (the routesArePublished lesson).
  12. A spec names a grant, never a path - GitOps deploys specs automatically, so a spec is an untrusted document and node-side config holds the mapping.
  13. Config files come in two families and must not mix: the reload family (keep-last-good, content-fingerprinted - certificates, secret providers) and load-once kanea.hcl (absent is off, malformed is fatal).
  14. Fail closed: a missing certificate, verifier or identity is a 503 or a drop, never open.
  15. Every optional daemon dependency must be wired in cmd/kanea, pinned by tests that read the source - the recurring bug class is invisible in dev and fatal on the first real systemd node.

Read the full file on GitHub · 237 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. 7d ago First seen · 237 lines · 4,775 tokens per session scan A bab81c1e46ba

Subscribe to this mod's changes

kanea AGENTS.md is an instructions file published in the GitHub repository m18h/kanea (11 stars, last pushed 4d ago), licensed Apache-2.0. It adds 4,775 tokens to every session, about $0.0239 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

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

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

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

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

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