@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,303 @@
1
+ const fs = require('fs-extra');
2
+ const path = require('path');
3
+ const chalk = require('chalk');
4
+
5
+ module.exports = async function validate(filePath, options = {}) {
6
+ const ruleSet = options.ruleset || 'default';
7
+ const verbose = options.verbose || false;
8
+ const autoFix = options.fix || false;
9
+
10
+ console.log(chalk.blue(`Validating ${path.basename(filePath)} against ruleset: ${ruleSet}`));
11
+
12
+ if (!(await fs.pathExists(filePath))) {
13
+ console.error(chalk.red(`File not found: ${filePath}`));
14
+ return;
15
+ }
16
+
17
+ const content = await fs.readFile(filePath, 'utf-8');
18
+ const issues = [];
19
+
20
+ // Load rules
21
+ const rulesDir = path.join(process.cwd(), '.rules');
22
+ let activeRules = [];
23
+
24
+ if (await fs.pathExists(rulesDir)) {
25
+ const ruleFiles = await fs.readdir(rulesDir);
26
+ activeRules = ruleFiles.filter(f => f.endsWith('.md'));
27
+ }
28
+
29
+ // Run validations
30
+ const codeStyleIssues = validateCodeStyle(content, filePath);
31
+ const namingIssues = validateNaming(content);
32
+ const securityIssues = validateSecurity(content);
33
+ const performanceIssues = validatePerformance(content);
34
+ const testingIssues = validateTesting(content, filePath);
35
+
36
+ issues.push(...codeStyleIssues);
37
+ issues.push(...namingIssues);
38
+ issues.push(...securityIssues);
39
+ issues.push(...performanceIssues);
40
+ issues.push(...testingIssues);
41
+
42
+ // Filter by ruleset strictness
43
+ const filtered = filterByRuleset(issues, ruleSet);
44
+
45
+ // Display results
46
+ displayResults(filtered, verbose);
47
+
48
+ // Auto-fix: rewrite file with trailing whitespace removed
49
+ if (autoFix && filtered.some(i => i.type === 'trailing-whitespace' || i.type === 'indentation')) {
50
+ const fixed = autoFixContent(content);
51
+ await fs.writeFile(filePath, fixed, 'utf-8');
52
+ console.log(chalk.green(`✓ Auto-fixed: trailing whitespace removed in ${path.basename(filePath)}`));
53
+ }
54
+
55
+ return {
56
+ passed: filtered.length === 0,
57
+ issues: filtered,
58
+ total: filtered.length,
59
+ warnings: filtered.filter(i => i.severity === 'warning').length,
60
+ errors: filtered.filter(i => i.severity === 'error').length
61
+ };
62
+ };
63
+
64
+ /**
65
+ * Validate code style (indentation, brackets, etc)
66
+ */
67
+ function validateCodeStyle(content, filePath) {
68
+ const issues = [];
69
+ const ext = path.extname(filePath);
70
+
71
+ if (!['.php', '.js', '.ts', '.tsx', '.jsx'].includes(ext)) {
72
+ return issues;
73
+ }
74
+
75
+ const lines = content.split('\n');
76
+
77
+ lines.forEach((line, i) => {
78
+ const lineNum = i + 1;
79
+
80
+ // Check indentation consistency
81
+ const leadingSpaces = line.match(/^(\s*)/)[1].length;
82
+ if (leadingSpaces % 4 !== 0 && line.trim() !== '' && leadingSpaces > 0) {
83
+ issues.push({
84
+ type: 'indentation',
85
+ line: lineNum,
86
+ severity: 'warning',
87
+ message: 'Inconsistent indentation (not multiple of 4)',
88
+ suggestion: `Indent with 4 spaces`
89
+ });
90
+ }
91
+
92
+ // Check trailing whitespace
93
+ if (line.endsWith(' ') || line.endsWith('\t')) {
94
+ issues.push({
95
+ type: 'trailing-whitespace',
96
+ line: lineNum,
97
+ severity: 'warning',
98
+ message: 'Trailing whitespace',
99
+ suggestion: 'Remove trailing whitespace'
100
+ });
101
+ }
102
+
103
+ // Check line length (max 120 characters for PHP, 100 for others)
104
+ const maxLen = ext === '.php' ? 120 : 100;
105
+ if (line.length > maxLen) {
106
+ issues.push({
107
+ type: 'line-too-long',
108
+ line: lineNum,
109
+ severity: 'warning',
110
+ message: `Line too long (${line.length} > ${maxLen})`,
111
+ suggestion: 'Break into multiple lines'
112
+ });
113
+ }
114
+ });
115
+
116
+ return issues;
117
+ }
118
+
119
+ /**
120
+ * Validate naming conventions
121
+ */
122
+ function validateNaming(content) {
123
+ const issues = [];
124
+
125
+ // Check for single-letter variables (except in loops)
126
+ const singleLetterVars = content.match(/\b([a-z])\s*=/g);
127
+ if (singleLetterVars) {
128
+ const matches = content.match(/\$([a-z])\s*=/g) || [];
129
+ if (matches.length > 0) {
130
+ issues.push({
131
+ type: 'single-letter-var',
132
+ severity: 'warning',
133
+ message: 'Single-letter variable names found',
134
+ suggestion: 'Use descriptive variable names'
135
+ });
136
+ }
137
+ }
138
+
139
+ // Check for camelCase vs snake_case consistency
140
+ const phpVars = content.match(/\$[a-zA-Z_][a-zA-Z0-9_]*/g) || [];
141
+ const hasSnakeCase = phpVars.some(v => v.includes('_'));
142
+ const hasCamelCase = phpVars.some(v => /[a-z][A-Z]/.test(v));
143
+
144
+ if (hasSnakeCase && hasCamelCase) {
145
+ issues.push({
146
+ type: 'naming-inconsistency',
147
+ severity: 'warning',
148
+ message: 'Mixed snake_case and camelCase variables',
149
+ suggestion: 'Use consistent naming convention'
150
+ });
151
+ }
152
+
153
+ return issues;
154
+ }
155
+
156
+ /**
157
+ * Validate security issues
158
+ */
159
+ function validateSecurity(content) {
160
+ const issues = [];
161
+
162
+ // Check for common security issues
163
+ const securityPatterns = [
164
+ {
165
+ pattern: /eval\s*\(/gi,
166
+ message: 'Using eval() is a security risk',
167
+ type: 'eval-usage'
168
+ },
169
+ {
170
+ pattern: /\$_\w+\s*\[/g,
171
+ message: 'Direct use of $_GET, $_POST, etc without sanitization',
172
+ type: 'unsanitized-input'
173
+ },
174
+ {
175
+ pattern: /sql\s*=\s*["'].*["']\s*\+/gi,
176
+ message: 'Possible SQL injection vulnerability',
177
+ type: 'sql-injection'
178
+ }
179
+ ];
180
+
181
+ for (const { pattern, message, type } of securityPatterns) {
182
+ if (pattern.test(content)) {
183
+ issues.push({
184
+ type,
185
+ severity: 'error',
186
+ message,
187
+ suggestion: 'Use parameterized queries or input sanitization'
188
+ });
189
+ }
190
+ }
191
+
192
+ return issues;
193
+ }
194
+
195
+ /**
196
+ * Validate performance issues
197
+ */
198
+ function validatePerformance(content) {
199
+ const issues = [];
200
+
201
+ // Check for N+1 query patterns
202
+ if (content.includes('foreach') && content.includes('query')) {
203
+ issues.push({
204
+ type: 'n-plus-one',
205
+ severity: 'warning',
206
+ message: 'Potential N+1 query problem detected',
207
+ suggestion: 'Use eager loading or batch queries'
208
+ });
209
+ }
210
+
211
+ // Check for unnecessary loops
212
+ if (content.match(/for\s*\([^)]*;\s*[^)]*;\s*[^)]*\)\s*{\s*if\s*\(/)) {
213
+ issues.push({
214
+ type: 'inefficient-loop',
215
+ severity: 'warning',
216
+ message: 'Consider using filter() or array functions',
217
+ suggestion: 'Use array methods for better performance'
218
+ });
219
+ }
220
+
221
+ return issues;
222
+ }
223
+
224
+ /**
225
+ * Validate testing coverage
226
+ */
227
+ function validateTesting(content, filePath) {
228
+ const issues = [];
229
+ const fileName = path.basename(filePath);
230
+
231
+ // Check if this is a test file
232
+ const isTestFile = fileName.includes('.test.') || fileName.includes('.spec.');
233
+
234
+ if (!isTestFile && (filePath.includes('src/') || filePath.includes('app/'))) {
235
+ const baseName = fileName.split('.')[0];
236
+ issues.push({
237
+ type: 'missing-tests',
238
+ severity: 'warning',
239
+ message: `No corresponding test file found for ${fileName}`,
240
+ suggestion: `Create ${baseName}.test.js or ${baseName}.spec.js`
241
+ });
242
+ }
243
+
244
+ return issues;
245
+ }
246
+
247
+ /**
248
+ * Filter issues by ruleset strictness:
249
+ * strict → all issues (warnings + errors)
250
+ * default → errors + warnings (same as strict — team standard)
251
+ * lenient → errors only
252
+ */
253
+ function filterByRuleset(issues, ruleSet) {
254
+ if (ruleSet === 'lenient') {
255
+ return issues.filter(i => i.severity === 'error');
256
+ }
257
+ // 'strict' and 'default' both return everything
258
+ return issues;
259
+ }
260
+
261
+ /**
262
+ * Auto-fix: remove trailing whitespace from every line.
263
+ * Indentation normalization is not attempted (too risky without AST).
264
+ */
265
+ function autoFixContent(content) {
266
+ return content
267
+ .split('\n')
268
+ .map(line => line.replace(/\s+$/, ''))
269
+ .join('\n');
270
+ }
271
+
272
+ /**
273
+ * Display validation results
274
+ */
275
+ function displayResults(issues, verbose) {
276
+ if (issues.length === 0) {
277
+ console.log(chalk.green('✓ No issues found'));
278
+ return;
279
+ }
280
+
281
+ const errors = issues.filter(i => i.severity === 'error');
282
+ const warnings = issues.filter(i => i.severity === 'warning');
283
+
284
+ if (errors.length > 0) {
285
+ console.log(chalk.red(`\n❌ ${errors.length} Error(s):`));
286
+ errors.forEach(issue => {
287
+ console.log(chalk.red(` • [${issue.type}] ${issue.message}`));
288
+ if (issue.line) console.log(chalk.gray(` Line ${issue.line}`));
289
+ console.log(chalk.yellow(` → ${issue.suggestion}`));
290
+ });
291
+ }
292
+
293
+ if (warnings.length > 0) {
294
+ console.log(chalk.yellow(`\n⚠️ ${warnings.length} Warning(s):`));
295
+ warnings.forEach(issue => {
296
+ console.log(chalk.yellow(` • [${issue.type}] ${issue.message}`));
297
+ if (issue.line) console.log(chalk.gray(` Line ${issue.line}`));
298
+ console.log(chalk.gray(` → ${issue.suggestion}`));
299
+ });
300
+ }
301
+
302
+ console.log(chalk.gray(`\nTotal: ${errors.length} errors, ${warnings.length} warnings`));
303
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "superpowers-dev",
3
+ "description": "Development marketplace for Superpowers core skills library",
4
+ "owner": {
5
+ "name": "Jesse Vincent",
6
+ "email": "jesse@fsck.com"
7
+ },
8
+ "plugins": [
9
+ {
10
+ "name": "superpowers",
11
+ "description": "Core skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques",
12
+ "version": "5.0.7",
13
+ "source": "./",
14
+ "author": {
15
+ "name": "Jesse Vincent",
16
+ "email": "jesse@fsck.com"
17
+ }
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "superpowers",
3
+ "description": "Core skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques",
4
+ "version": "5.0.7",
5
+ "author": {
6
+ "name": "Jesse Vincent",
7
+ "email": "jesse@fsck.com"
8
+ },
9
+ "homepage": "https://github.com/obra/superpowers",
10
+ "repository": "https://github.com/obra/superpowers",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "skills",
14
+ "tdd",
15
+ "debugging",
16
+ "collaboration",
17
+ "best-practices",
18
+ "workflows"
19
+ ]
20
+ }
@@ -0,0 +1,67 @@
1
+ # Installing Superpowers for Codex
2
+
3
+ Enable superpowers skills in Codex via native skill discovery. Just clone and symlink.
4
+
5
+ ## Prerequisites
6
+
7
+ - Git
8
+
9
+ ## Installation
10
+
11
+ 1. **Clone the superpowers repository:**
12
+ ```bash
13
+ git clone https://github.com/obra/superpowers.git ~/.codex/superpowers
14
+ ```
15
+
16
+ 2. **Create the skills symlink:**
17
+ ```bash
18
+ mkdir -p ~/.agents/skills
19
+ ln -s ~/.codex/superpowers/skills ~/.agents/skills/superpowers
20
+ ```
21
+
22
+ **Windows (PowerShell):**
23
+ ```powershell
24
+ New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.agents\skills"
25
+ cmd /c mklink /J "$env:USERPROFILE\.agents\skills\superpowers" "$env:USERPROFILE\.codex\superpowers\skills"
26
+ ```
27
+
28
+ 3. **Restart Codex** (quit and relaunch the CLI) to discover the skills.
29
+
30
+ ## Migrating from old bootstrap
31
+
32
+ If you installed superpowers before native skill discovery, you need to:
33
+
34
+ 1. **Update the repo:**
35
+ ```bash
36
+ cd ~/.codex/superpowers && git pull
37
+ ```
38
+
39
+ 2. **Create the skills symlink** (step 2 above) — this is the new discovery mechanism.
40
+
41
+ 3. **Remove the old bootstrap block** from `~/.codex/AGENTS.md` — any block referencing `superpowers-codex bootstrap` is no longer needed.
42
+
43
+ 4. **Restart Codex.**
44
+
45
+ ## Verify
46
+
47
+ ```bash
48
+ ls -la ~/.agents/skills/superpowers
49
+ ```
50
+
51
+ You should see a symlink (or junction on Windows) pointing to your superpowers skills directory.
52
+
53
+ ## Updating
54
+
55
+ ```bash
56
+ cd ~/.codex/superpowers && git pull
57
+ ```
58
+
59
+ Skills update instantly through the symlink.
60
+
61
+ ## Uninstalling
62
+
63
+ ```bash
64
+ rm ~/.agents/skills/superpowers
65
+ ```
66
+
67
+ Optionally delete the clone: `rm -rf ~/.codex/superpowers`.
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "superpowers",
3
+ "displayName": "Superpowers",
4
+ "description": "Core skills library: TDD, debugging, collaboration patterns, and proven techniques",
5
+ "version": "5.0.7",
6
+ "author": {
7
+ "name": "Jesse Vincent",
8
+ "email": "jesse@fsck.com"
9
+ },
10
+ "homepage": "https://github.com/obra/superpowers",
11
+ "repository": "https://github.com/obra/superpowers",
12
+ "license": "MIT",
13
+ "keywords": [
14
+ "skills",
15
+ "tdd",
16
+ "debugging",
17
+ "collaboration",
18
+ "best-practices",
19
+ "workflows"
20
+ ],
21
+ "skills": "./skills/",
22
+ "agents": "./agents/",
23
+ "commands": "./commands/",
24
+ "hooks": "./hooks/hooks-cursor.json"
25
+ }
@@ -0,0 +1,18 @@
1
+ # Ensure shell scripts always have LF line endings
2
+ *.sh text eol=lf
3
+ hooks/session-start text eol=lf
4
+
5
+ # Ensure the polyglot wrapper keeps LF (it's parsed by both cmd and bash)
6
+ *.cmd text eol=lf
7
+
8
+ # Common text files
9
+ *.md text eol=lf
10
+ *.json text eol=lf
11
+ *.js text eol=lf
12
+ *.mjs text eol=lf
13
+ *.ts text eol=lf
14
+
15
+ # Explicitly mark binary files
16
+ *.png binary
17
+ *.jpg binary
18
+ *.gif binary
@@ -0,0 +1,3 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: [obra]
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Something isn't working as expected
4
+ labels: bug
5
+ ---
6
+
7
+ <!--
8
+ BEFORE FILING: Search open AND closed issues. The Windows SessionStart
9
+ hook alone has been reported 29 times. If your issue already exists,
10
+ add a comment or reaction to the existing one instead.
11
+ -->
12
+
13
+ - [ ] I searched existing issues and this is not a duplicate
14
+
15
+ ## Environment
16
+
17
+ | Field | Value |
18
+ |-------|-------|
19
+ | Superpowers version | |
20
+ | Harness (Claude Code, Cursor, etc.) | |
21
+ | Harness version | |
22
+ | Model | |
23
+ | OS + shell | |
24
+
25
+ ## Is this a Superpowers issue or a platform issue?
26
+ <!-- Superpowers is a plugin. Some reported "bugs" are actually issues
27
+ in the underlying platform or model. If you're not sure, try
28
+ reproducing without Superpowers installed.
29
+
30
+ If the problem persists without Superpowers, file the issue with
31
+ your platform instead. -->
32
+
33
+ - [ ] I confirmed this issue does not occur without Superpowers installed
34
+
35
+ ## What happened?
36
+ <!-- Be specific. "It doesn't work" is not a bug report. -->
37
+
38
+ ## Steps to reproduce
39
+ 1.
40
+ 2.
41
+ 3.
42
+
43
+ ## Expected behavior
44
+ <!-- What should have happened? -->
45
+
46
+ ## Actual behavior
47
+ <!-- What happened instead? -->
48
+
49
+ ## Debug log or conversation transcript
50
+ <!-- A debug log or conversation transcript showing the issue is the
51
+ single most helpful thing you can include. Without one, we're
52
+ guessing. Screenshots of error output are also useful. -->
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Questions & Help
4
+ url: https://discord.gg/Jd8Vphy9jq
5
+ about: For usage questions, troubleshooting help, and general discussion, please visit our Discord instead of opening an issue.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Propose a change or addition to Superpowers
4
+ labels: enhancement
5
+ ---
6
+
7
+ <!--
8
+ BEFORE FILING: Search open AND closed issues. Many features have been
9
+ requested before — some were implemented differently, some are in
10
+ progress, and some were intentionally declined.
11
+ -->
12
+
13
+ - [ ] I searched existing issues and this has not been proposed before
14
+
15
+ ## What problem does this solve?
16
+ <!-- Describe the problem from your own experience. What were you doing,
17
+ what went wrong or was missing, and why did it matter?
18
+
19
+ "It would be cool if..." is not a problem statement. -->
20
+
21
+ ## Proposed solution
22
+ <!-- What specifically do you want to happen? Be concrete. -->
23
+
24
+ ## What alternatives did you consider?
25
+ <!-- What other approaches could solve the same problem? Why is your
26
+ proposal better? -->
27
+
28
+ ## Is this appropriate for core Superpowers?
29
+ <!-- Would this benefit someone working on a completely different kind
30
+ of project? If this is specific to your domain, workflow, or a
31
+ third-party tool, it may belong as its own plugin instead. -->
32
+
33
+ ## Context
34
+ <!-- Optional: version info, harness, model, workflow where you hit this. -->
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: IDE / Platform Support Request
3
+ about: Request support for a new IDE, editor, or AI coding tool
4
+ labels: platform-support
5
+ ---
6
+
7
+ <!--
8
+ BEFORE FILING: Search existing issues — your IDE may already be
9
+ requested or discussed.
10
+ -->
11
+
12
+ - [ ] I searched existing issues for this IDE/platform
13
+
14
+ ## Which IDE or platform?
15
+ <!-- Name and link -->
16
+
17
+ ## Does this tool have a plugin or extension system?
18
+ <!-- If yes, link to the docs. If no, explain how third-party
19
+ integrations typically work with this tool. -->
20
+
21
+ ## Have you tried manual installation?
22
+ <!-- Many tools work with Superpowers through manual setup even without
23
+ official support. Did you try? What happened? -->
@@ -0,0 +1,87 @@
1
+ <!--
2
+ BEFORE SUBMITTING: Read every word of this template. PRs that leave
3
+ sections blank, contain multiple unrelated changes, or show no evidence
4
+ of human involvement will be closed without review.
5
+ -->
6
+
7
+ ## What problem are you trying to solve?
8
+ <!-- Describe the specific problem you encountered. If this was a session
9
+ issue, include: what you were doing, what went wrong, the model's
10
+ exact failure mode, and ideally a transcript or session log.
11
+
12
+ "Improving" something is not a problem statement. What broke? What
13
+ failed? What was the user experience that motivated this? -->
14
+
15
+ ## What does this PR change?
16
+ <!-- 1-3 sentences. What, not why — the "why" belongs above. -->
17
+
18
+ ## Is this change appropriate for the core library?
19
+ <!-- Superpowers core contains general-purpose skills and infrastructure
20
+ that benefit all users. Ask yourself:
21
+
22
+ - Would this be useful to someone working on a completely different
23
+ kind of project than yours?
24
+ - Is this project-specific, team-specific, or tool-specific?
25
+ - Does this integrate or promote a third-party service?
26
+
27
+ If your change is a new skill for a specific domain, workflow tool,
28
+ or third-party integration, it belongs in its own plugin — not here.
29
+ See the plugin development docs for how to publish it separately. -->
30
+
31
+ ## What alternatives did you consider?
32
+ <!-- What other approaches did you try or evaluate before landing on this
33
+ one? Why were they worse? If you didn't consider alternatives, say so
34
+ — but know that's a red flag. -->
35
+
36
+ ## Does this PR contain multiple unrelated changes?
37
+ <!-- If yes: stop. Split it into separate PRs. Bundled PRs will be closed.
38
+ If you believe the changes are related, explain the dependency. -->
39
+
40
+ ## Existing PRs
41
+ - [ ] I have reviewed all open AND closed PRs for duplicates or prior art
42
+ - Related PRs: <!-- #number, #number, or "none found" -->
43
+
44
+ <!-- If a related closed PR exists, explain what's different about your
45
+ approach and why it should succeed where the other didn't. -->
46
+
47
+ ## Environment tested
48
+
49
+ | Harness (e.g. Claude Code, Cursor) | Harness version | Model | Model version/ID |
50
+ |-------------------------------------|-----------------|-------|------------------|
51
+ | | | | |
52
+
53
+ ## Evaluation
54
+ - What was the initial prompt you (or your human partner) used to start
55
+ the session that led to this change?
56
+ - How many eval sessions did you run AFTER making the change?
57
+ - How did outcomes change compared to before the change?
58
+
59
+ <!-- "It works" is not evaluation. Describe the before/after difference
60
+ you observed across multiple sessions. -->
61
+
62
+ ## Rigor
63
+
64
+ - [ ] If this is a skills change: I used `superpowers:writing-skills` and
65
+ completed adversarial pressure testing (paste results below)
66
+ - [ ] This change was tested adversarially, not just on the happy path
67
+ - [ ] I did not modify carefully-tuned content (Red Flags table,
68
+ rationalizations, "human partner" language) without extensive evals
69
+ showing the change is an improvement
70
+
71
+ <!-- If you changed wording in skills that shape agent behavior, show your
72
+ eval methodology and results. These are not prose — they are code. -->
73
+
74
+ ## Human review
75
+ - [ ] A human has reviewed the COMPLETE proposed diff before submission
76
+
77
+ <!--
78
+ STOP. If the checkbox above is not checked, do not submit this PR.
79
+
80
+ PRs will be closed without review if they:
81
+ - Show no evidence of human involvement
82
+ - Contain multiple unrelated changes
83
+ - Promote or integrate third-party services or tools
84
+ - Submit project-specific or personal configuration as core changes
85
+ - Leave required sections blank or use placeholder text
86
+ - Modify behavior-shaping content without eval evidence
87
+ -->