Learn
Use this skill after solving a problem so the repository gains a reusable learning in docs/solutions/.
See shared pipeline instructions for model routing and pipeline behavior.
Necessity gate (decide FIRST)
Before writing anything, decide whether this learning is worth preserving. Most solved problems are NOT worth a solution artifact. Silence is acceptable; noise is not.
Worth preserving (ALL must hold)
- Non-trivial — the solution required real investigation, not a one-glance fix.
- Reusable — the root cause or fix pattern could recur in this or another project.
- Not already documented — the knowledge is not trivially findable in framework docs, the codebase, a prior solution artifact, or a commit message.
Not worth preserving (any ONE is disqualifying)
- One-off — a typo, a rename, a personal-environment quirk unlikely to recur.
- Common knowledge — standard framework usage, language basics, or anything a competent practitioner would know or find in official docs in under a minute.
- Already captured — the learning is fully expressed in the code, its tests, a commit message, or an existing
docs/solutions/ artifact.
- Trivial refactor — formatting, import sorting, or mechanical changes with no insight.
- No root cause insight — the fix worked but you cannot explain why it worked; without the "why", the artifact will not help future readers.
Outcome
- If not worth preserving: respond concisely (e.g. "No solution artifact needed: ") and stop. Do not create a file.
- If worth preserving: proceed to Core rules below.
Core rules
- Every solution MUST include YAML frontmatter per
references/solution-schema.yaml (title, category, severity, tags, applies_when).
- Use
references/category-map.md to map the problem to the correct solution category.
- Check for overlap with nearby solution docs before creating a new artifact.
- Use
references/overlap-rules.md to decide whether to create, update, consolidate, or retire.
- Before writing, scan existing artifacts yourself for recurring patterns — read the nearby solution docs and note repeated themes (no dedicated tool needed).
- Structure the document with
assets/solution-template.md.
- Determine storage level:
- Project-specific →
{project-root}/docs/solutions/ (only relevant to current project)
- Cross-project (global) →
~/.pi/agent/docs/solutions/ (applicable to any project)
- Default to global when uncertain.
- Out-of-scope branch: if the request was rejected or already implemented, write to
docs/out-of-scope/ (template: assets/out-of-scope-template.md, convention: assets/out-of-scope-convention.md) instead of docs/solutions/.
- Make the result useful to future
02-plan and 04-review runs via the search strategy in references/solution-search-strategy.md.
- If this phase's plan still sits in
docs/plans/ with work complete (path skipped 04-review), flip its Status header to done and move it to docs/plans/archive/ — same Close semantics as 04-review step 6.
Workflow
- Identify the recently solved problem or learning.
- Scan
docs/solutions/ for related artifacts and recurring patterns, and perform an overlap check.
- Choose the correct category using
references/category-map.md.
- Write or update the solution artifact under
docs/solutions/<category>/.
- Mention how future
02-plan and 04-review runs should benefit from the new learning.
- Include
🧠 Context Status (health, handoff path, active files, new-session recommendation) for workflow closure.
- Save/mention handoff-lite path under
.context/compound-engineering/handoffs/ using the shared Handoff-lite template in skills/references/pipeline-config.md.
Before finishing this skill, apply the completion checklist in shared pipeline instructions.
1---2name: 05-learn3description: Capture solved problems as searchable solution artifacts. Use after a workflow loop completes or a non-trivial problem is solved.4---56# Learn78Use this skill after solving a problem so the repository gains a reusable learning in `docs/solutions/`.910See [shared pipeline instructions](../references/pipeline-config.md) for model routing and pipeline behavior.1112## Necessity gate (decide FIRST)1314**Before writing anything, decide whether this learning is worth preserving.** Most solved problems are NOT worth a solution artifact. Silence is acceptable; noise is not.1516### Worth preserving (ALL must hold)17181. **Non-trivial** — the solution required real investigation, not a one-glance fix.192. **Reusable** — the root cause or fix pattern could recur in this or another project.203. **Not already documented** — the knowledge is not trivially findable in framework docs, the codebase, a prior solution artifact, or a commit message.2122### Not worth preserving (any ONE is disqualifying)2324- **One-off** — a typo, a rename, a personal-environment quirk unlikely to recur.25- **Common knowledge** — standard framework usage, language basics, or anything a competent practitioner would know or find in official docs in under a minute.26- **Already captured** — the learning is fully expressed in the code, its tests, a commit message, or an existing `docs/solutions/` artifact.27- **Trivial refactor** — formatting, import sorting, or mechanical changes with no insight.28- **No root cause insight** — the fix worked but you cannot explain *why* it worked; without the "why", the artifact will not help future readers.2930### Outcome3132- If **not worth preserving**: respond concisely (e.g. "No solution artifact needed: <one-line reason>") and stop. Do not create a file.33- If **worth preserving**: proceed to Core rules below.3435## Core rules3637- Every solution MUST include YAML frontmatter per `references/solution-schema.yaml` (title, category, severity, tags, applies_when).38- Use `references/category-map.md` to map the problem to the correct solution category.39- Check for overlap with nearby solution docs before creating a new artifact.40- Use `references/overlap-rules.md` to decide whether to create, update, consolidate, or retire.41- Before writing, scan existing artifacts yourself for recurring patterns — read the nearby solution docs and note repeated themes (no dedicated tool needed).42- Structure the document with `assets/solution-template.md`.43- Determine storage level:44 - **Project-specific** → `{project-root}/docs/solutions/` (only relevant to current project)45 - **Cross-project (global)** → `~/.pi/agent/docs/solutions/` (applicable to any project)46 - Default to **global** when uncertain.47- **Out-of-scope branch:** if the request was rejected or already implemented, write to `docs/out-of-scope/` (template: `assets/out-of-scope-template.md`, convention: `assets/out-of-scope-convention.md`) instead of `docs/solutions/`.48- Make the result useful to future `02-plan` and `04-review` runs via the search strategy in `references/solution-search-strategy.md`.49- If this phase's plan still sits in `docs/plans/` with work complete (path skipped 04-review), flip its Status header to `done` and move it to `docs/plans/archive/` — same Close semantics as 04-review step 6.5051## Workflow52531. Identify the recently solved problem or learning.542. Scan `docs/solutions/` for related artifacts and recurring patterns, and perform an overlap check.553. Choose the correct category using `references/category-map.md`.564. Write or update the solution artifact under `docs/solutions/<category>/`.575. Mention how future `02-plan` and `04-review` runs should benefit from the new learning.586. Include `🧠 Context Status` (health, handoff path, active files, new-session recommendation) for workflow closure.597. Save/mention handoff-lite path under `.context/compound-engineering/handoffs/` using the shared `Handoff-lite template` in `skills/references/pipeline-config.md`.6061Before finishing this skill, apply the completion checklist in [shared pipeline instructions](../references/pipeline-config.md).