Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0409018
update install prompt
LadyBluenotes Apr 14, 2026
8983f1c
update install prompt
LadyBluenotes Apr 14, 2026
44091b5
avoid absolute skill paths in install guidance
LadyBluenotes Apr 14, 2026
951c646
centralize safe skill path handling
LadyBluenotes Apr 14, 2026
e90daaa
add deterministic install block builder
LadyBluenotes Apr 14, 2026
1269f41
add idempotent install file writer
LadyBluenotes Apr 14, 2026
b745316
Update install command to write agent skill mappings
LadyBluenotes Apr 14, 2026
c125e36
Verify installed agent skill mappings before reporting success
LadyBluenotes Apr 14, 2026
799bca2
fix: harden install skill mapping verification
LadyBluenotes Apr 14, 2026
7c7882c
fix: share safe skill load path rewriting
LadyBluenotes Apr 16, 2026
1467d59
add compact skill identity helpers
LadyBluenotes Apr 16, 2026
802428d
add resolver core API
LadyBluenotes Apr 16, 2026
c8b395f
add resolver cli command
LadyBluenotes Apr 16, 2026
b6c9007
make global intent scanning opt-in
LadyBluenotes Apr 16, 2026
85ad196
generate compact intent skill mappings
LadyBluenotes Apr 16, 2026
360fd33
cover pnpm paths in skill resolver
LadyBluenotes Apr 16, 2026
ee99caf
cover resolve CLI failure paths
LadyBluenotes Apr 16, 2026
c580912
improve integration install diagnostics
LadyBluenotes Apr 16, 2026
d193922
Tighten resolve validation and install prompt
LadyBluenotes Apr 16, 2026
7e20e07
update docs
LadyBluenotes Apr 16, 2026
47a21a4
ci: apply automated fixes
autofix-ci[bot] Apr 16, 2026
08a181d
changeset
LadyBluenotes Apr 16, 2026
c053ec8
simplify
LadyBluenotes Apr 16, 2026
88761d2
update version
LadyBluenotes Apr 16, 2026
400c316
fix release?
LadyBluenotes Apr 16, 2026
9a5224a
Merge branch 'main' into install-prompt
LadyBluenotes Apr 16, 2026
3b0ae0c
ci: apply automated fixes
autofix-ci[bot] Apr 16, 2026
30d74f2
fix: review fixes — warning prefix match, doc accuracy, stale references
KyleAMathews Apr 19, 2026
d1e0452
ci: apply automated fixes
autofix-ci[bot] Apr 19, 2026
6f7aeb3
remove resolve and introduce load and --map
LadyBluenotes Apr 20, 2026
4e42356
ci: apply automated fixes
autofix-ci[bot] Apr 20, 2026
f8523d2
ci: apply automated fixes (attempt 2/3)
autofix-ci[bot] Apr 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 56 additions & 36 deletions docs/cli/intent-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,59 @@ title: intent install
id: intent-install
---

`intent install` prints instructions for setting up an `intent-skills` mapping block in your project guidance file.

```bash
npx @tanstack/intent@latest install
```

The command prints text only. It does not edit files.

## Output

The printed instructions include this tagged block template:

```yaml
<!-- intent-skills:start -->
# Skill mappings — when working in these areas, load the linked skill file into context.
skills:
- task: "describe the task or code area here"
load: "node_modules/package-name/skills/skill-name/SKILL.md"
<!-- intent-skills:end -->
```

They also ask you to:

1. Check for an existing block first
2. Run `intent list` to discover installed skills, including any packages surfaced by the command's explicit global scan
3. Ask whether you want a config target other than `AGENTS.md`
4. Update an existing block in place when one already exists
5. Add task-to-skill mappings
6. Preserve all content outside the tagged block

If no existing block is found, `AGENTS.md` is the default target.

## Related

- [intent list](./intent-list)
- [Quick Start for Consumers](../getting-started/quick-start-consumers)
`intent install` creates or updates an `intent-skills` mapping block in a project guidance file.

```bash
npx @tanstack/intent@latest install [--dry-run] [--print-prompt] [--global] [--global-only]
```

## Options

- `--dry-run`: print the generated mapping block without writing files
- `--print-prompt`: print the agent setup prompt instead of writing files
- `--global`: include global packages after project packages
- `--global-only`: install mappings from global packages only

## Behavior

- Scans project-local packages by default.
- Includes global packages only when `--global` or `--global-only` is passed.
- Creates `AGENTS.md` when actionable skills are found and no managed block exists.
- Updates an existing managed block in a supported config file.
- Preserves all content outside the managed block.
- Skips reference-only, meta, maintainer, and maintainer-only skills.
- Writes compact `when` and `use` entries instead of load paths.
- Verifies the managed block before reporting success.
- Prints `No actionable intent skills found.` and does not create a config file when no actionable skills are discovered.

Supported config files: `AGENTS.md`, `CLAUDE.md`, `.cursorrules`, `.github/copilot-instructions.md`.

## Output

The generated block uses compact skill identities:

```yaml
<!-- intent-skills:start -->
# Skill mappings - resolve `use` with `npx @tanstack/intent@latest resolve <use>`.
skills:
- when: "Query data fetching patterns"
use: "@tanstack/query#fetching"
<!-- intent-skills:end -->
```

- `when`: task-routing phrase for agents
- `use`: portable skill identity in `<package>#<skill>` format
- The block does not store `load` paths, absolute paths, or package-manager-internal paths

## Status messages

- Created: `Created AGENTS.md with 1 mapping.`
- Updated: `Updated AGENTS.md with 2 mappings.`
- Unchanged: `No changes to AGENTS.md; 2 mappings already current.`
- No actionable skills: `No actionable intent skills found.`

## Related

- [intent list](./intent-list)
- [intent resolve](./intent-resolve)
- [Quick Start for Consumers](../getting-started/quick-start-consumers)
102 changes: 68 additions & 34 deletions docs/cli/intent-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,36 @@ title: intent list
id: intent-list
---

`intent list` discovers skill-enabled packages and prints available skills.

```bash
npx @tanstack/intent@latest list [--json]
```

## Options

- `--json`: print JSON instead of text output

## What you get

- Scans project and workspace dependencies for intent-enabled packages and skills
- Intentionally includes accessible global packages when listing installed skills
- Includes warnings from discovery
- If no packages are discovered, prints `No intent-enabled packages found.`
- Summary line with package count, skill count, and detected package manager
- Package table columns: `PACKAGE`, `SOURCE`, `VERSION`, `SKILLS`, `REQUIRES`
`intent list` discovers skill-enabled packages and prints available skills.

```bash
npx @tanstack/intent@latest list [--json] [--global] [--global-only]
```

## Options

- `--json`: print JSON instead of text output
- `--global`: include global packages after project packages
- `--global-only`: list global packages only

## What you get

- Scans project and workspace dependencies for intent-enabled packages and skills
- Includes global packages only when `--global` or `--global-only` is passed
- Includes warnings from discovery
- If no packages are discovered, prints `No intent-enabled packages found.`
- Summary line with package count, skill count, and detected package manager
- Package table columns: `PACKAGE`, `SOURCE`, `VERSION`, `SKILLS`, `REQUIRES`
- Skill tree grouped by package
- Optional warnings section (`⚠ ...` per warning)

`REQUIRES` uses `intent.requires` values joined by `, `; empty values render as `–`.
`SOURCE` is a lightweight indicator showing whether the selected package came from local discovery or explicit global scanning.

## JSON output

`--json` prints the `ScanResult` object:
`REQUIRES` uses `intent.requires` values joined by `, `; empty values render as `–`.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
`SOURCE` is a lightweight indicator showing whether the selected package came from local discovery or explicit global scanning.
When both local and global packages are scanned, local packages take precedence.

## JSON output

`--json` prints the `ScanResult` object:

```json
{
Expand All @@ -55,16 +58,47 @@ npx @tanstack/intent@latest list [--json]
}
]
}
],
"warnings": ["string"]
}
```

`packages` are ordered using `intent.requires` when possible. When the same package exists both locally and globally, `intent list` prefers the local package.

## Common errors

- Scanner failures are printed as errors
],
"warnings": ["string"],
"conflicts": [
{
"packageName": "string",
"chosen": {
"version": "string",
"packageRoot": "string"
},
"variants": [
{
"version": "string",
"packageRoot": "string"
}
]
}
],
"nodeModules": {
"local": {
"path": "string",
"detected": true,
"exists": true,
"scanned": true
},
Comment on lines +79 to +85
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Document nodeModules.local.path as nullable.

NodeModulesScanTarget.path is string | null for both local and global scan targets, so the JSON schema example should not imply local always has a path.

📝 Proposed fix
     "local": {
-      "path": "string",
+      "path": "string | null",
       "detected": true,
       "exists": true,
       "scanned": true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"nodeModules": {
"local": {
"path": "string",
"detected": true,
"exists": true,
"scanned": true
},
"nodeModules": {
"local": {
"path": "string | null",
"detected": true,
"exists": true,
"scanned": true
},
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/cli/intent-list.md` around lines 79 - 85, The example JSON incorrectly
shows nodeModules.local.path as always a string; update the docs to reflect that
NodeModulesScanTarget.path is nullable by documenting nodeModules.local.path as
"string | null" (and adjust the example value to null where appropriate) and
mention the same for nodeModules.global.path; ensure references to
NodeModulesScanTarget.path in the text and example match the type "string |
null".

"global": {
"path": "string | null",
"detected": true,
"exists": true,
"scanned": false,
"source": "string (optional)"
}
}
}
```

`packages` are ordered using `intent.requires` when possible.
When the same package exists both locally and globally and global scanning is enabled, `intent list` prefers the local package.

## Common errors

- Scanner failures are printed as errors
- Unsupported environments:
- Yarn PnP without `node_modules`
- Deno projects without `node_modules`
63 changes: 63 additions & 0 deletions docs/cli/intent-resolve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: intent resolve
id: intent-resolve
---

`intent resolve` resolves a compact skill identity to the skill file path reported by the current install.

```bash
npx @tanstack/intent@latest resolve <package>#<skill> [--json] [--global] [--global-only]
```

## Options

- `--json`: print structured JSON instead of only the path
- `--global`: resolve from project packages first, then global packages
- `--global-only`: resolve from global packages only

## What you get

- Validates `<package>#<skill>` before scanning
- Scans project-local packages by default
- Includes global packages only when `--global` or `--global-only` is passed
- Prefers local packages when `--global` is used and the same package exists locally and globally
- Prints the resolved skill path by default
- Returns scanner-reported paths, including package-manager-internal paths for transitive installs

The package can be scoped or unscoped. The skill can include slash-separated sub-skill names.

Examples:

```bash
npx @tanstack/intent@latest resolve @tanstack/query#fetching
npx @tanstack/intent@latest resolve @tanstack/query#core/fetching
npx @tanstack/intent@latest resolve some-lib#core
```

## JSON output

`--json` prints:

```json
{
"package": "@tanstack/query",
"skill": "fetching",
"path": "node_modules/@tanstack/query/skills/fetching/SKILL.md",
"source": "local",
"version": "5.0.0",
"warnings": []
}
```

## Common errors

- Missing separator: `Invalid skill use "@tanstack/query": expected <package>#<skill>.`
- Empty package: `Invalid skill use "#core": package is required.`
- Empty skill: `Invalid skill use "@tanstack/query#": skill is required.`
- Missing package: `Cannot resolve skill use "...": package "..." was not found.`
- Missing skill: `Cannot resolve skill use "...": skill "..." was not found in package "...".`

## Related

- [intent list](./intent-list)
- [intent install](./intent-install)
4 changes: 4 additions & 0 deletions docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
"label": "intent list",
"to": "cli/intent-list"
},
{
"label": "intent resolve",
"to": "cli/intent-resolve"
},
{
"label": "intent meta",
"to": "cli/intent-meta"
Expand Down
Loading
Loading