@tanstack/intent 0.0.27 → 0.0.32
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/LICENSE +21 -0
- package/README.md +18 -5
- package/dist/cli.d.mts +0 -0
- package/dist/cli.mjs +62 -68
- package/dist/display-DCRCp4-C.mjs +5 -0
- package/dist/{display-hdsqb4w-.mjs → display-DUgtRJkt.mjs} +10 -1
- package/dist/index.d.mts +57 -4
- package/dist/index.mjs +9 -6
- package/dist/install-BmVqcbEi.mjs +506 -0
- package/dist/intent-library.mjs +9 -5
- package/dist/{library-scanner-B51qV5aX.mjs → library-scanner-DFFreLjW.mjs} +10 -3
- package/dist/library-scanner.d.mts +2 -2
- package/dist/library-scanner.mjs +2 -1
- package/dist/{project-context-B7UXTA9F.mjs → project-context-CKG-q4rD.mjs} +1 -1
- package/dist/resolver-aFigTqXi.mjs +70 -0
- package/dist/scanner-CRZITpcY.mjs +6 -0
- package/dist/{scanner-1ZGYK3Qm.mjs → scanner-DKL8v8is.mjs} +176 -117
- package/dist/{setup-BzhEoOBi.mjs → setup-JJvjiGkM.mjs} +2 -2
- package/dist/setup.d.mts +1 -1
- package/dist/setup.mjs +3 -3
- package/dist/skill-paths-8k9K9y26.mjs +33 -0
- package/dist/skill-use-CXOnncWK.mjs +42 -0
- package/dist/{staleness-BtmJtMpz.mjs → staleness-DorwfGrf.mjs} +12 -1
- package/dist/staleness-NF-lxfXf.mjs +4 -0
- package/dist/{types-BTQ9efv-.d.mts → types-CsySN6Vw.d.mts} +7 -1
- package/dist/{workspace-patterns-Boa5mAbf.mjs → workspace-patterns-DbnA0peB.mjs} +1 -1
- package/dist/{workspace-patterns-BuJMfudb.mjs → workspace-patterns-U35B5AO-.mjs} +73 -4
- package/package.json +3 -4
- package/dist/display-DdmZXLZm.mjs +0 -3
- package/dist/install-BzDmD5yI.mjs +0 -69
- package/dist/scanner-CERQgrRN.mjs +0 -5
- package/dist/staleness-SRims-ZP.mjs +0 -4
- /package/dist/{setup-BA9RkENh.d.mts → setup-DDoOLriA.d.mts} +0 -0
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
//#region src/commands/install.ts
|
|
2
|
-
const INSTALL_PROMPT = `You are an AI assistant helping a developer set up skill-to-task mappings for their project.
|
|
3
|
-
|
|
4
|
-
Follow these steps in order:
|
|
5
|
-
|
|
6
|
-
1. CHECK FOR EXISTING MAPPINGS
|
|
7
|
-
Search the project's agent config files (AGENTS.md, CLAUDE.md, .cursorrules,
|
|
8
|
-
.github/copilot-instructions.md) for a block delimited by:
|
|
9
|
-
<!-- intent-skills:start -->
|
|
10
|
-
<!-- intent-skills:end -->
|
|
11
|
-
- If found: show the user the current mappings, keep that file as the source of truth,
|
|
12
|
-
and ask "What would you like to update?" Then skip to step 4 with their requested changes.
|
|
13
|
-
- If not found: continue to step 2.
|
|
14
|
-
|
|
15
|
-
2. DISCOVER AVAILABLE SKILLS
|
|
16
|
-
Run: \`npx @tanstack/intent@latest list\`
|
|
17
|
-
This outputs each skill's name, description, full path, and whether it was found in
|
|
18
|
-
project-local node_modules or accessible global node_modules.
|
|
19
|
-
This works best in Node-compatible environments (npm, pnpm, Bun, or Deno npm interop
|
|
20
|
-
with node_modules enabled).
|
|
21
|
-
|
|
22
|
-
3. SCAN THE REPOSITORY
|
|
23
|
-
Build a picture of the project's structure and patterns:
|
|
24
|
-
- Read package.json for library dependencies
|
|
25
|
-
- Survey the directory layout (src/, app/, routes/, components/, api/, etc.)
|
|
26
|
-
- Note recurring patterns (routing, data fetching, auth, UI components, etc.)
|
|
27
|
-
|
|
28
|
-
Based on this, propose 3-5 skill-to-task mappings. For each one explain:
|
|
29
|
-
- The task or code area (in plain language the user would recognise)
|
|
30
|
-
- Which skill applies and why
|
|
31
|
-
|
|
32
|
-
Then ask: "What other tasks do you commonly use AI coding agents for?
|
|
33
|
-
I'll create mappings for those too."
|
|
34
|
-
Also ask: "I'll default to AGENTS.md unless you want another supported config file.
|
|
35
|
-
Do you have a preference?"
|
|
36
|
-
|
|
37
|
-
4. WRITE THE MAPPINGS BLOCK
|
|
38
|
-
Once you have the full set of mappings, write or update the agent config file.
|
|
39
|
-
- If you found an existing intent-skills block, update that file in place.
|
|
40
|
-
- Otherwise prefer AGENTS.md by default, unless the user asked for another supported file.
|
|
41
|
-
|
|
42
|
-
Use this exact block:
|
|
43
|
-
|
|
44
|
-
<!-- intent-skills:start -->
|
|
45
|
-
# Skill mappings - when working in these areas, load the linked skill file into context.
|
|
46
|
-
skills:
|
|
47
|
-
- task: "describe the task or code area here"
|
|
48
|
-
load: "node_modules/package-name/skills/skill-name/SKILL.md"
|
|
49
|
-
<!-- intent-skills:end -->
|
|
50
|
-
|
|
51
|
-
Rules:
|
|
52
|
-
- Use the user's own words for task descriptions
|
|
53
|
-
- Include the exact path from \`npx @tanstack/intent@latest list\` output so agents can load it directly
|
|
54
|
-
- Paths should use the stable \`node_modules/<package-name>/skills/...\` format (no version numbers)
|
|
55
|
-
- If a skill path from \`list\` contains package-manager-internal directories (e.g. \`.pnpm/\`, \`.bun/\`)
|
|
56
|
-
with version numbers, it is a transitive dependency without a stable top-level symlink.
|
|
57
|
-
For these skills, do NOT embed the versioned path. Instead, add a comment telling the agent
|
|
58
|
-
how to locate the skill at runtime:
|
|
59
|
-
- task: "describe the task"
|
|
60
|
-
# To load this skill, run: npx @tanstack/intent@latest list | grep <skill-name>
|
|
61
|
-
- Keep entries concise - this block is read on every agent task
|
|
62
|
-
- Preserve all content outside the block tags unchanged
|
|
63
|
-
- If the user is on Deno, note that this setup is best-effort today and relies on npm interop`;
|
|
64
|
-
function runInstallCommand() {
|
|
65
|
-
console.log(INSTALL_PROMPT);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
//#endregion
|
|
69
|
-
export { runInstallCommand as n, INSTALL_PROMPT as t };
|
|
File without changes
|