@adaptabletools/adaptable-mcp 0.1.0-canary.1 → 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.
- package/README.md +3 -1
- package/data/changes/21-22.json +542 -0
- package/data/changes/22-23.json +639 -0
- package/data/changes/23-24.json +1874 -0
- package/data/manifest.snapshot.json +28 -10
- package/data/templates/angular/src/app/adaptableOptions.ts +40 -0
- package/data/templates/angular/src/app/agGridModules.ts +7 -0
- package/data/templates/angular/src/app/app.component.ts +66 -0
- package/data/templates/angular/src/app/app.module.ts +14 -0
- package/data/templates/angular/src/app/columnDefs.ts +121 -0
- package/data/templates/angular/src/app/gridOptions.ts +32 -0
- package/data/templates/angular/src/app/onAdaptableReady.ts +11 -0
- package/data/templates/angular/src/app/rowData.ts +851 -0
- package/data/templates/angular/src/app/styles.css +50 -0
- package/data/templates/angular/src/index.html +17 -0
- package/data/templates/angular/src/main.ts +18 -0
- package/data/templates/angular/src/polyfills.ts +1 -0
- package/data/templates/angular/tsconfig.json +16 -0
- package/data/templates/manifest.json +406 -0
- package/data/templates/react/src/App.tsx +71 -0
- package/data/templates/react/src/adaptableOptions.ts +40 -0
- package/data/templates/react/src/agGridModules.ts +7 -0
- package/data/templates/react/src/columnDefs.ts +121 -0
- package/data/templates/react/src/gridOptions.ts +32 -0
- package/data/templates/react/src/index.tsx +8 -0
- package/data/templates/react/src/onAdaptableReady.ts +11 -0
- package/data/templates/react/src/rowData.ts +851 -0
- package/data/templates/react/src/styles.css +50 -0
- package/data/templates/react/tsconfig.json +9 -0
- package/data/templates/vanilla/index.html +18 -0
- package/data/templates/vanilla/src/adaptableOptions.ts +40 -0
- package/data/templates/vanilla/src/agGridModules.ts +7 -0
- package/data/templates/vanilla/src/columnDefs.ts +121 -0
- package/data/templates/vanilla/src/gridOptions.ts +32 -0
- package/data/templates/vanilla/src/index.ts +41 -0
- package/data/templates/vanilla/src/onAdaptableReady.ts +11 -0
- package/data/templates/vanilla/src/rowData.ts +851 -0
- package/data/templates/vanilla/src/styles.css +50 -0
- package/data/templates/vanilla/tsconfig.json +14 -0
- package/data/templates/vue/.babelrc +3 -0
- package/data/templates/vue/public/index.html +19 -0
- package/data/templates/vue/src/App.vue +35 -0
- package/data/templates/vue/src/adaptableOptions.ts +40 -0
- package/data/templates/vue/src/agGridModules.ts +7 -0
- package/data/templates/vue/src/columnDefs.ts +121 -0
- package/data/templates/vue/src/gridOptions.ts +32 -0
- package/data/templates/vue/src/main.ts +6 -0
- package/data/templates/vue/src/onAdaptableReady.ts +11 -0
- package/data/templates/vue/src/rowData.ts +851 -0
- package/data/templates/vue/src/shims-vue.d.ts +6 -0
- package/data/templates/vue/src/styles.css +50 -0
- package/data/templates/vue/tsconfig.json +30 -0
- package/dist/bin.js +7 -0
- package/dist/bin.js.map +1 -1
- package/dist/cli/index.js +8 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/core/anonymise/anonymise.js +315 -0
- package/dist/core/anonymise/anonymise.js.map +1 -0
- package/dist/core/anonymise/capabilities.js +94 -0
- package/dist/core/anonymise/capabilities.js.map +1 -0
- package/dist/core/aql/capabilities.js +339 -0
- package/dist/core/aql/capabilities.js.map +1 -0
- package/dist/core/aql/check.js +204 -0
- package/dist/core/aql/check.js.map +1 -0
- package/dist/core/aql/engine.js +92 -0
- package/dist/core/aql/engine.js.map +1 -0
- package/dist/core/aql/functions.js +108 -0
- package/dist/core/aql/functions.js.map +1 -0
- package/dist/core/aql/migrate.js +62 -0
- package/dist/core/aql/migrate.js.map +1 -0
- package/dist/core/capabilities.js +9 -3
- package/dist/core/capabilities.js.map +1 -1
- package/dist/core/changes/capabilities.js +92 -0
- package/dist/core/changes/capabilities.js.map +1 -0
- package/dist/core/changes/changes.js +101 -0
- package/dist/core/changes/changes.js.map +1 -0
- package/dist/core/changes/grep.js +183 -0
- package/dist/core/changes/grep.js.map +1 -0
- package/dist/core/changes/records.js +172 -0
- package/dist/core/changes/records.js.map +1 -0
- package/dist/core/changes/render-md.js +101 -0
- package/dist/core/changes/render-md.js.map +1 -0
- package/dist/core/changes/with-docs.js +86 -0
- package/dist/core/changes/with-docs.js.map +1 -0
- package/dist/core/compat/capabilities.js +1 -1
- package/dist/core/compat/capabilities.js.map +1 -1
- package/dist/core/context/capabilities.js +1 -1
- package/dist/core/context/capabilities.js.map +1 -1
- package/dist/core/convert/capabilities.js +86 -0
- package/dist/core/convert/capabilities.js.map +1 -0
- package/dist/core/convert/coldefs.js +313 -0
- package/dist/core/convert/coldefs.js.map +1 -0
- package/dist/core/docs/cache.js +1 -1
- package/dist/core/docs/capabilities.js +1 -5
- package/dist/core/docs/capabilities.js.map +1 -1
- package/dist/core/docs/hosts.js +2 -2
- package/dist/core/docs/hosts.js.map +1 -1
- package/dist/core/extract/imports.js +163 -0
- package/dist/core/extract/imports.js.map +1 -0
- package/dist/core/extract/input.js +140 -0
- package/dist/core/extract/input.js.map +1 -0
- package/dist/core/extract/line-map.js +90 -0
- package/dist/core/extract/line-map.js.map +1 -0
- package/dist/core/extract/ts-literal.js +963 -0
- package/dist/core/extract/ts-literal.js.map +1 -0
- package/dist/core/migrate/capabilities.js +143 -0
- package/dist/core/migrate/capabilities.js.map +1 -0
- package/dist/core/migrate/leftovers.js +119 -0
- package/dist/core/migrate/leftovers.js.map +1 -0
- package/dist/core/migrate/state.js +295 -0
- package/dist/core/migrate/state.js.map +1 -0
- package/dist/core/packages/cache.js +2 -1
- package/dist/core/packages/cache.js.map +1 -1
- package/dist/core/register.js +8 -0
- package/dist/core/register.js.map +1 -1
- package/dist/core/scaffold/capabilities.js +434 -0
- package/dist/core/scaffold/capabilities.js.map +1 -0
- package/dist/core/scaffold/generate.js +409 -0
- package/dist/core/scaffold/generate.js.map +1 -0
- package/dist/core/scaffold/infer.js +441 -0
- package/dist/core/scaffold/infer.js.map +1 -0
- package/dist/core/scaffold/overlay.js +290 -0
- package/dist/core/scaffold/overlay.js.map +1 -0
- package/dist/core/scaffold/readers/csv.js +146 -0
- package/dist/core/scaffold/readers/csv.js.map +1 -0
- package/dist/core/scaffold/readers/dataset.js +53 -0
- package/dist/core/scaffold/readers/dataset.js.map +1 -0
- package/dist/core/scaffold/readers/index.js +62 -0
- package/dist/core/scaffold/readers/index.js.map +1 -0
- package/dist/core/scaffold/readers/json.js +101 -0
- package/dist/core/scaffold/readers/json.js.map +1 -0
- package/dist/core/scaffold/readers/xlsx.js +81 -0
- package/dist/core/scaffold/readers/xlsx.js.map +1 -0
- package/dist/core/scaffold/suggestions.js +57 -0
- package/dist/core/scaffold/suggestions.js.map +1 -0
- package/dist/core/scaffold/templates.js +59 -0
- package/dist/core/scaffold/templates.js.map +1 -0
- package/dist/core/setup/audit.js +91 -0
- package/dist/core/setup/audit.js.map +1 -0
- package/dist/core/setup/capabilities.js +80 -0
- package/dist/core/setup/capabilities.js.map +1 -0
- package/dist/core/setup/context.js +118 -0
- package/dist/core/setup/context.js.map +1 -0
- package/dist/core/setup/rules/cell-data-type.js +40 -0
- package/dist/core/setup/rules/cell-data-type.js.map +1 -0
- package/dist/core/setup/rules/coldef-ownership.js +67 -0
- package/dist/core/setup/rules/coldef-ownership.js.map +1 -0
- package/dist/core/setup/rules/css-import.js +34 -0
- package/dist/core/setup/rules/css-import.js.map +1 -0
- package/dist/core/setup/rules/direct-grid.js +42 -0
- package/dist/core/setup/rules/direct-grid.js.map +1 -0
- package/dist/core/setup/rules/index.js +53 -0
- package/dist/core/setup/rules/index.js.map +1 -0
- package/dist/core/setup/rules/licence-literal.js +23 -0
- package/dist/core/setup/rules/licence-literal.js.map +1 -0
- package/dist/core/setup/rules/modules.js +86 -0
- package/dist/core/setup/rules/modules.js.map +1 -0
- package/dist/core/setup/rules/react-stable-refs.js +20 -0
- package/dist/core/setup/rules/react-stable-refs.js.map +1 -0
- package/dist/core/setup/rules/ready-hook.js +33 -0
- package/dist/core/setup/rules/ready-hook.js.map +1 -0
- package/dist/core/setup/rules/required-options.js +43 -0
- package/dist/core/setup/rules/required-options.js.map +1 -0
- package/dist/core/setup/rules/rule.js +10 -0
- package/dist/core/setup/rules/rule.js.map +1 -0
- package/dist/core/setup/rules/version-skew.js +65 -0
- package/dist/core/setup/rules/version-skew.js.map +1 -0
- package/dist/core/state/capabilities.js +78 -0
- package/dist/core/state/capabilities.js.map +1 -0
- package/dist/core/state/check.js +216 -0
- package/dist/core/state/check.js.map +1 -0
- package/dist/core/state/columns.js +130 -0
- package/dist/core/state/columns.js.map +1 -0
- package/dist/core/state/did-you-mean.js +83 -0
- package/dist/core/state/did-you-mean.js.map +1 -0
- package/dist/core/state/expressions.js +170 -0
- package/dist/core/state/expressions.js.map +1 -0
- package/dist/core/state/known-names.js +96 -0
- package/dist/core/state/known-names.js.map +1 -0
- package/dist/core/state/rules/aql-legacy-shape.js +42 -0
- package/dist/core/state/rules/aql-legacy-shape.js.map +1 -0
- package/dist/core/state/rules/aql-missing.js +21 -0
- package/dist/core/state/rules/aql-missing.js.map +1 -0
- package/dist/core/state/rules/aql-syntax.js +77 -0
- package/dist/core/state/rules/aql-syntax.js.map +1 -0
- package/dist/core/state/rules/calculated-settings.js +23 -0
- package/dist/core/state/rules/calculated-settings.js.map +1 -0
- package/dist/core/state/rules/column-id-exists.js +29 -0
- package/dist/core/state/rules/column-id-exists.js.map +1 -0
- package/dist/core/state/rules/dashboard-module-names.js +31 -0
- package/dist/core/state/rules/dashboard-module-names.js.map +1 -0
- package/dist/core/state/rules/dashboard-toolbar-names.js +48 -0
- package/dist/core/state/rules/dashboard-toolbar-names.js.map +1 -0
- package/dist/core/state/rules/format-column-pivot-display-format.js +43 -0
- package/dist/core/state/rules/format-column-pivot-display-format.js.map +1 -0
- package/dist/core/state/rules/helpers.js +39 -0
- package/dist/core/state/rules/helpers.js.map +1 -0
- package/dist/core/state/rules/index.js +80 -0
- package/dist/core/state/rules/index.js.map +1 -0
- package/dist/core/state/rules/layout-column-refs.js +60 -0
- package/dist/core/state/rules/layout-column-refs.js.map +1 -0
- package/dist/core/state/rules/layout-current-exists.js +27 -0
- package/dist/core/state/rules/layout-current-exists.js.map +1 -0
- package/dist/core/state/rules/layout-non-empty.js +32 -0
- package/dist/core/state/rules/layout-non-empty.js.map +1 -0
- package/dist/core/state/rules/rule.js +2 -0
- package/dist/core/state/rules/rule.js.map +1 -0
- package/dist/core/state/rules/scope-column-refs.js +32 -0
- package/dist/core/state/rules/scope-column-refs.js.map +1 -0
- package/dist/core/state/rules/scope-shape.js +61 -0
- package/dist/core/state/rules/scope-shape.js.map +1 -0
- package/dist/core/state/rules/state-unique-name.js +40 -0
- package/dist/core/state/rules/state-unique-name.js.map +1 -0
- package/dist/core/state/rules/state-unknown-section.js +30 -0
- package/dist/core/state/rules/state-unknown-section.js.map +1 -0
- package/dist/core/state/rules/type-discriminator.js +70 -0
- package/dist/core/state/rules/type-discriminator.js.map +1 -0
- package/dist/core/state/type-check.js +349 -83
- package/dist/core/state/type-check.js.map +1 -1
- package/dist/mcp/index.js +104 -16
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/server.js +110 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/skills/adaptable-debug/SKILL.md +145 -0
- package/dist/skills/adaptable-debug/VERSION.md +1 -0
- package/dist/skills/adaptable-debug/references/_shared/agents-snippet.md +3 -0
- package/dist/skills/adaptable-debug/references/_shared/capabilities.md +35 -0
- package/dist/skills/adaptable-debug/references/_shared/conversation.md +20 -0
- package/dist/skills/adaptable-debug/references/_shared/docs-protocol.md +36 -0
- package/dist/skills/adaptable-debug/references/_shared/grounding.md +54 -0
- package/dist/skills/adaptable-debug/references/_shared/guards.md +20 -0
- package/dist/skills/adaptable-debug/references/_shared/validation-loop.md +42 -0
- package/dist/skills/adaptable-debug/references/devtools-api.md +36 -0
- package/dist/skills/adaptable-debug/references/feedback-template.md +36 -0
- package/dist/skills/adaptable-debug/references/symptoms.md +37 -0
- package/dist/skills/adaptable-debug/references/ticket-template.md +50 -0
- package/dist/skills/adaptable-dev/SKILL.md +97 -0
- package/dist/skills/adaptable-dev/VERSION.md +1 -0
- package/dist/skills/adaptable-dev/references/_shared/agents-snippet.md +3 -0
- package/dist/skills/adaptable-dev/references/_shared/capabilities.md +35 -0
- package/dist/skills/adaptable-dev/references/_shared/conversation.md +20 -0
- package/dist/skills/adaptable-dev/references/_shared/docs-protocol.md +36 -0
- package/dist/skills/adaptable-dev/references/_shared/grounding.md +54 -0
- package/dist/skills/adaptable-dev/references/_shared/guards.md +20 -0
- package/dist/skills/adaptable-dev/references/_shared/validation-loop.md +42 -0
- package/dist/skills/adaptable-dev/references/recommendations.md +93 -0
- package/dist/skills/adaptable-setup/SKILL.md +158 -0
- package/dist/skills/adaptable-setup/VERSION.md +1 -0
- package/dist/skills/adaptable-setup/references/_shared/agents-snippet.md +3 -0
- package/dist/skills/adaptable-setup/references/_shared/capabilities.md +35 -0
- package/dist/skills/adaptable-setup/references/_shared/conversation.md +20 -0
- package/dist/skills/adaptable-setup/references/_shared/docs-protocol.md +36 -0
- package/dist/skills/adaptable-setup/references/_shared/grounding.md +54 -0
- package/dist/skills/adaptable-setup/references/_shared/guards.md +20 -0
- package/dist/skills/adaptable-setup/references/_shared/validation-loop.md +42 -0
- package/dist/skills/adaptable-setup/references/paths.md +45 -0
- package/dist/skills/adaptable-upgrade/SKILL.md +269 -0
- package/dist/skills/adaptable-upgrade/VERSION.md +1 -0
- package/dist/skills/adaptable-upgrade/references/_shared/agents-snippet.md +3 -0
- package/dist/skills/adaptable-upgrade/references/_shared/capabilities.md +35 -0
- package/dist/skills/adaptable-upgrade/references/_shared/conversation.md +20 -0
- package/dist/skills/adaptable-upgrade/references/_shared/docs-protocol.md +36 -0
- package/dist/skills/adaptable-upgrade/references/_shared/grounding.md +54 -0
- package/dist/skills/adaptable-upgrade/references/_shared/guards.md +20 -0
- package/dist/skills/adaptable-upgrade/references/_shared/validation-loop.md +42 -0
- package/dist/skills/adaptable-upgrade/references/apply-order.md +171 -0
- package/dist/skills/adaptable-upgrade/references/plan-preamble.md +151 -0
- package/dist/skills/adaptable-upgrade/scripts/adaptable.mjs +24 -0
- package/package.json +11 -5
- package/dist/core/state/rules.js +0 -417
- package/dist/core/state/rules.js.map +0 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
sources:
|
|
3
|
+
docs: [dev-guide-support-devtools-api, dev-guide-support-devtools, dev-guide-support-logging]
|
|
4
|
+
paths: [packages/adaptable/src/setupDevTools.ts]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# DevTools in-page API
|
|
8
|
+
|
|
9
|
+
`window.__ADAPTABLE_DEVTOOLS__` is installed by the running AdapTable (its
|
|
10
|
+
implementation is `createDevToolsGlobal()` in
|
|
11
|
+
`packages/adaptable/src/setupDevTools.ts`). Any browser tool that can
|
|
12
|
+
evaluate JavaScript on the page can call it; results are plain JSON. `id`
|
|
13
|
+
is an instance id from `listInstances()` and is optional when exactly one
|
|
14
|
+
instance is mounted. When unsure of a signature, call `help()` first — the
|
|
15
|
+
global prints its own usage text.
|
|
16
|
+
|
|
17
|
+
| Call | Purpose | Note |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| `help()` | the global's own usage text | first call when a signature is unsure |
|
|
20
|
+
| `listInstances()` | mounted instances as `{ adaptableId, adaptableVersion, agGridVersion, adaptableStateKey, primaryKey, userName, gridRuntime }` — the `adaptableId` is the `id` every other call takes | ask which one when several |
|
|
21
|
+
| `getGridInfo(id)` | versions, options summary, environment | drop the licence key before saving or quoting |
|
|
22
|
+
| `getState(id, 'Layout')` | one State section | never call without a section |
|
|
23
|
+
| `getPersistentState(id)` | persisted State as stored | compare against source `initialState` |
|
|
24
|
+
| `getColumns(id)` | effective columns with ids and data types | save to `columns.json` for `check state --columns` |
|
|
25
|
+
| `getColumnInfo(id, columnId)` | read-only Column Info: summary plus the Settings Panel tags for every object scoped to that column | the "why is this one column wrong" call; cheaper than `getColumns` |
|
|
26
|
+
| `getLogs(id, { level, channel, limit })` | buffered logs including init warnings and `(needs migration)` markers | errors + warnings first; default limit 100 |
|
|
27
|
+
| `getRecentActions(id, n)` | last state actions | explains "who changed the Layout"; default 50 |
|
|
28
|
+
| `restoreState(id, state)` | replace State | experiment only, with explicit confirmation — it discards the user's saved State |
|
|
29
|
+
| `openSettingsPanel(id, module)` | open the UI for a module | guided manual checks |
|
|
30
|
+
| `setLogging(pattern \| null)` | sets `localStorage.debug` (e.g. `'Adaptable:<id>:*'`) during a repro; returns the previous value; global, not per instance | restore the returned value afterwards |
|
|
31
|
+
|
|
32
|
+
Notes from the implementation: log buffers hold the last 500 entries per
|
|
33
|
+
instance and actions the last 200 — collect early in a long repro. An empty
|
|
34
|
+
`listInstances()` almost always means "called before mount" or "init failed
|
|
35
|
+
before registration"; check the page's console and `check setup` before
|
|
36
|
+
reading State that does not exist.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
sources:
|
|
3
|
+
docs: [getting-started-ai-skills]
|
|
4
|
+
paths: []
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Feedback template — `ADAPTABLE_FEEDBACK.md`
|
|
8
|
+
|
|
9
|
+
For feedback about the AdapTable agent tooling itself (a skill that misled,
|
|
10
|
+
a check that missed, a docs gap the agent fell into) — not a product bug;
|
|
11
|
+
that is the support case (`ticket-template.md`). Destination: the form on
|
|
12
|
+
the `adaptable-support-ticket` support page. The skill writes this file and
|
|
13
|
+
stops; the user reviews and sends it.
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
# AdapTable agent-tooling feedback
|
|
17
|
+
|
|
18
|
+
**Destination:** adaptable-support-ticket (form)
|
|
19
|
+
**Skill:** <adaptable-setup | adaptable-dev | adaptable-debug | adaptable-upgrade> · **Skill version:** <VERSION.md>
|
|
20
|
+
**Project:** AdapTable <major> · AG Grid <version> · <framework> (from detect; versions only, no keys)
|
|
21
|
+
|
|
22
|
+
## What the agent did
|
|
23
|
+
<the steps taken, the commands/tools run, the result produced>
|
|
24
|
+
|
|
25
|
+
## What the user corrected
|
|
26
|
+
<each correction, and the file or answer it changed>
|
|
27
|
+
|
|
28
|
+
## What would have prevented it
|
|
29
|
+
- Docs page: <slug that should have been read, or "missing — <topic>">
|
|
30
|
+
- Skill text: <section that misled, or "missing — <guidance>">
|
|
31
|
+
- Checker: <rule that should have caught it, or "missing — <check>">
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Keep it factual: transcripts and corrections, no project source, no licence
|
|
35
|
+
keys, no row data. One feedback file per incident; several corrections in one
|
|
36
|
+
session belong in the same file when they share a cause.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
sources:
|
|
3
|
+
docs: [handbook-calculated-column, dev-guide-adaptable-state-persistence, dev-guide-adaptable-state-updating-initial-state, dev-guide-support-devtools-api, getting-started-integration]
|
|
4
|
+
paths: [packages/adaptable/src/setupDevTools.ts]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Symptom table
|
|
8
|
+
|
|
9
|
+
Start from what the user sees. "Look at" names the DevTools read (see
|
|
10
|
+
`devtools-api.md`); validate what you collect before concluding — a matching
|
|
11
|
+
row here is a hypothesis, the `check` run is the proof.
|
|
12
|
+
|
|
13
|
+
| Symptom | Look at | Likely causes | Docs |
|
|
14
|
+
| --- | --- | --- | --- |
|
|
15
|
+
| Layout not applied | `getState(id,'Layout')`, `getColumns` | `CurrentLayout` name mismatch; columns missing from `TableColumns`; column id ≠ field; persisted State overriding source | layouts |
|
|
16
|
+
| Column missing | Layout `TableColumns`, `getColumns`, entitlements | hidden by Layout; not in grid; auto-group column; `colDef.hide` fighting the Layout | layouts, entitlements |
|
|
17
|
+
| Format Column not styling | `getState(id,'FormatColumn')`, `check expression` on `Rule` | Scope excludes column; Rule invalid or wrong kind; later rule overriding; conflicting Styled Column; custom cell renderer | format column |
|
|
18
|
+
| Calculated Column empty | expression kind, referenced ids, row model | scalar vs aggregated mismatch; wrong column id; aggregation without grouping; SSRM | calculated column |
|
|
19
|
+
| Alert never fires | `getState(id,'Alert')` | rule/type mismatch; data changes not through the API; alert suspended | alerts |
|
|
20
|
+
| Filter not applied | Grid Filter vs Column Filter vs Layout-embedded filter | wrong filter kind; SSRM filtering server-side; persisted filter | filters |
|
|
21
|
+
| State "lost" on reload | `getPersistentState`, logs | state key / user name changed; persistence hook failing; `(needs migration)` entries | state persistence |
|
|
22
|
+
| Edits to `initialState` have no effect | source vs `getPersistentState` | persisted State wins; bump the section's `Revision` (or `reloadInitialState` with user awareness) | state persistence, updating initial state |
|
|
23
|
+
| Grid blank / no instance | logs, console, `check setup` | not mounted yet; init failed (modules, licence, CSS, container height); AG Grid instantiated directly | integration |
|
|
24
|
+
| Grid resets on every render (React) | `check setup` `react-stable-refs` | options / rowData recreated each render | react integration |
|
|
25
|
+
|
|
26
|
+
Two rows deserve emphasis because they present as something else:
|
|
27
|
+
|
|
28
|
+
- **"Edits to `initialState` have no effect" is persistence, not caching.**
|
|
29
|
+
Persisted State merges over `initialState`; until the saved section is
|
|
30
|
+
replaced, source edits to that section stay invisible. The designed way to
|
|
31
|
+
replace it is the section's `Revision` in `initialState` (a higher number,
|
|
32
|
+
or `{ Key, UpdateStrategy }` to keep what the user added); clearing the
|
|
33
|
+
store or `reloadInitialState` is a user decision (guards.md). Compare
|
|
34
|
+
`getPersistentState()` with the source before editing anything.
|
|
35
|
+
- **"Grid blank" is a mount problem until proven otherwise.** An empty
|
|
36
|
+
`listInstances()` plus console errors points at modules, licence, CSS or
|
|
37
|
+
container height — `check setup` names the wiring ones without a browser.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
sources:
|
|
3
|
+
docs: [getting-started-integration, dev-guide-support-devtools-api]
|
|
4
|
+
paths: [packages/adaptable-mcp/src/core/anonymise/anonymise.ts]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Support case template — `ADAPTABLE_SUPPORT_CASE.md`
|
|
8
|
+
|
|
9
|
+
Destination: the form on the `adaptable-support-ticket` support page
|
|
10
|
+
(https://adaptabletools.zendesk.com/hc/en-us/requests/new). The skill writes
|
|
11
|
+
this file and stops; the user reviews and submits it. Anonymise the bundle
|
|
12
|
+
before attaching — `adaptable anonymise <bundle>` keeps names, column ids
|
|
13
|
+
and expressions, redacts licence keys and user names, and scrubs row values.
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
# AdapTable support case
|
|
17
|
+
|
|
18
|
+
**Destination:** adaptable-support-ticket (form)
|
|
19
|
+
**AdapTable:** <version from getGridInfo> · **AG Grid:** <version> · **Framework:** <framework>
|
|
20
|
+
**Skill:** adaptable-debug <VERSION.md>
|
|
21
|
+
|
|
22
|
+
## Symptom
|
|
23
|
+
<what the user sees, in their words where possible>
|
|
24
|
+
|
|
25
|
+
## Expected vs actual
|
|
26
|
+
- Expected: <…>
|
|
27
|
+
- Actual: <…>
|
|
28
|
+
|
|
29
|
+
## Steps to reproduce
|
|
30
|
+
1. <…>
|
|
31
|
+
Reproduced in the public support template (from getting-started-integration): <yes — link / no — why not>
|
|
32
|
+
|
|
33
|
+
## Evidence
|
|
34
|
+
- State section: `<Section>` (anonymised export attached)
|
|
35
|
+
- Columns: `columns.json` (anonymised)
|
|
36
|
+
- Options snippet: <adaptableOptions excerpt, licence keys and user names stripped>
|
|
37
|
+
- Logs: `getLogs(id, { level: ['error', 'warn'], limit: 100 })` excerpt
|
|
38
|
+
- `check state --kind persistent` result: <clean / issues verbatim>
|
|
39
|
+
|
|
40
|
+
## What was already ruled out
|
|
41
|
+
<the triage rows tried and what each showed>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Never attach: licence keys, user names, or un-anonymised row data. When row
|
|
45
|
+
values matter to the symptom, ask the user, then attach the `anonymise`
|
|
46
|
+
output (its placeholders preserve length, type and cardinality, so the shape
|
|
47
|
+
of the data survives without the data). Row field names are renamed
|
|
48
|
+
`field1`, `field2`, … by default, which breaks the link to the Layout's
|
|
49
|
+
column ids; when the symptom is about specific columns, ask whether the field
|
|
50
|
+
names are sensitive and pass `--keep-keys` if not.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: adaptable-dev
|
|
3
|
+
description: "Use BEFORE writing or changing any code that imports from @adaptabletools/* — Adaptable Options, Initial State, Layouts, Format or Styled Columns, Alerts, Calculated Columns, Column Filters, Exports, AdapTableQL expressions, Adaptable API calls, custom toolbars, menus, tool panels or settings panels — and when planning such work. Grounds the code in the installed AdapTable version's docs and demos and validates State, expressions and setup before presenting them. Not for first-time integration (adaptable-setup), a misbehaving running grid (adaptable-debug), version upgrades (adaptable-upgrade) or pure AG Grid work (ag-dev)."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# adaptable-dev — feature work on an existing AdapTable
|
|
7
|
+
|
|
8
|
+
Shared protocol, read once: [grounding](references/_shared/grounding.md)
|
|
9
|
+
(always first), [docs protocol](references/_shared/docs-protocol.md),
|
|
10
|
+
[validation loop](references/_shared/validation-loop.md),
|
|
11
|
+
[conversation](references/_shared/conversation.md),
|
|
12
|
+
[guards](references/_shared/guards.md). Every command binding is in
|
|
13
|
+
[capabilities](references/_shared/capabilities.md). Known agent failure modes
|
|
14
|
+
are in [recommendations](references/recommendations.md) — apply them before
|
|
15
|
+
writing, not after a failed check.
|
|
16
|
+
|
|
17
|
+
## 1. Ground
|
|
18
|
+
|
|
19
|
+
Run `detect` (see grounding) and record the AdapTable major, AG Grid pairing,
|
|
20
|
+
framework and project. All docs reads, checks and shapes below are for that
|
|
21
|
+
major. On a pre-release (canary) project, pass `--docs-host` as grounding
|
|
22
|
+
describes, or you will design against the released major's docs.
|
|
23
|
+
|
|
24
|
+
## 2. Design from the docs, not from memory
|
|
25
|
+
|
|
26
|
+
For the feature at hand, in this order (docs protocol has the commands):
|
|
27
|
+
|
|
28
|
+
1. `docs list --section` / `docs search` — confirm the feature exists for
|
|
29
|
+
this major and find its pages.
|
|
30
|
+
2. `docs get <handbook slug> --section` — behaviour and gotchas.
|
|
31
|
+
3. `docs get technical-reference-<feature>` — the exact State / Options shape.
|
|
32
|
+
4. `docs demo <name>` — one working example; copy its shape, adapt its
|
|
33
|
+
column ids.
|
|
34
|
+
|
|
35
|
+
### The ownership matrix — where each thing belongs
|
|
36
|
+
|
|
37
|
+
| The thing is… | It belongs in… |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| a persistable, user-facing object (Layout, Format/Styled/Calculated/Action Column, Alert, Filter, Export…) | `initialState`, with a unique `Name`, column ids and a `Scope` |
|
|
40
|
+
| a design-time callback, permission or custom function | `AdaptableOptions` (functions do not serialise into State) |
|
|
41
|
+
| a runtime mutation | `adaptableApi.<module>Api`, called after `adaptableReady` |
|
|
42
|
+
| column visibility, order, width, pinning, sorting, grouping, aggregation | the Layout in `initialState` — **not** ColDef `hide` / `pinned` / `width` / `sort` / `rowGroup` / `aggFunc` |
|
|
43
|
+
| conditional styling, formats, sparklines, badges, derived values | Format / Styled / Calculated Columns in `initialState` — **not** `cellStyle`, `valueFormatter`, `valueGetter` or a custom renderer |
|
|
44
|
+
| column typing | stays in the ColDef (`cellDataType`) |
|
|
45
|
+
|
|
46
|
+
`check setup` flags ColDef properties AdapTable owns; `convert coldefs`
|
|
47
|
+
turns an existing set into a Layout when a brownfield file needs it.
|
|
48
|
+
|
|
49
|
+
### Working rules
|
|
50
|
+
|
|
51
|
+
- **Declarative first.** If the user can see it, toggle it or save it, it is
|
|
52
|
+
Initial State. Code (Options, API calls) is for what State cannot express.
|
|
53
|
+
- **Persisted State merges over `initialState`.** Editing `initialState`
|
|
54
|
+
does not reset what users already saved; reach runtime changes through the
|
|
55
|
+
State API (`adaptableApi.<module>Api`), and never fight persistence by
|
|
56
|
+
changing ids or the state key (guards).
|
|
57
|
+
- **Expressions are AdapTableQL, validated per module.** Every expression
|
|
58
|
+
string goes through `check expression --module <Module>` before it is
|
|
59
|
+
presented; the module decides which expression kinds and functions are
|
|
60
|
+
legal there. Look functions up with `aql functions --module <Module>`
|
|
61
|
+
rather than recalling them.
|
|
62
|
+
- **Column references are ids from the project**, taken from the `columnDefs`
|
|
63
|
+
source or `getColumns()` — never invented header names.
|
|
64
|
+
- **AG Grid-only work goes to `ag-dev`** (ColDefs, modules, row models, the
|
|
65
|
+
grid API); **package bumps go to `adaptable-upgrade`**, never inside a
|
|
66
|
+
feature task.
|
|
67
|
+
|
|
68
|
+
## 3. Apply the recommendations
|
|
69
|
+
|
|
70
|
+
Read [recommendations](references/recommendations.md) for the feature area
|
|
71
|
+
you are touching — expression kinds, State shapes, framework traps (React
|
|
72
|
+
stable references, `adaptableReady`, Angular standalone components, Vue
|
|
73
|
+
reactivity), and testing through `adaptableApi`. These are the mistakes this
|
|
74
|
+
codebase's tooling keeps catching; the checkers catch the rest.
|
|
75
|
+
|
|
76
|
+
## 4. Validate everything produced
|
|
77
|
+
|
|
78
|
+
Per the validation loop: `check expression` for every AdapTableQL string
|
|
79
|
+
(with its module), `check state --columns <columnDefs file>` for every State
|
|
80
|
+
literal, `check setup` after touching Options, wrappers, `columnDefs` or
|
|
81
|
+
modules. Fix and re-check, at most three rounds, then report remaining issues
|
|
82
|
+
verbatim.
|
|
83
|
+
|
|
84
|
+
When the app is running and a browser tool exists, verify the result in the
|
|
85
|
+
page: `getState(id, '<Section>')` shows the section as the grid holds it and
|
|
86
|
+
`getLogs(id, { level: ['error', 'warn'] })` shows whether it applied. A clean
|
|
87
|
+
check on source plus a silent grid is `adaptable-debug` territory.
|
|
88
|
+
|
|
89
|
+
## 5. Report
|
|
90
|
+
|
|
91
|
+
In prose: what was added or changed and where it lives (State section,
|
|
92
|
+
Options property, API call), which docs page or demo each new shape came
|
|
93
|
+
from, and the checks that ran clean. Mention anything left unverified and why.
|
|
94
|
+
|
|
95
|
+
**Done when:** the code compiles; `check state` / `check expression` /
|
|
96
|
+
`check setup` are clean for everything produced; every new API, Option and
|
|
97
|
+
State key is traceable to a docs page or demo for the installed major.
|
|
@@ -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.
|
|
@@ -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,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
sources:
|
|
3
|
+
docs: [technical-reference-calculated-column, technical-reference-alerting, technical-reference-styled-column, handbook-calculated-column, handbook-grid-filter, getting-started-testing, react-integration, angular-integration, vue-overview]
|
|
4
|
+
paths: [packages/adaptable-mcp/evals/seed/known-wrong/state-format-column.md, packages/adaptable-mcp/evals/seed/known-wrong/state-calculated-column.md, packages/adaptable-mcp/evals/seed/known-wrong/state-layout-basic.md, packages/adaptable-mcp/evals/seed/known-wrong/placement-custom-function.md, packages/adaptable-mcp/evals/seed/known-wrong/aql-cumulative-pnl.md, packages/adaptable-mcp/evals/seed/known-wrong/setup-react.md]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Recommendations — the mistakes agents keep making
|
|
8
|
+
|
|
9
|
+
Each entry is a failure mode the checkers or support keep seeing, the form
|
|
10
|
+
that works, and the capability that proves it. Shapes are stated for the
|
|
11
|
+
current major; `check state` against the *detected* major is always the
|
|
12
|
+
arbiter.
|
|
13
|
+
|
|
14
|
+
## Expressions
|
|
15
|
+
|
|
16
|
+
- **Wrong kind for the module.** A Format Column or Alert `Rule` is a
|
|
17
|
+
*Boolean* expression over one row (`[pnl] < 0`); a Calculated Column that
|
|
18
|
+
aggregates needs the aggregated scalar form with its grouping inside the
|
|
19
|
+
expression. Putting an aggregation in a rule, or a row expression where an
|
|
20
|
+
aggregation belongs, parses and then silently does nothing. Let
|
|
21
|
+
`check expression --module <Module>` judge the kind.
|
|
22
|
+
- **Aggregation modifiers live inside the call.** Cumulative and windowed
|
|
23
|
+
aggregations are written inside the aggregation function as a modifier
|
|
24
|
+
(ordered by a date column), not as a wrapper around it. `aql functions
|
|
25
|
+
--module CalculatedColumn --query cumulative` shows the call form the
|
|
26
|
+
installed engine accepts.
|
|
27
|
+
- **Change-count observables are functions, not wrappers.** "Alert me when
|
|
28
|
+
the price changed N times in 5 minutes" is a change-count function with a
|
|
29
|
+
timeframe compared against the threshold — not a `ROW_CHANGE(COUNT(...))`
|
|
30
|
+
wrapper. Search `aql functions --module Alert` before composing one.
|
|
31
|
+
- **Percentages and weighted averages are single expressions.** A share of a
|
|
32
|
+
group total divides the value by the same aggregation over the group; a
|
|
33
|
+
weighted average is `SUMPRODUCT`-style numerator over weight denominator.
|
|
34
|
+
Two Calculated Columns referencing each other is the smell that one
|
|
35
|
+
expression was split in half.
|
|
36
|
+
- **Custom functions are Options, registered once.**
|
|
37
|
+
`expressionOptions.customBooleanFunctions` (and its scalar/aggregation
|
|
38
|
+
siblings) takes `{ handler, description, signatures, examples }`; the
|
|
39
|
+
function is then callable in every expression of that kind. Do not invent
|
|
40
|
+
a ColDef-level registration, and do not hard-code the test in each rule.
|
|
41
|
+
- **JavaScript habits in AdapTableQL.** `&&`, `||`, `===`, `SUM{[col]}`
|
|
42
|
+
and function names from memory all fail or mis-evaluate; the checker
|
|
43
|
+
rewrites the mechanical ones exactly — apply its fix, then re-check.
|
|
44
|
+
|
|
45
|
+
## State shapes
|
|
46
|
+
|
|
47
|
+
- **`Rule` is a string.** In the current major a Format Column, Styled
|
|
48
|
+
Column or Alert carries `"Rule": "[pnl] < 0"` — an expression string —
|
|
49
|
+
not an object wrapping one. `check state` names the right shape per major.
|
|
50
|
+
- **Layout is `TableColumns` plus maps.** Order and visibility are the
|
|
51
|
+
`TableColumns` id list; width/flex in `ColumnSizing`, pinning in
|
|
52
|
+
`ColumnPinning`, sorts in `ColumnSorts`, grouping in `RowGroupedColumns`,
|
|
53
|
+
aggregation in `TableAggregationColumns`. A `CurrentLayout` whose `Name`
|
|
54
|
+
matches no Layout in the list applies nothing.
|
|
55
|
+
- **Filters live in their module, referenced by the Layout.** Column Filters
|
|
56
|
+
hold an `Expression`; a Layout's Grid Filter references filter state — do
|
|
57
|
+
not embed a second, competing filter definition inside the Layout.
|
|
58
|
+
- **Every user-facing object gets a stable, unique `Name`** and a `Scope`
|
|
59
|
+
that names column ids (`Scope.ColumnIds`), not header text. Two objects
|
|
60
|
+
sharing a `Name` in one section overwrite each other on save.
|
|
61
|
+
- **Calculated Columns join the Layout like real columns** — add the column
|
|
62
|
+
name to `TableColumns` or the user never sees the value you computed.
|
|
63
|
+
- **An Alert needs its trigger semantics stated**: row change, data change
|
|
64
|
+
or aggregation, with the rule kind to match. An alert that "never fires"
|
|
65
|
+
is usually a rule written for a different trigger.
|
|
66
|
+
|
|
67
|
+
## Framework traps
|
|
68
|
+
|
|
69
|
+
- **React: stable references.** Adaptable Options, `gridOptions` and
|
|
70
|
+
`rowData` recreated on every render remount the grid and lose State.
|
|
71
|
+
Module scope, `useMemo` or `useRef` — and all AdapTable work happens in
|
|
72
|
+
`onAdaptableReady`, where the API exists, not in an effect racing it.
|
|
73
|
+
- **Angular: standalone wiring.** `<adaptable-provider>` +
|
|
74
|
+
`<adaptable-ui>` + `<ag-grid-angular *adaptable>`; the grid is not
|
|
75
|
+
instantiated directly beside the provider. Styles belong in the global
|
|
76
|
+
stylesheet.
|
|
77
|
+
- **Vue: reactivity boundaries.** Pass options as stable objects; deep
|
|
78
|
+
reactive proxies around `gridOptions` fight the grid's own mutation of
|
|
79
|
+
them. Let the wrapper own the grid instance.
|
|
80
|
+
- **Testing goes through `adaptableApi`.** Tests drive the grid through the
|
|
81
|
+
API from `adaptableReady` (`docs get getting-started-testing`), not by
|
|
82
|
+
dispatching DOM events at cells or by editing persisted State in
|
|
83
|
+
`localStorage`.
|
|
84
|
+
|
|
85
|
+
## Process
|
|
86
|
+
|
|
87
|
+
- **One demo beats three guesses.** When a shape is uncertain, `docs demo`
|
|
88
|
+
the closest demo and adapt it; the golden corpus passes `check state`, so
|
|
89
|
+
a shape copied from a demo starts life valid.
|
|
90
|
+
- **`unverifiable` is information, not failure.** A State literal the
|
|
91
|
+
extractor cannot resolve statically (spread, computed keys) is reported as
|
|
92
|
+
such; restructure the literal into a checkable one where the task allows,
|
|
93
|
+
and say plainly what could not be checked where it does not.
|