@dragonflymcp/plugin 1.0.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 (666) hide show
  1. package/.claude-plugin/plugin.json +26 -0
  2. package/LICENSE +21 -0
  3. package/README.md +126 -0
  4. package/dist/core/annotations.d.ts +71 -0
  5. package/dist/core/annotations.d.ts.map +1 -0
  6. package/dist/core/annotations.js +61 -0
  7. package/dist/core/annotations.js.map +1 -0
  8. package/dist/core/config.d.ts +66 -0
  9. package/dist/core/config.d.ts.map +1 -0
  10. package/dist/core/config.js +131 -0
  11. package/dist/core/config.js.map +1 -0
  12. package/dist/core/dispatcher.d.ts +77 -0
  13. package/dist/core/dispatcher.d.ts.map +1 -0
  14. package/dist/core/dispatcher.js +132 -0
  15. package/dist/core/dispatcher.js.map +1 -0
  16. package/dist/core/server.d.ts +24 -0
  17. package/dist/core/server.d.ts.map +1 -0
  18. package/dist/core/server.js +41 -0
  19. package/dist/core/server.js.map +1 -0
  20. package/dist/core/store.d.ts +91 -0
  21. package/dist/core/store.d.ts.map +1 -0
  22. package/dist/core/store.js +157 -0
  23. package/dist/core/store.js.map +1 -0
  24. package/dist/core/types.d.ts +128 -0
  25. package/dist/core/types.d.ts.map +1 -0
  26. package/dist/core/types.js +5 -0
  27. package/dist/core/types.js.map +1 -0
  28. package/dist/index.d.ts +22 -0
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/index.js +81 -0
  31. package/dist/index.js.map +1 -0
  32. package/dist/test-utils/store-harness.d.ts +41 -0
  33. package/dist/test-utils/store-harness.d.ts.map +1 -0
  34. package/dist/test-utils/store-harness.js +61 -0
  35. package/dist/test-utils/store-harness.js.map +1 -0
  36. package/dist/tools/analytics/aggregators.d.ts +18 -0
  37. package/dist/tools/analytics/aggregators.d.ts.map +1 -0
  38. package/dist/tools/analytics/aggregators.js +260 -0
  39. package/dist/tools/analytics/aggregators.js.map +1 -0
  40. package/dist/tools/analytics/aggregators.test.d.ts +2 -0
  41. package/dist/tools/analytics/aggregators.test.d.ts.map +1 -0
  42. package/dist/tools/analytics/aggregators.test.js +177 -0
  43. package/dist/tools/analytics/aggregators.test.js.map +1 -0
  44. package/dist/tools/analytics/drift.d.ts +15 -0
  45. package/dist/tools/analytics/drift.d.ts.map +1 -0
  46. package/dist/tools/analytics/drift.js +135 -0
  47. package/dist/tools/analytics/drift.js.map +1 -0
  48. package/dist/tools/analytics/drift.test.d.ts +2 -0
  49. package/dist/tools/analytics/drift.test.d.ts.map +1 -0
  50. package/dist/tools/analytics/drift.test.js +99 -0
  51. package/dist/tools/analytics/drift.test.js.map +1 -0
  52. package/dist/tools/analytics/index.d.ts +10 -0
  53. package/dist/tools/analytics/index.d.ts.map +1 -0
  54. package/dist/tools/analytics/index.js +192 -0
  55. package/dist/tools/analytics/index.js.map +1 -0
  56. package/dist/tools/analytics/learner.d.ts +29 -0
  57. package/dist/tools/analytics/learner.d.ts.map +1 -0
  58. package/dist/tools/analytics/learner.js +135 -0
  59. package/dist/tools/analytics/learner.js.map +1 -0
  60. package/dist/tools/analytics/learner.test.d.ts +2 -0
  61. package/dist/tools/analytics/learner.test.d.ts.map +1 -0
  62. package/dist/tools/analytics/learner.test.js +118 -0
  63. package/dist/tools/analytics/learner.test.js.map +1 -0
  64. package/dist/tools/analytics/observe.d.ts +22 -0
  65. package/dist/tools/analytics/observe.d.ts.map +1 -0
  66. package/dist/tools/analytics/observe.js +143 -0
  67. package/dist/tools/analytics/observe.js.map +1 -0
  68. package/dist/tools/analytics/observe.test.d.ts +2 -0
  69. package/dist/tools/analytics/observe.test.d.ts.map +1 -0
  70. package/dist/tools/analytics/observe.test.js +95 -0
  71. package/dist/tools/analytics/observe.test.js.map +1 -0
  72. package/dist/tools/analytics/store.d.ts +29 -0
  73. package/dist/tools/analytics/store.d.ts.map +1 -0
  74. package/dist/tools/analytics/store.js +192 -0
  75. package/dist/tools/analytics/store.js.map +1 -0
  76. package/dist/tools/analytics/types.d.ts +290 -0
  77. package/dist/tools/analytics/types.d.ts.map +1 -0
  78. package/dist/tools/analytics/types.js +7 -0
  79. package/dist/tools/analytics/types.js.map +1 -0
  80. package/dist/tools/ast/index.d.ts +8 -0
  81. package/dist/tools/ast/index.d.ts.map +1 -0
  82. package/dist/tools/ast/index.js +242 -0
  83. package/dist/tools/ast/index.js.map +1 -0
  84. package/dist/tools/ast/indexer.d.ts +41 -0
  85. package/dist/tools/ast/indexer.d.ts.map +1 -0
  86. package/dist/tools/ast/indexer.js +617 -0
  87. package/dist/tools/ast/indexer.js.map +1 -0
  88. package/dist/tools/ast/store.d.ts +87 -0
  89. package/dist/tools/ast/store.d.ts.map +1 -0
  90. package/dist/tools/ast/store.js +280 -0
  91. package/dist/tools/ast/store.js.map +1 -0
  92. package/dist/tools/ast/store.test.d.ts +6 -0
  93. package/dist/tools/ast/store.test.d.ts.map +1 -0
  94. package/dist/tools/ast/store.test.js +257 -0
  95. package/dist/tools/ast/store.test.js.map +1 -0
  96. package/dist/tools/bridge/bridge.d.ts +37 -0
  97. package/dist/tools/bridge/bridge.d.ts.map +1 -0
  98. package/dist/tools/bridge/bridge.js +82 -0
  99. package/dist/tools/bridge/bridge.js.map +1 -0
  100. package/dist/tools/bridge/bridge.test.d.ts +2 -0
  101. package/dist/tools/bridge/bridge.test.d.ts.map +1 -0
  102. package/dist/tools/bridge/bridge.test.js +119 -0
  103. package/dist/tools/bridge/bridge.test.js.map +1 -0
  104. package/dist/tools/bridge/index.d.ts +8 -0
  105. package/dist/tools/bridge/index.d.ts.map +1 -0
  106. package/dist/tools/bridge/index.js +153 -0
  107. package/dist/tools/bridge/index.js.map +1 -0
  108. package/dist/tools/bridge/store.d.ts +45 -0
  109. package/dist/tools/bridge/store.d.ts.map +1 -0
  110. package/dist/tools/bridge/store.js +307 -0
  111. package/dist/tools/bridge/store.js.map +1 -0
  112. package/dist/tools/bridge/store.test.d.ts +2 -0
  113. package/dist/tools/bridge/store.test.d.ts.map +1 -0
  114. package/dist/tools/bridge/store.test.js +180 -0
  115. package/dist/tools/bridge/store.test.js.map +1 -0
  116. package/dist/tools/bridge/types.d.ts +44 -0
  117. package/dist/tools/bridge/types.d.ts.map +1 -0
  118. package/dist/tools/bridge/types.js +6 -0
  119. package/dist/tools/bridge/types.js.map +1 -0
  120. package/dist/tools/evolve/algorithm.d.ts +33 -0
  121. package/dist/tools/evolve/algorithm.d.ts.map +1 -0
  122. package/dist/tools/evolve/algorithm.js +64 -0
  123. package/dist/tools/evolve/algorithm.js.map +1 -0
  124. package/dist/tools/evolve/algorithm.test.d.ts +6 -0
  125. package/dist/tools/evolve/algorithm.test.d.ts.map +1 -0
  126. package/dist/tools/evolve/algorithm.test.js +138 -0
  127. package/dist/tools/evolve/algorithm.test.js.map +1 -0
  128. package/dist/tools/evolve/index.d.ts +11 -0
  129. package/dist/tools/evolve/index.d.ts.map +1 -0
  130. package/dist/tools/evolve/index.js +300 -0
  131. package/dist/tools/evolve/index.js.map +1 -0
  132. package/dist/tools/evolve/store.d.ts +27 -0
  133. package/dist/tools/evolve/store.d.ts.map +1 -0
  134. package/dist/tools/evolve/store.js +147 -0
  135. package/dist/tools/evolve/store.js.map +1 -0
  136. package/dist/tools/evolve/store.test.d.ts +6 -0
  137. package/dist/tools/evolve/store.test.d.ts.map +1 -0
  138. package/dist/tools/evolve/store.test.js +162 -0
  139. package/dist/tools/evolve/store.test.js.map +1 -0
  140. package/dist/tools/evolve/types.d.ts +38 -0
  141. package/dist/tools/evolve/types.d.ts.map +1 -0
  142. package/dist/tools/evolve/types.js +6 -0
  143. package/dist/tools/evolve/types.js.map +1 -0
  144. package/dist/tools/framework/content-loader.d.ts +45 -0
  145. package/dist/tools/framework/content-loader.d.ts.map +1 -0
  146. package/dist/tools/framework/content-loader.js +258 -0
  147. package/dist/tools/framework/content-loader.js.map +1 -0
  148. package/dist/tools/framework/content-loader.test.d.ts +5 -0
  149. package/dist/tools/framework/content-loader.test.d.ts.map +1 -0
  150. package/dist/tools/framework/content-loader.test.js +262 -0
  151. package/dist/tools/framework/content-loader.test.js.map +1 -0
  152. package/dist/tools/framework/index.d.ts +30 -0
  153. package/dist/tools/framework/index.d.ts.map +1 -0
  154. package/dist/tools/framework/index.js +517 -0
  155. package/dist/tools/framework/index.js.map +1 -0
  156. package/dist/tools/framework/session.d.ts +85 -0
  157. package/dist/tools/framework/session.d.ts.map +1 -0
  158. package/dist/tools/framework/session.js +311 -0
  159. package/dist/tools/framework/session.js.map +1 -0
  160. package/dist/tools/framework/session.test.d.ts +5 -0
  161. package/dist/tools/framework/session.test.d.ts.map +1 -0
  162. package/dist/tools/framework/session.test.js +291 -0
  163. package/dist/tools/framework/session.test.js.map +1 -0
  164. package/dist/tools/framework/sync-evaluator.d.ts +41 -0
  165. package/dist/tools/framework/sync-evaluator.d.ts.map +1 -0
  166. package/dist/tools/framework/sync-evaluator.js +298 -0
  167. package/dist/tools/framework/sync-evaluator.js.map +1 -0
  168. package/dist/tools/framework/sync-evaluator.test.d.ts +5 -0
  169. package/dist/tools/framework/sync-evaluator.test.d.ts.map +1 -0
  170. package/dist/tools/framework/sync-evaluator.test.js +288 -0
  171. package/dist/tools/framework/sync-evaluator.test.js.map +1 -0
  172. package/dist/tools/framework/types.d.ts +279 -0
  173. package/dist/tools/framework/types.d.ts.map +1 -0
  174. package/dist/tools/framework/types.js +6 -0
  175. package/dist/tools/framework/types.js.map +1 -0
  176. package/dist/tools/framework/workflow-intelligence.d.ts +55 -0
  177. package/dist/tools/framework/workflow-intelligence.d.ts.map +1 -0
  178. package/dist/tools/framework/workflow-intelligence.js +199 -0
  179. package/dist/tools/framework/workflow-intelligence.js.map +1 -0
  180. package/dist/tools/framework/workflow-intelligence.test.d.ts +6 -0
  181. package/dist/tools/framework/workflow-intelligence.test.d.ts.map +1 -0
  182. package/dist/tools/framework/workflow-intelligence.test.js +257 -0
  183. package/dist/tools/framework/workflow-intelligence.test.js.map +1 -0
  184. package/dist/tools/framework/workflow-planner.d.ts +10 -0
  185. package/dist/tools/framework/workflow-planner.d.ts.map +1 -0
  186. package/dist/tools/framework/workflow-planner.js +214 -0
  187. package/dist/tools/framework/workflow-planner.js.map +1 -0
  188. package/dist/tools/framework/workflow-planner.test.d.ts +5 -0
  189. package/dist/tools/framework/workflow-planner.test.d.ts.map +1 -0
  190. package/dist/tools/framework/workflow-planner.test.js +137 -0
  191. package/dist/tools/framework/workflow-planner.test.js.map +1 -0
  192. package/dist/tools/knowledge/bridge.d.ts +34 -0
  193. package/dist/tools/knowledge/bridge.d.ts.map +1 -0
  194. package/dist/tools/knowledge/bridge.js +249 -0
  195. package/dist/tools/knowledge/bridge.js.map +1 -0
  196. package/dist/tools/knowledge/bridge.test.d.ts +5 -0
  197. package/dist/tools/knowledge/bridge.test.d.ts.map +1 -0
  198. package/dist/tools/knowledge/bridge.test.js +221 -0
  199. package/dist/tools/knowledge/bridge.test.js.map +1 -0
  200. package/dist/tools/knowledge/extractor.d.ts +22 -0
  201. package/dist/tools/knowledge/extractor.d.ts.map +1 -0
  202. package/dist/tools/knowledge/extractor.js +154 -0
  203. package/dist/tools/knowledge/extractor.js.map +1 -0
  204. package/dist/tools/knowledge/index.d.ts +12 -0
  205. package/dist/tools/knowledge/index.d.ts.map +1 -0
  206. package/dist/tools/knowledge/index.js +505 -0
  207. package/dist/tools/knowledge/index.js.map +1 -0
  208. package/dist/tools/knowledge/retrieval.d.ts +28 -0
  209. package/dist/tools/knowledge/retrieval.d.ts.map +1 -0
  210. package/dist/tools/knowledge/retrieval.js +164 -0
  211. package/dist/tools/knowledge/retrieval.js.map +1 -0
  212. package/dist/tools/knowledge/store.d.ts +96 -0
  213. package/dist/tools/knowledge/store.d.ts.map +1 -0
  214. package/dist/tools/knowledge/store.js +562 -0
  215. package/dist/tools/knowledge/store.js.map +1 -0
  216. package/dist/tools/knowledge/store.test.d.ts +6 -0
  217. package/dist/tools/knowledge/store.test.d.ts.map +1 -0
  218. package/dist/tools/knowledge/store.test.js +385 -0
  219. package/dist/tools/knowledge/store.test.js.map +1 -0
  220. package/dist/tools/knowledge/types.d.ts +168 -0
  221. package/dist/tools/knowledge/types.d.ts.map +1 -0
  222. package/dist/tools/knowledge/types.js +6 -0
  223. package/dist/tools/knowledge/types.js.map +1 -0
  224. package/dist/tools/memory/evolution.d.ts +31 -0
  225. package/dist/tools/memory/evolution.d.ts.map +1 -0
  226. package/dist/tools/memory/evolution.js +130 -0
  227. package/dist/tools/memory/evolution.js.map +1 -0
  228. package/dist/tools/memory/index.d.ts +11 -0
  229. package/dist/tools/memory/index.d.ts.map +1 -0
  230. package/dist/tools/memory/index.js +239 -0
  231. package/dist/tools/memory/index.js.map +1 -0
  232. package/dist/tools/memory/store.d.ts +75 -0
  233. package/dist/tools/memory/store.d.ts.map +1 -0
  234. package/dist/tools/memory/store.js +398 -0
  235. package/dist/tools/memory/store.js.map +1 -0
  236. package/dist/tools/memory/store.test.d.ts +6 -0
  237. package/dist/tools/memory/store.test.d.ts.map +1 -0
  238. package/dist/tools/memory/store.test.js +429 -0
  239. package/dist/tools/memory/store.test.js.map +1 -0
  240. package/dist/tools/memory/types.d.ts +171 -0
  241. package/dist/tools/memory/types.d.ts.map +1 -0
  242. package/dist/tools/memory/types.js +6 -0
  243. package/dist/tools/memory/types.js.map +1 -0
  244. package/dist/tools/pipeline/composer.d.ts +29 -0
  245. package/dist/tools/pipeline/composer.d.ts.map +1 -0
  246. package/dist/tools/pipeline/composer.js +225 -0
  247. package/dist/tools/pipeline/composer.js.map +1 -0
  248. package/dist/tools/pipeline/composer.test.d.ts +2 -0
  249. package/dist/tools/pipeline/composer.test.d.ts.map +1 -0
  250. package/dist/tools/pipeline/composer.test.js +162 -0
  251. package/dist/tools/pipeline/composer.test.js.map +1 -0
  252. package/dist/tools/pipeline/index.d.ts +8 -0
  253. package/dist/tools/pipeline/index.d.ts.map +1 -0
  254. package/dist/tools/pipeline/index.js +102 -0
  255. package/dist/tools/pipeline/index.js.map +1 -0
  256. package/dist/tools/pipeline/planner.d.ts +10 -0
  257. package/dist/tools/pipeline/planner.d.ts.map +1 -0
  258. package/dist/tools/pipeline/planner.js +147 -0
  259. package/dist/tools/pipeline/planner.js.map +1 -0
  260. package/dist/tools/pipeline/planner.test.d.ts +2 -0
  261. package/dist/tools/pipeline/planner.test.d.ts.map +1 -0
  262. package/dist/tools/pipeline/planner.test.js +96 -0
  263. package/dist/tools/pipeline/planner.test.js.map +1 -0
  264. package/dist/tools/pipeline/preconditions.d.ts +14 -0
  265. package/dist/tools/pipeline/preconditions.d.ts.map +1 -0
  266. package/dist/tools/pipeline/preconditions.js +65 -0
  267. package/dist/tools/pipeline/preconditions.js.map +1 -0
  268. package/dist/tools/pipeline/preconditions.test.d.ts +2 -0
  269. package/dist/tools/pipeline/preconditions.test.d.ts.map +1 -0
  270. package/dist/tools/pipeline/preconditions.test.js +74 -0
  271. package/dist/tools/pipeline/preconditions.test.js.map +1 -0
  272. package/dist/tools/pipeline/types.d.ts +105 -0
  273. package/dist/tools/pipeline/types.d.ts.map +1 -0
  274. package/dist/tools/pipeline/types.js +6 -0
  275. package/dist/tools/pipeline/types.js.map +1 -0
  276. package/dist/tools/repair/index.d.ts +8 -0
  277. package/dist/tools/repair/index.d.ts.map +1 -0
  278. package/dist/tools/repair/index.js +384 -0
  279. package/dist/tools/repair/index.js.map +1 -0
  280. package/dist/tools/repair/repairer.d.ts +67 -0
  281. package/dist/tools/repair/repairer.d.ts.map +1 -0
  282. package/dist/tools/repair/repairer.js +257 -0
  283. package/dist/tools/repair/repairer.js.map +1 -0
  284. package/dist/tools/repair/repairer.test.d.ts +6 -0
  285. package/dist/tools/repair/repairer.test.d.ts.map +1 -0
  286. package/dist/tools/repair/repairer.test.js +159 -0
  287. package/dist/tools/repair/repairer.test.js.map +1 -0
  288. package/dist/tools/semantic/chunker.d.ts +23 -0
  289. package/dist/tools/semantic/chunker.d.ts.map +1 -0
  290. package/dist/tools/semantic/chunker.js +244 -0
  291. package/dist/tools/semantic/chunker.js.map +1 -0
  292. package/dist/tools/semantic/embedder.d.ts +16 -0
  293. package/dist/tools/semantic/embedder.d.ts.map +1 -0
  294. package/dist/tools/semantic/embedder.js +88 -0
  295. package/dist/tools/semantic/embedder.js.map +1 -0
  296. package/dist/tools/semantic/index.d.ts +8 -0
  297. package/dist/tools/semantic/index.d.ts.map +1 -0
  298. package/dist/tools/semantic/index.js +144 -0
  299. package/dist/tools/semantic/index.js.map +1 -0
  300. package/dist/tools/semantic/store.d.ts +31 -0
  301. package/dist/tools/semantic/store.d.ts.map +1 -0
  302. package/dist/tools/semantic/store.js +168 -0
  303. package/dist/tools/semantic/store.js.map +1 -0
  304. package/dist/tools/semantic/store.test.d.ts +6 -0
  305. package/dist/tools/semantic/store.test.d.ts.map +1 -0
  306. package/dist/tools/semantic/store.test.js +240 -0
  307. package/dist/tools/semantic/store.test.js.map +1 -0
  308. package/dist/tools/spec/generator.d.ts +32 -0
  309. package/dist/tools/spec/generator.d.ts.map +1 -0
  310. package/dist/tools/spec/generator.js +278 -0
  311. package/dist/tools/spec/generator.js.map +1 -0
  312. package/dist/tools/spec/generator.test.d.ts +6 -0
  313. package/dist/tools/spec/generator.test.d.ts.map +1 -0
  314. package/dist/tools/spec/generator.test.js +208 -0
  315. package/dist/tools/spec/generator.test.js.map +1 -0
  316. package/dist/tools/spec/index.d.ts +11 -0
  317. package/dist/tools/spec/index.d.ts.map +1 -0
  318. package/dist/tools/spec/index.js +426 -0
  319. package/dist/tools/spec/index.js.map +1 -0
  320. package/dist/tools/spec/store.d.ts +24 -0
  321. package/dist/tools/spec/store.d.ts.map +1 -0
  322. package/dist/tools/spec/store.js +104 -0
  323. package/dist/tools/spec/store.js.map +1 -0
  324. package/dist/tools/spec/store.test.d.ts +6 -0
  325. package/dist/tools/spec/store.test.d.ts.map +1 -0
  326. package/dist/tools/spec/store.test.js +173 -0
  327. package/dist/tools/spec/store.test.js.map +1 -0
  328. package/dist/tools/spec/types.d.ts +61 -0
  329. package/dist/tools/spec/types.d.ts.map +1 -0
  330. package/dist/tools/spec/types.js +6 -0
  331. package/dist/tools/spec/types.js.map +1 -0
  332. package/dist/tools/state/index.d.ts +11 -0
  333. package/dist/tools/state/index.d.ts.map +1 -0
  334. package/dist/tools/state/index.js +386 -0
  335. package/dist/tools/state/index.js.map +1 -0
  336. package/dist/tools/state/migrate.d.ts +39 -0
  337. package/dist/tools/state/migrate.d.ts.map +1 -0
  338. package/dist/tools/state/migrate.js +242 -0
  339. package/dist/tools/state/migrate.js.map +1 -0
  340. package/dist/tools/state/migrate.test.d.ts +2 -0
  341. package/dist/tools/state/migrate.test.d.ts.map +1 -0
  342. package/dist/tools/state/migrate.test.js +265 -0
  343. package/dist/tools/state/migrate.test.js.map +1 -0
  344. package/dist/tools/state/store.d.ts +107 -0
  345. package/dist/tools/state/store.d.ts.map +1 -0
  346. package/dist/tools/state/store.js +365 -0
  347. package/dist/tools/state/store.js.map +1 -0
  348. package/dist/tools/state/store.test.d.ts +5 -0
  349. package/dist/tools/state/store.test.d.ts.map +1 -0
  350. package/dist/tools/state/store.test.js +293 -0
  351. package/dist/tools/state/store.test.js.map +1 -0
  352. package/dist/tools/state/types.d.ts +90 -0
  353. package/dist/tools/state/types.d.ts.map +1 -0
  354. package/dist/tools/state/types.js +6 -0
  355. package/dist/tools/state/types.js.map +1 -0
  356. package/dist/tools/testing/analyzer.d.ts +44 -0
  357. package/dist/tools/testing/analyzer.d.ts.map +1 -0
  358. package/dist/tools/testing/analyzer.js +280 -0
  359. package/dist/tools/testing/analyzer.js.map +1 -0
  360. package/dist/tools/testing/generator.d.ts +57 -0
  361. package/dist/tools/testing/generator.d.ts.map +1 -0
  362. package/dist/tools/testing/generator.js +478 -0
  363. package/dist/tools/testing/generator.js.map +1 -0
  364. package/dist/tools/testing/generator.test.d.ts +6 -0
  365. package/dist/tools/testing/generator.test.d.ts.map +1 -0
  366. package/dist/tools/testing/generator.test.js +285 -0
  367. package/dist/tools/testing/generator.test.js.map +1 -0
  368. package/dist/tools/testing/index.d.ts +8 -0
  369. package/dist/tools/testing/index.d.ts.map +1 -0
  370. package/dist/tools/testing/index.js +373 -0
  371. package/dist/tools/testing/index.js.map +1 -0
  372. package/dist/utils/embedder.d.ts +7 -0
  373. package/dist/utils/embedder.d.ts.map +1 -0
  374. package/dist/utils/embedder.js +13 -0
  375. package/dist/utils/embedder.js.map +1 -0
  376. package/dist/utils/execution.d.ts +68 -0
  377. package/dist/utils/execution.d.ts.map +1 -0
  378. package/dist/utils/execution.js +467 -0
  379. package/dist/utils/execution.js.map +1 -0
  380. package/dist/utils/graph.d.ts +26 -0
  381. package/dist/utils/graph.d.ts.map +1 -0
  382. package/dist/utils/graph.js +32 -0
  383. package/dist/utils/graph.js.map +1 -0
  384. package/dist/utils/guards.d.ts +32 -0
  385. package/dist/utils/guards.d.ts.map +1 -0
  386. package/dist/utils/guards.js +40 -0
  387. package/dist/utils/guards.js.map +1 -0
  388. package/dist/utils/ids.d.ts +5 -0
  389. package/dist/utils/ids.d.ts.map +1 -0
  390. package/dist/utils/ids.js +7 -0
  391. package/dist/utils/ids.js.map +1 -0
  392. package/dist/utils/languages.d.ts +34 -0
  393. package/dist/utils/languages.d.ts.map +1 -0
  394. package/dist/utils/languages.js +153 -0
  395. package/dist/utils/languages.js.map +1 -0
  396. package/dist/utils/lazy.d.ts +17 -0
  397. package/dist/utils/lazy.d.ts.map +1 -0
  398. package/dist/utils/lazy.js +35 -0
  399. package/dist/utils/lazy.js.map +1 -0
  400. package/dist/utils/project.d.ts +41 -0
  401. package/dist/utils/project.d.ts.map +1 -0
  402. package/dist/utils/project.js +82 -0
  403. package/dist/utils/project.js.map +1 -0
  404. package/dist/utils/responses.d.ts +27 -0
  405. package/dist/utils/responses.d.ts.map +1 -0
  406. package/dist/utils/responses.js +72 -0
  407. package/dist/utils/responses.js.map +1 -0
  408. package/dist/utils/vectors.d.ts +33 -0
  409. package/dist/utils/vectors.d.ts.map +1 -0
  410. package/dist/utils/vectors.js +80 -0
  411. package/dist/utils/vectors.js.map +1 -0
  412. package/dist/utils/vectors.test.d.ts +6 -0
  413. package/dist/utils/vectors.test.d.ts.map +1 -0
  414. package/dist/utils/vectors.test.js +96 -0
  415. package/dist/utils/vectors.test.js.map +1 -0
  416. package/package.json +69 -0
  417. package/scripts/init.js +142 -0
  418. package/templates/CLAUDE.md.template +96 -0
  419. package/templates/agents/architecture-concept.md +237 -0
  420. package/templates/agents/checkpoint-concept.md +218 -0
  421. package/templates/agents/code-analysis-concept.md +171 -0
  422. package/templates/agents/compete-control.md +44 -0
  423. package/templates/agents/compete-evaluator.md +87 -0
  424. package/templates/agents/compete-treatment.md +55 -0
  425. package/templates/agents/context-concept.md +254 -0
  426. package/templates/agents/debate-advocate.md +127 -0
  427. package/templates/agents/debate-critic.md +119 -0
  428. package/templates/agents/debate-synthesis.md +160 -0
  429. package/templates/agents/documentation-concept.md +294 -0
  430. package/templates/agents/implementation-concept.md +165 -0
  431. package/templates/agents/quality-concept.md +299 -0
  432. package/templates/agents/research-concept.md +169 -0
  433. package/templates/agents/security-concept.md +255 -0
  434. package/templates/agents/story-concept.md +207 -0
  435. package/templates/agents/verification-concept.md +456 -0
  436. package/templates/agents/version-concept.md +163 -0
  437. package/templates/anchors/directory.anchor.yaml.template +53 -0
  438. package/templates/anchors/rules.anchor.yaml.template +70 -0
  439. package/templates/anchors/safety.anchor.yaml.template +96 -0
  440. package/templates/claude-md-managed.template +105 -0
  441. package/templates/commands/cache.md.template +439 -0
  442. package/templates/commands/checkpoint.md.template +121 -0
  443. package/templates/commands/classify.md.template +138 -0
  444. package/templates/commands/compete.md.template +90 -0
  445. package/templates/commands/costs.md.template +111 -0
  446. package/templates/commands/estimate.md.template +196 -0
  447. package/templates/commands/explore.md.template +186 -0
  448. package/templates/commands/feature.md.template +216 -0
  449. package/templates/commands/forget.md.template +104 -0
  450. package/templates/commands/global-recall.md.template +250 -0
  451. package/templates/commands/global-remember.md.template +187 -0
  452. package/templates/commands/health.md.template +107 -0
  453. package/templates/commands/help.md.template +253 -0
  454. package/templates/commands/observe.md.template +211 -0
  455. package/templates/commands/pr-review.md.template +164 -0
  456. package/templates/commands/predict-cost.md.template +251 -0
  457. package/templates/commands/profile.md.template +142 -0
  458. package/templates/commands/reasoning.md.template +228 -0
  459. package/templates/commands/recall.md.template +197 -0
  460. package/templates/commands/remember.md.template +148 -0
  461. package/templates/commands/replay.md.template +449 -0
  462. package/templates/commands/restore.md.template +87 -0
  463. package/templates/commands/retrospective.md.template +47 -0
  464. package/templates/commands/slo.md.template +286 -0
  465. package/templates/commands/spec.md.template +164 -0
  466. package/templates/commands/status.md.template +53 -0
  467. package/templates/commands/sync.md.template +321 -0
  468. package/templates/commands/task.md.template +86 -0
  469. package/templates/commands/trace.md.template +86 -0
  470. package/templates/commands/visualize.md.template +216 -0
  471. package/templates/commands/workflow.md.template +375 -0
  472. package/templates/concepts/README.md +329 -0
  473. package/templates/concepts/architecture.md.template +74 -0
  474. package/templates/concepts/code-analysis.md.template +186 -0
  475. package/templates/concepts/context-compactor.md.template +393 -0
  476. package/templates/concepts/context.md.template +62 -0
  477. package/templates/concepts/documentation.md.template +452 -0
  478. package/templates/concepts/estimator.md.template +214 -0
  479. package/templates/concepts/exploration.md.template +257 -0
  480. package/templates/concepts/global-memory.md.template +222 -0
  481. package/templates/concepts/implementation.md.template +62 -0
  482. package/templates/concepts/pr-review.md.template +277 -0
  483. package/templates/concepts/project-profile.md.template +358 -0
  484. package/templates/concepts/quality.md.template +63 -0
  485. package/templates/concepts/react-fallback.md.template +286 -0
  486. package/templates/concepts/research.md.template +221 -0
  487. package/templates/concepts/retrospective.md.template +93 -0
  488. package/templates/concepts/security.md.template +442 -0
  489. package/templates/concepts/slo.md.template +274 -0
  490. package/templates/concepts/spec.md.template +71 -0
  491. package/templates/concepts/story.md.template +50 -0
  492. package/templates/concepts/tool-router.md.template +289 -0
  493. package/templates/concepts/verification-synthesizer.md.template +279 -0
  494. package/templates/concepts/version.md.template +61 -0
  495. package/templates/config.yaml.template +347 -0
  496. package/templates/examples/README.md +77 -0
  497. package/templates/examples/architecture/api-design.yaml.template +286 -0
  498. package/templates/examples/architecture/oauth-authentication.yaml.template +305 -0
  499. package/templates/health/status.yaml.template +120 -0
  500. package/templates/hooks/concept-complete.sh.template +45 -0
  501. package/templates/hooks/lib/common.sh.template +160 -0
  502. package/templates/hooks/post-commit.sh.template +37 -0
  503. package/templates/hooks/post-concept-action.template +39 -0
  504. package/templates/hooks/post-tool-structure-check.sh.template +138 -0
  505. package/templates/hooks/post-tool-use.sh.template +51 -0
  506. package/templates/hooks/pre-compact.sh.template +48 -0
  507. package/templates/hooks/pre-tool-grounding.template +148 -0
  508. package/templates/hooks/session-exit-checkpoint.sh.template +35 -0
  509. package/templates/hooks/session-start.sh.template +67 -0
  510. package/templates/hooks/statusline.sh.template +148 -0
  511. package/templates/hooks/stop.sh.template +45 -0
  512. package/templates/hooks/subagent-stop.sh.template +40 -0
  513. package/templates/hooks/sync-blocked.sh.template +45 -0
  514. package/templates/hooks/timeout.sh.template +48 -0
  515. package/templates/hooks/user-prompt-submit.sh.template +68 -0
  516. package/templates/koan/README.md +58 -0
  517. package/templates/memory/index.yaml.template +48 -0
  518. package/templates/memory/procedural/debugging.yaml.template +24 -0
  519. package/templates/memory/procedural/workflows.yaml.template +22 -0
  520. package/templates/memory/semantic/architecture.yaml.template +21 -0
  521. package/templates/memory/semantic/conventions.yaml.template +18 -0
  522. package/templates/memory/semantic/patterns.yaml.template +21 -0
  523. package/templates/memory/semantic/preferences.yaml.template +18 -0
  524. package/templates/prompts/architecture.yaml.template +349 -0
  525. package/templates/prompts/context.yaml.template +384 -0
  526. package/templates/prompts/implementation.yaml.template +365 -0
  527. package/templates/prompts/planning.yaml.template +303 -0
  528. package/templates/prompts/quality.yaml.template +345 -0
  529. package/templates/prompts/retrospective.yaml.template +231 -0
  530. package/templates/prompts/slo.yaml.template +360 -0
  531. package/templates/prompts/story.yaml.template +236 -0
  532. package/templates/prompts/tree-of-thoughts.yaml.template +299 -0
  533. package/templates/prompts/verification.yaml.template +286 -0
  534. package/templates/prompts/version.yaml.template +279 -0
  535. package/templates/schemas/agent-schema.json +98 -0
  536. package/templates/schemas/architecture.schema.json +69 -0
  537. package/templates/schemas/config-schema.json +165 -0
  538. package/templates/schemas/implementation.schema.json +75 -0
  539. package/templates/schemas/planning.schema.json +243 -0
  540. package/templates/schemas/provenance.schema.json +111 -0
  541. package/templates/schemas/retrospective.schema.json +174 -0
  542. package/templates/schemas/review.schema.json +284 -0
  543. package/templates/schemas/slo.schema.json +443 -0
  544. package/templates/schemas/story.schema.json +68 -0
  545. package/templates/schemas/sync-schema.json +196 -0
  546. package/templates/schemas/task.schema.json +127 -0
  547. package/templates/schemas/tree-of-thoughts.schema.json +175 -0
  548. package/templates/schemas/verification.schema.json +106 -0
  549. package/templates/settings.full.json.template +135 -0
  550. package/templates/settings.minimal.json.template +68 -0
  551. package/templates/settings.standard.json.template +135 -0
  552. package/templates/skills/acceptance-criteria-generation.md.template +330 -0
  553. package/templates/skills/accessibility-checking.md.template +341 -0
  554. package/templates/skills/api-design-patterns.md.template +395 -0
  555. package/templates/skills/batch-processing.md.template +605 -0
  556. package/templates/skills/branch-strategy.md.template +362 -0
  557. package/templates/skills/changelog-generation.md.template +403 -0
  558. package/templates/skills/code-coverage-analysis.md.template +362 -0
  559. package/templates/skills/code-style-enforcement.md.template +294 -0
  560. package/templates/skills/code-template-patterns.md.template +419 -0
  561. package/templates/skills/concept-development.md.template +159 -0
  562. package/templates/skills/context-prioritization.md.template +306 -0
  563. package/templates/skills/cost-optimization.md.template +482 -0
  564. package/templates/skills/cross-project-knowledge.md.template +316 -0
  565. package/templates/skills/dependency-impact-analysis.md.template +263 -0
  566. package/templates/skills/documentation-generation.md.template +409 -0
  567. package/templates/skills/effort-estimation.md.template +350 -0
  568. package/templates/skills/error-classification.md.template +709 -0
  569. package/templates/skills/error-messages.md.template +339 -0
  570. package/templates/skills/ide-diagnostics.md.template +480 -0
  571. package/templates/skills/incremental-loading.md.template +574 -0
  572. package/templates/skills/output-caching.md.template +524 -0
  573. package/templates/skills/performance-estimation.md.template +325 -0
  574. package/templates/skills/performance-testing-patterns.md.template +341 -0
  575. package/templates/skills/phase2-optimizations-summary.md.template +458 -0
  576. package/templates/skills/progressive-disclosure-pattern.md.template +190 -0
  577. package/templates/skills/project-structure.md.template +372 -0
  578. package/templates/skills/provenance-analysis.md.template +609 -0
  579. package/templates/skills/react-executor.md.template +366 -0
  580. package/templates/skills/refactoring-patterns.md.template +422 -0
  581. package/templates/skills/release-management.md.template +373 -0
  582. package/templates/skills/requirement-prioritization.md.template +357 -0
  583. package/templates/skills/schema-validation.md.template +321 -0
  584. package/templates/skills/security-design-patterns.md.template +692 -0
  585. package/templates/skills/security-vulnerability-scanning.md.template +663 -0
  586. package/templates/skills/semantic-memory.md.template +266 -0
  587. package/templates/skills/semantic-versioning.md.template +371 -0
  588. package/templates/skills/smart-retry.md.template +676 -0
  589. package/templates/skills/smart-summarization.md.template +358 -0
  590. package/templates/skills/story-decomposition.md.template +278 -0
  591. package/templates/skills/synchronization-patterns.md.template +303 -0
  592. package/templates/skills/test-generation-strategy.md.template +247 -0
  593. package/templates/skills/workflow-replay.md.template +478 -0
  594. package/templates/skills/wysiwid-principles.md.template +364 -0
  595. package/templates/skills-manifest.yaml.template +526 -0
  596. package/templates/stubs/agents/architecture-concept.md +20 -0
  597. package/templates/stubs/agents/checkpoint-concept.md +19 -0
  598. package/templates/stubs/agents/code-analysis-concept.md +36 -0
  599. package/templates/stubs/agents/context-concept.md +37 -0
  600. package/templates/stubs/agents/debate-advocate.md +12 -0
  601. package/templates/stubs/agents/debate-critic.md +12 -0
  602. package/templates/stubs/agents/debate-synthesis.md +12 -0
  603. package/templates/stubs/agents/documentation-concept.md +39 -0
  604. package/templates/stubs/agents/implementation-concept.md +41 -0
  605. package/templates/stubs/agents/quality-concept.md +41 -0
  606. package/templates/stubs/agents/research-concept.md +35 -0
  607. package/templates/stubs/agents/security-concept.md +40 -0
  608. package/templates/stubs/agents/spec-concept.md +35 -0
  609. package/templates/stubs/agents/story-concept.md +36 -0
  610. package/templates/stubs/agents/verification-concept.md +39 -0
  611. package/templates/stubs/agents/version-concept.md +37 -0
  612. package/templates/stubs/commands/cache.md.template +2 -0
  613. package/templates/stubs/commands/checkpoint.md.template +2 -0
  614. package/templates/stubs/commands/classify.md.template +2 -0
  615. package/templates/stubs/commands/compete.md.template +2 -0
  616. package/templates/stubs/commands/costs.md.template +2 -0
  617. package/templates/stubs/commands/estimate.md.template +2 -0
  618. package/templates/stubs/commands/explore.md.template +2 -0
  619. package/templates/stubs/commands/feature.md.template +2 -0
  620. package/templates/stubs/commands/forget.md.template +2 -0
  621. package/templates/stubs/commands/global-recall.md.template +2 -0
  622. package/templates/stubs/commands/global-remember.md.template +2 -0
  623. package/templates/stubs/commands/health.md.template +2 -0
  624. package/templates/stubs/commands/help.md.template +2 -0
  625. package/templates/stubs/commands/observe.md.template +2 -0
  626. package/templates/stubs/commands/pr-review.md.template +2 -0
  627. package/templates/stubs/commands/predict-cost.md.template +2 -0
  628. package/templates/stubs/commands/profile.md.template +2 -0
  629. package/templates/stubs/commands/reasoning.md.template +2 -0
  630. package/templates/stubs/commands/recall.md.template +2 -0
  631. package/templates/stubs/commands/remember.md.template +2 -0
  632. package/templates/stubs/commands/replay.md.template +2 -0
  633. package/templates/stubs/commands/restore.md.template +2 -0
  634. package/templates/stubs/commands/retrospective.md.template +2 -0
  635. package/templates/stubs/commands/slo.md.template +2 -0
  636. package/templates/stubs/commands/spec.md.template +2 -0
  637. package/templates/stubs/commands/sync.md.template +2 -0
  638. package/templates/stubs/commands/task.md.template +2 -0
  639. package/templates/stubs/commands/trace.md.template +2 -0
  640. package/templates/stubs/commands/visualize.md.template +2 -0
  641. package/templates/stubs/commands/workflow.md.template +2 -0
  642. package/templates/synchronizations/archive/adaptive-learning.yaml.template +595 -0
  643. package/templates/synchronizations/archive/code-understanding-flow.yaml.template +533 -0
  644. package/templates/synchronizations/archive/collaboration-flow.yaml.template +521 -0
  645. package/templates/synchronizations/archive/context-folding.yaml.template +353 -0
  646. package/templates/synchronizations/archive/dead-letter-queue.yaml.template +530 -0
  647. package/templates/synchronizations/archive/documentation-flow.yaml.template +560 -0
  648. package/templates/synchronizations/archive/error-recovery-flow.yaml.template +1031 -0
  649. package/templates/synchronizations/archive/execution-loop.yaml.template +336 -0
  650. package/templates/synchronizations/archive/exploration-flow.yaml.template +369 -0
  651. package/templates/synchronizations/archive/feature-development.yaml.template +2145 -0
  652. package/templates/synchronizations/archive/learning-loop.yaml.template +657 -0
  653. package/templates/synchronizations/archive/multi-verify.yaml.template +346 -0
  654. package/templates/synchronizations/archive/planning-flow.yaml.template +312 -0
  655. package/templates/synchronizations/archive/retrospective-flow.yaml.template +277 -0
  656. package/templates/synchronizations/archive/security-flow.yaml.template +477 -0
  657. package/templates/synchronizations/archive/slo-monitoring.yaml.template +209 -0
  658. package/templates/synchronizations/archive/task-routing.yaml.template +489 -0
  659. package/templates/synchronizations/archive/test-driven.yaml.template +291 -0
  660. package/templates/synchronizations/archive/tool-routing.yaml.template +326 -0
  661. package/templates/synchronizations/archive/verification-flow.yaml.template +407 -0
  662. package/templates/synchronizations/error-policy.yaml.template +188 -0
  663. package/templates/synchronizations/main.sync.template +319 -0
  664. package/templates/synchronizations/slo-registry.yaml.template +229 -0
  665. package/templates/tasks/task.yaml.template +67 -0
  666. package/templates/zen-profile.yaml.template +14 -0
@@ -0,0 +1,142 @@
1
+ # /profile Command
2
+
3
+ Generate or view project profile with auto-detected characteristics.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /profile # Generate/refresh project profile
9
+ /profile recommend <task> # Get recommendations for a task
10
+ /profile view # View current profile
11
+ ```
12
+
13
+ ## Purpose
14
+
15
+ This command invokes the project-profile concept to:
16
+ - Auto-detect languages and frameworks
17
+ - Identify architectural patterns
18
+ - Measure codebase metrics
19
+ - Enable technology-specific skills
20
+ - Optimize workflow behavior
21
+
22
+ ## Process
23
+
24
+ When you run `/profile`:
25
+
26
+ 1. **Scan File Extensions**
27
+ - Count files by extension
28
+ - Determine primary/secondary languages
29
+
30
+ 2. **Analyze Package Files**
31
+ - Read package.json, requirements.txt, Cargo.toml, etc.
32
+ - Detect frameworks and their versions
33
+
34
+ 3. **Use AST Index**
35
+ - Get code metrics (files, lines, symbols)
36
+ - Detect patterns (repository, DI, MVC, etc.)
37
+
38
+ 4. **Identify Conventions**
39
+ - Linting/formatting configuration
40
+ - Naming conventions
41
+ - Directory structure style
42
+
43
+ 5. **Generate Optimizations**
44
+ - Enable relevant skills
45
+ - Suggest workflow adjustments
46
+ - Override sync rules for this project
47
+
48
+ ## Output Format
49
+
50
+ ```
51
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
52
+ Project Profile
53
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
54
+
55
+ Languages:
56
+ Primary: TypeScript (65%)
57
+ Secondary: Python (25%), YAML (10%)
58
+
59
+ Frameworks:
60
+ Frontend: React 18.2, TailwindCSS
61
+ Backend: Express 4.18
62
+ Database: PostgreSQL + Prisma 5.0
63
+ Testing: Jest 29.0
64
+
65
+ Architecture:
66
+ Style: Layered (feature-based directories)
67
+ Patterns: repository-pattern, dependency-injection
68
+
69
+ Metrics:
70
+ Files: 234 total (189 source, 45 test)
71
+ Lines: 45,000
72
+ Coverage: 24% (by file count)
73
+
74
+ Quality:
75
+ Linting: ESLint (strict)
76
+ Formatter: Prettier
77
+ Types: TypeScript (strict mode)
78
+
79
+ Enabled Skills:
80
+ ✓ typescript-patterns
81
+ ✓ react-best-practices
82
+ ✓ prisma-patterns
83
+
84
+ Workflow Optimizations:
85
+ • Skip architecture for low-complexity tasks (established patterns)
86
+ • Enable React-specific quality checks for .tsx files
87
+
88
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
89
+
90
+ Profile saved to: koan/profile.yaml
91
+ ```
92
+
93
+ ## Recommendations
94
+
95
+ With `/profile recommend <task>`:
96
+
97
+ ```
98
+ /profile recommend "Add user authentication"
99
+
100
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
101
+ Recommendations for: Add user authentication
102
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
103
+
104
+ Skills to Enable:
105
+ • typescript-patterns (project uses strict TypeScript)
106
+ • prisma-patterns (user model likely uses Prisma)
107
+
108
+ Relevant Patterns:
109
+ • repository-pattern
110
+ Example: src/repositories/user.repository.ts
111
+ Apply to: AuthRepository
112
+
113
+ Files to Reference:
114
+ • src/features/users/user.service.ts
115
+ • src/shared/errors/app-error.ts
116
+ • prisma/schema.prisma
117
+
118
+ Workflow Suggestions:
119
+ 1. Use existing UserRepository pattern for AuthRepository
120
+ 2. Follow established error handling in src/shared/errors
121
+ 3. Add Prisma migration for auth tables
122
+
123
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
124
+ ```
125
+
126
+ ## Storage
127
+
128
+ Profile stored at: `koan/profile.yaml`
129
+
130
+ ## Integration
131
+
132
+ Profile auto-triggers on first Zen install if not exists.
133
+ Profile informs:
134
+ - Task classification weights
135
+ - Architecture phase behavior
136
+ - Quality review focus areas
137
+
138
+ ## WYSIWID Principle
139
+
140
+ All detection rules and optimizations are visible in:
141
+ - `.claude/concepts/project-profile.md`
142
+ - `koan/profile.yaml` (actual detected values)
@@ -0,0 +1,228 @@
1
+ View and analyze reasoning chains from architecture decisions.
2
+
3
+ This command provides visibility into the Chain-of-Thought reasoning process
4
+ used by the architecture concept.
5
+
6
+ ## Usage
7
+
8
+ ```
9
+ /reasoning <arch-id> - View reasoning chain for an architecture
10
+ /reasoning compare <id1> <id2> - Compare reasoning between two architectures
11
+ /reasoning stats - Show reasoning mode usage statistics
12
+ /reasoning modes - Display available reasoning modes
13
+ ```
14
+
15
+ ## Examples
16
+
17
+ ### View Reasoning Chain
18
+
19
+ ```
20
+ /reasoning arch-001
21
+ ```
22
+
23
+ Output:
24
+ ```
25
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
26
+ Reasoning Chain: arch-001
27
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
28
+
29
+ Mode: standard (5 steps)
30
+ Method: linear
31
+ Model: sonnet
32
+ Confidence: 0.95
33
+
34
+ Step 1: Understand Requirements (450 tokens, 1.2s)
35
+ ├─ Requirements: User authentication, Social login
36
+ └─ Constraints: Must integrate with existing session
37
+
38
+ Step 2: Explore Approaches (800 tokens, 2.1s)
39
+ ├─ Approach 1: OAuth2 with Passport.js
40
+ ├─ Approach 2: Custom OAuth2 implementation
41
+ └─ Approach 3: SAML with passport-saml
42
+
43
+ Step 3: Evaluate Trade-offs (600 tokens, 1.5s)
44
+ ├─ OAuth2 + Passport: 8.5/10 (selected)
45
+ ├─ Custom OAuth2: 3.2/10
46
+ └─ SAML: 5.1/10
47
+
48
+ Step 4: Decide (350 tokens, 0.9s)
49
+ ├─ Selected: OAuth2 with Passport.js
50
+ ├─ Confidence: 0.95
51
+ └─ Rationale: Battle-tested, team familiarity
52
+
53
+ Step 5: Design (500 tokens, 1.3s)
54
+ ├─ Components: 3
55
+ ├─ Interfaces: 2
56
+ └─ Data flow steps: 8
57
+
58
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
59
+ Total: 2,700 tokens | 7.0s | $0.005
60
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
61
+ ```
62
+
63
+ ### View Deep Tree-of-Thought
64
+
65
+ ```
66
+ /reasoning arch-cot-001
67
+ ```
68
+
69
+ Output:
70
+ ```
71
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
72
+ Reasoning Chain: arch-cot-001
73
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
74
+
75
+ Mode: deep (10 steps)
76
+ Method: tree_of_thought
77
+ Model: opus
78
+ Confidence: 0.92
79
+
80
+ Phase 1: Deep Understanding (3 steps)
81
+ ├─ Step 1: Decompose → 4 sub-problems identified
82
+ ├─ Step 2: Requirements → analyzed
83
+ └─ Step 3: Constraints → mapped
84
+
85
+ Phase 2: Tree-of-Thought Exploration (3 steps)
86
+
87
+ ├─ Branch 1: Structured Output (score: 8.0)
88
+ │ ├─ b1.1: Single-call variant (8.5) ✓ SELECTED
89
+ │ └─ b1.2: Multi-call variant (7.2) ✗ pruned
90
+
91
+ ├─ Branch 2: Step-by-Step (score: 3.0) ✗ pruned
92
+ │ └─ Reason: 5-20x cost increase
93
+
94
+ └─ Branches pruned: 3 | Final depth: 3
95
+
96
+ Phase 3: Decision (2 steps)
97
+ ├─ Risk analysis completed
98
+ └─ Final: Dual-Mode Reasoning (confidence: 0.92)
99
+
100
+ Phase 4: Design (2 steps)
101
+ ├─ Architecture, Integration points
102
+
103
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
104
+ Total: 6,500 tokens | 20.0s | $0.015
105
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
106
+ ```
107
+
108
+ ### Compare Architectures
109
+
110
+ ```
111
+ /reasoning compare arch-001 arch-002
112
+ ```
113
+
114
+ Output:
115
+ ```
116
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
117
+ Reasoning Comparison
118
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
119
+
120
+ arch-001 arch-002
121
+ Mode: standard deep
122
+ Steps: 5 10
123
+ Model: sonnet opus
124
+ Tokens: 2,700 6,500
125
+ Duration: 7.0s 18.5s
126
+ Cost: $0.005 $0.015
127
+ Confidence: 0.95 0.97
128
+ Approaches: 3 5
129
+
130
+ Key Differences:
131
+ - arch-002 explored 2 more approaches
132
+ - arch-002 used Opus for deeper trade-off analysis
133
+ - arch-002 has higher confidence (+0.02)
134
+ - arch-002 cost 3x more but may prevent rework
135
+ ```
136
+
137
+ ### View Statistics
138
+
139
+ ```
140
+ /reasoning stats
141
+ ```
142
+
143
+ Output:
144
+ ```
145
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
146
+ Reasoning Mode Statistics
147
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
148
+
149
+ Mode Usage (last 30 days):
150
+ ├─ quick: 12 (25%) avg: $0.003, 3.2s
151
+ ├─ standard: 28 (58%) avg: $0.005, 7.8s
152
+ └─ deep: 8 (17%) avg: $0.015, 19.2s
153
+
154
+ Total architectures: 48
155
+ Average confidence: 0.93
156
+ Total cost: $0.31
157
+
158
+ Auto-Mode Selection Accuracy:
159
+ ├─ Correct mode selected: 45/50 (90%)
160
+ ├─ Under-estimated: 3 (resulted in rework)
161
+ └─ Over-estimated: 2 (higher cost than needed)
162
+
163
+ Recommendations:
164
+ - Consider using 'deep' for authentication features
165
+ - 'quick' mode worked well for UI-only changes
166
+ ```
167
+
168
+ ### Display Available Modes
169
+
170
+ ```
171
+ /reasoning modes
172
+ ```
173
+
174
+ Output:
175
+ ```
176
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
177
+ Available Reasoning Modes
178
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
179
+
180
+ Mode Steps Model Method Cost Use Case
181
+ ──────────────────────────────────────────────────────────────────
182
+ quick 3 sonnet linear ~$0.003 Simple features, quick fixes
183
+ standard 5 sonnet linear ~$0.005 Typical features (default)
184
+ deep 10 opus tree_of_thought ~$0.015 Complex features, critical decisions
185
+
186
+ Mode Selection:
187
+ 1. Explicit prefix: /workflow deep "..."
188
+ 2. Story tags: critical, security → deep
189
+ 3. Keywords: distributed, migration → deep
190
+ 4. Default: standard
191
+
192
+ Configuration: .claude/config/reasoning-modes.yaml
193
+ ```
194
+
195
+ ## Implementation
196
+
197
+ When invoked, this command:
198
+
199
+ 1. **View reasoning chain**:
200
+ - Read `koan/architecture/arch-{id}.yaml`
201
+ - Extract `reasoning_chain` section
202
+ - Format as hierarchical tree view
203
+ - Show tokens/timing per step
204
+ - For deep mode: render tree-of-thought exploration with pruning
205
+
206
+ 2. **Compare architectures**:
207
+ - Read both architecture files
208
+ - Compare mode, steps, tokens, cost, confidence
209
+ - Identify key differences in reasoning approach
210
+ - Suggest which mode was more appropriate
211
+
212
+ 3. **Show statistics**:
213
+ - Scan all `koan/architecture/arch-*.yaml` files
214
+ - Aggregate by reasoning mode
215
+ - Calculate averages and distributions
216
+ - Analyze auto-mode selection accuracy
217
+ - Generate recommendations
218
+
219
+ 4. **Display modes**:
220
+ - Read `.claude/config/reasoning-modes.yaml`
221
+ - Format mode table with costs
222
+ - Show selection priority rules
223
+
224
+ ## Related Commands
225
+
226
+ - `/workflow` - Execute workflow with reasoning mode
227
+ - `/trace` - View full provenance chain
228
+ - `/costs` - Cost analysis including reasoning costs
@@ -0,0 +1,197 @@
1
+ ---
2
+ name: recall
3
+ description: "Retrieve memories from semantic storage"
4
+ ---
5
+
6
+ # /recall Command
7
+
8
+ Search and retrieve stored memories from semantic memory.
9
+
10
+ ## Usage
11
+
12
+ ```
13
+ /recall <query> # Search by keyword
14
+ /recall --category <cat> # Filter by category
15
+ /recall --tags tag1,tag2 # Filter by tags
16
+ /recall --recent [n] # Show n most recent (default: 10)
17
+ /recall --all # Show all memories
18
+ ```
19
+
20
+ ## Parameters
21
+
22
+ | Parameter | Description | Default |
23
+ |-----------|-------------|---------|
24
+ | query | Keyword to search in memory content | - |
25
+ | --category | Filter: architecture, conventions, patterns, workflows, debugging | all |
26
+ | --tags | Comma-separated tags to match | - |
27
+ | --recent | Show most recent n memories | 10 |
28
+ | --all | Show all memories (paginated) | false |
29
+
30
+ ## What to Do
31
+
32
+ ### 1. Read Memory Index
33
+
34
+ ```bash
35
+ cat koan/memory/index.yaml
36
+ ```
37
+
38
+ ### 2. Search Memories
39
+
40
+ Based on query type:
41
+ - **Keyword**: Search content fields
42
+ - **Tags**: Match tag arrays
43
+ - **Category**: Filter by category
44
+ - **Recent**: Sort by created_at
45
+
46
+ ### 3. Read Matching Memory Files
47
+
48
+ ```bash
49
+ # Read relevant category files
50
+ cat koan/memory/semantic/architecture.yaml
51
+ cat koan/memory/semantic/conventions.yaml
52
+ # etc.
53
+ ```
54
+
55
+ ### 4. Format Results
56
+
57
+ ```
58
+ Found {n} memories matching "{query}":
59
+
60
+ 1. [mem-001] {category} | {confidence}
61
+ "{content}"
62
+ Tags: [{tags}]
63
+ Stored: {date}
64
+
65
+ 2. [mem-002] {category} | {confidence}
66
+ "{content}"
67
+ Tags: [{tags}]
68
+ Stored: {date}
69
+
70
+ ... more results
71
+ ```
72
+
73
+ ## Examples
74
+
75
+ ### Keyword Search
76
+ ```
77
+ /recall auth
78
+
79
+ Found 4 memories matching "auth":
80
+
81
+ 1. [mem-015] architecture | high
82
+ "Authentication uses JWT with RS256 signing"
83
+ Tags: [auth, jwt, security]
84
+ Stored: 2025-01-05
85
+
86
+ 2. [mem-023] architecture | high
87
+ "OAuth tokens expire after 1 hour"
88
+ Tags: [auth, oauth, tokens]
89
+ Stored: 2025-01-05
90
+
91
+ 3. [mem-031] workflows | medium
92
+ "To test auth: use test user credentials in .env.test"
93
+ Tags: [auth, testing, credentials]
94
+ Stored: 2025-01-06
95
+
96
+ 4. [mem-048] debugging | high
97
+ "Auth failures: check token expiry first"
98
+ Tags: [auth, debugging, tokens]
99
+ Stored: 2025-01-06
100
+ ```
101
+
102
+ ### Category Filter
103
+ ```
104
+ /recall --category conventions
105
+
106
+ Found 8 memories in category "conventions":
107
+
108
+ 1. [mem-002] high
109
+ "All API endpoints return { data, error, meta } shape"
110
+ Tags: [api, conventions]
111
+
112
+ 2. [mem-007] high
113
+ "Use kebab-case for file names"
114
+ Tags: [naming, files]
115
+
116
+ 3. [mem-012] high
117
+ "Always use async/await, never callbacks"
118
+ Tags: [async, style]
119
+
120
+ ... 5 more
121
+ ```
122
+
123
+ ### Tag Search
124
+ ```
125
+ /recall --tags security
126
+
127
+ Found 3 memories with tag "security":
128
+
129
+ 1. [mem-015] architecture | high
130
+ "Authentication uses JWT with RS256 signing"
131
+
132
+ 2. [mem-019] architecture | medium
133
+ "API keys stored in environment variables only"
134
+
135
+ 3. [mem-027] conventions | high
136
+ "Never log sensitive data - use [REDACTED]"
137
+ ```
138
+
139
+ ### Recent Memories
140
+ ```
141
+ /recall --recent 5
142
+
143
+ 5 most recent memories:
144
+
145
+ 1. [mem-048] debugging | high (today)
146
+ "Auth failures: check token expiry first"
147
+
148
+ 2. [mem-047] patterns | medium (today)
149
+ "Rate limiting uses token bucket algorithm"
150
+
151
+ 3. [mem-046] workflows | high (yesterday)
152
+ "Deploy to staging: npm run deploy:staging"
153
+
154
+ 4. [mem-045] architecture | medium (yesterday)
155
+ "Cache TTL is 5 minutes for user data"
156
+
157
+ 5. [mem-044] conventions | high (2 days ago)
158
+ "Error messages should be user-friendly"
159
+ ```
160
+
161
+ ## No Results
162
+
163
+ When no memories match:
164
+ ```
165
+ /recall kubernetes
166
+
167
+ No memories found matching "kubernetes".
168
+
169
+ Suggestions:
170
+ - Try broader search terms
171
+ - Check available categories: /recall --categories
172
+ - Store new knowledge: /remember "..."
173
+ ```
174
+
175
+ ## Memory Context for Tasks
176
+
177
+ When working on a task, proactively recall relevant memories:
178
+
179
+ ```
180
+ User: Let's work on the API error handling
181
+
182
+ Claude: Before we start, let me check relevant memories...
183
+
184
+ /recall --tags api,error
185
+
186
+ Found 2 relevant memories:
187
+ 1. "All API endpoints return { data, error, meta } shape"
188
+ 2. "Error messages should be user-friendly"
189
+
190
+ I'll keep these conventions in mind as we work.
191
+ ```
192
+
193
+ ## Related Commands
194
+
195
+ - `/remember` - Store new memory
196
+ - `/forget` - Remove a memory
197
+ - `/health` - Check context health
@@ -0,0 +1,148 @@
1
+ ---
2
+ name: remember
3
+ description: "Store a fact or knowledge in semantic memory for future sessions"
4
+ ---
5
+
6
+ # /remember Command
7
+
8
+ Store persistent memories that survive across sessions and context compressions.
9
+
10
+ ## Usage
11
+
12
+ ```
13
+ /remember "fact or knowledge to store"
14
+ /remember --category <cat> "content"
15
+ /remember --tags tag1,tag2 "content"
16
+ /remember --confidence high|medium|low "content"
17
+ ```
18
+
19
+ ## Parameters
20
+
21
+ | Parameter | Description | Default |
22
+ |-----------|-------------|---------|
23
+ | content | The fact/knowledge to remember | required |
24
+ | --category | Category: architecture, conventions, patterns, workflows, debugging | inferred |
25
+ | --tags | Comma-separated tags for retrieval | auto-generated |
26
+ | --confidence | Confidence level | high (if user stated) |
27
+
28
+ ## What to Do
29
+
30
+ ### 1. Parse the Memory Content
31
+
32
+ Extract:
33
+ - The core fact being stored
34
+ - Any implicit category
35
+ - Relevant tags
36
+
37
+ ### 2. Generate Memory Entry
38
+
39
+ ```yaml
40
+ # koan/memory/semantic/{category}.yaml
41
+ - id: "mem-{timestamp}"
42
+ type: semantic
43
+ category: "{category}"
44
+ content: "{user's content}"
45
+ confidence: "{level}"
46
+ source: "User stated in session {date}"
47
+ tags: [{generated tags}]
48
+ created_at: "{timestamp}"
49
+ session_id: "{current session}"
50
+ ```
51
+
52
+ ### 3. Update Memory Index
53
+
54
+ Add entry to `koan/memory/index.yaml`:
55
+ - Increment total count
56
+ - Add to tag index
57
+ - Add to recent additions
58
+
59
+ ### 4. Confirm Storage
60
+
61
+ ```
62
+ ✅ Memory stored:
63
+
64
+ ID: mem-{id}
65
+ Type: semantic
66
+ Category: {category}
67
+ Content: "{content}"
68
+ Confidence: {level}
69
+ Tags: [{tags}]
70
+
71
+ This will be recalled in future sessions.
72
+ ```
73
+
74
+ ## Examples
75
+
76
+ ### Basic Usage
77
+ ```
78
+ /remember "API rate limit is 100 requests per minute"
79
+
80
+ ✅ Memory stored:
81
+ ID: mem-20250106-143052
82
+ Category: architecture
83
+ Content: "API rate limit is 100 requests per minute"
84
+ Tags: [api, rate-limit, constraints]
85
+ ```
86
+
87
+ ### With Category
88
+ ```
89
+ /remember --category conventions "Use kebab-case for file names"
90
+
91
+ ✅ Memory stored:
92
+ ID: mem-20250106-143055
93
+ Category: conventions
94
+ Content: "Use kebab-case for file names"
95
+ Tags: [conventions, naming, files]
96
+ ```
97
+
98
+ ### With Tags
99
+ ```
100
+ /remember --tags auth,security "OAuth tokens expire after 1 hour"
101
+
102
+ ✅ Memory stored:
103
+ ID: mem-20250106-143100
104
+ Category: architecture
105
+ Content: "OAuth tokens expire after 1 hour"
106
+ Tags: [auth, security, tokens, oauth]
107
+ ```
108
+
109
+ ## Auto-Remember Triggers
110
+
111
+ Claude should proactively suggest remembering when:
112
+
113
+ 1. **User explicitly states a rule**
114
+ > "Always use async/await, never callbacks"
115
+
116
+ Suggest: `/remember "Always use async/await, never callbacks"`
117
+
118
+ 2. **Important decision is made**
119
+ > "Let's go with PostgreSQL for the database"
120
+
121
+ Suggest: `/remember --category architecture "Using PostgreSQL as primary database"`
122
+
123
+ 3. **Debugging insight discovered**
124
+ > "Ah, the issue was the missing CORS header"
125
+
126
+ Suggest: `/remember --category debugging "CORS issues: check for missing headers"`
127
+
128
+ 4. **User preference revealed**
129
+ > "I prefer smaller, focused commits"
130
+
131
+ Suggest: `/remember --tags preferences,git "User prefers smaller, focused commits"`
132
+
133
+ ## Memory Categories
134
+
135
+ | Category | Use For |
136
+ |----------|---------|
137
+ | architecture | System design, tech choices, constraints |
138
+ | conventions | Coding style, naming, formatting |
139
+ | patterns | Common code patterns in the project |
140
+ | workflows | How to do common tasks |
141
+ | debugging | Known issues and solutions |
142
+ | preferences | User's stated preferences |
143
+
144
+ ## Related Commands
145
+
146
+ - `/recall` - Retrieve stored memories
147
+ - `/forget` - Remove a memory
148
+ - `/checkpoint` - Save session state