一键导入
corgispec-memory-extract
Extract reusable patterns and session summaries from completed changes into wiki long-term memory.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Extract reusable patterns and session summaries from completed changes into wiki long-term memory.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create or complete a CorgiSpec planning package and synchronize one GitHub parent issue plus Task Group child issues. Use when proposing a change whose normalized tracking provider is GitHub.
Create or complete a CorgiSpec planning package and optionally synchronize GitLab issues. Use when proposing a new change or finishing an existing change whose normalized tracking provider is GitLab or none.
Execute or resume a CorgiSpec Run Contract v2 one Task Group at a time through the canonical corgispec loop CLI. Use when starting, continuing, fixing, committing, recovering, or finalizing an implementation run; never write loop state or evidence artifacts directly.
Implement exactly one pending Task Group from a CorgiSpec change and optionally synchronize GitLab progress. Use when applying a change whose normalized tracking provider is GitLab or none.
Validate and archive a completed CorgiSpec change, extract durable knowledge, and optionally close GitLab tracking. Use when archiving a change whose normalized tracking provider is GitLab or none.
Compare fresh CorgiSpec planning, implementation, Git, and run evidence and close only implementation gaps through the canonical converge CLI. Use after implementation or review when deciding whether a change is converged, planning needs update, or a new append-only Task Group is required.
| 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":"corgispec","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 corgi 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:
If a pattern was created → add under ## Patterns:
- [[wiki/patterns/<pattern-name>|<Pattern Title>]]
Add the session summary under ## Session History:
- [[wiki/sessions/<change-name>|<Change Name>]]
Check size: If index.md exceeds 80 lines after updates:
## Session History (keep 10 most recent)Update _index.md files (see wiki/schema.md for format convention):
wiki/patterns/_index.md following the existing format: - [[filename|Title]] — date — brief descriptionwiki/sessions/_index.md following the same format## 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.