Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .changeset/remove-unused-internal-code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/intent': patch
---

Remove unused internal helpers, duplicate path and type guards, and dead branches. Move workspace resolution into `core` and split shared utilities by job. Exports and behavior do not change.
5 changes: 5 additions & 0 deletions .changeset/shorten-meta-skill-wording.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/intent': patch
---

Shorten the wording of the bundled `domain-discovery`, `generate-skill`, `tree-generator`, and `skill-staleness-check` skills. Instructions do not change.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<a href="https://www.npmjs.com/package/@tanstack/intent" target="\_parent">
<img alt="" src="https://img.shields.io/npm/dm/@tanstack/intent.svg" alt="npm downloads" />
</a>
- <a href="https://github.com/TanStack/intent" target="\_parent">
<a href="https://github.com/TanStack/intent" target="\_parent">
<img alt="" src="https://img.shields.io/github/stars/TanStack/intent.svg?style=social&label=Star" alt="GitHub stars" />
</a>
<a href="https://bundlephobia.com/result?p=@tanstack/react-intent@latest" target="\_parent">
Expand Down Expand Up @@ -72,14 +72,14 @@ A CLI for library maintainers to generate, validate, and ship [Agent Skills](htt
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/TanStack/tanstack.com/main/src/images/coderabbit-dark.svg" height="40" />
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/TanStack/tanstack.com/main/src/images/coderabbit-light.svg" height="40" />
<img src=https://raw.githubusercontent.com/TanStack/tanstack.com/main/src/images/coderabbit-light.svg" height="40" alt="CodeRabbit" />
<img src="https://raw.githubusercontent.com/TanStack/tanstack.com/main/src/images/coderabbit-light.svg" height="40" alt="CodeRabbit" />
</picture>
</a>
</td>
<td>
<a href="https://www.cloudflare.com?utm_source=tanstack">
<picture>
<source media="(prefers-color-scheme: dark)" srcset=https://raw.githubusercontent.com/TanStack/tanstack.com/main/src/images/cloudflare-white.svg" height="60" />
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/TanStack/tanstack.com/main/src/images/cloudflare-white.svg" height="60" />
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/TanStack/tanstack.com/main/src/images/cloudflare-black.svg" height="60" />
<img src="https://raw.githubusercontent.com/TanStack/tanstack.com/main/src/images/cloudflare-black.svg" height="60" alt="Cloudflare" />
</picture>
Expand Down
4 changes: 2 additions & 2 deletions docs/cli/intent-maintainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Generated commands do not pin a revision or match the application's installed de

Intent preserves existing plugin version fields. Claude uses an explicit plugin version to decide whether an update is available: bump the authoritative plugin version when releasing changed content. Without a version in either the plugin or its marketplace entry, Git-based Claude installs use the source commit. Updating an npm package version alone does not update plugin metadata.

Publish through the library's normal release process. Repository exports do not submit marketplace listings, publish releases, or update consumer installations. State the supported package versions in implementation skills and check them against the consumer's dependencies. Consumers manage updates and removal through their chosen installer.
Repository exports do not submit marketplace listings, publish releases, or update consumer installations. State the supported package versions in implementation skills and check them against the consumer's dependencies. Consumers manage updates and removal through their chosen installer.

## Maintain and check

Expand All @@ -135,7 +135,7 @@ Publish through the library's normal release process. Repository exports do not

<!-- ::end:tabs -->

Status accepts `--json` and an actual Git comparison base with `--base <ref>`. Sync copies descriptions, purpose, sources, and prerequisites from the registered skills into the tree. It also adds the package discovery keyword and includes each skill directory in existing `files` allowlists. An absent allowlist stays absent, preserving npm's default contents. Sync prints each path it synchronized, or `Nothing to synchronize.` when every file is current, and labels the consumer install commands when repository distribution is selected. Inspect the actual packed archive in the library's release checks.
Status accepts `--json` and a Git comparison base with `--base <ref>`. Sync copies descriptions, purpose, sources, and prerequisites from the registered skills into the tree. It also adds the package discovery keyword and includes each skill directory in existing `files` allowlists. An absent allowlist stays absent, preserving npm's default contents. Sync prints each path it synchronized, or `Nothing to synchronize.` when every file is current, and labels the consumer install commands when repository distribution is selected. Inspect the packed archive in the library's release checks.

`maintainer review --interactive` is the human path. It walks each pending item in the terminal, shows the current guidance and changed files, and records the chosen outcomes with reason and evidence. It requires a terminal outside CI.

Expand Down
4 changes: 2 additions & 2 deletions docs/cli/intent-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ A justified no-op is a completed review. Missing evidence remains pending.
| Option | Behavior |
| --- | --- |
| `[dir]` | Locate the Git working tree. The review covers that repository, including its packages. |
| `--base <ref>` | Compare against an available Git commit or ref, such as the actual PR base. |
| `--base <ref>` | Compare against an available Git commit or ref, such as the PR base. |
| `--json` | Print the complete structured report for an agent or script. |
| `--check` | Exit nonzero when review items remain. |

Expand Down Expand Up @@ -159,7 +159,7 @@ For a human terminal, run the interactive command from the library repository:

<!-- ::end:tabs -->

Inspect each item's current guidance and changed files, choose an outcome, and supply the reason and actual evidence. The changes view compares tracked files with the displayed Git base and includes untracked content. Use `--base <available-commit>` for a specific comparison. Edit and test guidance before starting; changes during review invalidate the affected outcomes.
Inspect each item's current guidance and changed files, choose an outcome, and supply the reason and evidence. The changes view compares tracked files with the displayed Git base and includes untracked content. Use `--base <available-commit>` for a specific comparison. Edit and test guidance before starting; changes during review invalidate the affected outcomes.

Choose **Leave pending** when more work is needed. Items with unresolved source mappings or planning problems cannot be completed. The final preview lists the proposed outcomes and evidence. Confirmation records through the same fingerprint checks as `--record`; cancellation records nothing. Evidence text is stored, not executed or independently verified.

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/intent-stale.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Reason generation:

The existing `--github-review` workflow mode writes `review-items.json` and, when there are items, `pr-body.md`. Its Agent Review instructions route to `generate-skill` and its conditional review-signals reference. The command itself does not create a remote PR or edit skills; the installed GitHub workflow handles the review reminder.

Version drift and missing stored source SHAs do not prove that guidance is wrong. Review actual source changes before editing. Missing evidence stays unresolved, and an evidence-backed no-op may leave a signal flagged. Failed checks require logs; workflow advisories are separate maintenance items. Neither is a reason to rewrite skills.
Version drift and missing stored source SHAs do not prove that guidance is wrong. Review the source changes before editing. Missing evidence stays unresolved, and an evidence-backed no-op may leave a signal flagged. Failed checks require logs; workflow advisories are separate maintenance items. Neither is a reason to rewrite skills.

### `stale` and `review` serve different checks

Expand Down
6 changes: 3 additions & 3 deletions docs/concepts/trust-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ Workspace discovery checks ancestors up to the first workspace declaration or Gi

When no effective policy exists, `intent install` follows this flow:

1. **Discover:** summarize npm and workspace skill counts. Descriptions and exclusions are available through optional inspection.
2. **Choose:** enable all sources, choose packages or scopes, or select individual skills. Package and scope selections stay compact and include future matching skills. A whole scope requires an explicit selection.
3. **Confirm once:** show the current skill count, saved rules, and destination file. Optional individual review opens skill lists only for the selected packages you choose to inspect. It can add exclusions while retaining broad rules; unreviewed packages keep their selection. Only affirmative confirmation saves permissions and exclusions atomically, then installs guidance. An empty selection explicitly confirms disabling all skills.
1. Summarize npm and workspace skill counts. Descriptions and exclusions are available through optional inspection.
2. Enable all sources, choose packages or scopes, or select individual skills. Package and scope selections stay compact and include future matching skills. A whole scope requires an explicit selection.
3. Confirm the current skill count, saved rules, and destination file. Optional individual review opens skill lists only for the selected packages you choose to inspect. It can add exclusions while retaining broad rules; unreviewed packages keep their selection. Only affirmative confirmation saves permissions and exclusions atomically, then installs guidance. An empty selection explicitly confirms disabling all skills.

| Outcome | Files changed |
| --- | --- |
Expand Down
8 changes: 1 addition & 7 deletions docs/getting-started/quick-start-consumers.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,7 @@ Project-scoped hooks are installed for Claude Code and Codex. `intent install` c

Cursor and generic `AGENTS.md` agents use the guidance block only.

Hooks return the available Intent skill catalog as context for supported agent sessions and keep the edit gate active until they observe a supported `intent load` command.

Hooks do not verify that:

- The command succeeded.
- The skill matched the task.
- The agent applied the guidance.
Hooks return the available Intent skill catalog as context for supported agent sessions and keep the edit gate active until they observe a supported `intent load` command. See [intent hooks](../cli/intent-hooks) for what hooks do not verify.

To control what appears in the session catalog, configure `intent.skills` and `intent.exclude` in `package.json`.

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/quick-start-maintainers.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Selecting skills for repository distribution requires registered, authored skill

<!-- ::end:tabs -->

Use the actual registered names; each must be a tree entry whose `SKILL.md` exists. When the repository, plugin name, or selection cannot be resolved, setup reports every missing input in one error. This records the selection in the skill tree. `maintainer sync` generates plugin metadata pointing to the existing package directories and prints consumer commands for `npx skills add` and `gh skill add`. Consumers can also use the native Claude or Cursor plugin flow. No second copy of the skill text is created, and later skills are not added automatically.
Use the registered names; each must be a tree entry whose `SKILL.md` exists. When the repository, plugin name, or selection cannot be resolved, setup reports every missing input in one error. This records the selection in the skill tree. `maintainer sync` generates plugin metadata pointing to the existing package directories and prints consumer commands for `npx skills add` and `gh skill add`. Consumers can also use the native Claude or Cursor plugin flow. No second copy of the skill text is created, and later skills are not added automatically.

To explicitly record package-only distribution or turn off earlier repository exports:

Expand Down
2 changes: 1 addition & 1 deletion docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Intent provides tooling for two workflows:
- Ship skills in the same release pipeline as code
- Review version, source, artifact, and package coverage signals

## Keep the workflow boundaries clear
## Workflow stages

| Stage | Who runs it | Result |
| --- | --- | --- |
Expand Down
2 changes: 1 addition & 1 deletion docs/registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ This adds the `tanstack-intent` keyword and registered skill directories to exis

<!-- ::end:tabs -->

Save the report under `.intent/`, assess the pending items, and annotate completed outcomes with their reasons and actual evidence. Record the report with `intent maintainer review --record <report.json>`, then run `intent maintainer check`. This checks skill structure, registration, generated files, and pending reviews together. See the [source-review reference](./cli/intent-review) for report fields and recording.
Save the report under `.intent/`, assess the pending items, and annotate completed outcomes with their reasons and evidence. Record the report with `intent maintainer review --record <report.json>`, then run `intent maintainer check`. This checks skill structure, registration, generated files, and pending reviews together. See the [source-review reference](./cli/intent-review) for report fields and recording.

### 4. Publish

Expand Down
10 changes: 5 additions & 5 deletions packages/intent/meta/domain-discovery/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ The lightweight path produces identical output artifacts (domain_map.yaml and sk

These rules override any other reasoning. No exceptions.

1. **Phases 2 and 4 are interactive interviews conducted with the maintainer.** You must ask the questions specified in each sub-section and wait for the maintainer's response before continuing. Documentation, source code, and other automated analysis are NOT substitutes for the maintainer's answers.
2. **Every question in Phases 2 and 4 must be asked as an open-ended question and sent as a message to the maintainer.** You must then STOP and WAIT for their reply. Do not answer your own questions. Do not infer answers from documentation. Do not skip questions because you believe you already know the answer.
3. **Never ask factual questions you can answer by searching the codebase.** Before asking any question, determine whether the answer is a deterministic fact (how many X exist, what versions are supported, which files implement Y) or a judgment call (which ones matter, what should we prioritize, what do developers struggle with). Factual questions must be answered by searching the code β€” grep, glob, read files. Only ask the maintainer for priorities, opinions, trade-offs, and implicit knowledge that cannot be found in code or docs. Asking the maintainer a question whose answer is sitting in the codebase wastes their time and erodes trust in the process.
1. **Phases 2 and 4 are interactive interviews conducted with the maintainer.** You must ask the questions specified in each sub-section and wait for the maintainer's response before continuing. Documentation, source code, and other automated analysis are not substitutes for the maintainer's answers.
2. **Every question in Phases 2 and 4 must be asked as an open-ended question and sent as a message to the maintainer.** You must then stop and wait for their reply. Do not answer your own questions. Do not infer answers from documentation. Do not skip questions because you believe you already know the answer.
3. **Never ask factual questions you can answer by searching the codebase.** Before asking any question, determine whether the answer is a deterministic fact (how many X exist, what versions are supported, which files implement Y) or a judgment call (which ones matter, what should we prioritize, what do developers struggle with). Factual questions must be answered by searching the code β€” grep, glob, read files. Only ask the maintainer for priorities, opinions, trade-offs, and implicit knowledge that cannot be found in code or docs.
4. **Do not convert open-ended questions into multiple-choice, yes/no, or confirmation prompts.** The question templates in each sub-section are open-ended by design. Present them as open-ended questions. The maintainer's unprompted answers surface knowledge that pre-structured options suppress.
5. **Minimum question counts are enforced.** Each sub-section specifies a question count range (e.g. "2–4 questions"). You must ask at least the minimum number. Asking zero questions in any sub-section is a protocol violation.
6. **STOP gates are mandatory.** At the boundaries marked `── STOP ──` below, you must halt execution and wait for the maintainer's response or acknowledgment before proceeding. Do not continue past a STOP gate in the same message.
7. **If the maintainer asks to skip an interview phase**, explain the value of the phase and what will be lost. Proceed with skipping only if they confirm a second time.
8. **Rich documentation makes interviews MORE valuable, not less.** When docs are comprehensive, the interview surfaces what docs miss: implicit knowledge, AI-specific failure modes, undocumented tradeoffs, and the maintainer's prioritization of what matters most. Never rationalize skipping interviews because documentation is thorough.
8. **Rich documentation makes interviews more valuable, not less.** When docs are comprehensive, the interview surfaces what docs miss: implicit knowledge, AI-specific failure modes, undocumented tradeoffs, and the maintainer's prioritization of what matters most. Never rationalize skipping interviews because documentation is thorough.

---

Expand Down Expand Up @@ -202,7 +202,7 @@ Adapt from this bank of gap-targeted question templates:

### 4c β€” AI-agent-specific failure modes (2–4 questions)

These target mistakes that AI coding agents make but human developers typically don't. Agent-specific failures are often the highest-value findings β€” in testing, maintainer answers to these questions produced the most critical failure modes.
These target mistakes that AI coding agents make but human developers typically don't. Agent-specific failures are often the highest-value findings.

- "What mistakes would an AI coding agent make that a human developer wouldn't? Think about: hallucinating APIs that don't exist, defaulting to language primitives instead of library abstractions, choosing the wrong adapter or integration path."
- "When an agent generates code using your library, what's the first thing you'd check? What pattern would make you immediately say 'an AI wrote this'?"
Expand Down
Loading
Loading