extract-approach
Place durable learning from a non-trivial solved problem in its smallest authoritative home; create a docs/agent-learnings note only when no better code, test, spec, eval, tracker, or current-pass home exists.
- License 许可
- MIT
- 最近更新
- 2026-10-07
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- extract-approach
- description
- Place durable learning from a non-trivial solved problem in its smallest authoritative home; create a docs/agent-learnings note only when no better code, test, spec, eval, tracker, or current-pass home exists.
03 SKILL.md 正文
extract-approach
Run this placement decision after every non-trivial solved problem, before moving on. "Non-trivial" means any of: more than one approach was attempted, the root cause was not the first hypothesis, the fix required knowledge not written down anywhere in the repo, or a future agent would plausibly burn >15 minutes rediscovering it. The output is a durable canonical home, not necessarily a new Markdown file.
When to use
- A debugging session where the first hypothesis was wrong.
- A workflow/tooling failure with a non-obvious fix that is not already captured in the owning skill or current eval result.
- An experiment/harness pitfall that cost a re-run.
- Any solved problem where you consulted more than the obvious file.
When NOT to use
- Routine work that succeeded first try using documented conventions.
- Facts already encoded in code/tests or recorded in a spec, eval result, current tracker, current pass notes, or an existing learning — improve or link that source instead of duplicating it.
- Generic language/runtime facts whose regression is permanently captured by a focused test and whose explanation adds no project-specific decision.
Workflow
-
Search code/tests, specs, eval results,
PROJECT_TRACKER.md,implementation-notes.md, and existing learnings. Choose the smallest authoritative home that will be encountered when the problem recurs. -
If one exists, update it or record that the learning is already captured; do not create another file.
-
Only when no better home exists, write
docs/agent-learnings/YYYY-MM-DD-short-title.md(today's date, kebab-case title) with exactly these sections:# <Short title> ## Problem What was broken or needed, in one or two sentences. ## Context Where in the repo/workflow this arose; links to files, spec codes, tracker entries. ## Failed approaches Each attempt that didn't work and *why* it failed. "None" if the path was direct (then reconsider whether this note is needed). ## Key insight The single fact or mental-model correction that unlocked the solution. ## Final approach What actually worked, concretely enough to repeat. ## Verification How the solution was proven (commands + observed results). ## Reusable rule One imperative sentence a future agent can follow without reading the rest. ## When to apply again The trigger conditions that should make a future agent reach for this note. -
If the reusable rule contradicts or extends
AGENTS.md, propose theAGENTS.mdedit in the same change (don't let the manual and the learnings drift apart).
Verification requirements
- [ ] The lesson has one named authoritative home and is not duplicated.
- [ ] If a new learning file was necessary, all eight sections are non-empty and "Reusable rule" is one checkable imperative sentence.
- [ ] Existing notes were searched; extend rather than create a near-duplicate.
Expected output
One named durable home, which may be an existing test/spec/eval/tracker/pass note. A new or extended learning note is the fallback, not the default.
Escalation
- The learning implies a spec or pre-registration problem → surface to the user; those documents change only by their own amendment rules.
- Unsure between two Markdown homes → prefer the one already authoritative for the behavior; do not create a third source while uncertain.
04 同仓库更多 Skills
tier0-corpus-rescan
暂无简介
extract-approach
暂无简介
codex-spec-pass
暂无简介
add-fixture-eval
暂无简介
tier0-corpus-rescan
Re-run the Tier 0 anchor classifier against Mastodon/Discourse/Zammad at the pinned spike SHAs and diff per-anchor resolution against the last recorded run. Mandatory pass-boundary gate for any change to compiler behavior (lib/ctxpack/ resolution, callbacks, constants, test candidates, limits).
codex-spec-pass
Run a ctxpack spec implementation pass via the Codex delegation loop — dispatch the brief to Codex, poll in the background, verify session-side requirement-by-requirement, route defects back via --resume, gate on the corpus re-scan, and close with the tracker ritual. Use when PROJECT_TRACKER.md's execution plan calls for implementing a spec pass or a comparable multi-file lib/ change.