@tanstack/intent 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/artifact-coverage-CXX6wav1.mjs +2 -0
- package/dist/{artifact-coverage-nGwun1tt.mjs → artifact-coverage-DFtI6V_H.mjs} +1 -3
- package/dist/{cli-error-BrMXlbtx.mjs → cli-error-DDAO6DIL.mjs} +1 -2
- package/dist/{cli-support-C8SKYTA4.mjs → cli-support-BQSl7gAE.mjs} +8 -11
- package/dist/{cli-support-BADtMg6z.mjs → cli-support-DK1Kq8Ue.mjs} +2 -6
- package/dist/cli.d.mts +0 -1
- package/dist/cli.mjs +14 -16
- package/dist/{command-runner-fstUIUhe.mjs → command-runner-B5OofX0E.mjs} +1 -2
- package/dist/{core-hEMP5GMV.mjs → core-BRUBEMwe.mjs} +9 -13
- package/dist/core.d.mts +3 -4
- package/dist/core.mjs +2 -11
- package/dist/{display-CFnFnrtx.mjs → display-CnpA7XuV.mjs} +3 -7
- package/dist/{edit-package-json-DKyJ04t1.mjs → edit-package-json-D8xfcy2X.mjs} +1 -2
- package/dist/{exclude-CBxkyK3Q.mjs → exclude-DbHwcgQQ.mjs} +6 -11
- package/dist/{excludes-DDMe-4iu.mjs → excludes-ByvSbmmj.mjs} +3 -6
- package/dist/index.d.mts +2 -3
- package/dist/index.mjs +9 -14
- package/dist/{install-BE7gVoNT.mjs → install-CTGQvXoB.mjs} +18 -24
- package/dist/{list-UqYivAcV.mjs → list-9SbFGUd5.mjs} +5 -15
- package/dist/{load-Dgw151E3.mjs → load-BY8vh7Gp.mjs} +4 -14
- package/dist/{meta-BZMVgIzJ.mjs → meta-CF4XIYOo.mjs} +3 -5
- package/dist/{package-manager-BUgTjW9Q.mjs → package-manager-Dw7lYcI0.mjs} +1 -3
- package/dist/{project-context-DDCie6Ro.mjs → project-context-oi_m7paK.mjs} +2 -4
- package/dist/{resolver-CZXZ0rft.mjs → resolver-Uwx8B5jv.mjs} +4 -6
- package/dist/{scaffold-D2vwv9ls.mjs → scaffold-D8TAMXvs.mjs} +1 -3
- package/dist/{scanner-2XDBAsbm.mjs → scanner-qT_M6nV5.mjs} +7 -14
- package/dist/{setup-DW3pn0QW.d.mts → setup-CdfBc7Oe.d.mts} +0 -1
- package/dist/{setup-CMec7fht.mjs → setup-Cx1r2y-1.mjs} +3 -5
- package/dist/{setup-github-actions-emXSyGy3.mjs → setup-github-actions-IxZTZihi.mjs} +1 -2
- package/dist/setup.d.mts +1 -1
- package/dist/setup.mjs +3 -6
- package/dist/{skill-paths-Cr74uFk4.mjs → skill-paths-Bm1P6IYe.mjs} +2 -4
- package/dist/{skill-use-CUrNHf-u.mjs → skill-use-B2xRF1i9.mjs} +1 -2
- package/dist/{source-policy-rGOtjQSM.mjs → source-policy-DkR80hkL.mjs} +4 -7
- package/dist/source-policy-hMYcpIgm.mjs +2 -0
- package/dist/{stale-DxZyYibt.mjs → stale-DhjSTIt-.mjs} +3 -5
- package/dist/staleness-B5Cqe77_.mjs +2 -0
- package/dist/{staleness-B8IvDS_9.mjs → staleness-DoZU3lzy.mjs} +9 -16
- package/dist/{utils-Dj49bkF_.mjs → utils-6FtqhOYf.mjs} +1 -3
- package/dist/{utils-BuNMwKct.mjs → utils-BKBDYbCx.mjs} +2 -3
- package/dist/{validate-B3pkTIZl.mjs → validate-BSfTOq0v.mjs} +133 -46
- package/dist/{workflow-review-wL1Iu2Sf.mjs → workflow-review-B4AfwtHH.mjs} +1 -3
- package/dist/{workflow-review-CtOR1bgh.mjs → workflow-review-Bo2kPVXV.mjs} +2 -3
- package/dist/{workspace-patterns-Cz_lNhwz.mjs → workspace-patterns-BDoJIWk-.mjs} +2 -4
- package/dist/workspace-patterns-CrL8hAbd.mjs +2 -0
- package/meta/generate-skill/SKILL.md +34 -20
- package/meta/tree-generator/SKILL.md +42 -38
- package/package.json +5 -6
- package/dist/artifact-coverage-BfJ7f-S9.mjs +0 -3
- package/dist/source-policy-D4slvwwI.mjs +0 -9
- package/dist/staleness-Ctzy2Zac.mjs +0 -5
- package/dist/workspace-patterns-BBW4c1gr.mjs +0 -4
- /package/dist/{types-oEflMSso.d.mts → types-P6UfPVdp.d.mts} +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { r as findSkillFiles } from "./utils-
|
|
1
|
+
import { r as findSkillFiles } from "./utils-6FtqhOYf.mjs";
|
|
2
2
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { parse } from "yaml";
|
|
5
5
|
import { parse as parse$1 } from "jsonc-parser";
|
|
6
|
-
|
|
7
6
|
//#region src/workspace-patterns.ts
|
|
8
7
|
function normalizeWorkspacePattern(pattern) {
|
|
9
8
|
return pattern.replace(/\\/g, "/").replace(/^\.\//, "").replace(/\/+$/, "");
|
|
@@ -189,6 +188,5 @@ function findPackagesWithSkills(root) {
|
|
|
189
188
|
function findWorkspacePackages(root) {
|
|
190
189
|
return readWorkspacePackageDirs(root) ?? [];
|
|
191
190
|
}
|
|
192
|
-
|
|
193
191
|
//#endregion
|
|
194
|
-
export { readWorkspacePatterns as a, getWorkspaceInfo as i, findWorkspacePackages as n, resolveWorkspacePackages as o, findWorkspaceRoot as r, findPackagesWithSkills as t };
|
|
192
|
+
export { readWorkspacePatterns as a, getWorkspaceInfo as i, findWorkspacePackages as n, resolveWorkspacePackages as o, findWorkspaceRoot as r, findPackagesWithSkills as t };
|
|
@@ -52,7 +52,9 @@ SKILL.md into that package's skills directory (e.g.
|
|
|
52
52
|
`packages/client/skills/core/SKILL.md`), not a shared root.
|
|
53
53
|
|
|
54
54
|
1. **Skill name** — format `library-group/skill-name` (e.g. `tanstack-query/core`,
|
|
55
|
-
`tanstack-router/loaders`, `db/core/live-queries`)
|
|
55
|
+
`tanstack-router/loaders`, `db/core/live-queries`). This is the skill's
|
|
56
|
+
directory path: its **last segment** becomes the frontmatter `name` (a
|
|
57
|
+
spec-legal leaf), and the full path is where the `SKILL.md` lives.
|
|
56
58
|
2. **Skill description** — what the skill covers and when an agent should load it
|
|
57
59
|
3. **Source documentation** — the docs, guides, API references, and/or source
|
|
58
60
|
files to distill from
|
|
@@ -170,17 +172,18 @@ domain-discovery — use those directly.
|
|
|
170
172
|
|
|
171
173
|
```yaml
|
|
172
174
|
---
|
|
173
|
-
name: [
|
|
175
|
+
name: '[skill-name]'
|
|
174
176
|
description: >
|
|
175
177
|
[1–3 sentences. What this skill covers and exactly when an agent should
|
|
176
178
|
load it. Written for the agent — include the keywords an agent would
|
|
177
179
|
encounter when it needs this skill. Dense routing key.]
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
180
|
+
metadata:
|
|
181
|
+
type: core
|
|
182
|
+
library: '[library]'
|
|
183
|
+
library_version: '[version this targets]'
|
|
181
184
|
sources:
|
|
182
|
-
-
|
|
183
|
-
-
|
|
185
|
+
- '[Owner/repo]:docs/[path].md'
|
|
186
|
+
- '[Owner/repo]:src/[path].ts'
|
|
184
187
|
---
|
|
185
188
|
```
|
|
186
189
|
|
|
@@ -188,14 +191,15 @@ sources:
|
|
|
188
191
|
|
|
189
192
|
```yaml
|
|
190
193
|
---
|
|
191
|
-
name: [
|
|
194
|
+
name: '[skill-name]'
|
|
192
195
|
description: >
|
|
193
196
|
[1–3 sentences. What this sub-topic covers and when to load it.]
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
+
metadata:
|
|
198
|
+
type: sub-skill
|
|
199
|
+
library: '[library]'
|
|
200
|
+
library_version: '[version]'
|
|
197
201
|
sources:
|
|
198
|
-
-
|
|
202
|
+
- '[Owner/repo]:docs/[path].md'
|
|
199
203
|
---
|
|
200
204
|
```
|
|
201
205
|
|
|
@@ -203,29 +207,39 @@ sources:
|
|
|
203
207
|
|
|
204
208
|
```yaml
|
|
205
209
|
---
|
|
206
|
-
name: [
|
|
210
|
+
name: '[framework]'
|
|
207
211
|
description: >
|
|
208
212
|
[1–3 sentences. Framework-specific bindings. Name the hooks, components,
|
|
209
213
|
providers.]
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
+
metadata:
|
|
215
|
+
type: framework
|
|
216
|
+
library: '[library]'
|
|
217
|
+
framework: '[react | vue | solid | svelte | angular]'
|
|
218
|
+
library_version: '[version]'
|
|
214
219
|
requires:
|
|
215
|
-
- [library]/core
|
|
220
|
+
- '[library]/core'
|
|
216
221
|
sources:
|
|
217
|
-
-
|
|
222
|
+
- '[Owner/repo]:docs/framework/[framework]/[path].md'
|
|
218
223
|
---
|
|
219
224
|
```
|
|
220
225
|
|
|
221
226
|
### Frontmatter rules
|
|
222
227
|
|
|
228
|
+
- `name` is the spec-legal leaf segment — lowercase letters, numbers, and
|
|
229
|
+
hyphens only — and matches the skill's parent directory. It carries no
|
|
230
|
+
slashes; the namespace lives in the skill's directory path instead.
|
|
231
|
+
- Intent-specific scalars (`type`, `library`, `library_version`, `framework`)
|
|
232
|
+
live under the `metadata` map. The Agent Skills spec permits only `name`,
|
|
233
|
+
`description`, `license`, `compatibility`, `metadata`, and `allowed-tools`
|
|
234
|
+
at the top level, so emitting these scalars at the top level fails
|
|
235
|
+
validation.
|
|
223
236
|
- `description` must be written so the agent loads this skill at the right
|
|
224
237
|
time — not too broad (triggers on everything) and not too narrow (never
|
|
225
238
|
triggers). Pack with function names, option names, concept keywords.
|
|
226
239
|
- `sources` uses the format `Owner/repo:relative-path`. Glob patterns are
|
|
227
240
|
supported (e.g. `TanStack/query:docs/framework/react/guides/*.md`).
|
|
228
|
-
- `library_version` is the version of the source library this skill
|
|
241
|
+
- `metadata.library_version` is the version of the source library this skill
|
|
242
|
+
targets.
|
|
229
243
|
- `requires` lists skills that must be loaded before this one.
|
|
230
244
|
|
|
231
245
|
---
|
|
@@ -287,14 +287,15 @@ framework-agnostic concepts and contains the sub-skill registry.
|
|
|
287
287
|
|
|
288
288
|
```yaml
|
|
289
289
|
---
|
|
290
|
-
name: [lib]-core
|
|
290
|
+
name: '[lib]-core'
|
|
291
291
|
description: >
|
|
292
292
|
[1–3 sentences. What this library does and the framework-agnostic
|
|
293
293
|
concepts it provides. Pack with keywords: function names, config
|
|
294
294
|
options, concepts. This is a routing key, not a human summary.]
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
295
|
+
metadata:
|
|
296
|
+
type: core
|
|
297
|
+
library: '[lib]'
|
|
298
|
+
library_version: '[version this targets]'
|
|
298
299
|
---
|
|
299
300
|
```
|
|
300
301
|
|
|
@@ -332,16 +333,17 @@ One SKILL.md per domain. Follow this structure exactly.
|
|
|
332
333
|
|
|
333
334
|
```yaml
|
|
334
335
|
---
|
|
335
|
-
name: [
|
|
336
|
+
name: '[domain-slug]'
|
|
336
337
|
description: >
|
|
337
338
|
[1–3 sentences. What this domain covers AND when to load it. Name
|
|
338
339
|
specific functions, options, or APIs. Dense routing key.]
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
340
|
+
metadata:
|
|
341
|
+
type: sub-skill
|
|
342
|
+
library: '[lib]'
|
|
343
|
+
library_version: '[version]'
|
|
342
344
|
sources:
|
|
343
|
-
-
|
|
344
|
-
-
|
|
345
|
+
- '[repo]:docs/[path].md'
|
|
346
|
+
- '[repo]:src/[path].ts'
|
|
345
347
|
---
|
|
346
348
|
```
|
|
347
349
|
|
|
@@ -452,17 +454,18 @@ framework-specific patterns and mistakes.
|
|
|
452
454
|
|
|
453
455
|
```yaml
|
|
454
456
|
---
|
|
455
|
-
name: react-[lib]
|
|
457
|
+
name: 'react-[lib]'
|
|
456
458
|
description: >
|
|
457
459
|
[1–3 sentences. React-specific bindings for [library]. Name the hooks,
|
|
458
460
|
components, and providers. Mention React-specific patterns like SSR
|
|
459
461
|
hydration if applicable.]
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
462
|
+
metadata:
|
|
463
|
+
type: framework
|
|
464
|
+
library: '[lib]'
|
|
465
|
+
framework: react
|
|
466
|
+
library_version: '[version]'
|
|
464
467
|
requires:
|
|
465
|
-
- [lib]-core
|
|
468
|
+
- '[lib]-core'
|
|
466
469
|
---
|
|
467
470
|
```
|
|
468
471
|
|
|
@@ -499,18 +502,18 @@ with the framework frontmatter:
|
|
|
499
502
|
|
|
500
503
|
```yaml
|
|
501
504
|
---
|
|
502
|
-
name:
|
|
505
|
+
name: '[domain-slug]'
|
|
503
506
|
description: >
|
|
504
507
|
[React-specific description for this domain.]
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
508
|
+
metadata:
|
|
509
|
+
type: sub-skill
|
|
510
|
+
library: '[lib]'
|
|
511
|
+
framework: react
|
|
512
|
+
library_version: '[version]'
|
|
509
513
|
requires:
|
|
510
|
-
- [lib]-core
|
|
511
|
-
- [lib]-core/[domain-slug]
|
|
514
|
+
- '[lib]-core'
|
|
515
|
+
- '[lib]-core/[domain-slug]'
|
|
512
516
|
---
|
|
513
|
-
|
|
514
517
|
This skill builds on [lib]-core/[domain-slug]. Read the core skill first.
|
|
515
518
|
```
|
|
516
519
|
|
|
@@ -556,19 +559,19 @@ framework hooks and providers).
|
|
|
556
559
|
|
|
557
560
|
```yaml
|
|
558
561
|
---
|
|
559
|
-
name:
|
|
562
|
+
name: '[lib-a]-[lib-b]'
|
|
560
563
|
description: >
|
|
561
564
|
[How lib-a and lib-b wire together. Name the specific integration
|
|
562
565
|
points: functions, hooks, patterns.]
|
|
563
|
-
|
|
564
|
-
|
|
566
|
+
metadata:
|
|
567
|
+
type: composition
|
|
568
|
+
library_version: '[version of primary lib]'
|
|
565
569
|
requires:
|
|
566
|
-
- [lib-a]-core
|
|
567
|
-
- react-[lib-a]
|
|
568
|
-
- [lib-b]-core
|
|
569
|
-
- react-[lib-b]
|
|
570
|
+
- '[lib-a]-core'
|
|
571
|
+
- 'react-[lib-a]'
|
|
572
|
+
- '[lib-b]-core'
|
|
573
|
+
- 'react-[lib-b]'
|
|
570
574
|
---
|
|
571
|
-
|
|
572
575
|
This skill requires familiarity with both [lib-a] and [lib-b].
|
|
573
576
|
Read their core and framework skills first.
|
|
574
577
|
```
|
|
@@ -601,15 +604,16 @@ for these skill types.
|
|
|
601
604
|
|
|
602
605
|
```yaml
|
|
603
606
|
---
|
|
604
|
-
name:
|
|
607
|
+
name: security
|
|
605
608
|
description: >
|
|
606
609
|
Go-live security validation for [library]. Checks [specific concerns].
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
610
|
+
metadata:
|
|
611
|
+
type: security
|
|
612
|
+
library: '[lib]'
|
|
613
|
+
framework: react
|
|
614
|
+
library_version: '[version]'
|
|
611
615
|
requires:
|
|
612
|
-
- react-[lib]
|
|
616
|
+
- 'react-[lib]'
|
|
613
617
|
---
|
|
614
618
|
```
|
|
615
619
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/intent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Ship compositional knowledge for AI coding agents alongside your npm packages",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -28,14 +28,13 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"cac": "^6.7.14",
|
|
30
30
|
"jsonc-parser": "^3.3.1",
|
|
31
|
-
"semver": "^7.
|
|
32
|
-
"yaml": "2.
|
|
31
|
+
"semver": "^7.8.4",
|
|
32
|
+
"yaml": "2.9.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/semver": "^7.7.1",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"verdaccio": "^6.3.2"
|
|
36
|
+
"tsdown": "^0.22.2",
|
|
37
|
+
"verdaccio": "^6.7.2"
|
|
39
38
|
},
|
|
40
39
|
"scripts": {
|
|
41
40
|
"build": "tsdown src/index.ts src/cli.ts src/setup.ts src/core.ts --format esm --dts",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "./utils-Dj49bkF_.mjs";
|
|
2
|
-
import "./skill-paths-Cr74uFk4.mjs";
|
|
3
|
-
import "./scanner-2XDBAsbm.mjs";
|
|
4
|
-
import "./workspace-patterns-Cz_lNhwz.mjs";
|
|
5
|
-
import "./project-context-DDCie6Ro.mjs";
|
|
6
|
-
import "./excludes-DDMe-4iu.mjs";
|
|
7
|
-
import { a as checkLoadAllowed, i as applySourcePolicy, n as EMPTY_NOTE, o as readSkillSourcesConfig, r as MIGRATION_NOTICE, s as scanForPolicedIntents, t as ALLOW_ALL_NOTICE } from "./source-policy-rGOtjQSM.mjs";
|
|
8
|
-
|
|
9
|
-
export { scanForPolicedIntents };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import "./utils-Dj49bkF_.mjs";
|
|
2
|
-
import "./artifact-coverage-nGwun1tt.mjs";
|
|
3
|
-
import { n as checkStaleness, r as readPackageName, t as buildWorkspaceCoverageSignals } from "./staleness-B8IvDS_9.mjs";
|
|
4
|
-
|
|
5
|
-
export { buildWorkspaceCoverageSignals, checkStaleness, readPackageName };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import "./utils-Dj49bkF_.mjs";
|
|
2
|
-
import { a as readWorkspacePatterns, i as getWorkspaceInfo, n as findWorkspacePackages, o as resolveWorkspacePackages, r as findWorkspaceRoot, t as findPackagesWithSkills } from "./workspace-patterns-Cz_lNhwz.mjs";
|
|
3
|
-
|
|
4
|
-
export { findWorkspaceRoot, getWorkspaceInfo };
|
|
File without changes
|