plugins/linear-spec-plugin/skills/run-retrospective/SKILL.md
Post-spec retrospective that captures lessons learned, fixes documentation drift, and proposes skill improvements. Reads the Linear spec, story sub-issues with comments, and the Validation Report. Writes retrospective to the knowledge base on disk and posts a back-link comment on the spec issue.
npx skillsauth add jaisonerick/spec-plugin run-retrospectiveInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Your output: documentation fixes (some on disk, some in Linear), topic-based lesson files in the knowledge base's docs/ (or equivalent), and proposed skill / CLAUDE.md improvements.
The retrospective itself stays on disk — Linear holds the execution unit, the knowledge base holds the durable record.
Scripts live in ${CLAUDE_PLUGIN_DIR}/scripts/linear/. Required: LINEAR_API_KEY. If it isn't set, fetch it from 1Password: export LINEAR_API_KEY="$(op read op://Environments/Linear/credential)".
This skill reads from Linear (story comments, validation report) and writes a single back-link comment on the spec issue at the end. All other writes are to the disk knowledge base.
node "${CLAUDE_PLUGIN_DIR}/scripts/linear/resolve-spec.js" "<identifier>" --require-spec-label
Capture: issue.identifier, issue.url, project.id, project.name, project.documents, issue.description, sub-issues.
The retrospective lives on disk. Find where:
Context: line — this is the path on disk to the project briefing (e.g. ~/code/jaisonerick/second-brain/engagements/dinie/).linear-workflow/docs/approach.md) is:
<engagement>/<os>/retrospectives/spec-vX.Y.md<project>/retrospectives/spec-vX.Y.mdAskUserQuestion for the destination path. Never guess.Gather all sources of truth about what happened during this spec:
resolve-spec.js, fetch:
node "${CLAUDE_PLUGIN_DIR}/scripts/linear/get-issue.js" "<story-id>" --with-comments
Look in the comments for ## Execution Log blocks: Issues Encountered, Struggled With, Decisions Made.Spec vX.Y — Architecture) — for the original plan against which to detect drift.git log --oneline for the spec's timeframe; look for fix commits, reverts, multiple attempts.${CLAUDE_PLUGIN_DIR}/skills/*/SKILL.md for context on what agents are told to do.Categorize findings into four buckets:
Spec architecture says X, but the actual code does Y. Examples:
Things that took multiple attempts. Sources:
Places where agents couldn't proceed without help:
Recurring issues that skills should prevent:
After listing ALL findings across all four categories:
Write the file to the destination determined in Phase 1:
---
title: "Retrospective — <Project> Spec vX.Y"
created: <date>
updated: <date>
type: retrospective
spec: <DIN-XXX URL>
---
# Retrospective — <Project> Spec vX.Y
## Outcome
One paragraph: what shipped, what didn't.
## Timeline
- Architecture: <date>
- Stories created: <date>
- First validation: <date>
- Spec shipped: <date>
## What worked
- ...
## What didn't
- ...
## Top findings
### 1. <Finding title>
<What went wrong, 1-2 sentences>
<What works and how to prevent it, 1-2 sentences>
<Source: validation TC-XXX, story DIN-YYY comment, etc.>
### 2. ...
## Documentation fixes applied
- <doc/file>: <what was fixed>
## Skill improvements proposed
- <skill name>: <change>
Fix factual discrepancies between documentation and reality. These are corrections, not opinions:
cat /tmp/linear-spec/<spec-id>/architecture-fixed.md | \
node "${CLAUDE_PLUGIN_DIR}/scripts/linear/update-document.js" "<arch-doc-id>"
In Progress after merge), transition it now:
node "${CLAUDE_PLUGIN_DIR}/scripts/linear/transition-issue.js" "<story-id>" --state "Done"
Keep changes minimal and factual. Don't rewrite sections — fix specific inaccuracies.
For each category below, present findings to the user via AskUserQuestion and only proceed with approved changes.
docs/ Files (knowledge base)Create or update topic-based files under the knowledge-base docs/ folder (or its equivalent — confirm with the user). Each file covers one topic and can contain multiple findings.
File format:
# <Topic>
## <Finding title>
<What went wrong, 1-2 sentences>
<What works and how to prevent it, 1-2 sentences>
## <Finding title>
...
Rules:
docs/<topic>.md fileBefore writing, ask the user (via AskUserQuestion):
"I found these lessons worth documenting. Which should I save?"
Group proposed changes by skill file. For each:
AskUserQuestion whether to applyOnly for truly universal conventions that apply across ALL specs. These should be rare.
Present each proposed addition and ask via AskUserQuestion before adding.
Post a comment on the spec issue linking the retrospective on disk:
cat <<MD | node "${CLAUDE_PLUGIN_DIR}/scripts/linear/post-comment.js" "<spec-identifier>"
**Retrospective written** — <date>
Path: \`<absolute path to retrospective on disk>\`
Top findings:
1. <finding 1>
2. <finding 2>
3. <finding 3>
MD
If the user already signed off on the spec, transition the issue to Done (if not already):
node "${CLAUDE_PLUGIN_DIR}/scripts/linear/transition-issue.js" "<spec-identifier>" --state "Done"
docs/ (Phase 6A)Retrospective: <project> spec vX.Y — N lessons, M doc fixes, K skill updates
SendMessage:
tools
Assess how the LATEST spec-plugin version is performing across every previous session that invoked it — aggregate run efficiency (thinking%, compactions, exploration-vs-skills, preload firing, fresh-per-story), process adherence, and recurring spec-quality issues — then propose concrete, evidence-backed improvements for the NEXT version (plugin skills/agents/hooks, and spec/process patterns). Read-only: proposes, never self-modifies. Not tied to a single run.
development
Confirm whether a code symbol (method/class/field/endpoint/flag) actually exists and return its REAL signature + definition location — or the nearest match. Uses LSP/introspection, never grep-spelunking. Cheap and fast.
development
Walk one value or action end-to-end across every layer/hop — go-to-definition by go-to-definition, or with a debugger breakpoint — and report the real state transitions and where the contract/shape diverges. The workhorse for architecture sketches and cross-layer debugging.
testing
Bring a fresh worktree/checkout to a runnable state — verify base HEAD, copy gitignored files (.env), allocate per-agent DB/test env, install deps, run the smoke gate. Deterministic, mechanical. Reports a single ready/blocked verdict.