一键导入
speckit-retro-run
Conduct a structured retrospective analysis of the completed development cycle with metrics, learnings, and improvement suggestions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Conduct a structured retrospective analysis of the completed development cycle with metrics, learnings, and improvement suggestions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
ACT AS the Agency CEO. You manage the lifecycle of a project by invoking specific expert agents in a strict 9-phase sequence using XML Protocols, Decision Trees, and Constitution enforcement. Integrates with GitHub Spec-Kit v0.4.4 + spec-kit-learn extension. Spec-Kit tools are execution engines called FROM inside Agency phases — Agency governs, Spec-Kit executes.
Act as a Principal Business Analyst (8+ years exp) bridging the gap between Strategy and Execution. Specializes in translating vague vision into rigorous technical specifications using Gherkin (BDD), BPMN 2.0, and strict Requirement Engineering standards.
The ultimate database authority. Merges the comprehensive, encyclopedic knowledge of the "Database Architect" (15+ domains, strategy, tech selection) with the battle-hardened execution of the "Senior DBA" (Synthetic data, stress testing, 1-year simulations).
Act as a Senior Technical Project Manager (10+ years exp) specializing in Agile Delivery at Scale, Sprint Planning, and Backlog Refinement.
Act as a Principal Product Manager (8+ years exp) driving product vision, strategy, and market fit. Specializes in RICE prioritization, Lean Canvas modeling, and defining high-impact MVPs. Bridges the gap between business goals and technical execution.
The ultimate architectural persona. Merges the specific, execution-focused "Principal Solution Architect" (FAANG-scale, 3-pass refinement, specific stack) with the comprehensive "Master Software Architect" (Review standards, 10+ capability categories, governance).
| name | speckit-retro-run |
| description | Conduct a structured retrospective analysis of the completed development cycle with metrics, learnings, and improvement suggestions. |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"extension:retro"} |
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Check for extension hooks (before retro):
.specify/extensions.yml exists in the project root.hooks.before_retro keyenabled is explicitly false. Treat hooks without an enabled field as enabled by default.condition expressions:
condition field, or it is null/empty, treat the hook as executablecondition, skip the hook and leave condition evaluation to the HookExecutor implementationoptional flag:
optional: true):
## Extension Hooks
**Optional Pre-Hook**: {extension}
Command: `/{command}`
Description: {description}
Prompt: {prompt}
To execute: `/{command}`
optional: false):
## Extension Hooks
**Automatic Pre-Hook**: {extension}
Executing: `/{command}`
EXECUTE_COMMAND: {command}
Wait for the result of the hook command before proceeding to the Outline.
.specify/extensions.yml does not exist, skip silentlyConduct a structured retrospective analysis of the completed development cycle — from specification through shipping. Analyze what went well, what didn't, and generate actionable improvement suggestions for future iterations. Track metrics over time to identify trends and continuously improve the spec-driven development process.
CONSTRUCTIVE FOCUS: The retrospective should be balanced — celebrating successes alongside identifying improvements. Avoid blame; focus on process improvements.
DATA-DRIVEN: Base analysis on actual artifacts, git history, and measurable outcomes rather than subjective impressions.
OPTIONAL WRITES: The retro report is always written. Updates to constitution.md with new learnings are offered but require explicit user approval.
Run .specify/scripts/powershell/check-prerequisites.ps1 -Json -RequireTasks -IncludeTasks from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute. For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'''m Groot' (or double-quote if possible: "I'm Groot").
Gather Retrospective Data: Load all available artifacts from the development cycle:
spec.md — original specification and requirementstasks.md — task breakdown and completion statusplan.md — technical plan and architecture decisions.specify/memory/constitution.md — project principlesCollect Git Metrics: Gather quantitative data from the git history:
# Determine the base ref for this feature once per repo.
# Preferred: use the upstream branch (e.g., origin/main, origin/develop):
# BASE_REF="$(git rev-parse --abbrev-ref --symbolic-full-name @{upstream})"
#
# Or set it explicitly if there is no upstream configured:
# BASE_REF=main
# BASE_REF=develop
#
: "${BASE_REF:?Set BASE_REF to the base branch/ref for this feature (e.g., main, develop, or an upstream ref)}"
# Commit count for the feature
git rev-list --count "$BASE_REF"..HEAD
# Files changed
git diff --stat "$BASE_REF"..HEAD
# Lines added/removed
git diff --shortstat "$BASE_REF"..HEAD
# Number of authors
git log "$BASE_REF"..HEAD --format='%an' | sort -u | wc -l
# Date range (first commit to last)
git log "$BASE_REF"..HEAD --format='%ai' | tail -1
git log "$BASE_REF"..HEAD --format='%ai' | head -1
If git data is not available (e.g., already merged), use artifact timestamps and content analysis as fallback.
Specification Accuracy Analysis: Compare the original spec against what was actually built:
Plan Effectiveness Analysis: Evaluate how well the technical plan guided implementation:
Implementation Quality Analysis: Analyze the quality of the implementation based on review and QA data:
Process Metrics Dashboard: Compile a metrics summary:
📊 Development Cycle Metrics
══════════════════════════
Feature: {feature_name}
Duration: {first_commit} → {last_commit}
📝 Specification
Requirements: {total} total, {fulfilled} fulfilled, {partial} partial
Spec Accuracy: {accuracy}%
📋 Planning
Tasks: {total_tasks} total, {completed} completed
Added during impl: {unplanned_tasks}
Plan Score: {plan_score}
💻 Implementation
Commits: {commit_count}
Files changed: {files_changed}
Lines: +{additions} / -{deletions}
Test/Code ratio: {test_ratio}
🔍 Quality
Review findings: 🔴{blockers} 🟡{warnings} 🟢{suggestions}
QA pass rate: {qa_pass_rate}%
Quality Score: {quality_score}
What Went Well (Keep Doing): Identify and celebrate successes:
What Could Improve (Start/Stop Doing): Identify areas for improvement:
Actionable Improvement Suggestions: Generate specific, actionable suggestions:
Example format:
IMP-001 [HIGH] Add data model validation to spec template
→ The spec lacked entity relationship details, causing 3 unplanned tasks during implementation.
→ Suggestion: Add a "Data Model" section to the spec template with entity, attribute, and relationship requirements.
IMP-002 [MEDIUM] Include browser compatibility in QA checklist
→ QA missed a CSS rendering issue in Safari that was caught post-merge.
→ Suggestion: Add cross-browser testing scenarios to the QA test plan.
Historical Trend Analysis (if previous retros exist): If FEATURE_DIR/retros/ contains previous retrospective reports:
Generate Retrospective Report:
.specify/templates/retro-template.md. If the template file does not exist or cannot be read, continue using a reasonable fallback structure based on the sections above.FEATURE_DIR/retros/ directory exists. If it does not exist, create it before writing any files.FEATURE_DIR/retros/retro-{timestamp}.md, using the loaded retrospective report template and filling it with the metrics, findings, and improvement suggestions from the previous steps.Offer Constitution Update:
Based on the retrospective findings, offer to update .specify/memory/constitution.md with new learnings:
Suggest Next Actions:
/speckit.specify"Check for extension hooks (after retro):
.specify/extensions.yml exists in the project root.hooks.after_retro keyenabled is explicitly false. Treat hooks without an enabled field as enabled by default.condition expressions:
condition field, or it is null/empty, treat the hook as executablecondition, skip the hook and leave condition evaluation to the HookExecutor implementationoptional flag:
optional: true):
## Extension Hooks
**Optional Hook**: {extension}
Command: `/{command}`
Description: {description}
Prompt: {prompt}
To execute: `/{command}`
optional: false):
## Extension Hooks
**Automatic Hook**: {extension}
Executing: `/{command}`
EXECUTE_COMMAND: {command}
.specify/extensions.yml does not exist, skip silently