@adaptabletools/adaptable-mcp 0.1.0-canary.0 → 0.1.0-canary.2

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 (348) hide show
  1. package/README.md +58 -61
  2. package/data/changes/21-22.json +542 -0
  3. package/data/changes/22-23.json +639 -0
  4. package/data/changes/23-24.json +1874 -0
  5. package/data/manifest.snapshot.json +202 -0
  6. package/data/templates/angular/src/app/adaptableOptions.ts +40 -0
  7. package/data/templates/angular/src/app/agGridModules.ts +7 -0
  8. package/data/templates/angular/src/app/app.component.ts +66 -0
  9. package/data/templates/angular/src/app/app.module.ts +14 -0
  10. package/data/templates/angular/src/app/columnDefs.ts +121 -0
  11. package/data/templates/angular/src/app/gridOptions.ts +32 -0
  12. package/data/templates/angular/src/app/onAdaptableReady.ts +11 -0
  13. package/data/templates/angular/src/app/rowData.ts +851 -0
  14. package/data/templates/angular/src/app/styles.css +50 -0
  15. package/data/templates/angular/src/index.html +17 -0
  16. package/data/templates/angular/src/main.ts +18 -0
  17. package/data/templates/angular/src/polyfills.ts +1 -0
  18. package/data/templates/angular/tsconfig.json +16 -0
  19. package/data/templates/manifest.json +406 -0
  20. package/data/templates/react/src/App.tsx +71 -0
  21. package/data/templates/react/src/adaptableOptions.ts +40 -0
  22. package/data/templates/react/src/agGridModules.ts +7 -0
  23. package/data/templates/react/src/columnDefs.ts +121 -0
  24. package/data/templates/react/src/gridOptions.ts +32 -0
  25. package/data/templates/react/src/index.tsx +8 -0
  26. package/data/templates/react/src/onAdaptableReady.ts +11 -0
  27. package/data/templates/react/src/rowData.ts +851 -0
  28. package/data/templates/react/src/styles.css +50 -0
  29. package/data/templates/react/tsconfig.json +9 -0
  30. package/data/templates/vanilla/index.html +18 -0
  31. package/data/templates/vanilla/src/adaptableOptions.ts +40 -0
  32. package/data/templates/vanilla/src/agGridModules.ts +7 -0
  33. package/data/templates/vanilla/src/columnDefs.ts +121 -0
  34. package/data/templates/vanilla/src/gridOptions.ts +32 -0
  35. package/data/templates/vanilla/src/index.ts +41 -0
  36. package/data/templates/vanilla/src/onAdaptableReady.ts +11 -0
  37. package/data/templates/vanilla/src/rowData.ts +851 -0
  38. package/data/templates/vanilla/src/styles.css +50 -0
  39. package/data/templates/vanilla/tsconfig.json +14 -0
  40. package/data/templates/vue/.babelrc +3 -0
  41. package/data/templates/vue/public/index.html +19 -0
  42. package/data/templates/vue/src/App.vue +35 -0
  43. package/data/templates/vue/src/adaptableOptions.ts +40 -0
  44. package/data/templates/vue/src/agGridModules.ts +7 -0
  45. package/data/templates/vue/src/columnDefs.ts +121 -0
  46. package/data/templates/vue/src/gridOptions.ts +32 -0
  47. package/data/templates/vue/src/main.ts +6 -0
  48. package/data/templates/vue/src/onAdaptableReady.ts +11 -0
  49. package/data/templates/vue/src/rowData.ts +851 -0
  50. package/data/templates/vue/src/shims-vue.d.ts +6 -0
  51. package/data/templates/vue/src/styles.css +50 -0
  52. package/data/templates/vue/tsconfig.json +30 -0
  53. package/dist/bin.js +23 -0
  54. package/dist/bin.js.map +1 -0
  55. package/dist/cli/build-commands.js +200 -0
  56. package/dist/cli/build-commands.js.map +1 -0
  57. package/dist/cli/index.js +94 -0
  58. package/dist/cli/index.js.map +1 -0
  59. package/dist/cli/render.js +57 -0
  60. package/dist/cli/render.js.map +1 -0
  61. package/dist/core/anonymise/anonymise.js +315 -0
  62. package/dist/core/anonymise/anonymise.js.map +1 -0
  63. package/dist/core/anonymise/capabilities.js +94 -0
  64. package/dist/core/anonymise/capabilities.js.map +1 -0
  65. package/dist/core/aql/capabilities.js +339 -0
  66. package/dist/core/aql/capabilities.js.map +1 -0
  67. package/dist/core/aql/check.js +204 -0
  68. package/dist/core/aql/check.js.map +1 -0
  69. package/dist/core/aql/engine.js +92 -0
  70. package/dist/core/aql/engine.js.map +1 -0
  71. package/dist/core/aql/functions.js +108 -0
  72. package/dist/core/aql/functions.js.map +1 -0
  73. package/dist/core/aql/migrate.js +62 -0
  74. package/dist/core/aql/migrate.js.map +1 -0
  75. package/dist/core/capabilities.js +105 -0
  76. package/dist/core/capabilities.js.map +1 -0
  77. package/dist/core/changes/capabilities.js +92 -0
  78. package/dist/core/changes/capabilities.js.map +1 -0
  79. package/dist/core/changes/changes.js +101 -0
  80. package/dist/core/changes/changes.js.map +1 -0
  81. package/dist/core/changes/grep.js +183 -0
  82. package/dist/core/changes/grep.js.map +1 -0
  83. package/dist/core/changes/records.js +172 -0
  84. package/dist/core/changes/records.js.map +1 -0
  85. package/dist/core/changes/render-md.js +101 -0
  86. package/dist/core/changes/render-md.js.map +1 -0
  87. package/dist/core/changes/with-docs.js +86 -0
  88. package/dist/core/changes/with-docs.js.map +1 -0
  89. package/dist/core/compat/capabilities.js +127 -0
  90. package/dist/core/compat/capabilities.js.map +1 -0
  91. package/dist/core/compat/manifest.js +203 -0
  92. package/dist/core/compat/manifest.js.map +1 -0
  93. package/dist/core/constants.js +38 -0
  94. package/dist/core/constants.js.map +1 -0
  95. package/dist/core/context/capabilities.js +106 -0
  96. package/dist/core/context/capabilities.js.map +1 -0
  97. package/dist/core/context/detect.js +370 -0
  98. package/dist/core/context/detect.js.map +1 -0
  99. package/dist/core/context/projects.js +159 -0
  100. package/dist/core/context/projects.js.map +1 -0
  101. package/dist/core/context/resolve.js +85 -0
  102. package/dist/core/context/resolve.js.map +1 -0
  103. package/dist/core/convert/capabilities.js +86 -0
  104. package/dist/core/convert/capabilities.js.map +1 -0
  105. package/dist/core/convert/coldefs.js +313 -0
  106. package/dist/core/convert/coldefs.js.map +1 -0
  107. package/dist/core/docs/areas.js +22 -0
  108. package/dist/core/docs/areas.js.map +1 -0
  109. package/dist/core/docs/cache.js +133 -0
  110. package/dist/core/docs/cache.js.map +1 -0
  111. package/dist/core/docs/capabilities.js +377 -0
  112. package/dist/core/docs/capabilities.js.map +1 -0
  113. package/dist/core/docs/corpus.js.map +1 -0
  114. package/dist/core/docs/demos.js +105 -0
  115. package/dist/core/docs/demos.js.map +1 -0
  116. package/dist/core/docs/get-page.js +182 -0
  117. package/dist/core/docs/get-page.js.map +1 -0
  118. package/dist/core/docs/hosts.js +74 -0
  119. package/dist/core/docs/hosts.js.map +1 -0
  120. package/dist/core/docs/search.js.map +1 -0
  121. package/dist/core/envelope.js +79 -0
  122. package/dist/core/envelope.js.map +1 -0
  123. package/dist/core/extract/imports.js +163 -0
  124. package/dist/core/extract/imports.js.map +1 -0
  125. package/dist/core/extract/input.js +140 -0
  126. package/dist/core/extract/input.js.map +1 -0
  127. package/dist/core/extract/line-map.js +90 -0
  128. package/dist/core/extract/line-map.js.map +1 -0
  129. package/dist/core/extract/ts-literal.js +963 -0
  130. package/dist/core/extract/ts-literal.js.map +1 -0
  131. package/dist/core/index.js +13 -0
  132. package/dist/core/index.js.map +1 -0
  133. package/dist/core/migrate/capabilities.js +143 -0
  134. package/dist/core/migrate/capabilities.js.map +1 -0
  135. package/dist/core/migrate/leftovers.js +119 -0
  136. package/dist/core/migrate/leftovers.js.map +1 -0
  137. package/dist/core/migrate/state.js +295 -0
  138. package/dist/core/migrate/state.js.map +1 -0
  139. package/dist/core/packages/cache.js +139 -0
  140. package/dist/core/packages/cache.js.map +1 -0
  141. package/dist/core/packages/capabilities.js +95 -0
  142. package/dist/core/packages/capabilities.js.map +1 -0
  143. package/dist/{adaptable/types.js → core/packages/entry-types.js} +1 -1
  144. package/dist/core/packages/entry-types.js.map +1 -0
  145. package/dist/core/packages/exec.js +37 -0
  146. package/dist/core/packages/exec.js.map +1 -0
  147. package/dist/core/packages/load-entry.js +123 -0
  148. package/dist/core/packages/load-entry.js.map +1 -0
  149. package/dist/core/packages/prepare.js +122 -0
  150. package/dist/core/packages/prepare.js.map +1 -0
  151. package/dist/core/packages/registry.js +75 -0
  152. package/dist/core/packages/registry.js.map +1 -0
  153. package/dist/core/packages/resolve.js +94 -0
  154. package/dist/core/packages/resolve.js.map +1 -0
  155. package/dist/core/packages/versions.js +71 -0
  156. package/dist/core/packages/versions.js.map +1 -0
  157. package/dist/core/ping.js +22 -0
  158. package/dist/core/ping.js.map +1 -0
  159. package/dist/core/register.js +18 -0
  160. package/dist/core/register.js.map +1 -0
  161. package/dist/core/scaffold/capabilities.js +434 -0
  162. package/dist/core/scaffold/capabilities.js.map +1 -0
  163. package/dist/core/scaffold/generate.js +409 -0
  164. package/dist/core/scaffold/generate.js.map +1 -0
  165. package/dist/core/scaffold/infer.js +441 -0
  166. package/dist/core/scaffold/infer.js.map +1 -0
  167. package/dist/core/scaffold/overlay.js +290 -0
  168. package/dist/core/scaffold/overlay.js.map +1 -0
  169. package/dist/core/scaffold/readers/csv.js +146 -0
  170. package/dist/core/scaffold/readers/csv.js.map +1 -0
  171. package/dist/core/scaffold/readers/dataset.js +53 -0
  172. package/dist/core/scaffold/readers/dataset.js.map +1 -0
  173. package/dist/core/scaffold/readers/index.js +62 -0
  174. package/dist/core/scaffold/readers/index.js.map +1 -0
  175. package/dist/core/scaffold/readers/json.js +101 -0
  176. package/dist/core/scaffold/readers/json.js.map +1 -0
  177. package/dist/core/scaffold/readers/xlsx.js +81 -0
  178. package/dist/core/scaffold/readers/xlsx.js.map +1 -0
  179. package/dist/core/scaffold/suggestions.js +57 -0
  180. package/dist/core/scaffold/suggestions.js.map +1 -0
  181. package/dist/core/scaffold/templates.js +59 -0
  182. package/dist/core/scaffold/templates.js.map +1 -0
  183. package/dist/core/setup/audit.js +91 -0
  184. package/dist/core/setup/audit.js.map +1 -0
  185. package/dist/core/setup/capabilities.js +80 -0
  186. package/dist/core/setup/capabilities.js.map +1 -0
  187. package/dist/core/setup/context.js +118 -0
  188. package/dist/core/setup/context.js.map +1 -0
  189. package/dist/core/setup/rules/cell-data-type.js +40 -0
  190. package/dist/core/setup/rules/cell-data-type.js.map +1 -0
  191. package/dist/core/setup/rules/coldef-ownership.js +67 -0
  192. package/dist/core/setup/rules/coldef-ownership.js.map +1 -0
  193. package/dist/core/setup/rules/css-import.js +34 -0
  194. package/dist/core/setup/rules/css-import.js.map +1 -0
  195. package/dist/core/setup/rules/direct-grid.js +42 -0
  196. package/dist/core/setup/rules/direct-grid.js.map +1 -0
  197. package/dist/core/setup/rules/index.js +53 -0
  198. package/dist/core/setup/rules/index.js.map +1 -0
  199. package/dist/core/setup/rules/licence-literal.js +23 -0
  200. package/dist/core/setup/rules/licence-literal.js.map +1 -0
  201. package/dist/core/setup/rules/modules.js +86 -0
  202. package/dist/core/setup/rules/modules.js.map +1 -0
  203. package/dist/core/setup/rules/react-stable-refs.js +20 -0
  204. package/dist/core/setup/rules/react-stable-refs.js.map +1 -0
  205. package/dist/core/setup/rules/ready-hook.js +33 -0
  206. package/dist/core/setup/rules/ready-hook.js.map +1 -0
  207. package/dist/core/setup/rules/required-options.js +43 -0
  208. package/dist/core/setup/rules/required-options.js.map +1 -0
  209. package/dist/core/setup/rules/rule.js +10 -0
  210. package/dist/core/setup/rules/rule.js.map +1 -0
  211. package/dist/core/setup/rules/version-skew.js +65 -0
  212. package/dist/core/setup/rules/version-skew.js.map +1 -0
  213. package/dist/core/state/capabilities.js +78 -0
  214. package/dist/core/state/capabilities.js.map +1 -0
  215. package/dist/core/state/check.js +216 -0
  216. package/dist/core/state/check.js.map +1 -0
  217. package/dist/core/state/columns.js +130 -0
  218. package/dist/core/state/columns.js.map +1 -0
  219. package/dist/core/state/did-you-mean.js +83 -0
  220. package/dist/core/state/did-you-mean.js.map +1 -0
  221. package/dist/core/state/expressions.js +170 -0
  222. package/dist/core/state/expressions.js.map +1 -0
  223. package/dist/core/state/known-names.js +96 -0
  224. package/dist/core/state/known-names.js.map +1 -0
  225. package/dist/core/state/rules/aql-legacy-shape.js +42 -0
  226. package/dist/core/state/rules/aql-legacy-shape.js.map +1 -0
  227. package/dist/core/state/rules/aql-missing.js +21 -0
  228. package/dist/core/state/rules/aql-missing.js.map +1 -0
  229. package/dist/core/state/rules/aql-syntax.js +77 -0
  230. package/dist/core/state/rules/aql-syntax.js.map +1 -0
  231. package/dist/core/state/rules/calculated-settings.js +23 -0
  232. package/dist/core/state/rules/calculated-settings.js.map +1 -0
  233. package/dist/core/state/rules/column-id-exists.js +29 -0
  234. package/dist/core/state/rules/column-id-exists.js.map +1 -0
  235. package/dist/core/state/rules/dashboard-module-names.js +31 -0
  236. package/dist/core/state/rules/dashboard-module-names.js.map +1 -0
  237. package/dist/core/state/rules/dashboard-toolbar-names.js +48 -0
  238. package/dist/core/state/rules/dashboard-toolbar-names.js.map +1 -0
  239. package/dist/core/state/rules/format-column-pivot-display-format.js +43 -0
  240. package/dist/core/state/rules/format-column-pivot-display-format.js.map +1 -0
  241. package/dist/core/state/rules/helpers.js +39 -0
  242. package/dist/core/state/rules/helpers.js.map +1 -0
  243. package/dist/core/state/rules/index.js +80 -0
  244. package/dist/core/state/rules/index.js.map +1 -0
  245. package/dist/core/state/rules/layout-column-refs.js +60 -0
  246. package/dist/core/state/rules/layout-column-refs.js.map +1 -0
  247. package/dist/core/state/rules/layout-current-exists.js +27 -0
  248. package/dist/core/state/rules/layout-current-exists.js.map +1 -0
  249. package/dist/core/state/rules/layout-non-empty.js +32 -0
  250. package/dist/core/state/rules/layout-non-empty.js.map +1 -0
  251. package/dist/core/state/rules/rule.js +2 -0
  252. package/dist/core/state/rules/rule.js.map +1 -0
  253. package/dist/core/state/rules/scope-column-refs.js +32 -0
  254. package/dist/core/state/rules/scope-column-refs.js.map +1 -0
  255. package/dist/core/state/rules/scope-shape.js +61 -0
  256. package/dist/core/state/rules/scope-shape.js.map +1 -0
  257. package/dist/core/state/rules/state-unique-name.js +40 -0
  258. package/dist/core/state/rules/state-unique-name.js.map +1 -0
  259. package/dist/core/state/rules/state-unknown-section.js +30 -0
  260. package/dist/core/state/rules/state-unknown-section.js.map +1 -0
  261. package/dist/core/state/rules/type-discriminator.js +70 -0
  262. package/dist/core/state/rules/type-discriminator.js.map +1 -0
  263. package/dist/core/state/type-check.js +408 -0
  264. package/dist/core/state/type-check.js.map +1 -0
  265. package/dist/mcp/index.js +109 -0
  266. package/dist/mcp/index.js.map +1 -0
  267. package/dist/mcp/server.js +110 -0
  268. package/dist/mcp/server.js.map +1 -0
  269. package/dist/skills/adaptable-debug/SKILL.md +145 -0
  270. package/dist/skills/adaptable-debug/VERSION.md +1 -0
  271. package/dist/skills/adaptable-debug/references/_shared/agents-snippet.md +3 -0
  272. package/dist/skills/adaptable-debug/references/_shared/capabilities.md +35 -0
  273. package/dist/skills/adaptable-debug/references/_shared/conversation.md +20 -0
  274. package/dist/skills/adaptable-debug/references/_shared/docs-protocol.md +36 -0
  275. package/dist/skills/adaptable-debug/references/_shared/grounding.md +54 -0
  276. package/dist/skills/adaptable-debug/references/_shared/guards.md +20 -0
  277. package/dist/skills/adaptable-debug/references/_shared/validation-loop.md +42 -0
  278. package/dist/skills/adaptable-debug/references/devtools-api.md +36 -0
  279. package/dist/skills/adaptable-debug/references/feedback-template.md +36 -0
  280. package/dist/skills/adaptable-debug/references/symptoms.md +37 -0
  281. package/dist/skills/adaptable-debug/references/ticket-template.md +50 -0
  282. package/dist/skills/adaptable-dev/SKILL.md +97 -0
  283. package/dist/skills/adaptable-dev/VERSION.md +1 -0
  284. package/dist/skills/adaptable-dev/references/_shared/agents-snippet.md +3 -0
  285. package/dist/skills/adaptable-dev/references/_shared/capabilities.md +35 -0
  286. package/dist/skills/adaptable-dev/references/_shared/conversation.md +20 -0
  287. package/dist/skills/adaptable-dev/references/_shared/docs-protocol.md +36 -0
  288. package/dist/skills/adaptable-dev/references/_shared/grounding.md +54 -0
  289. package/dist/skills/adaptable-dev/references/_shared/guards.md +20 -0
  290. package/dist/skills/adaptable-dev/references/_shared/validation-loop.md +42 -0
  291. package/dist/skills/adaptable-dev/references/recommendations.md +93 -0
  292. package/dist/skills/adaptable-setup/SKILL.md +158 -0
  293. package/dist/skills/adaptable-setup/VERSION.md +1 -0
  294. package/dist/skills/adaptable-setup/references/_shared/agents-snippet.md +3 -0
  295. package/dist/skills/adaptable-setup/references/_shared/capabilities.md +35 -0
  296. package/dist/skills/adaptable-setup/references/_shared/conversation.md +20 -0
  297. package/dist/skills/adaptable-setup/references/_shared/docs-protocol.md +36 -0
  298. package/dist/skills/adaptable-setup/references/_shared/grounding.md +54 -0
  299. package/dist/skills/adaptable-setup/references/_shared/guards.md +20 -0
  300. package/dist/skills/adaptable-setup/references/_shared/validation-loop.md +42 -0
  301. package/dist/skills/adaptable-setup/references/paths.md +45 -0
  302. package/dist/skills/adaptable-upgrade/SKILL.md +269 -0
  303. package/dist/skills/adaptable-upgrade/VERSION.md +1 -0
  304. package/dist/skills/adaptable-upgrade/references/_shared/agents-snippet.md +3 -0
  305. package/dist/skills/adaptable-upgrade/references/_shared/capabilities.md +35 -0
  306. package/dist/skills/adaptable-upgrade/references/_shared/conversation.md +20 -0
  307. package/dist/skills/adaptable-upgrade/references/_shared/docs-protocol.md +36 -0
  308. package/dist/skills/adaptable-upgrade/references/_shared/grounding.md +54 -0
  309. package/dist/skills/adaptable-upgrade/references/_shared/guards.md +20 -0
  310. package/dist/skills/adaptable-upgrade/references/_shared/validation-loop.md +42 -0
  311. package/dist/skills/adaptable-upgrade/references/apply-order.md +171 -0
  312. package/dist/skills/adaptable-upgrade/references/plan-preamble.md +151 -0
  313. package/dist/skills/adaptable-upgrade/scripts/adaptable.mjs +24 -0
  314. package/package.json +34 -13
  315. package/dist/adaptable/loadEntry.js +0 -94
  316. package/dist/adaptable/loadEntry.js.map +0 -1
  317. package/dist/adaptable/types.js.map +0 -1
  318. package/dist/cache.js +0 -11
  319. package/dist/cache.js.map +0 -1
  320. package/dist/checks/stateRules.js +0 -389
  321. package/dist/checks/stateRules.js.map +0 -1
  322. package/dist/checks/stateTypes.js +0 -142
  323. package/dist/checks/stateTypes.js.map +0 -1
  324. package/dist/context.js +0 -39
  325. package/dist/context.js.map +0 -1
  326. package/dist/docs/corpus.js.map +0 -1
  327. package/dist/docs/search.js.map +0 -1
  328. package/dist/docs/source.js +0 -151
  329. package/dist/docs/source.js.map +0 -1
  330. package/dist/environment.js +0 -181
  331. package/dist/environment.js.map +0 -1
  332. package/dist/index.js +0 -7
  333. package/dist/index.js.map +0 -1
  334. package/dist/prompts.js +0 -84
  335. package/dist/prompts.js.map +0 -1
  336. package/dist/resources.js +0 -59
  337. package/dist/resources.js.map +0 -1
  338. package/dist/server.js +0 -23
  339. package/dist/server.js.map +0 -1
  340. package/dist/tools/checks.js +0 -250
  341. package/dist/tools/checks.js.map +0 -1
  342. package/dist/tools/docs.js +0 -173
  343. package/dist/tools/docs.js.map +0 -1
  344. package/dist/tools/environment.js +0 -52
  345. package/dist/tools/environment.js.map +0 -1
  346. package/skills/adaptable-dev/SKILL.md +0 -42
  347. /package/dist/{docs → core/docs}/corpus.js +0 -0
  348. /package/dist/{docs → core/docs}/search.js +0 -0
@@ -0,0 +1,35 @@
1
+ <!-- Generated by scripts/generate-bindings.ts from the capability registry. Do not edit; run `npm run generate`. -->
2
+
3
+ # Capabilities and their bindings
4
+
5
+ Every capability of `@adaptabletools/adaptable-mcp` (response schema 1) has a CLI command and, where listed, an MCP tool. Both run the same code and return the same envelope.
6
+
7
+ | Capability | MCP tool | CLI command | What it does |
8
+ | --- | --- | --- | --- |
9
+ | `anonymise` | — | `adaptable anonymise <file>` | Replaces the values of a State, Options, Grid Info, columns or row-data JSON with shape-preserving placeholders — names, column ids, expressions and structure kept, licence keys and user names redacted, row data scrubbed — for a support case. |
10
+ | `check-expression` | `check_expression` | `adaptable check expression <expression>` | Validates an AdapTableQL expression with the 24 engine: syntax, functions, kinds the module accepts, column references; exact rewrites for JavaScript-style operators and pre-24 syntax. |
11
+ | `migrate-expression` | `migrate_expression` | `adaptable migrate expression <expression>` | Rewrites one pre-24 AdapTableQL expression to the target major's syntax with the library's own migration (brace aggregations, named operands, legacy observable rules) and validates the result. |
12
+ | `aql-functions` | `list_expression_functions` | `adaptable aql functions` | Lists the AdapTableQL functions, aggregations, observable functions and clauses the engine accepts, with signatures, examples and docs slugs; filter by group, module or text. |
13
+ | `changes` | `list_changes` | `adaptable changes` | Lists the changes between two AdapTable majors from the release-note records; with --repo keeps the ones the project's code hits (file:line) and the ones that always apply. |
14
+ | `compat` | `get_compatibility` | `adaptable compat` | AG Grid pairing, wrapper packages and environment requirements for an AdapTable major, from the docs manifest. |
15
+ | `detect` | `detect_environment` | `adaptable detect` | Detects the AdapTable projects at or below the folder: versions, framework, AG Grid, source layout hints. |
16
+ | `convert-coldefs` | — | `adaptable convert coldefs <file>` | Turns AG Grid columnDefs into an AdapTable Layout (order, hidden columns, sizing, pinning, sorts, row groups, aggregations, pivots), lists the ColDef properties to remove with file:line, and the cellStyle / valueFormatter / valueGetter / cellRenderer snippets to re-express as Format, Calculated, Styled or Action Columns. The Layout is run through check state first. |
17
+ | `docs-list` | — | `adaptable docs list` | Lists the docs pages for the project’s AdapTable version, grouped by sidebar section: the feature index. |
18
+ | `docs-search` | `search_docs` | `adaptable docs search <query>` | Searches the docs for the project’s AdapTable version and framework; returns matching sections with slugs and URLs. |
19
+ | `docs-get` | `get_doc` | `adaptable docs get <pages...>` | Reads docs pages as Markdown for the project’s version and framework; one section with --section, demo code trimmed unless --full. |
20
+ | `docs-demos` | — | `adaptable docs demos <page>` | Lists the demos embedded in a docs page, with the files each demo owns. |
21
+ | `docs-demo` | `get_demo` | `adaptable docs demo <name>` | Returns one demo’s own files (adaptableOptions.ts by default; --files for others). Template files are never returned. |
22
+ | `migrate-state` | `migrate_state` | `adaptable migrate state <file>` | Migrates Adaptable State between majors with the library's own migration engine; reports the log, what the target major does not know (leftovers) and the check state result for the target. |
23
+ | `cache-add` | — | `adaptable cache add <spec>` | Downloads a @adaptabletools/adaptable version into the cache so checks and migrations for that major work offline. |
24
+ | `cache-list` | — | `adaptable cache list` | Shows cached library packages, bundled entries and docs corpora with sizes and ages. |
25
+ | `cache-clear` | — | `adaptable cache clear` | Removes cached docs corpora and/or library packages (with their entry bundles); everything when no flag is given. |
26
+ | `scaffold` | — | `adaptable scaffold` | Overlays the AdapTable files the docs demos run on onto a creator project (Vite or Angular CLI): columns, row data and an Initial State inferred from a CSV / JSON / XLSX file, dependencies pinned from the docs manifest, an AGENTS.md snippet. Never overwrites without --force. |
27
+ | `check-setup` | `check_setup` | `adaptable check setup` | Audits how AdapTable is wired into a project: stylesheet, required options, licence literal, version skew, AG Grid modules, column typing, direct grid use, ColDef ownership, React refs, ready hook, and the Options shape against the major’s types. |
28
+ | `check-state` | `check_state` | `adaptable check state <file>` | Validates Adaptable State (a JSON file or the literal in a .ts/.tsx/.js/.jsx/.vue file) against the checked major: shape, semantics, column references and AdapTableQL. |
29
+
30
+ ## Choosing a binding
31
+
32
+ - Prefer the MCP tool when the harness has the `adaptable` MCP server configured. Otherwise run the CLI command as `npx -y @adaptabletools/adaptable-mcp@canary <command> [options]`; add `--json` to read fields instead of Markdown.
33
+ - If neither binding exists for what you need — the capability is not in this table, not in `adaptable --capabilities`, or not in the MCP tool list — say so and fall back to the docs (see `docs-protocol.md`). Never improvise the result a missing capability would have produced.
34
+ - All bindings return the same envelope: `ok`, `data`, `issues`, `warnings`, and on failure `error { code, message, hint }`. CLI exit codes: `0` ok, `1` findings, `2` usage, `3` environment.
35
+ - Skill scripts cannot reach the agent's MCP session: a script only ever runs the CLI. When the CLI is unavailable, the agent performs the fallback itself.
@@ -0,0 +1,20 @@
1
+ # How to talk to the user
2
+
3
+ The skills mark instructions **Tell** and **Ask**; treat them literally.
4
+
5
+ - **"Tell the user X"** → show X in the conversation and continue working.
6
+ - **"Ask the user X"** → show the question and stop. Use the harness's
7
+ question tool when one exists. Do not answer your own question from context,
8
+ however obvious the answer looks — every Ask in these skills guards a choice
9
+ that is expensive to reverse (licence handling, ColDef migration, persisted
10
+ State, a package upgrade).
11
+
12
+ Phases that produce an artefact **write the file before the next phase
13
+ starts**, so a long task can be resumed from disk rather than from memory.
14
+
15
+ Never dump whole State objects, whole `getGridInfo()` results or full log
16
+ buffers into the conversation: extract the one section or the few lines the
17
+ decision needs, and keep the rest in the scratch file it was saved to.
18
+
19
+ End in plain prose: what changed, what was validated (name the check and its
20
+ result), and what remains manual. No envelope JSON in the final message.
@@ -0,0 +1,36 @@
1
+ # Reading the docs — don't guess
2
+
3
+ Training data is wrong for the installed version surprisingly often: option
4
+ names, State shapes and AdapTableQL syntax all move between majors. The docs
5
+ for the *detected* major are the source of truth, and they are one command
6
+ away. The bindings (CLI or MCP) are listed in `capabilities.md`.
7
+
8
+ ## The lookup order
9
+
10
+ 1. **Find the feature.** `docs list --section` groups every page by sidebar
11
+ section; `docs search "<topic>"` ranks matching sections. Start here —
12
+ AdapTable usually has a feature for what looks like a hand-rolled job.
13
+ 2. **Behaviour.** `docs get <handbook slug> --section "<heading>"` for how a
14
+ feature behaves; read the whole page only when the section is not obvious.
15
+ 3. **Shape.** `docs get technical-reference-<feature>` for the exact
16
+ State / Options object: property names, types, which are required.
17
+ 4. **A working example.** `docs demos <page>` lists a page's demos;
18
+ `docs demo <name>` returns the demo's own files. Adapt a demo's shape to
19
+ the project's columns rather than inventing one.
20
+ 5. **Expressions.** Before using an AdapTableQL function you are not certain
21
+ exists for the installed version, ask the engine: `aql functions --module
22
+ <Module> --query <text>` returns the name, call form and signatures the
23
+ version actually accepts.
24
+
25
+ With no shell, fetch `https://<docs host>/docs/<slug>/index.md` directly.
26
+
27
+ ## Rules
28
+
29
+ - Unfamiliar does not mean unsupported. If a page or function is absent from
30
+ the detected version's docs and catalogue, say so plainly instead of
31
+ writing it from memory.
32
+ - Before building anything from a primitive — a `valueGetter`, a custom cell
33
+ renderer, hand-rolled persisted state — check the feature index for an
34
+ AdapTable feature that already does it. Initial State, not code, is where
35
+ user-facing grid behaviour belongs.
36
+ - Cite the slug you used when reporting, so the user can read the same page.
@@ -0,0 +1,54 @@
1
+ # Grounding — do this first in every skill
2
+
3
+ AdapTable's Options, State shapes, API and AdapTableQL differ between majors,
4
+ and recalled knowledge is unreliable for any of them. Before writing, changing
5
+ or diagnosing anything, establish what is actually installed.
6
+
7
+ ## 1. Detect the project
8
+
9
+ ```bash
10
+ npx -y @adaptabletools/adaptable-mcp@canary detect --json
11
+ ```
12
+
13
+ (or the `detect_environment` MCP tool when the `adaptable` MCP server is
14
+ configured). Record from the result:
15
+
16
+ - the AdapTable major and exact version, and the paired AG Grid version,
17
+ - the framework (React, Angular, Vue or vanilla) and the wrapper package,
18
+ - the row model when one can be told (client-side vs server-side),
19
+ - every project found — in a monorepo, work in the project the task is about.
20
+
21
+ If detection reports no AdapTable (exit 3), the project either has AG Grid only
22
+ or nothing yet; the calling skill says which path to take from there.
23
+
24
+ With no shell and no MCP server, read `package.json` and the lockfile by hand —
25
+ `@adaptabletools/*` and `ag-grid-*` entries — and say in the report that the
26
+ versions were read by hand rather than detected.
27
+
28
+ ## 2. Freshness of this skill
29
+
30
+ Compare this skill's `VERSION.md` with
31
+ `https://<docs host>/.well-known/skills/VERSION` (best effort — skip silently
32
+ when it cannot be fetched). The docs host is the one `detect` resolved for the
33
+ project's major; a browser fetch or the shell both work.
34
+
35
+ - Skill older by a **minor**: tell the user, suggest
36
+ `npx skills add https://<docs host>`, then continue.
37
+ - Skill older by a **major**: tell the user to update the skill and stop —
38
+ instructions written for another major are worse than none.
39
+
40
+ One caveat on a project whose AdapTable major is not yet released (a canary
41
+ build, or a `24.x` range before the 24 release): the default docs host still
42
+ serves the current released major's docs. The symptoms are a `docs` command
43
+ failing with `DOCS_NOT_AVAILABLE`, or a warning that the docs host "is for
44
+ AdapTable N, not M". Pass `--docs-host https://<branch>.adaptabletools.com`
45
+ (or set `ADAPTABLE_MCP_DOCS_HOST`) on every command from then on so each
46
+ lookup below reads the pre-release docs.
47
+
48
+ ## 3. AG Grid siblings
49
+
50
+ Note whether the `ag-dev` and `ag-update` skills are installed. Column
51
+ definitions, AG Grid modules, row models, themes and the grid API belong to
52
+ AG Grid: hand that work to `ag-dev`, and AG Grid version bumps to `ag-update`,
53
+ rather than improvising either here. Everything that imports from
54
+ `@adaptabletools/*` stays in these skills.
@@ -0,0 +1,20 @@
1
+ # Guards — never cross these
2
+
3
+ - **No licence keys in source.** AdapTable and AG Grid keys come from
4
+ environment variables (`VITE_ADAPTABLE_LICENSE_KEY` /
5
+ `VITE_AG_GRID_LICENSE_KEY` in a Vite shell, the shell's own convention
6
+ elsewhere). A key pasted into a file, an example or a chat answer stays in
7
+ version control forever. When the user pastes a key, use it to configure the
8
+ environment file and do not echo it back.
9
+ - **Persisted State is the user's.** Never call `restoreState`, clear
10
+ `localStorage`, or change the state key (`adaptableId` / `stateKey` /
11
+ user name) without explicit confirmation in this conversation. Each of
12
+ those discards or orphans a user's saved Layouts, filters and settings.
13
+ - **Planning phases do not touch source.** A phase whose artefact is a plan
14
+ or a report writes only its own artefacts; application source changes wait
15
+ for the apply step the user approved.
16
+ - **Never echo a licence key out of a running grid.** `getGridInfo()` results
17
+ are saved with the key stripped before they are shown, attached or quoted.
18
+ - **Upgrade discovery does not read the codebase.** During an upgrade plan,
19
+ the CLI searches the code; reading whole source files defeats that and
20
+ burns context. Read a file only when a named change record points at it.
@@ -0,0 +1,42 @@
1
+ # The validation loop
2
+
3
+ Nothing AdapTable-shaped is "done" until the checker for the project's
4
+ detected major has seen it. The commands below are the CLI bindings; the MCP
5
+ tools named in `capabilities.md` return the same envelope.
6
+
7
+ ## What gets checked
8
+
9
+ - **Every AdapTableQL string** → `check expression "<expr>" --module <Module>`,
10
+ with `--columns <file>` when a columns file exists. The module matters: the
11
+ same text can be valid in one module and the wrong expression kind in
12
+ another.
13
+ - **Every State literal** (Initial State in source, or a persisted State
14
+ export) → `check state <file> [--columns <file>]`; persisted exports add
15
+ `--kind persistent`.
16
+ - **Setup and wiring** — after any change to Adaptable Options, the wrapper
17
+ components, `columnDefs` or modules → `check setup`.
18
+
19
+ ## The loop
20
+
21
+ 1. Run the check with `--json` and read `issues`, not just the exit code.
22
+ 2. Fix what it names. Each issue carries a rule id and, for the common cases,
23
+ an exact fix — apply that fix rather than a paraphrase.
24
+ 3. Re-check while the result shows `requiresAnotherCheckAfterFix`, at most
25
+ **three rounds**. If issues remain after that, stop and report the
26
+ remaining issues verbatim; do not summarise them into a false "clean".
27
+
28
+ ## Column lists
29
+
30
+ Column references are checked against a columns file: the `columnDefs` source
31
+ file, or `getColumns()` output from the running grid (debug skill) saved to a
32
+ file. Never retype a column list from memory or from the conversation — a
33
+ retyped list silently drifts from the grid it describes.
34
+
35
+ A `columnDefs` file knows the grid's own columns only. Ids that the State
36
+ defines — Calculated Columns above all — are known to `check state`, which
37
+ reads them from the literal it checks, but not to a standalone
38
+ `check expression --columns <columnDefs file>`: an `AQL_UNKNOWN_COLUMN` on a
39
+ Calculated Column id there is the missing context, not a wrong expression.
40
+ Validate such expressions through `check state` on the literal that holds
41
+ them, or pass `getColumns()` output (which lists Calculated Columns) as the
42
+ columns file.
@@ -0,0 +1,45 @@
1
+ ---
2
+ sources:
3
+ docs: [getting-started-integration, react-integration, angular-integration, vue-overview, getting-started-license-key, dev-guide-adaptable-state-persistence]
4
+ paths: [packages/adaptable-mcp/data/templates/manifest.json, packages/adaptable-mcp/src/core/scaffold/overlay.ts]
5
+ ---
6
+
7
+ # Framework paths
8
+
9
+ Where the AdapTable files live per framework. `scaffold` writes exactly this
10
+ layout; on path A (existing grid) add the same files beside the existing
11
+ `columnDefs` / `gridOptions` rather than moving them.
12
+
13
+ | Framework | Source folder | Entry the wiring lands in | Wrapper |
14
+ | --- | --- | --- | --- |
15
+ | React (Vite) | `src/` | `src/App.tsx` | `@adaptabletools/adaptable-react-aggrid` — `Adaptable.Provider` + `Adaptable.AgGridReact` |
16
+ | Angular | `src/app/` | the root standalone component (`src/app/app.ts`, or `src/app/app.component.ts`) | `@adaptabletools/adaptable-angular-aggrid` — `<adaptable-provider>`, `<adaptable-ui>`, `<ag-grid-angular *adaptable>` |
17
+ | Vue (Vite) | `src/` | `src/App.vue` | `@adaptabletools/adaptable-vue-aggrid` — `AdaptableProvider` + `AdaptableAgGridVue` |
18
+ | Vanilla (Vite) | `src/` | `src/main.ts` | `@adaptabletools/adaptable` — `Adaptable.init(options, { gridOptions, modules })` |
19
+
20
+ Generated files in the source folder: `columnDefs.ts`, `rowData.ts`,
21
+ `adaptableOptions.ts`, `gridOptions.ts`, `agGridModules.ts`, `licenses.ts`,
22
+ `onAdaptableReady.ts`, plus `styles.css` carrying the AdapTable stylesheet
23
+ import. The exact per-framework file set is recorded in
24
+ `packages/adaptable-mcp/data/templates/manifest.json` (`srcDir`,
25
+ `indexHtmlPath`, wrapper package) — when this table and the manifest disagree,
26
+ the manifest wins and this file is stale.
27
+
28
+ Framework specifics that bite:
29
+
30
+ - **React:** keep the Adaptable Options, `gridOptions` and `rowData`
31
+ references stable across renders (module scope or `useRef`); recreating
32
+ them per render remounts the grid.
33
+ - **Angular:** the stylesheet goes to the global `src/styles.css`, not a
34
+ component stylesheet (component style budgets reject it). A production
35
+ build of AG Grid Enterprise + AdapTable exceeds the default 1 MB `initial`
36
+ budget — raise the budget in `angular.json`; that is expected, not an error.
37
+ - **Vue:** the AdapTable stylesheet imports are added in `App.vue` because
38
+ the creator's `main.ts` is left untouched.
39
+ - **Vanilla:** `Adaptable.init` returns the API asynchronously through the
40
+ ready handler; do not hold the grid API from before it fires.
41
+
42
+ Licence keys are read from environment variables in `licenses.ts` (Vite:
43
+ `VITE_ADAPTABLE_LICENSE_KEY` / `VITE_AG_GRID_LICENSE_KEY`); Angular reads its
44
+ environment file — the generated file names the variables. Keys never appear
45
+ as literals in any of these files.
@@ -0,0 +1,269 @@
1
+ ---
2
+ name: adaptable-upgrade
3
+ description: "Use when moving @adaptabletools/* packages to a newer major (from 21 or later, to 22, 23 or 24 — one step or several), including the coupled AG Grid upgrade, Adaptable State migration, and Adaptable Options, API, object-type, CSS and AdapTableQL changes. Plans first, writing ADAPTABLE_UPGRADE_*.md files; applies the plan in a separate session. Not for persisted-State problems in an otherwise current app (adaptable-debug)."
4
+ ---
5
+
6
+ # adaptable-upgrade — plan an AdapTable major upgrade, then apply it
7
+
8
+ Two modes, two sessions. **Plan mode** writes `ADAPTABLE_UPGRADE_SCOPE.md`,
9
+ `ADAPTABLE_UPGRADE_CHANGES.md` and `ADAPTABLE_UPGRADE_STATE/` and touches
10
+ nothing else. **Apply mode** starts from those files in a fresh session and
11
+ changes the application. You are in apply mode only when the user asks to
12
+ apply an existing plan; everything else is plan mode.
13
+
14
+ Shared protocol, read once: [grounding](references/_shared/grounding.md)
15
+ (always first), [conversation](references/_shared/conversation.md),
16
+ [guards](references/_shared/guards.md),
17
+ [validation loop](references/_shared/validation-loop.md). Command bindings
18
+ are in [capabilities](references/_shared/capabilities.md). The file
19
+ templates are in [plan-preamble](references/plan-preamble.md); the apply
20
+ sequence is [apply-order](references/apply-order.md).
21
+
22
+ ## Rules
23
+
24
+ - Phases run in order and each writes its file before the next starts. Do
25
+ not combine phases or use a later phase's information in an earlier one.
26
+ - **Tell** the user X → show it and continue. **Ask** the user X → show the
27
+ question and stop until answered (use the harness's question tool if any).
28
+ - Change discovery does not read application source. The CLI searches the
29
+ repository; read a file only when a change record names it (guards).
30
+ - Use no AdapTable tooling other than this skill and the `adaptable` CLI or
31
+ its MCP tools — not the State Migration Tool's UI, not hand-written
32
+ migration scripts, not recalled release notes.
33
+ - AG Grid is coupled but not yours: its version bump goes through `ag-update`
34
+ or AG Grid's own upgrade guide. Never recommend AG Grid's codemod as part of
35
+ an AdapTable upgrade, and never copy AG Grid change content into the plan.
36
+ - Plan mode never edits application source or `package.json` (guards). Apply
37
+ mode never bumps a package without the plan that names the target.
38
+
39
+ Every command below is shown as the CLI; the MCP tool of the same name is
40
+ equivalent except `list_changes`, which returns records only (no repository
41
+ search, no `--with-docs`) — change discovery therefore runs the CLI. File
42
+ paths passed to the CLI resolve from the shell's working directory; run it
43
+ from the repository root and pass paths from there.
44
+
45
+ ## Plan mode
46
+
47
+ ### Phase 1 — Ground and freshness
48
+
49
+ Run `detect` as grounding describes and the freshness check against
50
+ `.well-known/skills/VERSION`. A skill older by a **major** is a hard stop:
51
+ tell the user to run `npx skills add https://<docs host>` and do nothing
52
+ else. Older by a minor: tell, then continue.
53
+
54
+ ### Phase 2 — Resume check
55
+
56
+ Look for `ADAPTABLE_UPGRADE_*.md` and `ADAPTABLE_UPGRADE_STATE/` at the
57
+ repository root. If any exist, **ask**: start fresh (delete them) or resume
58
+ (skip every phase whose file already exists, in order). Never resume
59
+ silently — a stale SCOPE from another target poisons every later phase.
60
+
61
+ ### Phase 3 — Scope → `ADAPTABLE_UPGRADE_SCOPE.md`
62
+
63
+ ```bash
64
+ npx -y @adaptabletools/adaptable-mcp@canary detect --all-projects --json
65
+ ```
66
+
67
+ Record per project: path, framework and wrapper package, AdapTable range and
68
+ major, AG Grid package / version / edition, package manager, the
69
+ `initialStateLiterals` and `columnDefsFiles` lists (phase 5 uses them). In a
70
+ monorepo the user may want a subset — list them all and let them choose.
71
+
72
+ **Floor.** A project below major 21 stops the skill: tell the user the
73
+ change records start at 21 → 22 and point at the release notes for the
74
+ earlier steps (`https://www.adaptabletools.com/support/version-<N>0-release-note`,
75
+ one per major), then stop. `changes` says the same with exit 3 if it is ever
76
+ run against such a project.
77
+
78
+ **Target.** The user's choice when given; otherwise the `latest` the
79
+ manifest reports:
80
+
81
+ ```bash
82
+ npx -y @adaptabletools/adaptable-mcp@canary compat --adaptable <target>
83
+ npx -y @adaptabletools/adaptable-mcp@canary compat --adaptable <target> --ag-grid <installed AG Grid major>
84
+ ```
85
+
86
+ `compat` returns the target's AG Grid pairing, wrapper packages and
87
+ environment minimums (Node, TypeScript, framework). Compare the minimums
88
+ with what `detect` found (`typescript`, `frameworkVersions`, the running
89
+ Node) and write every shortfall into SCOPE next to the minimum — a
90
+ TypeScript below the target's floor fails the type-check in apply mode
91
+ before any record is applied. When the installed AG Grid cannot move (a platform constraint, another team's grid), run `compat`
92
+ once per candidate major between the current one and `latest` and tell the
93
+ user which targets the installed AG Grid allows; a target whose pairing the
94
+ installed AG Grid does not satisfy needs phase 4.
95
+
96
+ **Ask** the user to confirm: the projects in scope, each project's current
97
+ versions as detected, and the target major (and tag — a pre-release target
98
+ is installed by its dist-tag, e.g. `canary`). Write
99
+ `ADAPTABLE_UPGRADE_SCOPE.md` in the format of [plan-preamble](references/plan-preamble.md),
100
+ recording the answers and the target's environment minimums from `compat`.
101
+
102
+ ### Phase 4 — AG Grid coupling (appended to SCOPE)
103
+
104
+ Compare each project's installed AG Grid with the target's pairing from
105
+ phase 3. When it already satisfies the pairing, write "no AG Grid change" and
106
+ continue. Otherwise **tell** the user:
107
+
108
+ > AdapTable <target> pairs with AG Grid <pairing>; this project has AG Grid
109
+ > <installed>. The AG Grid upgrade is separate work.
110
+
111
+ and **ask** which of these to record:
112
+
113
+ 1. **Run `ag-update` now** (only when grounding found it installed) — its
114
+ `AG_UPDATE_*.md` plan joins this one and apply mode applies both, AG Grid
115
+ first. Run it before continuing, in this session, so its plan exists when
116
+ SCOPE is written.
117
+ 2. **Bump only** — the plan includes the AG Grid version bump plus the link
118
+ to AG Grid's own upgrade guide for the installed → required majors, and
119
+ the user handles AG Grid's breaking changes themselves.
120
+ 3. **Already handled** — AG Grid is being upgraded elsewhere; the plan
121
+ assumes the pairing is met when apply mode starts.
122
+
123
+ Append the answer under `## AG Grid plan` in SCOPE, with the exact AG Grid
124
+ version to install (the pairing's minimum, or AG Grid's latest patch of
125
+ that major when the user prefers).
126
+
127
+ ### Phase 5 — Changes → `ADAPTABLE_UPGRADE_CHANGES.md` and `ADAPTABLE_UPGRADE_STATE/`
128
+
129
+ Start the file with the preamble from [plan-preamble](references/plan-preamble.md),
130
+ then append the CLI's Markdown from its `# Changes <n> → <m>` heading onward
131
+ **verbatim** — do not summarise, reorder or drop the "Not matched" lists.
132
+ What precedes that heading (the context line, warnings, the `## Issues`
133
+ index) is the CLI's own chrome: read it, act on the warnings, leave it out
134
+ of the plan.
135
+
136
+ ```bash
137
+ npx -y @adaptabletools/adaptable-mcp@canary changes --from <current> --to <target> \
138
+ --repo <repository root> --projects <project folders from SCOPE> --with-docs
139
+ ```
140
+
141
+ One call covers every transition in order (`21 → 22`, `22 → 23`, `23 → 24`
142
+ as needed), sectioned per transition and, inside each, ordered Packages &
143
+ CSS → State → Options → API → Objects → AdapTableQL → Deployment. Each
144
+ record carries its type (`BREAKING` / `BEHAVIOUR` / `DEPRECATED`), whether
145
+ State migration handles it, the `before → after` rows, the remedy note, the
146
+ release-note anchor and the `file:line` matches in the repository.
147
+ `--with-docs` inlines the release-note section behind each kept record so
148
+ apply mode reads the remedy from the plan file instead of paying one
149
+ `docs get` per record. Offline, the CLI skips it with a warning: keep going
150
+ and write under the preamble that the release-note sections were not inlined
151
+ and apply mode must `docs get` each record's anchor. A pre-release target
152
+ needs `--docs-host https://<branch>.adaptabletools.com` (grounding); the
153
+ CLI then warns that this host is not the one for the lower transitions —
154
+ expected, the release notes of every major are served there too. Projects
155
+ on different current majors: one call per distinct current major, with that
156
+ major's projects in `--projects`, appended in ascending order.
157
+
158
+ Then, for every file in each project's `initialStateLiterals`:
159
+
160
+ ```bash
161
+ mkdir -p ADAPTABLE_UPGRADE_STATE
162
+ npx -y @adaptabletools/adaptable-mcp@canary migrate state <project>/<file> --from <current> --to <target> \
163
+ --kind initial --columns <project>/<columnDefs file> --out ADAPTABLE_UPGRADE_STATE/<project>--<file>.json \
164
+ > ADAPTABLE_UPGRADE_STATE/<project>--<file>.md
165
+ ```
166
+
167
+ (`--columns` takes the project's first `columnDefsFiles` entry; omit it
168
+ when the project has none — the post-check then skips the column rules.)
169
+ The `.json` is the migrated State (the engine's own output, functions and
170
+ imports stubbed and listed as `unverifiable`); the `.md` is the report:
171
+ migration log, `leftovers` (keys the target does not know, with their
172
+ position in the source — exit 1 when any exist), the `unverifiable` list to
173
+ re-attach, and the `check state --major <target>` result. Exit 2 with
174
+ `EXTRACTION_FAILED` means the State is built at run time (a function call,
175
+ a fetched file): record the file under `## State literals` as "not
176
+ extractable — migrate at run time or export the built State and migrate the
177
+ export", and move on. Link every pair under `## State literals` in
178
+ `ADAPTABLE_UPGRADE_CHANGES.md` with its leftover count. Never paste a
179
+ migrated State into the conversation — the files are the artefact.
180
+
181
+ ### Phase 6 — Trim
182
+
183
+ In `ADAPTABLE_UPGRADE_CHANGES.md`, list every record whose type line reads
184
+ `**BEHAVIOUR**` or `**DEPRECATED**` (title, type and the `before → after`
185
+ rows only — not the note). `BREAKING` records are not up for discussion,
186
+ and neither are the records under a `### Deployment` heading: those are
187
+ release gotchas (Team Sharing roll-out, duplicate `Name`s in stores), not
188
+ code changes — they stay in the plan whatever their type, and apply mode's
189
+ final report quotes them.
190
+
191
+ None: **tell** the user "No behaviour changes or deprecations apply to this
192
+ project" and go to phase 7. Otherwise **tell** the user the counts and what
193
+ each type means — a `BEHAVIOUR` change is the same code giving a different
194
+ result, and the note says how to restore the former result; a `DEPRECATED`
195
+ item still works on the target and is removed in a later major — then
196
+ **ask**, per record, whether to **accept** it (take the new behaviour /
197
+ defer the deprecation; the record is removed from the plan) or **mitigate**
198
+ it (the record stays and apply mode performs the note). Offer to explain any
199
+ of them first. With many records, do this as a conversation rather than one
200
+ form; wait for a decision on every record.
201
+
202
+ Edit the file: delete the accepted records (heading through its last bullet
203
+ and inlined section); keep the rest. When any `BEHAVIOUR` / `DEPRECATED`
204
+ record remains, append the `# Validation` section from
205
+ [plan-preamble](references/plan-preamble.md). Confirm the file now holds
206
+ either no such record or a `# Validation` section before continuing.
207
+
208
+ ### Phase 7 — Report
209
+
210
+ **Tell** the user the plan is ready, where the three artefacts are, how many
211
+ `BREAKING` records and State files it holds, and show this text verbatim:
212
+
213
+ ```
214
+ Start a new agent session (or clear this one) and ask it to apply the plan in
215
+ ADAPTABLE_UPGRADE_CHANGES.md with the adaptable-upgrade skill. It will bump AG Grid
216
+ per ADAPTABLE_UPGRADE_SCOPE.md and every @adaptabletools/* package to the target,
217
+ install, apply the BREAKING records file by file, replace each initialState literal
218
+ with its migrated copy from ADAPTABLE_UPGRADE_STATE/, apply the BEHAVIOUR and
219
+ DEPRECATED mitigations you kept, then validate with check state, check expression
220
+ and check setup, type-check, build and a run of the application. Read the browser
221
+ console on that run: AdapTable logs every State object it migrated and marks what
222
+ it could not convert "(needs migration)".
223
+ ```
224
+
225
+ Plan mode ends here. Nothing in the application has changed.
226
+
227
+ ## Apply mode
228
+
229
+ Read `ADAPTABLE_UPGRADE_SCOPE.md` and `ADAPTABLE_UPGRADE_CHANGES.md` first;
230
+ the plan, not the repository, is the list of work. Follow
231
+ [apply-order](references/apply-order.md) step by step:
232
+
233
+ 1. **Packages.** AG Grid per SCOPE's `## AG Grid plan` (an `AG_UPDATE_*.md`
234
+ plan first when one exists), then every `@adaptabletools/*` package to the
235
+ same target version; install; the wrapper package names come from
236
+ `compat --adaptable <target> --framework <fw>`.
237
+ 2. **`BREAKING` records**, in the plan's order, file by file through their
238
+ `file:line` matches. For State: replace each `initialState` literal with
239
+ its `ADAPTABLE_UPGRADE_STATE/*.json`, re-attach the functions and imports
240
+ the report lists as `unverifiable`, re-author every leftover from the
241
+ record it belongs to. For AdapTableQL strings outside State:
242
+ `migrate expression "<aql>" --from <n> --to <m> --module <Module>`.
243
+ 3. **Kept `BEHAVIOUR` / `DEPRECATED` mitigations**, then the `# Validation`
244
+ double-check the plan asks for.
245
+ 4. **Validate** (validation loop, three rounds at most): `check state` on
246
+ every rewritten literal with `--major <target>` and the project's
247
+ columns, `check expression` on every rewritten string (targets 24 and
248
+ later), `check setup`, type-check, build.
249
+ 5. **Run** the application and read the console — `getLogs(id, { level:
250
+ ['warn', 'error'] })` through a browser tool, or the paste-back call —
251
+ for `(needs migration)` markers and migration warnings. Report them as
252
+ the manual leftovers list; they are objects the runtime could not
253
+ convert, not tool failures.
254
+ 6. **Persisted State.** The team decides and tests, explicitly: how user
255
+ State stored under each state key migrates on first load, remote
256
+ persistence payloads, Team Sharing roll-out
257
+ (`persistMigratedSharedEntities`, all clients together), and whether
258
+ `autoMigrateState` stays on. Tell, do not do: nothing in storage is
259
+ touched without confirmation (guards).
260
+ 7. **Final report** in prose: packages moved, files changed, what was
261
+ validated, the leftovers list, and the `Deployment` records from the plan
262
+ as the release gotchas.
263
+
264
+ **Done when (plan):** the three artefacts exist, SCOPE records the user's
265
+ confirmed projects, target and AG Grid decision, CHANGES holds the CLI
266
+ output verbatim plus the trim decisions, no application file changed.
267
+ **Done when (apply):** build green; `check state` / `check expression` /
268
+ `check setup` clean; the application starts; the leftovers list is in the
269
+ report.
@@ -0,0 +1 @@
1
+ 0.1.0-canary.1
@@ -0,0 +1,3 @@
1
+ <!-- BEGIN:adaptable-agent-rules -->
2
+ AdapTable (`@adaptabletools/*`) is used in this project. Its Options, State shapes, API and AdapTableQL change between majors, so do not rely on recalled knowledge. Before writing or changing AdapTable code use the `adaptable-dev` skill; for first-time integration `adaptable-setup`; for a misbehaving running grid `adaptable-debug`; for version upgrades `adaptable-upgrade`. Validate State, expressions and setup with `npx -y @adaptabletools/adaptable-mcp@canary check …` (or the `check_*` MCP tools when configured); read the docs for the installed version with `npx -y @adaptabletools/adaptable-mcp@canary docs search "<topic>"`. Pure AG Grid questions go to the `ag-dev` skill or AG Grid's documentation.
3
+ <!-- END:adaptable-agent-rules -->
@@ -0,0 +1,35 @@
1
+ <!-- Generated by scripts/generate-bindings.ts from the capability registry. Do not edit; run `npm run generate`. -->
2
+
3
+ # Capabilities and their bindings
4
+
5
+ Every capability of `@adaptabletools/adaptable-mcp` (response schema 1) has a CLI command and, where listed, an MCP tool. Both run the same code and return the same envelope.
6
+
7
+ | Capability | MCP tool | CLI command | What it does |
8
+ | --- | --- | --- | --- |
9
+ | `anonymise` | — | `adaptable anonymise <file>` | Replaces the values of a State, Options, Grid Info, columns or row-data JSON with shape-preserving placeholders — names, column ids, expressions and structure kept, licence keys and user names redacted, row data scrubbed — for a support case. |
10
+ | `check-expression` | `check_expression` | `adaptable check expression <expression>` | Validates an AdapTableQL expression with the 24 engine: syntax, functions, kinds the module accepts, column references; exact rewrites for JavaScript-style operators and pre-24 syntax. |
11
+ | `migrate-expression` | `migrate_expression` | `adaptable migrate expression <expression>` | Rewrites one pre-24 AdapTableQL expression to the target major's syntax with the library's own migration (brace aggregations, named operands, legacy observable rules) and validates the result. |
12
+ | `aql-functions` | `list_expression_functions` | `adaptable aql functions` | Lists the AdapTableQL functions, aggregations, observable functions and clauses the engine accepts, with signatures, examples and docs slugs; filter by group, module or text. |
13
+ | `changes` | `list_changes` | `adaptable changes` | Lists the changes between two AdapTable majors from the release-note records; with --repo keeps the ones the project's code hits (file:line) and the ones that always apply. |
14
+ | `compat` | `get_compatibility` | `adaptable compat` | AG Grid pairing, wrapper packages and environment requirements for an AdapTable major, from the docs manifest. |
15
+ | `detect` | `detect_environment` | `adaptable detect` | Detects the AdapTable projects at or below the folder: versions, framework, AG Grid, source layout hints. |
16
+ | `convert-coldefs` | — | `adaptable convert coldefs <file>` | Turns AG Grid columnDefs into an AdapTable Layout (order, hidden columns, sizing, pinning, sorts, row groups, aggregations, pivots), lists the ColDef properties to remove with file:line, and the cellStyle / valueFormatter / valueGetter / cellRenderer snippets to re-express as Format, Calculated, Styled or Action Columns. The Layout is run through check state first. |
17
+ | `docs-list` | — | `adaptable docs list` | Lists the docs pages for the project’s AdapTable version, grouped by sidebar section: the feature index. |
18
+ | `docs-search` | `search_docs` | `adaptable docs search <query>` | Searches the docs for the project’s AdapTable version and framework; returns matching sections with slugs and URLs. |
19
+ | `docs-get` | `get_doc` | `adaptable docs get <pages...>` | Reads docs pages as Markdown for the project’s version and framework; one section with --section, demo code trimmed unless --full. |
20
+ | `docs-demos` | — | `adaptable docs demos <page>` | Lists the demos embedded in a docs page, with the files each demo owns. |
21
+ | `docs-demo` | `get_demo` | `adaptable docs demo <name>` | Returns one demo’s own files (adaptableOptions.ts by default; --files for others). Template files are never returned. |
22
+ | `migrate-state` | `migrate_state` | `adaptable migrate state <file>` | Migrates Adaptable State between majors with the library's own migration engine; reports the log, what the target major does not know (leftovers) and the check state result for the target. |
23
+ | `cache-add` | — | `adaptable cache add <spec>` | Downloads a @adaptabletools/adaptable version into the cache so checks and migrations for that major work offline. |
24
+ | `cache-list` | — | `adaptable cache list` | Shows cached library packages, bundled entries and docs corpora with sizes and ages. |
25
+ | `cache-clear` | — | `adaptable cache clear` | Removes cached docs corpora and/or library packages (with their entry bundles); everything when no flag is given. |
26
+ | `scaffold` | — | `adaptable scaffold` | Overlays the AdapTable files the docs demos run on onto a creator project (Vite or Angular CLI): columns, row data and an Initial State inferred from a CSV / JSON / XLSX file, dependencies pinned from the docs manifest, an AGENTS.md snippet. Never overwrites without --force. |
27
+ | `check-setup` | `check_setup` | `adaptable check setup` | Audits how AdapTable is wired into a project: stylesheet, required options, licence literal, version skew, AG Grid modules, column typing, direct grid use, ColDef ownership, React refs, ready hook, and the Options shape against the major’s types. |
28
+ | `check-state` | `check_state` | `adaptable check state <file>` | Validates Adaptable State (a JSON file or the literal in a .ts/.tsx/.js/.jsx/.vue file) against the checked major: shape, semantics, column references and AdapTableQL. |
29
+
30
+ ## Choosing a binding
31
+
32
+ - Prefer the MCP tool when the harness has the `adaptable` MCP server configured. Otherwise run the CLI command as `npx -y @adaptabletools/adaptable-mcp@canary <command> [options]`; add `--json` to read fields instead of Markdown.
33
+ - If neither binding exists for what you need — the capability is not in this table, not in `adaptable --capabilities`, or not in the MCP tool list — say so and fall back to the docs (see `docs-protocol.md`). Never improvise the result a missing capability would have produced.
34
+ - All bindings return the same envelope: `ok`, `data`, `issues`, `warnings`, and on failure `error { code, message, hint }`. CLI exit codes: `0` ok, `1` findings, `2` usage, `3` environment.
35
+ - Skill scripts cannot reach the agent's MCP session: a script only ever runs the CLI. When the CLI is unavailable, the agent performs the fallback itself.
@@ -0,0 +1,20 @@
1
+ # How to talk to the user
2
+
3
+ The skills mark instructions **Tell** and **Ask**; treat them literally.
4
+
5
+ - **"Tell the user X"** → show X in the conversation and continue working.
6
+ - **"Ask the user X"** → show the question and stop. Use the harness's
7
+ question tool when one exists. Do not answer your own question from context,
8
+ however obvious the answer looks — every Ask in these skills guards a choice
9
+ that is expensive to reverse (licence handling, ColDef migration, persisted
10
+ State, a package upgrade).
11
+
12
+ Phases that produce an artefact **write the file before the next phase
13
+ starts**, so a long task can be resumed from disk rather than from memory.
14
+
15
+ Never dump whole State objects, whole `getGridInfo()` results or full log
16
+ buffers into the conversation: extract the one section or the few lines the
17
+ decision needs, and keep the rest in the scratch file it was saved to.
18
+
19
+ End in plain prose: what changed, what was validated (name the check and its
20
+ result), and what remains manual. No envelope JSON in the final message.
@@ -0,0 +1,36 @@
1
+ # Reading the docs — don't guess
2
+
3
+ Training data is wrong for the installed version surprisingly often: option
4
+ names, State shapes and AdapTableQL syntax all move between majors. The docs
5
+ for the *detected* major are the source of truth, and they are one command
6
+ away. The bindings (CLI or MCP) are listed in `capabilities.md`.
7
+
8
+ ## The lookup order
9
+
10
+ 1. **Find the feature.** `docs list --section` groups every page by sidebar
11
+ section; `docs search "<topic>"` ranks matching sections. Start here —
12
+ AdapTable usually has a feature for what looks like a hand-rolled job.
13
+ 2. **Behaviour.** `docs get <handbook slug> --section "<heading>"` for how a
14
+ feature behaves; read the whole page only when the section is not obvious.
15
+ 3. **Shape.** `docs get technical-reference-<feature>` for the exact
16
+ State / Options object: property names, types, which are required.
17
+ 4. **A working example.** `docs demos <page>` lists a page's demos;
18
+ `docs demo <name>` returns the demo's own files. Adapt a demo's shape to
19
+ the project's columns rather than inventing one.
20
+ 5. **Expressions.** Before using an AdapTableQL function you are not certain
21
+ exists for the installed version, ask the engine: `aql functions --module
22
+ <Module> --query <text>` returns the name, call form and signatures the
23
+ version actually accepts.
24
+
25
+ With no shell, fetch `https://<docs host>/docs/<slug>/index.md` directly.
26
+
27
+ ## Rules
28
+
29
+ - Unfamiliar does not mean unsupported. If a page or function is absent from
30
+ the detected version's docs and catalogue, say so plainly instead of
31
+ writing it from memory.
32
+ - Before building anything from a primitive — a `valueGetter`, a custom cell
33
+ renderer, hand-rolled persisted state — check the feature index for an
34
+ AdapTable feature that already does it. Initial State, not code, is where
35
+ user-facing grid behaviour belongs.
36
+ - Cite the slug you used when reporting, so the user can read the same page.