Post-merge learning extraction. Reads the completed artefact chain for a merged story or feature, identifies reusable patterns, decisions, and standards that emerged during delivery, classifies them, and writes them back to the permanent knowledge base. Produces updates to standards/, decisions log, or copilot-instructions.md. Use after /definition-of-done is complete and a PR is merged. Run when someone says "levelup", "extract learnings", "update standards", "what did we learn from this", "pattern extraction", or "post-merge review". Requires a merged PR and completed DoD artefact.
41:T17e5,
Before proceeding, verify:
artefacts/[feature]/dod/[story-slug]-dod.mdartefacts/[feature]/stories/[story-slug].mdIf not met:
❌ Entry condition not met /levelup requires a merged PR and a completed /definition-of-done artefact.
Missing: [specific item]
Run /definition-of-done first, then return here.
Read the following artefacts in sequence:
artefacts/[feature]/discovery.md — original problem and constraintsartefacts/[feature]/decisions.mdartefacts/[feature]/stories/[story-slug].md — the story ACs and NFRsartefacts/[feature]/test-plans/[story-slug]-test-plan.md — test strategyartefacts/[feature]/dor/[story-slug]-dor.md — standards injected at DoRartefacts/[feature]/dod/[story-slug]-dod.md — what actually shippedSummarise what was found:
Artefact chain read for [story-slug]:
- Discovery: [one sentence problem summary]
- Decisions logged: [n]
- ACs shipped: [n/n]
- NFRs verified: [list]
- Standards injected at DoR: [list or "none"]
Ready to scan for learnings. Reply: go
Scan across the artefact chain and identify items in these four categories:
Things that worked well and should be repeated in future stories:
Moments where a missing standard caused confusion, a PR comment, or rework:
Decisions that are likely to recur and shouldn't be re-litigated each time:
Methods tried and found to not work:
Present findings for confirmation:
Patterns identified:
[Category A — n items]
- [summarise each]
[Category B — n items]
- [summarise each]
[Category C — n items]
- [summarise each]
[Category D — n items]
- [summarise each]
Do you want to capture all of these, or select specific ones? Reply: all — or list which to keep
For each accepted item, determine where it should be written:
| Type | Destination |
|---|---|
| Language/framework convention | .github/standards/[domain]/[standard].md |
| Architectural decision | .github/architecture-guardrails.md (Active ADRs) |
| Recurring scope or risk call | artefacts/[feature]/decisions.md + summary to guardrails if structural |
| Coding pattern | .github/standards/[domain]/[standard].md |
| Product/process insight | Note in /decisions for team awareness |
| Anti-pattern | .github/standards/[domain]/[standard].md (under "What to avoid") |
Confirm routing before writing:
Proposed writes:
- [item]: →
.github/standards/api/api-design.md(new rule under "Naming")- [item]: →
.github/architecture-guardrails.md(new ADR: "Adopt [pattern]")- [item]: →
artefacts/[feature]/decisions.md(recurring scope call)Confirm these destinations? Reply: yes — or adjust any routing
For each confirmed item, produce the exact text to add and the target location.
Standards files: append under the relevant section heading. Create the file and section if they don't exist — don't leave orphaned rules.
Architecture guardrails: append a new ADR block:
### ADR-[n]: [Decision title]
**Date:** [YYYY-MM-DD]
**Status:** Active
**Context:** [one sentence — what situation prompted this]
**Decision:** [what was decided]
**Rationale:** [why]
**Consequences:** [what this rules in or rules out going forward]
copilot-instructions.md: if a coding standard is universal (not domain-specific),
add it to the coding standards section.
Confirm each write before creating it:
Writing to
.github/standards/api/api-design.md: [preview of exact text]Confirm? Reply: yes — or adjust the wording
After writing to any standards file:
.github/standards/index.ymlStandards index updated: [file] added to
[domain]section.
✅ Levelup complete — [story-slug]
Patterns extracted: [n] Standards updated: [list of files] ADRs added: [n] Decisions logged: [n]
These learnings are now active — /definition-of-ready will inject them into future stories with matching domain tags.
Recommended: commit
.github/standards/and.github/architecture-guardrails.mdwith message:chore: extract learnings from [story-slug]
Mandatory. Do not close this skill without completing this write.
Update .github/pipeline-state.json:
lastLevelup: "[YYYY-MM-DD]"standards: add each updated file name to a recentUpdates listConfirm the write in your closing message: "Pipeline state updated ✅."