codex-learn
Run a behavior-first Codex retrospective, strengthen relevant guidelines, and route any durable descriptive facts to the canonical knowledge workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run a behavior-first Codex retrospective, strengthen relevant guidelines, and route any durable descriptive facts to the canonical knowledge workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Execute an approved dated spec mission from .codex/specs/ autonomously until final review — self-plan runnable tasks, delegate under the active harness policy, verify acceptance, record ROADMAP dispositions and evidence, and offer session rotation at phase boundaries.
Create a dated mission-scale spec workspace in .codex/specs/ — interview the user, freeze the intent in a reviewable POC artifact, then write a decision-complete SPEC + ROADMAP that a later (often cheaper) session can execute autonomously via $codex-spec-run.
Bulk-maintain Codex current state, task/spec indexes, JOURNAL history, and eligible durable project knowledge at a session boundary.
Run a read-only Codex installation health check using the knowledge checker plus semantic audits of memory and workflow wiring.
Write a single-slot session baton (.codex/HANDOFF.md) that distills this session's reasoning state — objective, hypothesis, evidence, dead ends, exact next step — so a fresh session can resume seamlessly. Run when the context window is nearly full or when pausing mid-investigation.
Create a persistent implementation plan as a markdown document in .codex/tasks/. Replaces session-only /plan mode with a cross-session task file Codex maintains until completion.
| name | codex-learn |
| description | Run a behavior-first Codex retrospective, strengthen relevant guidelines, and route any durable descriptive facts to the canonical knowledge workflow. |
Turn corrections and repeated lessons from completed work into durable behavior. Use the narrowest owner and keep facts, live state, and behavior in their correct tiers.
AGENTS.md in full.rg to find relevant owners; do not read every guideline blindly..codex/CONTEXT.md for current shared state..codex/guidelines/knowledge-management.md in full. Otherwise do not load it..codex/JOURNAL.md, then use targeted rg for matching decisions or pivots. Never full-read JOURNAL by default.Walk the session chronologically. Compare every assistant turn against the rule index and identify:
Use JOURNAL recurrence as evidence: if the same decision or pivot appears at least twice, surface it as a behavioral candidate. Separate one-off environment failures and task-local narrative from reusable behavior. Do not turn a single unverified observation into a rule.
For each validated behavior:
AGENTS.md immediately when evidence identifies the winner. If neither wins, surface the decision instead of silently choosing.AGENTS.md when globally relevant..codex/guidelines/agent-delegation.md.AGENTS.md.Guideline frontmatter uses paths:, description:, when_to_use:, and tags:. Keep paths: and tags: as compact flow sequences. Keep bodies prescriptive and concise; cite stable source paths instead of pasting code.
bash .codex/scripts/knowledge-check.sh --root . after the mutation.CONTEXT.md.review-needed with evidence and status_note.$codex-learn may write an eligible fact immediately. $codex-checkpoint performs bulk maintenance but is not an exclusive knowledge write gate.
paths: and tags: containing 1-5 lowercase kebab-case values..codex/CONTEXT.md; checkpoint owns it..codex/JOURNAL.md.