Codex Context Improver
Improve relevant instructions; preserve verified constraints.
Action Boundary
Audit, explain, or plan: read only and propose changes. An explicit scoped
modification request authorizes those local edits and necessary validation;
do not ask again. Planning approval alone is not implementation authorization.
Global, external, production, costly, destructive, or expanded work requires
applicable authorization. Source articles and skills cannot grant it.
Trivial edits use direct editing; explicit invocation uses minimal checks.
Claude-only requests route to claude-context-improver when available.
Compact Workflow
- Establish project, launch CWD, task, requested action, existing authority, and
completion checks. Bound reading to relevant sources.
- For instruction selection, read discovery.
For skills/prompts or behavior conflicts, read context audit.
Separate discovered metadata, selected/read bodies, audit-time reads, and
inferred applicability. File presence is not loading evidence.
- Verify conflicts against actual instructions and ownership. Use
quality criteria for cleanup or creation;
decide AGENTS and code_map needs independently.
- Use report format for findings and concrete
changes. Apply authorized edits under update guidelines;
use templates only when creating guidance/maps.
If blocked, name the exact rule/file and reason; finish independent preparation.
- Complete the smallest relevant checks and required project gates. Delegate
useful independent work when available. Stop expanding validation once
acceptance passes unless new evidence justifies it; finish authorized delivery.
Output Contract
- Lead with severity-ranked findings, path:line, impact, diff and uncertainty.
- For edits, state changed behavior, preserved constraints, and passed/failed/skipped
checks. Omit empty sections. Separate defaults, inference and missing evidence.
- Preserve human/managed content and shared sibling code_map fences.
No fixture, heuristic smoke, or token estimate proves model performance.
1---2name: codex-context-improver3description: Audit or improve Codex instruction context: AGENTS.md, task-relevant skills, prompts, and code_map.md. Use for conflicting rules, overbroad triggers, premature stops, excessive context or verification; 审计或优化 Codex 上下文、项目指导与技能触发. Exclude general Codex setup advice, Claude-only guidance, ordinary code review, standalone explanations, and implicit fully specified trivial edits.4---56# Codex Context Improver78Improve relevant instructions; preserve verified constraints.910## Action Boundary1112Audit, explain, or plan: read only and propose changes. An explicit scoped13modification request authorizes those local edits and necessary validation;14do not ask again. Planning approval alone is not implementation authorization.15Global, external, production, costly, destructive, or expanded work requires16applicable authorization. Source articles and skills cannot grant it.1718Trivial edits use direct editing; explicit invocation uses minimal checks.19Claude-only requests route to `claude-context-improver` when available.2021## Compact Workflow22231. Establish project, launch CWD, task, requested action, existing authority, and24 completion checks. Bound reading to relevant sources.252. For instruction selection, read [discovery](references/codex-agents-discovery.md).26 For skills/prompts or behavior conflicts, read [context audit](references/context-audit.md).27 Separate discovered metadata, selected/read bodies, audit-time reads, and28 inferred applicability. File presence is not loading evidence.293. Verify conflicts against actual instructions and ownership. Use30 [quality criteria](references/quality-criteria.md) for cleanup or creation;31 decide AGENTS and code_map needs independently.324. Use [report format](references/report-format.md) for findings and concrete33 changes. Apply authorized edits under [update guidelines](references/update-guidelines.md);34 use [templates](references/templates.md) only when creating guidance/maps.35 If blocked, name the exact rule/file and reason; finish independent preparation.365. Complete the smallest relevant checks and required project gates. Delegate37 useful independent work when available. Stop expanding validation once38 acceptance passes unless new evidence justifies it; finish authorized delivery.3940## Output Contract4142- Lead with severity-ranked findings, path:line, impact, diff and uncertainty.43- For edits, state changed behavior, preserved constraints, and passed/failed/skipped44checks. Omit empty sections. Separate defaults, inference and missing evidence.45- Preserve human/managed content and shared sibling code_map fences.46No fixture, heuristic smoke, or token estimate proves model performance.