Menu
InfoQ Architecture·August 17, 2026

Agentic Fitness Functions for Evolving Architectural Governance

This article introduces agentic fitness functions, an extension to evolutionary architecture that uses calibrated AI agents to evaluate architectural concerns that are judgment-heavy and evidence-bound but not easily reducible to deterministic rules. They complement traditional deterministic fitness functions by providing continuous feedback on nuanced architectural aspects like boundary fidelity and semantic contract drift. The goal is to make architectural judgment more observable, auditable, and eventually convertible into automated guardrails.

Read original on InfoQ Architecture

Introduction to Evolutionary Architecture and Fitness Functions

Evolutionary architecture advocates for treating architecture as an evolving system of decisions rather than a fixed target state. This approach enables continuous change without eroding critical architectural characteristics. Fitness functions are the core mechanism, converting architectural intent into executable, continuous feedback. These functions traditionally enforce measurable invariants such as dependency direction, contract shapes, latency budgets, and security policies through deterministic checks.

The Limitations of Deterministic Fitness Functions

While essential, deterministic fitness functions can only protect what can be expressed as a clear rule, threshold, schema, or metric. Many architectural concerns involve nuanced judgment that cannot be fully automated this way. Examples include determining if a new service interaction represents intentional collaboration or accidental coupling, or if a schema change preserves semantic meaning versus leaking UI concerns. These 'judgment-heavy' concerns often lead to architectural decay through individually reasonable changes that bypass simple rules.

Introducing Agentic Fitness Functions

Agentic fitness functions extend evolutionary architecture into this gray area between deterministic automation and manual architectural review. They employ calibrated AI agents to evaluate bounded evidence against an analytic rubric, producing a structured verdict with a score, confidence level, rationale, and escalation guidance. They are designed to make formerly manual architectural judgments repeatable and auditable, supplementing rather than replacing deterministic checks.

ℹ️

Agentic vs. Deterministic

Deterministic gates block deployment for clear violations (e.g., compiler errors, SLO breaches). Agentic functions typically start as advisory signals, gaining influence as calibration proves their precision and recall. Low confidence or high blast radius outcomes should always escalate to human review.

Anatomy of a Production-Ready Agentic Fitness Function

A robust agentic fitness function consists of four key parts:

  1. Fitness-Function Intent: The specific architectural concern to protect (e.g., boundary fidelity, semantic contract integrity).
  2. Evidence Contract: The limited set of artifacts the agent can inspect (e.g., PR diff, API spec, ADRs, ownership metadata).
  3. Agentic Judge: A calibrated AI agent applying an analytic rubric to the evidence.
  4. Structured Verdict: A machine-readable result including score, confidence, violated criteria, rationale, and recommended action.
json
{
  "fitness_function": "checkout-boundary-fidelity",
  "rubric_version": "2026.07.01",
  "score": 0.68,
  "confidence": 0.74,
  "decision": "advisory_warn",
  "violated_criteria": [
    "semantic coupling"
  ],
  "evidence": [
    "ADR-014",
    "OrderEvent.diff",
    "PaymentSession DTO"
  ],
  "recommended_action": "Move PaymentSession behind a checkout-owned adapter or create an explicit shared-kernel ADR.",
  "deterministic_rule_candidate": "Disallow public events from exporting internal payment-state DTOs."
}

Calibration is crucial, involving testing against prior changes classified by human architects and continuous tuning of the rubric. Controls are necessary to prevent issues like position bias, verbosity bias, reward hacking, and prompt injection.

evolutionary architecturearchitectural governanceAI agentsfitness functionscontinuous feedbackarchitectural driftautomationmicroservices architecture

Comments

Loading comments...