@tanstack/intent 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/README.md +2 -2
  2. package/dist/cli.mjs +44 -44
  3. package/dist/{feedback-DKreHfB1.mjs → feedback-BTSaBAS_.mjs} +2 -3
  4. package/dist/{feedback-FIUBOL0g.mjs → feedback-PR8JNBfM.mjs} +1 -1
  5. package/dist/index.d.mts +2 -2
  6. package/dist/index.mjs +4 -4
  7. package/dist/{init-DEzzXm9j.mjs → init-BU1ZnUbK.mjs} +1 -1
  8. package/dist/{init-DNxmjQfU.mjs → init-DUiDMMrN.mjs} +2 -0
  9. package/dist/intent-library.mjs +5 -0
  10. package/dist/library-scanner.d.mts +1 -1
  11. package/dist/scanner-DkShtCWX.mjs +4 -0
  12. package/dist/{scanner-BwCyu1Jq.mjs → scanner-OmHt14bs.mjs} +26 -2
  13. package/dist/{setup-CNGz26qL.mjs → setup-BvrZZLsA.mjs} +3 -12
  14. package/dist/{setup-N5dttGp_.d.mts → setup-D2Bwubpw.d.mts} +0 -1
  15. package/dist/setup.d.mts +1 -1
  16. package/dist/setup.mjs +1 -1
  17. package/dist/{types-kbQfN_is.d.mts → types-B20LP96b.d.mts} +1 -1
  18. package/meta/domain-discovery/SKILL.md +50 -2
  19. package/meta/feedback-collection/SKILL.md +156 -0
  20. package/meta/generate-skill/SKILL.md +9 -0
  21. package/meta/skill-staleness-check/SKILL.md +9 -9
  22. package/meta/templates/workflows/check-skills.yml +143 -0
  23. package/meta/tree-generator/SKILL.md +7 -1
  24. package/package.json +1 -1
  25. package/dist/scanner-fAWJUn6Q.mjs +0 -4
  26. package/meta/templates/oz/domain-discovery.md +0 -53
  27. package/meta/templates/oz/feedback-collection.md +0 -69
  28. package/meta/templates/oz/skill-update.md +0 -47
  29. package/meta/templates/oz/tree-generation.md +0 -48
  30. package/meta/templates/workflows/generate-skills-oz.yml +0 -86
  31. package/meta/templates/workflows/update-skills-oz.yml +0 -98
@@ -47,6 +47,10 @@ You will receive:
47
47
  If the maintainer uses a custom skills root, replace `skills/` in any paths
48
48
  below with their chosen directory.
49
49
 
50
+ **Monorepo:** When the skill tree entry has a `package` field, write the
51
+ SKILL.md into that package's skills directory (e.g.
52
+ `packages/client/skills/core/SKILL.md`), not a shared root.
53
+
50
54
  1. **Skill name** — format `library-group/skill-name` (e.g. `tanstack-query/core`,
51
55
  `tanstack-router/loaders`, `db/core/live-queries`)
52
56
  2. **Skill description** — what the skill covers and when an agent should load it
@@ -77,6 +81,11 @@ skill-tree-generator for the full spec of each type.
77
81
 
78
82
  ## Step 2 — Extract content from sources
79
83
 
84
+ **Line budget:** Each SKILL.md must stay under 500 lines. Before writing,
85
+ estimate the content size. If a skill has 5+ failure modes, 3+ primary
86
+ patterns, and subsystem details, proactively plan reference files during
87
+ extraction — don't wait until the skill exceeds the limit.
88
+
80
89
  Read through the source documentation. Extract only what a coding agent
81
90
  cannot already know:
82
91
 
@@ -2,10 +2,10 @@
2
2
  name: skill-staleness-check
3
3
  description: >
4
4
  Evaluate intent skills for staleness when source files change in upstream
5
- TanStack package repos. Driven by Oz automation on webhook trigger. Matches
6
- changed files against metadata.sources, evaluates whether diffs affect
7
- documented behavior, rewrites stale skills using skill-generate, checks
8
- cross-skill references, and opens PRs. Silent when nothing needs updating.
5
+ TanStack package repos. Matches changed files against metadata.sources,
6
+ evaluates whether diffs affect documented behavior, rewrites stale skills
7
+ using skill-generate, checks cross-skill references, and opens PRs.
8
+ Silent when nothing needs updating.
9
9
  metadata:
10
10
  version: '1.0'
11
11
  category: meta-tooling
@@ -21,10 +21,10 @@ metadata:
21
21
 
22
22
  # Skill Staleness Check
23
23
 
24
- You are an Oz automation agent. Your job is to evaluate whether intent
25
- skills are stale after upstream source changes, and if so, update them and
26
- open PRs. You act autonomously end-to-end. PRs contain already-updated
27
- skill content, not suggestions.
24
+ You are a coding agent. Your job is to evaluate whether intent skills are
25
+ stale after upstream source changes, and if so, update them and open PRs.
26
+ You act autonomously end-to-end. PRs contain already-updated skill
27
+ content, not suggestions.
28
28
 
29
29
  If nothing needs updating, exit silently. No PR, no notification.
30
30
 
@@ -279,4 +279,4 @@ node scripts/sync-skills.mjs db --mark-synced --all
279
279
  | One cascade level | Cross-skill checks go one level deep, not recursive |
280
280
  | PRs scoped to one library | Never mix libraries in a single PR |
281
281
  | Version bumps are separate from content updates | A version-only bump doesn't require regeneration |
282
- | Commit messages include co-author | `Co-Authored-By: Oz <oz-agent@warp.dev>` |
282
+ | Commit messages include co-author | Include the coding agent's co-author tag |
@@ -0,0 +1,143 @@
1
+ # check-skills.yml — Drop this into your library repo's .github/workflows/
2
+ #
3
+ # Checks for stale intent skills after a release and opens a review PR
4
+ # if any skills need attention. The PR body includes a prompt you can
5
+ # paste into Claude Code, Cursor, or any coding agent to update them.
6
+ #
7
+ # Triggers: new release published, or manual workflow_dispatch.
8
+ #
9
+ # Template variables (replaced by `intent setup`):
10
+ # {{PACKAGE_NAME}} — e.g. @tanstack/query
11
+
12
+ name: Check Skills
13
+
14
+ on:
15
+ release:
16
+ types: [published]
17
+ workflow_dispatch: {}
18
+
19
+ permissions:
20
+ contents: write
21
+ pull-requests: write
22
+
23
+ jobs:
24
+ check:
25
+ name: Check for stale skills
26
+ runs-on: ubuntu-latest
27
+ steps:
28
+ - name: Checkout
29
+ uses: actions/checkout@v4
30
+ with:
31
+ fetch-depth: 0
32
+
33
+ - name: Setup Node
34
+ uses: actions/setup-node@v4
35
+ with:
36
+ node-version: 20
37
+
38
+ - name: Install intent
39
+ run: npm install {{PACKAGE_NAME}}
40
+
41
+ - name: Check staleness
42
+ id: stale
43
+ run: |
44
+ OUTPUT=$(npx intent stale --json 2>&1) || true
45
+ echo "$OUTPUT"
46
+
47
+ # Check if any skills need review
48
+ NEEDS_REVIEW=$(echo "$OUTPUT" | node -e "
49
+ const input = require('fs').readFileSync('/dev/stdin','utf8');
50
+ try {
51
+ const reports = JSON.parse(input);
52
+ const stale = reports.flatMap(r =>
53
+ r.skills.filter(s => s.needsReview).map(s => ({ library: r.library, skill: s.name, reasons: s.reasons }))
54
+ );
55
+ if (stale.length > 0) {
56
+ console.log(JSON.stringify(stale));
57
+ }
58
+ } catch {}
59
+ ")
60
+
61
+ if [ -z "$NEEDS_REVIEW" ]; then
62
+ echo "has_stale=false" >> "$GITHUB_OUTPUT"
63
+ else
64
+ echo "has_stale=true" >> "$GITHUB_OUTPUT"
65
+ # Escape for multiline GH output
66
+ EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
67
+ echo "stale_json<<$EOF" >> "$GITHUB_OUTPUT"
68
+ echo "$NEEDS_REVIEW" >> "$GITHUB_OUTPUT"
69
+ echo "$EOF" >> "$GITHUB_OUTPUT"
70
+ fi
71
+
72
+ - name: Build summary
73
+ if: steps.stale.outputs.has_stale == 'true'
74
+ id: summary
75
+ run: |
76
+ node -e "
77
+ const stale = JSON.parse(process.env.STALE_JSON);
78
+ const lines = stale.map(s =>
79
+ '- **' + s.skill + '** (' + s.library + '): ' + s.reasons.join(', ')
80
+ );
81
+ const summary = lines.join('\n');
82
+
83
+ const prompt = [
84
+ 'Review and update the following stale intent skills for {{PACKAGE_NAME}}:',
85
+ '',
86
+ ...stale.map(s => '- ' + s.skill + ': ' + s.reasons.join(', ')),
87
+ '',
88
+ 'For each stale skill:',
89
+ '1. Read the current SKILL.md file',
90
+ '2. Check what changed in the library since the skill was last updated',
91
+ '3. Update the skill content to reflect current APIs and behavior',
92
+ '4. Run \`npx intent validate\` to verify the updated skill',
93
+ ].join('\n');
94
+
95
+ // Write outputs
96
+ const fs = require('fs');
97
+ const env = fs.readFileSync(process.env.GITHUB_OUTPUT, 'utf8');
98
+ const eof = require('crypto').randomBytes(15).toString('base64');
99
+ fs.appendFileSync(process.env.GITHUB_OUTPUT,
100
+ 'summary<<' + eof + '\n' + summary + '\n' + eof + '\n' +
101
+ 'prompt<<' + eof + '\n' + prompt + '\n' + eof + '\n'
102
+ );
103
+ "
104
+ env:
105
+ STALE_JSON: ${{ steps.stale.outputs.stale_json }}
106
+
107
+ - name: Open review PR
108
+ if: steps.stale.outputs.has_stale == 'true'
109
+ env:
110
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111
+ run: |
112
+ VERSION="${{ github.event.release.tag_name || 'manual' }}"
113
+ BRANCH="skills/review-${VERSION}"
114
+
115
+ git config user.name "github-actions[bot]"
116
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
117
+ git checkout -b "$BRANCH"
118
+ git commit --allow-empty -m "chore: review stale skills for ${VERSION}"
119
+ git push origin "$BRANCH"
120
+
121
+ gh pr create \
122
+ --title "Review stale skills (${VERSION})" \
123
+ --body "$(cat <<'PREOF'
124
+ ## Stale Skills Detected
125
+
126
+ The following skills may need updates after the latest release:
127
+
128
+ ${{ steps.summary.outputs.summary }}
129
+
130
+ ---
131
+
132
+ ### Update Prompt
133
+
134
+ Paste this into your coding agent (Claude Code, Cursor, etc.):
135
+
136
+ ~~~
137
+ ${{ steps.summary.outputs.prompt }}
138
+ ~~~
139
+
140
+ PREOF
141
+ )" \
142
+ --head "$BRANCH" \
143
+ --base main
@@ -67,7 +67,7 @@ discovery. This produces lower-fidelity output than the full
67
67
  skill-domain-discovery skill — prefer running that when time permits.
68
68
 
69
69
  1. Build a concept inventory (every export, config key, constraint, warning)
70
- 2. Group into 4–7 capability domains using work-oriented names
70
+ 2. Group into capability domains using work-oriented names (let library complexity drive the count — 2–3 for focused libraries, more for large frameworks)
71
71
  3. Enumerate 10–20 task-focused skills from the intersection of domains
72
72
  and developer tasks
73
73
  4. Extract 3+ failure modes per skill (plausible, silent, grounded)
@@ -106,6 +106,7 @@ skills:
106
106
  type: 'core | sub-skill | framework | lifecycle | composition | security'
107
107
  domain: '[domain slug]'
108
108
  path: 'skills/[path]/SKILL.md'
109
+ package: '[package directory, e.g. packages/client]' # monorepo only — which package this skill belongs to
109
110
  description: '[1–2 sentence agent-facing routing key]'
110
111
  requires:
111
112
  - '[other skill slugs]' # omit if none
@@ -118,6 +119,11 @@ skills:
118
119
  - 'references/[file].md' # omit if none
119
120
  ```
120
121
 
122
+ **Monorepo layout:** For monorepos, each skill's `path` is relative to its
123
+ package directory (e.g. `packages/client/skills/core/SKILL.md`). Set the
124
+ `package` field so generate-skill knows where to write the file. The domain
125
+ map artifacts stay at the repo root.
126
+
121
127
  ### Step 1 — Plan the file tree
122
128
 
123
129
  From the domain map, each entry in the `skills` list becomes a SKILL.md
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/intent",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Ship compositional knowledge for AI coding agents alongside your npm packages",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,4 +0,0 @@
1
- import "./utils-DH3jY3CI.mjs";
2
- import { t as scanForIntents } from "./scanner-BwCyu1Jq.mjs";
3
-
4
- export { scanForIntents };
@@ -1,53 +0,0 @@
1
- # Oz Prompt: Domain Discovery
2
-
3
- Use this prompt with `oz agent run` (local) or `warpdotdev/oz-agent-action` (CI)
4
- to run domain discovery for a library.
5
-
6
- ## Usage
7
-
8
- ### Local (interactive — includes maintainer interview)
9
-
10
- ```bash
11
- oz agent run --prompt "$(cat this-file.md)"
12
- ```
13
-
14
- ### CI (compressed — skips interview phases)
15
-
16
- Use the `generate-skills-oz.yml` workflow template instead.
17
-
18
- ---
19
-
20
- ## Prompt
21
-
22
- Read the meta-skill at `node_modules/@tanstack/intent/meta/domain-discovery/SKILL.md`
23
- and follow its instructions for the library described below.
24
-
25
- ### Library details
26
-
27
- - **Package:** [PACKAGE_NAME]
28
- - **Repository:** [REPO_URL]
29
- - **Docs path:** [DOCS_PATH]
30
- - **Primary framework:** [react | vue | solid | svelte | framework-agnostic]
31
-
32
- ### Instructions
33
-
34
- Run the full 5-phase domain discovery process:
35
-
36
- 1. **Phase 1 — Quick scan:** Orient yourself in the library
37
- 2. **Phase 2 — High-level interview:** Ask the maintainer about developer tasks
38
- 3. **Phase 3 — Deep read:** Read docs and source, build concept inventory
39
- 4. **Phase 4 — Detail interview:** Fill gaps with targeted questions
40
- 5. **Phase 5 — Finalize:** Produce domain_map.yaml and skill_spec.md
41
-
42
- Write the output artifacts to the repository root:
43
-
44
- - `domain_map.yaml`
45
- - `skill_spec.md`
46
-
47
- ### After completion
48
-
49
- Tell the user:
50
-
51
- - "Domain discovery complete. Artifacts written to domain_map.yaml and skill_spec.md."
52
- - "Next step: load the tree-generator meta-skill to generate SKILL.md files."
53
- - "Run `npx intent feedback --meta --interactive` to share how this went."
@@ -1,69 +0,0 @@
1
- # Oz Prompt: Meta-Skill Feedback Collection
2
-
3
- Use this prompt to collect structured feedback about the meta-skill experience
4
- and submit it to TanStack/intent.
5
-
6
- ---
7
-
8
- ## Prompt
9
-
10
- You are collecting feedback about the TanStack Intent meta-skill experience.
11
- The user just ran one or more meta-skills (domain-discovery, tree-generator,
12
- generate-skill, or skill-staleness-check) and you need to capture what worked
13
- and what didn't.
14
-
15
- ### Questions to ask
16
-
17
- Walk through these questions one at a time:
18
-
19
- 1. **Which meta-skill(s) did you use?**
20
- (domain-discovery, tree-generator, generate-skill, skill-staleness-check)
21
-
22
- 2. **What library were you generating skills for?**
23
- (package name and version)
24
-
25
- 3. **Which AI agent ran the meta-skill?**
26
- (oz, claude-code, cursor, copilot, codex, other)
27
-
28
- 4. **How would you rate the generated artifacts?**
29
- (good / mixed / bad)
30
- - If domain-discovery: How were the interview questions? Did they surface
31
- the right failure modes and domain structure?
32
- - If tree-generator: Were the generated SKILL.md files usable? Did the
33
- structure match your library?
34
- - If generate-skill: Was the individual skill accurate and complete?
35
-
36
- 5. **What worked well?**
37
- (free text — what the meta-skill got right)
38
-
39
- 6. **What failed or was inaccurate?**
40
- (free text — what the agent got wrong, what needed manual fixing)
41
-
42
- 7. **What's missing?**
43
- (free text — suggestions for improving the meta-skill instructions)
44
-
45
- 8. **Overall rating:** good / mixed / bad
46
-
47
- ### After collecting answers
48
-
49
- 1. Format the feedback as JSON matching the MetaFeedbackPayload schema:
50
-
51
- ```json
52
- {
53
- "metaSkill": "domain-discovery",
54
- "library": "@tanstack/query",
55
- "agentUsed": "oz",
56
- "artifactQuality": "good",
57
- "interviewQuality": "mixed",
58
- "failureModeQuality": "good",
59
- "whatWorked": "...",
60
- "whatFailed": "...",
61
- "suggestions": "...",
62
- "userRating": "mixed"
63
- }
64
- ```
65
-
66
- 2. Save to `intent-meta-feedback.json`
67
- 3. Run: `npx intent feedback --meta --file intent-meta-feedback.json`
68
- 4. If `gh` CLI is available, this submits directly to TanStack/intent.
69
- Otherwise, it saves a markdown file the user can paste into a GitHub Discussion.
@@ -1,47 +0,0 @@
1
- # Oz Prompt: Skill Update (Staleness Check)
2
-
3
- Use this prompt to check existing skills for staleness after a library
4
- version change and surgically update any that are outdated.
5
-
6
- ## Prerequisites
7
-
8
- - Existing skills in `skills/` directory
9
- - `@tanstack/intent` installed
10
-
11
- ---
12
-
13
- ## Prompt
14
-
15
- Read the meta-skill at `node_modules/@tanstack/intent/meta/skill-staleness-check/SKILL.md`
16
- and follow its instructions.
17
-
18
- ### Context
19
-
20
- - **Package:** [PACKAGE_NAME]
21
- - **Previous version:** [OLD_VERSION] (check skill frontmatter `library_version`)
22
- - **Current version:** [NEW_VERSION]
23
- - **Changelog:** [CHANGELOG_PATH or URL]
24
-
25
- ### Task
26
-
27
- 1. Find all SKILL.md files under skills/
28
- 2. Compare each skill's `library_version` against the current version
29
- 3. Read the changelog/migration guide for changes between versions
30
- 4. For each skill, classify the impact: no-impact, version-bump, content-update, breaking
31
- 5. For content updates and breaking changes:
32
- - Read the generate-skill meta-skill at
33
- `node_modules/@tanstack/intent/meta/generate-skill/SKILL.md`
34
- - Use regeneration mode — surgical updates, not full rewrites
35
- - Add old patterns as new Common Mistake entries for breaking changes
36
- 6. Bump `library_version` in all updated skill frontmatter
37
- 7. Run `npx intent validate skills/` to verify
38
-
39
- ### Output
40
-
41
- If nothing needs updating, say so and exit.
42
-
43
- If skills were updated, summarize:
44
-
45
- - Which skills were updated and why
46
- - What sections changed
47
- - Any new Common Mistake entries added
@@ -1,48 +0,0 @@
1
- # Oz Prompt: Tree Generation
2
-
3
- Use this prompt with `oz agent run` (local) or `warpdotdev/oz-agent-action` (CI)
4
- to generate a complete skill tree from domain discovery artifacts.
5
-
6
- ## Prerequisites
7
-
8
- - `domain_map.yaml` and `skill_spec.md` in the repo (from domain discovery)
9
- - `@tanstack/intent` installed
10
-
11
- ---
12
-
13
- ## Prompt
14
-
15
- Read the meta-skill at `node_modules/@tanstack/intent/meta/tree-generator/SKILL.md`
16
- and follow Workflow A (Generate) instructions.
17
-
18
- ### Inputs
19
-
20
- - `domain_map.yaml` — in the repository root
21
- - `skill_spec.md` — in the repository root
22
- - Library source documentation is at [DOCS_PATH]
23
-
24
- ### Task
25
-
26
- 1. Read domain_map.yaml and skill_spec.md
27
- 2. Plan the file tree based on the skill inventory
28
- 3. Generate all SKILL.md files following the tree-generator spec
29
- 4. Write files under `skills/` in the appropriate package directory
30
- 5. Run `npx intent validate skills/` to verify all files pass
31
- 6. Fix any validation errors
32
-
33
- ### Output structure
34
-
35
- Write skills following the structure recommended in the domain map.
36
- Ensure every skill from domain_map.yaml has a corresponding SKILL.md file.
37
-
38
- ### After completion
39
-
40
- Tell the user:
41
-
42
- - "Skill tree generated. [N] skills written to skills/."
43
- - "Validation: [PASS/FAIL with details]"
44
- - "Next steps:"
45
- - "1. Review the generated skills for accuracy"
46
- - "2. Add `\"skills\"` to your package.json `files` array"
47
- - "3. Add the `intent` field to your package.json"
48
- - "4. Run `npx intent feedback --meta --interactive` to share how this went"
@@ -1,86 +0,0 @@
1
- # generate-skills-oz.yml — Drop this into your library repo's .github/workflows/
2
- #
3
- # Manual-trigger workflow that runs domain-discovery + tree-generator via
4
- # Warp Oz to generate a complete skill tree for your library.
5
- #
6
- # Requirements:
7
- # - WARP_API_KEY repository secret (from Warp Settings > Platform)
8
- #
9
- # Template variables (replaced by `intent setup`):
10
- # {{PACKAGE_NAME}} — e.g. @tanstack/query
11
- # {{REPO}} — e.g. TanStack/query
12
- # {{DOCS_PATH}} — e.g. docs/
13
-
14
- name: Generate Skills (Oz)
15
-
16
- on:
17
- workflow_dispatch:
18
- inputs:
19
- docs_path:
20
- description: 'Path to library docs (default from intent config)'
21
- required: false
22
- default: '{{DOCS_PATH}}'
23
- type: string
24
- skip_interview:
25
- description: 'Skip maintainer interview (compressed discovery)'
26
- required: false
27
- default: false
28
- type: boolean
29
-
30
- permissions:
31
- contents: write
32
- pull-requests: write
33
-
34
- jobs:
35
- generate:
36
- name: Generate skill tree
37
- runs-on: ubuntu-latest
38
- steps:
39
- - name: Checkout
40
- uses: actions/checkout@v4
41
- with:
42
- fetch-depth: 0
43
-
44
- - name: Setup Node
45
- uses: actions/setup-node@v4
46
- with:
47
- node-version: 20
48
-
49
- - name: Install dependencies
50
- run: npm install @tanstack/intent yaml
51
-
52
- - name: Run Oz agent
53
- uses: warpdotdev/oz-agent-action@v1
54
- with:
55
- prompt: |
56
- You are generating AI coding agent skills for {{PACKAGE_NAME}}.
57
-
58
- ## Setup
59
-
60
- 1. Read the meta-skill at node_modules/@tanstack/intent/meta/domain-discovery/SKILL.md
61
- 2. The library source is in this repo at {{DOCS_PATH}}
62
- 3. The package name is {{PACKAGE_NAME}} and the repo is {{REPO}}
63
-
64
- ## Task
65
-
66
- Run the domain-discovery skill to produce domain_map.yaml and skill_spec.md.
67
- Since this is a CI run with no interactive maintainer, use compressed
68
- discovery mode (Phase 1 + Phase 3 only — skip interview phases).
69
-
70
- After producing the domain map, read the meta-skill at
71
- node_modules/@tanstack/intent/meta/tree-generator/SKILL.md and
72
- run Workflow A to generate the complete skill tree under skills/.
73
-
74
- ## Output
75
-
76
- 1. Write domain_map.yaml and skill_spec.md to the repo root
77
- 2. Write generated SKILL.md files under the appropriate skills/ directory
78
- 3. Run `npx intent validate skills/` to verify all files pass
79
- 4. Create a branch `skills/generate-{{PACKAGE_NAME}}` and open a PR with:
80
- - Title: "feat: generate intent skills for {{PACKAGE_NAME}}"
81
- - Body summarizing what was generated and any gaps flagged
82
- - Co-Authored-By: Oz <oz-agent@warp.dev>
83
-
84
- If validation fails, fix the issues before opening the PR.
85
- warp_api_key: ${{ secrets.WARP_API_KEY }}
86
- profile: ${{ vars.WARP_AGENT_PROFILE || '' }}
@@ -1,98 +0,0 @@
1
- # update-skills-oz.yml — Drop this into your library repo's .github/workflows/
2
- #
3
- # Triggered on new version releases. Oz evaluates whether skills need
4
- # updating based on changelog/migration guide changes, and opens PRs
5
- # for any stale skills.
6
- #
7
- # Requirements:
8
- # - WARP_API_KEY repository secret
9
- # - Skills must already exist in the repo (run generate-skills-oz first)
10
- #
11
- # Template variables (replaced by `intent setup`):
12
- # {{PACKAGE_NAME}} — e.g. @tanstack/query
13
- # {{REPO}} — e.g. TanStack/query
14
-
15
- name: Update Skills (Oz)
16
-
17
- on:
18
- release:
19
- types: [published]
20
-
21
- # Manual trigger for testing
22
- workflow_dispatch:
23
- inputs:
24
- version:
25
- description: 'Version to check against (e.g. 5.62.0)'
26
- required: false
27
- type: string
28
-
29
- permissions:
30
- contents: write
31
- pull-requests: write
32
-
33
- jobs:
34
- update:
35
- name: Check and update skills
36
- runs-on: ubuntu-latest
37
- steps:
38
- - name: Checkout
39
- uses: actions/checkout@v4
40
- with:
41
- fetch-depth: 0
42
-
43
- - name: Setup Node
44
- uses: actions/setup-node@v4
45
- with:
46
- node-version: 20
47
-
48
- - name: Install dependencies
49
- run: npm install @tanstack/intent yaml
50
-
51
- - name: Determine version
52
- id: version
53
- run: |
54
- if [ -n "${{ inputs.version }}" ]; then
55
- echo "version=${{ inputs.version }}" >> "$GITHUB_OUTPUT"
56
- else
57
- echo "version=${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT"
58
- fi
59
-
60
- - name: Run Oz agent
61
- uses: warpdotdev/oz-agent-action@v1
62
- with:
63
- prompt: |
64
- You are checking whether AI coding agent skills for {{PACKAGE_NAME}}
65
- need updating after a new release.
66
-
67
- ## Setup
68
-
69
- 1. Read the meta-skill at node_modules/@tanstack/intent/meta/skill-staleness-check/SKILL.md
70
- 2. The package is {{PACKAGE_NAME}} in repo {{REPO}}
71
- 3. The new version is ${{ steps.version.outputs.version }}
72
-
73
- ## Task
74
-
75
- Follow the staleness check skill instructions:
76
-
77
- 1. Find all SKILL.md files under skills/ in this repo
78
- 2. Compare each skill's library_version against the new version
79
- 3. Read the CHANGELOG or migration guide for changes between versions
80
- 4. Classify each skill: no-impact, version-bump-only, content-update, or breaking-change
81
- 5. For skills needing updates, read the generate-skill meta-skill at
82
- node_modules/@tanstack/intent/meta/generate-skill/SKILL.md and
83
- use regeneration mode (surgical updates, not full rewrites)
84
-
85
- ## Output
86
-
87
- If no skills need updating, exit silently — no PR, no noise.
88
-
89
- If skills need updating:
90
- 1. Update the affected SKILL.md files
91
- 2. Run `npx intent validate skills/` to verify
92
- 3. Create branch `skills/update-${{ steps.version.outputs.version }}`
93
- 4. Open a PR with:
94
- - Title: "skill: update for {{PACKAGE_NAME}}@${{ steps.version.outputs.version }}"
95
- - Body with: what changed in the source, what changed in skills, review checklist
96
- - Co-Authored-By: Oz <oz-agent@warp.dev>
97
- warp_api_key: ${{ secrets.WARP_API_KEY }}
98
- profile: ${{ vars.WARP_AGENT_PROFILE || '' }}