Skip to content

fix: address meta-feedback issues from scaffold test runs#27

Merged
KyleAMathews merged 19 commits intomainfrom
fix/meta-feedback-batch
Mar 4, 2026
Merged

fix: address meta-feedback issues from scaffold test runs#27
KyleAMathews merged 19 commits intomainfrom
fix/meta-feedback-batch

Conversation

@KyleAMathews
Copy link
Collaborator

@KyleAMathews KyleAMathews commented Mar 4, 2026

Summary

Addresses all meta-feedback issues from the Durable Streams test run. The core problem: the scaffold dumped all three meta skills into a single prompt, causing quality degradation. This PR restructures the scaffold to run skills sequentially, removes CLI code that agents should handle directly, and fixes cross-reference gaps in the domain map.

Net result: -808 lines, +506 lines — the CLI surface is smaller, agents do more, maintainers do less.

Approach

Sequential scaffold with STOP gates. The scaffold now loads each SKILL.md one at a time with explicit stop-and-review points. The agent gathers context (library name, repo URL, monorepo structure) autonomously from package.json instead of asking the maintainer.

Agents handle feedback and labels directly. The feedback CLI command and runFeedback function were removed — the feedback-collection SKILL.md now instructs agents to use gh issue create directly. Similarly, createSkillLabels was removed from setup.ts — the scaffold tells the agent to create feedback:<skill-name> labels via gh.

initinstall, prompt-based. The old init command programmatically injected blocks into agent configs. The new install command prints a guided prompt (matching the library CLI) that lets the agent scan the project and set up skill-to-task mappings. init.ts and its tests were removed entirely.

Cross-references in the domain map. Domain discovery now maps "See also" pointers between skills (Phase 3f). The tree generator consumes these to add cross-reference lines to generated skills.

Key changes

  • Scaffold: sequential meta skill execution with autonomous context gathering
  • Validator: description 1024-char limit, packaging checks (devDeps, bin, shim, files array)
  • List: shows SKILL.md file paths in both maintainer and consumer CLIs
  • Feedback: agents submit via gh directly; execFileSync replaces execSync for shell safety
  • Shim: .mjs by default, .js when package has "type": "module"
  • Display: shared display helpers extracted to display.ts (was duplicated between CLIs)
  • README: updated to reflect current CLI surface

Non-goals

  • Did not address pre-existing silent catch patterns in detectVars, resolveFrequency, parseFrontmatter, fetchNpmVersion — those are out of scope for this feedback-driven PR.
  • Did not change the staleness checker or scanner logic.

Verification

pnpm build        # builds cleanly
pnpm vitest run   # 112 tests pass (8 test files)

Manual verification:

  • npx @tanstack/intent scaffold prints sequential instructions with STOP gates
  • npx @tanstack/intent validate reports packaging warnings
  • npx @tanstack/intent setup --shim generates .mjs shim
  • npx @tanstack/intent install prints agent prompt for skill-to-task mappings

Files changed

File Change
src/cli.ts Scaffold rewrite, validator packaging checks, install command, feedback case removed
src/display.ts New — shared display helpers extracted from both CLIs
src/setup.ts .mjs shim default, removed createSkillLabels and --labels flag
src/feedback.ts Removed runFeedback, switched to execFileSync
src/intent-library.ts Now imports from display.ts, shows skill paths
src/index.ts Removed init.ts exports
src/init.ts Deleted — replaced by prompt-based install
tests/init.test.ts Deleted — no longer needed
meta/domain-discovery/SKILL.md Cross-references section (Phase 3f), fixed phase numbering
meta/tree-generator/SKILL.md Consumes cross-references, fixed phase reference
meta/feedback-collection/SKILL.md Agents use gh issue create directly
README.md Updated CLI command table

Closes #24
Closes #25
Closes #26

🤖 Generated with Claude Code

KyleAMathews and others added 8 commits March 3, 2026 19:06
The scaffold prompt now instructs the AI to load each meta skill's
SKILL.md one at a time with explicit review stops between steps,
rather than summarizing all three phases in a single prompt dump.
This prevents quality degradation from the AI racing ahead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds packaging warnings when package.json exists: checks for
@tanstack/intent in devDependencies, bin entry, shim file, and
"skills"/"bin"/"!skills/_artifacts" in files array. Also validates
SKILL.md description doesn't exceed 1024 characters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Both maintainer and consumer list commands now display the file path
for each skill, making the output actionable for AI coding agents
that need to load the skill file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The agent should read package.json and detect monorepo structure
itself rather than asking the maintainer for information that's
trivially discoverable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When gh issue submission fails, the error message is now logged
instead of silently falling through. Also adds Markdown file
support: .md files are submitted directly as issue bodies without
requiring JSON format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The generated bin/intent shim now uses .mjs extension to avoid
Node.js ESM warnings in packages without "type": "module". When
the package does declare "type": "module", it uses .js instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Domain discovery now identifies cross-skill "See also" pointers
beyond tensions and shared failure modes. The tree generator
consumes these to add cross-reference lines in generated skills,
forming a semi-lattice of connected knowledge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds --labels flag to intent setup that creates meta-feedback
labels (feedback:domain-discovery, feedback:tree-generator, etc.)
on the target GitHub repo using gh CLI. Prevents silent failures
when the feedback command tries to add labels that don't exist.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 4, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@tanstack/intent@27

commit: d63f409

autofix-ci bot and others added 11 commits March 4, 2026 02:19
Labels are derived from the library's own skills/ directory (e.g.
feedback:typography-core, feedback:react-typography), not hardcoded
meta-skill labels. Added as a scaffold post-generation step.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The feedback-collection skill now instructs agents to use gh issue
create directly (or tell the user how to submit manually) instead
of routing through the intent feedback CLI. Simpler, fewer failure
modes, better formatting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The maintainer CLI's install command now prints the same guided prompt
as the library CLI — the agent scans the project and sets up
skill-to-task mappings in agent config files, rather than
programmatically injecting blocks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The feedback-collection SKILL.md now instructs agents to use `gh issue
create` directly rather than routing through a CLI command. Removed
the `feedback` case from the CLI switch and the `runFeedback` function
from feedback.ts. Library utility functions (validate, toMarkdown,
submit) remain as public API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use execFileSync instead of execSync to prevent shell injection
- Fix stale phase cross-references in domain-discovery and tree-generator
- Remove createSkillLabels and --labels flag (agents create labels directly)
- Remove init.ts — replaced by prompt-based install command
- Extract shared display helpers into display.ts
- Extract collectPackagingWarnings, detectShimExtension, findExistingShim
- Surface package.json parse errors in validator warnings
- Update README to reflect current CLI surface

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
padColumn and printSkillLine are only used within display.ts — they
don't need to be exported.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@KyleAMathews KyleAMathews merged commit a2360b2 into main Mar 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[meta-feedback] generate-skill (mixed) [meta-feedback] tree-generator (mixed) [meta-feedback] domain-discovery (mixed)

1 participant