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,95 @@
1
+ ---
2
+ name: effort-estimation
3
+ description: "Estimate engineering effort with agile techniques — story points, t-shirt sizing, three-point estimation, capacity planning. Triggers: estimate this, how long will this take, story points, t-shirt sizing, effort estimation, capacity planning, sprint planning, budget estimate, forecast, velocity, when will this be done."
4
+ model: haiku
5
+ allowed-tools: Read, Grep, Glob, Write, Edit
6
+ ---
7
+
8
+ # Effort Estimation
9
+
10
+ Produce honest, useful estimates that help teams plan without creating false precision. Estimation in agile is about making informed decisions under uncertainty, not predicting the future exactly.
11
+
12
+ ## Core Philosophy
13
+
14
+ **Estimates are forecasts, not commitments.** They communicate "based on what we know today, here's our best guess at the range of effort." They should always include uncertainty ranges, and they should improve as you learn more.
15
+
16
+ ## Workflow
17
+
18
+ ### Step 1: Ensure Tasks Are Defined
19
+
20
+ You can't estimate undefined work. Before estimating, ensure:
21
+
22
+ - Tasks are broken down (use `feature-planning` if not)
23
+ - Acceptance criteria exist for each task
24
+ - Technical approach is at least sketched (spikes completed for unknowns)
25
+
26
+ If the work is too vague to estimate, say so. "I can't estimate this until we do a spike" is a valid and responsible answer.
27
+
28
+ ### Step 2: Choose the Estimation Method
29
+
30
+ | Method | Best For | Precision | Speed |
31
+ |--------|----------|-----------|-------|
32
+ | **T-shirt sizing** | Roadmap planning, early-stage sizing, large backlogs | Low (ranges) | Very fast |
33
+ | **Story points** (Fibonacci) | Sprint planning, velocity tracking, mature teams | Medium (relative) | Moderate |
34
+ | **Three-point estimation** | High-stakes estimates, budget requests, uncertain work | High (ranges with confidence) | Slow |
35
+ | **Time-based** | Well-understood tasks with low uncertainty | High (hours/days) | Moderate |
36
+
37
+ **Default recommendation**: T-shirt sizing for roadmap/quarter planning, story points for sprint planning. Three-point for budget requests and stakeholder communication.
38
+
39
+ ### Step 3: Apply the Method
40
+
41
+ See [references/estimation-methods.md](references/estimation-methods.md) for detailed guidance on each method.
42
+
43
+ **Key principles across all methods:**
44
+
45
+ 1. **Estimate as a team**, not individually. The person most and least familiar with the area should both contribute — the gap reveals hidden complexity.
46
+ 2. **Estimate relative to known work**, not in absolute terms. "This is about twice as hard as that login feature we built" is more accurate than "this will take 3 days."
47
+ 3. **Include uncertainty explicitly.** "3-5 days" is more honest than "4 days."
48
+ 4. **Estimate the work, not the worker.** Story points measure the task's size, not who's doing it.
49
+ 5. **Re-estimate when you learn more.** Initial estimates are educated guesses. Update them as spikes complete and requirements clarify.
50
+
51
+ ### Step 4: Handle Budget and Timeline Requests
52
+
53
+ When stakeholders need dates or dollars, translate estimates thoughtfully:
54
+
55
+ **From story points to time:**
56
+ ```
57
+ Estimated story points for the project: 85
58
+ Team velocity: ~30 points per sprint (2-week sprints)
59
+ Sprints needed: 85 / 30 = ~3 sprints = 6 weeks
60
+
61
+ Add buffer for unknowns (20-30%): 7-8 weeks
62
+ Communicate as range: "6-8 weeks with the current team"
63
+ ```
64
+
65
+ **From effort to cost:**
66
+ ```
67
+ Effort estimate: 12-16 person-weeks
68
+ Team loaded cost: $X per person-week
69
+ Total: 12 × $X to 16 × $X
70
+ Communicate as range: "$A - $B"
71
+ ```
72
+
73
+ **Always provide ranges, never single numbers.** A single number becomes a commitment; a range communicates confidence.
74
+
75
+ ### Step 5: Track and Calibrate
76
+
77
+ Estimates improve with feedback. After each sprint or project:
78
+
79
+ - Compare estimated vs actual effort
80
+ - Identify systematic patterns (always overestimate UI? Always underestimate integrations?)
81
+ - Adjust team velocity based on recent data (use the last 3-5 sprints, not all-time average)
82
+
83
+ ## Common Estimation Traps
84
+
85
+ - **Anchoring**: The first number said influences everyone else. Use blind estimation (planning poker, simultaneous reveal).
86
+ - **Planning fallacy**: People consistently underestimate. Use historical data to calibrate.
87
+ - **Scope creep blindness**: Estimate the work as defined, then add buffer for scope growth — it always grows.
88
+ - **Hero planning**: Estimating based on the best-case scenario with the best developer with zero interruptions. Estimate for a typical day with meetings and context switches.
89
+ - **Precision theater**: Saying "47 hours" when you mean "roughly a week." False precision erodes trust faster than honest ranges.
90
+
91
+ ## Principles Applied
92
+
93
+ - **KISS**: Use the simplest estimation method appropriate. T-shirt sizing is fine for most roadmap decisions.
94
+ - **Honesty over optimism**: A realistic estimate that disappoints a stakeholder is better than an optimistic estimate that misses a deadline.
95
+ - **YAGNI**: Don't estimate items far in the future with precision. Estimate near-term work in detail, far-term work in ranges.
@@ -0,0 +1,32 @@
1
+ {
2
+ "skill_name": "effort-estimation",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "My PM asked me 'how long will it take to build a notification system?' I have a feature plan with 8 tasks. Help me estimate and communicate this to the PM.",
7
+ "expected_output": "Should walk through estimating each task, choose appropriate method, calculate total with buffer, and produce stakeholder-friendly communication with ranges.",
8
+ "assertions": [
9
+ "Chooses an appropriate estimation method for the context",
10
+ "Estimates each task individually, not the project as a single unit",
11
+ "Produces a range, not a single number",
12
+ "Includes buffer for unknowns (20-30%)",
13
+ "Communicates in stakeholder-friendly language (weeks, not story points)",
14
+ "States assumptions explicitly",
15
+ "Does NOT promise a specific date without qualifying it"
16
+ ]
17
+ },
18
+ {
19
+ "id": 2,
20
+ "prompt": "Our VP wants a budget estimate for a 6-month data platform rebuild. We're in early discovery and a lot is still unknown. How do I estimate this responsibly?",
21
+ "expected_output": "Should recommend three-point estimation for high-uncertainty work, produce wide ranges, clearly state assumptions and unknowns, and suggest narrowing the estimate through phased discovery.",
22
+ "assertions": [
23
+ "Recommends three-point estimation due to high uncertainty",
24
+ "Produces wide initial ranges (appropriate for early discovery)",
25
+ "Suggests a phased approach: estimate phase 1 tightly, phases 2-3 loosely",
26
+ "Clearly states which assumptions drive the estimate",
27
+ "Recommends a technical spike before committing to precise numbers",
28
+ "Does NOT produce a precise single-number estimate for 6 months of unknown work"
29
+ ]
30
+ }
31
+ ]
32
+ }
@@ -0,0 +1,154 @@
1
+ # Estimation Methods
2
+
3
+ ## Contents
4
+ - T-shirt sizing guide
5
+ - Story points with Fibonacci
6
+ - Three-point estimation
7
+ - Velocity and capacity planning
8
+ - Communicating estimates to stakeholders
9
+
10
+ ## T-Shirt Sizing
11
+
12
+ Best for: roadmap planning, early-stage scoping, large backlogs (50+ items).
13
+
14
+ | Size | Relative Effort | Typical Duration | Uncertainty |
15
+ |------|----------------|-----------------|-------------|
16
+ | XS | Trivial | Hours | Very low |
17
+ | S | Simple, well-understood | 1-2 days | Low |
18
+ | M | Moderate complexity | 3-5 days | Medium |
19
+ | L | Complex, some unknowns | 1-2 weeks | High |
20
+ | XL | Very complex, significant unknowns | 2-4 weeks | Very high — break it down |
21
+
22
+ **Process:**
23
+ 1. Pick 3-5 reference items the team already understands well. Place them on the scale.
24
+ 2. For each new item, discuss briefly: "Is this bigger or smaller than reference X?"
25
+ 3. Place it on the scale. If there's disagreement, discuss briefly and converge.
26
+ 4. Any XL item should be broken into smaller items before sprint planning.
27
+
28
+ **Converting to time for roadmap purposes:**
29
+ ```
30
+ XS: 0.5 days S: 2 days M: 5 days L: 10 days XL: 20 days
31
+ Sum all items × buffer (1.3-1.5) = rough project duration
32
+ ```
33
+
34
+ ## Story Points (Fibonacci)
35
+
36
+ Best for: sprint planning, velocity tracking with mature agile teams.
37
+
38
+ Scale: 1, 2, 3, 5, 8, 13, 21
39
+
40
+ | Points | Meaning |
41
+ |--------|---------|
42
+ | 1 | Trivial — clear, no unknowns, done in minutes to an hour |
43
+ | 2 | Small — straightforward, few unknowns |
44
+ | 3 | Small-medium — some complexity or one minor unknown |
45
+ | 5 | Medium — moderate complexity, some unknowns |
46
+ | 8 | Large — significant complexity, multiple unknowns |
47
+ | 13 | Very large — high complexity, should consider splitting |
48
+ | 21 | Epic — too large for a single sprint, must be broken down |
49
+
50
+ **Planning Poker process:**
51
+ 1. Product owner describes the story and acceptance criteria
52
+ 2. Each team member privately selects a card (Fibonacci number)
53
+ 3. All cards revealed simultaneously
54
+ 4. If consensus: record and move on
55
+ 5. If divergence: highest and lowest explain their reasoning, then re-vote
56
+ 6. Converge within 2 rounds (don't debate endlessly)
57
+
58
+ **Calculating velocity:**
59
+ ```
60
+ Sprint 1: 28 points completed
61
+ Sprint 2: 32 points completed
62
+ Sprint 3: 25 points completed
63
+ Sprint 4: 30 points completed
64
+
65
+ Average velocity: (28 + 32 + 25 + 30) / 4 = 28.75 ≈ 29 points/sprint
66
+ Use the last 3-5 sprints (not all-time) for more accurate forecasting
67
+ ```
68
+
69
+ ## Three-Point Estimation
70
+
71
+ Best for: budget estimates, high-stakes commitments, uncertain work.
72
+
73
+ For each task, estimate three values:
74
+ - **O** (Optimistic): Everything goes right, no surprises
75
+ - **M** (Most Likely): Normal conditions, typical obstacles
76
+ - **P** (Pessimistic): Significant problems but not catastrophic
77
+
78
+ **PERT formula:**
79
+ ```
80
+ Expected = (O + 4M + P) / 6
81
+ Standard Deviation = (P - O) / 6
82
+ ```
83
+
84
+ **Example:**
85
+ ```
86
+ Task: Integrate payment provider
87
+ O: 3 days (API is clean, docs are accurate)
88
+ M: 7 days (some undocumented behavior, 1-2 issues)
89
+ P: 15 days (API issues, need vendor support, edge cases)
90
+
91
+ Expected: (3 + 4×7 + 15) / 6 = 46/6 = 7.7 days
92
+ StdDev: (15 - 3) / 6 = 2 days
93
+
94
+ 68% confidence: 5.7 - 9.7 days
95
+ 95% confidence: 3.7 - 11.7 days
96
+
97
+ Communicate: "Roughly 8 days, could range from 6-12."
98
+ ```
99
+
100
+ **For full project estimates**, sum the expected values and sum the variances (not standard deviations):
101
+ ```
102
+ Total Expected = sum of all task expected values
103
+ Total Variance = sum of all task variances
104
+ Total StdDev = sqrt(Total Variance)
105
+ ```
106
+
107
+ ## Velocity and Capacity Planning
108
+
109
+ ### Sprint capacity
110
+ ```
111
+ Team size: 5 engineers
112
+ Sprint length: 2 weeks (10 working days)
113
+ Availability: 80% (account for meetings, PTO, on-call, interruptions)
114
+
115
+ Gross capacity: 5 × 10 = 50 person-days
116
+ Net capacity: 50 × 0.8 = 40 person-days
117
+
118
+ If average velocity is 29 story points per sprint:
119
+ 1 story point ≈ 40/29 ≈ 1.4 person-days (for rough conversion only)
120
+ ```
121
+
122
+ ### Forecasting project completion
123
+ ```
124
+ Total remaining story points: 120
125
+ Average velocity: 29 points/sprint
126
+ Sprints remaining: 120 / 29 = 4.1 sprints
127
+
128
+ Optimistic (velocity = 35): 120 / 35 = 3.4 sprints
129
+ Pessimistic (velocity = 23): 120 / 23 = 5.2 sprints
130
+
131
+ Communicate: "4-5 sprints (8-10 weeks), assuming current team and no major scope changes"
132
+ ```
133
+
134
+ ## Communicating Estimates to Stakeholders
135
+
136
+ ### Do:
137
+ - Provide ranges, not single numbers
138
+ - State assumptions explicitly ("assumes the team of 4, no major scope changes")
139
+ - Update estimates when assumptions change
140
+ - Use visual aids (burndown charts, probability cones)
141
+ - Distinguish between effort (person-days) and duration (calendar time)
142
+
143
+ ### Don't:
144
+ - Convert story points to hours for external communication (this invites micromanagement)
145
+ - Present estimates as commitments
146
+ - Pad estimates secretly (be transparent about buffers)
147
+ - Estimate work you don't understand (do a spike first)
148
+ - Let someone else's deadline become your estimate ("we need it by Friday" is not an estimate)
149
+
150
+ ### Useful phrasing:
151
+ - "Based on what we know today, this is roughly X-Y weeks of work for a team of N."
152
+ - "We'll have a more precise estimate after the technical spike in sprint 1."
153
+ - "The main uncertainty is [specific unknown]. If that goes smoothly, it's X weeks. If not, it could be Y weeks."
154
+ - "We can commit to delivering [core scope] by [date]. The [stretch goals] depend on how the first sprint goes."
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: feature-planning
3
+ description: "Break features into well-scoped tasks with acceptance criteria, risk assessment, and dependency mapping. Triggers: plan this, break this down, scope this feature, create tasks for, sprint planning, how should I implement this feature, user stories, acceptance criteria, dependency mapping, feature breakdown."
4
+ model: sonnet
5
+ allowed-tools: Read, Grep, Glob, Write, Edit
6
+ ---
7
+
8
+ # Feature Planning
9
+
10
+ Guide the user through transforming a feature idea or requirement into a structured, actionable implementation plan. The goal is a plan that a developer (or Claude Code) can pick up and execute with minimal ambiguity.
11
+
12
+ ## Workflow
13
+
14
+ ### Step 1: Understand the Feature
15
+
16
+ Ask clarifying questions to close knowledge gaps. Focus on:
17
+
18
+ - **What problem does this solve?** (user pain, business value)
19
+ - **Who is the user?** (persona, role, access level)
20
+ - **What exists today?** (current behavior, workarounds)
21
+ - **What are the constraints?** (timeline, tech stack, backwards compatibility)
22
+ - **What's out of scope?** (explicitly define boundaries)
23
+
24
+ If the user provides a vague request like "add authentication", ask about specifics: what auth methods, what protected resources, what user roles. Don't proceed with assumptions.
25
+
26
+ ### Step 2: Define Acceptance Criteria
27
+
28
+ For each user-facing behavior, write acceptance criteria using the Given/When/Then format:
29
+
30
+ ```
31
+ Given [precondition]
32
+ When [action]
33
+ Then [expected outcome]
34
+ ```
35
+
36
+ Aim for 3-7 acceptance criteria per feature. Each criterion should be independently testable.
37
+
38
+ ### Step 3: Break Down into Tasks
39
+
40
+ Decompose the feature into implementation tasks. Each task should:
41
+
42
+ - Be completable in one focused session (roughly 1-4 hours of work)
43
+ - Have a single clear deliverable (a file, a test, a migration, etc.)
44
+ - Follow dependency order (what must exist before this task can start)
45
+ - Be independently verifiable
46
+
47
+ Use this structure for each task — see [templates/task.md](templates/task.md).
48
+
49
+ ### Step 4: Map Dependencies
50
+
51
+ Identify and visualize dependencies between tasks:
52
+
53
+ - **Hard dependencies**: Task B literally cannot start until Task A is done
54
+ - **Soft dependencies**: Task B benefits from Task A but could start in parallel
55
+ - **External dependencies**: Waiting on APIs, design assets, or decisions
56
+
57
+ Present dependencies as an ordered list or ASCII diagram showing the critical path.
58
+
59
+ ### Step 5: Identify Risks and Open Questions
60
+
61
+ Flag anything that could derail the plan:
62
+
63
+ - **Technical risks**: Unproven technology, complex integration, performance concerns
64
+ - **Scope risks**: Feature creep indicators, ambiguous requirements
65
+ - **Dependency risks**: External team blockers, API availability
66
+
67
+ For each risk, suggest a mitigation strategy or a spike task to reduce uncertainty.
68
+
69
+ ### Step 6: Produce the Plan
70
+
71
+ Output the complete plan using the template at [templates/plan.md](templates/plan.md). Save it as a markdown file in the project (e.g., `docs/plans/feature-name.md`).
72
+
73
+ ## Principles Applied
74
+
75
+ - **YAGNI**: Only plan what's needed now. Flag nice-to-haves separately.
76
+ - **KISS**: Prefer the simplest approach that meets acceptance criteria.
77
+ - **Functional Independence**: Each task should touch a single concern when possible.
78
+ - **Testability**: Every task should specify how to verify it's done.
79
+
80
+ ## When to Go Deeper
81
+
82
+ If the feature involves architectural decisions (new services, database changes, API design), suggest using the `architecture-design` skill before finalizing the plan.
83
+
84
+ If the feature requires data model changes, suggest using the `data-modeling` skill for that portion.
@@ -0,0 +1,44 @@
1
+ {
2
+ "skill_name": "feature-planning",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "I need to add a notification system to our app. Users should get email and in-app notifications when someone comments on their posts. We're using a Node.js/Express backend with PostgreSQL and a React frontend. Can you help me plan this out?",
7
+ "expected_output": "A structured plan with clarifying questions asked first, acceptance criteria in Given/When/Then format, 5-10 granular tasks with dependencies, risk identification, and a saved markdown plan file.",
8
+ "assertions": [
9
+ "Asks clarifying questions before producing the plan",
10
+ "Includes acceptance criteria in Given/When/Then format",
11
+ "Tasks are granular (1-4 hours each) with clear deliverables",
12
+ "Dependency map is present showing task ordering",
13
+ "Risks section identifies at least 2 technical risks",
14
+ "Out of scope section explicitly excludes something",
15
+ "Saves the plan as a markdown file"
16
+ ]
17
+ },
18
+ {
19
+ "id": 2,
20
+ "prompt": "plan adding dark mode to our vue app",
21
+ "expected_output": "Should ask clarifying questions first (CSS variables vs theme library? System preference detection? Per-component or global? Persistence?), then produce a structured plan after getting answers.",
22
+ "assertions": [
23
+ "Does not immediately produce a plan from this vague request",
24
+ "Asks at least 3 clarifying questions",
25
+ "Applies YAGNI by not over-engineering the approach",
26
+ "Tasks include both implementation and testing",
27
+ "Acceptance criteria are independently testable"
28
+ ]
29
+ },
30
+ {
31
+ "id": 3,
32
+ "prompt": "We need to migrate our REST API to GraphQL. It's a Django backend serving a React Native mobile app and a Next.js web app. We have about 40 endpoints. The CEO wants it done in 3 sprints. Help me plan this.",
33
+ "expected_output": "Should flag the complexity and risks, suggest an incremental migration strategy rather than big-bang, break into phased milestones, and identify the critical path.",
34
+ "assertions": [
35
+ "Flags the risk of a full rewrite in 3 sprints",
36
+ "Suggests incremental or parallel migration strategy",
37
+ "Recommends architectural decisions be made first",
38
+ "References the architecture-design skill for ADR",
39
+ "Identifies external dependencies (mobile app release cycle)",
40
+ "Creates phased milestones, not just flat task list"
41
+ ]
42
+ }
43
+ ]
44
+ }
@@ -0,0 +1,55 @@
1
+ # Feature Plan Template
2
+
3
+ ```markdown
4
+ # Feature: [Feature Name]
5
+
6
+ **Date**: [YYYY-MM-DD]
7
+ **Author**: [Name]
8
+ **Status**: Draft | In Review | Approved
9
+
10
+ ## Summary
11
+ [2-3 sentences: what this feature does and why it matters]
12
+
13
+ ## Problem Statement
14
+ [What user pain or business need does this address?]
15
+
16
+ ## Scope
17
+
18
+ ### In Scope
19
+ - [Bullet list of what's included]
20
+
21
+ ### Out of Scope
22
+ - [Bullet list of what's explicitly excluded]
23
+
24
+ ## Acceptance Criteria
25
+
26
+ 1. Given [precondition], When [action], Then [outcome]
27
+ 2. Given [precondition], When [action], Then [outcome]
28
+ 3. ...
29
+
30
+ ## Implementation Tasks
31
+
32
+ [Ordered list of tasks using the task template]
33
+
34
+ ## Dependency Map
35
+
36
+ ```
37
+ Task 1 (data model) ──► Task 2 (API) ──► Task 4 (UI)
38
+ └──► Task 5 (tests)
39
+ Task 3 (config) ─────► Task 4 (UI)
40
+ ```
41
+
42
+ ## Risks & Mitigations
43
+
44
+ | Risk | Impact | Likelihood | Mitigation |
45
+ |------|--------|------------|------------|
46
+ | [Risk description] | High/Med/Low | High/Med/Low | [Strategy] |
47
+
48
+ ## Open Questions
49
+ - [ ] [Question that needs answering before implementation]
50
+
51
+ ## Related
52
+ - Architecture Decision: [link if applicable]
53
+ - Data Model: [link if applicable]
54
+ - Design Mockups: [link if applicable]
55
+ ```
@@ -0,0 +1,26 @@
1
+ # Task Template
2
+
3
+ Use this structure for each implementation task:
4
+
5
+ ```markdown
6
+ ## Task [N]: [Short descriptive title]
7
+
8
+ **Type**: [implementation | test | migration | spike | config | docs]
9
+ **Estimated effort**: [S/M/L — roughly 1h / 2-3h / 4h+]
10
+ **Depends on**: [Task numbers or "none"]
11
+
12
+ ### Description
13
+ [1-2 sentences: what this task produces and why]
14
+
15
+ ### Deliverables
16
+ - [ ] [Specific file or artifact]
17
+ - [ ] [Tests passing]
18
+ - [ ] [Other verifiable output]
19
+
20
+ ### Acceptance Criteria
21
+ - [ ] [Criterion 1]
22
+ - [ ] [Criterion 2]
23
+
24
+ ### Notes
25
+ [Edge cases, gotchas, or implementation hints — only if non-obvious]
26
+ ```
@@ -0,0 +1,154 @@
1
+ ---
2
+ name: frontend-architecture
3
+ description: "Design frontend architecture — React component hierarchy, state management, design tokens, data fetching, routing, error boundaries, code organization. Triggers: component architecture, state management, design system, design tokens, component library, React structure, folder structure, Zustand vs Redux, React Query, code splitting, error boundary, compound component."
4
+ model: sonnet
5
+ allowed-tools: Read, Grep, Glob, Write, Edit
6
+ ---
7
+
8
+ # Frontend Architecture
9
+
10
+ Design the technical structure of frontend applications — component hierarchy, state management, data fetching, and code organization. Good frontend architecture makes features easy to build, bugs easy to find, and the codebase easy to onboard into.
11
+
12
+ ## Core Principle
13
+
14
+ **Colocation over separation.** Keep related things together. A component's styles, tests, types, and stories should live next to the component, not in separate `/styles`, `/tests`, `/types` directories. Separation by file type creates coupling across the filesystem; separation by feature creates independence.
15
+
16
+ ## Workflow
17
+
18
+ ### Step 1: Design the Component Hierarchy
19
+
20
+ Start from the UI design (or the screen spec from `ui-ux-design`) and decompose into components:
21
+
22
+ 1. **Identify the visual boundaries** — Draw boxes around distinct UI regions
23
+ 2. **Apply the single-responsibility principle** — Each component does one thing
24
+ 3. **Identify reusability** — Which components appear in multiple places?
25
+ 4. **Define the tree** — Parent → child relationships
26
+
27
+ Component classification:
28
+ - **Page components**: Route-level, fetch data, compose layout
29
+ - **Feature components**: Implement a business feature (UserProfile, OrderSummary)
30
+ - **UI components**: Reusable, no business logic (Button, Card, Modal, Input)
31
+ - **Layout components**: Structure only (Sidebar, Grid, Stack, Container)
32
+
33
+ See [references/component-patterns.md](references/component-patterns.md) for design patterns.
34
+
35
+ ### Step 2: Plan State Management
36
+
37
+ State management is the most impactful architectural decision in a React app. Apply the state placement ladder — use the simplest option that works:
38
+
39
+ ```
40
+ 1. Local state (useState) → Simplest. Use for UI state within a component.
41
+ 2. Lifted state (parent useState) → Share between siblings via parent.
42
+ 3. Composition (children prop) → Avoid prop drilling with component composition.
43
+ 4. Context → Share across distant components (theme, auth, locale).
44
+ 5. URL state (query params) → Shareable, bookmarkable state (filters, pagination).
45
+ 6. Server state (React Query / SWR) → Data from API with caching + refetching.
46
+ 7. Global store (Zustand / Redux) → Client state shared across many unrelated components.
47
+ ```
48
+
49
+ **Decision rules:**
50
+ - If it's only used in one component → `useState`
51
+ - If shared between parent/child → lift state up
52
+ - If shared across distant components but rarely changes → Context
53
+ - If it comes from the server → React Query / SWR / TanStack Query (NOT global store)
54
+ - If it's complex client state updated from many places → Zustand or Redux Toolkit
55
+ - If it should survive a page refresh → URL params or localStorage
56
+
57
+ See [references/component-patterns.md](references/component-patterns.md) for detailed guidance.
58
+
59
+ ### Step 3: Define Design Tokens
60
+
61
+ Design tokens are the foundation of visual consistency. Define tokens before building components:
62
+
63
+ ```typescript
64
+ // tokens.ts
65
+ export const tokens = {
66
+ color: {
67
+ primary: { 50: '#eff6ff', 500: '#3b82f6', 700: '#1d4ed8' },
68
+ neutral: { 50: '#f9fafb', 200: '#e5e7eb', 800: '#1f2937' },
69
+ success: '#10b981',
70
+ warning: '#f59e0b',
71
+ error: '#ef4444',
72
+ },
73
+ spacing: { xs: '0.25rem', sm: '0.5rem', md: '1rem', lg: '1.5rem', xl: '2rem' },
74
+ radius: { sm: '0.25rem', md: '0.5rem', lg: '1rem', full: '9999px' },
75
+ fontSize: { sm: '0.875rem', base: '1rem', lg: '1.125rem', xl: '1.25rem' },
76
+ shadow: {
77
+ sm: '0 1px 2px rgba(0,0,0,0.05)',
78
+ md: '0 4px 6px rgba(0,0,0,0.1)',
79
+ },
80
+ };
81
+ ```
82
+
83
+ Use tokens everywhere — never hardcode `#3b82f6` or `16px` in a component.
84
+
85
+ ### Step 4: Design the Data Fetching Strategy
86
+
87
+ Choose patterns based on the data's nature:
88
+
89
+ | Data Pattern | Approach | When |
90
+ |-------------|----------|------|
91
+ | Server data (read) | TanStack Query / SWR | Lists, details, dashboards |
92
+ | Server data (mutate) | TanStack Query mutations | Create, update, delete |
93
+ | Real-time data | WebSocket + state sync | Chat, notifications, live dashboards |
94
+ | Form data | React Hook Form / Formik | Any form |
95
+ | Static data | Build-time fetch (SSG) | Blog posts, docs, marketing pages |
96
+
97
+ Key rules:
98
+ - **Separate server state from client state.** Server state lives in the query cache, not in Redux.
99
+ - **Fetch at the route level** when possible. Components receive data as props, not fetch their own.
100
+ - **Handle loading, error, and empty** at every fetch boundary. Use error boundaries for unexpected errors.
101
+
102
+ ### Step 5: Organize the Codebase
103
+
104
+ Recommended structure — feature-based with shared library:
105
+
106
+ ```
107
+ src/
108
+ ├── app/ # App-level: providers, routing, global config
109
+ │ ├── providers.tsx # All context providers composed
110
+ │ ├── router.tsx # Route definitions
111
+ │ └── layout.tsx # Root layout
112
+ ├── features/ # Feature modules (the meat of the app)
113
+ │ ├── auth/
114
+ │ │ ├── components/ # Feature-specific components
115
+ │ │ ├── hooks/ # Feature-specific hooks
116
+ │ │ ├── api.ts # API calls for this feature
117
+ │ │ ├── types.ts # Types for this feature
118
+ │ │ └── index.ts # Public API (barrel file)
119
+ │ ├── projects/
120
+ │ └── settings/
121
+ ├── components/ # Shared UI components (Button, Modal, etc.)
122
+ │ ├── ui/ # Atomic UI primitives
123
+ │ └── layout/ # Layout components (Sidebar, Stack)
124
+ ├── hooks/ # Shared hooks (useDebounce, useMediaQuery)
125
+ ├── lib/ # Shared utilities, API client, tokens
126
+ │ ├── api-client.ts
127
+ │ ├── tokens.ts
128
+ │ └── utils.ts
129
+ └── types/ # Shared types
130
+ ```
131
+
132
+ Rules:
133
+ - Features import from `components/` and `lib/`, never from other features
134
+ - Features export a clean public API through their `index.ts`
135
+ - Circular imports between features means a responsibility boundary is wrong
136
+
137
+ Use [templates/folder-structure.md](templates/folder-structure.md) as a starting point — includes the full `src/` layout, a co-located component template, design tokens, and a custom hook pattern.
138
+
139
+ ### Step 6: Validate the Architecture
140
+
141
+ - [ ] Can a new engineer understand where to add a new feature?
142
+ - [ ] Can you delete a feature directory without breaking unrelated features?
143
+ - [ ] Is server state separate from client state?
144
+ - [ ] Are components reusable without bringing business logic along?
145
+ - [ ] Is there one clear way to do common tasks (fetching, forms, navigation)?
146
+ - [ ] Are design tokens used consistently (no hardcoded values)?
147
+
148
+ ## Principles Applied
149
+
150
+ - **KISS**: Use `useState` until you need something more. Don't reach for Redux on day one.
151
+ - **DRY**: Shared UI components in `components/`, shared hooks in `hooks/`. Feature-specific code in features.
152
+ - **Functional Independence**: Features don't know about each other. Shared dependencies go in `lib/` or `components/`.
153
+ - **YAGNI**: Don't abstract until you have 2+ consumers. A single-use component doesn't need to be in the shared library.
154
+ - **Separation of Concerns**: Components render UI. Hooks manage state and side effects. API modules handle HTTP. Types define shapes. Keep them apart.