genie AGENTS.md

genie AGENTS.md is an instructions file for Codex, OpenCode from automagik-dev/genie. It costs 1,170 tokens per session, scanned A, original, MIT.

A shared contributor guide for Genie, a command-line tool that manages repository tasks and related state.

In plain words
What is it for?
Use it when developing Genie, running its checks and tests, changing hooks or commands, or working with its per-project and global task databases.
Why use it?
It explains where code and databases belong, which checks changes must pass, and how Claude Code, Codex, and people should work together.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/automagik-dev/genie/agents-md.svg)](https://agentmods.dev/instructions/automagik-dev/genie/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/automagik-dev/genie/agents-md"><img src="https://agentmods.dev/badge/instructions/automagik-dev/genie/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,170 This file is loaded in full into every session.
When invoked 1,170 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.01170 $0.01170
Opus 5 $0.00585 $0.00585
Sonnet 5 $0.00234 $0.00234
Haiku 4.5 $0.00117 $0.00117

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

Security

Grade A, and why

genie 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 4d 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 · 64 lines

How it starts

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

Genie repository contract

This is the runtime-neutral contributor contract for Claude Code, Codex, and human contributors. Client-specific overlays may add syntax, but they must not contradict this file.

Validate changes

bun install --frozen-lockfile
bun run check
bun test path/to/file.test.ts

The full gate runs type checking, Biome, dead-code analysis, skill/wish/council linting, and tests. Tests use bun:test; fixtures belong under a temporary directory and must isolate GENIE_HOME when touching global state.

Architecture

  • src/genie.ts is the Commander CLI entry point.
  • src/lib/v5/ owns SQLite state. Per-repo .genie/genie.db stores task state; global ~/.genie/genie.db stores Omni state. Never mix their path/schema modules.
  • src/hooks/ owns provider-neutral lifecycle policy plus Claude/Codex wire adapters.
  • src/term-commands/ owns init, context, MCP, Omni, task, and board commands.
  • plugins/genie/ is one shared plugin payload with sibling Claude and Codex manifests.
  • skills/ is shared runtime-neutral workflow guidance. Runtime mapping lives in plugins/genie/references/native-surfaces.md.
  • .genie/ contains git-tracked wishes/brainstorms/index plus gitignored operational SQLite files.

Genie v5 is zero-daemon except for the explicitly launched genie omni serve bridge. Do not use telemetry presence as integration health.

Engineering rules

  • KISS is a release gate, not a preference. Start with the simplest complete design that satisfies current user stories. Caches, deltas, sharding, background coordination, configurable policy, and other stateful machinery require a present contractual need or measured threshold; hypothetical future scale is not evidence. Prefer bounding data and separating history from current state before adding synchronization protocols.
  • Define type and error boundaries before implementation.
  • Preserve user-owned config and unrelated dirty-worktree changes.
  • Config migrations are narrow, backup-first, idempotent, and covered by fixtures.
  • Every new CLI surface tests success, error exit code, stderr, and idempotency.
  • Shared skills use roles and native delegation language, never a hardcoded client tool name.
  • Subagents share a workspace unless the client explicitly guarantees otherwise. Parallel writers must have disjoint file ownership or dedicated worktrees; otherwise sequence them. Shared-workspace subagents never mutate repo-level git state (no checkout/switch/reset/stash/rebase) — only the orchestrator moves HEAD; work needing repo-level mutation gets an isolated worktree arranged by the orchestrator (client-provided worktrees or explicit git worktree add plumbing) or gets sequenced. git worktree add/remove/prune on snapshot/lane paths is orchestrator-side plumbing and permitted. Genie task claims own shared-workspace scope; the orchestrator arranges worktree isolation.
  • Reviewer and engineer are different roles. Never accept self-review as independent evidence.
  • Codex agents inherit the active model; do not hardcode unstable model identifiers.
  • Hook trust and workspace trust remain explicit user decisions.

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

Subscribe to this mod's changes

genie AGENTS.md is an instructions file published in the GitHub repository automagik-dev/genie (334 stars, last pushed 3d ago), licensed MIT. It adds 1,170 tokens to every session, about $0.0059 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.