lrnev-govern: Instructions file for Codex

AGENTS.md

lrnev-govern AGENTS.md is an instructions file for Codex, OpenCode from LuChangQiu/lrnev-govern. It costs 762 tokens per session, scanned A, original, MIT.

A repository instruction file defining a governed workflow for coding agents. It explains when work is read-only, when a change must be registered, which project records to consult, and how decisions and reusable knowledge are stored.

In plain words
What is it for?
Use it to guide agents working on changes in a repository that uses lrnev governance, including project handover, specification lookup, task registration, and session closeout.
Why use it?
It prevents agents from skipping required project checks or creating formal records for simple read-only questions. It gives the team a consistent way to track scope, decisions, tasks, and project state.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 lrnev-govern AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/luchangqiu/lrnev-govern/agents-md"><img src="https://agentmods.dev/badge/instructions/luchangqiu/lrnev-govern/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 762 This file is loaded in full into every session.
When invoked 762 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.00762 $0.00762
Opus 5 $0.00381 $0.00381
Sonnet 5 $0.00152 $0.00152
Haiku 4.5 $0.00076 $0.00076

Measured 6d ago against content hash 3b5255cea6f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-16, from the pricing page.

Security

Grade A, and why

lrnev-govern 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 6d 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 · 34 lines

What it actually says

项目提示词:Agent 工具栈与工作流(lrnev-govern)

本文件是 lrnev-govern 的固定提示词(AGENTS.md),在本仓库工作的 Agent 必须遵守。 修改边界(强制):本文件是固定规则,AI 不得修改;规则变更请改 .lrnev/steering/ 真源; 易变项目事实(仓库结构/服务清单等)不放本文件。仅当用户明确指示时才允许改动本文件。

0. 本仓库用 lrnev 治理

治理数据在 .lrnev/(Scene/Spec/Task、gate 门禁、ADR/Errorbook/Memory)。 lrnev 是确定性治理引擎(零 LLM):只管"该不该做 / 做到哪 / 怎么验收 / 留什么记录";不查源码——查代码用 grep/read(挂了代码图谱工具则按其说明用)。

1. 每会话开始 / 接手时

先读 .lrnev/steering/ 规则(具体文件):

  • CORE_PRINCIPLES.md — 核心行为原则(必读:ai_followup 必须执行 / 不确定先查档案再问 / 状态机不跨 / 用户决定优先 / 文档维护时机)
  • SCOPE_RULES.md — 写 ADR / Memory / Errorbook 前读(scope 默认 global 的判定规则)
  • ADR_TRIGGERS.md — 对话出现技术选型 / 推翻方案 / 改变决定 / 新依赖 / 全局约束时读(何时该问用户"记 ADR 吗")
  • MEMORY_TRIGGERS.md — 收尾 / 出现可复用经验时读(何时该沉淀项目记忆)
  • CONTEXT_DOCS_TRIGGERS.md — 文档维护时机触发清单(准备改 PROJECT/ARCHITECTURE/scene 三件套前读)

接手全景:project_status(现状快照)→ governance_map(scene→spec 全景);回看验收口径 spec_get;找相关文档 context_search

2. 第一判断:只读 vs 要改

  • 只读(查代码 / 定位 / 解释 / 分析 / 回答问题):直接做——不 project_status、不开 spec/task(不为形式主义走治理流程)。
  • 要改:按 .lrnev/steering/CORE_PRINCIPLES.md 的分流与登记纪律执行(小改动直接做;已有 Spec 的开发 / 扩展先 task_create 登记再实施;独立新特性才 spec_create)。

3. 速查与收尾

  • 手册:lrnev_guide(不懂就问,禁止猜参数);结构异常:lrnev_doctor;体检:lrnev_report(只读,非必走)。
  • 验证:代码写完 ≠ 任务完成——按项目实情验证(测试 / 构建 / 类型检查等最小充分集)通过后才 task_update(completed);验证失败不得标记 completed。
  • 收尾:阶段完成 summarize_save 更新 L0/L1;会话压缩 / 结束前 session_commit 沉淀候选记忆。
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. 6d ago First seen · 34 lines · 762 tokens per session scan A 3b5255cea6f5

Subscribe to this mod's changes

lrnev-govern AGENTS.md is an instructions file published in the GitHub repository LuChangQiu/lrnev-govern (16 stars, last pushed 6d ago), licensed MIT. It adds 762 tokens to every session, about $0.0038 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-09-10.

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 · 8,838 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,126 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

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