AGENTS.md Improver
Produce lean repository guidance grounded in the Codex instruction chain that
applies to the launch context.
Action Boundary
- Audit/optimize/plan: inspect and return an evidence-first report with proposed
diffs; do not write.
- Approved plan or explicit scoped change/fix: edit local in-scope files and
validate without another approval round.
- Fully specified trivial edit: implicit routing stays with direct editing;
explicit skill invocation uses a minimal check, edit, validation, then stops.
- Confirm user-global, external, destructive, costly, or scope-expanding work.
Never write Codex-home guidance unless requested.
Workflow
- Resolve project root, launch CWD, candidates, and effective config evidence.
Read Codex discovery semantics before
declaring files active. Prefer structured tools; use one-line
rg --files --hidden with include/exclude globs as the shell fallback.
- Build the root-to-CWD chain, shadows, empty-file and byte-budget state.
Inventory off-chain files separately; unavailable config is
missing evidence.
- Verify commands, paths, ownership, boundaries, and recurring failures. Apply
quality criteria; decide durable instruction
need independently from navigation need.
- Use the report contract for audits. For edits,
follow update guidelines and evidence-backed
templates.
- Run the smallest checks proving the changed claims, then stop.
Evidence Rules
- Separate facts, defaults, inference, and missing evidence; retry suspiciously
empty reads once or twice.
- Treat
evals/ as release evidence, not model or human proof.
- Preserve human/managed content. Change both sibling fenced
code_map.md
templates only when their shared contract changes.
- Audit existing overrides; create one only for an explicit temporary or strong
override need.
Output Contract
Audit output: prioritized findings/evidence/impact/diffs/confidence, conditional
chain/shadows, separate AGENTS/map decisions, validation, and risk. Edit output:
changed files/outcome/preservation and passed/failed/skipped checks. Omit empty
sections; evidence outranks scores.
1---2name: agents-md-improver3description: Audit or improve repository-scoped Codex AGENTS.md, AGENTS.override.md, configured fallback instructions, and companion code_map.md navigation. Use for effective-chain audits, nested conflicts, stale commands, scoped-guidance gaps, approved updates, 优化 AGENTS.md, 审计 Codex 项目指导, 更新 AGENTS.md, or 生成 code_map.md. Exclude Claude-only guidance, general Codex workflow advice, explanations, ordinary code/docs review, and implicit fully specified trivial edits.4---56# AGENTS.md Improver78Produce lean repository guidance grounded in the Codex instruction chain that9applies to the launch context.1011## Action Boundary1213- Audit/optimize/plan: inspect and return an evidence-first report with proposed14 diffs; do not write.15- Approved plan or explicit scoped change/fix: edit local in-scope files and16 validate without another approval round.17- Fully specified trivial edit: implicit routing stays with direct editing;18 explicit skill invocation uses a minimal check, edit, validation, then stops.19- Confirm user-global, external, destructive, costly, or scope-expanding work.20 Never write Codex-home guidance unless requested.2122## Workflow23241. Resolve project root, launch CWD, candidates, and effective config evidence.25 Read [Codex discovery semantics](references/codex-agents-discovery.md) before26 declaring files active. Prefer structured tools; use one-line27 `rg --files --hidden` with include/exclude globs as the shell fallback.282. Build the root-to-CWD chain, shadows, empty-file and byte-budget state.29 Inventory off-chain files separately; unavailable config is `missing evidence`.303. Verify commands, paths, ownership, boundaries, and recurring failures. Apply31 [quality criteria](references/quality-criteria.md); decide durable instruction32 need independently from navigation need.334. Use [the report contract](references/report-format.md) for audits. For edits,34 follow [update guidelines](references/update-guidelines.md) and evidence-backed35 [templates](references/templates.md).365. Run the smallest checks proving the changed claims, then stop.3738## Evidence Rules3940- Separate facts, defaults, inference, and missing evidence; retry suspiciously41 empty reads once or twice.42- Treat `evals/` as release evidence, not model or human proof.43- Preserve human/managed content. Change both sibling fenced `code_map.md`44 templates only when their shared contract changes.45- Audit existing overrides; create one only for an explicit temporary or strong46 override need.4748## Output Contract4950Audit output: prioritized findings/evidence/impact/diffs/confidence, conditional51chain/shadows, separate AGENTS/map decisions, validation, and risk. Edit output:52changed files/outcome/preservation and passed/failed/skipped checks. Omit empty53sections; evidence outranks scores.