@tanstack/intent 0.1.0 → 0.1.1

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 (39) hide show
  1. package/README.md +0 -3
  2. package/dist/{cli-support-Cpo_9JfL.mjs → cli-support-BADtMg6z.mjs} +4 -4
  3. package/dist/{cli-support-BevVu4gw.mjs → cli-support-C8SKYTA4.mjs} +4 -4
  4. package/dist/cli.mjs +10 -10
  5. package/dist/{core-6UP6jyL8.mjs → core-hEMP5GMV.mjs} +7 -7
  6. package/dist/core.d.mts +1 -1
  7. package/dist/core.mjs +9 -9
  8. package/dist/{display-CVMGtcHz.mjs → display-CFnFnrtx.mjs} +2 -2
  9. package/dist/{exclude-BTaE6TNh.mjs → exclude-CBxkyK3Q.mjs} +4 -4
  10. package/dist/{excludes-DG83YEzb.mjs → excludes-DDMe-4iu.mjs} +1 -1
  11. package/dist/index.d.mts +2 -29
  12. package/dist/index.mjs +10 -276
  13. package/dist/{install-DXQsQQIL.mjs → install-BE7gVoNT.mjs} +4 -4
  14. package/dist/{list-CxB37mvm.mjs → list-UqYivAcV.mjs} +11 -15
  15. package/dist/{load-Ch4UjIza.mjs → load-Dgw151E3.mjs} +10 -10
  16. package/dist/{meta-C-t9P5Ls.mjs → meta-BZMVgIzJ.mjs} +1 -1
  17. package/dist/{project-context-DBSibDPb.mjs → project-context-DDCie6Ro.mjs} +1 -1
  18. package/dist/{resolver-CDbVXv4g.mjs → resolver-CZXZ0rft.mjs} +1 -1
  19. package/dist/{scanner-CRCZwhKS.mjs → scanner-2XDBAsbm.mjs} +5 -5
  20. package/dist/{setup-DpCYUVSf.mjs → setup-CMec7fht.mjs} +2 -2
  21. package/dist/setup.mjs +4 -4
  22. package/dist/{skill-paths-B-j0dWDA.mjs → skill-paths-Cr74uFk4.mjs} +1 -1
  23. package/dist/source-policy-D4slvwwI.mjs +9 -0
  24. package/dist/{source-policy-DaImacFt.mjs → source-policy-rGOtjQSM.mjs} +3 -3
  25. package/dist/{staleness-DVFARTES.mjs → staleness-B8IvDS_9.mjs} +2 -2
  26. package/dist/{staleness-BoFc6DMh.mjs → staleness-Ctzy2Zac.mjs} +2 -2
  27. package/dist/{types-DhITOzhi.d.mts → types-oEflMSso.d.mts} +1 -33
  28. package/dist/utils-BuNMwKct.mjs +3 -0
  29. package/dist/{utils-9fhWAVua.mjs → utils-Dj49bkF_.mjs} +14 -1
  30. package/dist/{validate-CnQBn6v9.mjs → validate-B3pkTIZl.mjs} +6 -6
  31. package/dist/{workspace-patterns-Bjq_cXww.mjs → workspace-patterns-BBW4c1gr.mjs} +2 -2
  32. package/dist/{workspace-patterns-BffPlZ1D.mjs → workspace-patterns-Cz_lNhwz.mjs} +1 -1
  33. package/meta/domain-discovery/SKILL.md +1 -1
  34. package/meta/generate-skill/SKILL.md +1 -8
  35. package/meta/tree-generator/SKILL.md +1 -1
  36. package/package.json +1 -1
  37. package/dist/source-policy-y3sktvzu.mjs +0 -9
  38. package/dist/utils-CSPzvaFu.mjs +0 -3
  39. package/meta/feedback-collection/SKILL.md +0 -234
package/README.md CHANGED
@@ -117,8 +117,6 @@ npx @tanstack/intent@latest setup
117
117
 
118
118
  The real risk with any derived artifact is staleness. `npx @tanstack/intent@latest stale` flags skills whose source docs have changed, generated skills that drift from `_artifacts`, and public workspace packages missing coverage. CI templates catch drift before it ships.
119
119
 
120
- The feedback loop runs both directions. `npx @tanstack/intent@latest feedback` lets users submit structured reports when a skill produces wrong output — which skill, which version, what broke. That context flows back to the maintainer, and the fix ships to everyone on the next package update. Every support interaction produces an artifact that prevents the same class of problem for all future users — not just the one who reported it.
121
-
122
120
  ## CLI Commands
123
121
 
124
122
  | Command | Description |
@@ -131,7 +129,6 @@ The feedback loop runs both directions. `npx @tanstack/intent@latest feedback` l
131
129
  | `npx @tanstack/intent@latest validate [dir]` | Validate SKILL.md files |
132
130
  | `npx @tanstack/intent@latest setup` | Copy CI templates into your repo |
133
131
  | `npx @tanstack/intent@latest stale [dir] [--json]` | Check skills for version drift |
134
- | `npx @tanstack/intent@latest feedback` | Submit skill feedback |
135
132
 
136
133
  ## License
137
134
 
@@ -1,6 +1,6 @@
1
- import "./utils-9fhWAVua.mjs";
2
- import "./workspace-patterns-BffPlZ1D.mjs";
3
- import "./project-context-DBSibDPb.mjs";
4
- import { a as noticeOptionsFromGlobalFlags, c as scanIntentsOrFail, i as getMetaDir, l as printNotices, n as coreOptionsFromGlobalFlags, o as printDebugInfo, r as getCheckSkillsWorkflowAdvisories, s as resolveStaleTargets, t as INTENT_CHECK_SKILLS_WORKFLOW_VERSION, u as printWarnings } from "./cli-support-BevVu4gw.mjs";
1
+ import "./utils-Dj49bkF_.mjs";
2
+ import "./workspace-patterns-Cz_lNhwz.mjs";
3
+ import "./project-context-DDCie6Ro.mjs";
4
+ import { a as noticeOptionsFromGlobalFlags, c as scanIntentsOrFail, i as getMetaDir, l as printNotices, n as coreOptionsFromGlobalFlags, o as printDebugInfo, r as getCheckSkillsWorkflowAdvisories, s as resolveStaleTargets, t as INTENT_CHECK_SKILLS_WORKFLOW_VERSION, u as printWarnings } from "./cli-support-C8SKYTA4.mjs";
5
5
 
6
6
  export { INTENT_CHECK_SKILLS_WORKFLOW_VERSION, coreOptionsFromGlobalFlags, getCheckSkillsWorkflowAdvisories, getMetaDir, noticeOptionsFromGlobalFlags, printDebugInfo, printNotices, printWarnings, resolveStaleTargets, scanIntentsOrFail };
@@ -1,4 +1,4 @@
1
- import { t as resolveProjectContext } from "./project-context-DBSibDPb.mjs";
1
+ import { t as resolveProjectContext } from "./project-context-DDCie6Ro.mjs";
2
2
  import { t as fail } from "./cli-error-BrMXlbtx.mjs";
3
3
  import { existsSync, readFileSync } from "node:fs";
4
4
  import { dirname, join, relative, resolve } from "node:path";
@@ -50,7 +50,7 @@ function getCheckSkillsWorkflowAdvisories(root) {
50
50
  return [`Intent workflow update available: run \`npx @tanstack/intent@latest setup\` to refresh ${relative(process.cwd(), workflowPath) || workflowPath}.`];
51
51
  }
52
52
  async function scanIntentsOrFail(coreOptions = {}) {
53
- const { scanForPolicedIntents } = await import("./source-policy-y3sktvzu.mjs");
53
+ const { scanForPolicedIntents } = await import("./source-policy-D4slvwwI.mjs");
54
54
  try {
55
55
  const { scan } = scanForPolicedIntents({
56
56
  cwd: process.cwd(),
@@ -94,13 +94,13 @@ async function resolveStaleTargets(targetDir) {
94
94
  targetPath: targetDir
95
95
  });
96
96
  const workflowAdvisories = getCheckSkillsWorkflowAdvisories(context.workspaceRoot ?? context.packageRoot ?? resolvedRoot);
97
- const { buildWorkspaceCoverageSignals, checkStaleness, readPackageName } = await import("./staleness-BoFc6DMh.mjs");
97
+ const { buildWorkspaceCoverageSignals, checkStaleness, readPackageName } = await import("./staleness-Ctzy2Zac.mjs");
98
98
  const isWorkspaceRootTarget = context.workspaceRoot !== null && resolvedRoot === context.workspaceRoot;
99
99
  if (context.packageRoot && !isWorkspaceRootTarget && (context.targetSkillsDir !== null || context.workspaceRoot === null)) return {
100
100
  reports: [await checkStaleness(context.packageRoot, readPackageName(context.packageRoot), context.workspaceRoot ?? context.packageRoot)],
101
101
  workflowAdvisories
102
102
  };
103
- const { findWorkspaceRoot, getWorkspaceInfo } = await import("./workspace-patterns-Bjq_cXww.mjs");
103
+ const { findWorkspaceRoot, getWorkspaceInfo } = await import("./workspace-patterns-BBW4c1gr.mjs");
104
104
  const workspaceRoot = findWorkspaceRoot(resolvedRoot);
105
105
  const workspaceInfo = workspaceRoot ? getWorkspaceInfo(workspaceRoot) : null;
106
106
  if (workspaceInfo) {
package/dist/cli.mjs CHANGED
@@ -9,35 +9,35 @@ function createCli() {
9
9
  const cli = cac("intent");
10
10
  cli.usage("<command> [options]");
11
11
  cli.command("list", "Discover intent-enabled packages from the project or workspace").usage("list [--json] [--debug] [--global] [--global-only] [--no-notices]").option("--json", "Output JSON").option("--debug", "Print discovery debug details to stderr").option("--global", "Include global packages after project packages").option("--global-only", "List global packages only").option("--no-notices", "Suppress non-critical notices on stderr").example("list").example("list --json").example("list --global").action(async (options) => {
12
- const { runListCommand } = await import("./list-CxB37mvm.mjs");
12
+ const { runListCommand } = await import("./list-UqYivAcV.mjs");
13
13
  await runListCommand(options);
14
14
  });
15
15
  cli.command("exclude [action] [pattern]", "Manage package.json intent.exclude entries").usage("exclude [list|add|remove] [pattern] [--json]").option("--json", "Output JSON list of configured exclude patterns").example("exclude").example("exclude list --json").example("exclude add @tanstack/router#experimental-*").example("exclude remove @tanstack/router#experimental-*").action(async (action, pattern, options) => {
16
- const { runExcludeCommand } = await import("./exclude-BTaE6TNh.mjs");
16
+ const { runExcludeCommand } = await import("./exclude-CBxkyK3Q.mjs");
17
17
  await runExcludeCommand(action, pattern, options);
18
18
  });
19
19
  cli.command("load [use]", "Load a compact skill use and print its SKILL.md").usage("load <use> [--path] [--json] [--debug] [--global] [--global-only]").option("--path", "Print the resolved skill path instead of file content").option("--json", "Output JSON").option("--debug", "Print resolution debug details to stderr").option("--global", "Load from project packages, then global packages").option("--global-only", "Load from global packages only").example("load @tanstack/query#core").example("load @tanstack/query#core --path").action(async (use, options) => {
20
- const { runLoadCommand } = await import("./load-Ch4UjIza.mjs");
20
+ const { runLoadCommand } = await import("./load-Dgw151E3.mjs");
21
21
  await runLoadCommand(use, options);
22
22
  });
23
23
  cli.command("meta [name]", "List meta-skills, or print one by name").usage("meta [name]").example("meta").example("meta domain-discovery").action(async (name) => {
24
- const [{ getMetaDir }, { runMetaCommand }] = await Promise.all([import("./cli-support-Cpo_9JfL.mjs"), import("./meta-C-t9P5Ls.mjs")]);
24
+ const [{ getMetaDir }, { runMetaCommand }] = await Promise.all([import("./cli-support-BADtMg6z.mjs"), import("./meta-BZMVgIzJ.mjs")]);
25
25
  await runMetaCommand(name, getMetaDir());
26
26
  });
27
27
  cli.command("validate [dir]", "Validate skill files").usage("validate [dir] [--github-summary]").option("--github-summary", "Write a GitHub Actions step summary").example("validate").example("validate packages/query/skills").action(async (dir, options) => {
28
- const { runValidateCommand } = await import("./validate-CnQBn6v9.mjs");
28
+ const { runValidateCommand } = await import("./validate-B3pkTIZl.mjs");
29
29
  await runValidateCommand(dir, options);
30
30
  });
31
31
  cli.command("install", "Create or update skill loading guidance in an agent config file").usage("install [--map] [--dry-run] [--print-prompt] [--global] [--global-only] [--no-notices]").option("--map", "Write explicit skill-to-task mappings").option("--dry-run", "Print the generated block without writing").option("--print-prompt", "Print the legacy agent setup prompt instead of writing").option("--global", "Include global packages after project packages").option("--global-only", "Install mappings from global packages only").option("--no-notices", "Suppress non-critical notices on stderr").example("install").example("install --map").example("install --dry-run").example("install --print-prompt").example("install --global").action(async (options) => {
32
- const [{ scanIntentsOrFail }, { runInstallCommand }] = await Promise.all([import("./cli-support-Cpo_9JfL.mjs"), import("./install-DXQsQQIL.mjs")]);
32
+ const [{ scanIntentsOrFail }, { runInstallCommand }] = await Promise.all([import("./cli-support-BADtMg6z.mjs"), import("./install-BE7gVoNT.mjs")]);
33
33
  await runInstallCommand(options, scanIntentsOrFail);
34
34
  });
35
35
  cli.command("scaffold", "Print maintainer scaffold prompt").usage("scaffold").action(async () => {
36
- const [{ getMetaDir }, { runScaffoldCommand }] = await Promise.all([import("./cli-support-Cpo_9JfL.mjs"), import("./scaffold-D2vwv9ls.mjs")]);
36
+ const [{ getMetaDir }, { runScaffoldCommand }] = await Promise.all([import("./cli-support-BADtMg6z.mjs"), import("./scaffold-D2vwv9ls.mjs")]);
37
37
  runScaffoldCommand(getMetaDir());
38
38
  });
39
39
  cli.command("stale [dir]", "Check skills for staleness in the current package or workspace").usage("stale [dir] [--json] [--github-review]").option("--json", "Output JSON").option("--github-review", "Write GitHub Actions review PR files").option("--package-label <label>", "Fallback package label for review PRs").example("stale").example("stale packages/query").example("stale --json").action(async (targetDir, options) => {
40
- const [{ resolveStaleTargets }, { runStaleCommand }] = await Promise.all([import("./cli-support-Cpo_9JfL.mjs"), import("./stale-DxZyYibt.mjs")]);
40
+ const [{ resolveStaleTargets }, { runStaleCommand }] = await Promise.all([import("./cli-support-BADtMg6z.mjs"), import("./stale-DxZyYibt.mjs")]);
41
41
  await runStaleCommand(targetDir, options, resolveStaleTargets);
42
42
  });
43
43
  cli.command("edit-package-json", "Update package.json files so skills are published").usage("edit-package-json").action(async () => {
@@ -45,11 +45,11 @@ function createCli() {
45
45
  await runEditPackageJsonCommand(process.cwd());
46
46
  });
47
47
  cli.command("setup", "Copy Intent CI workflow templates into .github/workflows/").usage("setup").action(async () => {
48
- const [{ getMetaDir }, { runSetupGithubActionsCommand }] = await Promise.all([import("./cli-support-Cpo_9JfL.mjs"), import("./setup-github-actions-emXSyGy3.mjs")]);
48
+ const [{ getMetaDir }, { runSetupGithubActionsCommand }] = await Promise.all([import("./cli-support-BADtMg6z.mjs"), import("./setup-github-actions-emXSyGy3.mjs")]);
49
49
  await runSetupGithubActionsCommand(process.cwd(), getMetaDir());
50
50
  });
51
51
  cli.command("setup-github-actions", "Copy Intent CI workflow templates into .github/workflows/").usage("setup-github-actions").action(async () => {
52
- const [{ getMetaDir }, { runSetupGithubActionsCommand }] = await Promise.all([import("./cli-support-Cpo_9JfL.mjs"), import("./setup-github-actions-emXSyGy3.mjs")]);
52
+ const [{ getMetaDir }, { runSetupGithubActionsCommand }] = await Promise.all([import("./cli-support-BADtMg6z.mjs"), import("./setup-github-actions-emXSyGy3.mjs")]);
53
53
  await runSetupGithubActionsCommand(process.cwd(), getMetaDir());
54
54
  });
55
55
  cli.command("help [command]", "Display help for a command").action((commandName) => {
@@ -1,11 +1,11 @@
1
- import { i as getDeps, l as resolveDepDir, u as toPosixPath } from "./utils-9fhWAVua.mjs";
2
- import { n as scanIntentPackageAtRoot, r as createIntentFsCache } from "./scanner-CRCZwhKS.mjs";
3
- import { n as findWorkspacePackages } from "./workspace-patterns-BffPlZ1D.mjs";
1
+ import { d as toPosixPath, i as getDeps, u as resolveDepDir } from "./utils-Dj49bkF_.mjs";
2
+ import { n as scanIntentPackageAtRoot, r as createIntentFsCache } from "./scanner-2XDBAsbm.mjs";
3
+ import { n as findWorkspacePackages } from "./workspace-patterns-Cz_lNhwz.mjs";
4
4
  import { i as parseSkillUse, n as formatSkillUse } from "./skill-use-CUrNHf-u.mjs";
5
- import { t as resolveProjectContext } from "./project-context-DBSibDPb.mjs";
6
- import { o as warningMentionsPackage, r as getEffectiveExcludePatterns, t as compileExcludePatterns } from "./excludes-DG83YEzb.mjs";
7
- import { i as resolveSkillUse, r as resolveSkillEntry, t as ResolveSkillUseError } from "./resolver-CDbVXv4g.mjs";
8
- import { a as checkLoadAllowed, o as readSkillSourcesConfig, s as scanForPolicedIntents } from "./source-policy-DaImacFt.mjs";
5
+ import { t as resolveProjectContext } from "./project-context-DDCie6Ro.mjs";
6
+ import { o as warningMentionsPackage, r as getEffectiveExcludePatterns, t as compileExcludePatterns } from "./excludes-DDMe-4iu.mjs";
7
+ import { i as resolveSkillUse, r as resolveSkillEntry, t as ResolveSkillUseError } from "./resolver-CZXZ0rft.mjs";
8
+ import { a as checkLoadAllowed, o as readSkillSourcesConfig, s as scanForPolicedIntents } from "./source-policy-rGOtjQSM.mjs";
9
9
  import { existsSync } from "node:fs";
10
10
  import { dirname, isAbsolute, join, relative, resolve } from "node:path";
11
11
 
package/dist/core.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { S as VersionConflict, _ as ScanStats, g as ScanScope, l as IntentPackage, p as PackageManager } from "./types-DhITOzhi.mjs";
1
+ import { _ as VersionConflict, c as PackageManager, d as ScanScope, f as ScanStats, s as IntentPackage } from "./types-oEflMSso.mjs";
2
2
 
3
3
  //#region src/core/types.d.ts
4
4
  interface IntentCoreOptions {
package/dist/core.mjs CHANGED
@@ -1,11 +1,11 @@
1
- import "./utils-9fhWAVua.mjs";
2
- import "./skill-paths-B-j0dWDA.mjs";
3
- import "./scanner-CRCZwhKS.mjs";
4
- import "./workspace-patterns-BffPlZ1D.mjs";
5
- import "./project-context-DBSibDPb.mjs";
6
- import "./excludes-DG83YEzb.mjs";
7
- import "./resolver-CDbVXv4g.mjs";
8
- import { i as resolveIntentSkill, n as listIntentSkills, r as loadIntentSkill, t as IntentCoreError } from "./core-6UP6jyL8.mjs";
9
- import "./source-policy-DaImacFt.mjs";
1
+ import "./utils-Dj49bkF_.mjs";
2
+ import "./skill-paths-Cr74uFk4.mjs";
3
+ import "./scanner-2XDBAsbm.mjs";
4
+ import "./workspace-patterns-Cz_lNhwz.mjs";
5
+ import "./project-context-DDCie6Ro.mjs";
6
+ import "./excludes-DDMe-4iu.mjs";
7
+ import "./resolver-CZXZ0rft.mjs";
8
+ import { i as resolveIntentSkill, n as listIntentSkills, r as loadIntentSkill, t as IntentCoreError } from "./core-hEMP5GMV.mjs";
9
+ import "./source-policy-rGOtjQSM.mjs";
10
10
 
11
11
  export { IntentCoreError, listIntentSkills, loadIntentSkill, resolveIntentSkill };
@@ -1,5 +1,5 @@
1
- import "./utils-9fhWAVua.mjs";
2
- import { n as isStableLoadPath, t as formatRuntimeSkillLookupHint } from "./skill-paths-B-j0dWDA.mjs";
1
+ import "./utils-Dj49bkF_.mjs";
2
+ import { n as isStableLoadPath, t as formatRuntimeSkillLookupHint } from "./skill-paths-Cr74uFk4.mjs";
3
3
 
4
4
  //#region src/display.ts
5
5
  function padColumn(text, width) {
@@ -1,7 +1,7 @@
1
- import "./utils-9fhWAVua.mjs";
2
- import "./workspace-patterns-BffPlZ1D.mjs";
3
- import "./project-context-DBSibDPb.mjs";
4
- import { t as compileExcludePatterns } from "./excludes-DG83YEzb.mjs";
1
+ import "./utils-Dj49bkF_.mjs";
2
+ import "./workspace-patterns-Cz_lNhwz.mjs";
3
+ import "./project-context-DDCie6Ro.mjs";
4
+ import { t as compileExcludePatterns } from "./excludes-DDMe-4iu.mjs";
5
5
  import { t as fail } from "./cli-error-BrMXlbtx.mjs";
6
6
  import { existsSync, readFileSync, writeFileSync } from "node:fs";
7
7
  import { join } from "node:path";
@@ -1,4 +1,4 @@
1
- import { t as resolveProjectContext } from "./project-context-DBSibDPb.mjs";
1
+ import { t as resolveProjectContext } from "./project-context-DDCie6Ro.mjs";
2
2
  import { readFileSync } from "node:fs";
3
3
  import { dirname, isAbsolute, join, relative, resolve } from "node:path";
4
4
 
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { S as VersionConflict, a as IntentArtifactSet, b as StalenessReport, c as IntentConfig, d as MetaFeedbackPayload, f as MetaSkillName, h as ScanResult, i as IntentArtifactFile, l as IntentPackage, m as ScanOptions, n as FeedbackPayload, o as IntentArtifactSkill, r as IntentArtifactCoverageIgnore, s as IntentArtifactWarning, t as AgentName, u as IntentProjectConfig, v as SkillEntry, x as StalenessSignal, y as SkillStaleness } from "./types-DhITOzhi.mjs";
1
+ import { _ as VersionConflict, a as IntentArtifactWarning, g as StalenessSignal, h as StalenessReport, i as IntentArtifactSkill, l as ScanOptions, m as SkillStaleness, n as IntentArtifactFile, o as IntentConfig, p as SkillEntry, r as IntentArtifactSet, s as IntentPackage, t as IntentArtifactCoverageIgnore, u as ScanResult } from "./types-oEflMSso.mjs";
2
2
  import { i as runEditPackageJson, o as runSetupGithubActions, r as SetupGithubActionsResult, t as EditPackageJsonResult } from "./setup-DW3pn0QW.mjs";
3
3
  import { closeSync, existsSync, lstatSync, openSync, readFileSync, readSync, readdirSync, realpathSync } from "node:fs";
4
4
 
@@ -65,33 +65,6 @@ declare function collectStaleReviewItems(reports: Array<StalenessReport>): Array
65
65
  declare function createFailedStaleReviewItem(library: string): StaleReviewItem;
66
66
  declare function buildStaleReviewBody(items: Array<StaleReviewItem>): string;
67
67
  //#endregion
68
- //#region src/feedback.d.ts
69
- declare function containsSecrets(text: string): boolean;
70
- declare function hasGhCli(): boolean;
71
- declare function resolveFrequency(root: string): string;
72
- declare function validatePayload(payload: unknown): {
73
- valid: boolean;
74
- errors: Array<string>;
75
- };
76
- declare function validateMetaPayload(payload: unknown): {
77
- valid: boolean;
78
- errors: Array<string>;
79
- };
80
- declare function metaToMarkdown(payload: MetaFeedbackPayload): string;
81
- declare function toMarkdown(payload: FeedbackPayload): string;
82
- interface SubmitResult {
83
- method: 'gh' | 'file' | 'stdout';
84
- detail: string;
85
- }
86
- declare function submitFeedback(payload: FeedbackPayload, repo: string, opts: {
87
- ghAvailable: boolean;
88
- outputPath?: string;
89
- }): SubmitResult;
90
- declare function submitMetaFeedback(payload: MetaFeedbackPayload, opts: {
91
- ghAvailable: boolean;
92
- outputPath?: string;
93
- }): SubmitResult;
94
- //#endregion
95
68
  //#region src/skill-use.d.ts
96
69
  interface SkillUse {
97
70
  packageName: string;
@@ -148,4 +121,4 @@ declare class ResolveSkillUseError extends Error {
148
121
  declare function isResolveSkillUseError(error: unknown): error is ResolveSkillUseError;
149
122
  declare function resolveSkillUse(use: string, scanResult: ScanResult): ResolveSkillResult;
150
123
  //#endregion
151
- export { type AgentName, type EditPackageJsonResult, type FeedbackPayload, type IntentArtifactCoverageIgnore, type IntentArtifactFile, type IntentArtifactSet, type IntentArtifactSkill, type IntentArtifactWarning, type IntentConfig, type IntentPackage, type IntentProjectConfig, type MetaFeedbackPayload, type MetaSkillName, type ResolveSkillResult, ResolveSkillUseError, type ResolveSkillUseErrorCode, type ScanOptions, type ScanResult, type SetupGithubActionsResult, type SkillEntry, type SkillStaleness, type SkillUse, SkillUseParseError, type SkillUseParseErrorCode, type StaleReviewItem, type StalenessReport, type StalenessSignal, buildStaleReviewBody, checkStaleness, collectStaleReviewItems, containsSecrets, createFailedStaleReviewItem, findSkillFiles, formatSkillUse, getDeps, hasGhCli, isResolveSkillUseError, isSkillUseParseError, metaToMarkdown, parseFrontmatter, parseSkillUse, readIntentArtifacts, resolveDepDir, resolveFrequency, resolveSkillUse, runEditPackageJson, runSetupGithubActions, scanForIntents, submitFeedback, submitMetaFeedback, toMarkdown, validateMetaPayload, validatePayload };
124
+ export { type EditPackageJsonResult, type IntentArtifactCoverageIgnore, type IntentArtifactFile, type IntentArtifactSet, type IntentArtifactSkill, type IntentArtifactWarning, type IntentConfig, type IntentPackage, type ResolveSkillResult, ResolveSkillUseError, type ResolveSkillUseErrorCode, type ScanOptions, type ScanResult, type SetupGithubActionsResult, type SkillEntry, type SkillStaleness, type SkillUse, SkillUseParseError, type SkillUseParseErrorCode, type StaleReviewItem, type StalenessReport, type StalenessSignal, buildStaleReviewBody, checkStaleness, collectStaleReviewItems, createFailedStaleReviewItem, findSkillFiles, formatSkillUse, getDeps, isResolveSkillUseError, isSkillUseParseError, parseFrontmatter, parseSkillUse, readIntentArtifacts, resolveDepDir, resolveSkillUse, runEditPackageJson, runSetupGithubActions, scanForIntents };
package/dist/index.mjs CHANGED
@@ -1,280 +1,14 @@
1
- import { c as parseFrontmatter, i as getDeps, l as resolveDepDir, r as findSkillFiles } from "./utils-9fhWAVua.mjs";
2
- import "./skill-paths-B-j0dWDA.mjs";
3
- import { t as scanForIntents } from "./scanner-CRCZwhKS.mjs";
4
- import "./workspace-patterns-BffPlZ1D.mjs";
1
+ import { c as parseFrontmatter, i as getDeps, r as findSkillFiles, u as resolveDepDir } from "./utils-Dj49bkF_.mjs";
2
+ import "./skill-paths-Cr74uFk4.mjs";
3
+ import { t as scanForIntents } from "./scanner-2XDBAsbm.mjs";
4
+ import "./workspace-patterns-Cz_lNhwz.mjs";
5
5
  import { t as readIntentArtifacts } from "./artifact-coverage-nGwun1tt.mjs";
6
- import { n as checkStaleness } from "./staleness-DVFARTES.mjs";
6
+ import { n as checkStaleness } from "./staleness-B8IvDS_9.mjs";
7
7
  import { n as collectStaleReviewItems, r as createFailedStaleReviewItem, t as buildStaleReviewBody } from "./workflow-review-wL1Iu2Sf.mjs";
8
8
  import { i as parseSkillUse, n as formatSkillUse, r as isSkillUseParseError, t as SkillUseParseError } from "./skill-use-CUrNHf-u.mjs";
9
- import "./project-context-DBSibDPb.mjs";
10
- import "./excludes-DG83YEzb.mjs";
11
- import { i as resolveSkillUse, n as isResolveSkillUseError, t as ResolveSkillUseError } from "./resolver-CDbVXv4g.mjs";
12
- import { r as runSetupGithubActions, t as runEditPackageJson } from "./setup-DpCYUVSf.mjs";
13
- import { readFileSync, writeFileSync } from "node:fs";
14
- import { join } from "node:path";
15
- import { execFileSync, execSync } from "node:child_process";
9
+ import "./project-context-DDCie6Ro.mjs";
10
+ import "./excludes-DDMe-4iu.mjs";
11
+ import { i as resolveSkillUse, n as isResolveSkillUseError, t as ResolveSkillUseError } from "./resolver-CZXZ0rft.mjs";
12
+ import { r as runSetupGithubActions, t as runEditPackageJson } from "./setup-CMec7fht.mjs";
16
13
 
17
- //#region src/feedback.ts
18
- const META_FEEDBACK_REPO = "TanStack/intent";
19
- const SECRET_PATTERNS = [
20
- /(?:ghp|gho|ghu|ghs|ghr)_[A-Za-z0-9_]{36,}/,
21
- /(?:sk|pk)[-_](?:live|test)[-_][A-Za-z0-9]{24,}/,
22
- /AKIA[0-9A-Z]{16}/,
23
- /-----BEGIN (?:RSA |EC )?PRIVATE KEY-----/,
24
- /eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}/,
25
- /(?:Bearer|token)\s+[A-Za-z0-9_\-.~+/]{20,}/i,
26
- /[A-Za-z0-9]{32,}(?=.*(?:key|secret|token|password))/i
27
- ];
28
- function containsSecrets(text) {
29
- return SECRET_PATTERNS.some((pattern) => pattern.test(text));
30
- }
31
- function hasGhCli() {
32
- try {
33
- execSync("gh --version", { stdio: "ignore" });
34
- return true;
35
- } catch {
36
- return false;
37
- }
38
- }
39
- function getHomeConfigDir() {
40
- return process.env.XDG_CONFIG_HOME ?? join(process.env.HOME ?? process.env.USERPROFILE ?? "", ".config");
41
- }
42
- function parseFrequency(value) {
43
- if (value === "always" || value === "never") return value;
44
- if (typeof value !== "string") return null;
45
- const match = /^every-(\d+)$/.exec(value);
46
- if (!match) return null;
47
- const count = Number(match[1]);
48
- return Number.isInteger(count) && count > 0 ? `every-${count}` : null;
49
- }
50
- function readFrequency(filePath) {
51
- try {
52
- return parseFrequency(JSON.parse(readFileSync(filePath, "utf8")).feedback?.frequency);
53
- } catch {
54
- return null;
55
- }
56
- }
57
- function resolveFrequency(root) {
58
- const userFrequency = readFrequency(join(getHomeConfigDir(), "intent", "config.json"));
59
- if (userFrequency) return userFrequency;
60
- const projectFrequency = readFrequency(join(root, "intent.config.json"));
61
- if (projectFrequency) return projectFrequency;
62
- return "every-5";
63
- }
64
- const REQUIRED_FIELDS = [
65
- "skill",
66
- "package",
67
- "skillVersion",
68
- "task",
69
- "whatWorked",
70
- "whatFailed",
71
- "missing",
72
- "selfCorrections",
73
- "userRating"
74
- ];
75
- function validatePayload(payload) {
76
- const errors = [];
77
- if (!payload || typeof payload !== "object") return {
78
- valid: false,
79
- errors: ["Payload must be a JSON object"]
80
- };
81
- const obj = payload;
82
- for (const field of REQUIRED_FIELDS) if (typeof obj[field] !== "string" || obj[field].trim() === "") errors.push(`Missing or empty required field: ${field}`);
83
- if (obj.userRating && ![
84
- "good",
85
- "mixed",
86
- "bad"
87
- ].includes(obj.userRating)) errors.push("userRating must be one of: good, mixed, bad");
88
- if (containsSecrets(Object.values(obj).filter((v) => typeof v === "string").join("\n"))) errors.push("Payload appears to contain secrets or tokens — submission rejected");
89
- return {
90
- valid: errors.length === 0,
91
- errors
92
- };
93
- }
94
- const META_REQUIRED_FIELDS = [
95
- "metaSkill",
96
- "library",
97
- "agentUsed",
98
- "artifactQuality",
99
- "whatWorked",
100
- "whatFailed",
101
- "suggestions",
102
- "userRating"
103
- ];
104
- const VALID_META_SKILLS = [
105
- "domain-discovery",
106
- "tree-generator",
107
- "generate-skill",
108
- "skill-staleness-check"
109
- ];
110
- const VALID_AGENTS = [
111
- "claude-code",
112
- "cursor",
113
- "copilot",
114
- "codex",
115
- "other"
116
- ];
117
- const VALID_QUALITY_RATINGS = [
118
- "good",
119
- "mixed",
120
- "bad"
121
- ];
122
- const VALID_INTERVIEW_QUALITY_RATINGS = [
123
- "good",
124
- "mixed",
125
- "bad",
126
- "skipped"
127
- ];
128
- const VALID_FAILURE_MODE_QUALITY_RATINGS = [
129
- "good",
130
- "mixed",
131
- "bad",
132
- "not-applicable"
133
- ];
134
- function validateMetaPayload(payload) {
135
- const errors = [];
136
- if (!payload || typeof payload !== "object") return {
137
- valid: false,
138
- errors: ["Payload must be a JSON object"]
139
- };
140
- const obj = payload;
141
- for (const field of META_REQUIRED_FIELDS) if (typeof obj[field] !== "string" || obj[field].trim() === "") errors.push(`Missing or empty required field: ${field}`);
142
- if (obj.metaSkill && !VALID_META_SKILLS.includes(obj.metaSkill)) errors.push(`metaSkill must be one of: ${VALID_META_SKILLS.join(", ")}`);
143
- if (obj.agentUsed && !VALID_AGENTS.includes(obj.agentUsed)) errors.push(`agentUsed must be one of: ${VALID_AGENTS.join(", ")}`);
144
- if (obj.artifactQuality && !VALID_QUALITY_RATINGS.includes(obj.artifactQuality)) errors.push("artifactQuality must be one of: good, mixed, bad");
145
- if (obj.userRating && !VALID_QUALITY_RATINGS.includes(obj.userRating)) errors.push("userRating must be one of: good, mixed, bad");
146
- if (obj.interviewQuality && !VALID_INTERVIEW_QUALITY_RATINGS.includes(obj.interviewQuality)) errors.push("interviewQuality must be one of: good, mixed, bad, skipped");
147
- if (obj.failureModeQuality && !VALID_FAILURE_MODE_QUALITY_RATINGS.includes(obj.failureModeQuality)) errors.push("failureModeQuality must be one of: good, mixed, bad, not-applicable");
148
- if (containsSecrets(Object.values(obj).filter((v) => typeof v === "string").join("\n"))) errors.push("Payload appears to contain secrets or tokens — submission rejected");
149
- return {
150
- valid: errors.length === 0,
151
- errors
152
- };
153
- }
154
- function metaToMarkdown(payload) {
155
- const lines = [
156
- `# Meta-Skill Feedback: ${payload.metaSkill}`,
157
- "",
158
- `**Library:** ${payload.library}`,
159
- `**Agent:** ${payload.agentUsed}`,
160
- `**Artifact quality:** ${payload.artifactQuality}`,
161
- `**Rating:** ${payload.userRating}`
162
- ];
163
- if (payload.interviewQuality) lines.push(`**Interview quality:** ${payload.interviewQuality}`);
164
- if (payload.failureModeQuality) lines.push(`**Failure mode quality:** ${payload.failureModeQuality}`);
165
- lines.push("", "## What Worked", payload.whatWorked, "", "## What Failed", payload.whatFailed, "", "## Suggestions", payload.suggestions);
166
- return lines.join("\n") + "\n";
167
- }
168
- function toMarkdown(payload) {
169
- const lines = [
170
- `# Skill Feedback: ${payload.skill}`,
171
- "",
172
- `**Package:** ${payload.package}`,
173
- `**Skill version:** ${payload.skillVersion}`,
174
- `**Rating:** ${payload.userRating}`,
175
- "",
176
- "## Task",
177
- payload.task,
178
- "",
179
- "## What Worked",
180
- payload.whatWorked,
181
- "",
182
- "## What Failed",
183
- payload.whatFailed,
184
- "",
185
- "## Missing",
186
- payload.missing,
187
- "",
188
- "## Self-Corrections",
189
- payload.selfCorrections
190
- ];
191
- if (payload.userComments) lines.push("", "## User Comments", payload.userComments);
192
- return lines.join("\n") + "\n";
193
- }
194
- function submitFeedback(payload, repo, opts) {
195
- const md = toMarkdown(payload);
196
- if (opts.ghAvailable) try {
197
- execFileSync("gh", [
198
- "issue",
199
- "create",
200
- "--repo",
201
- repo,
202
- "--title",
203
- `Skill Feedback: ${payload.skill} (${payload.userRating})`,
204
- "--body",
205
- "-"
206
- ], {
207
- input: md,
208
- stdio: [
209
- "pipe",
210
- "pipe",
211
- "pipe"
212
- ]
213
- });
214
- return {
215
- method: "gh",
216
- detail: `Submitted issue to ${repo}`
217
- };
218
- } catch (err) {
219
- const msg = err instanceof Error ? err.message : String(err);
220
- console.error(`GitHub submission failed: ${msg}`);
221
- console.error("Falling back to file output.");
222
- }
223
- if (opts.outputPath) {
224
- writeFileSync(opts.outputPath, md, "utf8");
225
- return {
226
- method: "file",
227
- detail: `Saved to ${opts.outputPath}`
228
- };
229
- }
230
- return {
231
- method: "stdout",
232
- detail: md
233
- };
234
- }
235
- function submitMetaFeedback(payload, opts) {
236
- const md = metaToMarkdown(payload);
237
- if (opts.ghAvailable) try {
238
- execFileSync("gh", [
239
- "issue",
240
- "create",
241
- "--repo",
242
- META_FEEDBACK_REPO,
243
- "--title",
244
- `Meta-Skill Feedback: ${payload.metaSkill} (${payload.userRating})`,
245
- "--label",
246
- `skill:${payload.metaSkill}`,
247
- "--body",
248
- "-"
249
- ], {
250
- input: md,
251
- stdio: [
252
- "pipe",
253
- "pipe",
254
- "pipe"
255
- ]
256
- });
257
- return {
258
- method: "gh",
259
- detail: `Submitted issue to ${META_FEEDBACK_REPO}`
260
- };
261
- } catch (err) {
262
- const msg = err instanceof Error ? err.message : String(err);
263
- console.error(`GitHub submission failed: ${msg}`);
264
- console.error("Falling back to file output.");
265
- }
266
- if (opts.outputPath) {
267
- writeFileSync(opts.outputPath, md, "utf8");
268
- return {
269
- method: "file",
270
- detail: `Saved to ${opts.outputPath}`
271
- };
272
- }
273
- return {
274
- method: "stdout",
275
- detail: md
276
- };
277
- }
278
-
279
- //#endregion
280
- export { ResolveSkillUseError, SkillUseParseError, buildStaleReviewBody, checkStaleness, collectStaleReviewItems, containsSecrets, createFailedStaleReviewItem, findSkillFiles, formatSkillUse, getDeps, hasGhCli, isResolveSkillUseError, isSkillUseParseError, metaToMarkdown, parseFrontmatter, parseSkillUse, readIntentArtifacts, resolveDepDir, resolveFrequency, resolveSkillUse, runEditPackageJson, runSetupGithubActions, scanForIntents, submitFeedback, submitMetaFeedback, toMarkdown, validateMetaPayload, validatePayload };
14
+ export { ResolveSkillUseError, SkillUseParseError, buildStaleReviewBody, checkStaleness, collectStaleReviewItems, createFailedStaleReviewItem, findSkillFiles, formatSkillUse, getDeps, isResolveSkillUseError, isSkillUseParseError, parseFrontmatter, parseSkillUse, readIntentArtifacts, resolveDepDir, resolveSkillUse, runEditPackageJson, runSetupGithubActions, scanForIntents };
@@ -1,10 +1,10 @@
1
- import "./utils-9fhWAVua.mjs";
2
- import "./workspace-patterns-BffPlZ1D.mjs";
1
+ import "./utils-Dj49bkF_.mjs";
2
+ import "./workspace-patterns-Cz_lNhwz.mjs";
3
3
  import { t as detectPackageManager } from "./package-manager-BUgTjW9Q.mjs";
4
4
  import { i as parseSkillUse, n as formatSkillUse } from "./skill-use-CUrNHf-u.mjs";
5
- import "./project-context-DBSibDPb.mjs";
5
+ import "./project-context-DDCie6Ro.mjs";
6
6
  import { t as fail } from "./cli-error-BrMXlbtx.mjs";
7
- import { a as noticeOptionsFromGlobalFlags, l as printNotices, n as coreOptionsFromGlobalFlags, u as printWarnings } from "./cli-support-BevVu4gw.mjs";
7
+ import { a as noticeOptionsFromGlobalFlags, l as printNotices, n as coreOptionsFromGlobalFlags, u as printWarnings } from "./cli-support-C8SKYTA4.mjs";
8
8
  import { t as formatIntentCommand } from "./command-runner-fstUIUhe.mjs";
9
9
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
10
10
  import { dirname, join, relative } from "node:path";
@@ -1,13 +1,13 @@
1
- import "./utils-9fhWAVua.mjs";
2
- import "./skill-paths-B-j0dWDA.mjs";
3
- import "./scanner-CRCZwhKS.mjs";
4
- import "./workspace-patterns-BffPlZ1D.mjs";
5
- import "./project-context-DBSibDPb.mjs";
6
- import "./excludes-DG83YEzb.mjs";
7
- import "./resolver-CDbVXv4g.mjs";
8
- import { n as listIntentSkills } from "./core-6UP6jyL8.mjs";
9
- import "./source-policy-DaImacFt.mjs";
10
- import { a as noticeOptionsFromGlobalFlags, l as printNotices, n as coreOptionsFromGlobalFlags, o as printDebugInfo, u as printWarnings } from "./cli-support-BevVu4gw.mjs";
1
+ import "./utils-Dj49bkF_.mjs";
2
+ import "./skill-paths-Cr74uFk4.mjs";
3
+ import "./scanner-2XDBAsbm.mjs";
4
+ import "./workspace-patterns-Cz_lNhwz.mjs";
5
+ import "./project-context-DDCie6Ro.mjs";
6
+ import "./excludes-DDMe-4iu.mjs";
7
+ import "./resolver-CZXZ0rft.mjs";
8
+ import { n as listIntentSkills } from "./core-hEMP5GMV.mjs";
9
+ import "./source-policy-rGOtjQSM.mjs";
10
+ import { a as noticeOptionsFromGlobalFlags, l as printNotices, n as coreOptionsFromGlobalFlags, o as printDebugInfo, u as printWarnings } from "./cli-support-C8SKYTA4.mjs";
11
11
  import { t as formatIntentCommand } from "./command-runner-fstUIUhe.mjs";
12
12
 
13
13
  //#region src/commands/list.ts
@@ -63,7 +63,7 @@ async function runListCommand(options) {
63
63
  console.log(JSON.stringify(jsonResult, null, 2));
64
64
  return;
65
65
  }
66
- const { computeSkillNameWidth, printSkillTree, printTable } = await import("./display-CVMGtcHz.mjs");
66
+ const { computeSkillNameWidth, printSkillTree, printTable } = await import("./display-CFnFnrtx.mjs");
67
67
  if (result.packages.length === 0) {
68
68
  console.log("No intent-enabled packages found.");
69
69
  if (result.warnings.length > 0) {
@@ -109,10 +109,6 @@ async function runListCommand(options) {
109
109
  });
110
110
  console.log();
111
111
  }
112
- console.log("Feedback:");
113
- console.log(" Submit feedback on skill usage to help maintainers improve the skills.");
114
- console.log(" Load: node_modules/@tanstack/intent/meta/feedback-collection/SKILL.md");
115
- console.log();
116
112
  printWarnings(result.warnings);
117
113
  printNotices(result.notices, noticeOptions);
118
114
  }
@@ -1,14 +1,14 @@
1
- import "./utils-9fhWAVua.mjs";
2
- import "./skill-paths-B-j0dWDA.mjs";
3
- import "./scanner-CRCZwhKS.mjs";
4
- import "./workspace-patterns-BffPlZ1D.mjs";
5
- import "./project-context-DBSibDPb.mjs";
6
- import "./excludes-DG83YEzb.mjs";
7
- import "./resolver-CDbVXv4g.mjs";
1
+ import "./utils-Dj49bkF_.mjs";
2
+ import "./skill-paths-Cr74uFk4.mjs";
3
+ import "./scanner-2XDBAsbm.mjs";
4
+ import "./workspace-patterns-Cz_lNhwz.mjs";
5
+ import "./project-context-DDCie6Ro.mjs";
6
+ import "./excludes-DDMe-4iu.mjs";
7
+ import "./resolver-CZXZ0rft.mjs";
8
8
  import { t as fail } from "./cli-error-BrMXlbtx.mjs";
9
- import { i as resolveIntentSkill, r as loadIntentSkill, t as IntentCoreError } from "./core-6UP6jyL8.mjs";
10
- import "./source-policy-DaImacFt.mjs";
11
- import { n as coreOptionsFromGlobalFlags, o as printDebugInfo } from "./cli-support-BevVu4gw.mjs";
9
+ import { i as resolveIntentSkill, r as loadIntentSkill, t as IntentCoreError } from "./core-hEMP5GMV.mjs";
10
+ import "./source-policy-rGOtjQSM.mjs";
11
+ import { n as coreOptionsFromGlobalFlags, o as printDebugInfo } from "./cli-support-C8SKYTA4.mjs";
12
12
 
13
13
  //#region src/commands/load.ts
14
14
  function printLoadDebug(loaded) {
@@ -16,7 +16,7 @@ async function runMetaCommand(name, metaDir) {
16
16
  }
17
17
  return;
18
18
  }
19
- const { parseFrontmatter } = await import("./utils-CSPzvaFu.mjs");
19
+ const { parseFrontmatter } = await import("./utils-BuNMwKct.mjs");
20
20
  const entries = readdirSync(metaDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).filter((entry) => existsSync(join(metaDir, entry.name, "SKILL.md")));
21
21
  if (entries.length === 0) {
22
22
  console.log("No meta-skills found.");
@@ -1,4 +1,4 @@
1
- import { a as readWorkspacePatterns, r as findWorkspaceRoot } from "./workspace-patterns-BffPlZ1D.mjs";
1
+ import { a as readWorkspacePatterns, r as findWorkspaceRoot } from "./workspace-patterns-Cz_lNhwz.mjs";
2
2
  import { existsSync, statSync } from "node:fs";
3
3
  import { dirname, join, relative, resolve } from "node:path";
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { i as parseSkillUse } from "./skill-use-CUrNHf-u.mjs";
2
- import { o as warningMentionsPackage } from "./excludes-DG83YEzb.mjs";
2
+ import { o as warningMentionsPackage } from "./excludes-DDMe-4iu.mjs";
3
3
 
4
4
  //#region src/resolver.ts
5
5
  var ResolveSkillUseError = class extends Error {
@@ -1,6 +1,6 @@
1
- import { a as listNestedNodeModulesPackageDirs, c as parseFrontmatter, i as getDeps, l as resolveDepDir, n as detectGlobalNodeModules, o as listNodeModulesPackageDirs, r as findSkillFiles, s as nodeReadFs, t as createFsIdentityCache, u as toPosixPath } from "./utils-9fhWAVua.mjs";
2
- import { r as rewriteSkillLoadPaths } from "./skill-paths-B-j0dWDA.mjs";
3
- import { n as findWorkspacePackages, r as findWorkspaceRoot } from "./workspace-patterns-BffPlZ1D.mjs";
1
+ import { a as listNestedNodeModulesPackageDirs, c as parseFrontmatter, d as toPosixPath, i as getDeps, l as readScalarField, n as detectGlobalNodeModules, o as listNodeModulesPackageDirs, r as findSkillFiles, s as nodeReadFs, t as createFsIdentityCache, u as resolveDepDir } from "./utils-Dj49bkF_.mjs";
2
+ import { r as rewriteSkillLoadPaths } from "./skill-paths-Cr74uFk4.mjs";
3
+ import { n as findWorkspacePackages, r as findWorkspaceRoot } from "./workspace-patterns-Cz_lNhwz.mjs";
4
4
  import { t as detectPackageManager } from "./package-manager-BUgTjW9Q.mjs";
5
5
  import { createRequire } from "node:module";
6
6
  import { existsSync } from "node:fs";
@@ -331,8 +331,8 @@ function readSkillEntry(skillsDir, childDir, skillFile, readFs = nodeReadFs) {
331
331
  name: typeof fm?.name === "string" ? fm.name : relName,
332
332
  path: skillFile,
333
333
  description: desc,
334
- type: typeof fm?.type === "string" ? fm.type : void 0,
335
- framework: typeof fm?.framework === "string" ? fm.framework : void 0
334
+ type: readScalarField(fm, "type"),
335
+ framework: readScalarField(fm, "framework")
336
336
  };
337
337
  }
338
338
  function discoverSkillByNameHint(skillsDir, packageName, skillNameHint, readFs = nodeReadFs) {
@@ -1,5 +1,5 @@
1
- import { a as readWorkspacePatterns, r as findWorkspaceRoot, t as findPackagesWithSkills } from "./workspace-patterns-BffPlZ1D.mjs";
2
- import { t as resolveProjectContext } from "./project-context-DBSibDPb.mjs";
1
+ import { a as readWorkspacePatterns, r as findWorkspaceRoot, t as findPackagesWithSkills } from "./workspace-patterns-Cz_lNhwz.mjs";
2
+ import { t as resolveProjectContext } from "./project-context-DDCie6Ro.mjs";
3
3
  import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
4
4
  import { basename, join, relative } from "node:path";
5
5
 
package/dist/setup.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import "./utils-9fhWAVua.mjs";
2
- import { a as readWorkspacePatterns, o as resolveWorkspacePackages, r as findWorkspaceRoot, t as findPackagesWithSkills } from "./workspace-patterns-BffPlZ1D.mjs";
3
- import "./project-context-DBSibDPb.mjs";
4
- import { n as runEditPackageJsonAll, r as runSetupGithubActions, t as runEditPackageJson } from "./setup-DpCYUVSf.mjs";
1
+ import "./utils-Dj49bkF_.mjs";
2
+ import { a as readWorkspacePatterns, o as resolveWorkspacePackages, r as findWorkspaceRoot, t as findPackagesWithSkills } from "./workspace-patterns-Cz_lNhwz.mjs";
3
+ import "./project-context-DDCie6Ro.mjs";
4
+ import { n as runEditPackageJsonAll, r as runSetupGithubActions, t as runEditPackageJson } from "./setup-CMec7fht.mjs";
5
5
 
6
6
  export { findPackagesWithSkills, findWorkspaceRoot, readWorkspacePatterns, resolveWorkspacePackages, runEditPackageJson, runEditPackageJsonAll, runSetupGithubActions };
@@ -1,4 +1,4 @@
1
- import { u as toPosixPath } from "./utils-9fhWAVua.mjs";
1
+ import { d as toPosixPath } from "./utils-Dj49bkF_.mjs";
2
2
  import { existsSync } from "node:fs";
3
3
  import { join, relative } from "node:path";
4
4
 
@@ -0,0 +1,9 @@
1
+ import "./utils-Dj49bkF_.mjs";
2
+ import "./skill-paths-Cr74uFk4.mjs";
3
+ import "./scanner-2XDBAsbm.mjs";
4
+ import "./workspace-patterns-Cz_lNhwz.mjs";
5
+ import "./project-context-DDCie6Ro.mjs";
6
+ import "./excludes-DDMe-4iu.mjs";
7
+ import { a as checkLoadAllowed, i as applySourcePolicy, n as EMPTY_NOTE, o as readSkillSourcesConfig, r as MIGRATION_NOTICE, s as scanForPolicedIntents, t as ALLOW_ALL_NOTICE } from "./source-policy-rGOtjQSM.mjs";
8
+
9
+ export { scanForPolicedIntents };
@@ -1,6 +1,6 @@
1
- import { t as scanForIntents } from "./scanner-CRCZwhKS.mjs";
2
- import { t as resolveProjectContext } from "./project-context-DBSibDPb.mjs";
3
- import { a as isSkillExcluded, i as isPackageExcluded, n as getConfigDirs, o as warningMentionsPackage, r as getEffectiveExcludePatterns, s as readPackageJson, t as compileExcludePatterns } from "./excludes-DG83YEzb.mjs";
1
+ import { t as scanForIntents } from "./scanner-2XDBAsbm.mjs";
2
+ import { t as resolveProjectContext } from "./project-context-DDCie6Ro.mjs";
3
+ import { a as isSkillExcluded, i as isPackageExcluded, n as getConfigDirs, o as warningMentionsPackage, r as getEffectiveExcludePatterns, s as readPackageJson, t as compileExcludePatterns } from "./excludes-DDMe-4iu.mjs";
4
4
 
5
5
  //#region src/core/skill-sources.ts
6
6
  var SkillSourcesParseError = class extends Error {
@@ -1,4 +1,4 @@
1
- import { c as parseFrontmatter, r as findSkillFiles, u as toPosixPath } from "./utils-9fhWAVua.mjs";
1
+ import { c as parseFrontmatter, d as toPosixPath, l as readScalarField, r as findSkillFiles } from "./utils-Dj49bkF_.mjs";
2
2
  import { t as readIntentArtifacts } from "./artifact-coverage-nGwun1tt.mjs";
3
3
  import { existsSync, readFileSync } from "node:fs";
4
4
  import { isAbsolute, join, relative, resolve } from "node:path";
@@ -222,7 +222,7 @@ async function checkStaleness(packageDir, packageName, artifactRoot = packageDir
222
222
  name: typeof fm?.name === "string" ? fm.name : relName,
223
223
  relName,
224
224
  filePath,
225
- libraryVersion: fm?.library_version,
225
+ libraryVersion: readScalarField(fm, "library_version"),
226
226
  sources: Array.isArray(fm?.sources) ? fm.sources : void 0
227
227
  };
228
228
  });
@@ -1,5 +1,5 @@
1
- import "./utils-9fhWAVua.mjs";
1
+ import "./utils-Dj49bkF_.mjs";
2
2
  import "./artifact-coverage-nGwun1tt.mjs";
3
- import { n as checkStaleness, r as readPackageName, t as buildWorkspaceCoverageSignals } from "./staleness-DVFARTES.mjs";
3
+ import { n as checkStaleness, r as readPackageName, t as buildWorkspaceCoverageSignals } from "./staleness-B8IvDS_9.mjs";
4
4
 
5
5
  export { buildWorkspaceCoverageSignals, checkStaleness, readPackageName };
@@ -117,37 +117,5 @@ interface IntentArtifactWarning {
117
117
  artifactPath: string;
118
118
  message: string;
119
119
  }
120
- interface FeedbackPayload {
121
- skill: string;
122
- package: string;
123
- skillVersion: string;
124
- task: string;
125
- whatWorked: string;
126
- whatFailed: string;
127
- missing: string;
128
- selfCorrections: string;
129
- userRating: 'good' | 'mixed' | 'bad';
130
- userComments?: string;
131
- }
132
- type MetaSkillName = 'domain-discovery' | 'tree-generator' | 'generate-skill' | 'skill-staleness-check';
133
- type AgentName = 'claude-code' | 'cursor' | 'copilot' | 'codex' | 'other';
134
- interface MetaFeedbackPayload {
135
- metaSkill: MetaSkillName;
136
- library: string;
137
- agentUsed: AgentName;
138
- artifactQuality: 'good' | 'mixed' | 'bad';
139
- interviewQuality?: 'good' | 'mixed' | 'bad' | 'skipped';
140
- failureModeQuality?: 'good' | 'mixed' | 'bad' | 'not-applicable';
141
- whatWorked: string;
142
- whatFailed: string;
143
- suggestions: string;
144
- userRating: 'good' | 'mixed' | 'bad';
145
- }
146
- type FeedbackFrequency = 'always' | 'never' | `every-${number}`;
147
- interface IntentProjectConfig {
148
- feedback: {
149
- frequency: FeedbackFrequency;
150
- };
151
- }
152
120
  //#endregion
153
- export { VersionConflict as S, ScanStats as _, IntentArtifactSet as a, StalenessReport as b, IntentConfig as c, MetaFeedbackPayload as d, MetaSkillName as f, ScanScope as g, ScanResult as h, IntentArtifactFile as i, IntentPackage as l, ScanOptions as m, FeedbackPayload as n, IntentArtifactSkill as o, PackageManager as p, IntentArtifactCoverageIgnore as r, IntentArtifactWarning as s, AgentName as t, IntentProjectConfig as u, SkillEntry as v, StalenessSignal as x, SkillStaleness as y };
121
+ export { VersionConflict as _, IntentArtifactWarning as a, PackageManager as c, ScanScope as d, ScanStats as f, StalenessSignal as g, StalenessReport as h, IntentArtifactSkill as i, ScanOptions as l, SkillStaleness as m, IntentArtifactFile as n, IntentConfig as o, SkillEntry as p, IntentArtifactSet as r, IntentPackage as s, IntentArtifactCoverageIgnore as t, ScanResult as u };
@@ -0,0 +1,3 @@
1
+ import { a as listNestedNodeModulesPackageDirs, c as parseFrontmatter, d as toPosixPath, i as getDeps, l as readScalarField, n as detectGlobalNodeModules, o as listNodeModulesPackageDirs, r as findSkillFiles, s as nodeReadFs, t as createFsIdentityCache, u as resolveDepDir } from "./utils-Dj49bkF_.mjs";
2
+
3
+ export { createFsIdentityCache, detectGlobalNodeModules, findSkillFiles, getDeps, listNestedNodeModulesPackageDirs, listNodeModulesPackageDirs, nodeReadFs, parseFrontmatter, readScalarField, resolveDepDir, toPosixPath };
@@ -230,6 +230,19 @@ function resolveDepDir(depName, parentDir) {
230
230
  return null;
231
231
  }
232
232
  /**
233
+ * Read a scalar string field from frontmatter, preferring `metadata.<key>` over
234
+ * a top-level `<key>` (#159 back-compat for the frontmatter migration).
235
+ */
236
+ function readScalarField(fm, key) {
237
+ const metadata = fm?.metadata;
238
+ if (metadata && typeof metadata === "object" && !Array.isArray(metadata)) {
239
+ const nested = metadata[key];
240
+ if (typeof nested === "string") return nested;
241
+ }
242
+ const top = fm?.[key];
243
+ return typeof top === "string" ? top : void 0;
244
+ }
245
+ /**
233
246
  * Parse YAML frontmatter from a file. Returns null if no frontmatter or on error.
234
247
  */
235
248
  function parseFrontmatter(filePath, fs = nodeReadFs) {
@@ -279,4 +292,4 @@ function readFrontmatterRegion(filePath, fs) {
279
292
  }
280
293
 
281
294
  //#endregion
282
- export { listNestedNodeModulesPackageDirs as a, parseFrontmatter as c, getDeps as i, resolveDepDir as l, detectGlobalNodeModules as n, listNodeModulesPackageDirs as o, findSkillFiles as r, nodeReadFs as s, createFsIdentityCache as t, toPosixPath as u };
295
+ export { listNestedNodeModulesPackageDirs as a, parseFrontmatter as c, toPosixPath as d, getDeps as i, readScalarField as l, detectGlobalNodeModules as n, listNodeModulesPackageDirs as o, findSkillFiles as r, nodeReadFs as s, createFsIdentityCache as t, resolveDepDir as u };
@@ -1,8 +1,8 @@
1
- import "./utils-9fhWAVua.mjs";
2
- import { n as findWorkspacePackages } from "./workspace-patterns-BffPlZ1D.mjs";
3
- import { t as resolveProjectContext } from "./project-context-DBSibDPb.mjs";
1
+ import "./utils-Dj49bkF_.mjs";
2
+ import { n as findWorkspacePackages } from "./workspace-patterns-Cz_lNhwz.mjs";
3
+ import { t as resolveProjectContext } from "./project-context-DDCie6Ro.mjs";
4
4
  import { n as isCliFailure, t as fail } from "./cli-error-BrMXlbtx.mjs";
5
- import { u as printWarnings } from "./cli-support-BevVu4gw.mjs";
5
+ import { u as printWarnings } from "./cli-support-C8SKYTA4.mjs";
6
6
  import { appendFileSync, existsSync, readFileSync } from "node:fs";
7
7
  import { basename, dirname, join, relative, resolve, sep } from "node:path";
8
8
 
@@ -115,7 +115,7 @@ async function runValidateCommand(dir, options = {}) {
115
115
  }
116
116
  }
117
117
  async function runValidateCommandInternal(dir) {
118
- const [{ parse: parseYaml }, { findSkillFiles }] = await Promise.all([import("yaml"), import("./utils-CSPzvaFu.mjs")]);
118
+ const [{ parse: parseYaml }, { findSkillFiles, readScalarField }] = await Promise.all([import("yaml"), import("./utils-BuNMwKct.mjs")]);
119
119
  const context = resolveProjectContext({
120
120
  cwd: process.cwd(),
121
121
  targetPath: dir
@@ -185,7 +185,7 @@ async function runValidateCommandInternal(dir) {
185
185
  file: rel,
186
186
  message: `Description exceeds 1024 character limit (${fm.description.length} chars)`
187
187
  });
188
- if (fm.type === "framework" && !Array.isArray(fm.requires)) errors.push({
188
+ if (readScalarField(fm, "type") === "framework" && !Array.isArray(fm.requires)) errors.push({
189
189
  file: rel,
190
190
  message: "Framework skills must have a \"requires\" field"
191
191
  });
@@ -1,4 +1,4 @@
1
- import "./utils-9fhWAVua.mjs";
2
- import { a as readWorkspacePatterns, i as getWorkspaceInfo, n as findWorkspacePackages, o as resolveWorkspacePackages, r as findWorkspaceRoot, t as findPackagesWithSkills } from "./workspace-patterns-BffPlZ1D.mjs";
1
+ import "./utils-Dj49bkF_.mjs";
2
+ import { a as readWorkspacePatterns, i as getWorkspaceInfo, n as findWorkspacePackages, o as resolveWorkspacePackages, r as findWorkspaceRoot, t as findPackagesWithSkills } from "./workspace-patterns-Cz_lNhwz.mjs";
3
3
 
4
4
  export { findWorkspaceRoot, getWorkspaceInfo };
@@ -1,4 +1,4 @@
1
- import { r as findSkillFiles } from "./utils-9fhWAVua.mjs";
1
+ import { r as findSkillFiles } from "./utils-Dj49bkF_.mjs";
2
2
  import { existsSync, readFileSync, readdirSync } from "node:fs";
3
3
  import { dirname, join } from "node:path";
4
4
  import { parse } from "yaml";
@@ -572,7 +572,7 @@ Include the full draft domain_map.yaml in your message so the maintainer
572
572
  can review it. Also include a checklist of all docs files you read.
573
573
 
574
574
  **── STOP ── Do not proceed to Phase 4 until the maintainer has
575
- reviewed the draft and responded. Their feedback on the draft informs
575
+ reviewed the draft and responded. Their response to the draft informs
576
576
  the detail interview questions.**
577
577
 
578
578
  ---
@@ -118,7 +118,7 @@ cannot already know:
118
118
 
119
119
  Before writing the skill body, search the library's GitHub repo for issues
120
120
  and discussions relevant to THIS skill's topic. This step is important for
121
- both initial generation and regeneration — community feedback reveals
121
+ both initial generation and regeneration — issue discussions reveal
122
122
  failure modes that docs miss.
123
123
 
124
124
  **Search strategy:**
@@ -443,11 +443,4 @@ Output is consumed by all major AI coding agents. To ensure consistency:
443
443
  - Critical info at start or end of sections (not buried in middle)
444
444
  - Each SKILL.md is self-contained except for declared `requires`
445
445
 
446
- ---
447
-
448
- ## Meta-skill feedback
449
-
450
- After generating all skills, run the `skill-feedback-collection` skill to
451
- capture feedback about the scaffolding process (domain-discovery,
452
- tree-generator, and generate-skill).
453
446
  ```
@@ -702,7 +702,7 @@ Run when:
702
702
  - The library has released a new version
703
703
  - A maintainer reports skills produce outdated code
704
704
  - A changelog or migration guide has been published since skill creation
705
- - Feedback reports indicate skill content is inaccurate
705
+ - Issue reports indicate skill content is inaccurate
706
706
 
707
707
  ### Step 1 — Detect staleness
708
708
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/intent",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Ship compositional knowledge for AI coding agents alongside your npm packages",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,9 +0,0 @@
1
- import "./utils-9fhWAVua.mjs";
2
- import "./skill-paths-B-j0dWDA.mjs";
3
- import "./scanner-CRCZwhKS.mjs";
4
- import "./workspace-patterns-BffPlZ1D.mjs";
5
- import "./project-context-DBSibDPb.mjs";
6
- import "./excludes-DG83YEzb.mjs";
7
- import { a as checkLoadAllowed, i as applySourcePolicy, n as EMPTY_NOTE, o as readSkillSourcesConfig, r as MIGRATION_NOTICE, s as scanForPolicedIntents, t as ALLOW_ALL_NOTICE } from "./source-policy-DaImacFt.mjs";
8
-
9
- export { scanForPolicedIntents };
@@ -1,3 +0,0 @@
1
- import { a as listNestedNodeModulesPackageDirs, c as parseFrontmatter, i as getDeps, l as resolveDepDir, n as detectGlobalNodeModules, o as listNodeModulesPackageDirs, r as findSkillFiles, s as nodeReadFs, t as createFsIdentityCache, u as toPosixPath } from "./utils-9fhWAVua.mjs";
2
-
3
- export { createFsIdentityCache, detectGlobalNodeModules, findSkillFiles, getDeps, listNestedNodeModulesPackageDirs, listNodeModulesPackageDirs, nodeReadFs, parseFrontmatter, resolveDepDir, toPosixPath };
@@ -1,234 +0,0 @@
1
- ---
2
- name: skill-feedback-collection
3
- description: >
4
- Collect structured feedback about skill usage after completing a coding task.
5
- Activate at the end of any session where one or more SKILL.md files were
6
- loaded. Captures agent signals (gaps, errors, corrections, human interventions)
7
- and brief human input, then submits directly via gh CLI or provides manual
8
- submission instructions.
9
- metadata:
10
- version: '2.0'
11
- category: meta-tooling
12
- ---
13
-
14
- # Skill Feedback Collection
15
-
16
- Run this at the end of any session where you loaded one or more SKILL.md files.
17
- The goal is to capture what worked, what didn't, and what was missing — so skill
18
- maintainers can improve future versions.
19
-
20
- This skill also covers **meta-skill feedback** — feedback about the scaffolding
21
- process itself. When invoked after running domain-discovery, tree-generator, and
22
- generate-skill, treat those three meta skills as the "skills" being evaluated.
23
- Capture what worked and what didn't in each scaffolding phase so the meta skills
24
- can be improved.
25
-
26
- ---
27
-
28
- ## Phase 1 — Automated Signal Collection
29
-
30
- Review your own session transcript. No human interaction needed yet.
31
-
32
- ### 1a: Skills inventory
33
-
34
- Before analyzing gaps and errors, inventory all skills that were available
35
- during the session:
36
-
37
- - **Loaded and used:** Skills you read and actively followed.
38
- - **Available but not loaded:** Skills that were installed (discoverable via
39
- `npx @tanstack/intent@latest list`) but you never read. This is important — many issues stem from
40
- the agent not loading the right skill, not from the skill itself being wrong.
41
-
42
- ### 1b: Gap detection
43
-
44
- Identify moments where the skill was silent and you had to bridge the gap
45
- yourself — via code reading, search, trial-and-error, or general knowledge.
46
-
47
- For each gap, note:
48
-
49
- - What you needed to do
50
- - What the skill should have told you
51
- - How you solved it (code reading, web search, guessing)
52
-
53
- ### 1c: Error/correction tracking
54
-
55
- Identify moments where the skill prescribed an approach that produced an error.
56
-
57
- For each error, note:
58
-
59
- - What the skill said to do
60
- - The error or incorrect behavior that resulted
61
- - The fix you applied
62
-
63
- ### 1d: Human intervention events
64
-
65
- Identify moments where the human clarified, corrected, or overrode your approach.
66
-
67
- For each intervention, note:
68
-
69
- - What you were doing when the human intervened
70
- - What the human said or changed
71
- - Whether the skill could have prevented this
72
-
73
- ### 1e: Step duration anomalies
74
-
75
- Identify steps that consumed disproportionate effort compared to their apparent
76
- complexity. These signal that the skill should provide a template, snippet, or
77
- more detailed guidance.
78
-
79
- ---
80
-
81
- ## Phase 2 — Human Interview
82
-
83
- Ask the human up to 4 questions. Keep it brief — skip questions if the session
84
- already provided clear answers. Respect if they decline.
85
-
86
- 1. "Was anything unclear about what was happening during the task?"
87
- 2. "Did anything feel frustrating or take longer than expected?"
88
- 3. "Were you uncertain about the output quality at any point?"
89
- 4. "Anything you'd want done differently next time?"
90
-
91
- Derive `userRating` from overall sentiment:
92
-
93
- - Mostly positive → `good`
94
- - Mixed signals → `mixed`
95
- - Mostly negative → `bad`
96
-
97
- If the human gives an explicit rating, use that instead.
98
-
99
- ---
100
-
101
- ## Phase 3 — Build the Feedback
102
-
103
- Write one Markdown feedback file per skill used. Only include skills that were
104
- actually used during the session — skip any that were loaded but never
105
- referenced.
106
-
107
- ### Template
108
-
109
- ```markdown
110
- # Skill Feedback: [skill name from SKILL.md frontmatter]
111
-
112
- **Package:** [npm package name that contains the skill]
113
- **Skill version:** [metadata.version or library_version from frontmatter]
114
- **Rating:** [good | mixed | bad]
115
-
116
- ## Task
117
-
118
- [one-sentence summary of what the human asked you to do]
119
-
120
- ## Skills Inventory
121
-
122
- **Loaded and used:**
123
-
124
- - [list each skill the agent read and actively followed during the session]
125
-
126
- **Available but not loaded:**
127
-
128
- - [list skills that were installed/available but the agent never read]
129
-
130
- ## What Worked
131
-
132
- [patterns/instructions from the skill that were accurate and helpful]
133
-
134
- ## What Failed
135
-
136
- [from 1c — skill instructions that produced errors]
137
-
138
- ## Missing
139
-
140
- [from 1b — gaps where the skill should have covered]
141
-
142
- ## Self-Corrections
143
-
144
- [from 1c fixes + 1d human interventions, combined]
145
-
146
- ## User Comments
147
-
148
- [optional — direct quotes or paraphrased human input from Phase 2]
149
- ```
150
-
151
- ### Field derivation guide
152
-
153
- | Field | Source |
154
- | ---------------- | ------------------------------------------------------------------ |
155
- | Skill name | Frontmatter `name` field of the SKILL.md you loaded |
156
- | Package | The npm package the skill lives in (e.g. `@tanstack/query-intent`) |
157
- | Skill version | Frontmatter `metadata.version` or `library_version` |
158
- | Task | Summarize the human's original request in one sentence |
159
- | Skills Inventory | Which skills were loaded vs. available but not loaded (see below) |
160
- | What Worked | List skill sections/patterns that were correct and useful |
161
- | What Failed | From 1c — skill instructions that produced errors |
162
- | Missing | From 1b — gaps where the skill was silent |
163
- | Self-Corrections | From 1c fixes + 1d human interventions, combined |
164
- | Rating | From Phase 2 sentiment analysis or explicit rating |
165
- | User Comments | From Phase 2 answers, keep brief |
166
-
167
- ---
168
-
169
- ## Phase 4 — Submit
170
-
171
- Determine the target repo from the skill's package. The repo is typically
172
- derivable from the `repository` field in the package's `package.json`, or
173
- from the `sources` field in the SKILL.md frontmatter.
174
-
175
- ### Link to existing issues/discussions
176
-
177
- Before creating a new issue, search the target repo for existing issues or
178
- discussions that match the feedback. Use `gh search issues` or the GitHub
179
- web search with keywords from the "What Failed" and "Missing" sections.
180
-
181
- - If an **open issue** already describes the same problem, comment on it
182
- with the feedback instead of creating a duplicate. Reference the skill
183
- name and version in your comment.
184
- - If a **closed issue** describes a problem the skill still gets wrong
185
- (regression or stale skill content), reference the closed issue in the
186
- new feedback issue body: `Related to #[number] — this was fixed in the
187
- library but the skill still describes the old behavior.`
188
- - If a **discussion thread** covers the same topic, link to it in the
189
- feedback issue body so maintainers can see the community context.
190
-
191
- This prevents duplicate issues and gives maintainers richer context for
192
- improving skills.
193
-
194
- ### Privacy check
195
-
196
- Before submitting, determine whether the user's project is public or private.
197
- Check with `gh repo view --json visibility` or look for a `private` field in
198
- the project's `package.json`. If you can't determine visibility, assume private.
199
-
200
- **Private repos:** Feedback is submitted to a public issue tracker, so it must
201
- not contain project-specific details. Before submission:
202
-
203
- 1. Strip any project-specific code, file paths, internal API names, service
204
- URLs, or business logic from all fields
205
- 2. Rewrite the "Task" field to describe the _type_ of task generically
206
- (e.g. "set up authenticated data fetching" not "set up auth for our
207
- internal billing API at api.acme.corp/billing")
208
- 3. Rewrite "What Failed" and "Missing" entries to reference only the
209
- skill's own APIs and patterns, not the user's code
210
- 4. Show the sanitized feedback to the user and ask them to confirm it's
211
- safe to submit before proceeding
212
-
213
- **Public repos:** No sanitization needed. Proceed directly to submission.
214
-
215
- ### If `gh` CLI is available
216
-
217
- Submit directly as a GitHub issue:
218
-
219
- ```bash
220
- gh issue create --repo [owner/repo] --title "Skill Feedback: [skill-name] ([rating])" --label "skill:[skill-name]" --body-file intent-feedback.md
221
- ```
222
-
223
- If the label doesn't exist, omit the `--label` flag — don't let a missing
224
- label block submission.
225
-
226
- If submission succeeds, delete the feedback file.
227
-
228
- ### If `gh` CLI is not available
229
-
230
- Tell the human:
231
-
232
- > "I've written skill feedback to `intent-feedback.md`. To submit it,
233
- > open an issue at https://github.com/[owner/repo]/issues and paste the
234
- > contents."