Skip to content

docs: agent instruction files teach npm, but the repo runs on yarn#1875

Open
NieZhuZhu wants to merge 1 commit into
MetaMask:masterfrom
NieZhuZhu:docs/yarn-commands-in-agent-docs
Open

docs: agent instruction files teach npm, but the repo runs on yarn#1875
NieZhuZhu wants to merge 1 commit into
MetaMask:masterfrom
NieZhuZhu:docs/yarn-commands-in-agent-docs

Conversation

@NieZhuZhu

@NieZhuZhu NieZhuZhu commented Jul 20, 2026

Copy link
Copy Markdown

What

The three agent-instruction files — .cursorrules, CLAUDE.md, and the canonical .github/copilot-instructions.md they both point to — all teach npm run asset:set / asset:verify / asset:list. The repo itself runs on yarn: the only committed lockfile is yarn.lock, and CI (.github/workflows/test.yml) installs with yarn --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:set to work will infer npm install from the command style — which bypasses yarn.lock's pinned resolutions and drops a stray package-lock.json in the tree, diverging from exactly what CI enforces.

Changes

  • .github/copilot-instructions.md — all 10 npm run asset:X occurrences → yarn asset:X (the -- separators dropped; yarn passes script args through directly), plus a one-line bootstrap note: install with yarn, since that's what yarn.lock/CI pin.
  • .cursorrules and CLAUDE.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:list arg-forwarding against the plain node cli-update-asset.js scripts in package.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 CLIyarn + yarn.lock/CI, not npm run.

The canonical .github/copilot-instructions.md replaces every npm run asset:* example with yarn asset:* (dropping the npm -- arg separator) and adds a short note to bootstrap with yarn first. The .cursorrules and CLAUDE.md quick-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.

.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
@NieZhuZhu
NieZhuZhu requested review from a team and MRabenda as code owners July 20, 2026 13:55
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.

1 participant