Skip to content

pnpm setup: @tanstack/intent discovers skills but does not generate AGENTS.md reliably, and pnpm package layout may break skill linking #113

@aladicf

Description

@aladicf

TanStack Intent version

0.0.29

Runtime and version

Node 22.19.15

Package manager and version

pnpm 10.30.1

Describe the bug and the steps to reproduce it

I’m seeing inconsistent behavior when trying to install and link TanStack Agent Skills in a fresh project created from the shadcn start template with pnpm.

I’m not yet sure whether this is one issue or multiple related issues, but the main problem is that skill discovery appears to work while AGENTS.md is either not generated at all or generated incorrectly unless I explicitly ask the agent where the file is.

Project created with:

pnpm dlx shadcn@latest init --preset b5de5CJpi --base base --template start

Initial project state

After setup completes, node_modules contains an @TanStack directory with only a subset of TanStack packages(view image 2)

However, many other TanStack-related packages are not placed directly under node_modules/@TanStack. Instead, they are present under node_modules/.pnpm alongside many other package folders. (view image 1)

In the Bun version of the same setup, TanStack packages appear under node_modules/@TanStack in a way that makes skill linking straightforward.

At this point, the project does not contain an AGENTS.md file.

What I tried

First, I asked the agent (5.4 mini) to run:

npx @tanstack/intent@latest install

Result:

routeTree.gen.ts was rewritten, but with no meaningful changes

No AGENTS.md file was created

Then I asked the agent to install a specific package using the registry instructions from the TanStack Intent page for @tanstack/db.

The instructions were:

Install @tanstack/db and set up its Agent Skills:

Install the package using the project's package manager:

@tanstack/db

Ensure @tanstack/intent is installed:
@tanstack/intent

Discover and install the skills shipped with this package:

npx @tanstack/intent install

This will detect all Agent Skills in @tanstack/db and configure them for your coding agent.

After that, the agent reported:

What I changed

Added @tanstack/db to package.json

Added @tanstack/intent to package.json

Updated pnpm-lock.yaml

Verification

npx @tanstack/intent install ran successfully

npx @tanstack/intent@latest list now detects:

@tanstack/db with 7 skills

a total of 12 intent-enabled packages and 38 skills

Despite that, AGENTS.md still was not created.

Only after I explicitly asked the agent where the AGENTS.md file linking all skills was, the agent finally created a detailed AGENTS.md file. That file linked TanStack-specific skills together, including skills located inside node_modules/.pnpm. ( https://github.com/aladicf/ts-repro/blob/main/agents.md

Expected behavior

Running npx @tanstack/intent install in a supported project should consistently generate or update AGENTS.md when skills are discovered.

If pnpm installs relevant packages under node_modules/.pnpm rather than directly under node_modules/@TanStack, skill discovery and linking should still work correctly.

The install flow should not require an extra prompt asking the agent where AGENTS.md is before the file is created.

Actual behavior

npx @tanstack/intent install appears to successfully discover skills, but AGENTS.md is often not created.

In some cases, the agent reports success and lists discovered skills, but still does not generate AGENTS.md.

When AGENTS.md is eventually created, some links appear to assume packages are located under node_modules/@TanStack even though pnpm has placed them under node_modules/.pnpm.

There is also an unrelated-looking rewrite of routeTree.gen.ts during the install step, even when there are no meaningful changes(replacing same existing file lines.).

What this suggests

This may be more than one issue:

pnpm package layout may not be fully accounted for
With pnpm, many TanStack packages are located under node_modules/.pnpm rather than directly under node_modules/@TanStack. That may be breaking path resolution or linking logic.

Skill install/discovery and AGENTS.md generation may be decoupled or incomplete
The install command can succeed and report discovered skills, but AGENTS.md is not always generated.

Linking logic may assume a flat node_modules/@TanStack layout

When AGENTS.md is generated, some entries appear to point to locations under @TanStack that do not exist in the pnpm layout. ( see image 3)

Comparison with Bun

In the Bun version of the same project setup, TanStack packages are laid out under node_modules/@TanStack in a way that makes skill linking much easier, and I do not see the same ambiguity around where packages are located.

Your Minimal, Reproducible Example

https://github.com/aladicf/ts-repro

Screenshots or Videos (Optional)

Image Image Image

Do you intend to try to help solve this bug with your own PR?

Maybe, I'll investigate and start debugging

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions