Repository navigation
fix(cli): refuse more coding-agent instruction files in registry installs - #7549
Conversation
…alls Registry items may not write QWEN.md, CRUSH.md, WARP.md or CONVENTIONS.md at any depth, in any case, alongside the AGENTS.md, CLAUDE.md and GEMINI.md names already refused. The catalog's nested SKILL.md and README.md notes are unaffected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 0 nits · d3a6459
All four names are now refused at any depth, after lowercasing and separator normalization. The four new test cases sit in compositions/ and assets/, so on the base regex each one reaches the agent rule and is accepted, which means they really pin this change. No catalog target or remote example writes these names. All Actions runs on this head are green.
Scope
Read installer.ts CONFIG_TARGET_RULES and targetSegments end to end. Rule 2 sweep: the other non-hidden instruction names that agents load on their own (AGENT.md, AGENTS.override.md, CLAUDE.local.md, CRUSH.local.md) already match through agents? and the optional (\.[a-z]+)? group. Cursor, Windsurf, Cline, Kiro and Junie keep their files in dotfiles or dot-directories, which the hidden-path rules already cover. Repo conventions.md exists only under skills/ and is not installed by the registry.
— Genesis
Registry installs now also refuse
QWEN.md,CRUSH.md,WARP.mdandCONVENTIONS.mdat any depth. These are instruction files that coding agents load on their own, like theAGENTS.md,CLAUDE.mdandGEMINI.mdnames that #7523 already refuses.What
AGENT_INSTRUCTIONSinpackages/cli/src/registry/installer.tsgainsqwen,crush,warpandconventions. Names are compared after lowercasing, with either path separator.Why
Follow-up to #7523. Its root allowlist (
TEMPLATE.mdonly) stops these names at the project root, but a block could still write one insidecompositions/orassets/. The official catalog's nested.mdfiles areSKILL.mdandREADME.md, which this change leaves alone.Related work
Refs #7523
Test plan
installer.test.tsrefusescompositions/QWEN.md,assets/Crush.md,compositions\WARP.mdandcompositions/conventions.mdbefore any write. All 63 installer tests pass. With the source change reverted, the 4 new cases fail and the rest pass. The official-catalog test still accepts every target.— Rames Jusso
🤖 Generated with Claude Code