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
43 changes: 32 additions & 11 deletions packages/intent/meta/feedback-collection/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,17 @@ can be improved.

Review your own session transcript. No human interaction needed yet.

### 1a: Gap detection
### 1a: Skills inventory

Before analyzing gaps and errors, inventory all skills that were available
during the session:

- **Loaded and used:** Skills you read and actively followed.
- **Available but not loaded:** Skills that were installed (discoverable via
`intent list`) but you never read. This is important — many issues stem from
the agent not loading the right skill, not from the skill itself being wrong.

### 1b: Gap detection

Identify moments where the skill was silent and you had to bridge the gap
yourself — via code reading, search, trial-and-error, or general knowledge.
Expand All @@ -40,7 +50,7 @@ For each gap, note:
- What the skill should have told you
- How you solved it (code reading, web search, guessing)

### 1b: Error/correction tracking
### 1c: Error/correction tracking

Identify moments where the skill prescribed an approach that produced an error.

Expand All @@ -50,7 +60,7 @@ For each error, note:
- The error or incorrect behavior that resulted
- The fix you applied

### 1c: Human intervention events
### 1d: Human intervention events

Identify moments where the human clarified, corrected, or overrode your approach.

Expand All @@ -60,7 +70,7 @@ For each intervention, note:
- What the human said or changed
- Whether the skill could have prevented this

### 1d: Step duration anomalies
### 1e: Step duration anomalies

Identify steps that consumed disproportionate effort compared to their apparent
complexity. These signal that the skill should provide a template, snippet, or
Expand Down Expand Up @@ -107,21 +117,31 @@ referenced.

[one-sentence summary of what the human asked you to do]

## Skills Inventory

**Loaded and used:**

- [list each skill the agent read and actively followed during the session]

**Available but not loaded:**

- [list skills that were installed/available but the agent never read]

## What Worked

[patterns/instructions from the skill that were accurate and helpful]

## What Failed

[from 1b — skill instructions that produced errors]
[from 1c — skill instructions that produced errors]

## Missing

[from 1a — gaps where the skill should have covered]
[from 1b — gaps where the skill should have covered]

## Self-Corrections

[from 1b fixes + 1c human interventions, combined]
[from 1c fixes + 1d human interventions, combined]

## User Comments

Expand All @@ -136,10 +156,11 @@ referenced.
| Package | The npm package the skill lives in (e.g. `@tanstack/query-intent`) |
| Skill version | Frontmatter `metadata.version` or `library_version` |
| Task | Summarize the human's original request in one sentence |
| Skills Inventory | Which skills were loaded vs. available but not loaded (see below) |
| What Worked | List skill sections/patterns that were correct and useful |
| What Failed | From 1b — skill instructions that produced errors |
| Missing | From 1a — gaps where the skill was silent |
| Self-Corrections | From 1b fixes + 1c human interventions, combined |
| What Failed | From 1c — skill instructions that produced errors |
| Missing | From 1b — gaps where the skill was silent |
| Self-Corrections | From 1c fixes + 1d human interventions, combined |
| Rating | From Phase 2 sentiment analysis or explicit rating |
| User Comments | From Phase 2 answers, keep brief |

Expand Down Expand Up @@ -177,7 +198,7 @@ not contain project-specific details. Before submission:
Submit directly as a GitHub issue:

```bash
gh issue create --repo [owner/repo] --title "Skill Feedback: [skill-name] ([rating])" --label "feedback:[skill-name]" --body-file intent-feedback.md
gh issue create --repo [owner/repo] --title "Skill Feedback: [skill-name] ([rating])" --label "skill:[skill-name]" --body-file intent-feedback.md
```

If the label doesn't exist, omit the `--label` flag — don't let a missing
Expand Down
32 changes: 28 additions & 4 deletions packages/intent/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,38 @@ async function cmdList(args: string[]): Promise<void> {
}
}

function cmdMeta(): void {
function cmdMeta(args: string[]): void {
const metaDir = getMetaDir()

if (!existsSync(metaDir)) {
console.error('Meta-skills directory not found.')
process.exit(1)
}

if (args.length > 0) {
const name = args[0]!
if (name.includes('..') || name.includes('/') || name.includes('\\')) {
console.error(`Invalid meta-skill name: "${name}"`)
process.exit(1)
}
const skillFile = join(metaDir, name, 'SKILL.md')
if (!existsSync(skillFile)) {
console.error(`Meta-skill "${name}" not found.`)
console.error(
`Run \`npx @tanstack/intent meta\` to list available meta-skills.`,
)
process.exit(1)
}
try {
console.log(readFileSync(skillFile, 'utf8'))
} catch (err) {
const msg = err instanceof Error ? err.message : String(err)
console.error(`Failed to read meta-skill "${name}": ${msg}`)
process.exit(1)
}
return
}

const entries = readdirSync(metaDir, { withFileTypes: true })
.filter((e) => e.isDirectory())
.filter((e) => existsSync(join(metaDir, e.name, 'SKILL.md')))
Expand Down Expand Up @@ -397,7 +421,7 @@ This produces: individual SKILL.md files.
3. For each publishable package, run: \`npx @tanstack/intent add-library-bin\`
4. For each publishable package, run: \`npx @tanstack/intent edit-package-json\`
5. Ensure each package has \`@tanstack/intent\` as a devDependency
6. Create a \`feedback:<skill-name>\` label on the GitHub repo for each skill (use \`gh label create\`)
6. Create a \`skill:<skill-name>\` label on the GitHub repo for each skill (use \`gh label create\`)
7. Add a README note: "If you use an AI agent, run \`npx @tanstack/intent install\`"
`

Expand All @@ -412,7 +436,7 @@ const USAGE = `TanStack Intent CLI

Usage:
intent list [--json] Discover intent-enabled packages
intent meta List meta-skills for maintainers
intent meta [name] List meta-skills, or print one by name
intent validate [<dir>] Validate skill files (default: skills/)
intent install Print a skill that guides your coding agent to set up skill-to-task mappings
intent scaffold Print maintainer scaffold prompt
Expand All @@ -429,7 +453,7 @@ switch (command) {
await cmdList(commandArgs)
break
case 'meta':
cmdMeta()
cmdMeta(commandArgs)
break
case 'validate':
cmdValidate(commandArgs)
Expand Down
2 changes: 1 addition & 1 deletion packages/intent/src/feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ export function submitMetaFeedback(
'--title',
title,
'--label',
`feedback:${payload.metaSkill}`,
`skill:${payload.metaSkill}`,
'--body',
'-',
],
Expand Down
Loading