Knowledge Extract
Turn observed behavior into a reusable skill draft. Drafts stay under the private plans/ tree until a human promotes them.
Procedure
Pipeline
Observe -> Capture -> Draft -> Validate -> Promote
| Step | Output | Location |
|---|---|---|
| Observe | Pattern seen at least three times | session notes |
| Capture | One-paragraph note | plans/skills/drafts/notes/ |
| Draft | Full SKILL.md | plans/skills/drafts/<name>/SKILL.md |
| Validate | Evaluator and validator pass | same draft folder |
| Promote | Human moves the folder | skills/core/<name>/ |
Step 1 - Observe
A pattern qualifies when it repeats:
- The same correction was applied to two different problems.
- The same pre-check precedes a class of work every time.
- A recurring phrasing maps to a recurring intent.
One occurrence is an anecdote. Wait for the third.
Step 2 - Capture
Draft one paragraph in a note:
## Pattern
[One sentence: what recurs]
## Why it matters
[The cost when the pattern is missed]
## Examples
- [date] [context where it applied]
If the note is still interesting a week later, draft the skill.
Step 3 - Draft
Create plans/skills/drafts/<name>/SKILL.md with:
---
name: <kebab-name>
description: "<what it does>. Use when <specific situation>."
version: 0.1.0
license: MIT
author: Agent Foundry Contributors
status: draft
source: local
---
Then add:
- A procedure with concrete steps.
- At least two anti-patterns with reasons.
- A checklist that tests this skill's output.
Do not invent a script, hook, or companion dependency. If the pattern needs one, say it does not ship and describe the manual fallback.
Step 4 - Validate
./.venv/Scripts/python.exe scripts/foundry-eval.py --target plans/skills/drafts/<name>/SKILL.md
bash scripts/validate.sh
Both must pass. The evaluator checks metadata, trigger count, path references, and body size.
Step 5 - Promote
A human reviews the draft, changes status: draft to status: active, moves the folder to skills/core/<name>/, and regenerates the skill index. No script promotes drafts automatically.
Anti-patterns
- Drafting from one occurrence.
- Promoting a draft into
skills/while its claims are still unverified. - Writing a generic checklist that could belong to any skill.
- Referencing a helper that does not exist.
- Keeping the draft path outside the private
plans/tree.
References
- details
Verification Checklist
- [ ] The pattern has at least three observed occurrences.
- [ ] The draft lives under
plans/skills/drafts/. - [ ] The description has exactly one trigger phrase.
- [ ] The checklist tests this skill's actual output.
- [ ]
foundry-evalpasses before promotion.