What does Contracts contain?

Each Contracts entry is a verifiable assertion, associated with a threshold, that can be evaluated without human judgment. This criterion — automatable verifiability — defines what belongs to Contracts rather than Intent or Knowledge.

Engineering

Quality gates · Mutation scoring rules · Code coverage thresholds · Definition of Done · Security policies · Performance SLAs · Review & merge rules

Product

Acceptance criteria linked to specs · Product metric thresholds (conversion, retention, activation) · A/B significance thresholds · Feature flag rules

UX

Design system compliance (tokens, components, patterns) · Accessibility standards (WCAG target level) · Core Web Vitals thresholds · User validation criteria

Data

Completeness (acceptable missing data rates) · Freshness (pipeline latency SLA) · Accuracy (schema validation rules) · Traceability (data lineage requirements)


The fundamental invariant


Humans vs AI Agents

Human

Defines contracts by domain, evolves thresholds as product matures, arbitrates exceptions.

AI Agent

Validates its own output before proposing a merge, self-corrects when a contract is not met, executes the verification tools.

Asymmetry: definition vs. compliance.


Consumption modes

System Prompt

All verifiable assertions (always applicable) go in the system prompt.

Skills / MCP

Verification tools (run tests, check accessibility, validate schema) are exposed as MCP Skills.


Extension vs. exception vs. override

Three situations arise when a lower-level contract touches the same scope as a parent contract:

Extension: adds assertions on a scope not covered by the parent. Always allowed, no validation required.

Exception: explicitly deviates from a parent assertion, with exception-to set and exception-approved-by validated by the parent level owner.

Undeclared override: contradicts a parent assertion without exception-to. Detected by the Context Assembler, blocked, and flagged.


Contracts artifact structure

contracts/engineering/search-indexation-sla.md YAML + Markdown
---
register: contracts
level: team
owner: tech-lead
status: active
consumption-mode: system-prompt
last-validated: 2026-06-03
exception-to: null
exception-approved-by: null
---

# Contract — Search Indexation SLA

## Performance
- P95 results page (standard query): ≤ 200ms
- P95 bulk writer (Elasticsearch flush): ≤ 80ms
- Kafka consumer lag: alert threshold 5,000 messages

## Quality gate
- Mutation score ≥ 80% on indexation pipeline
- No synchronous catalogue write to Elasticsearch (see Intent/directives/event-driven)

## Verification tools
- performance-test.mcp: run load test, return P95 metrics
- mutation-score.mcp: run mutation testing, return score

Artifact with declared exception

contracts/engineering/search-boosting-exception.md YAML + Markdown
---
register: contracts
level: team
owner: tech-lead
status: active
exception-to: org/contracts/performance.md
exception-approved-by: bu-digital-quality-lead
exception-approved-date: 2026-05-28
---

# Contract — Search Boosting Exception

## Scope
Multi-criteria boosting queries only (relevance score computation > 3 factors).

## Exception
P95 threshold for boosted queries: ≤ 350ms (vs 200ms org standard).

## Justification
Relevance precision > 0.75 drives 3.4x higher conversion.
Accepted trade-off: latency for relevance on complex queries.