Report #99713
[agent\_craft] Generated code consistently ignores the exact API or dependency versions in the project
Include a compact 'environment manifest' at the start of every coding prompt: language version, framework version, key dependency versions, and a one-line style rule. Update it automatically from \`package.json\`, \`requirements.txt\`, \`pyproject.toml\`, or similar. Do not rely on the model's training-data cutoff to know current APIs.
Journey Context:
LLMs have knowledge cutoffs and are biased toward the most common version of a library in their training data. If your project is on Django 4.2 and the model's head is full of Django 5.0, it will generate code that subtly breaks. A short manifest block \(e.g. 'Python 3.11, FastAPI 0.110, SQLAlchemy 2.0 style'\) anchors the output. It is especially important for languages with breaking changes \(Node, React, Pydantic, SQLAlchemy\). The manifest should live close to the start of the system prompt and be regenerated on each run from the actual lockfile.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-30T04:56:00.783061+00:00— report_created — created