@tanstack/intent 0.0.13 → 0.0.19

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 (36) hide show
  1. package/README.md +58 -21
  2. package/dist/cli.d.mts +6 -1
  3. package/dist/cli.mjs +250 -171
  4. package/dist/display-CuCDLPP_.mjs +3 -0
  5. package/dist/index.d.mts +18 -6
  6. package/dist/index.mjs +38 -15
  7. package/dist/install-prompt-C0M-U3WZ.mjs +59 -0
  8. package/dist/intent-library.mjs +5 -49
  9. package/dist/{library-scanner-V9sTOhrb.mjs → library-scanner-CU0OozQE.mjs} +4 -12
  10. package/dist/library-scanner.d.mts +4 -4
  11. package/dist/library-scanner.mjs +2 -2
  12. package/dist/scanner-B1UvuEBQ.mjs +4 -0
  13. package/dist/scanner-f82qRq7h.mjs +338 -0
  14. package/dist/setup-6m3IfxyO.d.mts +30 -0
  15. package/dist/setup-CncHbQlb.mjs +360 -0
  16. package/dist/setup.d.mts +2 -2
  17. package/dist/setup.mjs +3 -2
  18. package/dist/staleness-CWWuoPop.mjs +4 -0
  19. package/dist/{staleness-lP6B0O4z.mjs → staleness-D_ZiK4Tf.mjs} +24 -3
  20. package/dist/{types-BmnI8kFB.d.mts → types-ddLtccfV.d.mts} +30 -7
  21. package/dist/utils-DY1eH2E_.mjs +157 -0
  22. package/dist/utils-XSyO19J6.mjs +3 -0
  23. package/meta/domain-discovery/SKILL.md +95 -20
  24. package/meta/feedback-collection/SKILL.md +20 -1
  25. package/meta/generate-skill/SKILL.md +56 -5
  26. package/meta/templates/workflows/check-skills.yml +4 -4
  27. package/meta/templates/workflows/{notify-playbooks.yml → notify-intent.yml} +4 -4
  28. package/meta/tree-generator/SKILL.md +2 -2
  29. package/package.json +4 -3
  30. package/dist/scanner-DQeiZRzp.mjs +0 -4
  31. package/dist/scanner-dIYdkHQ1.mjs +0 -180
  32. package/dist/setup-BYOg-Ii-.mjs +0 -197
  33. package/dist/setup-CANkTz55.d.mts +0 -18
  34. package/dist/staleness-B5gUj7FR.mjs +0 -4
  35. package/dist/utils-DH3jY3CI.mjs +0 -39
  36. /package/dist/{display-D_XzuGnu.mjs → display-DhsUxNJW.mjs} +0 -0
package/README.md CHANGED
@@ -10,9 +10,9 @@ Docs target humans who browse. Types check individual API calls but can't encode
10
10
 
11
11
  The ecosystem already moves toward agent-readable knowledge — Cursor rules, CLAUDE.md files, skills directories. But delivery is stuck in copy-paste: hunt for a community-maintained rules file, paste it into your config, repeat for every tool. No versioning, no update path, no staleness signal.
12
12
 
13
- ## Skills: versioned knowledge in npm
13
+ ## Skills: versioned knowledge in your package manager
14
14
 
15
- A skill is a short, versioned document that tells agents how to use a specific capability of your library — correct patterns, common mistakes, and when to apply them. Skills ship inside your npm package and travel with the tool via `npm update` — not the model's training cutoff, not community-maintained rules files, not prompt snippets in READMEs. Versioned knowledge the maintainer owns, updated when the package updates.
15
+ A skill is a short, versioned document that tells agents how to use a specific capability of your library — correct patterns, common mistakes, and when to apply them. Skills ship inside your package and travel with the tool via your normal package manager update flow — not the model's training cutoff, not community-maintained rules files, not prompt snippets in READMEs. Versioned knowledge the maintainer owns, updated when the package updates.
16
16
 
17
17
  Each skill declares its source docs. When those docs change, the CLI flags the skill for review. One source of truth, one derived artifact that stays in sync.
18
18
 
@@ -20,20 +20,32 @@ The [Agent Skills spec](https://agentskills.io) is an open standard already adop
20
20
 
21
21
  ## Quick Start
22
22
 
23
+ ### Command runners
24
+
25
+ Use whichever command runner matches your environment:
26
+
27
+ | Tool | Pattern |
28
+ | ---- | -------------------------------------------- |
29
+ | npm | `npx @tanstack/intent@latest <command>` |
30
+ | pnpm | `pnpm dlx @tanstack/intent@latest <command>` |
31
+ | bun | `bunx @tanstack/intent@latest <command>` |
32
+
33
+ If you use Deno, support is best-effort today via `npm:` interop with `node_modules` enabled. First-class Deno runtime support is not implemented yet.
34
+
23
35
  ### For library consumers
24
36
 
25
37
  Set up skill-to-task mappings in your project's agent config files (CLAUDE.md, .cursorrules, etc.):
26
38
 
27
39
  ```bash
28
- npx @tanstack/intent install
40
+ npx @tanstack/intent@latest install
29
41
  ```
30
42
 
31
- No per-library setup. No hunting for rules files. Install the package, run `npx @tanstack/intent install`, and the agent understands the tool. Update the package, and skills update too.
43
+ No per-library setup. No hunting for rules files. Install the package, run `npx @tanstack/intent@latest install` through your preferred command runner, and the agent understands the tool. Update the package, and skills update too.
32
44
 
33
45
  List available skills from installed packages:
34
46
 
35
47
  ```bash
36
- npx @tanstack/intent list
48
+ npx @tanstack/intent@latest list
37
49
  ```
38
50
 
39
51
  ### For library maintainers
@@ -41,7 +53,7 @@ npx @tanstack/intent list
41
53
  Generate skills for your library by telling your AI coding agent to run:
42
54
 
43
55
  ```bash
44
- npx @tanstack/intent scaffold
56
+ npx @tanstack/intent@latest scaffold
45
57
  ```
46
58
 
47
59
  This walks the agent through domain discovery, skill tree generation, and skill creation — one step at a time with your review at each stage.
@@ -49,39 +61,64 @@ This walks the agent through domain discovery, skill tree generation, and skill
49
61
  Validate your skill files:
50
62
 
51
63
  ```bash
52
- npx @tanstack/intent validate
64
+ npx @tanstack/intent@latest validate
65
+ ```
66
+
67
+ In a monorepo, you can validate a package from the repo root:
68
+
69
+ ```bash
70
+ npx @tanstack/intent@latest validate packages/router/skills
53
71
  ```
54
72
 
55
73
  Check for skills that have fallen behind their sources:
56
74
 
57
75
  ```bash
58
- npx @tanstack/intent stale
76
+ npx @tanstack/intent@latest stale
59
77
  ```
60
78
 
79
+ From a monorepo root, `intent stale` checks every workspace package that ships skills. To scope it to one package, pass a directory like `intent stale packages/router`.
80
+
61
81
  Copy CI workflow templates into your repo so validation and staleness checks run on every push:
62
82
 
63
83
  ```bash
64
- npx @tanstack/intent setup-github-actions
84
+ npx @tanstack/intent@latest setup-github-actions
65
85
  ```
66
86
 
87
+ ## Compatibility
88
+
89
+ | Environment | Status | Notes |
90
+ | -------------- | ----------- | -------------------------------------------------- |
91
+ | Node.js + npm | Supported | Use `npx @tanstack/intent@latest <command>` |
92
+ | Node.js + pnpm | Supported | Use `pnpm dlx @tanstack/intent@latest <command>` |
93
+ | Node.js + Bun | Supported | Use `bunx @tanstack/intent@latest <command>` |
94
+ | Deno | Best-effort | Requires `npm:` interop and `node_modules` support |
95
+ | Yarn PnP | Unsupported | `@tanstack/intent` scans `node_modules` |
96
+
97
+ ## Monorepos
98
+
99
+ - Run `npx @tanstack/intent@latest setup-github-actions` from either the repo root or a package directory. Intent detects the workspace root and writes workflows to the repo-level `.github/workflows/` directory.
100
+ - Generated workflows are monorepo-aware: validation loops over workspace packages with skills, staleness checks run from the workspace root, and notify workflows watch package `src/` and docs paths.
101
+ - Run `npx @tanstack/intent@latest validate packages/<pkg>/skills` from the repo root to validate one package without root-level packaging warnings.
102
+ - Run `npx @tanstack/intent@latest stale` from the repo root to check all workspace packages with skills, or `intent stale packages/<pkg>` to check one package.
103
+
67
104
  ## Keeping skills current
68
105
 
69
- The real risk with any derived artifact is staleness. `npx @tanstack/intent stale` flags skills whose source docs have changed, and CI templates catch drift before it ships.
106
+ The real risk with any derived artifact is staleness. `npx @tanstack/intent@latest stale` flags skills whose source docs have changed, and CI templates catch drift before it ships.
70
107
 
71
- The feedback loop runs both directions. `npx @tanstack/intent feedback` lets users submit structured reports when a skill produces wrong output — which skill, which version, what broke. That context flows back to the maintainer, and the fix ships to everyone on the next `npm update`. Every support interaction produces an artifact that prevents the same class of problem for all future users — not just the one who reported it.
108
+ The feedback loop runs both directions. `npx @tanstack/intent@latest feedback` lets users submit structured reports when a skill produces wrong output — which skill, which version, what broke. That context flows back to the maintainer, and the fix ships to everyone on the next package update. Every support interaction produces an artifact that prevents the same class of problem for all future users — not just the one who reported it.
72
109
 
73
110
  ## CLI Commands
74
111
 
75
- | Command | Description |
76
- | ------------------------------------------- | --------------------------------------------------- |
77
- | `npx @tanstack/intent install` | Set up skill-to-task mappings in agent config files |
78
- | `npx @tanstack/intent list [--json]` | Discover intent-enabled packages |
79
- | `npx @tanstack/intent meta` | List meta-skills for library maintainers |
80
- | `npx @tanstack/intent scaffold` | Print the guided skill generation prompt |
81
- | `npx @tanstack/intent validate [dir]` | Validate SKILL.md files |
82
- | `npx @tanstack/intent setup-github-actions` | Copy CI templates into your repo |
83
- | `npx @tanstack/intent stale [--json]` | Check skills for version drift |
84
- | `npx @tanstack/intent feedback` | Submit skill feedback |
112
+ | Command | Description |
113
+ | -------------------------------------------------- | --------------------------------------------------- |
114
+ | `npx @tanstack/intent@latest install` | Set up skill-to-task mappings in agent config files |
115
+ | `npx @tanstack/intent@latest list [--json]` | Discover intent-enabled packages |
116
+ | `npx @tanstack/intent@latest meta` | List meta-skills for library maintainers |
117
+ | `npx @tanstack/intent@latest scaffold` | Print the guided skill generation prompt |
118
+ | `npx @tanstack/intent@latest validate [dir]` | Validate SKILL.md files |
119
+ | `npx @tanstack/intent@latest setup-github-actions` | Copy CI templates into your repo |
120
+ | `npx @tanstack/intent@latest stale [dir] [--json]` | Check skills for version drift |
121
+ | `npx @tanstack/intent@latest feedback` | Submit skill feedback |
85
122
 
86
123
  ## License
87
124
 
package/dist/cli.d.mts CHANGED
@@ -1 +1,6 @@
1
- export { };
1
+ #!/usr/bin/env node
2
+ //#region src/cli.d.ts
3
+ declare const USAGE = "TanStack Intent CLI\n\nUsage:\n intent list [--json] Discover intent-enabled packages\n intent meta [name] List meta-skills, or print one by name\n intent validate [<dir>] Validate skill files (default: skills/)\n intent install Print a skill that guides your coding agent to set up skill-to-task mappings\n intent scaffold Print maintainer scaffold prompt\n intent add-library-bin Generate bin/intent.{js,mjs} bridge file\n intent edit-package-json Wire package.json (files, bin) for skill publishing\n intent setup-github-actions Copy CI workflow templates to .github/workflows/\n intent stale [dir] [--json] Check skills for staleness";
4
+ declare function main(argv?: Array<string>): Promise<number>;
5
+ //#endregion
6
+ export { USAGE, main };