@relipa/ai-flow-kit 0.0.1

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 (204) hide show
  1. package/AIFLOW.md +432 -0
  2. package/CHANGELOG.md +78 -0
  3. package/CONTRIBUTING.md +351 -0
  4. package/IMPLEMENTATION_SUMMARY.md +348 -0
  5. package/QUICK_START.md +392 -0
  6. package/README.md +323 -0
  7. package/bin/aiflow.js +178 -0
  8. package/custom/mcp-presets/README.md +138 -0
  9. package/custom/mcp-presets/backlog.json +15 -0
  10. package/custom/mcp-presets/figma.json +15 -0
  11. package/custom/mcp-presets/google-sheets.json +14 -0
  12. package/custom/mcp-presets/jira.json +16 -0
  13. package/custom/prompts/bug-fix.md +149 -0
  14. package/custom/prompts/feature.md +190 -0
  15. package/custom/prompts/investigation.md +164 -0
  16. package/custom/rules/code-style.md +7 -0
  17. package/custom/rules/java/code-style.md +11 -0
  18. package/custom/rules/java/naming.md +17 -0
  19. package/custom/rules/java/review-checklist.md +36 -0
  20. package/custom/rules/javascript/code-style.md +12 -0
  21. package/custom/rules/javascript/naming.md +14 -0
  22. package/custom/rules/naming.md +9 -0
  23. package/custom/rules/php/code-style.md +10 -0
  24. package/custom/rules/php/naming.md +15 -0
  25. package/custom/rules/review-checklist.md +9 -0
  26. package/custom/skills/figma-to-component/SKILL.md +207 -0
  27. package/custom/skills/generate-spec/SKILL.md +97 -0
  28. package/custom/skills/impact-analysis/SKILL.md +94 -0
  29. package/custom/skills/investigate-bug/SKILL.md +93 -0
  30. package/custom/skills/report-customer/SKILL.md +95 -0
  31. package/custom/skills/review-plan/SKILL.md +158 -0
  32. package/custom/skills/validate-ticket/SKILL.md +240 -0
  33. package/custom/templates/laravel.md +90 -0
  34. package/custom/templates/nextjs.md +89 -0
  35. package/custom/templates/reactjs.md +567 -0
  36. package/custom/templates/spring-boot.md +598 -0
  37. package/custom/templates/vue-nuxt.md +89 -0
  38. package/docs/architecture.md +395 -0
  39. package/docs/cli-reference.md +438 -0
  40. package/docs/configuration.md +412 -0
  41. package/docs/getting-started.md +248 -0
  42. package/docs/troubleshooting.md +587 -0
  43. package/docs/workflows/bug-fix.md +126 -0
  44. package/docs/workflows/feature.md +123 -0
  45. package/docs/workflows/impact-analysis.md +13 -0
  46. package/docs/workflows/investigation.md +13 -0
  47. package/docs/workflows/refactor.md +13 -0
  48. package/index.js +27 -0
  49. package/package.json +70 -0
  50. package/scripts/config.js +317 -0
  51. package/scripts/context.js +117 -0
  52. package/scripts/detect.js +239 -0
  53. package/scripts/doctor.js +48 -0
  54. package/scripts/guide.js +282 -0
  55. package/scripts/hooks/session-start.js +140 -0
  56. package/scripts/init.js +453 -0
  57. package/scripts/memory.js +247 -0
  58. package/scripts/prompt.js +392 -0
  59. package/scripts/remove.js +170 -0
  60. package/scripts/update.js +111 -0
  61. package/scripts/use.js +570 -0
  62. package/scripts/validate.js +303 -0
  63. package/upstream/.claude-plugin/marketplace.json +20 -0
  64. package/upstream/.claude-plugin/plugin.json +20 -0
  65. package/upstream/.codex/INSTALL.md +67 -0
  66. package/upstream/.cursor-plugin/plugin.json +25 -0
  67. package/upstream/.gitattributes +18 -0
  68. package/upstream/.github/FUNDING.yml +3 -0
  69. package/upstream/.github/ISSUE_TEMPLATE/bug_report.md +52 -0
  70. package/upstream/.github/ISSUE_TEMPLATE/config.yml +5 -0
  71. package/upstream/.github/ISSUE_TEMPLATE/feature_request.md +34 -0
  72. package/upstream/.github/ISSUE_TEMPLATE/platform_support.md +23 -0
  73. package/upstream/.github/PULL_REQUEST_TEMPLATE.md +87 -0
  74. package/upstream/.opencode/INSTALL.md +83 -0
  75. package/upstream/.opencode/plugins/superpowers.js +112 -0
  76. package/upstream/.version-bump.json +19 -0
  77. package/upstream/AGENTS.md +1 -0
  78. package/upstream/CHANGELOG.md +13 -0
  79. package/upstream/CLAUDE.md +85 -0
  80. package/upstream/CODE_OF_CONDUCT.md +128 -0
  81. package/upstream/GEMINI.md +2 -0
  82. package/upstream/LICENSE +21 -0
  83. package/upstream/README.md +190 -0
  84. package/upstream/RELEASE-NOTES.md +1096 -0
  85. package/upstream/agents/code-reviewer.md +48 -0
  86. package/upstream/commands/brainstorm.md +5 -0
  87. package/upstream/commands/execute-plan.md +5 -0
  88. package/upstream/commands/write-plan.md +5 -0
  89. package/upstream/docs/README.codex.md +126 -0
  90. package/upstream/docs/README.opencode.md +130 -0
  91. package/upstream/docs/plans/2025-11-22-opencode-support-design.md +294 -0
  92. package/upstream/docs/plans/2025-11-22-opencode-support-implementation.md +1095 -0
  93. package/upstream/docs/plans/2025-11-28-skills-improvements-from-user-feedback.md +711 -0
  94. package/upstream/docs/plans/2026-01-17-visual-brainstorming.md +571 -0
  95. package/upstream/docs/superpowers/plans/2026-01-22-document-review-system.md +301 -0
  96. package/upstream/docs/superpowers/plans/2026-02-19-visual-brainstorming-refactor.md +523 -0
  97. package/upstream/docs/superpowers/plans/2026-03-11-zero-dep-brainstorm-server.md +479 -0
  98. package/upstream/docs/superpowers/plans/2026-03-23-codex-app-compatibility.md +564 -0
  99. package/upstream/docs/superpowers/specs/2026-01-22-document-review-system-design.md +136 -0
  100. package/upstream/docs/superpowers/specs/2026-02-19-visual-brainstorming-refactor-design.md +162 -0
  101. package/upstream/docs/superpowers/specs/2026-03-11-zero-dep-brainstorm-server-design.md +118 -0
  102. package/upstream/docs/superpowers/specs/2026-03-23-codex-app-compatibility-design.md +244 -0
  103. package/upstream/docs/testing.md +303 -0
  104. package/upstream/docs/windows/polyglot-hooks.md +212 -0
  105. package/upstream/gemini-extension.json +6 -0
  106. package/upstream/hooks/hooks-cursor.json +10 -0
  107. package/upstream/hooks/hooks.json +16 -0
  108. package/upstream/hooks/run-hook.cmd +46 -0
  109. package/upstream/hooks/session-start +57 -0
  110. package/upstream/package.json +6 -0
  111. package/upstream/scripts/bump-version.sh +220 -0
  112. package/upstream/skills/brainstorming/SKILL.md +164 -0
  113. package/upstream/skills/brainstorming/scripts/frame-template.html +214 -0
  114. package/upstream/skills/brainstorming/scripts/helper.js +88 -0
  115. package/upstream/skills/brainstorming/scripts/server.cjs +354 -0
  116. package/upstream/skills/brainstorming/scripts/start-server.sh +148 -0
  117. package/upstream/skills/brainstorming/scripts/stop-server.sh +56 -0
  118. package/upstream/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  119. package/upstream/skills/brainstorming/visual-companion.md +287 -0
  120. package/upstream/skills/dispatching-parallel-agents/SKILL.md +182 -0
  121. package/upstream/skills/executing-plans/SKILL.md +70 -0
  122. package/upstream/skills/finishing-a-development-branch/SKILL.md +200 -0
  123. package/upstream/skills/receiving-code-review/SKILL.md +213 -0
  124. package/upstream/skills/requesting-code-review/SKILL.md +105 -0
  125. package/upstream/skills/requesting-code-review/code-reviewer.md +146 -0
  126. package/upstream/skills/subagent-driven-development/SKILL.md +277 -0
  127. package/upstream/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
  128. package/upstream/skills/subagent-driven-development/implementer-prompt.md +113 -0
  129. package/upstream/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  130. package/upstream/skills/systematic-debugging/CREATION-LOG.md +119 -0
  131. package/upstream/skills/systematic-debugging/SKILL.md +296 -0
  132. package/upstream/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  133. package/upstream/skills/systematic-debugging/condition-based-waiting.md +115 -0
  134. package/upstream/skills/systematic-debugging/defense-in-depth.md +122 -0
  135. package/upstream/skills/systematic-debugging/find-polluter.sh +63 -0
  136. package/upstream/skills/systematic-debugging/root-cause-tracing.md +169 -0
  137. package/upstream/skills/systematic-debugging/test-academic.md +14 -0
  138. package/upstream/skills/systematic-debugging/test-pressure-1.md +58 -0
  139. package/upstream/skills/systematic-debugging/test-pressure-2.md +68 -0
  140. package/upstream/skills/systematic-debugging/test-pressure-3.md +69 -0
  141. package/upstream/skills/test-driven-development/SKILL.md +371 -0
  142. package/upstream/skills/test-driven-development/testing-anti-patterns.md +299 -0
  143. package/upstream/skills/using-git-worktrees/SKILL.md +218 -0
  144. package/upstream/skills/using-superpowers/SKILL.md +117 -0
  145. package/upstream/skills/using-superpowers/references/codex-tools.md +100 -0
  146. package/upstream/skills/using-superpowers/references/copilot-tools.md +52 -0
  147. package/upstream/skills/using-superpowers/references/gemini-tools.md +33 -0
  148. package/upstream/skills/verification-before-completion/SKILL.md +139 -0
  149. package/upstream/skills/writing-plans/SKILL.md +152 -0
  150. package/upstream/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  151. package/upstream/skills/writing-skills/SKILL.md +655 -0
  152. package/upstream/skills/writing-skills/anthropic-best-practices.md +1150 -0
  153. package/upstream/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  154. package/upstream/skills/writing-skills/graphviz-conventions.dot +172 -0
  155. package/upstream/skills/writing-skills/persuasion-principles.md +187 -0
  156. package/upstream/skills/writing-skills/render-graphs.js +168 -0
  157. package/upstream/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  158. package/upstream/tests/brainstorm-server/package-lock.json +36 -0
  159. package/upstream/tests/brainstorm-server/package.json +10 -0
  160. package/upstream/tests/brainstorm-server/server.test.js +427 -0
  161. package/upstream/tests/brainstorm-server/windows-lifecycle.test.sh +351 -0
  162. package/upstream/tests/brainstorm-server/ws-protocol.test.js +392 -0
  163. package/upstream/tests/claude-code/README.md +158 -0
  164. package/upstream/tests/claude-code/analyze-token-usage.py +168 -0
  165. package/upstream/tests/claude-code/run-skill-tests.sh +187 -0
  166. package/upstream/tests/claude-code/test-document-review-system.sh +177 -0
  167. package/upstream/tests/claude-code/test-helpers.sh +202 -0
  168. package/upstream/tests/claude-code/test-subagent-driven-development-integration.sh +314 -0
  169. package/upstream/tests/claude-code/test-subagent-driven-development.sh +165 -0
  170. package/upstream/tests/explicit-skill-requests/prompts/action-oriented.txt +3 -0
  171. package/upstream/tests/explicit-skill-requests/prompts/after-planning-flow.txt +17 -0
  172. package/upstream/tests/explicit-skill-requests/prompts/claude-suggested-it.txt +11 -0
  173. package/upstream/tests/explicit-skill-requests/prompts/i-know-what-sdd-means.txt +8 -0
  174. package/upstream/tests/explicit-skill-requests/prompts/mid-conversation-execute-plan.txt +3 -0
  175. package/upstream/tests/explicit-skill-requests/prompts/please-use-brainstorming.txt +1 -0
  176. package/upstream/tests/explicit-skill-requests/prompts/skip-formalities.txt +3 -0
  177. package/upstream/tests/explicit-skill-requests/prompts/subagent-driven-development-please.txt +1 -0
  178. package/upstream/tests/explicit-skill-requests/prompts/use-systematic-debugging.txt +1 -0
  179. package/upstream/tests/explicit-skill-requests/run-all.sh +70 -0
  180. package/upstream/tests/explicit-skill-requests/run-claude-describes-sdd.sh +100 -0
  181. package/upstream/tests/explicit-skill-requests/run-extended-multiturn-test.sh +113 -0
  182. package/upstream/tests/explicit-skill-requests/run-haiku-test.sh +144 -0
  183. package/upstream/tests/explicit-skill-requests/run-multiturn-test.sh +143 -0
  184. package/upstream/tests/explicit-skill-requests/run-test.sh +136 -0
  185. package/upstream/tests/opencode/run-tests.sh +163 -0
  186. package/upstream/tests/opencode/setup.sh +88 -0
  187. package/upstream/tests/opencode/test-plugin-loading.sh +82 -0
  188. package/upstream/tests/opencode/test-priority.sh +198 -0
  189. package/upstream/tests/opencode/test-tools.sh +104 -0
  190. package/upstream/tests/skill-triggering/prompts/dispatching-parallel-agents.txt +8 -0
  191. package/upstream/tests/skill-triggering/prompts/executing-plans.txt +1 -0
  192. package/upstream/tests/skill-triggering/prompts/requesting-code-review.txt +3 -0
  193. package/upstream/tests/skill-triggering/prompts/systematic-debugging.txt +11 -0
  194. package/upstream/tests/skill-triggering/prompts/test-driven-development.txt +7 -0
  195. package/upstream/tests/skill-triggering/prompts/writing-plans.txt +10 -0
  196. package/upstream/tests/skill-triggering/run-all.sh +60 -0
  197. package/upstream/tests/skill-triggering/run-test.sh +88 -0
  198. package/upstream/tests/subagent-driven-dev/go-fractals/design.md +81 -0
  199. package/upstream/tests/subagent-driven-dev/go-fractals/plan.md +172 -0
  200. package/upstream/tests/subagent-driven-dev/go-fractals/scaffold.sh +45 -0
  201. package/upstream/tests/subagent-driven-dev/run-test.sh +106 -0
  202. package/upstream/tests/subagent-driven-dev/svelte-todo/design.md +70 -0
  203. package/upstream/tests/subagent-driven-dev/svelte-todo/plan.md +222 -0
  204. package/upstream/tests/subagent-driven-dev/svelte-todo/scaffold.sh +46 -0
@@ -0,0 +1,207 @@
1
+ ---
2
+ name: figma-to-component
3
+ description: Read designs from Figma and generate React/Next.js/Vue components following project conventions. Supports specific frame URLs and entire pages.
4
+ keywords: figma, design, component, ui, generate, react, nextjs, vue, frontend
5
+ ---
6
+
7
+ # Figma to Component
8
+
9
+ ## When to use
10
+
11
+ - Received a Figma link from a designer and need to generate a component
12
+ - Designer has approved the UI, developer starts implementation
13
+ - Need to ensure pixel-perfect matching with the design
14
+
15
+ ---
16
+
17
+ ## Process
18
+
19
+ ### Step 1: Identify input
20
+
21
+ Receive one of the following from the user:
22
+ - Figma URL frame: `https://www.figma.com/design/<fileKey>/...?node-id=<nodeId>`
23
+ - Figma URL file: `https://www.figma.com/design/<fileKey>/...`
24
+ - Node description: "UserCard component in file ABC"
25
+
26
+ Extract `fileKey` and `nodeId` from the URL.
27
+
28
+ ### Step 2: Read design via Figma MCP
29
+
30
+ Use Figma MCP tools to fetch design information:
31
+
32
+ ```
33
+ 1. Get node info: figma_get_file_nodes(fileKey, nodeIds=[nodeId])
34
+ 2. Get styles: figma_get_file_styles(fileKey)
35
+ 3. Get components: figma_get_file_components(fileKey) if needed
36
+ 4. Export image if visual reference needed: figma_get_image(fileKey, nodeId)
37
+ ```
38
+
39
+ Analyze the output to extract:
40
+ - **Layout**: flexbox direction, gap, padding, alignment
41
+ - **Sizing**: width/height (fixed vs fill vs hug)
42
+ - **Colors**: fills, strokes → map to Tailwind colors if available
43
+ - **Typography**: font-size, font-weight, line-height, letter-spacing → map to Tailwind text classes
44
+ - **Spacing**: padding, margin, gap → map to Tailwind spacing scale
45
+ - **Border**: radius, width, color → map to Tailwind border classes
46
+ - **Shadow**: box-shadow → map to Tailwind shadow classes
47
+ - **States**: hover, focus, disabled, active (if variants present)
48
+ - **Responsive**: breakpoints if multiple frames present
49
+
50
+ ### Step 3: Map Figma tokens → Tailwind / CSS
51
+
52
+ **Color mapping:**
53
+ ```
54
+ Figma hex #3B82F6 → Tailwind blue-500
55
+ Figma hex #EF4444 → Tailwind red-500
56
+ Figma rgba(0,0,0,0.5) → Tailwind black/50
57
+ No Tailwind match → use arbitrary value [#hexcode]
58
+ ```
59
+
60
+ **Spacing mapping (8px grid):**
61
+ ```
62
+ 4px → p-1 / gap-1
63
+ 8px → p-2 / gap-2
64
+ 12px → p-3 / gap-3
65
+ 16px → p-4 / gap-4
66
+ 24px → p-6 / gap-6
67
+ 32px → p-8 / gap-8
68
+ No match → arbitrary value [20px]
69
+ ```
70
+
71
+ **Typography mapping:**
72
+ ```
73
+ text-xs: 12px
74
+ text-sm: 14px
75
+ text-base: 16px
76
+ text-lg: 18px
77
+ text-xl: 20px
78
+ text-2xl: 24px
79
+ text-3xl: 30px
80
+ font-normal: 400
81
+ font-medium: 500
82
+ font-semibold: 600
83
+ font-bold: 700
84
+ ```
85
+
86
+ ### Step 4: Generate component
87
+
88
+ **Framework detection** — check the project's CLAUDE.md to determine the framework:
89
+ - `reactjs` / `nextjs` → generate `.tsx` with React conventions
90
+ - `vue-nuxt` → generate `.vue` with Vue 3 Composition API
91
+
92
+ #### React/Next.js component template:
93
+
94
+ ```tsx
95
+ interface [ComponentName]Props {
96
+ // Props extracted from Figma variants or dynamic content slots
97
+ className?: string;
98
+ }
99
+
100
+ export const [ComponentName] = ({ className }: [ComponentName]Props) => {
101
+ return (
102
+ <div className={cn(
103
+ // Layout classes
104
+ // Sizing classes
105
+ // Color classes
106
+ // Typography classes (if text node)
107
+ className
108
+ )}>
109
+ {/* Child nodes rendered recursively */}
110
+ </div>
111
+ );
112
+ };
113
+ ```
114
+
115
+ #### Vue 3 component template:
116
+
117
+ ```vue
118
+ <script setup lang="ts">
119
+ interface Props {
120
+ // Props extracted from Figma variants
121
+ class?: string;
122
+ }
123
+
124
+ const props = withDefaults(defineProps<Props>(), {});
125
+ </script>
126
+
127
+ <template>
128
+ <div :class="cn(
129
+ // Layout classes
130
+ // Sizing classes
131
+ // Color classes
132
+ props.class
133
+ )">
134
+ <!-- Child nodes -->
135
+ </div>
136
+ </template>
137
+ ```
138
+
139
+ ### Step 5: Handle interactive states
140
+
141
+ If Figma has variants (Default, Hover, Disabled, Active):
142
+
143
+ ```tsx
144
+ // Map variants into props + conditional classes
145
+ interface ButtonProps {
146
+ variant?: 'primary' | 'secondary' | 'outline';
147
+ size?: 'sm' | 'md' | 'lg';
148
+ disabled?: boolean;
149
+ }
150
+
151
+ const variantClasses = {
152
+ primary: 'bg-blue-600 text-white hover:bg-blue-700',
153
+ secondary: 'bg-gray-100 text-gray-900 hover:bg-gray-200',
154
+ outline: 'border border-gray-300 hover:bg-gray-50',
155
+ };
156
+ ```
157
+
158
+ ### Step 6: Verify and output
159
+
160
+ After generation, verify:
161
+
162
+ - [ ] Layout matches Figma (flex direction, alignment, gap)
163
+ - [ ] Colors mapping correct (or use arbitrary values if no Tailwind match)
164
+ - [ ] Typography correct (size, weight, line-height)
165
+ - [ ] Spacing correct (padding, margin, gap)
166
+ - [ ] Component has `className` prop for external overrides
167
+ - [ ] Use `cn()` helper for conditional/mergeable classes
168
+ - [ ] Responsive if Figma has mobile frames
169
+ - [ ] Props typed with TypeScript interface
170
+
171
+ ---
172
+
173
+ ## Output format
174
+
175
+ Always output in order:
176
+
177
+ 1. **Design Summary** (brief): layout structure, color palette, typography scale
178
+ 2. **Component file** with full code
179
+ 3. **Usage example**:
180
+ ```tsx
181
+ <ComponentName variant="primary" className="mt-4" />
182
+ ```
183
+ 4. **Notes** if anything cannot be mapped 100% accurately from Figma
184
+
185
+ ---
186
+
187
+ ## Rules
188
+
189
+ - **Do not hardcode** hex colors directly into className if a Tailwind equivalent exists
190
+ - **Always use** `cn()` (clsx + twMerge) to merge classes
191
+ - **No new CSS imports** — use Tailwind utilities only
192
+ - **Responsive** — if Figma only has 1 breakpoint, default to mobile-first design
193
+ - **Accessibility** — add `aria-label`, `role`, `alt` for interactive and image elements
194
+ - **Image** — use `next/image` for Next.js, `<img>` for React, add `alt` from Figma layer name
195
+ - **Icon** — if Figma uses SVG icons, extract SVG or map to lucide-react / heroicons
196
+
197
+ ---
198
+
199
+ ## Trigger Example Commands
200
+
201
+ ```
202
+ Read Figma and generate component: https://www.figma.com/design/xxxxx/App?node-id=123-456
203
+
204
+ Generate UserCard component from Figma frame node-id=123-456
205
+
206
+ Implement UI from this Figma link following my project: [URL]
207
+ ```
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: generate-spec
3
+ description: Gate 2 — After DEV approves the requirement document (Gate 1), AI creates a detailed implementation plan using TDD approach. This is the bridge between requirement and code.
4
+ keywords: spec, plan, implementation, tdd, coding plan
5
+ ---
6
+
7
+ # Implementation Plan — Gate 2
8
+
9
+ > **GATE 2: Runs after Gate 1 (requirement document) has been APPROVED by DEV.**
10
+ >
11
+ > Principle: AI uses the approved requirement document to create a detailed implementation plan with TDD steps. DEV confirms the plan before coding begins.
12
+
13
+ ---
14
+
15
+ ## Conditions to Enter Gate 2
16
+
17
+ - ✅ Gate 1 APPROVED — `plan/[ticket-id]/requirement.md` reviewed and approved by DEV
18
+ - ✅ Requirement document includes: requirements, solution, impact analysis, estimate
19
+
20
+ ---
21
+
22
+ ## Process
23
+
24
+ ### Step 1: Read Approved Requirement
25
+
26
+ Read `plan/[ticket-id]/requirement.md` — use the chosen approach, file list, and testing plan as input.
27
+
28
+ ### Step 2: Create Implementation Plan
29
+
30
+ **INVOKE:** `superpowers:writing-plans`
31
+
32
+ Create a detailed step-by-step plan based on the requirement document:
33
+
34
+ ```markdown
35
+ ## Implementation Plan
36
+
37
+ ### Task Breakdown (TDD Order)
38
+
39
+ | # | Task | File | Test First? | Dependencies |
40
+ |---|------|------|-------------|--------------|
41
+ | 1 | Write test for [scenario] | [test file] | ✅ | None |
42
+ | 2 | Implement [component] | [source file] | — | Task 1 |
43
+ | 3 | Write test for [scenario] | [test file] | ✅ | Task 2 |
44
+ | ... | ... | ... | ... | ... |
45
+
46
+ ### Commit Strategy
47
+ - Commit after each test+implementation pair
48
+ - Keep commits small and focused
49
+
50
+ ### Test Commands
51
+ ```bash
52
+ [specific test commands for this project]
53
+ ```
54
+ ```
55
+
56
+ ### Step 3: GATE 2 — Present Plan & Start Coding
57
+
58
+ ```markdown
59
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
60
+ ⏸️ GATE 2: IMPLEMENTATION PLAN READY
61
+
62
+ Based on the approved requirement document, here is the coding plan:
63
+
64
+ [Show task breakdown summary]
65
+
66
+ **Total tasks:** [N]
67
+ **Estimated commits:** [N]
68
+ **Test-first tasks:** [N]
69
+
70
+ Ready to start coding?
71
+ Type **"APPROVED"** to begin implementation.
72
+ Type feedback to adjust the plan.
73
+
74
+ ⚠️ I will NOT write code until I receive "APPROVED".
75
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
76
+ ```
77
+
78
+ ### Step 4: Handle Feedback
79
+
80
+ **If DEV provides feedback:**
81
+ → Update the implementation plan
82
+ → Re-display GATE 2 prompt
83
+
84
+ **If DEV types "APPROVED":**
85
+ → Proceed to Gate 3 (Code Generation with TDD)
86
+ → Follow the task breakdown order exactly
87
+
88
+ ---
89
+
90
+ ## Mandatory Rules
91
+
92
+ - ❌ **DO NOT** start coding until "APPROVED" is received for the plan
93
+ - ❌ **DO NOT** deviate from the approved requirement document
94
+ - ✅ **MUST** use TDD order: test first, then implementation
95
+ - ✅ **MUST** invoke `superpowers:writing-plans` for plan creation
96
+ - ✅ **MUST** show clear task breakdown before getting approval
97
+ - ✅ **MUST** plan small, focused commits
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: impact-analysis
3
+ description: Analyze the impact scope when modifying logic or the database to ensure system-wide safety.
4
+ keywords: impact, refactor, breaking change, scope
5
+ ---
6
+
7
+ # Impact Analysis
8
+
9
+ ## When mandatory to run
10
+
11
+ - Modifying **Core Services / shared utilities** used in many places
12
+ - Changing **database schema** (add/rename/drop column, table)
13
+ - Changing **API response structure** (rename field, remove field)
14
+ - Changing **interfaces / contracts** between modules
15
+ - After fixing a bug — to ensure the fix doesn't break other parts
16
+
17
+ ---
18
+
19
+ ## Analysis Process
20
+
21
+ ### Step 1: Find all usage (Dependency Map)
22
+
23
+ ```bash
24
+ # Find all files importing/calling the class/function being modified
25
+ grep -r "ClassName\|functionName\|methodName" --include="*.php" .
26
+ grep -r "ClassName\|functionName\|methodName" --include="*.java" .
27
+ grep -r "ClassName\|functionName\|methodName" --include="*.ts" .
28
+
29
+ # Check which routes/controllers trigger this service
30
+ grep -r "ServiceName" app/Http/Controllers/
31
+ ```
32
+
33
+ List all:
34
+ - Controllers / Routes calling it directly
35
+ - Jobs / Commands / Events calling it indirectly
36
+ - Tests mocking/stubbing this class
37
+ - Frontend components calling related APIs
38
+
39
+ ### Step 2: Evaluate each aspect
40
+
41
+ | Aspect | Checkpoint questions |
42
+ |-----------|---------------------|
43
+ | **Database / Cache** | Which queries are affected by schema changes? Which cache keys need flushing? |
44
+ | **Background Jobs** | Which Crons / Queues call this logic? Will they break? |
45
+ | **Import / Export** | Do bulk data flows use this field/logic? |
46
+ | **Permissions** | Are API / UI permission checks sufficient after the change? |
47
+ | **API / Mobile** | Will JSON responses lose fields? Do mobile clients need updates? |
48
+ | **Tests** | Which tests will fail? Which mocks/stubs need updating? |
49
+
50
+ ### Step 3: Classify impact level
51
+
52
+ | Level | Definition | Action |
53
+ |-----|-----------|-----------|
54
+ | 🟢 Low | Only 1 file, no dependencies | Proceed |
55
+ | 🟡 Medium | 2–5 files, tests need updates | Review carefully before merging |
56
+ | 🔴 High | 6+ files, API breaking change, DB migration | Discuss with the team first |
57
+ | ⛔ Critical | Affects payment, auth, data integrity | Tech Lead review mandatory |
58
+
59
+ ### Step 4: Export report
60
+
61
+ **Report structure:**
62
+
63
+ ```
64
+ ## Impact Analysis: [Change Name]
65
+
66
+ **Level:** 🟡 Medium
67
+
68
+ ### Impact Scope
69
+ - [File/Class A] — [reason for impact]
70
+ - [File/Class B] — [reason for impact]
71
+
72
+ ### Breaking changes
73
+ - [Describe breaking change if any]
74
+
75
+ ### Tests to check after merge
76
+ - [ ] [Test case / screen 1]
77
+ - [ ] [Test case / screen 2]
78
+ - [ ] [Job/Command to test run]
79
+
80
+ ### Notes for QA
81
+ [Specific points QA should pay attention to]
82
+ ```
83
+
84
+ ---
85
+
86
+ ## Completion Checklist
87
+
88
+ - [ ] Found all dependencies using grep/IDE search
89
+ - [ ] Checked Jobs, Events, and Crons
90
+ - [ ] Checked API response structure
91
+ - [ ] Checked tests
92
+ - [ ] Determined impact level (Low/Medium/High/Critical)
93
+ - [ ] Wrote impact report
94
+ - [ ] Notified the team if High/Critical
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: investigate-bug
3
+ description: Investigate and fix bugs based on the project's data flow, inheriting from superpowers' systematic-debugging.
4
+ keywords: bug, fix, error, crash, broken
5
+ ---
6
+
7
+ # Investigate Bug
8
+
9
+ > This skill **inherits and extends** `superpowers:systematic-debugging`.
10
+ > First, invoke `superpowers:systematic-debugging` to understand the core process,
11
+ > then apply these project-specific steps.
12
+
13
+ ---
14
+
15
+ ## When to use this skill
16
+
17
+ - Developer requests finding / fixing a bug
18
+ - A backlog/jira ticket describes an error
19
+ - Logs, stack traces, or descriptions of incorrect behavior are provided
20
+
21
+ ---
22
+
23
+ ## Additional Steps after Phase 1 of systematic-debugging
24
+
25
+ ### 1. Read context from ticket (if available)
26
+
27
+ Check `.claude/context/current.json`:
28
+ - `description` — bug description from the ticket
29
+ - `comments` — discussions, additional info
30
+ - `context.files` — related files mentioned
31
+
32
+ ### 2. Trace data flow according to project architecture
33
+
34
+ Depending on the framework, trace the corresponding flow:
35
+
36
+ **Spring Boot (Java)**
37
+ ```
38
+ Controller (@RestController)
39
+ → Service (@Service / ServiceImpl)
40
+ → Repository (JpaRepository)
41
+ → Database
42
+ ```
43
+
44
+ **Laravel (PHP)**
45
+ ```
46
+ Route / Controller
47
+ → FormRequest (validation)
48
+ → Service / Action
49
+ → Model / Repository
50
+ → Database
51
+ ```
52
+
53
+ **React / Next.js**
54
+ ```
55
+ Page / Route component
56
+ → Custom Hook (useXxx)
57
+ → API call (axios / fetch)
58
+ → Backend endpoint
59
+ ```
60
+
61
+ At each layer: log input/output to pinpoint exactly **which layer** generates the incorrect value.
62
+
63
+ ### 3. Check Git history
64
+
65
+ ```bash
66
+ # Who changed this file last, and why
67
+ git blame <file>
68
+
69
+ # See detailed changes over time
70
+ git log -p <file>
71
+
72
+ # Find which commit introduced the bug (if the timing is known)
73
+ git bisect start
74
+ ```
75
+
76
+ Purpose: **to avoid accidentally breaking other business logic** when fixing.
77
+
78
+ ### 4. After fixing — run Impact Analysis
79
+
80
+ Invoke the `impact-analysis` skill to ensure the fix doesn't affect other parts.
81
+
82
+ ---
83
+
84
+ ## Completion Checklist
85
+
86
+ - [ ] Read all ticket content + comments
87
+ - [ ] Reproduced the error before fixing
88
+ - [ ] Traced the exact layer causing the error
89
+ - [ ] Checked git blame to understand context
90
+ - [ ] Root cause identified clearly
91
+ - [ ] Fix is minimal — only modified necessary parts
92
+ - [ ] Tests passed (unit + integration)
93
+ - [ ] Impact analysis has been run
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: report-customer
3
+ description: Write an incident report for customers or customer service after a production bug fix. Non-technical, easy-to-understand language.
4
+ keywords: report, incident, customer, customer service, CS
5
+ ---
6
+
7
+ # Report Customer (Incident Report)
8
+
9
+ ## When to use
10
+
11
+ - After fixing a bug that affects users/customers
12
+ - Customer Service needs a report explaining the cause to customers
13
+ - Need to document the incident for future reference
14
+
15
+ ---
16
+
17
+ ## Process
18
+
19
+ ### Step 1: Gather information
20
+
21
+ Collect from `investigate-bug` results or developer descriptions:
22
+ - Ticket ID and title
23
+ - Discovery time / impact duration
24
+ - Number of affected users / orders
25
+ - Identified root cause
26
+ - Deployment status
27
+
28
+ ### Step 2: Write the report
29
+
30
+ Fill in the structure below. **Use simple language, avoiding technical jargon.**
31
+
32
+ ---
33
+
34
+ ## Standard Structure (English)
35
+
36
+ ```markdown
37
+ ## 📋 Incident Verification Report
38
+
39
+ **Ticket ID:** [ID]
40
+ **Assigned to:** [Dev Name]
41
+ **Resolution Date:** [YYYY-MM-DD]
42
+ **Status:** ✅ Resolved / 🔄 In Progress
43
+
44
+ ---
45
+
46
+ ### 1. Summary
47
+
48
+ [1–2 sentences describing the issue in non-technical language.
49
+ Example: "Between 14:00–15:30 on [Date], some
50
+ users were unable to complete order payments."]
51
+
52
+ ---
53
+
54
+ ### 2. Root Cause
55
+
56
+ [Simple explanation, no code references.
57
+ Example: "Due to a system update failing to correctly handle
58
+ slow connections with the payment gateway."]
59
+
60
+ ---
61
+
62
+ ### 3. Resolution
63
+
64
+ [Steps taken by the technical team.
65
+ Example: "Updated the timeout handling mechanism and deployed
66
+ the fix at 16:00 on [Date]."]
67
+
68
+ ---
69
+
70
+ ### 4. Data Impact
71
+
72
+ - Was existing data affected? [Yes / No]
73
+ - Data recovery status: [Update script run / Not necessary]
74
+
75
+ ---
76
+
77
+ ### 5. Expected Behavior
78
+
79
+ [Actions the customer should take to verify normal operation.
80
+ Example: "Customers can now attempt payment normally.
81
+ If problems persist, please contact our support hotline..."]
82
+ ```
83
+
84
+ ---
85
+
86
+ ## Writing Rules
87
+
88
+ - ✅ Simple language, avoid technical jargon
89
+ - ✅ Honest about scope and duration of impact
90
+ - ✅ Focus on **user impact**, not code details
91
+ - ✅ Always include instructions for the customer to verify the fix
92
+ - ❌ Do not blame third parties unless certain
93
+ - ❌ Do not commit to specific deadlines unless certain
94
+
95
+ Present clearly and professionally. Default is English unless otherwise requested.