code-ai-template AGENTS.md

Project instructions for a coding agent working in the FHDumont/code-ai-template repository. They define a two-part workflow: first plan and record the work, then implement it in a new session.

In plain words
What is it for?
Use them when planning or implementing changes in that repository, including checking its conventions, domain terms, setup specification, and live documentation.
Why use it?
They keep project knowledge in shared documents and create a clear boundary between deciding what to build and changing code.

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/fhdumont/code-ai-template/agents-md
Clone the repo
git clone --depth 1 https://github.com/FHDumont/code-ai-template

Made for: Codex, OpenCode.

Per session 4,325 This file is loaded in full into every session.
When invoked 4,325 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.04325 $0.04325
Opus 5 $0.02162 $0.02162
Sonnet 5 $0.00865 $0.00865
Haiku 4.5 $0.00432 $0.00432

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

Security

Grade A, and why

code-ai-template 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 · 166 lines

How it starts

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

AGENTS.md

Instruções para o agente de código deste projeto. Núcleo agnóstico de ferramenta — vale em qualquer stack e qualquer agente. Use como está.

  • Mecânica por ferramenta: CLAUDE.md (Claude Code), .cursor/rules/metodo.mdc (Cursor).
  • Convenções de código/UI deste projeto: CONVENCOES.md. Linguagem ubíqua do domínio: CONTEXT.md.
  • Projeto de LLM/agentes: acople o add-on opcional e referencie aqui (ex.: PERFIL-LLM.md). Instruções no README.

O loop — plan e code

Uma superfície, dois modos — os dois são você, os dois com o repo na mão:

  • Plan mode (raciocínio): lê os docs vivos e audita o código real, discute o aberto com o dono (uma pergunta por vez), e grava a spec da fase no docs/SETUP.md — e para aí. Ler código é o trabalho desta passada; escrever código é da outra.
  • Code mode (execução): em sessão nova (contexto limpo), lê a spec do SETUP.md, implementa aterrado no código, roda os critérios de sucesso na mesma resposta, e atualiza os docs vivos numa única passada antes de encerrar.

Entre os dois, uma fronteira dura: é o dono que limpa o contexto e abre a execução. Cada fase é tarefa independente — o contexto mora nos docs vivos, não na sessão.

Como o planejador tem o repo, a spec nasce confirmada contra o código: nomes de arquivo e símbolo são verificados no plan mode, não "hipóteses a confirmar". Ainda assim a verdade é o código — se em code mode a realidade diverge da spec, implemente o que é correto e registre a divergência (nota na fase, ou ADR se for decisão de arquitetura).

  • Audite o estado antes de modelar. Fase que mexe em schema, enum ou estado persistido: no plan mode, audite o código real (migrations, tipos, dados) antes de escrever a spec. Barato, e evita spec que presume estado que não existe.
  • Uma fase de cada vez. docs/SETUP.md tem uma spec, e as fases entram na ordem do ROADMAP. Implemente, atualize os vivos, pare, resuma ao dono e peça aprovação pra próxima.
  • Fique no modo até a fase fechar. Se, em code mode, a conversa puxa pra fora do escopo da spec atual (nova ideia, decisão de arquitetura, refatoração não pedida), pare e pergunte ao dono: seguir no code, dentro do escopo, ou voltar pro plan pra tratar aquilo como fase própria? É o mesmo princípio de "sem refatoração de carona", aplicado à troca de modo.
  • Revisão de fecho com contexto fresco. Ao fechar a fase em code mode — depois de rodar os critérios, antes do commit — dispare um subagente sem o contexto da sessão, que recebe só os docs vivos + o diff e confere se o entregue bate com a intenção da spec. Limpo → passada única de docs + commit. Divergiu → corrija antes. Fase que não toca código pode pular.
  • O plano durável é a spec. A spec no docs/SETUP.md é o plano canônico (o porquê arquitetural distila em ADR; a narrativa de implementação, ao fechar, no SETUP-HISTORICO). O arquivo de plano nativo da ferramenta (Claude Code ~/.claude/plans, Cursor) é rascunho efêmero — fica fora do git.

Read the full file on GitHub · 166 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 · 166 lines · 4,325 tokens per session scan A 6806207383ff

Subscribe to this mod's changes

code-ai-template AGENTS.md is an instructions file published in the GitHub repository FHDumont/code-ai-template (2 stars, last pushed 21d ago), licensed MIT. It adds 4,325 tokens to every session, about $0.0216 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

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

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

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

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,345 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

next.js 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