showdar-skills 0.2.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 (304) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +322 -0
  3. package/bin/showdar.js +118 -0
  4. package/bundles/bugfix.yaml +4 -0
  5. package/bundles/design.yaml +4 -0
  6. package/bundles/feature.yaml +4 -0
  7. package/bundles/release.yaml +4 -0
  8. package/bundles/upgrade.yaml +4 -0
  9. package/commands/opencode/showdar/build.md +6 -0
  10. package/commands/opencode/showdar/debug.md +6 -0
  11. package/commands/opencode/showdar/design.md +6 -0
  12. package/commands/opencode/showdar/git.md +6 -0
  13. package/commands/opencode/showdar/ops.md +7 -0
  14. package/commands/opencode/showdar/plan.md +6 -0
  15. package/commands/opencode/showdar/quality.md +7 -0
  16. package/commands/opencode/showdar/recover.md +6 -0
  17. package/commands/opencode/showdar/requirements.md +7 -0
  18. package/commands/opencode/showdar/review.md +6 -0
  19. package/commands/opencode/showdar/security.md +7 -0
  20. package/commands/opencode/showdar/ship.md +6 -0
  21. package/commands/opencode/showdar/skill.md +6 -0
  22. package/commands/opencode/showdar/test.md +6 -0
  23. package/commands/opencode/showdar/understand.md +6 -0
  24. package/commands/opencode/showdar/upgrade.md +6 -0
  25. package/engine/csv.mjs +45 -0
  26. package/engine/detect-stack.mjs +48 -0
  27. package/engine/rank.mjs +40 -0
  28. package/engine/search.mjs +20 -0
  29. package/package.json +28 -0
  30. package/profiles/backend.json +1 -0
  31. package/profiles/developer.json +1 -0
  32. package/profiles/full.json +1 -0
  33. package/profiles/minimal.json +1 -0
  34. package/profiles/product.json +1 -0
  35. package/profiles/qa.json +1 -0
  36. package/router/conflicts.yaml +50 -0
  37. package/router/skill-map.yaml +54 -0
  38. package/router/triggers.yaml +30 -0
  39. package/skills/showdar-build/SKILL.md +154 -0
  40. package/skills/showdar-build/data/change-smells.csv +24 -0
  41. package/skills/showdar-build/data/index.json +14 -0
  42. package/skills/showdar-build/examples/change-surface.md +18 -0
  43. package/skills/showdar-build/references/architecture-boundaries.md +3 -0
  44. package/skills/showdar-build/references/error-handling.md +3 -0
  45. package/skills/showdar-build/references/feature-flags.md +3 -0
  46. package/skills/showdar-build/references/minimal-change.md +3 -0
  47. package/skills/showdar-build/scripts/change-surface.mjs +5 -0
  48. package/skills/showdar-build/stacks/dart.md +3 -0
  49. package/skills/showdar-build/stacks/flutter.md +3 -0
  50. package/skills/showdar-build/stacks/kotlin.md +3 -0
  51. package/skills/showdar-build/stacks/nextjs.md +3 -0
  52. package/skills/showdar-build/stacks/node-fastify.md +3 -0
  53. package/skills/showdar-build/stacks/node-nestjs.md +3 -0
  54. package/skills/showdar-build/stacks/react-native.md +3 -0
  55. package/skills/showdar-build/stacks/react.md +3 -0
  56. package/skills/showdar-build/stacks/rust-tauri.md +3 -0
  57. package/skills/showdar-build/stacks/swift.md +3 -0
  58. package/skills/showdar-build/stacks/typescript.md +3 -0
  59. package/skills/showdar-debug/SKILL.md +179 -0
  60. package/skills/showdar-debug/data/failure-patterns.csv +34 -0
  61. package/skills/showdar-debug/data/index.json +14 -0
  62. package/skills/showdar-debug/examples/evidence-log.md +19 -0
  63. package/skills/showdar-debug/references/async-races.md +3 -0
  64. package/skills/showdar-debug/references/build-failures.md +3 -0
  65. package/skills/showdar-debug/references/hypothesis-driven-debugging.md +3 -0
  66. package/skills/showdar-debug/references/memory.md +3 -0
  67. package/skills/showdar-debug/references/networking.md +3 -0
  68. package/skills/showdar-debug/references/performance.md +3 -0
  69. package/skills/showdar-debug/scripts/collect-context.mjs +8 -0
  70. package/skills/showdar-debug/scripts/lib/detect-stack.mjs +48 -0
  71. package/skills/showdar-debug/stacks/android.md +21 -0
  72. package/skills/showdar-debug/stacks/docker.md +21 -0
  73. package/skills/showdar-debug/stacks/flutter.md +21 -0
  74. package/skills/showdar-debug/stacks/ios.md +21 -0
  75. package/skills/showdar-debug/stacks/nextjs.md +21 -0
  76. package/skills/showdar-debug/stacks/node.md +21 -0
  77. package/skills/showdar-debug/stacks/react-native.md +21 -0
  78. package/skills/showdar-debug/stacks/react.md +21 -0
  79. package/skills/showdar-debug/stacks/tauri.md +21 -0
  80. package/skills/showdar-design/SKILL.md +179 -0
  81. package/skills/showdar-design/data/accessibility.csv +16 -0
  82. package/skills/showdar-design/data/colors.csv +13 -0
  83. package/skills/showdar-design/data/components.csv +20 -0
  84. package/skills/showdar-design/data/index.json +25 -0
  85. package/skills/showdar-design/data/motion.csv +13 -0
  86. package/skills/showdar-design/data/products.csv +19 -0
  87. package/skills/showdar-design/data/stacks/compose.csv +9 -0
  88. package/skills/showdar-design/data/stacks/flutter.csv +9 -0
  89. package/skills/showdar-design/data/stacks/html-tailwind.csv +9 -0
  90. package/skills/showdar-design/data/stacks/nextjs.csv +9 -0
  91. package/skills/showdar-design/data/stacks/nuxt.csv +9 -0
  92. package/skills/showdar-design/data/stacks/react-native.csv +9 -0
  93. package/skills/showdar-design/data/stacks/react.csv +9 -0
  94. package/skills/showdar-design/data/stacks/svelte.csv +9 -0
  95. package/skills/showdar-design/data/stacks/swiftui.csv +9 -0
  96. package/skills/showdar-design/data/stacks/tauri.csv +9 -0
  97. package/skills/showdar-design/data/stacks/vue.csv +9 -0
  98. package/skills/showdar-design/data/styles.csv +13 -0
  99. package/skills/showdar-design/data/typography.csv +13 -0
  100. package/skills/showdar-design/data/ui-patterns.csv +19 -0
  101. package/skills/showdar-design/examples/design-brief.md +19 -0
  102. package/skills/showdar-design/references/accessibility.md +5 -0
  103. package/skills/showdar-design/references/anti-ai-ui.md +5 -0
  104. package/skills/showdar-design/references/architecture.md +12 -0
  105. package/skills/showdar-design/references/interaction.md +5 -0
  106. package/skills/showdar-design/references/layout.md +5 -0
  107. package/skills/showdar-design/references/release-readiness.md +12 -0
  108. package/skills/showdar-design/references/responsive.md +5 -0
  109. package/skills/showdar-design/references/security.md +12 -0
  110. package/skills/showdar-design/references/visual-hierarchy.md +7 -0
  111. package/skills/showdar-design/scripts/lib/csv.mjs +40 -0
  112. package/skills/showdar-design/scripts/lib/rank.mjs +35 -0
  113. package/skills/showdar-design/scripts/lib/search.mjs +20 -0
  114. package/skills/showdar-design/scripts/search.mjs +38 -0
  115. package/skills/showdar-design/stacks/flutter.md +13 -0
  116. package/skills/showdar-design/stacks/html-tailwind.md +12 -0
  117. package/skills/showdar-design/stacks/jetpack-compose.md +13 -0
  118. package/skills/showdar-design/stacks/nextjs.md +12 -0
  119. package/skills/showdar-design/stacks/nuxt.md +11 -0
  120. package/skills/showdar-design/stacks/react-native.md +13 -0
  121. package/skills/showdar-design/stacks/react.md +12 -0
  122. package/skills/showdar-design/stacks/svelte.md +11 -0
  123. package/skills/showdar-design/stacks/swiftui.md +12 -0
  124. package/skills/showdar-design/stacks/tauri.md +12 -0
  125. package/skills/showdar-design/stacks/vue.md +12 -0
  126. package/skills/showdar-git/SKILL.md +291 -0
  127. package/skills/showdar-git/data/git-workflows.csv +7 -0
  128. package/skills/showdar-git/data/index.json +14 -0
  129. package/skills/showdar-git/examples/commit-task-only.md +15 -0
  130. package/skills/showdar-git/examples/conflict-stop.md +7 -0
  131. package/skills/showdar-git/examples/explicit-push.md +7 -0
  132. package/skills/showdar-git/examples/feature-merge-no-push.md +13 -0
  133. package/skills/showdar-git/references/operation-safety.md +34 -0
  134. package/skills/showdar-git/scripts/inspect-git-state.mjs +53 -0
  135. package/skills/showdar-ops/SKILL.md +160 -0
  136. package/skills/showdar-ops/data/index.json +14 -0
  137. package/skills/showdar-ops/data/ops-patterns.csv +12 -0
  138. package/skills/showdar-ops/examples/explicit-deployment.md +5 -0
  139. package/skills/showdar-ops/examples/fix-existing-ci.md +5 -0
  140. package/skills/showdar-ops/examples/inspect-ci-readonly.md +7 -0
  141. package/skills/showdar-ops/examples/rollback-plan.md +5 -0
  142. package/skills/showdar-ops/examples/staging-plan.md +5 -0
  143. package/skills/showdar-ops/references/ci-cd.md +5 -0
  144. package/skills/showdar-ops/references/containers.md +5 -0
  145. package/skills/showdar-ops/references/deployment.md +5 -0
  146. package/skills/showdar-ops/references/desktop-release.md +3 -0
  147. package/skills/showdar-ops/references/environments.md +5 -0
  148. package/skills/showdar-ops/references/mobile-release.md +3 -0
  149. package/skills/showdar-ops/references/observability.md +5 -0
  150. package/skills/showdar-ops/references/rollback.md +5 -0
  151. package/skills/showdar-ops/scripts/inspect-ops-state.mjs +54 -0
  152. package/skills/showdar-plan/SKILL.md +159 -0
  153. package/skills/showdar-plan/data/index.json +14 -0
  154. package/skills/showdar-plan/data/planning-checklists.csv +25 -0
  155. package/skills/showdar-plan/examples/feature-plan.md +19 -0
  156. package/skills/showdar-plan/references/architecture.md +5 -0
  157. package/skills/showdar-plan/references/requirements.md +5 -0
  158. package/skills/showdar-plan/references/risk-analysis.md +5 -0
  159. package/skills/showdar-plan/references/scope.md +5 -0
  160. package/skills/showdar-plan/references/task-decomposition.md +5 -0
  161. package/skills/showdar-plan/scripts/collect-planning-context.mjs +9 -0
  162. package/skills/showdar-plan/scripts/lib/detect-stack.mjs +48 -0
  163. package/skills/showdar-plan/stacks/backend.md +3 -0
  164. package/skills/showdar-plan/stacks/mobile.md +3 -0
  165. package/skills/showdar-plan/stacks/web.md +3 -0
  166. package/skills/showdar-quality/SKILL.md +166 -0
  167. package/skills/showdar-quality/data/index.json +14 -0
  168. package/skills/showdar-quality/data/quality-patterns.csv +11 -0
  169. package/skills/showdar-quality/references/qa-guide.md +20 -0
  170. package/skills/showdar-recover/SKILL.md +164 -0
  171. package/skills/showdar-recover/data/index.json +14 -0
  172. package/skills/showdar-recover/data/recovery-signals.csv +23 -0
  173. package/skills/showdar-recover/examples/recovery-report.md +18 -0
  174. package/skills/showdar-recover/references/failed-runs.md +3 -0
  175. package/skills/showdar-recover/references/interrupted-session.md +3 -0
  176. package/skills/showdar-recover/references/merge-conflicts.md +3 -0
  177. package/skills/showdar-recover/references/partial-implementation.md +3 -0
  178. package/skills/showdar-recover/scripts/inspect-state.mjs +5 -0
  179. package/skills/showdar-requirements/SKILL.md +172 -0
  180. package/skills/showdar-requirements/data/index.json +14 -0
  181. package/skills/showdar-requirements/data/requirements-patterns.csv +11 -0
  182. package/skills/showdar-requirements/references/analysis-guide.md +30 -0
  183. package/skills/showdar-review/SKILL.md +155 -0
  184. package/skills/showdar-review/data/index.json +14 -0
  185. package/skills/showdar-review/data/review-patterns.csv +27 -0
  186. package/skills/showdar-review/examples/finding.md +16 -0
  187. package/skills/showdar-review/references/architecture.md +3 -0
  188. package/skills/showdar-review/references/correctness.md +3 -0
  189. package/skills/showdar-review/references/maintainability.md +3 -0
  190. package/skills/showdar-review/references/performance.md +3 -0
  191. package/skills/showdar-review/references/security.md +3 -0
  192. package/skills/showdar-review/references/testing.md +3 -0
  193. package/skills/showdar-review/scripts/collect-diff.mjs +5 -0
  194. package/skills/showdar-review/stacks/android.md +3 -0
  195. package/skills/showdar-review/stacks/flutter.md +3 -0
  196. package/skills/showdar-review/stacks/ios.md +3 -0
  197. package/skills/showdar-review/stacks/nextjs.md +3 -0
  198. package/skills/showdar-review/stacks/node-backend.md +3 -0
  199. package/skills/showdar-review/stacks/react-native.md +3 -0
  200. package/skills/showdar-review/stacks/react.md +3 -0
  201. package/skills/showdar-review/stacks/swift-kotlin.md +3 -0
  202. package/skills/showdar-review/stacks/typescript.md +3 -0
  203. package/skills/showdar-security/SKILL.md +169 -0
  204. package/skills/showdar-security/data/index.json +14 -0
  205. package/skills/showdar-security/data/security-patterns.csv +13 -0
  206. package/skills/showdar-security/examples/api-authorization-review.md +9 -0
  207. package/skills/showdar-security/examples/mobile-deeplink-review.md +7 -0
  208. package/skills/showdar-security/examples/secret-exposure-review.md +5 -0
  209. package/skills/showdar-security/examples/threat-model-open-assumptions.md +11 -0
  210. package/skills/showdar-security/references/authz-secrets.md +7 -0
  211. package/skills/showdar-security/references/mobile-security.md +7 -0
  212. package/skills/showdar-security/references/supply-chain.md +5 -0
  213. package/skills/showdar-security/references/threat-modeling.md +12 -0
  214. package/skills/showdar-security/scripts/inspect-security-surface.mjs +47 -0
  215. package/skills/showdar-ship/SKILL.md +234 -0
  216. package/skills/showdar-ship/data/index.json +14 -0
  217. package/skills/showdar-ship/data/release-checks.csv +28 -0
  218. package/skills/showdar-ship/examples/release-report.md +25 -0
  219. package/skills/showdar-ship/references/migrations.md +12 -0
  220. package/skills/showdar-ship/references/post-deploy.md +12 -0
  221. package/skills/showdar-ship/references/release-readiness.md +13 -0
  222. package/skills/showdar-ship/references/rollback.md +12 -0
  223. package/skills/showdar-ship/references/secrets.md +3 -0
  224. package/skills/showdar-ship/scripts/detect-targets.mjs +5 -0
  225. package/skills/showdar-ship/scripts/lib/detect-stack.mjs +48 -0
  226. package/skills/showdar-ship/scripts/release-check.mjs +6 -0
  227. package/skills/showdar-ship/stacks/android.md +33 -0
  228. package/skills/showdar-ship/stacks/docker.md +30 -0
  229. package/skills/showdar-ship/stacks/electron.md +7 -0
  230. package/skills/showdar-ship/stacks/ios.md +34 -0
  231. package/skills/showdar-ship/stacks/nextjs.md +30 -0
  232. package/skills/showdar-ship/stacks/node-backend.md +37 -0
  233. package/skills/showdar-ship/stacks/orchestration.md +12 -0
  234. package/skills/showdar-ship/stacks/tauri.md +35 -0
  235. package/skills/showdar-ship/stacks/web.md +35 -0
  236. package/skills/showdar-test/SKILL.md +164 -0
  237. package/skills/showdar-test/data/index.json +14 -0
  238. package/skills/showdar-test/data/test-strategy.csv +22 -0
  239. package/skills/showdar-test/examples/regression.md +14 -0
  240. package/skills/showdar-test/references/e2e.md +3 -0
  241. package/skills/showdar-test/references/integration.md +3 -0
  242. package/skills/showdar-test/references/regression.md +3 -0
  243. package/skills/showdar-test/references/test-smells.md +3 -0
  244. package/skills/showdar-test/references/unit.md +3 -0
  245. package/skills/showdar-test/scripts/detect-test-tools.mjs +6 -0
  246. package/skills/showdar-test/stacks/android-testing.md +13 -0
  247. package/skills/showdar-test/stacks/detox.md +13 -0
  248. package/skills/showdar-test/stacks/flutter-test.md +13 -0
  249. package/skills/showdar-test/stacks/integration-test.md +13 -0
  250. package/skills/showdar-test/stacks/jest.md +13 -0
  251. package/skills/showdar-test/stacks/playwright.md +13 -0
  252. package/skills/showdar-test/stacks/react-native-testing.md +17 -0
  253. package/skills/showdar-test/stacks/react-testing-library.md +13 -0
  254. package/skills/showdar-test/stacks/vitest.md +13 -0
  255. package/skills/showdar-test/stacks/xctest.md +13 -0
  256. package/skills/showdar-understand/SKILL.md +159 -0
  257. package/skills/showdar-understand/data/architecture-signals.csv +28 -0
  258. package/skills/showdar-understand/data/index.json +14 -0
  259. package/skills/showdar-understand/examples/repository-audit.md +17 -0
  260. package/skills/showdar-understand/references/architecture-signals.md +25 -0
  261. package/skills/showdar-understand/references/dependency-analysis.md +9 -0
  262. package/skills/showdar-understand/references/repository-analysis.md +24 -0
  263. package/skills/showdar-understand/scripts/inspect-repo.mjs +16 -0
  264. package/skills/showdar-understand/scripts/lib/detect-stack.mjs +48 -0
  265. package/skills/showdar-understand/stacks/android.md +3 -0
  266. package/skills/showdar-understand/stacks/backend.md +5 -0
  267. package/skills/showdar-understand/stacks/electron.md +3 -0
  268. package/skills/showdar-understand/stacks/fastify.md +3 -0
  269. package/skills/showdar-understand/stacks/flutter.md +3 -0
  270. package/skills/showdar-understand/stacks/ios.md +3 -0
  271. package/skills/showdar-understand/stacks/mobile.md +5 -0
  272. package/skills/showdar-understand/stacks/nestjs.md +3 -0
  273. package/skills/showdar-understand/stacks/nextjs.md +3 -0
  274. package/skills/showdar-understand/stacks/node.md +3 -0
  275. package/skills/showdar-understand/stacks/react-native.md +3 -0
  276. package/skills/showdar-understand/stacks/react.md +3 -0
  277. package/skills/showdar-understand/stacks/tauri.md +3 -0
  278. package/skills/showdar-upgrade/SKILL.md +162 -0
  279. package/skills/showdar-upgrade/data/compatibility-checklist.csv +24 -0
  280. package/skills/showdar-upgrade/data/index.json +14 -0
  281. package/skills/showdar-upgrade/examples/upgrade-report.md +18 -0
  282. package/skills/showdar-upgrade/references/breaking-changes.md +3 -0
  283. package/skills/showdar-upgrade/references/compatibility.md +3 -0
  284. package/skills/showdar-upgrade/references/dependency-resolution.md +3 -0
  285. package/skills/showdar-upgrade/references/migration-strategy.md +3 -0
  286. package/skills/showdar-upgrade/references/rollback.md +3 -0
  287. package/skills/showdar-upgrade/scripts/inspect-dependencies.mjs +6 -0
  288. package/skills/showdar-upgrade/scripts/lib/detect-stack.mjs +48 -0
  289. package/skills/showdar-upgrade/stacks/android.md +15 -0
  290. package/skills/showdar-upgrade/stacks/cocoapods-spm.md +17 -0
  291. package/skills/showdar-upgrade/stacks/expo.md +17 -0
  292. package/skills/showdar-upgrade/stacks/flutter.md +17 -0
  293. package/skills/showdar-upgrade/stacks/gradle.md +13 -0
  294. package/skills/showdar-upgrade/stacks/ios.md +15 -0
  295. package/skills/showdar-upgrade/stacks/nextjs.md +17 -0
  296. package/skills/showdar-upgrade/stacks/node.md +17 -0
  297. package/skills/showdar-upgrade/stacks/react-native.md +17 -0
  298. package/skills/showdar-upgrade/stacks/react.md +17 -0
  299. package/skills/showdar-upgrade/stacks/tauri-rust.md +15 -0
  300. package/src/adapters.js +44 -0
  301. package/src/catalog.js +57 -0
  302. package/src/project.js +287 -0
  303. package/src/runtime.js +9 -0
  304. package/src/validate.js +310 -0
@@ -0,0 +1,48 @@
1
+ import { access, readdir, readFile } from 'node:fs/promises';
2
+ import path from 'node:path';
3
+
4
+ async function exists(target) { try { await access(target); return true; } catch { return false; } }
5
+
6
+ export async function detectStacks(projectRoot) {
7
+ const found = new Set();
8
+ try {
9
+ const names = await readdir(projectRoot);
10
+ if (names.some((name) => ['package-lock.json', 'yarn.lock', 'pnpm-lock.yaml', 'bun.lockb'].includes(name))) found.add('package-manager');
11
+ if (names.some((name) => ['pnpm-workspace.yaml', 'lerna.json', 'turbo.json', 'nx.json'].includes(name))) found.add('workspace');
12
+ if (names.some((name) => name.endsWith('.xcodeproj') || name.endsWith('.xcworkspace'))) found.add('ios');
13
+ } catch { /* inaccessible repository is reported by the caller */ }
14
+ const packageFile = path.join(projectRoot, 'package.json');
15
+ if (await exists(packageFile)) {
16
+ try {
17
+ const pkg = JSON.parse(await readFile(packageFile, 'utf8'));
18
+ const deps = { ...(pkg.dependencies ?? {}), ...(pkg.devDependencies ?? {}), ...(pkg.peerDependencies ?? {}) };
19
+ if (pkg.packageManager) found.add('package-manager');
20
+ if (pkg.workspaces) found.add('workspace');
21
+ if (deps.next) found.add('nextjs');
22
+ if (deps.react) found.add('react');
23
+ if (deps['react-native']) found.add('react-native');
24
+ if (deps.vue) found.add('vue');
25
+ if (deps.svelte) found.add('svelte');
26
+ if (deps.tailwindcss) found.add('html-tailwind');
27
+ if (deps.fastify || deps['@fastify/core']) found.add('fastify');
28
+ if (deps['@nestjs/core']) found.add('nestjs');
29
+ if (deps['@tauri-apps/api']) found.add('tauri');
30
+ if (deps.electron) found.add('electron');
31
+ if (deps.expo || deps['expo-router']) found.add('expo');
32
+ found.add('node');
33
+ } catch { /* malformed package is reported by higher-level skills */ }
34
+ }
35
+ if (await exists(path.join(projectRoot, 'pubspec.yaml'))) {
36
+ const pubspec = await readFile(path.join(projectRoot, 'pubspec.yaml'), 'utf8');
37
+ if (/\bflutter\s*:/m.test(pubspec)) found.add('flutter');
38
+ found.add('dart');
39
+ }
40
+ if (await exists(path.join(projectRoot, 'ios'))) found.add('ios');
41
+ if (await exists(path.join(projectRoot, 'android'))) found.add('android');
42
+ if (await exists(path.join(projectRoot, 'Package.swift'))) { found.add('swift'); found.add('spm'); }
43
+ if (await exists(path.join(projectRoot, 'Cargo.toml'))) found.add('rust');
44
+ if (await exists(path.join(projectRoot, 'go.mod'))) found.add('go');
45
+ if (await exists(path.join(projectRoot, 'pyproject.toml')) || await exists(path.join(projectRoot, 'requirements.txt'))) found.add('python');
46
+ if (await exists(path.join(projectRoot, '.github', 'workflows')) || await exists(path.join(projectRoot, '.gitlab-ci.yml')) || await exists(path.join(projectRoot, 'Jenkinsfile'))) found.add('ci');
47
+ return [...found].sort();
48
+ }
@@ -0,0 +1,40 @@
1
+ const STOP = new Set(['a','an','and','are','as','at','be','by','for','from','in','is','it','of','on','or','the','to','use','with']);
2
+
3
+ export function tokenize(value) {
4
+ return String(value ?? '')
5
+ .toLowerCase()
6
+ .normalize('NFKD')
7
+ .replace(/[^a-z0-9+#.-]+/g, ' ')
8
+ .split(/\s+/)
9
+ .map((token) => token.trim())
10
+ .filter((token) => token.length > 1 && !STOP.has(token));
11
+ }
12
+
13
+ export function rankRows(rows, query, fieldsOrOptions = []) {
14
+ const options = Array.isArray(fieldsOrOptions) ? { fields: fieldsOrOptions } : (fieldsOrOptions ?? {});
15
+ const fields = options.fields ?? [];
16
+ const weights = options.weights ?? {};
17
+ const queryTokens = tokenize(query);
18
+ const querySet = new Set(queryTokens);
19
+ return rows.map((row, index) => {
20
+ const selected = fields.length ? fields : Object.keys(row);
21
+ const fieldTokens = selected.flatMap((field) => tokenize(row[field]));
22
+ const fieldSet = new Set(fieldTokens);
23
+ let score = 0;
24
+ const matchedTokens = [];
25
+ for (const token of querySet) {
26
+ const exactField = selected.find((field) => tokenize(row[field]).includes(token));
27
+ if (exactField) {
28
+ score += 4 * Number(weights[exactField] ?? 1);
29
+ matchedTokens.push(token);
30
+ } else if ([...fieldSet].some((candidate) => candidate.includes(token) || token.includes(candidate))) {
31
+ score += 1;
32
+ matchedTokens.push(token);
33
+ }
34
+ }
35
+ const phrase = query.trim().toLowerCase();
36
+ const phraseField = selected.find((field) => String(row[field] ?? '').toLowerCase().includes(phrase));
37
+ if (phrase && phraseField) score += 8 * Number(weights[phraseField] ?? 1);
38
+ return { row, score, index, matchedTokens: [...new Set(matchedTokens)] };
39
+ }).sort((a, b) => b.score - a.score || a.index - b.index);
40
+ }
@@ -0,0 +1,20 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ import { parseCsv } from './csv.mjs';
3
+ import { rankRows } from './rank.mjs';
4
+
5
+ export function searchRows(rows, query, { fields = [], weights = {}, filters = {}, limit = 8, includeZero = true } = {}) {
6
+ const matches = (actual, expected) => {
7
+ const actualValues = String(actual ?? '').split(/[,|;]/).map((value) => value.trim().toLowerCase()).filter(Boolean);
8
+ const expectedValues = (Array.isArray(expected) ? expected : [expected]).flatMap((value) => String(value).split(/[,|;]/)).map((value) => value.trim().toLowerCase()).filter(Boolean);
9
+ return expectedValues.length > 0 && expectedValues.every((value) => actualValues.includes(value));
10
+ };
11
+ const filtered = rows.filter((row) => Object.entries(filters).every(([key, value]) => matches(row[key], value)));
12
+ const ranked = rankRows(filtered, query, { fields, weights });
13
+ const candidates = includeZero ? ranked : ranked.filter((entry) => entry.score > 0);
14
+ return candidates.slice(0, Math.max(0, limit));
15
+ }
16
+
17
+ export async function searchCsv(file, query, options = {}) {
18
+ const rows = parseCsv(await readFile(file, 'utf8'));
19
+ return searchRows(rows, query, options);
20
+ }
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "showdar-skills",
3
+ "version": "0.2.0",
4
+ "description": "Production-grade software engineering lifecycle skills for coding agents.",
5
+ "type": "module",
6
+ "bin": { "showdar": "./bin/showdar.js" },
7
+ "scripts": {
8
+ "test": "node --test",
9
+ "validate": "node bin/showdar.js validate",
10
+ "sync:runtime": "node scripts/sync-runtime.mjs",
11
+ "eval": "node scripts/retrieval-eval.mjs",
12
+ "check": "npm test && npm run validate && npm pack --dry-run",
13
+ "smoke": "node scripts/package-smoke.mjs",
14
+ "release:check": "node scripts/check-release-version.mjs"
15
+ },
16
+ "engines": { "node": ">=20" },
17
+ "files": ["bin", "src", "skills", "commands", "router", "bundles", "profiles", "engine", "README.md", "LICENSE"],
18
+ "keywords": ["agent-skills", "coding-agents", "codex", "opencode", "claude-code", "software-engineering", "developer-tools", "requirements", "qa", "security", "devops", "workflow"],
19
+ "license": "MIT",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/caongocquy/showdar-skills.git"
23
+ },
24
+ "homepage": "https://github.com/caongocquy/showdar-skills#readme",
25
+ "bugs": {
26
+ "url": "https://github.com/caongocquy/showdar-skills/issues"
27
+ }
28
+ }
@@ -0,0 +1 @@
1
+ {"skills":["showdar-understand","showdar-plan","showdar-build","showdar-debug","showdar-test","showdar-review","showdar-upgrade","showdar-ship","showdar-recover","showdar-git","showdar-requirements","showdar-quality","showdar-security","showdar-ops"]}
@@ -0,0 +1 @@
1
+ {"skills":["showdar-understand","showdar-plan","showdar-design","showdar-build","showdar-debug","showdar-test","showdar-review","showdar-upgrade","showdar-ship","showdar-recover","showdar-git","showdar-security"]}
@@ -0,0 +1 @@
1
+ {"skills":["showdar-understand","showdar-plan","showdar-design","showdar-build","showdar-debug","showdar-test","showdar-review","showdar-upgrade","showdar-ship","showdar-recover","showdar-git","showdar-requirements","showdar-quality","showdar-security","showdar-ops"]}
@@ -0,0 +1 @@
1
+ {"skills":["showdar-understand","showdar-plan","showdar-build","showdar-debug","showdar-test","showdar-review","showdar-recover","showdar-git"]}
@@ -0,0 +1 @@
1
+ {"skills":["showdar-understand","showdar-requirements","showdar-plan","showdar-design","showdar-quality","showdar-review"]}
@@ -0,0 +1 @@
1
+ {"skills":["showdar-understand","showdar-requirements","showdar-quality","showdar-test","showdar-debug","showdar-review","showdar-ship","showdar-recover","showdar-git"]}
@@ -0,0 +1,50 @@
1
+ version: 2
2
+ rules:
3
+ - showdar-review never performs deployment or publishing as part of review
4
+ - showdar-ship verifies delivery readiness by default and never creates or modifies CI/deployment/release infrastructure without explicit task intent
5
+ - showdar-ship never deploys publishes submits tags pushes or mutates production without explicit user intent and required approval
6
+ - showdar-debug does not patch before sufficient evidence and a falsifiable hypothesis
7
+ - showdar-recover never discards user or uncommitted work without explicit approval
8
+ - showdar-git owns local Git operations; showdar-review owns code/diff review, showdar-debug owns source failures, and showdar-recover owns interrupted implementation recovery
9
+ - showdar-git does not imply push, GitHub, CI/CD, deployment, or release execution
10
+ - showdar-plan does not invent product requirements to simplify architecture
11
+ - showdar-requirements owns what behavior is required or unresolved; showdar-plan owns how engineering will implement an agreed requirement
12
+ - showdar-requirements uses current repository behavior as evidence but does not replace showdar-understand's system discovery
13
+ - showdar-quality owns QA scenarios, risks, coverage, and acceptance confidence; showdar-test owns automated test-level selection and implementation
14
+ - showdar-quality reviews verification scope, not code defects (showdar-review) or overall delivery readiness (showdar-ship)
15
+ - showdar-requirements and showdar-quality do not invent stakeholder decisions or claim execution evidence that was not observed
16
+ - explicit security intent wins over showdar-review: showdar-security owns posture, threats, authz, secrets, exposure, attack surface, and exploitability; showdar-review owns general correctness, maintainability, architecture, performance, and tests
17
+ - showdar-debug owns the root cause of observed failures; showdar-security owns security risk even when no failure is observed; showdar-test owns automated test implementation; showdar-quality owns QA/QC planning
18
+ - showdar-ship verifies delivery or release readiness and does not create CI/deployment infrastructure by default; showdar-ops owns operational implementation and execution
19
+ - showdar-ops may inspect CI, containers, environments, deployments, observability, and rollback read-only; local config changes require an explicit request, and remote or production mutation requires explicit target/action intent and authorization
20
+ - showdar-ops never infers deploy, publish, production mutation, secret changes, resource deletion, CI creation, or release automation from ship, ready, release, fix CI, or prepare deploy alone
21
+ - showdar-build owns application feature implementation; showdar-ops owns operational configuration and runtime workflows; showdar-git owns local Git workflow and does not imply operational execution
22
+ - showdar-design preserves authoritative existing design tokens and product constraints
23
+ - explicit user instructions override automatic routing while safety and repository constraints remain in force
24
+ overlap_matrix:
25
+ - pair: showdar-understand vs showdar-requirements
26
+ boundary: understand maps observed system behavior; requirements defines behavior that should exist or remains undecided
27
+ - pair: showdar-requirements vs showdar-plan
28
+ boundary: requirements establishes the product contract; plan chooses the engineering approach for an agreed contract
29
+ - pair: showdar-plan vs showdar-build
30
+ boundary: plan describes bounded implementation work; build performs the approved application change
31
+ - pair: showdar-design vs showdar-build
32
+ boundary: design decides product UI direction and experience; build implements the agreed UI change
33
+ - pair: showdar-debug vs showdar-recover
34
+ boundary: debug explains an observed failure; recover reconstructs interrupted work and its safest continuation
35
+ - pair: showdar-test vs showdar-quality
36
+ boundary: quality plans risk and verification scope; test implements automated proof at the appropriate test level
37
+ - pair: showdar-review vs showdar-security
38
+ boundary: review checks general code quality; security assesses security posture, threats, and exploitability
39
+ - pair: showdar-review vs showdar-ship
40
+ boundary: review evaluates change quality; ship evaluates delivery readiness and handoff evidence
41
+ - pair: showdar-ship vs showdar-ops
42
+ boundary: ship verifies readiness; ops changes or executes operational and deployment workflows
43
+ - pair: showdar-git vs showdar-ops
44
+ boundary: git handles repository history and local Git actions; ops handles runtime, deployment, and operational state
45
+ - pair: showdar-git vs showdar-recover
46
+ boundary: git performs an explicit Git operation; recover reconstructs interrupted work before choosing the next action
47
+ - pair: showdar-quality vs showdar-ship
48
+ boundary: quality plans scenario coverage and confidence; ship decides whether release or handoff evidence is sufficient
49
+ - pair: showdar-upgrade vs showdar-build
50
+ boundary: upgrade changes dependency or platform compatibility; build changes application behavior within the supported stack
@@ -0,0 +1,54 @@
1
+ version: 2
2
+ principles:
3
+ - select the smallest sufficient flagship skill
4
+ - evidence before edits for unknown failures
5
+ - preserve user changes and repository instructions
6
+ - prefer bounded coherent changes over broad cleanup
7
+ - require fresh verification before completion claims
8
+ - require explicit approval before production-impacting actions
9
+ routes:
10
+ understand:
11
+ triggers: ["understand repo", "architecture", "trace flow", "dependency", "impact analysis", "where should this live"]
12
+ skill: showdar-understand
13
+ plan:
14
+ triggers: ["plan feature", "implementation plan", "scope", "break down", "architecture approach"]
15
+ skill: showdar-plan
16
+ design:
17
+ triggers: ["design UI", "redesign", "UX", "responsive", "visual polish", "accessibility", "design system"]
18
+ skill: showdar-design
19
+ build:
20
+ triggers: ["implement", "build feature", "refactor", "minimal patch"]
21
+ skill: showdar-build
22
+ debug:
23
+ triggers: ["bug", "crash", "regression", "wrong behavior", "build failure", "jank", "memory leak", "intermittent"]
24
+ skill: showdar-debug
25
+ test:
26
+ triggers: ["test strategy", "regression test", "integration test", "E2E", "test coverage"]
27
+ skill: showdar-test
28
+ review:
29
+ triggers: ["review", "PR review", "code review", "maintainability review", "performance review"]
30
+ skill: showdar-review
31
+ upgrade:
32
+ triggers: ["upgrade dependency", "framework upgrade", "runtime upgrade", "migration", "breaking change"]
33
+ skill: showdar-upgrade
34
+ ship:
35
+ triggers: ["release readiness", "ready to release", "ship", "handoff", "package verification"]
36
+ skill: showdar-ship
37
+ recover:
38
+ triggers: ["resume interrupted implementation", "recover partial work", "session stopped", "continue partial work", "missing context"]
39
+ skill: showdar-recover
40
+ git:
41
+ triggers: ["commit", "stage only task files", "merge branch", "rebase branch", "cherry-pick commit", "git conflict", "push branch", "clean merged branches", "finish git workflow"]
42
+ skill: showdar-git
43
+ requirements:
44
+ triggers: ["requirements", "business rules", "acceptance criteria", "user stories", "use cases", "requirement matrix", "missing requirement", "ambiguity"]
45
+ skill: showdar-requirements
46
+ quality:
47
+ triggers: ["QA scenarios", "test scenarios", "regression scope", "risk-based testing", "quality plan", "compatibility matrix", "bug report"]
48
+ skill: showdar-quality
49
+ security:
50
+ triggers: ["threat model", "security review", "security risk", "authz", "authorization", "secrets", "attack surface", "data exposure", "vulnerability", "exploitability"]
51
+ skill: showdar-security
52
+ ops:
53
+ triggers: ["CI/CD", "GitHub Actions", "Docker", "container", "deployment", "deploy", "observability", "rollback", "runtime operations", "staging"]
54
+ skill: showdar-ops
@@ -0,0 +1,30 @@
1
+ version: 2
2
+ priority:
3
+ - explicit-user-skill
4
+ - safety-and-repository-instructions
5
+ - showdar-git
6
+ - showdar-recover
7
+ - showdar-debug
8
+ - showdar-security
9
+ - showdar-ops
10
+ - showdar-ship
11
+ - showdar-review
12
+ - showdar-quality
13
+ - showdar-requirements
14
+ - showdar-upgrade
15
+ - showdar-design
16
+ - showdar-plan
17
+ - showdar-understand
18
+ - showdar-test
19
+ - showdar-build
20
+ rules:
21
+ - if root cause is unknown prefer showdar-debug over showdar-build
22
+ - if requirements or change surface are unresolved prefer showdar-plan over showdar-build
23
+ - if the task is read-only do not route into implementation or shipping actions
24
+ - one flagship skill should normally own the current phase; transition only when its stop condition is met
25
+ - local Git commit, staging, branch, merge, rebase, conflict, cleanup, and explicit push intent routes to showdar-git
26
+ - explicit rebase, cherry-pick, merge, or Git conflict operations route to showdar-git; interrupted implementation recovery routes to showdar-recover
27
+ - product or business input, missing requirements, business rules, user stories, use cases, acceptance criteria, and requirement readiness route to showdar-requirements
28
+ - QA scenarios, risk-based coverage, regression scope, compatibility matrices, exploratory checks, and bug-report quality route to showdar-quality
29
+ - explicit security, authz, secrets, exposure, attack-surface, threat, or exploitability intent routes to showdar-security before general review
30
+ - operational CI/CD, container, environment, deployment, observability, rollback, or runtime intent routes to showdar-ops; release readiness remains showdar-ship and Git-only work remains showdar-git
@@ -0,0 +1,154 @@
1
+ ---
2
+ name: showdar-build
3
+ description: Use when implementing or refactoring an agreed application change within existing architecture and contracts.
4
+ ---
5
+
6
+ # Showdar Build
7
+
8
+ ## Purpose
9
+
10
+ - Convert an approved requirement/plan into maintainable production code.
11
+ - Preserve existing ownership boundaries and public contracts unless change is explicitly required.
12
+ - Minimize blast radius without cutting required correctness, error handling, or tests.
13
+ - Make implementation decisions evidence-based and stack-native.
14
+ - Read `references/minimal-change.md` and `references/architecture-boundaries.md` before introducing new abstractions.
15
+
16
+ ## When to use
17
+
18
+ - Implementing a feature, refactor, bug fix after root cause is known, or architecture-safe change.
19
+ - Applying an approved UI implementation after design decisions are clear.
20
+ - Small migrations where the upgrade-specific analysis is already complete.
21
+ - Completing a bounded task recovered from a previous session.
22
+
23
+ ## When not to use
24
+
25
+ - Root cause is unknown; use showdar-debug.
26
+ - Requirements/change surface are unclear and multiple approaches remain; use showdar-plan.
27
+ - The work is only review or testing strategy.
28
+ - Production deploy/release actions belong to showdar-ship.
29
+
30
+ ## Inputs and assumptions
31
+
32
+ - User outcome and current repository conventions are understood.
33
+ - Relevant tests/build/typecheck commands are known or discoverable.
34
+ - Existing public interfaces and state ownership are constraints unless explicitly changed.
35
+ - For dirty repositories, distinguish user work from this task before editing.
36
+ - `scripts/change-surface.mjs` can summarize current git changes without mutation.
37
+
38
+ ## Non-negotiable rules
39
+
40
+ - Change the smallest coherent surface that fully satisfies the behavior.
41
+ - Never “fix” uncertainty with broad optional chaining, swallowed exceptions, retries, or cache clearing.
42
+ - Preserve or improve type safety at external/data boundaries.
43
+ - Handle expected error/recovery behavior explicitly using `references/error-handling.md`.
44
+ - Do not introduce a generic abstraction for one use unless it creates a real ownership/volatility boundary.
45
+ - Keep comments focused on why/non-obvious constraints, not restating code.
46
+ - Add/adjust tests at the lowest level that can fail for the intended regression/behavior.
47
+ - Do not rewrite unrelated formatting or files.
48
+
49
+ ## Workflow
50
+
51
+ ### Phase 1 — pre-change check
52
+ - Read repository instructions and current relevant implementation/tests.
53
+ - Confirm exact change surface and must-not-change contracts.
54
+ - Inspect current diff/status so unrelated user changes are protected.
55
+
56
+ ### Phase 2 — define behavior proof
57
+ - Identify the test or executable scenario that proves the requested behavior.
58
+ - For a defect, reproduce the regression first where practical.
59
+ - For new behavior, encode the smallest useful failing/acceptance test before implementation when the project supports it.
60
+
61
+ ### Phase 3 — implement minimal coherent change
62
+ - Follow existing naming, dependency injection, state ownership, and error contracts.
63
+ - Keep new code local until a true reusable boundary exists.
64
+ - Update public types/contracts deliberately when required.
65
+ - Use `references/feature-flags.md` only when rollout/reversibility justifies a flag.
66
+
67
+ ### Phase 4 — stack-specific pass
68
+ - Read the matching file under `stacks/` for lifecycle, rendering, native, server/client, or event-loop hazards.
69
+ - Check generated/native files only if the change requires them.
70
+
71
+ ### Phase 5 — verification
72
+ - Run targeted test first, then relevant suite/typecheck/lint/build.
73
+ - Inspect final diff for unrelated changes, duplicated policy, unsafe fallback, and missing edge behavior.
74
+ - Verify all claims from fresh command output.
75
+
76
+ ## Decision points
77
+
78
+ - One function change vs new service? Prefer local unless ownership/reuse demands a boundary.
79
+ - Error can be recovered here? Handle with context; otherwise propagate without swallowing cause.
80
+ - Behavior can race/retry? Model idempotency/concurrency explicitly rather than adding debounce blindly.
81
+ - Existing design/system pattern safe? Follow it; otherwise document the targeted deviation.
82
+ - Rollout risk high? Consider flag/staged path with explicit removal condition.
83
+
84
+ ## Stack detection
85
+
86
+ - React: read `stacks/react.md` for state/effect/render/accessibility traps.
87
+ - Next.js: read `stacks/nextjs.md` for server/client/cache/runtime boundaries.
88
+ - React Native: read `stacks/react-native.md` for lifecycle/list/native-performance concerns.
89
+ - Flutter: read `stacks/flutter.md` for rebuild/async/layout/state concerns.
90
+ - Node/Fastify: read `stacks/node-fastify.md` for validation/event-loop/resource lifecycle.
91
+ - TypeScript: read `stacks/typescript.md` for unknown-boundary validation, unions, and public contract typing.
92
+ - NestJS: use `stacks/node-nestjs.md` for module/provider/request ownership and transaction/error boundaries.
93
+ - Dart, Swift, Kotlin, and Rust/Tauri: read the matching stack file for lifecycle, concurrency, native, and release constraints.
94
+ - Unsupported stacks: inspect project conventions and apply the same minimal/coherent contract.
95
+
96
+ ## Failure modes
97
+
98
+ - Shotgun edits across layers because ownership was not identified.
99
+ - “Defensive” null/error handling that hides the real contract violation.
100
+ - Test passes only because a dependency is mocked away.
101
+ - New abstraction increases indirection without reducing policy duplication or volatility.
102
+ - Implementation changes public behavior without updated types/tests/docs.
103
+ - Performance-sensitive loop/render path gets more allocations or I/O without measurement.
104
+ - Native/build files changed by guesswork.
105
+
106
+ ## Stop conditions
107
+
108
+ - Stop when the requested outcome is outside this skill and hand off to the more appropriate workflow.
109
+ - Stop before destructive, irreversible, production, credential, publishing, or deployment actions unless the user explicitly approved them.
110
+ - Stop when required evidence is unavailable and proceeding would require guessing about behavior, ownership, or safety.
111
+ - Stop when a repository instruction conflicts with this playbook; repository/user instructions win.
112
+ - Stop when requested behavior is implemented, the relevant tests/builds pass freshly, and final diff contains no unexplained changes.
113
+
114
+ ## Escalation conditions
115
+
116
+ - Ask when implementation exposes an unresolved product choice or compatibility break not covered by the plan.
117
+ - Escalate destructive migration, secret, publishing, or production action.
118
+ - Return to debugging if the assumed root cause fails under the regression test.
119
+ - Return to planning if the required change surface expands into independent subsystems.
120
+
121
+ ## Verification
122
+
123
+ - Run the narrow behavior/regression test and read the result.
124
+ - Run typecheck/analyzer/compiler as applicable.
125
+ - Run relevant integration/build/platform checks for touched boundaries.
126
+ - Inspect `git diff` or equivalent for unrelated edits and accidental generated files.
127
+ - For performance-sensitive changes, compare measured path before/after when feasible.
128
+ - Ensure no secrets/logged sensitive data were introduced.
129
+
130
+ ## Output contract
131
+
132
+ - **Implemented** — concise behavior and exact change surface.
133
+ - **Why this shape** — ownership/contract rationale when non-obvious.
134
+ - **Tests/verification** — commands actually run and outcomes.
135
+ - **Risks/unverified** — anything not proven locally.
136
+ - **Follow-up** — only required follow-up; omit speculative cleanup.
137
+
138
+ ## Anti-patterns
139
+
140
+ - Opportunistic repository-wide refactor during a feature fix.
141
+ - Adding `try/catch` that returns null/default for unknown failures.
142
+ - Threading booleans through layers instead of modeling real state.
143
+ - Memoizing every React/Flutter subtree without measurement.
144
+ - Duplicating existing token/config/business policy instead of using the owner.
145
+ - Declaring done after code edits without fresh verification.
146
+
147
+ ## Example
148
+
149
+ User request: “Prevent duplicate submit on payment confirmation.”
150
+ - Confirm whether duplicate effect is UI re-entry, network retry, or backend idempotency before patching.
151
+ - Add the lowest-level regression that reproduces the confirmed duplicate path.
152
+ - Implement minimal guard/idempotency at the true owner, not every caller.
153
+ - Verify normal retry/recovery still works.
154
+ - See `examples/change-surface.md` for how to bound the patch.
@@ -0,0 +1,24 @@
1
+ id,category,pattern,signal,risk,preferred_response,verification,tags,reference,stack
2
+ shotgun-policy,boundaries,shotgun change,same policy edited in many unrelated files,inconsistent behavior,find existing owner and change once,caller tests cover shared policy,ownership duplication,references/minimal-change.md,*
3
+ wrong-owner,boundaries,symptom guard in caller,callers add null or retry guards around shared failure,sibling callers remain broken,patch shared boundary after tracing callers,regression through all callers,root cause boundary,references/architecture-boundaries.md,*
4
+ layer-leak,boundaries,domain policy in UI,component decides persistence or authorization,unreusable and bypassable policy,move policy to domain/service owner,unit plus boundary test,layering policy,references/architecture-boundaries.md,react
5
+ adapter-leak,boundaries,persistence details leak out,callers construct SQL or response DTO,storage change multiplies across callers,keep adapter contract and map at boundary,adapter integration test,persistence boundary,references/architecture-boundaries.md,node
6
+ public-drift,contracts,public contract drift,caller behavior changes without type/schema update,downstream breakage,make contract change explicit and test consumers,compile plus contract fixture,api contract,references/architecture-boundaries.md,typescript
7
+ serialization-drift,contracts,serialization shape drift,internal object passed as wire/storage data,missing fields or leaking internals,define serializer and compatibility cases,round-trip and old fixture,serialization,references/error-handling.md,node
8
+ boolean-explosion,state,boolean explosion,new flags threaded through many layers,hidden invalid combinations,model explicit state only when combinations are real,table tests for allowed states,state machine,references/minimal-change.md,typescript
9
+ mirrored-state,state,mirrored derived state,props/server data copied into local state,stale UI and extra synchronization,derive or name independent draft state,mutation then rerender test,state ownership,references/architecture-boundaries.md,react
10
+ async-fire-forget,async,unobserved async work,promise started without owner or error path,unhandled failure or stale side effect,await or explicitly own/cancel task,test rejection and disposal,async ownership,references/error-handling.md,node
11
+ disposed-context,async,disposed context use,await then UI/native context is used,crash or stale navigation,guard lifecycle or cancel operation,recreate disposal scenario,lifecycle async,references/error-handling.md,react-native
12
+ retry-duplicate,async,unbounded retry,network retry repeats non-idempotent effect,duplicate side effect,add idempotency and bounded classified retry,duplicate request integration test,idempotency,references/error-handling.md,node
13
+ swallowed-error,errors,silent fallback,catch returns default without evidence,masked production defect,preserve cause and expose actionable state,assert error path,errors,references/error-handling.md,*
14
+ wrong-error-layer,errors,error handled at wrong layer,low layer invents UI message or high layer lacks context,poor recovery and inconsistent UX,handle where recovery context exists,error contract test,error ownership,references/error-handling.md,*
15
+ validation-late,validation,late validation,untrusted input reaches domain or DB,ambiguous failures and injection risk,validate at trust boundary and preserve domain checks,invalid input boundary test,input validation,references/error-handling.md,node
16
+ cache-without-owner,caching,cache without invalidation owner,write path updates source but not related cache,stale reads,define key/version/invalidation owner,mutation then read test,cache invalidation,references/minimal-change.md,*
17
+ cache-clear-patch,caching,global cache clear,fix clears all cache after one mutation,latency and hides key ownership,repair affected key/version only,assert unrelated cache survives,cache scope,references/minimal-change.md,*
18
+ race-last-write,concurrency,last response wins,concurrent requests update same state by completion order,stale result overwrites newer state,sequence/cancel/version writes,controlled ordering test,race ordering,references/minimal-change.md,*
19
+ lock-too-wide,concurrency,global lock around unrelated work,one slow task blocks all accounts/items,throughput collapse,lock only shared invariant and document ceiling,parallel unrelated work test,lock scope,references/minimal-change.md,node
20
+ transaction-split,data,transaction split,related writes commit in separate operations,partial state on failure,keep invariant writes in one transaction,integration rollback test,transaction,references/architecture-boundaries.md,node
21
+ feature-flag-permanent,rollout,permanent feature flag,flag has no owner or removal condition,dead branches and untested behavior,record default owner and delete trigger,branch tests plus expiry check,feature flag,references/feature-flags.md,*
22
+ native-guess,native,native file guess,project config changed without target build evidence,platform-only failure,inspect generated/owned config then build affected target,native build or analyzer,native configuration,references/architecture-boundaries.md,react-native
23
+ type-assertion,type-safety,assertion chain,external data cast through any or non-null assertions,runtime crash and erased contract,narrow unknown with validation,malformed payload test,type safety,references/error-handling.md,typescript
24
+ premature-abstraction,maintainability,premature abstraction,new generic layer has one consumer,indirection without leverage,keep local until reuse or volatility boundary,target behavior test,abstraction,references/minimal-change.md,*
@@ -0,0 +1,14 @@
1
+ {
2
+ "version": 1,
3
+ "skill": "showdar-build",
4
+ "datasets": [
5
+ {
6
+ "file": "data/change-smells.csv",
7
+ "idField": "id",
8
+ "requiredColumns": ["id", "category", "pattern", "signal", "risk", "preferred_response", "verification", "tags", "reference", "stack"],
9
+ "searchableFields": ["category", "pattern", "signal", "risk", "preferred_response", "verification", "tags"],
10
+ "filterFields": ["category", "stack"],
11
+ "reference": "references/minimal-change.md"
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,18 @@
1
+ # Example change surface
2
+
3
+ Request: add an optional `includeArchived` filter to the project list.
4
+
5
+ Input evidence:
6
+ - The route calls `ProjectService.list` and returns the existing DTO.
7
+ - The repository already stores `archivedAt`; no migration is required.
8
+ - Two callers use the service: the dashboard and the export job.
9
+
10
+ Reasoning:
11
+ 1. Add the filter to the internal query input with a default of `false`.
12
+ 2. Keep the response shape and pagination cursor unchanged.
13
+ 3. Check both callers because the export job must intentionally opt in or out.
14
+ 4. Add a service test for default, true, and false values, plus a route test.
15
+
16
+ Expected output: changed service/query code, caller proof, and a short list of
17
+ files intentionally untouched. Verification must include the focused tests and
18
+ the repository typecheck; a database schema change would be out of scope.
@@ -0,0 +1,3 @@
1
+ # Architecture boundaries
2
+
3
+ Follow existing dependency direction unless the requested change exposes a concrete defect. Keep domain policy out of UI glue, persistence details out of callers, and platform behavior behind explicit seams. Before adding a seam, name its owner, input/output contract, lifecycle, and second concrete consumer or volatility it isolates. Preserve public contracts unless change is requested; if they change, update types, serializers, consumers, and tests together.
@@ -0,0 +1,3 @@
1
+ # Error handling
2
+
3
+ Handle errors at the layer that can add recovery or context. Preserve original cause and correlation without secrets. Distinguish expected domain failures, cancellation, validation, programmer errors, and infrastructure failures. Map errors once at the boundary that owns the contract; do not catch to return an ambiguous default. User-visible states need a safe explanation, recovery action, and pending/disabled behavior where relevant. Test both success and failure paths.
@@ -0,0 +1,3 @@
1
+ # Feature flags
2
+
3
+ Use a flag when rollout risk, compatibility, or staged migration justifies it. Define owner, default, evaluation boundary, exposure scope, telemetry, both branch contracts, rollback action, and removal condition. Test enabled, disabled, missing, and malformed configuration. Do not use a flag to hide unfinished code or create a permanent branch for a local refactor.
@@ -0,0 +1,3 @@
1
+ # Minimal coherent change
2
+
3
+ Minimal does not mean fewest lines. It means the smallest change that completely preserves required invariants, error handling, tests, and ownership boundaries. Start by tracing every caller of the owning function, then write the narrowest behavior proof. Keep a change local unless a shared contract or true volatility boundary requires movement. Avoid unrelated cleanup, but do not omit a necessary boundary or regression test to keep the diff small.
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from 'node:child_process';
3
+ const cwd=process.argv[2]??process.cwd();
4
+ const run=(args)=>{const r=spawnSync('git',args,{cwd,encoding:'utf8'});return r.status===0?r.stdout.trim():null};
5
+ console.log(JSON.stringify({status:run(['status','--short']),diffStat:run(['diff','--stat']),changed:run(['diff','--name-only'])?.split('\n').filter(Boolean)??[],staged:run(['diff','--cached','--name-only'])?.split('\n').filter(Boolean)??[]},null,2));
@@ -0,0 +1,3 @@
1
+ # Dart build guidance
2
+
3
+ Keep domain state distinct from widget state, make nullability meaningful, and model `Future` cancellation or stale-result behavior explicitly. Use immutable value objects at boundaries, keep expensive work out of build methods, and dispose streams/controllers at their owner. Run analyzer and tests with the pinned SDK before touching generated files.
@@ -0,0 +1,3 @@
1
+ # Flutter build guidance
2
+
3
+ Keep rebuild scope proportional to state changes and preserve one clear source of truth. Use lazy list/layout primitives, guard `mounted` and context across async gaps, dispose owned resources, and model platform-channel failures. Verify text scaling and release-like targets when layout or native behavior changes.
@@ -0,0 +1,3 @@
1
+ # Kotlin build guidance
2
+
3
+ Keep coroutine scope tied to lifecycle or service ownership, model cancellation and failure explicitly, and avoid blocking the main thread. Validate serialized input, keep state single-owned, and use stable identity in lists. Treat Gradle, manifest, resources, permissions, and release variants as part of the change surface when Android behavior changes.
@@ -0,0 +1,3 @@
1
+ # Next.js build guidance
2
+
3
+ Keep client boundaries narrow, make cache and freshness semantics intentional, and model loading/error states at route or data boundaries that can recover. Keep secrets and server-only modules out of the browser bundle. Verify server/client output, hydration, metadata, image cost, and production runtime behavior when those surfaces change.
@@ -0,0 +1,3 @@
1
+ # Node/Fastify build guidance
2
+
3
+ Keep request validation and error contracts explicit at the Fastify boundary. Do not block the event loop with heavy synchronous work. Make plugin, pool, server, worker, and shutdown ownership clear. Keep related persistence side effects transactionally coherent, retries idempotent, and readiness distinct from liveness.
@@ -0,0 +1,3 @@
1
+ # Node, Fastify, and NestJS build guidance
2
+
3
+ Validate request input at the framework boundary, keep authorization in the service/owner boundary, and make response/error contracts explicit. Do not block the event loop with large synchronous work. Keep related persistence writes transactional, make retries idempotent, and close pools, servers, and workers from one lifecycle owner. Test the real HTTP and persistence boundary when those semantics change.
@@ -0,0 +1,3 @@
1
+ # React Native build guidance
2
+
3
+ Respect navigation and lifecycle; cancel or guard screen-owned async work. Keep heavy synchronous work off interaction paths, use virtualized lists for long content, size image decode to display, and treat keyboard, safe areas, accessibility, and native project/config changes as release-risk surfaces.
@@ -0,0 +1,3 @@
1
+ # React build guidance
2
+
3
+ Keep server, URL, draft, and derived state distinct. Use effects only to synchronize external systems; derive render state directly. Use stable domain keys and semantic HTML/native controls. Profile before memoization and test pending, error, focus, and stale-result paths.
@@ -0,0 +1,3 @@
1
+ # Rust and Tauri build guidance
2
+
3
+ Validate every command input at the Rust boundary, return typed safe errors, and grant the least capability needed by each window. Keep large payloads out of repeated IPC, make event listeners lifecycle-owned, and avoid blocking the UI path with filesystem or database work. Run Rust tests plus the actual bundle target when capabilities, updater, or native configuration changes.
@@ -0,0 +1,3 @@
1
+ # Swift build guidance
2
+
3
+ Prefer value semantics and explicit actor or queue ownership for shared mutable state. Treat async cancellation and view/task lifetime as part of the contract. Validate decoded external data, keep UI state separate from domain state, and preserve accessibility labels and Dynamic Type. Build the affected scheme when deployment target, capability, package, or native API changes.
@@ -0,0 +1,3 @@
1
+ # TypeScript build guidance
2
+
3
+ Keep `unknown` at external boundaries until validated; avoid `any` and assertion chains that erase contracts. Model impossible states with discriminated unions, keep async error types explicit, and preserve public exports. Run the repository compiler with its actual `tsconfig` and test serialized inputs rather than trusting structural casts.