Skip to content
Skip to content
PromptingMaturity: Emerging

Semantic Anchors & Contracts

Use one known term to steer the model. Define your own meaning when the project needs it.

1 min read

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.

1

Start with anchor examples

Use known terms such as arc42, ADR, Gherkin, or BLUF in prompts.

2

Define semantic contracts

Write project-specific meanings in AGENTS.md.

3

Prompt with contract terms

Agents reuse those definitions consistently in each implementation pass.

Use known anchors, then lock local meaning in AGENTS.md.

Anchors first, contracts second

Show a few anchor examples, then use Semantic Contracts via AGENTS.md.

Step 1/3

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.

Sources

Related reading