@kinqs/brainrouter-mcp-server 0.3.4

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 (337) hide show
  1. package/.env.example +144 -0
  2. package/README.md +56 -0
  3. package/agents/README.md +120 -0
  4. package/agents/code-reviewer.md +97 -0
  5. package/agents/security-auditor.md +101 -0
  6. package/agents/test-engineer.md +95 -0
  7. package/dist/__tests__/agent_mode.test.d.ts +1 -0
  8. package/dist/__tests__/api-routes.test.d.ts +1 -0
  9. package/dist/__tests__/api-routes.test.js +170 -0
  10. package/dist/__tests__/crypto.test.d.ts +1 -0
  11. package/dist/__tests__/crypto.test.js +28 -0
  12. package/dist/__tests__/host-integrations.test.d.ts +1 -0
  13. package/dist/__tests__/host-integrations.test.js +82 -0
  14. package/dist/__tests__/integration.test.d.ts +1 -0
  15. package/dist/__tests__/integration.test.js +50 -0
  16. package/dist/__tests__/loader.test.d.ts +1 -0
  17. package/dist/__tests__/loader.test.js +89 -0
  18. package/dist/__tests__/neural-spark.test.d.ts +1 -0
  19. package/dist/__tests__/neural-spark.test.js +112 -0
  20. package/dist/__tests__/pagination.test.d.ts +1 -0
  21. package/dist/__tests__/pagination.test.js +23 -0
  22. package/dist/__tests__/redaction.test.d.ts +1 -0
  23. package/dist/__tests__/redaction.test.js +17 -0
  24. package/dist/__tests__/registry.test.d.ts +1 -0
  25. package/dist/__tests__/registry.test.js +56 -0
  26. package/dist/__tests__/retry.test.d.ts +1 -0
  27. package/dist/__tests__/retry.test.js +30 -0
  28. package/dist/__tests__/skill-activation.test.d.ts +1 -0
  29. package/dist/__tests__/skill-activation.test.js +112 -0
  30. package/dist/__tests__/working-memory.test.d.ts +1 -0
  31. package/dist/__tests__/working-memory.test.js +200 -0
  32. package/dist/__tests__/workspace-paths.test.d.ts +1 -0
  33. package/dist/__tests__/workspace-paths.test.js +56 -0
  34. package/dist/__tests__/writer.test.d.ts +1 -0
  35. package/dist/__tests__/writer.test.js +94 -0
  36. package/dist/api/auth/crypto.d.ts +4 -0
  37. package/dist/api/auth/crypto.js +54 -0
  38. package/dist/api/middleware/auth.d.ts +12 -0
  39. package/dist/api/middleware/auth.js +90 -0
  40. package/dist/api/pagination.d.ts +18 -0
  41. package/dist/api/pagination.js +32 -0
  42. package/dist/api/routes/auth.d.ts +1 -0
  43. package/dist/api/routes/auth.js +130 -0
  44. package/dist/api/routes/chat-completions.d.ts +7 -0
  45. package/dist/api/routes/chat-completions.js +474 -0
  46. package/dist/api/routes/contradictions.d.ts +1 -0
  47. package/dist/api/routes/contradictions.js +28 -0
  48. package/dist/api/routes/evidence.d.ts +1 -0
  49. package/dist/api/routes/evidence.js +59 -0
  50. package/dist/api/routes/governance.d.ts +1 -0
  51. package/dist/api/routes/governance.js +95 -0
  52. package/dist/api/routes/graph.d.ts +1 -0
  53. package/dist/api/routes/graph.js +25 -0
  54. package/dist/api/routes/hooks.d.ts +1 -0
  55. package/dist/api/routes/hooks.js +88 -0
  56. package/dist/api/routes/memories.d.ts +1 -0
  57. package/dist/api/routes/memories.js +92 -0
  58. package/dist/api/routes/persona.d.ts +1 -0
  59. package/dist/api/routes/persona.js +9 -0
  60. package/dist/api/routes/scenes.d.ts +1 -0
  61. package/dist/api/routes/scenes.js +35 -0
  62. package/dist/api/routes/skills.d.ts +1 -0
  63. package/dist/api/routes/skills.js +14 -0
  64. package/dist/api/routes/stats.d.ts +1 -0
  65. package/dist/api/routes/stats.js +8 -0
  66. package/dist/api/routes/users.d.ts +1 -0
  67. package/dist/api/routes/users.js +82 -0
  68. package/dist/api/routes/working.d.ts +1 -0
  69. package/dist/api/routes/working.js +88 -0
  70. package/dist/index.d.ts +2 -0
  71. package/dist/index.js +492 -0
  72. package/dist/integrations/claude-code.d.ts +12 -0
  73. package/dist/integrations/claude-code.js +35 -0
  74. package/dist/integrations/codex.d.ts +12 -0
  75. package/dist/integrations/codex.js +34 -0
  76. package/dist/integrations/generic-mcp.d.ts +52 -0
  77. package/dist/integrations/generic-mcp.js +118 -0
  78. package/dist/loader.d.ts +29 -0
  79. package/dist/loader.js +200 -0
  80. package/dist/memory/capture.d.ts +35 -0
  81. package/dist/memory/capture.js +230 -0
  82. package/dist/memory/config.d.ts +2 -0
  83. package/dist/memory/config.js +3 -0
  84. package/dist/memory/engine.d.ts +203 -0
  85. package/dist/memory/engine.js +626 -0
  86. package/dist/memory/llm-semaphore.d.ts +41 -0
  87. package/dist/memory/llm-semaphore.js +81 -0
  88. package/dist/memory/memory-type-config.d.ts +11 -0
  89. package/dist/memory/memory-type-config.js +65 -0
  90. package/dist/memory/pipeline/cognitive-contradiction.d.ts +7 -0
  91. package/dist/memory/pipeline/cognitive-contradiction.js +59 -0
  92. package/dist/memory/pipeline/cognitive-dedup.d.ts +23 -0
  93. package/dist/memory/pipeline/cognitive-dedup.js +38 -0
  94. package/dist/memory/pipeline/cognitive-extractor.d.ts +21 -0
  95. package/dist/memory/pipeline/cognitive-extractor.js +183 -0
  96. package/dist/memory/pipeline/contextual-focus-builder.d.ts +13 -0
  97. package/dist/memory/pipeline/contextual-focus-builder.js +135 -0
  98. package/dist/memory/pipeline/focus-direction-shift.d.ts +10 -0
  99. package/dist/memory/pipeline/focus-direction-shift.js +27 -0
  100. package/dist/memory/pipeline/graph-builder.d.ts +11 -0
  101. package/dist/memory/pipeline/graph-builder.js +88 -0
  102. package/dist/memory/pipeline/graph-recall.d.ts +13 -0
  103. package/dist/memory/pipeline/graph-recall.js +55 -0
  104. package/dist/memory/pipeline/identity-distiller.d.ts +15 -0
  105. package/dist/memory/pipeline/identity-distiller.js +40 -0
  106. package/dist/memory/pipeline/l1-contradiction.d.ts +7 -0
  107. package/dist/memory/pipeline/l1-contradiction.js +66 -0
  108. package/dist/memory/pipeline/l1-dedup.d.ts +23 -0
  109. package/dist/memory/pipeline/l1-dedup.js +39 -0
  110. package/dist/memory/pipeline/l1-extractor.d.ts +21 -0
  111. package/dist/memory/pipeline/l1-extractor.js +180 -0
  112. package/dist/memory/pipeline/l2-direction-shift.d.ts +10 -0
  113. package/dist/memory/pipeline/l2-direction-shift.js +27 -0
  114. package/dist/memory/pipeline/l2-scene.d.ts +15 -0
  115. package/dist/memory/pipeline/l2-scene.js +140 -0
  116. package/dist/memory/pipeline/l3-distiller.d.ts +15 -0
  117. package/dist/memory/pipeline/l3-distiller.js +40 -0
  118. package/dist/memory/pipeline/neural-spark.d.ts +27 -0
  119. package/dist/memory/pipeline/neural-spark.js +78 -0
  120. package/dist/memory/pipeline/skill-prewarm.d.ts +63 -0
  121. package/dist/memory/pipeline/skill-prewarm.js +127 -0
  122. package/dist/memory/pipeline/task-queue.d.ts +54 -0
  123. package/dist/memory/pipeline/task-queue.js +117 -0
  124. package/dist/memory/prompts/cognitive-contradiction.d.ts +1 -0
  125. package/dist/memory/prompts/cognitive-contradiction.js +25 -0
  126. package/dist/memory/prompts/cognitive-extraction.d.ts +10 -0
  127. package/dist/memory/prompts/cognitive-extraction.js +114 -0
  128. package/dist/memory/prompts/core-identity.d.ts +6 -0
  129. package/dist/memory/prompts/core-identity.js +60 -0
  130. package/dist/memory/prompts/focus-direction-shift.d.ts +5 -0
  131. package/dist/memory/prompts/focus-direction-shift.js +32 -0
  132. package/dist/memory/prompts/focus-scene-cluster.d.ts +2 -0
  133. package/dist/memory/prompts/focus-scene-cluster.js +33 -0
  134. package/dist/memory/prompts/focus-scene.d.ts +7 -0
  135. package/dist/memory/prompts/focus-scene.js +40 -0
  136. package/dist/memory/prompts/graph-extraction-batch.d.ts +14 -0
  137. package/dist/memory/prompts/graph-extraction-batch.js +54 -0
  138. package/dist/memory/prompts/graph-extraction.d.ts +2 -0
  139. package/dist/memory/prompts/graph-extraction.js +53 -0
  140. package/dist/memory/prompts/l1-contradiction-batch.d.ts +16 -0
  141. package/dist/memory/prompts/l1-contradiction-batch.js +47 -0
  142. package/dist/memory/prompts/l1-contradiction.d.ts +1 -0
  143. package/dist/memory/prompts/l1-contradiction.js +25 -0
  144. package/dist/memory/prompts/l1-extraction.d.ts +10 -0
  145. package/dist/memory/prompts/l1-extraction.js +114 -0
  146. package/dist/memory/prompts/l2-direction-shift.d.ts +5 -0
  147. package/dist/memory/prompts/l2-direction-shift.js +32 -0
  148. package/dist/memory/prompts/l2-scene-cluster.d.ts +2 -0
  149. package/dist/memory/prompts/l2-scene-cluster.js +33 -0
  150. package/dist/memory/prompts/l2-scene.d.ts +7 -0
  151. package/dist/memory/prompts/l2-scene.js +40 -0
  152. package/dist/memory/prompts/l3-persona.d.ts +6 -0
  153. package/dist/memory/prompts/l3-persona.js +60 -0
  154. package/dist/memory/recall.d.ts +47 -0
  155. package/dist/memory/recall.js +427 -0
  156. package/dist/memory/redaction.d.ts +1 -0
  157. package/dist/memory/redaction.js +24 -0
  158. package/dist/memory/retry.d.ts +13 -0
  159. package/dist/memory/retry.js +53 -0
  160. package/dist/memory/scheduler.d.ts +9 -0
  161. package/dist/memory/scheduler.js +16 -0
  162. package/dist/memory/skill-hints-loader.d.ts +30 -0
  163. package/dist/memory/skill-hints-loader.js +100 -0
  164. package/dist/memory/store/embedding.d.ts +16 -0
  165. package/dist/memory/store/embedding.js +68 -0
  166. package/dist/memory/store/reranker.d.ts +24 -0
  167. package/dist/memory/store/reranker.js +83 -0
  168. package/dist/memory/store/sqlite.d.ts +167 -0
  169. package/dist/memory/store/sqlite.js +1816 -0
  170. package/dist/memory/store/types.d.ts +101 -0
  171. package/dist/memory/store/types.js +1 -0
  172. package/dist/memory/types.d.ts +207 -0
  173. package/dist/memory/types.js +7 -0
  174. package/dist/memory/validation.d.ts +441 -0
  175. package/dist/memory/validation.js +129 -0
  176. package/dist/memory/working/canvas.d.ts +5 -0
  177. package/dist/memory/working/canvas.js +43 -0
  178. package/dist/memory/working/offload.d.ts +71 -0
  179. package/dist/memory/working/offload.js +211 -0
  180. package/dist/memory/working/step-log.d.ts +16 -0
  181. package/dist/memory/working/step-log.js +35 -0
  182. package/dist/registry.d.ts +34 -0
  183. package/dist/registry.js +305 -0
  184. package/dist/resolver.d.ts +17 -0
  185. package/dist/resolver.js +126 -0
  186. package/dist/scripts/validate-foreign-workspace-path.d.ts +1 -0
  187. package/dist/scripts/validate-foreign-workspace-path.js +39 -0
  188. package/dist/tools/agent_memory_tools.d.ts +485 -0
  189. package/dist/tools/agent_memory_tools.js +793 -0
  190. package/dist/tools/create_skill.d.ts +46 -0
  191. package/dist/tools/create_skill.js +46 -0
  192. package/dist/tools/get_doc.d.ts +21 -0
  193. package/dist/tools/get_doc.js +24 -0
  194. package/dist/tools/get_persona.d.ts +15 -0
  195. package/dist/tools/get_persona.js +20 -0
  196. package/dist/tools/get_reference.d.ts +15 -0
  197. package/dist/tools/get_reference.js +20 -0
  198. package/dist/tools/get_skill.d.ts +34 -0
  199. package/dist/tools/get_skill.js +65 -0
  200. package/dist/tools/get_template_doc.d.ts +21 -0
  201. package/dist/tools/get_template_doc.js +24 -0
  202. package/dist/tools/list_docs.d.ts +15 -0
  203. package/dist/tools/list_docs.js +16 -0
  204. package/dist/tools/list_skills.d.ts +18 -0
  205. package/dist/tools/list_skills.js +17 -0
  206. package/dist/tools/list_template_docs.d.ts +15 -0
  207. package/dist/tools/list_template_docs.js +16 -0
  208. package/dist/tools/memory-engineering.d.ts +225 -0
  209. package/dist/tools/memory-engineering.js +284 -0
  210. package/dist/tools/memory-explain.d.ts +34 -0
  211. package/dist/tools/memory-explain.js +109 -0
  212. package/dist/tools/memory-governance.d.ts +171 -0
  213. package/dist/tools/memory-governance.js +224 -0
  214. package/dist/tools/memory-hooks.d.ts +67 -0
  215. package/dist/tools/memory-hooks.js +102 -0
  216. package/dist/tools/memory-working.d.ts +98 -0
  217. package/dist/tools/memory-working.js +101 -0
  218. package/dist/tools/memory_capture_turn.d.ts +66 -0
  219. package/dist/tools/memory_capture_turn.js +85 -0
  220. package/dist/tools/memory_consolidate.d.ts +55 -0
  221. package/dist/tools/memory_consolidate.js +176 -0
  222. package/dist/tools/memory_contradictions.d.ts +53 -0
  223. package/dist/tools/memory_contradictions.js +52 -0
  224. package/dist/tools/memory_graph_query.d.ts +51 -0
  225. package/dist/tools/memory_graph_query.js +35 -0
  226. package/dist/tools/memory_mark_cited.d.ts +43 -0
  227. package/dist/tools/memory_mark_cited.js +63 -0
  228. package/dist/tools/memory_recall.d.ts +77 -0
  229. package/dist/tools/memory_recall.js +81 -0
  230. package/dist/tools/memory_register_skill_hints.d.ts +49 -0
  231. package/dist/tools/memory_register_skill_hints.js +55 -0
  232. package/dist/tools/memory_resolve_session.d.ts +24 -0
  233. package/dist/tools/memory_resolve_session.js +133 -0
  234. package/dist/tools/memory_search.d.ts +146 -0
  235. package/dist/tools/memory_search.js +84 -0
  236. package/dist/tools/search_skills.d.ts +18 -0
  237. package/dist/tools/search_skills.js +17 -0
  238. package/dist/tools/update_doc.d.ts +24 -0
  239. package/dist/tools/update_doc.js +35 -0
  240. package/dist/tools/update_skill.d.ts +30 -0
  241. package/dist/tools/update_skill.js +80 -0
  242. package/dist/types.d.ts +81 -0
  243. package/dist/types.js +4 -0
  244. package/dist/writer.d.ts +30 -0
  245. package/dist/writer.js +220 -0
  246. package/docs/TEMPLATE ONLY +1 -0
  247. package/docs/api/API.md +64 -0
  248. package/docs/api/security/SECURITY.md +58 -0
  249. package/docs/deployment/DockerDeployment.md +30 -0
  250. package/docs/design/Design.md +59 -0
  251. package/docs/design/themes/apple.md +101 -0
  252. package/docs/design/themes/dieter-grid.md +100 -0
  253. package/docs/design/themes/gallery-white.md +100 -0
  254. package/docs/design/themes/pinterest.md +101 -0
  255. package/docs/design/themes/realty-open-house.md +101 -0
  256. package/docs/design/themes/vodafone.md +101 -0
  257. package/docs/hooks/Hooks.md +30 -0
  258. package/docs/schema/Schema.md +35 -0
  259. package/docs/strategy/ScalingStrategy.md +19 -0
  260. package/package.json +88 -0
  261. package/references/accessibility-checklist.md +160 -0
  262. package/references/orchestration-patterns.md +370 -0
  263. package/references/performance-checklist.md +153 -0
  264. package/references/security-checklist.md +134 -0
  265. package/references/testing-patterns.md +236 -0
  266. package/skills/agent/adr-skill/SKILL.md +299 -0
  267. package/skills/agent/agentic-engineering-workflow/SKILL.md +95 -0
  268. package/skills/agent/bootstrap-skill/SKILL.md +103 -0
  269. package/skills/agent/context-engineering/SKILL.md +307 -0
  270. package/skills/agent/debugging-and-error-recovery/SKILL.md +308 -0
  271. package/skills/agent/developer-growth-analysis/SKILL.md +328 -0
  272. package/skills/agent/doubt-driven-skill/SKILL.md +249 -0
  273. package/skills/agent/handover-skill/SKILL.md +112 -0
  274. package/skills/agent/idea-refine-skill/SKILL.md +185 -0
  275. package/skills/agent/idea-refine-skill/examples.md +238 -0
  276. package/skills/agent/idea-refine-skill/frameworks.md +99 -0
  277. package/skills/agent/idea-refine-skill/refinement-criteria.md +113 -0
  278. package/skills/agent/interview-skill/SKILL.md +226 -0
  279. package/skills/agent/planning-skill/SKILL.md +270 -0
  280. package/skills/agent/skill-authoring/SKILL.md +189 -0
  281. package/skills/agent/source-driven-skill/SKILL.md +197 -0
  282. package/skills/agent/spec-driven-skill/SKILL.md +221 -0
  283. package/skills/agent/sync-skill/SKILL.md +92 -0
  284. package/skills/agent/using-agent-skills/SKILL.md +189 -0
  285. package/skills/api/a11y-skill/SKILL.md +88 -0
  286. package/skills/api/api-skill/SKILL.md +123 -0
  287. package/skills/api/auth-skill/SKILL.md +80 -0
  288. package/skills/api/debug-skill/SKILL.md +535 -0
  289. package/skills/api/performance-skill/SKILL.md +100 -0
  290. package/skills/api/testing-skill/SKILL.md +100 -0
  291. package/skills/codebase/code-review-and-quality/SKILL.md +228 -0
  292. package/skills/codebase/code-simplification/SKILL.md +352 -0
  293. package/skills/codebase/code-structure-cleanup/SKILL.md +142 -0
  294. package/skills/codebase/concerns-skill/SKILL.md +89 -0
  295. package/skills/codebase/conventions-skill/SKILL.md +95 -0
  296. package/skills/codebase/doc-management-skill/SKILL.md +47 -0
  297. package/skills/codebase/git-workflow-skill/SKILL.md +312 -0
  298. package/skills/communication/1-3-1-rule/SKILL.md +120 -0
  299. package/skills/design/brutalist-skill/SKILL.md +131 -0
  300. package/skills/design/concept-diagrams/SKILL.md +387 -0
  301. package/skills/design/concept-diagrams/examples/apartment-floor-plan-conversion.md +244 -0
  302. package/skills/design/concept-diagrams/examples/automated-password-reset-flow.md +276 -0
  303. package/skills/design/concept-diagrams/examples/autonomous-llm-research-agent-flow.md +240 -0
  304. package/skills/design/concept-diagrams/examples/banana-journey-tree-to-smoothie.md +161 -0
  305. package/skills/design/concept-diagrams/examples/commercial-aircraft-structure.md +209 -0
  306. package/skills/design/concept-diagrams/examples/cpu-ooo-microarchitecture.md +236 -0
  307. package/skills/design/concept-diagrams/examples/electricity-grid-flow.md +182 -0
  308. package/skills/design/concept-diagrams/examples/feature-film-production-pipeline.md +172 -0
  309. package/skills/design/concept-diagrams/examples/hospital-emergency-department-flow.md +165 -0
  310. package/skills/design/concept-diagrams/examples/ml-benchmark-grouped-bar-chart.md +114 -0
  311. package/skills/design/concept-diagrams/examples/place-order-uml-sequence.md +325 -0
  312. package/skills/design/concept-diagrams/examples/smart-city-infrastructure.md +173 -0
  313. package/skills/design/concept-diagrams/examples/smartphone-layer-anatomy.md +154 -0
  314. package/skills/design/concept-diagrams/examples/sn2-reaction-mechanism.md +247 -0
  315. package/skills/design/concept-diagrams/examples/wind-turbine-structure.md +338 -0
  316. package/skills/design/concept-diagrams/references/dashboard-patterns.md +43 -0
  317. package/skills/design/concept-diagrams/references/infrastructure-patterns.md +144 -0
  318. package/skills/design/concept-diagrams/references/physical-shape-cookbook.md +42 -0
  319. package/skills/design/concept-diagrams/templates/template.html +174 -0
  320. package/skills/design/gpt-tasteskill/SKILL.md +114 -0
  321. package/skills/design/minimalist-skill/SKILL.md +116 -0
  322. package/skills/design/output-skill/SKILL.md +87 -0
  323. package/skills/design/redesign-skill/SKILL.md +213 -0
  324. package/skills/design/soft-skill/SKILL.md +132 -0
  325. package/skills/design/stitch-skill/EXAMPLE.md +121 -0
  326. package/skills/design/stitch-skill/SKILL.md +222 -0
  327. package/skills/design/taste-skill/SKILL.md +269 -0
  328. package/skills/devops/ci-cd-skill/SKILL.md +402 -0
  329. package/skills/devops/docker-skill/SKILL.md +297 -0
  330. package/skills/devops/domain-skill/SKILL.md +234 -0
  331. package/skills/lifecycle/changelog-generator/SKILL.md +135 -0
  332. package/skills/lifecycle/incremental-skill/SKILL.md +257 -0
  333. package/skills/lifecycle/migration-skill/SKILL.md +218 -0
  334. package/skills/lifecycle/shipping-skill/SKILL.md +321 -0
  335. package/skills/memory/agent-memory/SKILL.md +122 -0
  336. package/skills/qa/browser-testing-skill/SKILL.md +314 -0
  337. package/skills/ux/adversarial-ux-skill/SKILL.md +168 -0
@@ -0,0 +1,226 @@
1
+ ---
2
+ name: interview-skill
3
+ description: Extracts what the user actually wants instead of what they think they should want. Achieves this through one-question-at-a-time interview until ~95% confidence about the underlying intent. Use when an ask is underspecified ("build me X" without "for whom" or "why now"), when the user explicitly invokes ("interview me", "grill me", "are we sure?", "stress-test my thinking"), or when you catch yourself silently filling in ambiguous requirements before any plan, spec, or code exists.
4
+ hints: |
5
+ - State your initial hypothesis with an explicit confidence percentage in the first turn.
6
+ - Ask exactly one clarifying question at a time to prevent cognitive overload.
7
+ - Attach a concrete guess/hypothesis to every question to accelerate the user's feedback.
8
+ - Watch for sophistication-signaling buzzwords (e.g. "scalable", "clean") and probe for actual underlying needs.
9
+ - Restate the user's intent with a strict Out of Scope boundary and obtain an explicit confirmation.
10
+ ---
11
+
12
+ # Interview Me
13
+
14
+ ## Overview
15
+
16
+ What people ask for and what they actually want are different things. They ask for "a dashboard" because that's what one asks for, not because a dashboard solves their problem. They say "make it faster" without a number to hit.
17
+
18
+ The cheapest moment to find this gap is before any plan, spec, or code exists. Once you've started building, switching costs are real, and the user will rationalize the wrong thing into a "good enough" thing. The misfit gets locked in.
19
+
20
+ This skill closes the gap before it costs anything. The other Define-phase skills assume you already know roughly what you want: `idea-refine` generates variations from an idea, `spec-driven-development` writes the requirements down, `doubt-driven-development` stress-tests a plan after you've drafted one. Interview-me is the part before all of those, where you ask one question at a time, with your best guess attached, until you can predict what the user is going to say before they say it.
21
+
22
+ ## When to Use
23
+
24
+ Apply this skill when:
25
+
26
+ - The ask is missing at least one of: **who** the user is, **why** they want it, what **success** looks like, what the binding **constraint** is
27
+ - The request is conventional rather than specific ("build me X", "make it faster") and you can't unpack the convention without guessing
28
+ - You're tempted to start with assumptions you haven't surfaced
29
+ - The user hasn't said which value they're optimizing for when two reasonable ones are in tension (simplicity vs. flexibility, cost vs. speed)
30
+ - The user explicitly invokes: "interview me", "grill me", "before we start, are we sure?", "stress-test my thinking"
31
+
32
+ **When NOT to use:**
33
+
34
+ - The ask is unambiguous and self-contained ("rename this variable", "fix this typo")
35
+ - The user has explicitly asked for speed over verification
36
+ - Pure information requests ("how does X work?", "what does this code do?")
37
+ - Mechanical operations (renames, formats, file moves)
38
+ - You already have ≥95% confidence; re-read the stop condition below before assuming you don't
39
+
40
+ ## Loading Constraints
41
+
42
+ This skill needs a live, responsive user. **Do not invoke in non-interactive contexts** like CI pipelines, scheduled runs, `/loop`, or autonomous-loop. If you're in one of those and the ask is underspecified, flag that as a blocker for the user instead of guessing.
43
+
44
+ ## The Process
45
+
46
+ ### Step 1: Hypothesize, with a confidence number
47
+
48
+ Before asking anything, write down your current best read of what the user wants in **one sentence**, plus an honest confidence number (0–100%):
49
+
50
+ ```
51
+ HYPOTHESIS: You want a way to answer "how are we doing?" in standup, and "dashboard" was the convention that came to mind.
52
+ CONFIDENCE: ~30%
53
+ ```
54
+
55
+ The number forces honesty. If you wrote down a high number but can't actually predict the user's reactions to the next three questions you'd ask, the number is wrong. Start at the confidence level you can defend.
56
+
57
+ ### Step 2: Ask one question at a time, each with a guess attached
58
+
59
+ Format:
60
+
61
+ ```
62
+ Q: <one focused question>
63
+ GUESS: <your hypothesis for the answer, with the reasoning that produced it>
64
+ ```
65
+
66
+ Wait for the user to react before asking the next question.
67
+
68
+ **Why one at a time, not a batch:**
69
+
70
+ - The user can't react to your hypotheses if you bury them in a list
71
+ - Batches encourage skim-reading and surface answers
72
+ - The third question often depends on the answer to the first; asking them all at once locks in the wrong framing
73
+ - The user's energy for thinking carefully is finite; spend it one question at a time
74
+
75
+ **Why attach a guess:**
76
+
77
+ - The user reacts faster to a wrong guess than they generate an answer from scratch
78
+ - It commits you to a hypothesis you can be visibly wrong about, which keeps you honest
79
+ - It surfaces *your* assumptions, which is what the interview is meant to expose
80
+
81
+ The risk here is a polite user agreeing with your guess to be agreeable. Mitigate by being visibly willing to be wrong, and occasionally guess in a direction you expect the user to push back on.
82
+
83
+ ### Step 3: Listen for "want vs. should want"
84
+
85
+ The most dangerous answers are the ones where the user says what a thoughtful answer *sounds like* rather than what they actually want. Watch for:
86
+
87
+ - Answers that pattern-match best-practice talk ("I want it to be scalable", "clean architecture") without specifics
88
+ - Answers that defer to convention ("the way most apps do it", "the standard approach")
89
+ - Phrases like "I should probably…", "I think I'm supposed to…", "good engineering practice says…"
90
+ - Buzzwords as goals — when "modern", "scalable", "robust" are the answer instead of a specific outcome
91
+
92
+ When you hear these, the question to ask is:
93
+
94
+ > *"If you didn't have to justify this to anyone, what would you actually want?"*
95
+
96
+ That single question often does more work than the previous five.
97
+
98
+ ### Step 4: Restate intent in the user's own words
99
+
100
+ When your confidence is high, write back what you now think the user wants. Keep it tight (5–8 lines), use their language where possible, and structure it so the user can confirm or correct line by line:
101
+
102
+ ```
103
+ Here's what I now think you want:
104
+
105
+ - Outcome: <one line>
106
+ - User: <one line — who benefits>
107
+ - Why now: <one line — what changed>
108
+ - Success: <one line — how we know it worked>
109
+ - Constraint: <one line — the binding limit>
110
+ - Out of scope: <one line — what we're explicitly not doing>
111
+
112
+ Yes / no / refine?
113
+ ```
114
+
115
+ Including "Out of scope" is non-negotiable. Half of misalignment is silent disagreement about what is *not* being built.
116
+
117
+ ### Step 5: Confirm — explicit yes, not "whatever you think"
118
+
119
+ The gate is an explicit "yes." The following are **not** yes:
120
+
121
+ - "Whatever you think is best." → The user is delegating, which means they don't have 95% confidence either. Re-ask with two concrete options framed as a choice.
122
+ - "Sounds good." → Ambiguous. Ask: "Anything you'd refine?" Silence isn't confirmation.
123
+ - "Sure, let's go." → Often a polite exit, not an endorsement. Same follow-up.
124
+ - Silence followed by "okay let's start." → The user has given up on the interview, not converged. Stop and ask whether you've missed something.
125
+
126
+ If they correct you, fold the correction in and restate. Loop until you get an explicit yes.
127
+
128
+ ### The 95% Confidence Stop
129
+
130
+ You're done when you can answer yes to this:
131
+
132
+ > *Can I predict the user's reaction to the next three questions I would ask?*
133
+
134
+ If yes, you have shared understanding. Stop interviewing and produce the restate. If no, you're not done; ask the next question.
135
+
136
+ This is a checkable test, not a vibe. It also has a floor: if you've gone several rounds and still can't predict, that's information about the ask, not a reason to keep grinding. Stop and tell the user: "I've asked X questions and I still can't predict your reactions. Something foundational is missing. Want to step back?"
137
+
138
+ ## Output
139
+
140
+ The output of this skill is a **confirmed statement of intent**: the restate from Step 4, with an explicit yes from Step 5. That's the deliverable. Specs, plans, and task lists are downstream; they consume the intent this skill produces.
141
+
142
+ If the user wants the intent to persist (a multi-session project, a handoff to another collaborator), offer to save it to `docs/intent/[topic].md`. Only save if they confirm.
143
+
144
+ ## Example
145
+
146
+ A short before-and-after.
147
+
148
+ **Without `interview-me`:**
149
+
150
+ ```
151
+ User: build me a dashboard for our metrics
152
+ Agent: <starts proposing chart libraries and layouts>
153
+ ```
154
+
155
+ The agent has assumed: who it's for, what metrics, what "for our team" means, what success looks like. None of these are stated. Every assumption is a place the user can later say "that's not what I meant."
156
+
157
+ **With `interview-me`:**
158
+
159
+ ```
160
+ User: build me a dashboard for our metrics
161
+
162
+ Agent:
163
+ HYPOTHESIS: You want a way to answer "how are we doing?" in standup, and "dashboard" came to mind because that's the conventional answer.
164
+ CONFIDENCE: ~30%
165
+
166
+ Q: When you say "how are we doing?", who's asking — you alone, the engineering team in standup, or up the chain (e.g., your manager, an exec, a board)?
167
+ GUESS: engineering team in standup, because "we" usually scopes that way and standups are where this question gets asked. If it's for execs the metrics and the framing change a lot.
168
+
169
+ User: It's actually for me. I keep losing track of which experiments are running and what their early signal looks like.
170
+
171
+ Agent:
172
+ Updated read: not a team dashboard at all. It's a personal experiment tracker. Confidence: ~60%.
173
+
174
+ Q: Is the gap that you don't know which experiments exist, or that you can't see their results in one place?
175
+ GUESS: the second one. You have a list of experiments somewhere, but their results live in five different tools, and reconciling them by hand is what you're tired of.
176
+
177
+ User: First one actually. I literally don't have a list. They're spread across different docs.
178
+
179
+ Agent: <continues>
180
+ ```
181
+
182
+ Two questions in, the agent has discovered the actual ask isn't "a dashboard." It's "a list." Different artifact, different scope, different work. The dashboard would have been wrong.
183
+
184
+ ## Interaction with Other Skills
185
+
186
+ - **`idea-refine`**: downstream. If the confirmed intent is "I want X but I don't know how to scope it," hand off to `idea-refine` to generate variations against the now-explicit intent.
187
+ - **`spec-driven-development`**: downstream. If the confirmed intent is concrete ("I want X for Y users with Z success criteria"), hand off to `spec-driven-development` to write it down.
188
+ - **`planning-and-task-breakdown`**: two hops downstream of this skill (after the spec).
189
+ - **`doubt-driven-development`**: opposite end of the timeline. Interview-me is pre-decision intent extraction; doubt-driven is post-decision artifact review. Both catch divergence, but at different moments.
190
+ - **`source-driven-development`**: orthogonal. Interview-me clarifies what the user wants; SDD verifies framework facts. They don't compete.
191
+
192
+ ## Common Rationalizations
193
+
194
+ | Rationalization | Reality |
195
+ |---|---|
196
+ | "The ask is clear enough" | If you can't write the user's desired outcome in one sentence right now, the ask isn't clear. Run Step 1 before deciding. |
197
+ | "Asking too many questions wastes their time" | Time wasted by 4–6 targeted questions is small. Time wasted by building the wrong thing is enormous, and the user is the one bearing that cost. |
198
+ | "I'll figure it out as I build" | Switching costs after code exists are 10x what they are now. Discovery during implementation is rework. |
199
+ | "They said 'whatever you think,' so I should just decide" | "Whatever you think" is delegation, not decision. Re-ask with two concrete options as a choice. |
200
+ | "I should give them several options to pick from" | Options work when the user knows what they want and is choosing between trade-offs. They don't know what they want yet. Listing options widens the search; asking narrows it. |
201
+ | "If I attach my guess, I'm leading them" | Leading is the point. Reacting is faster than generating from scratch. The risk is sycophancy, not leading; mitigate by being visibly willing to be wrong. |
202
+ | "We've talked enough, I get it" | Test it: can you predict their reaction to the next three questions? If not, you don't get it yet. |
203
+ | "The user said yes, we're done" | If the yes followed a vague restate or an open-ended "sounds good," the yes is hollow. Restate concretely and re-confirm. |
204
+
205
+ ## Red Flags
206
+
207
+ - Three or more questions in a single message: that's batching, not interviewing
208
+ - A question without your hypothesis attached: that's surveying, not committing
209
+ - Accepting "whatever you think is best" as a terminal answer
210
+ - Producing a spec, plan, or task list before the user has explicitly confirmed your restate
211
+ - Questions framed as "what would be best practice?" instead of "what do you actually want?"
212
+ - The user gives a sophistication-signaling answer ("scalable", "clean", "modern") and you accept it without probing whether it's what they actually want
213
+ - Three or more rounds without your confidence visibly rising: you're asking the wrong questions, step back and reframe
214
+ - Saving the intent doc before the user has confirmed (the doc itself implies a yes the user didn't give)
215
+ - Skipping the "Out of scope" line in the restate (silent disagreement about non-goals is half of misalignment)
216
+
217
+ ## Verification
218
+
219
+ After applying interview-me, confirm:
220
+ - [ ] An explicit hypothesis with a confidence number was stated in the first turn.
221
+ - [ ] Questions were asked one at a time, each with the agent's guess attached.
222
+ - [ ] At least one "what would you actually want if you didn't have to justify it?" probe ran when the user gave a sophistication-signaling or convention-signaling answer.
223
+ - [ ] A concrete restate (Outcome / User / Why now / Success / Constraint / Out of scope) was written back to the user.
224
+ - [ ] The user confirmed the restate with an explicit yes (not "whatever you think," not "sounds good," not silence).
225
+ - [ ] At the stop point, the agent could predict reactions to the next three questions it would ask.
226
+ - [ ] Any handoff to a downstream skill (`idea-refine`, `spec-driven-development`) was framed in terms of the confirmed intent, not the original underspecified ask.
@@ -0,0 +1,270 @@
1
+ ---
2
+ name: planning-skill
3
+ description: Breaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.
4
+ hints: |
5
+ - Always write the plan to a markdown file (e.g. IMPLEMENTATION_PLAN.md) before coding.
6
+ - Break tasks into XS, S, or M sizes; never start an L or XL task without decomposing it further.
7
+ - If available, search the openSrc/ directory for open-source reference architectures to guide planning.
8
+ - Identify a clear verification step and acceptance criteria for every single task.
9
+ - STOP and wait for human approval of the implementation plan before starting code changes.
10
+ ---
11
+
12
+ # Planning and Task Breakdown
13
+
14
+ ## Overview
15
+
16
+ Decompose work into small, verifiable tasks with explicit acceptance criteria. Good task breakdown is the difference between an agent that completes work reliably and one that produces a tangled mess. Every task should be small enough to implement, test, and verify in a single focused session.
17
+
18
+ ## When to Use
19
+
20
+ - You have a spec and need to break it into implementable units
21
+ - A task feels too large or vague to start
22
+ - Work needs to be parallelized across multiple agents or sessions
23
+ - You need to communicate scope to a human
24
+ - The implementation order isn't obvious
25
+
26
+ **When NOT to use:** Single-file changes with obvious scope, or when the spec already contains well-defined tasks.
27
+
28
+ ## The Planning Process
29
+
30
+ ### Step 1: Enter Plan Mode
31
+
32
+ Before writing any code, operate in read-only mode:
33
+
34
+ - Run `list_template_docs` to see what structural constraints and project conventions exist.
35
+ - Run `get_template_doc` to retrieve any project-specific constraints from the `docs/` folder (such as design themes, API structures, or schemas).
36
+ - If an `openSrc/` directory is present in the workspace, inspect its reference repositories for high-quality architectural models or library integrations to guide your design.
37
+ - Read the spec and relevant codebase sections
38
+ - Identify existing patterns and conventions
39
+ - Map dependencies between components
40
+ - Note risks and unknowns
41
+
42
+ **Do NOT write code during planning.** The output MUST be a plan documented in a markdown file (e.g., `IMPLEMENTATION_PLAN.md`), not implementation.
43
+
44
+ ### Step 2: Identify the Dependency Graph
45
+
46
+ Map what depends on what:
47
+
48
+ ```
49
+ Database schema
50
+
51
+ ├── API models/types
52
+ │ │
53
+ │ ├── API endpoints
54
+ │ │ │
55
+ │ │ └── Frontend API client
56
+ │ │ │
57
+ │ │ └── UI components
58
+ │ │
59
+ │ └── Validation logic
60
+
61
+ └── Seed data / migrations
62
+ ```
63
+
64
+ Implementation order follows the dependency graph bottom-up: build foundations first.
65
+
66
+ ### Step 3: Slice Vertically
67
+
68
+ Instead of building all the database, then all the API, then all the UI — build one complete feature path at a time:
69
+
70
+ **Bad (horizontal slicing):**
71
+ ```
72
+ Task 1: Build entire database schema
73
+ Task 2: Build all API endpoints
74
+ Task 3: Build all UI components
75
+ Task 4: Connect everything
76
+ ```
77
+
78
+ **Good (vertical slicing):**
79
+ ```
80
+ Task 1: User can create an account (schema + API + UI for registration)
81
+ Task 2: User can log in (auth schema + API + UI for login)
82
+ Task 3: User can create a task (task schema + API + UI for creation)
83
+ Task 4: User can view task list (query + API + UI for list view)
84
+ ```
85
+
86
+ Each vertical slice delivers working, testable functionality.
87
+
88
+ ### Step 4: Write Tasks
89
+
90
+ Each task follows this structure:
91
+
92
+ ```markdown
93
+ ## Task [N]: [Short descriptive title]
94
+
95
+ **Description:** One paragraph explaining what this task accomplishes.
96
+
97
+ **Acceptance criteria:**
98
+ - [ ] [Specific, testable condition]
99
+ - [ ] [Specific, testable condition]
100
+
101
+ **Verification:**
102
+ - [ ] Tests pass: `npm test -- --grep "feature-name"`
103
+ - [ ] Build succeeds: `npm run build`
104
+ - [ ] Manual check: [description of what to verify]
105
+
106
+ **Dependencies:** [Task numbers this depends on, or "None"]
107
+
108
+ **Files likely touched:**
109
+ - `src/path/to/file.ts`
110
+ - `tests/path/to/test.ts`
111
+
112
+ **Estimated scope:** [Small: 1-2 files | Medium: 3-5 files | Large: 5+ files]
113
+ ```
114
+
115
+ ### Step 5: Order and Checkpoint
116
+
117
+ Arrange tasks so that:
118
+
119
+ 1. Dependencies are satisfied (build foundation first)
120
+ 2. Each task leaves the system in a working state
121
+ 3. Verification checkpoints occur after every 2-3 tasks
122
+ 4. High-risk tasks are early (fail fast)
123
+
124
+ Add explicit checkpoints:
125
+
126
+ ```markdown
127
+ ## Checkpoint: After Tasks 1-3
128
+ - [ ] All tests pass
129
+ - [ ] Application builds without errors
130
+ - [ ] Core user flow works end-to-end
131
+ - [ ] Review with human before proceeding
132
+
133
+ ### Step 6: Persist the Plan to a Markdown File
134
+
135
+ Always write your full plan to a markdown file in the project root before starting any implementation.
136
+
137
+ **Why?**
138
+ - **Durability:** Large language models have limited context windows. A written plan serves as external memory.
139
+ - **Collaboration:** Allows a human or another agent to review and approve the strategy.
140
+ - **Tracking:** You can check off tasks as you complete them, maintaining a clear state of progress.
141
+
142
+ **Recommended Path:** `IMPLEMENTATION_PLAN.md` in the project root.
143
+
144
+ ### Step 7: Initialize the Task Tracker (task.md)
145
+
146
+ For any non-trivial implementation, create a dedicated `task.md` file. While the `IMPLEMENTATION_PLAN.md` is for approval and architecture, `task.md` is for active execution.
147
+
148
+ **Format:**
149
+ ```markdown
150
+ # Task Tracker: [Feature Name]
151
+
152
+ - [ ] Task 1: [Title]
153
+ - [ ] Sub-task A
154
+ - [ ] Sub-task B
155
+ - [/] Task 2: [In Progress Task]
156
+ - [x] Task 3: [Completed Task]
157
+ ```
158
+
159
+ Copy the approved task list from your plan into `task.md`. This becomes your source of truth for "what's next."
160
+ ```
161
+
162
+ ## Task Sizing Guidelines
163
+
164
+ | Size | Files | Scope | Example |
165
+ |------|-------|-------|---------|
166
+ | **XS** | 1 | Single function or config change | Add a validation rule |
167
+ | **S** | 1-2 | One component or endpoint | Add a new API endpoint |
168
+ | **M** | 3-5 | One feature slice | User registration flow |
169
+ | **L** | 5-8 | Multi-component feature | Search with filtering and pagination |
170
+ | **XL** | 8+ | **Too large — break it down further** | — |
171
+
172
+ If a task is L or larger, it should be broken into smaller tasks. An agent performs best on S and M tasks.
173
+
174
+ **When to break a task down further:**
175
+ - It would take more than one focused session (roughly 2+ hours of agent work)
176
+ - You cannot describe the acceptance criteria in 3 or fewer bullet points
177
+ - It touches two or more independent subsystems (e.g., auth and billing)
178
+ - You find yourself writing "and" in the task title (a sign it is two tasks)
179
+
180
+ ## Plan Document Template
181
+
182
+ ```markdown
183
+ # Implementation Plan: [Feature/Project Name]
184
+
185
+ ## Overview
186
+ [One paragraph summary of what we're building]
187
+
188
+ ## Architecture Decisions
189
+ - [Key decision 1 and rationale]
190
+ - [Key decision 2 and rationale]
191
+
192
+ ## Task List
193
+
194
+ ### Phase 1: Foundation
195
+ - [ ] Task 1: ...
196
+ - [ ] Task 2: ...
197
+
198
+ ### Checkpoint: Foundation
199
+ - [ ] Tests pass, builds clean
200
+
201
+ ### Phase 2: Core Features
202
+ - [ ] Task 3: ...
203
+ - [ ] Task 4: ...
204
+
205
+ ### Checkpoint: Core Features
206
+ - [ ] End-to-end flow works
207
+
208
+ ### Phase 3: Polish
209
+ - [ ] Task 5: ...
210
+ - [ ] Task 6: ...
211
+
212
+ ### Checkpoint: Complete
213
+ - [ ] All acceptance criteria met
214
+ - [ ] Ready for review
215
+
216
+ ## Risks and Mitigations
217
+ | Risk | Impact | Mitigation |
218
+ |------|--------|------------|
219
+ | [Risk] | [High/Med/Low] | [Strategy] |
220
+
221
+ ## Open Questions
222
+ - [Question needing human input]
223
+ ```
224
+
225
+ ## Parallelization Opportunities
226
+
227
+ When multiple agents or sessions are available:
228
+
229
+ - **Safe to parallelize:** Independent feature slices, tests for already-implemented features, documentation
230
+ - **Must be sequential:** Database migrations, shared state changes, dependency chains
231
+ - **Needs coordination:** Features that share an API contract (define the contract first, then parallelize)
232
+
233
+ ## Common Rationalizations
234
+
235
+ | Rationalization | Reality |
236
+ |---|---|
237
+ | "I'll figure it out as I go" | That's how you end up with a tangled mess and rework. 10 minutes of planning saves hours. |
238
+ | "The tasks are obvious" | Write them down anyway. Explicit tasks surface hidden dependencies and forgotten edge cases. |
239
+ | "Planning is overhead" | Planning is the task. Implementation without a plan is just typing. |
240
+ | "I can hold it all in my head" | Context windows are finite. Written plans survive session boundaries and compaction. |
241
+
242
+ ## Red Flags
243
+
244
+ - Starting implementation without a written task list
245
+ - Tasks that say "implement the feature" without acceptance criteria
246
+ - No verification steps in the plan
247
+ - All tasks are XL-sized
248
+ - No checkpoints between tasks
249
+ - Dependency order isn't considered
250
+
251
+ ## Verification
252
+
253
+ Before starting implementation, confirm:
254
+
255
+ - [ ] Every task has acceptance criteria
256
+ - [ ] Every task has a verification step
257
+ - [ ] Task dependencies are identified and ordered correctly
258
+ - [ ] No task touches more than ~5 files
259
+ - [ ] Checkpoints exist between major phases
260
+ - [ ] The human has reviewed and approved the plan
261
+
262
+ ## Workflow
263
+ 1. **Context Loading:** Run `list_template_docs` and `get_template_doc` to retrieve project constraints.
264
+ 2. **Research:** Read relevant codebase sections and map the dependency graph.
265
+ 3. **Drafting:** Structure the work into small, vertically sliced tasks with acceptance criteria.
266
+ 4. **Persist:** Write the plan to `IMPLEMENTATION_PLAN.md` (or similar) in the project root.
267
+ 5. **Approval:** STOP and wait for human approval of the plan file.
268
+ 6. **Track:** Once approved, initialize `task.md` by copying the task list from the plan.
269
+ 7. **Execute:** Implement tasks one-by-one, marking progress in `task.md`. Update the human after major milestones.
270
+