with one click
corgispec-memory-extract
// Extract reusable patterns and session summaries from completed changes into wiki long-term memory.
// Extract reusable patterns and session summaries from completed changes into wiki long-term memory.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | corgispec-memory-extract |
| description | Extract reusable patterns and session summaries from completed changes into wiki long-term memory. |
| license | MIT |
| compatibility | Requires memory/ and wiki/ directories. Called by corgispec-archive before change closure. |
| metadata | {"author":"openspec","version":"1.0","generatedBy":"1.0.0"} |
Extract long-term knowledge from a completed change into wiki.
When a change completes its lifecycle (all Task Groups done, review passed), this skill extracts reusable knowledge before the change is archived. It creates:
wiki/patterns/)wiki/sessions/)wiki/hot.md (move from Active to Recently Shipped)memory/session-bridge.md (clear archived change state)wiki/index.md (add new page links)This is the "knowledge distillation" step — turning ephemeral session work into persistent organizational memory.
corgispec-archive before closing a changeDo not use this skill to initialize memory, answer questions, or validate health.
[x] in tasks.md)memory/ and wiki/ directories existproposal.md and tasks.md at minimumRead the change's artifacts to understand what was accomplished:
proposal.md — the "why" and "what"tasks.md — the work breakdown and what was donedesign.md (if exists) — key design decisionsmemory/session-bridge.md — recent session state related to this changememory/pitfalls.md — pitfalls discovered during this changeAnalyze the change history to identify reusable approaches:
What qualifies as a pattern?
What does NOT qualify?
If patterns are identified, create a file for each at wiki/patterns/<pattern-name>.md:
---
type: wiki
created: <today's date>
source_change: <change-name>
tags: [pattern, <relevant-tags>]
---
# <Pattern Name>
## Context
<When and why this pattern emerged — what problem it solves>
## Pattern
<The approach itself — how to apply it>
## When to Use
- <Condition 1>
- <Condition 2>
## Example
<Brief example from the source change showing the pattern in action>
## Source
- Extracted from change: [[openspec/changes/<change-name>/proposal]]
- Related pitfalls: [[memory/pitfalls]] (if applicable)
If no patterns identified, report: "No reusable patterns identified — change was mechanical or domain-specific." This is normal and not an error.
Create wiki/sessions/<change-name>.md:
---
type: wiki
created: <today's date>
source_change: <change-name>
status: archived
tags: [session, <relevant-tags>]
---
# Session Summary: <change-name>
## Overview
<1-2 sentence summary of what this change accomplished>
## Timeline
- **Proposed**: <date from proposal or git history>
- **Completed**: <today's date>
- **Task Groups**: <N> groups, <M> total tasks
## Key Decisions
<Bullet list of the most important decisions made during implementation, extracted from design.md and session-bridge history>
## Pitfalls Encountered
<Bullet list of pitfalls hit during this change, from pitfalls.md entries linked to this change>
<If none: "No significant pitfalls encountered.">
## Outcome
<Brief assessment: what was delivered, any known limitations>
## References
- Proposal: [[openspec/changes/<change-name>/proposal]]
- Design: [[openspec/changes/<change-name>/design]] (if exists)
- Tasks: [[openspec/changes/<change-name>/tasks]]
If wiki/sessions/<change-name>.md already exists, report "Session summary already exists" and do not overwrite.
Read wiki/hot.md and make these changes:
## Active Changes## Recently Shipped:
- **<change-name>** (<today's date>) — <one-line summary from proposal>
If the change is not listed under Active Changes, add it directly to Recently Shipped without error.
Update memory/session-bridge.md:
updated: frontmatter date to today## Done that relate to the archived change## Waiting that relate to the archived change## New Pitfalls that relate to the archived change (they're already in pitfalls.md)## New Discoveries that relate to the archived change## Active opsx Change:
none/none/mainPreserve entries related to OTHER active changes. Only clear entries linked to the change being archived.
Add links to newly created pages:
## Patterns:
- [[wiki/patterns/<pattern-name>|<Pattern Title>]]
## Session History:
- [[wiki/sessions/<change-name>|<Change Name>]]
## Session History (keep 10 most recent)## Memory Extraction Complete
**Change**: <change-name>
**Patterns extracted**: N (list names)
**Session summary**: wiki/sessions/<change-name>.md
**Hot.md**: moved to Recently Shipped
**Session-bridge**: cleared archived change entries
**Index.md**: updated with N new links
The change is ready for full archive closure.