docs: agent instruction files teach npm, but the repo runs on yarn#1875
Open
NieZhuZhu wants to merge 1 commit into
Open
docs: agent instruction files teach npm, but the repo runs on yarn#1875NieZhuZhu wants to merge 1 commit into
NieZhuZhu wants to merge 1 commit into
Conversation
.cursorrules, CLAUDE.md, and .github/copilot-instructions.md all taught npm run asset:set/verify/list, but the repo's only lockfile is yarn.lock and CI installs with yarn --frozen-lockfile. Switch the commands to their yarn form in all three files (keeping the two pointer stubs byte-identical twins) and add the missing yarn bootstrap note to the canonical doc. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Change-Id: Id941d5838ede9da33686becd7444771a0ac3ee06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The three agent-instruction files —
.cursorrules,CLAUDE.md, and the canonical.github/copilot-instructions.mdthey both point to — all teachnpm run asset:set/asset:verify/asset:list. The repo itself runs on yarn: the only committed lockfile isyarn.lock, and CI (.github/workflows/test.yml) installs withyarn --frozen-lockfile. All three files were introduced together in #1711 with the npm-flavored commands, so this is one shared bug across the set, not drift between them.Why it matters in practice: the docs contain no install/bootstrap step at all, so an AI agent (or contributor) that needs
asset:setto work will infernpm installfrom the command style — which bypassesyarn.lock's pinned resolutions and drops a straypackage-lock.jsonin the tree, diverging from exactly what CI enforces.Changes
.github/copilot-instructions.md— all 10npm run asset:Xoccurrences →yarn asset:X(the--separators dropped; yarn passes script args through directly), plus a one-line bootstrap note: install withyarn, since that's whatyarn.lock/CI pin..cursorrulesandCLAUDE.md— the same three quick-reference lines each, applied identically so the two files stay byte-for-byte twins (title line aside), preserving the existing pointer-stub design.Docs-only; no code touched. Verified
yarn asset:set/asset:listarg-forwarding against the plainnode cli-update-asset.jsscripts inpackage.json.Full disclosure: found while validating ai-harness-doctor, a docs-vs-lockfile drift linter we maintain — that's how this repo ended up in our scan sample. Everything above is verifiable directly from
yarn.lock+test.yml, no tool needed. For measured impact of this defect class (agent docs teaching a package manager the lockfile contradicts) on another repo: benchmark & methodology.🤖 Generated with Claude Code
Note
Low Risk
Documentation-only updates to CLI examples and install guidance; no runtime or CI behavior changes.
Overview
Agent and contributor docs now match how this repo actually installs and runs the asset CLI —
yarn+yarn.lock/CI, notnpm run.The canonical
.github/copilot-instructions.mdreplaces everynpm run asset:*example withyarn asset:*(dropping the npm--arg separator) and adds a short note to bootstrap withyarnfirst. The.cursorrulesandCLAUDE.mdquick-reference stubs get the same three command lines so they stay in sync with that doc.Docs-only; no application or script code changes.
Reviewed by Cursor Bugbot for commit 70b407b. Bugbot is set up for automated code reviews on this repo. Configure here.