Agentic AI
AI Judges for Architecture: How Agentic Fitness Functions Fill the Gap Between Rules and Human Review
Evolutionary architecture gets a new tool: AI agents that can make judgment calls on architectural concerns that defy simple automation, while keeping deterministic checks in charge of objective rules.
InfoQ
The Problem with Rules Alone#
Evolutionary architecture relies on fitness functions—continuous checks that turn architectural intent into executable feedback—to keep systems safe as they change. Yet many architectural concerns resist automation. A dependency rule can detect when one service calls another, but it cannot tell whether that call is intentional collaboration or the start of boundary erosion. A schema validator can confirm that an API remains backward compatible, but it cannot judge whether the interface still honors domain concepts or has drifted into leaking implementation details.
These are not edge cases; they are the normal way architecture decays—through individually sound changes that pass every written rule while silently moving implementations away from their intended design. Historically, architects caught this decay through manual code review. But that approach does not scale to continuous delivery, smaller pull requests, AI-generated code, and architectural decisions that now appear inside traces and contract diffs.
Agentic Fitness Functions: Structured Judgment, Not Oracles#
An agentic fitness function brings a calibrated AI agent into the governance workflow. Unlike deterministic checks (compilers, linters, schema validators), which either block or allow deployment, agentic functions operate as advisors. They evaluate evidence-bound but judgment-heavy concerns—boundary fidelity, semantic drift, stale architectural assumptions—against versioned rubrics and return structured verdicts: a score, confidence level, violated criteria, reasoning, and escalation guidance.
The design separates responsibility: deterministic gates protect objective invariants (dependency direction, latency budgets, security policy); agentic judges assess interpretation-heavy risks on a scoped evidence pack (a pull request diff, relevant ADRs, ownership metadata, small trace windows). Low-confidence outcomes, disagreement between judges, or ambiguous trade-offs escalate to humans.
Anatomy of a Production-Ready Implementation#
A working system has four components:
- Fitness-function intent: The specific architectural concern to protect (e.g., boundary fidelity, contract semantics, ADR validity)
- Evidence contract: A limited set of artifacts the judge inspects (PR diff, API spec, relevant ADRs, ownership data, deterministic-check output)

