From 78ef128118707c554107fdd21b88de288f67be70 Mon Sep 17 00:00:00 2001 From: Abdullahi Mohamed <126521894+WaryaWayne@users.noreply.github.com> Date: Tue, 28 Jul 2026 22:36:34 -0400 Subject: [PATCH 1/3] fix: use TanStack Intent discovery mode instead of full skill mappings Generated projects ran `intent install --map`, which writes the complete skill-to-task table for every installed package into AGENTS.md. In a default app that is 99 lines; it grows with each add-on, and agents re-read all of it on every invocation regardless of whether the task touches those libraries. Plain `intent install` emits a 12-line pointer instructing the agent to run `intent list` / `intent load #` on demand. Same capability, paid for only when used. Also updates the now-inaccurate "explicit skill mappings" copy to surface the two discovery commands, rendered for the project's package manager. --- .changeset/lean-intent-skill-guidance.md | 12 ++++++++++++ packages/create/src/create-app.ts | 3 ++- packages/create/src/edge-create-app.ts | 10 ++++++---- packages/create/src/integrations/intent.ts | 16 ++++++++++------ packages/create/src/package-manager.ts | 16 ++++++++++++++++ 5 files changed, 46 insertions(+), 11 deletions(-) create mode 100644 .changeset/lean-intent-skill-guidance.md diff --git a/.changeset/lean-intent-skill-guidance.md b/.changeset/lean-intent-skill-guidance.md new file mode 100644 index 00000000..fef5f482 --- /dev/null +++ b/.changeset/lean-intent-skill-guidance.md @@ -0,0 +1,12 @@ +--- +'@tanstack/create': patch +--- + +Wire TanStack Intent up in on-demand discovery mode instead of writing the full +skill-to-task mapping table into `AGENTS.md`. Generated projects previously got +an `install --map` block listing every skill for every installed package — 99 +lines in a default app, growing with each add-on — which every agent re-read on +every invocation. Plain `install` emits a 12-line pointer telling the agent to +run `intent list` and `intent load #` when a task actually calls +for one. The "next steps" output now shows those two commands, rendered for the +project's package manager. diff --git a/packages/create/src/create-app.ts b/packages/create/src/create-app.ts index acb4f970..7d841202 100644 --- a/packages/create/src/create-app.ts +++ b/packages/create/src/create-app.ts @@ -5,6 +5,7 @@ import { formatCommand } from './utils.js' import { writeConfigFileToEnvironment } from './config-file.js' import { getPackageManagerScriptCommand, + intentCommand, packageManagerInstall, translateExecuteCommand, } from './package-manager.js' @@ -414,7 +415,7 @@ function buildNextSteps(options: Options): string { } if (options.intent) { sections.push( - `Working with an AI agent? Your agent config (AGENTS.md / CLAUDE.md) was wired up by TanStack Intent\nwith explicit skill mappings for the libraries you installed. Try asking your agent:\n • "migrate this Next.js page to TanStack Start"\n • "add a protected /dashboard route"\n • "show me how to use TanStack Router search params"`, + `Working with an AI agent? Your agent config (AGENTS.md / CLAUDE.md) was wired up by TanStack Intent\nso your agent can discover skills for the libraries you installed, on demand:\n • ${intentCommand(options.packageManager, ['list'])}\n • ${intentCommand(options.packageManager, ['load', '#'])}\nTry asking your agent:\n • "migrate this Next.js page to TanStack Start"\n • "add a protected /dashboard route"\n • "show me how to use TanStack Router search params"`, ) } diff --git a/packages/create/src/edge-create-app.ts b/packages/create/src/edge-create-app.ts index 624ccdfd..3f58b864 100644 --- a/packages/create/src/edge-create-app.ts +++ b/packages/create/src/edge-create-app.ts @@ -6,8 +6,10 @@ import { basenamePath, joinPaths, normalizePath } from './edge-path.js' import { resolvePackageJSONLatest } from './npm-resolver.js' import { writeConfigFileToEnvironment } from './edge-config-file.js' import { + INTENT_PACKAGE, getPackageManagerExecuteCommand, getPackageManagerScriptCommand, + intentCommand, packageManagerInstall, translateExecuteCommand, } from './package-manager.js' @@ -258,13 +260,13 @@ async function setupIntent( environment.startStep({ id: 'setup-intent', type: 'command', - message: 'Setting up TanStack Intent skill mappings...', + message: 'Setting up TanStack Intent skill discovery...', }) const { command, args } = getPackageManagerExecuteCommand( options.packageManager, - '@tanstack/intent', - ['install', '--map'], + INTENT_PACKAGE, + ['install'], ) await environment.execute(command, args, normalizePath(targetDir)) environment.finishStep('setup-intent', 'TanStack Intent configured') @@ -532,7 +534,7 @@ function buildNextSteps(options: Options): string { } if (options.intent) { sections.push( - `Working with an AI agent? Your agent config (AGENTS.md / CLAUDE.md) was wired up by TanStack Intent\nwith explicit skill mappings for the libraries you installed. Try asking your agent:\n - "migrate this Next.js page to TanStack Start"\n - "add a protected /dashboard route"\n - "show me how to use TanStack Router search params"`, + `Working with an AI agent? Your agent config (AGENTS.md / CLAUDE.md) was wired up by TanStack Intent\nso your agent can discover skills for the libraries you installed, on demand:\n - ${intentCommand(options.packageManager, ['list'])}\n - ${intentCommand(options.packageManager, ['load', '#'])}\nTry asking your agent:\n - "migrate this Next.js page to TanStack Start"\n - "add a protected /dashboard route"\n - "show me how to use TanStack Router search params"`, ) } diff --git a/packages/create/src/integrations/intent.ts b/packages/create/src/integrations/intent.ts index 0dd6212f..373af44d 100644 --- a/packages/create/src/integrations/intent.ts +++ b/packages/create/src/integrations/intent.ts @@ -1,6 +1,10 @@ import { resolve } from 'node:path' -import { packageManagerExecute } from '../package-manager.js' +import { + INTENT_PACKAGE, + intentCommand, + packageManagerExecute, +} from '../package-manager.js' import type { Environment, Options } from '../types.js' @@ -14,11 +18,11 @@ export async function setupIntent( } const s = environment.spinner() - s.start('Setting up TanStack Intent skill mappings...') + s.start('Setting up TanStack Intent skill discovery...') environment.startStep({ id: 'setup-intent', type: 'command', - message: 'Setting up TanStack Intent skill mappings...', + message: 'Setting up TanStack Intent skill discovery...', }) try { @@ -26,8 +30,8 @@ export async function setupIntent( environment, resolve(targetDir), options.packageManager, - '@tanstack/intent', - ['install', '--map'], + INTENT_PACKAGE, + ['install'], ) environment.finishStep('setup-intent', 'TanStack Intent configured') s.stop('TanStack Intent configured') @@ -41,7 +45,7 @@ export async function setupIntent( s.stop('TanStack Intent setup skipped') environment.warn( 'TanStack Intent setup failed', - `Continuing without it. You can run it later with: npx @tanstack/intent install\n\n${message}`, + `Continuing without it. You can run it later with: ${intentCommand(options.packageManager, ['install'])}\n\n${message}`, ) } } diff --git a/packages/create/src/package-manager.ts b/packages/create/src/package-manager.ts index 59739e7a..7e00b757 100644 --- a/packages/create/src/package-manager.ts +++ b/packages/create/src/package-manager.ts @@ -61,6 +61,22 @@ export function getPackageManagerExecuteCommand( } } +export const INTENT_PACKAGE = '@tanstack/intent' + +// Renders the command a user (or their agent) would type to reach Intent, so the +// suggestions we print match the package manager the project was created with. +export function intentCommand( + packageManager: PackageManager, + args: Array, +) { + const { command, args: commandArgs } = getPackageManagerExecuteCommand( + packageManager, + INTENT_PACKAGE, + args, + ) + return [command, ...commandArgs].join(' ') +} + export function getPackageManagerInstallCommand( packagerManager: PackageManager, pkg?: string, From 7908959b05d1da7fc954fb7f154943cbe050217d Mon Sep 17 00:00:00 2001 From: Abdullahi Mohamed <126521894+WaryaWayne@users.noreply.github.com> Date: Tue, 28 Jul 2026 23:31:18 -0400 Subject: [PATCH 2/3] chore: remove redundant comment in package-manager --- packages/create/src/package-manager.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/create/src/package-manager.ts b/packages/create/src/package-manager.ts index 7e00b757..01d3af8f 100644 --- a/packages/create/src/package-manager.ts +++ b/packages/create/src/package-manager.ts @@ -63,8 +63,6 @@ export function getPackageManagerExecuteCommand( export const INTENT_PACKAGE = '@tanstack/intent' -// Renders the command a user (or their agent) would type to reach Intent, so the -// suggestions we print match the package manager the project was created with. export function intentCommand( packageManager: PackageManager, args: Array, From 73d4df9ea0939168e9d88680bd644903c8301f1b Mon Sep 17 00:00:00 2001 From: Abdullahi Mohamed <126521894+WaryaWayne@users.noreply.github.com> Date: Tue, 28 Jul 2026 23:37:51 -0400 Subject: [PATCH 3/3] docs: correct pointer line count in intent changeset The changeset said the discovery-mode block is 12 lines; the generated AGENTS.md block is 10 lines including the intent-skills markers. --- .changeset/lean-intent-skill-guidance.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/lean-intent-skill-guidance.md b/.changeset/lean-intent-skill-guidance.md index fef5f482..a79ec152 100644 --- a/.changeset/lean-intent-skill-guidance.md +++ b/.changeset/lean-intent-skill-guidance.md @@ -6,7 +6,7 @@ Wire TanStack Intent up in on-demand discovery mode instead of writing the full skill-to-task mapping table into `AGENTS.md`. Generated projects previously got an `install --map` block listing every skill for every installed package — 99 lines in a default app, growing with each add-on — which every agent re-read on -every invocation. Plain `install` emits a 12-line pointer telling the agent to +every invocation. Plain `install` emits a 10-line pointer telling the agent to run `intent list` and `intent load #` when a task actually calls for one. The "next steps" output now shows those two commands, rendered for the project's package manager.