solid2-agent-kit 0.11.0 → 0.11.1
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/files/skills/solid-2/SKILL.md +53 -14
- package/package.json +1 -1
|
@@ -789,27 +789,43 @@ an agent sneaks in fails the suite instead of scrolling by.
|
|
|
789
789
|
|
|
790
790
|
### Dev diagnostics and attribution
|
|
791
791
|
|
|
792
|
-
Diagnostics come in two
|
|
792
|
+
Diagnostics come in two layers, both dev-build only (production strips them and `DEV`
|
|
793
793
|
is `undefined` there). Always-on findings include misplaced reads
|
|
794
794
|
(`[STRICT_READ_UNTRACKED]`, `[PENDING_ASYNC_UNTRACKED_READ]`), misplaced writes
|
|
795
795
|
(`[REACTIVE_WRITE_IN_OWNED_SCOPE]`, `[FLUSH_IN_ACTION]`, `[SERVER_WRITE]`), and
|
|
796
796
|
`[ASYNC_OUTSIDE_LOADING_BOUNDARY]` when a tracked read has no boundary above it.
|
|
797
797
|
Each entry carries a stable `[CODE]`, what the runtime observed, and an owner chain
|
|
798
798
|
(`in <App> › <Cart> › <LineItem>`); never silence a code before understanding it.
|
|
799
|
+
For the repair behind any code, read the `reactivity-diagnostics` skill Solid ships
|
|
800
|
+
in the repo (`node_modules/solid-js/skills/reactivity-diagnostics/SKILL.md`) — every
|
|
801
|
+
code maps to what the runtime observed and what to change.
|
|
799
802
|
|
|
800
803
|
Cost and responsiveness findings need the opt-in attribution engine, which records
|
|
801
|
-
every scope that re-ran, what changed to cause it, and how long it took
|
|
804
|
+
every scope that re-ran, what changed to cause it, and how long it took. Since
|
|
805
|
+
`solid-js` 2.0.0-rc.8 the engine lives behind its own subpath — `DEV.attribution`
|
|
806
|
+
no longer exists (it is a type error; `DEV` holds only devtools hooks, graph
|
|
807
|
+
traversal, and console reporting), and the low-level hook slot on `OBSERVE` is for
|
|
808
|
+
engines and devtools, not app code:
|
|
802
809
|
|
|
803
810
|
```ts
|
|
804
|
-
import {
|
|
811
|
+
import { attribution } from 'solid-js/attribution';
|
|
812
|
+
import { isDev } from '@solidjs/web';
|
|
805
813
|
|
|
806
|
-
|
|
814
|
+
if (isDev) attribution.enable({ log: false });
|
|
807
815
|
// reproduce the interaction, then ask why a scope ran:
|
|
808
|
-
for (const event of
|
|
809
|
-
console.log(
|
|
816
|
+
for (const event of attribution.why(total)) {
|
|
817
|
+
console.log(attribution.format(event));
|
|
810
818
|
}
|
|
811
819
|
```
|
|
812
820
|
|
|
821
|
+
`enable()` pretty-prints every re-run's why-chain to the console by default
|
|
822
|
+
(`log: true`); pass `{ log: false }` when you only want the coded findings and plan
|
|
823
|
+
to query the tables yourself. Name the scopes you intend to interrogate
|
|
824
|
+
(`createMemo(..., { name: "total" })`) — chains refer to nodes by name, and
|
|
825
|
+
anonymous nodes print as `computed` / `effect` / `signal`. In production the import
|
|
826
|
+
resolves to an inert same-surface twin (~640 bytes) whose `enable()` is a no-op, so
|
|
827
|
+
with the `isDev` guard the cost is zero and the import can stay in the code.
|
|
828
|
+
|
|
813
829
|
While attribution is enabled, Solid also warns on its own about over-subscription,
|
|
814
830
|
chained async waterfalls (`[ASYNC_WATERFALL]`), memos whose fresh-but-equal output
|
|
815
831
|
never settles (`[UNSTABLE_MEMO_OUTPUT]`), effects that relay state
|
|
@@ -818,10 +834,12 @@ immutable updates inside stores (`[IMMUTABLE_UPDATE_IN_STORE]` — mutate the dr
|
|
|
818
834
|
row-rebuilding lists (`[UNSTABLE_LIST_IDENTITY]` — key by id or reconcile into a
|
|
819
835
|
store), and silent holds (`[SILENT_HOLD]` — a write held on async work with no
|
|
820
836
|
`isPending()` / `latest()` reader, optimistic value, `affects()` mark, or effect that
|
|
821
|
-
ran while held;
|
|
822
|
-
`
|
|
823
|
-
|
|
824
|
-
|
|
837
|
+
ran while held; info from 100ms, warning from 200ms, tunable via
|
|
838
|
+
`enable({ holds: { infoMs, warnMs } })`). `attribution.costs()`, `holds()`, and
|
|
839
|
+
`feedback()` rank the session worst-first; `waterfalls()`, `navigations()`, and
|
|
840
|
+
`interactions()` hold the fact tables behind the verdicts.
|
|
841
|
+
`attribution.subscriptions(scope)` lists a scope's current dependencies to compare
|
|
842
|
+
against what it uses.
|
|
825
843
|
|
|
826
844
|
For regression tests, `@solidjs/diagnostics` turns the same channels into assertions:
|
|
827
845
|
|
|
@@ -838,8 +856,29 @@ expect(artifact).toHaveNoSilentHolds();
|
|
|
838
856
|
```
|
|
839
857
|
|
|
840
858
|
`toHaveNoDiagnostics` fails on any coded warning (`info` findings excluded);
|
|
841
|
-
`toStayWithinRerunBudget` / `toHaveNoWaste` catch recompute regressions.
|
|
842
|
-
|
|
859
|
+
`toStayWithinRerunBudget` / `toHaveNoWaste` catch recompute regressions. The
|
|
860
|
+
`agent-loops` skill the package ships
|
|
861
|
+
(`node_modules/@solidjs/diagnostics/skills/agent-loops/SKILL.md`) documents the agent
|
|
862
|
+
verification loops: capture until the channel is quiet, scenario budgets as the
|
|
863
|
+
definition of done, and hold/latency gates. See the debugging-reactivity guide in
|
|
864
|
+
[references/official-docs.md](references/official-docs.md).
|
|
865
|
+
|
|
866
|
+
With `@solidjs/diagnostics` in `devDependencies`, the Vite plugin's `diagnostics`
|
|
867
|
+
option (auto-on; dev server only) injects the capture bridge and serves
|
|
868
|
+
`POST /__solid/diagnostics`, so a live page can be interrogated with curl alone —
|
|
869
|
+
no test harness:
|
|
870
|
+
|
|
871
|
+
```sh
|
|
872
|
+
curl -X POST localhost:3000/__solid/diagnostics -d '{"method":"begin"}'
|
|
873
|
+
# ... interact with the app in the browser ...
|
|
874
|
+
curl -X POST localhost:3000/__solid/diagnostics -d '{"method":"whyDidRun","params":{"name":"TodoRow"}}'
|
|
875
|
+
curl -X POST localhost:3000/__solid/diagnostics -d '{"method":"costs"}'
|
|
876
|
+
curl -X POST localhost:3000/__solid/diagnostics -d '{"method":"feedback"}'
|
|
877
|
+
curl -X POST localhost:3000/__solid/diagnostics -d '{"method":"end"}'
|
|
878
|
+
```
|
|
879
|
+
|
|
880
|
+
`GET` the endpoint for status. With several open tabs the first responder wins,
|
|
881
|
+
so keep one page under test.
|
|
843
882
|
|
|
844
883
|
## Client mode: no server HTML, no hydration reflexes
|
|
845
884
|
|
|
@@ -1477,8 +1516,8 @@ always-applied rules installed alongside this skill.
|
|
|
1477
1516
|
`[STRICT_READ_UNTRACKED]`), held writes paired with `isPending` / `latest` /
|
|
1478
1517
|
optimistic values / `affects()` (no `[SILENT_HOLD]`). Attribution-only costs
|
|
1479
1518
|
(`[IMMUTABLE_UPDATE_IN_STORE]`, `[UNSTABLE_LIST_IDENTITY]`, `[EFFECT_*]`)
|
|
1480
|
-
checked via `
|
|
1481
|
-
interrogated scopes (`{ name: "total" }`).
|
|
1519
|
+
checked via `attribution` from `solid-js/attribution` when touching stores,
|
|
1520
|
+
lists, or effects. Name interrogated scopes (`{ name: "total" }`).
|
|
1482
1521
|
- [ ] If the project has a router: `createRouter({ routes })`, not JSX `<Route>` / `<A>`.
|
|
1483
1522
|
One instance, no nested `<Router>`. Navigate with `useNavigate` / `<a href>`, not
|
|
1484
1523
|
`window.location`. Router `action`/`query` come from `@solidjs/router` (POST forms + cache), not
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid2-agent-kit",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Teach AI coding agents (Cursor, Claude Code) to write correct Solid 2.0 instead of React or Solid 1.x — always-applied rules, an agent skill, and a mechanical pattern gate.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|