The model has been trained on every framework in existence, in every version, with every set of preferences. Without context, it averages, defaulting to whatever was popular in the training data. That is why a TypeScript project gets JavaScript suggestions and a Next.js 16 project gets pre-13 advice.
The fix is to lead with the stack. The first sentence of every non-trivial prompt should answer four questions:
- The language and version. TypeScript 5, Python 3.12, Go 1.22.
- The framework and version. Next.js 16 App Router, FastAPI, and so on.
- The hard constraints. "No new dependencies," "must run in Cloudflare Workers," "edge runtime only."
- What you are optimizing for. Readability, performance, type safety, terseness.
Compare:
Working in a Next.js 16 App Router project (TypeScript 5, Tailwind v4).
No new dependencies. Optimize for type safety. Add a search bar to the
home page that filters the existing toolkit cards client-side.
versus:
Add a search bar to my page.
The first one produces idiomatic Next.js 16 code that respects the stack. The second produces 2023's average implementation, complete with useState patterns that have been deprecated for a year.
◆ pull quote
“The model is not psychic. It is a mirror, and it reflects the most common version of whatever you describe. Tell it which version you live in.”
This is also why CLAUDE.md files (and .cursorrules, system prompts, project READMEs) are load-bearing. They lead with the stack on every prompt, automatically. If the same stack preamble gets typed more than twice in a week, that is a signal to put it in CLAUDE.md and never type it again.