Most frontier LLMs (GPT-4, Claude, Gemini) already have semantic anchors in their training data — saying "TDD, London School" or "Clean Architecture" is enough to activate the right concepts.
However, local or smaller LLMs (Llama, Mistral, Phi, etc.) may not recognize all anchors reliably. For these models, you can inject explicit anchor definitions into your project’s agent instruction files. This ensures consistent behavior regardless of the model’s training data.
For the widest compatibility, install anchors into a project-level AGENTS.md first, then add agent-specific mirrors only where the official docs say they help.
Use the bundled installer to inject a managed anchor block into the best available project instruction file. If none exists yet, it creates AGENTS.md.
First, copy the template and fill in your chosen anchors:
cp skill/semantic-anchor-onboarding/assets/templates/anchor-block.md my-anchors.md
# Edit my-anchors.md — replace {{PRIMARY_ANCHOR_*}} / {{PRIMARY_EXPLAINER_*}} placeholdersThen run the installer:
./skill/semantic-anchor-onboarding/scripts/install.sh \
--source my-anchors.md \
--target-dir . \
--scope projectCodex supports AGENTS.md for repository instructions.
-
Keep shared semantic anchors in
AGENTS.md. -
Use this as the canonical file when you want the same anchors to work across multiple agents.
Claude Code uses CLAUDE.md for project memory and also supports hooks.
-
Static Context: Mirror the same anchor block into
CLAUDE.mdif Claude Code is a target. -
Optional Hook: If you want Claude to re-inject the managed block at session start, run:
./skill/semantic-anchor-onboarding/scripts/install.sh \ --source my-anchors.md \ --target-dir . \ --scope project \ --claude-hook
Current Gemini CLI docs center on GEMINI.md and configurable context file names.
-
Native Gemini Context: Mirror your selected anchors into
GEMINI.md. -
Shared Cross-Agent Context: Set Gemini’s
context.fileNametoAGENTS.mdif you want one portable project file. -
Current Gemini CLI docs no longer describe
.gemini/skills/orgemini skills linkas the primary path for always-on instructions.
Cursor supports AGENTS.md and project rules in .cursor/rules/*.mdc.
-
Use
AGENTS.mdfor shared, repo-wide semantic anchors. -
Use
.cursor/rules/*.mdconly when you need path-scoped or feature-scoped behavior inside Cursor itself.
Copilot supports repository instruction files, and its coding agent can also consume AGENTS.md.
-
Create or update
.github/copilot-instructions.mdwhen you want the same anchors to influence Copilot chat and review flows. -
Keep
AGENTS.mdas the shared baseline if other coding agents are also in use.
Windsurf supports AGENTS.md alongside Windsurf Rules.
-
Use
AGENTS.mdfor portable project context shared with other agents. -
Use Windsurf Rules only when you need editor-specific or scoped behavior.