How does CLAUDE.md "anchoring" work in practice?
Categories:
Claude — Prompt Engineering
Anchoring = the model treats CLAUDE.md as ground truth and refers back to it when in doubt. The trick is to make the rules specific and negative: "Do not edit anything under vendor/. Do not use ObjectManager outside Setup/ or Test/. Do not write raw SQL — use db_schema.xml. Plugins beat preferences. Service contracts beat direct model access." Vague rules ("write clean code") get ignored; concrete prohibitions get followed. End every CLAUDE.md with a 5-line "DEFINITION OF DONE" checklist — the model will tick it off in its own response and you can verify visually.
Was this helpful?