Speckit retrospective analyze

From racecraft-lab/Paddock · View interactive version

Speckit retrospective analyze is an AI agent skill from the GitHub repository racecraft-lab/Paddock. Perform a post-implementation retrospective analysis measuring spec adherence, implementation deviations, and lessons learned.

How to use this skill

Skill file

User Input

$ARGUMENTS

Consider user input before proceeding (if not empty).

Goal

Analyze completed implementation against spec.md, plan.md, and tasks.md to measure spec adherence and drift. Generate actionable insights for future SDD cycles.

Constraints

Execution Steps

1. Initialize Context

Run .specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks from repo root. Parse JSON for FEATURE_DIR and AVAILABLE_DOCS. Derive paths: SPEC, PLAN, TASKS = FEATURE_DIR/{spec,plan,tasks}.md. Abort if missing.

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").

2. Validate Completeness

total_tasks=$(grep -c '^- \[[ Xx]\]' "$TASKS" || echo 0)
completed_tasks=$(grep -c '^- \[[Xx]\]' "$TASKS" || echo 0)
if [ "$total_tasks" -eq 0 ]; then
  echo "No tasks found in $TASKS" && exit 1
fi
completion_rate=$((completed_tasks * 100 / total_tasks))

Completion thresholds:

3. Load Artifacts

4. Discover Implementation

5. Spec Drift Analysis

Perform:

  1. Requirement coverage (implemented, partial, not implemented, modified, unspecified)
  2. Success criteria validation
  3. Architecture drift against plan
  4. Task fidelity (completed/modified/added/dropped)
  5. Timeline and blockers (if available)

Calculate:

Spec Adherence % = ((IMPLEMENTED + MODIFIED + (PARTIAL * 0.5)) / (Total Requirements - UNSPECIFIED)) * 100

Where Total Requirements is the count of all FR-XXX, NFR-XXX, SC-XXX from spec.md.

6. Severity Classification

Classify findings as:

7. Innovation Opportunities

For positive deviations, document:

8. Root Cause Analysis

For key deviations capture:

9. Constitution Compliance

Check each constitution article against implementation. Treat violations as CRITICAL.

10. Generate Report

Create retrospective.md with:

11. Self-Assessment Checklist (Required)

Before finalizing output, run this checklist and mark each item as PASS/FAIL:

Blocking rule:

12. Save Report

  1. Write to FEATURE_DIR/retrospective.md
  2. Optionally commit with:
  1. Confirm:

13. Human Gate Before Spec Changes

If retrospective findings recommend updating or regenerating the spec:

  1. Present a short summary of the proposed spec.md changes, referencing the Proposed Spec Changes section.
  2. Ask explicitly: Do you want me to modify spec.md now? (y/N)
  3. Treat any response other than y, yes, si, s, or sí as NO.
  4. Require a separate confirmation for each spec-modifying action (for example, each /speckit.specify run or direct spec.md edit).
  5. If declined or no response, do not modify spec and continue with report-only recommendations.

Treat launching /speckit.specify as a spec-modifying action that requires this gate.

14. Follow-up Actions

Prioritize:

  1. CRITICAL: constitution violations, breaking changes, security issues
  2. HIGH: significant drift and process improvements
  3. MEDIUM: best practices and constitution candidates
  4. LOW: minor optimizations

Follow-up commands:

Guidelines

Count as Drift

Features differing from spec, dropped requirements, scope creep, or changes in technical approach.

Not Drift

Implementation details, bounded optimizations, bug fixes, refactoring, and test improvements.

Principles

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.