Semantic Anchors & Contracts
Use one known term to steer the model. Define your own meaning when the project needs it.
What it is
Semantic Anchors are public terms you can say to an LLM and expect a useful result. The term pulls in a known pattern. For example, arc42 points to an architecture template, BLUF means lead with the answer, and Gherkin points to acceptance tests.
Example anchors you can use directly
- arc42 for architecture structure
- ADR for architecture decisions
- Gherkin for acceptance criteria
- BLUF for concise executive summaries
These terms are useful immediately, even before you define any repository-specific rules.
How Semantic Contracts in AGENTS.md help
Contracts are local. They tell the team what a term means in this repository. That keeps the anchor useful and keeps the output consistent.
Put those definitions in AGENTS.md (or CLAUDE.md if that is your repo standard), then prompt
agents with those contract terms during implementation and review.
Start with anchor examples
Use known terms such as arc42, ADR, Gherkin, or BLUF in prompts.
Define semantic contracts
Write project-specific meanings in AGENTS.md.
Prompt with contract terms
Agents reuse those definitions consistently in each implementation pass.
Anchors first, contracts second
Show a few anchor examples, then use Semantic Contracts via AGENTS.md.
Step 1 — Start with concrete anchor examples
Use known terms so the model loads familiar patterns immediately.
String architecturePrompt =
"Structure this service using arc42 sections and capture major decisions as ADRs.";
String testingPrompt =
"Write acceptance criteria in Gherkin for transfer and reversal scenarios.";
String writingPrompt =
"Summarize the rollout plan with BLUF, then list risks and mitigations.";The model applies known methods without extra explanation.