lat.md: Instructions file for Codex

AGENTS.md

lat.md AGENTS.md is an instructions file for Codex, OpenCode from vercel-labs/lat.md. It costs 1,703 tokens per session, scanned A, a copy of hermes-desktop AGENTS.md, MIT.

Repository instructions for lat.md, a collection of linked documents that records a project's architecture, design decisions, business rules, and tests.

In plain words
What is it for?
Use them when starting work, finding relevant design context, expanding cross-references, updating project knowledge, or running the required validation command.
Why use it?
They require contributors to consult this project knowledge before coding and update it after meaningful changes, keeping implementation and documentation aligned.

Instructions file for CodexOpenCode ✓ vendor

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

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

About the project

lat.md is a markdown-based knowledge graph for recording a codebase’s design decisions, domain context, constraints, and test specifications in interconnected files. Coding agents use it to find and preserve project knowledge across sessions, while humans can review semantic changes through the graph; the catalogue entries support that workflow.

vercel-labs/lat.md · 2,038 stars · on GitHub · lat.md

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/vercel-labs/lat.md/agents-md"><img src="https://agentmods.dev/badge/instructions/vercel-labs/lat.md/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,703 This file is loaded in full into every session.
When invoked 1,703 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 86% copy Near-identical to another mod 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.01703 $0.01703
Opus 5.5 $0.00681 $0.00681
Sonnet 5.5 $0.00341 $0.00341
Haiku 4.5 $0.00170 $0.00170

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

Security

Grade A, and why

lat.md 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 12d 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.

Origin

This is a copy

86% identical to hermes-desktop AGENTS.md — 41 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

AGENTS.md · 129 lines

How it starts

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

%% lat:begin %%

Before starting work

Use Lat's knowledge graph to ground each task before changing code.

  • Run lat search to find sections relevant to your task. Read them to understand the design intent before writing code.

Post-task checklist (REQUIRED — do not skip)

After EVERY task, before responding to the user:

  • Update lat.md/ if you added or changed meaningful implemented functionality, architecture, tests, or behavior. Keep it a focused snapshot of the current implemented state, not a journal/changelog. Plans may be drafted in lat.md/ alongside implementation, with the intent that by commit time they describe what was implemented. Otherwise, keep proposals, hypothetical designs, and future work outside lat.md/ unless the user explicitly requests them there.
  • Run lat check — all validations must pass
  • Do not skip these steps. Do not consider your task done until both are complete.

What is lat.md?

Lat.md is the project's structured knowledge graph for architecture, design decisions, behavior, and tests.

The graph lives in lat.md/ as cross-linked Markdown describing what the project does and why. Use it to ground work in actual architecture, and keep it a focused snapshot of the current implemented state rather than a journal or changelog.

Project-specific lat documentation belongs in lat.md/. Do not modify this generated instruction file or a generated lat-md SKILL.md to record project guidance: both are owned by lat tooling and may be replaced by a later lat init.

Commands

Use these commands to navigate and validate the project knowledge graph.

lat locate "Section Name"      # find a section by name (exact, fuzzy)
lat refs "file#Section"        # find what references a section
lat search "natural language"  # semantic search across all sections
lat external show <handle>      # inspect a pinned external source before cloning it
lat check                      # run full graph and documentation validation

Read the full file on GitHub · 129 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. 12d ago Changed · +9 lines · +204 tokens per session 5944c3894df7
  2. 26d ago Changed · -2 lines · -49 tokens per session ca2863810e6a
  3. 1mo ago Changed · +13 lines · +177 tokens per session 6f326098ad24
  4. 1mo ago Changed · +4 tokens per session c2e5281e3783
  5. 1mo ago Changed · +1 lines · +55 tokens per session 430ea7d4bcaf
  6. 1mo ago First seen · 108 lines · 1,312 tokens per session scan A e3f5c1e6f561

Subscribe to this mod's changes

lat.md AGENTS.md is an instructions file published in the GitHub repository vercel-labs/lat.md (2,038 stars, last pushed 4d ago), licensed MIT. It adds 1,703 tokens to every session, about $0.0068 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 86% identical to hermes-desktop AGENTS.md, differing in 41 lines, and is treated as a copy.

Related

Other instructions, from other repositories

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 · 9,649 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,384 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens