swe-workflow-skills 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +144 -0
  3. package/VERSION +1 -0
  4. package/bin/cli.mjs +44 -0
  5. package/catalog.json +225 -0
  6. package/commands/role.md +34 -0
  7. package/hooks/session-start.mjs +118 -0
  8. package/install.mjs +318 -0
  9. package/package.json +47 -0
  10. package/roles.json +194 -0
  11. package/scripts/resolve.mjs +296 -0
  12. package/skills/accessibility-design/SKILL.md +128 -0
  13. package/skills/accessibility-design/evals/evals.json +51 -0
  14. package/skills/accessibility-design/references/accessibility-patterns.md +321 -0
  15. package/skills/api-design/SKILL.md +144 -0
  16. package/skills/api-design/evals/evals.json +48 -0
  17. package/skills/api-design/references/rest-conventions.md +147 -0
  18. package/skills/api-design/templates/api-spec.md +156 -0
  19. package/skills/architecture-design/SKILL.md +86 -0
  20. package/skills/architecture-design/evals/evals.json +44 -0
  21. package/skills/architecture-design/references/clean-architecture.md +147 -0
  22. package/skills/architecture-design/references/component-principles.md +129 -0
  23. package/skills/architecture-design/references/principles.md +81 -0
  24. package/skills/architecture-design/references/solid-principles.md +106 -0
  25. package/skills/architecture-design/templates/adr.md +63 -0
  26. package/skills/architecture-documentation/SKILL.md +126 -0
  27. package/skills/architecture-documentation/evals/evals.json +44 -0
  28. package/skills/architecture-documentation/references/abstraction-levels.md +91 -0
  29. package/skills/architecture-documentation/references/diagram-tooling.md +141 -0
  30. package/skills/architecture-documentation/templates/architecture-doc.md +171 -0
  31. package/skills/bug-investigating/SKILL.md +133 -0
  32. package/skills/bug-investigating/evals/evals.json +56 -0
  33. package/skills/bug-investigating/references/common-bugs.md +62 -0
  34. package/skills/bug-investigating/references/debugging-patterns.md +94 -0
  35. package/skills/cicd-pipeline/SKILL.md +87 -0
  36. package/skills/cicd-pipeline/evals/evals.json +34 -0
  37. package/skills/cicd-pipeline/references/pipeline-patterns.md +206 -0
  38. package/skills/cicd-pipeline/templates/github-actions.md +206 -0
  39. package/skills/code-reviewing/SKILL.md +92 -0
  40. package/skills/code-reviewing/evals/evals.json +62 -0
  41. package/skills/code-reviewing/references/error-handling.md +108 -0
  42. package/skills/code-reviewing/references/review-checklist.md +144 -0
  43. package/skills/configuration-strategy/SKILL.md +109 -0
  44. package/skills/configuration-strategy/evals/evals.json +41 -0
  45. package/skills/configuration-strategy/references/config-patterns.md +161 -0
  46. package/skills/containerization/SKILL.md +90 -0
  47. package/skills/containerization/evals/evals.json +36 -0
  48. package/skills/containerization/references/dockerfile-patterns.md +168 -0
  49. package/skills/containerization/templates/dockerfile.md +154 -0
  50. package/skills/data-modeling/SKILL.md +83 -0
  51. package/skills/data-modeling/evals/evals.json +43 -0
  52. package/skills/data-modeling/references/conventions.md +57 -0
  53. package/skills/data-modeling/templates/schema.md +120 -0
  54. package/skills/dependency-impact-analysis/SKILL.md +113 -0
  55. package/skills/dependency-impact-analysis/evals/evals.json +41 -0
  56. package/skills/dependency-impact-analysis/references/impact-patterns.md +150 -0
  57. package/skills/dependency-management/SKILL.md +161 -0
  58. package/skills/dependency-management/evals/evals.json +48 -0
  59. package/skills/dependency-management/references/evaluation-checklist.md +127 -0
  60. package/skills/deployment-checklist/SKILL.md +132 -0
  61. package/skills/deployment-checklist/evals/evals.json +58 -0
  62. package/skills/deployment-checklist/references/pre-deploy-gates.md +91 -0
  63. package/skills/deployment-repo/SKILL.md +190 -0
  64. package/skills/deployment-repo/evals/evals.json +44 -0
  65. package/skills/deployment-repo/references/deployment-repo-patterns.md +258 -0
  66. package/skills/deployment-repo/references/version-compatibility.md +227 -0
  67. package/skills/deployment-repo/templates/deployment-repo-structure.md +226 -0
  68. package/skills/effort-estimation/SKILL.md +95 -0
  69. package/skills/effort-estimation/evals/evals.json +32 -0
  70. package/skills/effort-estimation/references/estimation-methods.md +154 -0
  71. package/skills/feature-planning/SKILL.md +84 -0
  72. package/skills/feature-planning/evals/evals.json +44 -0
  73. package/skills/feature-planning/templates/plan.md +55 -0
  74. package/skills/feature-planning/templates/task.md +26 -0
  75. package/skills/frontend-architecture/SKILL.md +154 -0
  76. package/skills/frontend-architecture/evals/evals.json +34 -0
  77. package/skills/frontend-architecture/references/component-patterns.md +264 -0
  78. package/skills/frontend-architecture/templates/folder-structure.md +203 -0
  79. package/skills/git-workflow/SKILL.md +127 -0
  80. package/skills/git-workflow/evals/evals.json +44 -0
  81. package/skills/git-workflow/references/conventions.md +142 -0
  82. package/skills/git-workflow/templates/pull-request.md +57 -0
  83. package/skills/gitops-delivery/SKILL.md +319 -0
  84. package/skills/gitops-delivery/evals/evals.json +44 -0
  85. package/skills/gitops-delivery/references/gitops-patterns.md +478 -0
  86. package/skills/gitops-delivery/templates/gitops-config.md +196 -0
  87. package/skills/incident-response/SKILL.md +130 -0
  88. package/skills/incident-response/evals/evals.json +55 -0
  89. package/skills/incident-response/references/communication-templates.md +134 -0
  90. package/skills/incident-response/references/severity-levels.md +77 -0
  91. package/skills/incident-response/templates/incident-timeline.md +57 -0
  92. package/skills/infrastructure-as-code/SKILL.md +86 -0
  93. package/skills/infrastructure-as-code/evals/evals.json +33 -0
  94. package/skills/infrastructure-as-code/references/iac-patterns.md +179 -0
  95. package/skills/infrastructure-as-code/templates/terraform-module.md +158 -0
  96. package/skills/metrics-and-okrs/SKILL.md +113 -0
  97. package/skills/metrics-and-okrs/evals/evals.json +33 -0
  98. package/skills/metrics-and-okrs/references/metric-catalog.md +90 -0
  99. package/skills/metrics-and-okrs/templates/okr-document.md +61 -0
  100. package/skills/ml-experiment-tracking/SKILL.md +96 -0
  101. package/skills/ml-experiment-tracking/evals/evals.json +32 -0
  102. package/skills/ml-experiment-tracking/references/tracking-tools.md +127 -0
  103. package/skills/ml-model-deployment/SKILL.md +106 -0
  104. package/skills/ml-model-deployment/evals/evals.json +34 -0
  105. package/skills/ml-model-deployment/references/serving-patterns.md +162 -0
  106. package/skills/ml-pipeline-design/SKILL.md +162 -0
  107. package/skills/ml-pipeline-design/evals/evals.json +34 -0
  108. package/skills/ml-pipeline-design/references/pipeline-components.md +174 -0
  109. package/skills/observability-design/SKILL.md +162 -0
  110. package/skills/observability-design/evals/evals.json +52 -0
  111. package/skills/observability-design/references/logging-patterns.md +229 -0
  112. package/skills/observability-design/references/slo-framework.md +151 -0
  113. package/skills/observability-design/templates/slo-document.md +80 -0
  114. package/skills/performance-optimization/SKILL.md +83 -0
  115. package/skills/performance-optimization/evals/evals.json +47 -0
  116. package/skills/performance-optimization/references/bottleneck-patterns.md +256 -0
  117. package/skills/performance-optimization/references/concurrency.md +101 -0
  118. package/skills/prd-writing/SKILL.md +109 -0
  119. package/skills/prd-writing/evals/evals.json +33 -0
  120. package/skills/prd-writing/references/prd-examples.md +132 -0
  121. package/skills/prd-writing/templates/prd.md +71 -0
  122. package/skills/prd-writing/templates/rfc.md +79 -0
  123. package/skills/project-documentation/SKILL.md +104 -0
  124. package/skills/project-documentation/evals/evals.json +48 -0
  125. package/skills/project-documentation/references/contributing-guide.md +100 -0
  126. package/skills/project-documentation/templates/changelog.md +59 -0
  127. package/skills/project-documentation/templates/readme.md +121 -0
  128. package/skills/project-proposal/SKILL.md +90 -0
  129. package/skills/project-proposal/evals/evals.json +31 -0
  130. package/skills/project-proposal/references/proposal-examples.md +140 -0
  131. package/skills/project-proposal/templates/proposal.md +76 -0
  132. package/skills/project-review/SKILL.md +111 -0
  133. package/skills/project-review/evals/evals.json +42 -0
  134. package/skills/refactoring/SKILL.md +90 -0
  135. package/skills/refactoring/evals/evals.json +44 -0
  136. package/skills/refactoring/references/transformations.md +132 -0
  137. package/skills/retrospective/SKILL.md +157 -0
  138. package/skills/retrospective/evals/evals.json +34 -0
  139. package/skills/retrospective/references/facilitation-guide.md +130 -0
  140. package/skills/retrospective/templates/post-mortem.md +121 -0
  141. package/skills/rollback-strategy/SKILL.md +116 -0
  142. package/skills/rollback-strategy/evals/evals.json +55 -0
  143. package/skills/rollback-strategy/references/rollback-patterns.md +125 -0
  144. package/skills/rollback-strategy/templates/rollback-plan.md +69 -0
  145. package/skills/security-audit/SKILL.md +146 -0
  146. package/skills/security-audit/evals/evals.json +66 -0
  147. package/skills/security-audit/references/owasp-top-10.md +167 -0
  148. package/skills/security-audit/templates/security-report.md +79 -0
  149. package/skills/skill-router/SKILL.md +171 -0
  150. package/skills/skill-router/evals/evals.json +39 -0
  151. package/skills/strategic-review/SKILL.md +106 -0
  152. package/skills/strategic-review/evals/evals.json +42 -0
  153. package/skills/strategic-review/templates/full-review-prompt.md +84 -0
  154. package/skills/tdd-workflow/SKILL.md +147 -0
  155. package/skills/tdd-workflow/evals/evals.json +58 -0
  156. package/skills/tdd-workflow/references/test-quality.md +71 -0
  157. package/skills/technical-debt-review/SKILL.md +113 -0
  158. package/skills/technical-debt-review/evals/evals.json +41 -0
  159. package/skills/technical-debt-review/references/debt-taxonomy.md +124 -0
  160. package/skills/technical-debt-review/templates/debt-audit.md +85 -0
  161. package/skills/test-data-strategy/SKILL.md +129 -0
  162. package/skills/test-data-strategy/evals/evals.json +49 -0
  163. package/skills/test-data-strategy/references/data-generation-patterns.md +341 -0
  164. package/skills/test-suite-design/SKILL.md +137 -0
  165. package/skills/test-suite-design/evals/evals.json +69 -0
  166. package/skills/test-suite-design/references/test-infrastructure.md +175 -0
  167. package/skills/test-suite-design/references/testing-pyramid.md +140 -0
  168. package/skills/ui-ux-design/SKILL.md +117 -0
  169. package/skills/ui-ux-design/evals/evals.json +35 -0
  170. package/skills/ui-ux-design/references/interaction-patterns.md +145 -0
  171. package/skills/ui-ux-design/templates/screen-spec.md +97 -0
  172. package/skills/verification-before-completion/SKILL.md +85 -0
  173. package/skills/verification-before-completion/evals/evals.json +53 -0
  174. package/skills/writing-skills/SKILL.md +87 -0
  175. package/skills/writing-skills/evals/evals.json +41 -0
  176. package/skills/writing-skills/references/pressure-testing.md +69 -0
  177. package/uninstall.mjs +182 -0
@@ -0,0 +1,132 @@
1
+ # Safe Refactoring Transformations
2
+
3
+ ## Contents
4
+ - Extract transformations
5
+ - Move transformations
6
+ - Simplify transformations
7
+ - Rename transformations
8
+ - Data transformations
9
+
10
+ ## Extract Transformations
11
+
12
+ ### Extract Method
13
+ **When**: A code block does a distinct subtask within a larger function.
14
+ **How**: Move the block to a new function. Pass needed values as parameters. Return what the caller needs.
15
+ **Watch for**: Don't extract if it requires more than 3 parameters — that signals the function is entangled with too much state.
16
+
17
+ ### Extract Variable
18
+ **When**: A complex expression is hard to read.
19
+ **How**: Assign the expression to a well-named local variable.
20
+ **Watch for**: Don't create variables for trivially simple expressions.
21
+
22
+ ### Extract Class
23
+ **When**: A class has fields/methods that form a natural cluster separate from the rest.
24
+ **How**: Move the cluster to a new class. The original class delegates to the new one.
25
+ **Watch for**: Don't extract if the "cluster" is just one method — that's probably Extract Method.
26
+
27
+ ### Extract Interface/Protocol
28
+ **When**: Multiple classes share a subset of methods that consumers depend on.
29
+ **How**: Define the shared contract explicitly. Depend on the abstraction.
30
+ **Watch for**: YAGNI — don't extract an interface with only one implementation unless you need it for testing.
31
+
32
+ ## Move Transformations
33
+
34
+ ### Move Method
35
+ **When**: A method uses more data from another class than its own (feature envy).
36
+ **How**: Move it to the class whose data it uses most. The original method becomes a delegating call or is removed.
37
+
38
+ ### Move Field
39
+ **When**: A field is used more by another class than by its owner.
40
+ **How**: Move it and update all references.
41
+
42
+ ### Inline Method
43
+ **When**: A method's body is as clear as its name, or the method is only called once and adds no abstraction value.
44
+ **How**: Replace the call with the method body. Remove the method.
45
+
46
+ ## Simplify Transformations
47
+
48
+ ### Replace Conditional with Early Return
49
+ **When**: Deep nesting from null checks or validation.
50
+ **Before**: `if (x) { if (y) { if (z) { doThing() } } }`
51
+ **After**: `if (!x) return; if (!y) return; if (!z) return; doThing()`
52
+
53
+ ### Replace Conditional with Polymorphism
54
+ **When**: Switch/if-else chains that select behavior based on type.
55
+ **How**: Each case becomes a class implementing a shared interface.
56
+ **Watch for**: Only worthwhile if the switch appears in multiple places.
57
+
58
+ ### Decompose Conditional
59
+ **When**: A complex boolean expression controls flow.
60
+ **How**: Extract each part into a well-named method: `isEligible()` instead of `age > 18 && hasId && !isBanned`.
61
+
62
+ ### Replace Magic Number with Named Constant
63
+ **When**: A literal value has domain meaning.
64
+ **How**: Extract to a constant with a descriptive name.
65
+
66
+ ### Consolidate Duplicate Conditional Fragments
67
+ **When**: The same code appears in every branch of a conditional.
68
+ **How**: Move it outside the conditional.
69
+
70
+ ## Rename Transformations
71
+
72
+ ### Rename Variable/Function/Class
73
+ **When**: The name doesn't reveal intent or uses abbreviations.
74
+ **Rules**:
75
+ - Functions: verb phrases (`calculateTotal`, `sendNotification`)
76
+ - Variables: noun phrases describing the value (`activeUserCount`, not `n`)
77
+ - Booleans: question phrases (`isValid`, `hasPermission`, `canEdit`)
78
+ - Classes: noun phrases for the concept (`OrderProcessor`, not `OrderHelper`)
79
+
80
+ ## Data Transformations
81
+
82
+ ### Introduce Parameter Object
83
+ **When**: A function takes 4+ parameters that travel together.
84
+ **How**: Group them into a named object/struct/dataclass.
85
+ **Benefit**: Reduces function signatures and provides a home for related logic.
86
+
87
+ ### Replace Data Value with Object
88
+ **When**: A primitive (string, number) carries domain meaning (email, money, coordinates).
89
+ **How**: Wrap in a domain type with validation and formatting.
90
+
91
+ ### Encapsulate Collection
92
+ **When**: A class exposes a mutable collection directly.
93
+ **How**: Return a copy or provide add/remove/query methods instead.
94
+
95
+ ## Extended Code Smells
96
+
97
+ These complement the primary smells listed in SKILL.md Step 2. Each is a signal, not a hard rule — context determines whether the smell warrants action.
98
+
99
+ ### Data Clumps
100
+ **Smell**: The same group of fields appears together in multiple function signatures or classes (e.g., `street, city, state, zip`).
101
+ **Fix**: Introduce a parameter object or value type (`Address`) that groups them.
102
+ **Why**: Scattered groups indicate a missing concept in the domain model. Extracting it provides a home for related validation and behavior.
103
+
104
+ ### Speculative Generality
105
+ **Smell**: Abstract classes, interfaces, or parameters that exist "in case we need them later" but have only one implementation or caller.
106
+ **Fix**: Remove the unused abstraction. Reinstate it when a second use case actually appears.
107
+ **Why**: Unused abstractions add indirection that confuses readers and increases maintenance cost for zero benefit.
108
+
109
+ ### Temporary Fields
110
+ **Smell**: Instance variables that are only set and used in certain code paths, leaving them null/undefined the rest of the time.
111
+ **Fix**: Extract the fields and the methods that use them into a separate class, or pass them as method parameters instead of storing as state.
112
+ **Why**: Readers expect instance variables to be meaningful throughout the object's lifetime. Fields that are sometimes null create confusion and null-check clutter.
113
+
114
+ ### Middle Man
115
+ **Smell**: A class where most methods just delegate to another object without adding logic.
116
+ **Fix**: Inline the delegator — have callers use the target class directly. Keep the middle man only if it provides a meaningful abstraction boundary.
117
+ **Why**: Unnecessary delegation adds a layer of indirection that makes code harder to trace without providing value.
118
+
119
+ ### Data Classes
120
+ **Smell**: A class that has only fields and getters/setters with no behavior. Other classes reach in to read its data and perform logic on it (feature envy from the outside).
121
+ **Fix**: Push behavior into the data class. If callers compute derived values from its fields, those computations belong on the class itself.
122
+ **Why**: Data classes violate encapsulation — the logic that belongs with the data is scattered across the codebase.
123
+
124
+ ### Inappropriate Intimacy
125
+ **Smell**: Two classes that know too much about each other's internals — accessing private fields, calling internal methods, or passing internal data structures back and forth.
126
+ **Fix**: Move methods or fields to reduce the coupling. Extract a shared interface if both classes need a common contract. Consider merging if the classes are inseparable.
127
+ **Why**: Intimate coupling means changes to one class ripple unpredictably into the other.
128
+
129
+ ### Comments as Deodorant
130
+ **Smell**: A block comment explaining what a complex piece of code does — not *why*, but *what*. The comment exists because the code is too convoluted to understand on its own.
131
+ **Fix**: Refactor the code so the comment becomes unnecessary. Extract methods with descriptive names, rename variables, simplify conditionals.
132
+ **Why**: The comment is masking a readability problem. If the code changes and the comment doesn't, it becomes a lie. Self-documenting code is more reliable than commented code.
@@ -0,0 +1,157 @@
1
+ ---
2
+ name: retrospective
3
+ description: "Facilitate sprint retros, project post-mortems, and incident post-mortems with actionable, owned improvements. Triggers: retrospective, retro, post-mortem, postmortem, lessons learned, what went wrong, what went well, incident review, blameless, action items, sprint review, after action review."
4
+ model: haiku
5
+ allowed-tools: Read, Grep, Glob, Write, Edit
6
+ ---
7
+
8
+ # Retrospective
9
+
10
+ Facilitate structured reflection that produces concrete improvements. The goal is not to assign blame — it's to make the next iteration better than the last.
11
+
12
+ ## Three Formats
13
+
14
+ ### Sprint Retrospective
15
+ **When**: End of every sprint
16
+ **Duration**: 30-60 minutes
17
+ **Scope**: What happened this sprint
18
+ **Output**: 2-3 action items with owners for next sprint
19
+
20
+ ### Project Post-Mortem
21
+ **When**: After a significant project or milestone completes
22
+ **Duration**: 60-90 minutes
23
+ **Scope**: The entire project from planning through delivery
24
+ **Output**: Written document with learnings and recommendations
25
+
26
+ ### Incident Post-Mortem
27
+ **When**: After any production incident that impacted users
28
+ **Duration**: 60 minutes
29
+ **Scope**: The incident timeline, response, and systemic causes
30
+ **Output**: Blameless post-mortem document with prevention actions
31
+
32
+ ## Workflow: Sprint Retrospective
33
+
34
+ ### Step 1: Gather Data
35
+
36
+ Collect information about the sprint before the meeting:
37
+ - Sprint velocity vs commitment
38
+ - Items completed vs carried over
39
+ - Incidents or bugs discovered
40
+ - Team sentiment (optional pulse survey)
41
+
42
+ ### Step 2: Facilitate Discussion
43
+
44
+ Use one of these formats:
45
+
46
+ **Start/Stop/Continue:**
47
+ - **Start doing**: What should we begin doing that we aren't?
48
+ - **Stop doing**: What's wasting time or causing problems?
49
+ - **Continue doing**: What's working well?
50
+
51
+ **Went Well / Didn't Go Well / Action Items:**
52
+ - What went well this sprint? (Celebrate wins)
53
+ - What didn't go well? (Identify problems without blame)
54
+ - What specific actions will we take to improve?
55
+
56
+ **4Ls (Liked, Learned, Lacked, Longed for):**
57
+ - What did we like about this sprint?
58
+ - What did we learn?
59
+ - What was lacking?
60
+ - What did we long for (wish we had)?
61
+
62
+ ### Step 3: Prioritize Action Items
63
+
64
+ Don't try to fix everything. Pick the top 2-3 improvements:
65
+ - Each action item gets an owner (one person, not "the team")
66
+ - Each action item gets a deadline (usually "by end of next sprint")
67
+ - Each action item is specific enough to verify completion
68
+
69
+ ### Step 4: Record and Follow Up
70
+
71
+ Save the retro notes. At the start of next sprint's retro, review the previous action items: were they completed?
72
+
73
+ ## Workflow: Project Post-Mortem
74
+
75
+ ### Step 1: Prepare the Review
76
+
77
+ Before the meeting, gather:
78
+ - Original project proposal, PRD, and estimates
79
+ - Actual timeline and effort vs estimated
80
+ - Key decisions made during the project and their outcomes
81
+ - Metrics: did the project hit its success criteria?
82
+
83
+ ### Step 2: Walk Through Key Questions
84
+
85
+ 1. **Did we solve the right problem?** Was the original problem statement accurate?
86
+ 2. **Did we estimate well?** Where were estimates off and why?
87
+ 3. **What decisions would we make differently?** (Technical, scope, team)
88
+ 4. **What processes helped?** (What to keep)
89
+ 5. **What processes hindered?** (What to change)
90
+ 6. **What surprised us?** (Unknowns that became knowns too late)
91
+
92
+ ### Step 3: Produce the Document
93
+
94
+ Use the template at [templates/post-mortem.md](templates/post-mortem.md). Share with the team and stakeholders.
95
+
96
+ ## Workflow: Incident Post-Mortem
97
+
98
+ ### Blameless Culture
99
+
100
+ The most important principle: **incidents are caused by systems, not people.** If a human made an error, the question is "why did the system allow that error to cause an outage?" not "who messed up?"
101
+
102
+ ### Step 1: Build the Timeline
103
+
104
+ Reconstruct a minute-by-minute timeline:
105
+ - When did the incident start?
106
+ - When was it detected? (By monitoring or by users?)
107
+ - When was the team alerted?
108
+ - What actions were taken and when?
109
+ - When was the incident resolved?
110
+ - When was the root cause confirmed?
111
+
112
+ ### Step 2: Identify Root Causes
113
+
114
+ Use the "5 Whys" technique to dig past symptoms:
115
+
116
+ ```
117
+ Why did users see errors? → The API returned 500s.
118
+ Why did the API return 500s? → Database connections were exhausted.
119
+ Why were connections exhausted? → A query was holding connections open.
120
+ Why was a query holding connections? → A missing index caused full table scans.
121
+ Why was the index missing? → No index review process exists for migrations.
122
+ → Root cause: No systematic review of database performance for new migrations.
123
+ ```
124
+
125
+ ### Step 3: Define Prevention Actions
126
+
127
+ For each root cause, define an action that prevents recurrence:
128
+
129
+ | Action | Type | Owner | Deadline |
130
+ |--------|------|-------|----------|
131
+ | Add EXPLAIN ANALYZE check to migration CI | Prevention | [Name] | [Date] |
132
+ | Add connection pool monitoring alert | Detection | [Name] | [Date] |
133
+ | Document index guidelines for team | Process | [Name] | [Date] |
134
+
135
+ **Action types:**
136
+ - **Prevention**: Makes the incident impossible to recur
137
+ - **Detection**: Makes the incident detectable before user impact
138
+ - **Mitigation**: Reduces the blast radius if it happens again
139
+ - **Process**: Changes how the team works to reduce risk
140
+
141
+ ### Step 4: Produce the Post-Mortem
142
+
143
+ Use the template at [templates/post-mortem.md](templates/post-mortem.md). Publish internally — transparency builds trust and helps other teams learn.
144
+
145
+ ## Principles Applied
146
+
147
+ - **Blameless over blame**: Focus on systems, not individuals. "The deploy script didn't validate X" not "Dave forgot to check X."
148
+ - **Action over discussion**: Every retro must produce specific, owned action items. A retro without action items is just venting.
149
+ - **KISS**: 2-3 action items per retro, not 15. Fewer items done beats many items forgotten.
150
+ - **Continuous improvement**: Small improvements every sprint compound. A 5% improvement per sprint is 3x better in a year.
151
+
152
+ ## Cross-Skill References
153
+
154
+ - `incident-response` — triggers a post-mortem; use this skill for the post-mortem workflow
155
+ - `technical-debt-review` — if retrospectives repeatedly surface the same maintenance pain, escalate to a full debt review
156
+
157
+ See [references/facilitation-guide.md](references/facilitation-guide.md) for retro formats, handling difficult conversations, and action item quality criteria.
@@ -0,0 +1,34 @@
1
+ {
2
+ "skill_name": "retrospective",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "We just had a production outage — our payment service was down for 45 minutes because a database migration locked a table. 200 users couldn't complete checkouts. Help me write the post-mortem.",
7
+ "expected_output": "Should produce a blameless incident post-mortem with timeline, root cause analysis (5 Whys), and prevention action items.",
8
+ "assertions": [
9
+ "Uses blameless language throughout (systems, not people)",
10
+ "Reconstructs a timeline with key events",
11
+ "Applies 5 Whys to get past 'migration locked table' to systemic cause",
12
+ "Identifies root cause as missing migration safety process, not the specific migration",
13
+ "Action items include prevention, detection, AND process improvements",
14
+ "Each action item has a specific owner and deadline",
15
+ "Includes 'what went well' section (not just what went wrong)",
16
+ "Quantifies impact (200 users, 45 minutes, potential revenue loss)"
17
+ ]
18
+ },
19
+ {
20
+ "id": 2,
21
+ "prompt": "Run a sprint retrospective for our team. This sprint we completed 8 of 10 planned stories, had one carry-over from last sprint, and our CI pipeline was broken for 2 days due to a flaky test. Team morale seems a bit low.",
22
+ "expected_output": "Should facilitate a structured retro using Start/Stop/Continue or similar format, address the specific issues (carry-over, CI, morale), and produce 2-3 actionable items.",
23
+ "assertions": [
24
+ "Uses a structured format (Start/Stop/Continue, 4Ls, or similar)",
25
+ "Addresses the CI breakage specifically (not just generically)",
26
+ "Addresses carry-over pattern (is this recurring?)",
27
+ "Acknowledges morale concern constructively",
28
+ "Produces exactly 2-3 action items (not 10)",
29
+ "Each action item has an owner",
30
+ "Includes review of previous retro action items"
31
+ ]
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,130 @@
1
+ # Retrospective Facilitation Guide
2
+
3
+ ## Choosing the Right Format
4
+
5
+ | Format | Best for | Duration | Energy level needed |
6
+ |--------|----------|----------|---------------------|
7
+ | Start/Stop/Continue | Regular sprint retros, established teams | 45 min | Low |
8
+ | 4Ls (Liked/Learned/Lacked/Longed for) | Teams that want to celebrate learning | 60 min | Medium |
9
+ | Sailboat | Teams stuck in a rut, need fresh perspective | 60 min | Medium |
10
+ | Timeline | Post-mortems, retrospecting on a long project | 90 min | High |
11
+ | DAKI (Drop/Add/Keep/Improve) | Retros focused on process improvement | 60 min | Medium |
12
+
13
+ ---
14
+
15
+ ## Format Details
16
+
17
+ ### Sailboat
18
+
19
+ Draw a boat with:
20
+ - **Wind** (pushing us forward): What helped us move fast?
21
+ - **Anchors** (slowing us down): What slowed us down or held us back?
22
+ - **Rocks ahead** (risks): What might cause problems next sprint?
23
+ - **Sun/island** (destination): What's our goal or ideal state?
24
+
25
+ Works well for teams that have been doing Start/Stop/Continue for too long and need a fresh frame.
26
+
27
+ ### 4Ls
28
+
29
+ - **Liked**: What did you enjoy or appreciate?
30
+ - **Learned**: What did you discover or understand better?
31
+ - **Lacked**: What was missing that would have helped?
32
+ - **Longed for**: What do you wish existed or had happened?
33
+
34
+ Good for teams that focus too much on problems — this format forces recognition of positives and learning.
35
+
36
+ ### DAKI
37
+
38
+ - **Drop**: What should we stop doing entirely?
39
+ - **Add**: What new practice should we start?
40
+ - **Keep**: What's working well that we should protect?
41
+ - **Improve**: What's partially working that we should refine?
42
+
43
+ More action-oriented than Start/Stop/Continue. Useful when "stop doing X" conversations have been unproductive.
44
+
45
+ ---
46
+
47
+ ## Facilitation Techniques
48
+
49
+ ### Silent brainstorming first
50
+
51
+ Before group discussion, have each person write items on sticky notes (or a virtual board) silently for 5 minutes. This:
52
+ - Prevents groupthink (early speakers don't anchor the group)
53
+ - Gives quieter team members equal voice
54
+ - Produces more diverse observations
55
+
56
+ Group similar items by theme before discussing. This keeps discussion focused.
57
+
58
+ ### Dot voting for prioritization
59
+
60
+ After brainstorming, give each person 3-5 votes to allocate across items. They can put multiple votes on a single item if they feel strongly. Items with the most votes become the action item candidates.
61
+
62
+ This avoids long debates about prioritization — the votes speak for themselves.
63
+
64
+ ### Timeboxing discussions
65
+
66
+ Announce timeboxes before discussion starts: "We have 10 minutes for this topic." Visible timers help. When time is up, call for action items or explicitly decide to defer.
67
+
68
+ Without timeboxes, retros consistently over-run and end without action items.
69
+
70
+ ---
71
+
72
+ ## Handling Difficult Conversations
73
+
74
+ ### When blame starts creeping in
75
+
76
+ Redirect with process questions: "What made it easy for that to happen?" or "What would have made it impossible?" This shifts from "Dave deployed bad code" to "our process allowed unreviewed code to reach production."
77
+
78
+ If blame persists: "Let's focus on what we'll do differently, not what was done wrong. What change would prevent this from happening again?"
79
+
80
+ ### When the same issues recur every sprint
81
+
82
+ Two possibilities: the action items weren't done, or they were done but didn't solve the root cause.
83
+
84
+ For action items not done: "We committed to X last sprint. It didn't happen — why? Is this actually important? If yes, what needs to change to make it happen?"
85
+
86
+ For recurring issues after attempted fixes: Use 5 Whys to dig deeper. The real root cause may be one level below what was addressed.
87
+
88
+ ### When a senior person dominates
89
+
90
+ Structure prevents domination more reliably than asking people to hold back. Silent brainstorming first (see above) equalizes input. Go-around techniques ("let's hear from everyone in turn on this") give quieter voices explicit space.
91
+
92
+ ### When there's nothing to discuss
93
+
94
+ Low-energy or "everything was fine" retros usually mean one of:
95
+ - The team is burned out and needs a shorter session
96
+ - Trust hasn't been established for candor
97
+ - The sprint genuinely went well (celebrate it!)
98
+
99
+ For trust issues: Build psychological safety over time by modeling vulnerability: "I'll go first — something I struggled with this sprint was..."
100
+
101
+ ### When a retro produces only complaints with no solutions
102
+
103
+ Require the action item proposal to come from the same person who raised the issue: "You raised this — what one specific thing could we do next sprint to improve it?" This is uncomfortable but effective. Venting without ownership produces nothing.
104
+
105
+ ---
106
+
107
+ ## Action Item Quality
108
+
109
+ Good action items:
110
+ - One owner (a named person, not "the team" or "someone")
111
+ - Specific and verifiable ("Add linting to CI by Friday" not "improve code quality")
112
+ - Realistic for one sprint
113
+ - Tracked: reviewed at the start of the next retro
114
+
115
+ Bad action items:
116
+ - "Be more careful with deployments" — not specific or verifiable
117
+ - "Team to improve test coverage" — no single owner, not measurable
118
+ - "Discuss X next sprint" — a meeting is not an improvement
119
+
120
+ If you can't make an action item specific and owned, it's not ready to commit to. Either refine it or drop it.
121
+
122
+ ---
123
+
124
+ ## Following Up on Previous Action Items
125
+
126
+ Always start the retro by reviewing last sprint's action items:
127
+ - "Was X completed? What was the outcome?"
128
+ - If not completed: "Was this actually important? If yes, carry it forward. If no, drop it."
129
+
130
+ Teams that never review previous action items learn that the retro produces no real change and stop engaging honestly.
@@ -0,0 +1,121 @@
1
+ # Post-Mortem Templates
2
+
3
+ ## Incident Post-Mortem
4
+
5
+ ```markdown
6
+ # Incident Post-Mortem: [Incident Title]
7
+
8
+ **Date**: [YYYY-MM-DD]
9
+ **Severity**: SEV-1 / SEV-2 / SEV-3
10
+ **Duration**: [X hours Y minutes]
11
+ **Author**: [Name]
12
+ **Status**: Draft | In Review | Final
13
+
14
+ ## Summary
15
+
16
+ [2-3 sentences: What happened, what was the user impact, how long it lasted.]
17
+
18
+ ## Impact
19
+
20
+ - **Users affected**: [Number or percentage]
21
+ - **Revenue impact**: [If applicable]
22
+ - **Data impact**: [Any data loss or corruption]
23
+ - **Duration**: [Start time → Detection time → Resolution time]
24
+
25
+ ## Timeline (all times UTC)
26
+
27
+ | Time | Event |
28
+ |------|-------|
29
+ | HH:MM | [First signs of the problem] |
30
+ | HH:MM | [Alert fired / User report received] |
31
+ | HH:MM | [On-call engineer paged] |
32
+ | HH:MM | [Root cause identified] |
33
+ | HH:MM | [Fix deployed] |
34
+ | HH:MM | [Service fully recovered] |
35
+
36
+ **Time to detect**: [How long from start to detection]
37
+ **Time to resolve**: [How long from detection to resolution]
38
+
39
+ ## Root Cause
40
+
41
+ [Detailed explanation of what caused the incident. Use 5 Whys if helpful.
42
+ Be specific and technical. This section should help someone prevent the same issue.]
43
+
44
+ ## What Went Well
45
+
46
+ - [Effective response actions]
47
+ - [Monitoring that helped]
48
+ - [Team coordination that worked]
49
+
50
+ ## What Went Poorly
51
+
52
+ - [Detection gaps]
53
+ - [Response delays]
54
+ - [Missing runbooks or documentation]
55
+
56
+ ## Action Items
57
+
58
+ | Action | Type | Owner | Deadline | Status |
59
+ |--------|------|-------|----------|--------|
60
+ | [Specific action] | Prevention | [Name] | [Date] | ⬜ |
61
+ | [Specific action] | Detection | [Name] | [Date] | ⬜ |
62
+ | [Specific action] | Process | [Name] | [Date] | ⬜ |
63
+
64
+ ## Lessons Learned
65
+
66
+ [Key takeaways that apply beyond this specific incident.]
67
+ ```
68
+
69
+ ## Project Post-Mortem
70
+
71
+ ```markdown
72
+ # Project Post-Mortem: [Project Name]
73
+
74
+ **Date**: [YYYY-MM-DD]
75
+ **Author**: [Name]
76
+ **Project duration**: [Start → End]
77
+ **Team**: [Names/roles]
78
+
79
+ ## Project Summary
80
+
81
+ [What the project set out to do and what it actually delivered.]
82
+
83
+ ## Results vs Goals
84
+
85
+ | Goal | Target | Actual | Met? |
86
+ |------|--------|--------|------|
87
+ | [Goal 1] | [Target] | [Result] | ✅/❌ |
88
+ | [Goal 2] | [Target] | [Result] | ✅/❌ |
89
+
90
+ ## Estimates vs Actuals
91
+
92
+ | | Estimated | Actual | Delta |
93
+ |---|----------|--------|-------|
94
+ | Duration | [X weeks] | [Y weeks] | [+/- N weeks] |
95
+ | Effort | [X person-weeks] | [Y person-weeks] | [+/- N] |
96
+ | Scope | [N features] | [M features] | [Added/cut] |
97
+
98
+ ## What Went Well
99
+
100
+ - [Process, decision, or practice that helped]
101
+ - [Technical approach that paid off]
102
+ - [Team dynamic that worked]
103
+
104
+ ## What Could Be Improved
105
+
106
+ - [Process gap or friction point]
107
+ - [Decision that didn't work out and why]
108
+ - [Estimation miss and what caused it]
109
+
110
+ ## Key Decisions and Their Outcomes
111
+
112
+ | Decision | Why We Made It | Outcome | Would We Do It Again? |
113
+ |----------|---------------|---------|----------------------|
114
+ | [Decision] | [Rationale] | [Result] | Yes/No/Modified |
115
+
116
+ ## Recommendations
117
+
118
+ 1. [Specific recommendation for future projects]
119
+ 2. [Specific recommendation]
120
+ 3. [Specific recommendation]
121
+ ```