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
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
"changelog": [
"@svitejs/changesets-changelog-github-compact",
{ "repo": "TanStack/playbooks" }
{ "repo": "TanStack/intent" }
],
"commit": false,
"access": "public",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate-skills.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Validate Skills
on:
pull_request:
paths:
- 'packages/playbooks/skills/**'
- 'packages/playbooks/package_map.yaml'
- 'packages/intent/skills/**'
- 'packages/intent/package_map.yaml'
- 'scripts/validate-skills.ts'

jobs:
Expand Down
2 changes: 1 addition & 1 deletion knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
".": {
"entry": ["scripts/*.ts"]
},
"packages/playbooks": {
"packages/intent": {
"ignore": ["meta/**"]
}
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"repository": {
"type": "git",
"url": "git+https://github.com/TanStack/playbooks.git"
"url": "git+https://github.com/TanStack/intent.git"
},
"packageManager": "pnpm@10.26.1",
"type": "module",
Expand All @@ -17,7 +17,7 @@
"clean": "find agents -name 'dist' -type d -prune -exec rm -rf {} +",
"clean:node_modules": "find agents -name 'node_modules' -type d -prune -exec rm -rf {} +",
"clean:all": "pnpm run clean && pnpm run clean:node_modules",
"copy:readme": "cp README.md packages/playbooks/README.md",
"copy:readme": "cp README.md packages/intent/README.md",
"dev": "pnpm run watch",
"format": "prettier --experimental-cli --ignore-unknown '**/*' --write",
"lint:fix": "nx affected --target=lint:fix --exclude=examples/**",
Expand Down
7 changes: 7 additions & 0 deletions packages/intent/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @tanstack/intent

## 0.1.0

### Patch Changes

- Add `intent-library` end-user CLI for library consumers. Libraries wire it up via a generated shim (`intent setup --shim`) to expose an `intent` bin. Running `intent list` recursively discovers skills across the library's dependency tree; `intent install` prints an agent-driven prompt to map skills to project tasks in CLAUDE.md. ([#9](https://github.com/TanStack/intent/pull/9))
66 changes: 66 additions & 0 deletions packages/intent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# @tanstack/intent

Ship compositional knowledge for AI coding agents alongside your npm packages.

Skills are npm packages of knowledge — encoding how tools work together, what patterns apply for which goals, and what to avoid. Skills travel with the tool via `npm update`, not the model's training cutoff.

`@tanstack/intent` is the toolkit for generating, discovering, and maintaining skills for your library.

## Install

```bash
pnpm add -D @tanstack/intent
```

## Quick Start

### For library consumers

Set up intent discovery in your project's agent config files (CLAUDE.md, .cursorrules, etc.):

```bash
npx intent init
```

List available skills from installed packages:

```bash
npx intent list
```

### For library maintainers

Generate skills for your library using the guided scaffold workflow:

```bash
npx intent scaffold
```

Validate your skill files:

```bash
npx intent validate
```

Copy CI and Oz workflow templates into your repo:

```bash
npx intent setup
```

## CLI Commands

| Command | Description |
| ----------------------- | ----------------------------------------------- |
| `intent init` | Inject intent discovery into agent config files |
| `intent list [--json]` | Discover intent-enabled packages |
| `intent meta` | List meta-skills for library maintainers |
| `intent scaffold` | Print the guided skill generation prompt |
| `intent validate [dir]` | Validate SKILL.md files |
| `intent setup` | Copy CI/Oz workflow templates |
| `intent stale [--json]` | Check skills for version drift |
| `intent feedback` | Submit skill feedback |

## License

[MIT](./LICENSE)
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ fill only the **Domain Discovery** section now. Leave the other sections in
place for later steps to complete.

```
# Playbook Meta Skill Feedback
# Intent Meta Skill Feedback

## Domain Discovery
- What worked well:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ metadata:

# Skill Generation

You are generating a SKILL.md file for the `@tanstack/playbooks` agent skills
You are generating a SKILL.md file for the `@tanstack/intent` agent skills
repo. Skills in this repo are written for coding agents (Claude Code, Cursor,
Copilot, Warp Oz, Codex), not for human readers. Your output will be loaded
into an agent's context window and used to guide code generation.
Expand Down Expand Up @@ -381,7 +381,7 @@ If no draft exists, create it using this exact template.

```

# Playbook Meta Skill Feedback
# Intent Meta Skill Feedback

## Domain Discovery

Expand Down Expand Up @@ -414,6 +414,6 @@ If no draft exists, create it using this exact template.
```

Ask the maintainer if they want to edit the feedback. Then ask if you should
send it as a GitHub issue to TanStack/playbooks. Use the issue title:
`[meta-feedback] playbook meta skill`. Only submit if they confirm.
send it as a GitHub issue to TanStack/intent. Use the issue title:
`[meta-feedback] intent meta skill`. Only submit if they confirm.
```
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: skill-staleness-check
description: >
Evaluate playbook skills for staleness when source files change in upstream
Evaluate intent skills for staleness when source files change in upstream
TanStack package repos. Driven by Oz automation on webhook trigger. Matches
changed files against metadata.sources, evaluates whether diffs affect
documented behavior, rewrites stale skills using skill-generate, checks
Expand All @@ -21,7 +21,7 @@ metadata:

# Skill Staleness Check

You are an Oz automation agent. Your job is to evaluate whether playbook
You are an Oz automation agent. Your job is to evaluate whether intent
skills are stale after upstream source changes, and if so, update them and
open PRs. You act autonomously end-to-end. PRs contain already-updated
skill content, not suggestions.
Expand All @@ -46,7 +46,7 @@ Webhook payload from an upstream package repo merge to main:

## Step 1 — Match changed files to skills

Read all SKILL.md files under `packages/playbooks/skills/`. For each skill,
Read all SKILL.md files under `packages/intent/skills/`. For each skill,
extract `sources` from the frontmatter.

Match `changed_files` from the webhook against `sources` entries across all
Expand Down Expand Up @@ -243,7 +243,7 @@ requires:
- `gh` CLI installed and authenticated
- Read access to upstream TanStack package repos (query, router, db, form,
table)
- Write access to the playbooks repo for creating branches and PRs
- Write access to the intent repo for creating branches and PRs

### Rate limiting

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Use the `generate-skills-oz.yml` workflow template instead.

## Prompt

Read the meta-skill at `node_modules/@tanstack/playbooks/meta/domain-discovery/SKILL.md`
Read the meta-skill at `node_modules/@tanstack/intent/meta/domain-discovery/SKILL.md`
and follow its instructions for the library described below.

### Library details
Expand Down Expand Up @@ -50,4 +50,4 @@ Tell the user:

- "Domain discovery complete. Artifacts written to domain_map.yaml and skill_spec.md."
- "Next step: load the tree-generator meta-skill to generate SKILL.md files."
- "Run `npx playbook feedback --meta --interactive` to share how this went."
- "Run `npx intent feedback --meta --interactive` to share how this went."
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Oz Prompt: Meta-Skill Feedback Collection

Use this prompt to collect structured feedback about the meta-skill experience
and submit it to TanStack/playbooks.
and submit it to TanStack/intent.

---

## Prompt

You are collecting feedback about the TanStack Playbooks meta-skill experience.
You are collecting feedback about the TanStack Intent meta-skill experience.
The user just ran one or more meta-skills (domain-discovery, tree-generator,
generate-skill, or skill-staleness-check) and you need to capture what worked
and what didn't.
Expand Down Expand Up @@ -63,7 +63,7 @@ Walk through these questions one at a time:
}
```

2. Save to `playbook-meta-feedback.json`
3. Run: `npx playbook feedback --meta --file playbook-meta-feedback.json`
4. If `gh` CLI is available, this submits directly to TanStack/playbooks.
2. Save to `intent-meta-feedback.json`
3. Run: `npx intent feedback --meta --file intent-meta-feedback.json`
4. If `gh` CLI is available, this submits directly to TanStack/intent.
Otherwise, it saves a markdown file the user can paste into a GitHub Discussion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ version change and surgically update any that are outdated.
## Prerequisites

- Existing skills in `skills/` directory
- `@tanstack/playbooks` installed
- `@tanstack/intent` installed

---

## Prompt

Read the meta-skill at `node_modules/@tanstack/playbooks/meta/skill-staleness-check/SKILL.md`
Read the meta-skill at `node_modules/@tanstack/intent/meta/skill-staleness-check/SKILL.md`
and follow its instructions.

### Context
Expand All @@ -30,11 +30,11 @@ and follow its instructions.
4. For each skill, classify the impact: no-impact, version-bump, content-update, breaking
5. For content updates and breaking changes:
- Read the generate-skill meta-skill at
`node_modules/@tanstack/playbooks/meta/generate-skill/SKILL.md`
`node_modules/@tanstack/intent/meta/generate-skill/SKILL.md`
- Use regeneration mode — surgical updates, not full rewrites
- Add old patterns as new Common Mistake entries for breaking changes
6. Bump `library_version` in all updated skill frontmatter
7. Run `npx playbook validate skills/` to verify
7. Run `npx intent validate skills/` to verify

### Output

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ to generate a complete skill tree from domain discovery artifacts.
## Prerequisites

- `domain_map.yaml` and `skill_spec.md` in the repo (from domain discovery)
- `@tanstack/playbooks` installed
- `@tanstack/intent` installed

---

## Prompt

Read the meta-skill at `node_modules/@tanstack/playbooks/meta/tree-generator/SKILL.md`
Read the meta-skill at `node_modules/@tanstack/intent/meta/tree-generator/SKILL.md`
and follow Workflow A (Generate) instructions.

### Inputs
Expand All @@ -27,7 +27,7 @@ and follow Workflow A (Generate) instructions.
2. Plan the file tree based on the skill inventory
3. Generate all SKILL.md files following the tree-generator spec
4. Write files under `skills/` in the appropriate package directory
5. Run `npx playbook validate skills/` to verify all files pass
5. Run `npx intent validate skills/` to verify all files pass
6. Fix any validation errors

### Output structure
Expand All @@ -44,5 +44,5 @@ Tell the user:
- "Next steps:"
- "1. Review the generated skills for accuracy"
- "2. Add `\"skills\"` to your package.json `files` array"
- "3. Add the `playbook` field to your package.json"
- "4. Run `npx playbook feedback --meta --interactive` to share how this went"
- "3. Add the `intent` field to your package.json"
- "4. Run `npx intent feedback --meta --interactive` to share how this went"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Requirements:
# - WARP_API_KEY repository secret (from Warp Settings > Platform)
#
# Template variables (replaced by `playbook setup`):
# Template variables (replaced by `intent setup`):
# {{PACKAGE_NAME}} — e.g. @tanstack/query
# {{REPO}} — e.g. TanStack/query
# {{DOCS_PATH}} — e.g. docs/
Expand All @@ -17,7 +17,7 @@ on:
workflow_dispatch:
inputs:
docs_path:
description: 'Path to library docs (default from playbook config)'
description: 'Path to library docs (default from intent config)'
required: false
default: '{{DOCS_PATH}}'
type: string
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
node-version: 20

- name: Install dependencies
run: npm install @tanstack/playbooks yaml
run: npm install @tanstack/intent yaml

- name: Run Oz agent
uses: warpdotdev/oz-agent-action@v1
Expand All @@ -57,7 +57,7 @@ jobs:

## Setup

1. Read the meta-skill at node_modules/@tanstack/playbooks/meta/domain-discovery/SKILL.md
1. Read the meta-skill at node_modules/@tanstack/intent/meta/domain-discovery/SKILL.md
2. The library source is in this repo at {{DOCS_PATH}}
3. The package name is {{PACKAGE_NAME}} and the repo is {{REPO}}

Expand All @@ -68,16 +68,16 @@ jobs:
discovery mode (Phase 1 + Phase 3 only — skip interview phases).

After producing the domain map, read the meta-skill at
node_modules/@tanstack/playbooks/meta/tree-generator/SKILL.md and
node_modules/@tanstack/intent/meta/tree-generator/SKILL.md and
run Workflow A to generate the complete skill tree under skills/.

## Output

1. Write domain_map.yaml and skill_spec.md to the repo root
2. Write generated SKILL.md files under the appropriate skills/ directory
3. Run `npx playbook validate skills/` to verify all files pass
3. Run `npx intent validate skills/` to verify all files pass
4. Create a branch `skills/generate-{{PACKAGE_NAME}}` and open a PR with:
- Title: "feat: generate playbook skills for {{PACKAGE_NAME}}"
- Title: "feat: generate intent skills for {{PACKAGE_NAME}}"
- Body summarizing what was generated and any gaps flagged
- Co-Authored-By: Oz <oz-agent@warp.dev>

Expand Down
Loading
Loading