codex-lattice AGENTS.md

codex-lattice AGENTS.md is an instructions file for Codex, OpenCode from jh941213/codex-lattice. It costs 3,523 tokens per session, scanned A, original, MIT.

A set of instructions for Codex Lattice, a project workflow that records coding decisions, errors, events, and documentation changes. It also defines checks involving human approval.

In plain words
What is it for?
Use it when contributing to the project and needing to choose a Git strategy, record work logs, handle major errors, pass simplification checks, and update documentation.
Why use it?
It makes the agent’s work traceable and keeps project rules, code changes, and documentation synchronized.

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/jh941213/codex-lattice/agents-md
Clone the repo
git clone --depth 1 https://github.com/jh941213/codex-lattice

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 codex-lattice AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/jh941213/codex-lattice/agents-md.svg)](https://agentmods.dev/instructions/jh941213/codex-lattice/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/jh941213/codex-lattice/agents-md"><img src="https://agentmods.dev/badge/instructions/jh941213/codex-lattice/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,523 This file is loaded in full into every session.
When invoked 3,523 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.03523 $0.03523
Opus 5 $0.01761 $0.01761
Sonnet 5 $0.00705 $0.00705
Haiku 4.5 $0.00352 $0.00352

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

Security

Grade A, and why

codex-lattice 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 · 137 lines

How it starts

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

AGENTS.md

Codex 는 이기준을 잘 읽고 작업을 수행합니다.

Codex Lattice Rules

  • 매 작업 시작 시 이 문서를 기준으로 Git 전략을 먼저 정한다: 현재 브랜치, 변경 범위, 커밋 분리 기준, 검증 명령, 롤백 방식.
  • 작업 단위가 커밋 가능해지면 .codex-lattice/commits/에 커밋 후보 로그를 남긴다.
  • 모든 hook 이벤트는 .codex-lattice/logs/events.jsonl에 기록한다. 이 파일은 운영 추적용이며 모델 컨텍스트로 먼저 읽지 않는다.
  • 주요 에러가 반복되거나 작업을 막으면 .codex-lattice/model-visible/MAJOR_ERRORS.md를 갱신한다. 재시도 전 이 파일은 모델이 읽어야 한다.
  • 여러 지시를 순차 처리하거나 compact 이후 재개할 때는 docs/harness/REFLECTION.md를 읽고 최신 사용자 요청 기준으로 방향을 재확인한다.
  • 코딩 작업 중 변경된 구현과 문서는 함께 움직여야 한다. 모든 작업은 최종 응답 전 docs/harness/를 실제 diff와 검증 결과에 맞춰 갱신한다.
  • 숨은 지식 금지: 반복되는 운영 규칙은 hook, 스크립트, 또는 이 문서에 남긴다.

Always-On Harness

  • Git 전략, 작업 로그, 주요 에러 로그, docs sync는 사용자가 호출하는 스킬이 아니라 모든 작업의 기본 루프다.
  • hooks/codex-git-strategy-log.sh는 작업 시작 프롬프트를 기준으로 Git 전략 초안을 남긴다. 에이전트는 실제 변경 전 이 전략을 확인하고 필요하면 보정한다.
  • hooks/codex-docs-sync-log.sh는 diff가 생기면 .codex-lattice/docs-sync-queue.jsonl에 동기화 큐를 남긴다. 에이전트는 최종 응답 전 이 큐를 반영해 docs/harness/를 갱신한다.
  • hooks/codex-simplify-gate.sh는 코드 diff가 누적되거나 HITL/Stop 직전에 .codex-lattice/model-visible/SIMPLIFY_REQUIRED.md를 남긴다. 에이전트는 사람에게 넘기기 전에 단순화/정규화와 재검증을 끝낸다.
  • hooks/codex-reflection-reminder.sh는 복잡한 순차 지시나 compact 이후 .codex-lattice/model-visible/REFLECTION_REQUIRED.md를 남긴다. 에이전트는 docs/harness/REFLECTION.md를 읽고 instruction ledger를 재구성한 뒤 계속한다.
  • 코드 diff가 생기면 .codex-lattice/model-visible/DOCS_AGENT_REQUIRED.md를 확인한다. sub-agent 사용이 가능한 실행에서는 docs_maintainer로 기능명세/API 명세/인프라 정의/검증 문서를 맞추고, 불가능하면 부모 에이전트가 직접 갱신한다.
  • sub-agent를 쓰는 작업은 docs/harness/SUBAGENT_PROTOCOL.md를 따른다. 부모 에이전트가 plan/task/context를 추출해 전달하고, sub-agent에게 긴 계획 파일을 알아서 읽게 하지 않는다.
  • hidden logs는 기본 컨텍스트가 아니다. 장애 분석, 재시도, 감사 요청 때만 읽는다.
  • 작업 시작 또는 compact 이후 .codex-lattice/model-visible/CONTEXT_PACKET.md가 있으면 먼저 읽어 필요한 파일과 검증 후보를 좁힌다.
  • HITL, 리뷰, PR, 최종 응답 전 .codex-lattice/model-visible/REVIEW_PACKET.mdHARNESS_HEALTH.md가 있으면 gate, risk, validation evidence를 확인한다.

Reflection Guard

  • 최신 사용자 메시지가 항상 우선한다. 이전 목표, 이전 계획, compact 요약, hidden log가 최신 지시를 덮어쓰면 안 된다.
  • 다단계 작업은 시작 전 docs/harness/REFLECTION.md의 instruction ledger를 만든다: 최신 요청, 순서, 의존성, 금지사항, 현재 단계, 완료 기준.
  • 주요 단계가 끝날 때마다 다음 행동이 최신 요청과 맞는지 확인한다. 어긋나면 즉시 멈추고 방향을 바로잡는다.
  • 최종 응답 전에는 newest-request check를 수행한다. 완료, 생략, 보류, 검증, git 상태를 최신 요청 기준으로 말한다.
  • 모호하지만 안전한 로컬 관례가 있으면 진행하고 가정을 문서화한다. 비용, 보안, 데이터 손실, git history가 걸리면 사용자에게 확인한다.

Read the full file on GitHub · 137 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 · 137 lines · 3,523 tokens per session scan A b7d53319c4d0

Subscribe to this mod's changes

codex-lattice AGENTS.md is an instructions file published in the GitHub repository jh941213/codex-lattice (19 stars, last pushed 3mo ago), licensed MIT. It adds 3,523 tokens to every session, about $0.0176 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.

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 · 6,785 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

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