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,179 @@
1
+ ---
2
+ name: showdar-debug
3
+ description: Use when observed behavior fails through crashes, regressions, build failures, races, networking, memory, or performance issues.
4
+ ---
5
+
6
+ # Showdar Debug
7
+
8
+ ## Purpose
9
+
10
+ - Find and confirm root cause before modifying production behavior.
11
+ - Turn logs, stack traces, timing, state, profiler data, and reproduction steps into falsifiable hypotheses.
12
+ - Avoid symptom patches that hide defects or create new regressions.
13
+ - End with a minimal fix and regression proof when implementation is requested.
14
+ - Read `references/hypothesis-driven-debugging.md` for experiment discipline.
15
+ - Use `data/failure-patterns.csv` as a hypothesis prompt, never as automatic diagnosis.
16
+
17
+ ## When to use
18
+
19
+ - Crash, exception, wrong state, intermittent failure, regression, hang, build failure, or unexpected output.
20
+ - Performance problem such as jank, latency, memory growth, startup cost, or event-loop/thread blocking.
21
+ - Networking/auth/cache bugs where timing or retry behavior is unclear.
22
+ - A previous fix did not resolve the symptom and root cause needs re-evaluation.
23
+
24
+ ## When not to use
25
+
26
+ - Root cause and fix are already proven and only implementation remains.
27
+ - The user asks only for architecture understanding or code review.
28
+ - A live production incident requires external observability tools unavailable here; use this skill to structure evidence but do not invent telemetry.
29
+ - Do not run destructive cleanup commands merely to “see if it helps”.
30
+
31
+ ## Inputs and assumptions
32
+
33
+ - Exact symptom, expected behavior, environment/platform, and any available error/log/stack trace.
34
+ - Reproduction steps or a path to create a deterministic reproducer.
35
+ - Repository/build context; `scripts/collect-context.mjs` may collect read-only stack/git/runtime signals.
36
+ - Sensitive logs must be redacted before output.
37
+ - A hypothesis is not a conclusion until an experiment distinguishes it from alternatives.
38
+
39
+ ## Non-negotiable rules
40
+
41
+ - Do not edit production code before collecting enough evidence to state at least one falsifiable hypothesis.
42
+ - Start from the first causal error/event, not the final cascade message.
43
+ - Change one variable per diagnostic experiment when practical.
44
+ - Preserve logs/profiler/test evidence that confirms or falsifies each hypothesis.
45
+ - Reject contradicted hypotheses instead of adding patches around them.
46
+ - Cache deletion, dependency reinstall, clean build, and reboot are experiments only when they test a cache/environment hypothesis.
47
+ - Never log or expose credentials/tokens/full sensitive payloads.
48
+ - For performance, measure a named path before claiming improvement.
49
+
50
+ ## Workflow
51
+
52
+ ### Phase 1 — reproduce and bound
53
+ - Write the shortest reliable reproduction, environment, expected result, and actual result.
54
+ - Determine whether failure is deterministic, timing-dependent, data-dependent, platform-specific, or release-only.
55
+ - Reduce unrelated variables without changing the failing invariant.
56
+
57
+ ### Phase 2 — gather evidence
58
+ - Capture stack/error, relevant logs, request/state timeline, failing build task, profiler/thread/memory evidence as appropriate.
59
+ - Inspect recent relevant diff/version/environment changes.
60
+ - Collect context with `scripts/collect-context.mjs` when useful.
61
+
62
+ ### Phase 3 — classify
63
+ - Classify into state/lifecycle, async/race, network/auth/cache, build/toolchain, memory/resource, performance/thread, persistence/data, or contract/serialization.
64
+ - Read the relevant reference file before designing experiments.
65
+
66
+ ### Phase 4 — hypotheses
67
+ - List 2–4 ranked hypotheses with supporting and contradicting evidence.
68
+ - For each, define a cheap experiment and predicted result.
69
+ - Prefer experiments that distinguish multiple hypotheses at once.
70
+
71
+ ### Phase 5 — experiment
72
+ - Run one controlled experiment.
73
+ - Record result and update hypothesis ranking.
74
+ - Repeat until one root cause is confirmed or evidence forces escalation.
75
+
76
+ ### Phase 6 — regression proof
77
+ - Create the lowest-level automated test/scenario that fails for the confirmed defect.
78
+ - Confirm failure is due to the root cause, not fixture/test error.
79
+
80
+ ### Phase 7 — minimal fix
81
+ - Patch the true owner/boundary.
82
+ - Avoid unrelated cleanup and symptom-level guards.
83
+ - Re-run regression and relevant broader verification.
84
+
85
+ ### Phase 8 — close evidence loop
86
+ - For performance/memory, re-measure the original path/scenario.
87
+ - For build/platform, rebuild the actual affected target/configuration.
88
+ - Summarize evidence, root cause, fix, and verification.
89
+
90
+ ## Decision points
91
+
92
+ - Intermittent? Focus on ordering, lifecycle, shared mutable state, retries, and environment timing.
93
+ - Only after incremental action? Investigate invalidation/cache/state transition.
94
+ - Only release build? Inspect optimization/minification/signing/config/runtime differences.
95
+ - Build error? Use first failing task and toolchain versions; read `references/build-failures.md`.
96
+ - Memory grows per repeated flow? Read `references/memory.md` and inspect retained ownership.
97
+ - Jank/latency? Read `references/performance.md` and classify thread/I/O/render/image/query cost.
98
+ - Auth/network? Read `references/networking.md`; distinguish transport, HTTP, session refresh, cache, and ordering.
99
+ - Async/lifecycle? Read `references/async-races.md`.
100
+ - Runtime/state/lifecycle/navigation? Start with the matching `category` row in `data/failure-patterns.csv` and collect its named signals before adding guards.
101
+ - Persistence/database/cache? Capture keys, transaction boundaries, query count, and durable state; do not use cache clearing as diagnosis.
102
+ - Native crash or platform-only failure? Capture symbolicated device logs, variant/toolchain, native boundary, and release artifact evidence.
103
+
104
+ ## Stack detection
105
+
106
+ - React: `stacks/react.md` for render, state, effect, and external-system boundaries.
107
+ - React Native: `stacks/react-native.md` for JS/UI/native boundaries, lists, images, navigation.
108
+ - Flutter: `stacks/flutter.md` for Dart async, rebuild/layout, raster/UI thread, platform channels.
109
+ - Node: `stacks/node.md` for event-loop, promise/resource/stream/process boundaries.
110
+ - Next.js: `stacks/nextjs.md` for server/client/cache/hydration/build/runtime boundaries.
111
+ - iOS: `stacks/ios.md` for crash/build/signing/lifecycle differences.
112
+ - Android: `stacks/android.md` for Logcat/Gradle/variant/lifecycle/R8 differences.
113
+ - Tauri: `stacks/tauri.md` for Rust commands, webview IPC, capabilities, and bundle/runtime boundaries.
114
+ - Docker: `stacks/docker.md` for image, container, network, volume, and architecture boundaries.
115
+
116
+ ## Failure modes
117
+
118
+ - Optional chaining/null guards added without explaining why value is unexpectedly absent.
119
+ - Random package/cache clean succeeds once but root cause remains unknown.
120
+ - Multiple changes per experiment make evidence uninterpretable.
121
+ - Debug logging changes timing and is mistaken for a fix.
122
+ - Mock-based test cannot reproduce the real boundary failure.
123
+ - Performance “fix” is judged by feel instead of measurement.
124
+ - Last error line is treated as root cause while earlier failure is ignored.
125
+
126
+ ## Stop conditions
127
+
128
+ - Stop when the requested outcome is outside this skill and hand off to the more appropriate workflow.
129
+ - Stop before destructive, irreversible, production, credential, publishing, or deployment actions unless the user explicitly approved them.
130
+ - Stop when required evidence is unavailable and proceeding would require guessing about behavior, ownership, or safety.
131
+ - Stop when a repository instruction conflicts with this playbook; repository/user instructions win.
132
+ - Stop when root cause is confirmed by discriminating evidence and the requested fix/verification is complete.
133
+ - Stop earlier if available evidence cannot distinguish remaining hypotheses; report exactly what evidence is missing.
134
+
135
+ ## Escalation conditions
136
+
137
+ - Ask for device/runtime logs or reproduction data when the failure cannot be observed from repository state.
138
+ - Escalate hardware/OS/service incidents that require unavailable telemetry instead of fabricating diagnosis.
139
+ - Escalate destructive data recovery or credential changes.
140
+ - If the problem expands into independent failures, split them and debug one causal path at a time.
141
+
142
+ ## Verification
143
+
144
+ - Reproduce original symptom before fix where feasible.
145
+ - Confirm regression test/scenario fails without the causal fix and passes with it.
146
+ - Run relevant suite/typecheck/build/platform target after the narrow proof.
147
+ - Re-measure performance/memory path when that was the symptom.
148
+ - Verify diagnostic logs do not leak secrets and remove temporary noisy instrumentation unless intentionally retained.
149
+ - State any environment/platform not verified.
150
+
151
+ ## Output contract
152
+
153
+ - **Symptom and reproduction**.
154
+ - **Evidence** — logs/state/timing/build/profiler facts.
155
+ - **Hypotheses tested** — prediction and result.
156
+ - **Confirmed root cause** — causal explanation, not symptom.
157
+ - **Fix** — minimal owning change.
158
+ - **Regression proof** — test/scenario.
159
+ - **Fresh verification** — commands/measurements and remaining uncertainty.
160
+
161
+ ## Anti-patterns
162
+
163
+ - “Probably X” immediately followed by code edit.
164
+ - Retry/debounce/cache clear as a universal fix.
165
+ - Swallowing error to make UI/build appear healthy.
166
+ - Reinstalling everything without an environment hypothesis.
167
+ - Measuring only after the fix.
168
+ - Claiming root cause from correlation with one log line.
169
+ - Keeping multiple contradictory hypotheses alive after falsification.
170
+
171
+ ## Example
172
+
173
+ Observation: query result becomes stale only after incremental sync.
174
+ - Evidence: clean index correct; bypass cache correct; cached path stale.
175
+ - Hypothesis: sync fails to invalidate affected query key.
176
+ - Experiment: instrument key/version and bypass/invalidate only that key.
177
+ - Result confirms invalidation path; add regression test that sync updates cached query result.
178
+ - Patch invalidation owner and verify broader query suite.
179
+ - See `examples/evidence-log.md`.
@@ -0,0 +1,34 @@
1
+ id,category,symptom,signals,likely_causes,evidence_to_collect,experiments,common_wrong_fix,verification,severity,tags,reference,stack
2
+ runtime-null,runtime,crash on a user path,stack trace points to property access after input boundary,missing validation or contract mismatch,first frame plus input shape and caller,feed invalid and valid boundary cases,add optional chaining everywhere,regression test rejects malformed input,high,runtime null contract,references/hypothesis-driven-debugging.md,*
3
+ runtime-unhandled,runtime,process exits after rejected work,unhandledRejection or uncaughtException near async task,promise ownership missing or error rethrow lost,process logs with request or job id,await task and observe rejection owner,add a process handler that swallows error,test expected failure and process health,high,runtime async error,references/async-races.md,node
4
+ state-stale,state,UI shows old value after mutation,source read is new but rendered selector/cache remains old,duplicated state or missing invalidation,source snapshot cache key event order,read after mutation with cache bypass,force global refresh after every mutation,mutation then read regression,high,state cache stale,references/async-races.md,react
5
+ state-reset,state,form or screen resets unexpectedly,state changes on remount or key change,unstable identity or effect mirrors props,mount key props and state transition trace,remove key or delay remount to isolate owner,copy props into state and sync in effect,focused interaction test,medium,state lifecycle,references/async-races.md,react
6
+ lifecycle-navigation,lifecycle,crash after navigation,callback fires after screen or controller disposal,uncancelled listener or async completion,route timeline disposal callback and native log,navigate away at each await boundary,add null guards only at visible caller,repeat navigation regression,high,lifecycle navigation,references/async-races.md,react-native
7
+ lifecycle-subscription,lifecycle,duplicate event handling grows per visit,listener count rises after enter leave,subscription not removed or effect dependency repeats,listener registration count and cleanup trace,visit screen twice with event probe,debounce event handler,listener count returns to baseline,high,lifecycle subscription,references/async-races.md,flutter
8
+ race-last-write,race,older request overwrites newer result,request IDs finish out of order,completion order used as freshness,request timeline IDs sequence and state writes,delay first request and release second first,debounce all input,older result is ignored by version or cancellation,high,race ordering,references/async-races.md,react
9
+ race-duplicate,race,action happens twice,duplicate request IDs or two subscriptions,retry plus re-entry or effect double-run,caller count request IDs and lifecycle,trigger rapid action and single action,disable button without server idempotency,one durable side effect exists,high,race duplicate,references/async-races.md,node
10
+ async-timeout,async,request hangs until UI is unusable,no timeout or cancellation event,transport promise never settles or queue is blocked,timing logs and abort signal state,disconnect or hold server response,raise timeout without preserving cancellation,timeout produces actionable retry state,medium,async timeout,references/networking.md,node
11
+ async-cancel,async,cancelled work updates state,cancel event followed by success/error update,abort ignored or stale closure,abort propagation and post-cancel writes,cancel during request and inspect writes,ignore cancellation error globally,disposed owner has no state write,high,async cancellation,references/async-races.md,react-native
12
+ network-transport,network,request never reaches server,offline DNS TLS timeout or connection error,transport environment or endpoint issue,method host class status elapsed and error code,run same request from known network and local host,change HTTP status handling only,transport failure is classified separately,high,network transport,references/networking.md,*
13
+ network-http,network,server returns an error status,HTTP status with valid response body,server contract or auth policy failure,status headers redacted body class and request ID,replay safe request and inspect server route,retry every 4xx,expected status maps to user recovery,high,network http,references/networking.md,node
14
+ network-parse,network,request succeeds but data is unusable,2xx response fails decoder or fields missing,response schema drift or wrong content type,content type status bounded payload shape,save redacted fixture and run decoder,cast response to expected type,decoder rejects bad fixture clearly,high,network parsing,references/networking.md,typescript
15
+ auth-refresh,network,intermittent 401 during refresh,two refresh calls or expired token ordering,refresh race clock skew or retry ordering,redacted token identity request timeline expiry,serialize refresh and compare concurrent behavior,clear session on every 401,one refresh and correct retry behavior,high,auth refresh,references/networking.md,react-native
16
+ cache-key,caching,unrelated users or queries share result,cache keys omit tenant filter locale or parameters,under-specified key or normalization collision,print hashed key components and query inputs,add one distinguishing parameter and compare keys,clear entire cache,distinct inputs produce distinct entries,high,cache key,references/async-races.md,*
17
+ cache-invalidation,caching,updated source is hidden by cached read,write path omits affected key/version,invalid invalidation ownership,source version key and mutation event,disable cache then compare targeted invalidation,global cache clear,affected read changes while unrelated cache survives,high,cache invalidation,references/async-races.md,react
18
+ database-transaction,database,partial state after failure,one table updated while related write fails,transaction boundary split or wrong connection,DB state before after and transaction logs,fail second write and inspect rollback,catch and continue with partial state,atomic state is restored,high,database transaction,references/hypothesis-driven-debugging.md,node
19
+ database-constraint,database,duplicate or invalid row appears,unique or foreign key constraint absent or bypassed,application-only validation race,live schema and concurrent insert trace,run two writers against real DB,check then insert without constraint,constraint or idempotency prevents duplicate,high,database integrity,references/hypothesis-driven-debugging.md,node
20
+ database-n-plus-one,database,latency grows with collection size,query count scales with item count,query in loop or lazy relation,query count timings and row count,compare one item and 100 items,add arbitrary cache,query count follows intended bound,medium,database query,references/performance.md,node
21
+ render-churn,rendering,typing or scroll janks,render count and JS/UI thread work rise,unstable inputs effect loop or broad state owner,profiler flame and render count,freeze unrelated state and profile again,memoize every component,frame budget and render cause improve,high,render performance,references/performance.md,react
22
+ render-hydration,rendering,server and client markup differ,hydration warning or first-paint replacement,environment-dependent render or client-only value,server HTML client value and route phase,replace time/random/browser read with stable input,disable hydration warnings,stable first render then client update,high,hydration mismatch,references/performance.md,nextjs
23
+ navigation-route,navigation,back or deep link lands incorrectly,route params missing or stack differs by entry path,non-serializable params or split navigation ownership,entry URL route state and navigation events,launch cold and warm via deep link,reset whole navigation stack,all supported entry paths resolve correct screen,high,navigation deep link,references/async-races.md,react-native
24
+ memory-list,memory,memory rises after repeated list visits,heap or native image/resource baseline never returns,listener image cache or retained closure,heap snapshots and resource/listener counts,repeat visit with bounded dataset,raise memory limit or force GC only,baseline returns within known tolerance,high,memory retention,references/memory.md,react-native
25
+ memory-cache,memory,cache grows without bound,cache entries and decoded images increase with usage,unbounded cache or missing eviction,cache size hit rate and entry age,load varied keys beyond expected working set,disable caching globally,bounded eviction preserves correctness,medium,memory cache,references/memory.md,*
26
+ cpu-blocking,cpu,interaction freezes during computation,long synchronous task on main or JS thread,parsing loop serialization or crypto on hot path,profile task duration and thread,move one computation off path or chunk it,add arbitrary delay,interaction stays within measured budget,high,cpu event loop,references/performance.md,node
27
+ build-toolchain,build,build fails before source compilation,first tool error names JDK SDK compiler or plugin mismatch,toolchain version incompatibility,exact first error and resolved versions,run supported version matrix,delete caches repeatedly,same target builds with recorded toolchain,high,build toolchain,references/build-failures.md,*
28
+ dependency-mismatch,build,only one package or platform fails,lockfile has duplicated incompatible versions,peer native or transitive mismatch,package tree lockfile and affected importer,resolve one dependency edge and rerun target,force install or delete lockfile,resolved graph and target build are coherent,high,dependency mismatch,references/build-failures.md,package-manager
29
+ ci-only,ci,local passes but CI fails,environment or clean checkout differs,missing secret tool version path or test order,CI command env names cache state and artifact,run clean temp checkout or matching container,skip failing CI test,CI reproduces or difference is documented,high,ci environment,references/build-failures.md,ci
30
+ config-env,environment,works locally but fails in target env,missing or wrong typed config value,configuration precedence or secret injection,variable names only source and effective non-secret metadata,run with variable absent and valid placeholder,print all environment values,missing config fails safely and valid config works,high,configuration environment,references/networking.md,*
31
+ native-crash,native,release app crashes in native path,device log symbolicated frame or signal,platform lifecycle permission ABI or native module mismatch,crash log symbols device OS build and native versions,reproduce on affected device/variant with symbols,catch native error in JS/Dart only,affected release path no longer crashes,critical,native crash,references/build-failures.md,ios
32
+ docker-env-port,environment,Docker service has wrong environment or exposed port,container sees missing config or host cannot reach mapped service port,Compose environment precedence service versus host port mapping or wrong network binding,effective container environment docker compose config port mapping and health endpoint,render the resolved Compose config and test service to service and host paths,rebuild image repeatedly without checking runtime config,Docker service starts with validated config and both expected network paths work,high,configuration environment;docker ports,references/networking.md,docker
33
+ tauri-ipc-permission,native,Tauri frontend command fails or is denied at the IPC boundary,invoke error or capability rejection occurs between frontend and Rust command,command not registered capability permission missing or serialized payload mismatch,frontend invoke payload Rust command registration capability files and desktop logs,call the command with a minimal payload then verify registration capabilities and serialized fields,catch the error only in the frontend or disable permission checks,frontend and Rust command agree on registration permissions payload and failure handling,high,tauri ipc;capabilities permissions;serialization payload,references/build-failures.md,tauri
34
+ android-r8-release,build,Android release build or app fails after R8 minification,release-only missing class method or obfuscated Logcat stack appears for a variant,missing keep rule reflection generated or native class and variant-specific shrinker configuration,Gradle variant R8 warnings mapping.txt missing symbols and comparable debug release behavior,compare the affected release variant with debug inspect mapping and add the narrow keep rule required by evidence,disable minification globally or ship without mapping files,the affected release variant builds and reproduces with symbolicated evidence when needed,high,build toolchain;android r8;proguard release;minification mapping,references/build-failures.md,android
@@ -0,0 +1,14 @@
1
+ {
2
+ "version": 1,
3
+ "skill": "showdar-debug",
4
+ "datasets": [
5
+ {
6
+ "file": "data/failure-patterns.csv",
7
+ "idField": "id",
8
+ "requiredColumns": ["id", "category", "symptom", "signals", "likely_causes", "evidence_to_collect", "experiments", "common_wrong_fix", "verification", "severity", "tags", "reference", "stack"],
9
+ "searchableFields": ["category", "symptom", "signals", "likely_causes", "evidence_to_collect", "experiments", "common_wrong_fix", "verification", "tags"],
10
+ "filterFields": ["category", "severity", "stack"],
11
+ "reference": "references/hypothesis-driven-debugging.md"
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,19 @@
1
+ # Example evidence log
2
+
3
+ Request: search shows the previous title immediately after an incremental sync.
4
+
5
+ Observation: the bug reproduces only after sync; a clean process is correct.
6
+ Evidence: bypassing the query cache returns the new title, and the database row
7
+ has the new version. The stale response has the old cache version.
8
+
9
+ Hypotheses:
10
+ 1. The index write is stale.
11
+ 2. The query cache is not invalidated for the changed document.
12
+ 3. Two sync workers race and restore the old value.
13
+
14
+ Experiment: log document ID, cache key, source version, and worker ID; then
15
+ invalidate only the affected key after the commit. The stale result disappears,
16
+ and reverting invalidation makes the regression test fail again.
17
+
18
+ Conclusion: cache invalidation is the confirmed root cause. Record the failed
19
+ hypotheses and add a regression test before making the minimal production fix.
@@ -0,0 +1,3 @@
1
+ # Async and race failures
2
+
3
+ Look for stale closures/state, cancellation gaps, duplicate requests, out-of-order responses, lifecycle disposal, shared mutable caches, retry duplication, and missing idempotency. Draw an event timeline with operation ID, owner, start, cancellation, completion, and state write. Reproduce with controlled timing barriers or a fake clock rather than random sleeps. Decide whether correctness requires cancellation, sequence/version checks, serialization, a transaction, or idempotency; debounce is only an input-rate policy, not a general race fix.
@@ -0,0 +1,3 @@
1
+ # Build failures
2
+
3
+ Start at the first causal error, not the last cascade. Capture command, target/variant, toolchain versions, resolved dependency graph, generated step, configuration, signing/native context, and the first failing task. Compare clean checkout, warm build, and target environment only when each tests a stated cache/environment hypothesis. Preserve logs and mapping/symbol artifacts. Avoid deleting caches, lockfiles, volumes, or generated files until evidence points to corruption and the recovery path is understood.
@@ -0,0 +1,3 @@
1
+ # Hypothesis-driven debugging
2
+
3
+ A hypothesis must predict an observable result: “if H is true, changing X should change Y while Z stays constant.” Rank hypotheses by existing evidence, impact, and cheapness of falsification. Capture reproduction, environment, timestamp, input class, request/state IDs, and expected versus actual result. Change one variable per experiment when practical; use controlled barriers for races. Once evidence contradicts a hypothesis, discard it instead of patching around it. A root cause is confirmed when removing or changing the causal boundary restores the invariant and the regression proof fails without the fix.
@@ -0,0 +1,3 @@
1
+ # Memory failures
2
+
3
+ Separate retained objects from transient allocation spikes. Name the repeated user flow, baseline, sample points, heap/native resource view, and tolerance. Inspect ownership/lifecycle of listeners, subscriptions, timers, images, caches, native resources, and large collections. Repeat the flow enough to distinguish warm-up from growth, compare after disposal/idle, and identify the retaining path. Do not “fix” retention by raising limits or forcing collection; bound the owner or dispose the resource and rerun the original scenario.
@@ -0,0 +1,3 @@
1
+ # Networking failures
2
+
3
+ Capture method, URL class rather than secret-bearing URL, request identity, status, elapsed time, timeout/cancellation, retry attempt, cache key class, and response parsing result. Distinguish transport failure, HTTP/application failure, auth/session failure, and stale cache. Compare request and server timelines to find retries or out-of-order refresh. Redact tokens, cookies, authorization headers, personal data, and full sensitive payloads. A successful 2xx is not proof that decoding or durable side effects succeeded.
@@ -0,0 +1,3 @@
1
+ # Performance debugging
2
+
3
+ Name the user-visible path, workload size, platform, and budget. Classify CPU/thread blocking, render/rebuild churn, layout/raster/GPU work, I/O/network, image decode, memory/GC, database/query, or bundle/startup cost. Record a baseline with the same scenario, then change one causal variable and measure the same metric. Prefer reducing work, moving it off a hot thread, batching, virtualizing, or bounding data over adding arbitrary delays or memoization. Report measurement noise and unverified devices.
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from 'node:child_process';
3
+ import path from 'node:path';
4
+ import { detectStacks } from './lib/detect-stack.mjs';
5
+ const cwd=path.resolve(process.argv[2]??process.cwd());
6
+ const run=(cmd,args)=>{const r=spawnSync(cmd,args,{cwd,encoding:'utf8'});return r.status===0?r.stdout.trim():null};
7
+ const redact=(s)=>s?.replace(/(token|secret|password|authorization)\s*[=:]\s*\S+/ig,'$1=<redacted>')??null;
8
+ console.log(JSON.stringify({cwd,stacks:await detectStacks(cwd),node:process.version,platform:process.platform,arch:process.arch,gitStatus:redact(run('git',['status','--short'])),gitHead:run('git',['rev-parse','--short','HEAD'])},null,2));
@@ -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,21 @@
1
+ # Android debugging
2
+
3
+ ## Apply when
4
+
5
+ Use this guide for Kotlin/Java, React Native/Flutter native boundaries, Gradle/build, device-only, lifecycle, permission, or release/R8 failures. Record Android API level, ABI, device/emulator, variant, application ID, JDK, Gradle/AGP/Kotlin, and debug versus release-like configuration.
6
+
7
+ ## Architecture and evidence
8
+
9
+ Separate Gradle configuration/dependency resolution, compile/resource/link, app launch, main-thread/UI, background service, and process-death failures. Capture the first failing Gradle task and full Logcat exception/cause, not only the final “killed” line. Inspect manifest merger output, resources, native ABI, lifecycle callbacks, saved state, and permission result. For release crashes keep the exact APK/AAB, R8 mapping, native symbols, and build IDs so stack traces can be symbolicated.
10
+
11
+ ## Investigation
12
+
13
+ Reproduce on the affected API/ABI and compare the same variant on a clean install, upgrade install, background/foreground, rotation, and process recreation path. Use StrictMode, Android Studio profiler, frame/rendering tools, and heap/native allocation evidence for performance or memory. For network issues inspect cleartext/TLS, Network Security Config, DNS, timeout, and server correlation. Read `references/build-failures.md`, `references/async-races.md`, or `references/memory.md` when those boundaries are implicated.
14
+
15
+ ## Wrong turns and edge cases
16
+
17
+ Do not fix a release-only failure by disabling R8, increasing timeouts, or testing only an emulator. Watch for manifest/resource variant drift, exported components, task/launch-mode behavior, Doze/background limits, permission timing, split APK delivery, ABI mismatch, and process death that removes in-memory state.
18
+
19
+ ## Verification
20
+
21
+ Run the failing Gradle task and affected test, then install the same debug/release-like artifact with `adb`, collect filtered Logcat, and repeat lifecycle/permission paths. Verify mapping/symbol artifacts match the shipped binary and test at least one affected API/ABI class.
@@ -0,0 +1,21 @@
1
+ # Docker debugging
2
+
3
+ ## Apply when
4
+
5
+ Use this guide for failures that differ between a host and a container, including build, startup, networking, persistence, permissions, health checks, or architecture. Record image digest, base image/runtime, host and target architecture, command/entrypoint, container exit code, and compose/orchestrator context.
6
+
7
+ ## Architecture and evidence
8
+
9
+ Separate Dockerfile/build-context errors from image/runtime errors. Inspect the effective command, working directory, user, environment variable names (never values), mounts, exposed versus published ports, DNS/resolver configuration, service aliases, health status, and filesystem ownership. Compare `linux/amd64`/`linux/arm64` and libc/runtime assumptions; an image that builds can still fail at startup on the target architecture. Capture the first causal log before the health-check cascade.
10
+
11
+ ## Investigation
12
+
13
+ Run the exact image digest with a minimal command, then add the entrypoint, dependencies, mounts, and health check one boundary at a time. Verify the process binds to the container interface, not only `localhost`; test service DNS and dependency readiness separately from application health. For volume issues inspect mount path, UID/GID, read-only flags, and existing data without deleting it. Read `references/build-failures.md` for image/build evidence.
14
+
15
+ ## Wrong turns and edge cases
16
+
17
+ Do not rebuild with a moving tag, delete volumes, or run as root just to make the symptom disappear. Check build secrets versus runtime secrets, PID 1 signal handling, shell-form entrypoints, line endings, CA certificates, timezone/locale, file permissions, port collisions, and health checks that probe an unavailable dependency.
18
+
19
+ ## Verification
20
+
21
+ Use a pinned image/digest, `docker inspect`, container logs, health output, and an in-network smoke request. Reproduce with the target architecture/runtime and a clean volume when persistence is relevant; confirm graceful stop, restart, dependency outage, and readiness behavior.
@@ -0,0 +1,21 @@
1
+ # Flutter debugging
2
+
3
+ ## Apply when
4
+
5
+ Use this guide for Flutter build errors, widget failures, dropped frames, lifecycle races, plugin/platform-channel issues, or memory/image problems. Record Flutter and Dart SDK versions, build mode, device/API level, renderer, and whether the issue is Android, iOS, or both.
6
+
7
+ ## Architecture and evidence
8
+
9
+ Separate build (widget tree/configuration), layout (constraints), paint (layers), and raster/GPU work. The main isolate handles Dart code and scheduling; platform channels cross into the native runner, while shader compilation and image upload can surface as raster jank. Use Flutter DevTools timeline/frame chart, rebuild indicators, memory snapshots, logs, and Observatory/VM data rather than judging by feel. Capture the widget lifecycle and mounted state around every async callback.
10
+
11
+ ## Investigation
12
+
13
+ Reproduce with a fixed route/data set and compare first frame, warm navigation, scroll, background/foreground, and rotation where relevant. For rebuild storms inspect provider/Bloc/Cubit scope, selector granularity, inherited dependencies, and `build` side effects. For async work trace cancellation/disposal and distinguish main-isolate CPU work from an isolate boundary. For platform failures capture channel name/payload shape, plugin version, native exception, Gradle/Xcode task, and device logs. Read `references/performance.md`, `references/async-races.md`, or `references/memory.md` as needed.
14
+
15
+ ## Wrong turns and edge cases
16
+
17
+ Do not move expensive work into `build`, add arbitrary delays, or globally disable animations to hide jank. `const` and rebuild reduction do not fix raster/image cost. Watch for shader warm-up, oversized decoded images, cache growth, hot-reload-only behavior, disposed `BuildContext`, plugin registration differences, and release tree-shaking.
18
+
19
+ ## Verification
20
+
21
+ Run `flutter analyze`, focused tests, and a profile/release-like build when performance or native integration is involved. Recheck DevTools frame timing, memory after repeated flows, background resume, and both platform runners before claiming resolution.
@@ -0,0 +1,21 @@
1
+ # iOS debugging
2
+
3
+ ## Apply when
4
+
5
+ Use this guide for Swift/Objective-C, React Native/Flutter native boundaries, build failures, device-only crashes, lifecycle issues, or release-only behavior. Record Xcode/Swift, deployment target, scheme/configuration, device versus simulator, OS version, and debug versus archive build.
6
+
7
+ ## Architecture and evidence
8
+
9
+ Classify the failure as compile/link, launch/signing, main-thread/UI, background lifecycle, framework/native module, or memory/resource. Capture the first Xcode build error, device Console/crash log, exception type, thread, loaded binary versions, and app state. Symbolicate release crashes with the matching dSYM and binary UUID; an unsymbolicated stack is not evidence for a source-level fix. Check entitlements, privacy usage descriptions, push/background capabilities, and bundle configuration when a feature fails only on device.
10
+
11
+ ## Investigation
12
+
13
+ Compare simulator/device and debug/archive paths without changing multiple variables. For UI hangs or races inspect main-thread checker, lifecycle callbacks, scene transitions, task cancellation, and actor/thread ownership. For memory pressure inspect Instruments allocations/leaks, image/native resource ownership, and termination reason. For build issues preserve the first failing target/task and resolved Pods/SPM versions; read `references/build-failures.md` and `references/memory.md` when relevant.
14
+
15
+ ## Wrong turns and edge cases
16
+
17
+ Do not treat a simulator pass as device proof, disable signing/capabilities as a fix, or delete Pods/DerivedData without a cache hypothesis. Watch for release optimization, missing symbols, keychain/secure-storage access groups, permission timing, background suspension, architecture slices, and native crashes that bypass JavaScript/Dart error handlers.
18
+
19
+ ## Verification
20
+
21
+ Rebuild the affected scheme/configuration, reproduce on the affected OS/device class, inspect symbolicated logs, and run focused tests. For release-only issues validate an archive or equivalent release build plus launch, permission, background/foreground, and crash-observability paths.
@@ -0,0 +1,21 @@
1
+ # Next.js debugging
2
+
3
+ ## Apply when
4
+
5
+ Use this guide for App Router or Pages Router failures involving rendering, routing, data fetching, server actions/route handlers, deployment, or hydration. Name the Next.js version and router because cache and server/client APIs are version-sensitive.
6
+
7
+ ## Architecture and evidence
8
+
9
+ Locate the execution boundary first: server component, client component, route handler, server action, middleware, edge runtime, or browser. Record route, params, headers/cookies class, build mode, runtime, and whether the failure occurs during `next build`, server startup, request handling, or client hydration. For stale data, distinguish the Data Cache, Full Route Cache, client/router cache, and application cache; capture the key, revalidation policy, tag/path invalidation, and response timestamp.
10
+
11
+ ## Investigation
12
+
13
+ Compare a static/build-time failure with `next build`, a production request with `next start`, and a client navigation against a fresh load. Inspect server logs and browser console separately. For hydration mismatches compare server HTML with the first client render and look for time, locale, random IDs, browser-only APIs, or different data snapshots. For async races, trace request IDs across server action/API and client transitions. Read `references/async-races.md` and `references/build-failures.md` when those boundaries are involved.
14
+
15
+ ## Wrong turns and edge cases
16
+
17
+ Do not add `use client`, `dynamic(..., { ssr: false })`, `no-store`, or cache invalidation as a blanket fix. These change execution, caching, or SEO semantics. Environment variables exposed to the browser are build-time inputs in many deployments; changing a runtime secret may not change an already-built client bundle. Check redirects, middleware, streaming/Suspense, error boundaries, and edge restrictions before blaming React.
18
+
19
+ ## Verification
20
+
21
+ Run `next build` and the production server path when the issue is release-only. Smoke the affected route by direct load and client navigation, assert cache freshness after the intended invalidation, and verify the target runtime has the required Node/edge APIs.
@@ -0,0 +1,21 @@
1
+ # Node debugging
2
+
3
+ ## Apply when
4
+
5
+ Use this guide for Node services, workers, CLIs, and scripts with hangs, latency, crashes, rejected promises, memory growth, or environment-specific behavior. Record Node version, module mode, package manager lockfile, process role, deployment/container image, and the exact command.
6
+
7
+ ## Architecture and evidence
8
+
9
+ Separate synchronous event-loop work, libuv thread-pool work, worker threads, child processes, and downstream services. Capture request/operation IDs, event-loop delay, CPU/heap samples, active handles, open sockets, connection-pool usage, stream queue sizes, exit code/signal, and the first causal error. For async failures inspect promise ownership and whether the process has an `unhandledRejection`/`uncaughtException` boundary; do not confuse a logged error with a handled operation.
10
+
11
+ ## Investigation
12
+
13
+ Compare a single request, concurrent load, slow dependency, aborted client, and graceful shutdown. Use a CPU profile/event-loop delay measurement for blocking code, heap snapshots and retained paths for leaks, and stream backpressure metrics for producer/consumer imbalance. Inspect database/network timeout, retry, pool saturation, DNS, TLS, and transaction boundaries. Verify environment/config names and parsed types without printing secret values. Read `references/async-races.md`, `references/networking.md`, or `references/memory.md` for the shared evidence model.
14
+
15
+ ## Wrong turns and edge cases
16
+
17
+ Do not add retries or increase timeouts before identifying whether the failure is overload, a dead dependency, or duplicate side effects. Avoid synchronous filesystem/crypto/JSON work on request paths when input size is unbounded. Watch for stream listeners that never detach, pools created per request, aborted requests continuing work, ESM/CJS loader differences, and process crashes before request middleware runs.
18
+
19
+ ## Verification
20
+
21
+ Run the focused test and the production-equivalent start command with the same Node/config shape. Exercise timeout, cancellation, overload, dependency failure, and shutdown paths; verify exit behavior, metrics/log correlation, resource cleanup, and no unhandled rejection warnings.
@@ -0,0 +1,21 @@
1
+ # React Native debugging
2
+
3
+ ## Apply when
4
+
5
+ Use this guide for React Native crashes, blank screens, jank, navigation bugs, native-module failures, memory pressure, or issues that appear only on iOS/Android. Record RN, React, Hermes, architecture mode, platform, device/API level, build variant, and whether the repro is debug or release-like.
6
+
7
+ ## Architecture and evidence
8
+
9
+ Separate the JS thread from the UI/main thread and from native module/JSI execution. Hermes stack traces and heap data describe the JS runtime; Android Logcat, iOS device logs, symbolicated native crashes, and Instruments/Android profilers cover native boundaries. Inspect Metro resolution, transforms, bundle contents, and source maps for packager failures. New Architecture/TurboModules/Fabric can change threading and lifecycle assumptions; do not treat an old bridge workaround as proof of the current path.
10
+
11
+ ## Investigation
12
+
13
+ For slow interactions, measure JS event-loop work, UI frame time, layout/commit cost, image decode, and native I/O separately. For lists inspect `FlatList`/FlashList windowing, item keys, render identity, measurement, pagination, and image size/cache. For navigation inspect focus/blur, screen mount/unmount, state restoration, and pending async work. For Reanimated, inspect worklets and shared values separately because they execute outside ordinary JS render timing. Check native-module registration and lifecycle on both platforms.
14
+
15
+ ## Wrong turns and edge cases
16
+
17
+ Do not add `setTimeout`, broad memoization, or disable Hermes/New Architecture just to make a repro disappear. Avoid clearing Metro/Gradle/CocoaPods caches unless cache provenance is the hypothesis. Watch for release-only minification, missing source maps, image memory spikes, process death/background resume, permission prompts, and native crashes before the JS error handler runs. Read `references/performance.md`, `references/memory.md`, or `references/async-races.md` for the causal method.
18
+
19
+ ## Verification
20
+
21
+ Use Android Logcat and iOS device/simulator logs, then reproduce in the affected variant. Run the repository's Metro/typecheck/test command and a release-like build when packaging or native code is implicated. Confirm the fix across Hermes/architecture and both platforms when the changed boundary is shared.
@@ -0,0 +1,21 @@
1
+ # React debugging
2
+
3
+ ## Apply when
4
+
5
+ Use this guide for browser React components, shared hooks, and client-side state. First classify the failure as render churn, state ownership, effect synchronization, an event boundary, an async race, or an external system. A similar symptom in a server-rendered app also needs `showdar-debug`'s Next.js guide.
6
+
7
+ ## Architecture and evidence
8
+
9
+ Capture the component tree, props/state identity, effect dependencies, render count, browser console, network timeline, and the exact user action. A render loop is not the same as a state synchronization loop: record which setter runs, which value changes identity, and whether Strict Mode is exposing a non-idempotent effect in development. For context or external stores, inspect provider scope, selector granularity, subscription cleanup, and cache keys rather than only the final value.
10
+
11
+ ## Investigation
12
+
13
+ Reproduce a fresh mount, prop update, navigation/unmount, and retry path. Use React DevTools Profiler to compare commits and highlight the owner of avoidable renders; use browser performance/network traces for work outside React. For async data, assign an operation ID and test slow, cancelled, and out-of-order responses. Read `references/async-races.md` when completion ordering is relevant.
14
+
15
+ ## Wrong turns and edge cases
16
+
17
+ Do not silence an effect dependency warning, add broad memoization, or move state upward until the synchronization invariant is explicit. `useMemo`/`useCallback` can hide identity churn without fixing an unstable external input. Watch for stale closures, controlled/uncontrolled transitions, portal ownership, Suspense fallback remounts, and dev-only Strict Mode double invocation.
18
+
19
+ ## Verification
20
+
21
+ Run the repository's lint/typecheck/test command, then reproduce the original interaction with Profiler/console clean. Verify mount, update, unmount, error, and slow-network paths; compare production mode when the symptom may depend on development-only behavior.
@@ -0,0 +1,21 @@
1
+ # Tauri debugging
2
+
3
+ ## Apply when
4
+
5
+ Use this guide for Tauri desktop crashes, blank webviews, command/IPC failures, permissions, packaging, updater, or platform-only behavior. Record Tauri and Rust versions, frontend bundler, target triple, OS, dev versus release bundle, and whether the failure is in the webview or Rust process.
6
+
7
+ ## Architecture and evidence
8
+
9
+ Separate frontend DOM/runtime errors, Tauri command serialization, Rust command execution, capability/permission denial, webview process crashes, and bundle/signing failures. Capture browser-console output, Rust logs/backtrace, command name and redacted payload shape, capability file, target triple, bundle metadata, and exit/signals. A dev server can hide missing packaged assets, CSP, protocol, resource, or updater problems.
10
+
11
+ ## Investigation
12
+
13
+ Reproduce the command from the frontend and invoke the Rust implementation with focused tests where possible. Trace request, serialization, permission check, native side effect, and returned error. Compare `tauri dev` with a release bundle installed outside the build tree; inspect resource paths and working-directory assumptions. For native failures use macOS Console/crash reports or Windows Event Viewer, and verify architecture-specific libraries. Read `references/build-failures.md` for build/package evidence.
14
+
15
+ ## Wrong turns and edge cases
16
+
17
+ Do not grant all capabilities, disable CSP, or use absolute developer-machine paths as a permanent fix. Watch for renamed commands, enum/JSON shape drift, window lifecycle races, updater signature/endpoint mismatch, WebView2/WebKit differences, filesystem permission boundaries, and target-specific path/encoding behavior.
18
+
19
+ ## Verification
20
+
21
+ Run frontend tests and `cargo test`, then `tauri build` for the affected target. Install the produced artifact on a clean user profile, exercise startup, IPC, filesystem/network permissions, restart, and updater/error paths, and retain symbols/logs for release crashes.