Skip to content

fix: improve TanStack Start skill to reduce first-attempt build failures#83

Merged
nicknisi merged 3 commits intomainfrom
nicknisi/tanstack-start-skill-improvements
Mar 5, 2026
Merged

fix: improve TanStack Start skill to reduce first-attempt build failures#83
nicknisi merged 3 commits intomainfrom
nicknisi/tanstack-start-skill-improvements

Conversation

@nicknisi
Copy link
Member

@nicknisi nicknisi commented Mar 5, 2026

Summary

  • Fix createStart call signature to use callback form: createStart(() => ({ ... })) instead of createStart({ ... })
  • Add mandatory Finalize section (route tree regeneration, vite-env.d.ts, build verification)
  • Instruct agents to read existing start.ts before modifying instead of rewriting from scratch

Why

Eval first-attempt pass rate for TanStack Start was 20%. The agent kept self-correcting the same three issues:

  1. createStart takes a function returning options, not the options directly — every scenario hit this
  2. Route tree not regenerated after adding routes, causing type errors
  3. Missing vite-env.d.ts for Vite CSS ?url imports

Eval Results (in progress)

Run First-attempt With-correction With-retry
Before any changes 20% 80% 100%
After friction log PR 40% 100% 100%
After this PR TBD TBD TBD

@nicknisi nicknisi force-pushed the nicknisi/tanstack-start-skill-improvements branch from f8f77d4 to 7069e9b Compare March 5, 2026 20:48
Three changes to address common agent self-correction patterns:

1. Use createStart(() => ({ ... })) as the default start.ts pattern.
   The generated routeTree.gen.ts imports createStart types, so a plain
   object export fails type checking. createStart takes a function
   returning the options, not the options directly.

2. Add Finalize section with mandatory pre-completion steps: regenerate
   route tree, ensure vite-env.d.ts exists, verify the build.

3. Instruct agents to read existing start.ts before modifying, matching
   the project's export style instead of rewriting from scratch.
@nicknisi nicknisi force-pushed the nicknisi/tanstack-start-skill-improvements branch from 7069e9b to 1018c6f Compare March 5, 2026 20:56
@nicknisi nicknisi merged commit 6b935ce into main Mar 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant