AIAD Compliance

DOCTRINE

AIAD Compliance

Overview

Autonomous Intelligence Agent Design (AIAD) Compliance is the enforcement backbone of the Prismatic Platform's agent ecosystem. Every agent, command, pipeline, and policy artifact must conform to a rigorous specification format before it can be indexed, deployed, or invoked. With over 400 agents operating across 14 functional domains, compliance is not aspirational guidance -- it is a hard gate that blocks non-conforming components from entering the platform.

The compliance framework addresses a fundamental challenge in large-scale multi-agent systems: how to maintain coherent interoperability, auditable behavior, and verifiable quality when hundreds of autonomous components evolve independently. Without enforceable standards, agent ecosystems degrade into collections of incompatible, untestable, and unauditable tools. AIAD Compliance prevents this by binding every agent to a machine-readable contract that specifies its capabilities, authority boundaries, integration points, and doctrine obligations.

AIAD Compliance is not merely a documentation standard. It is an enforceable contract system that binds agents to behavioral guarantees. An agent that declares specific capabilities in its AIAD specification is tested against those capabilities. An agent that declares NO MERCY compliance has its outputs verified against zero-tolerance quality requirements. This contract-based approach transforms the agent ecosystem from a collection of independent tools into a verifiable, composable, and self-auditing intelligence infrastructure integrated with the Trinity Gate verification pipeline.

Core Architecture

The AIAD Compliance system operates through three interconnected layers: specification validation, runtime enforcement, and continuous auditing. Each layer addresses a different temporal scope of compliance -- definition time, execution time, and ongoing operational time.

Specification Layer

At the specification layer, every agent is defined in a .agent.md file following a strict YAML-frontmatter schema. The schema enforces structural completeness before an agent can be indexed.

ComponentRequirementEnforcementDescription
agent-spec headerVersion, name, authority levelMANDATORYUnique identifier and version tracking
classificationAgent tier (L1-L4)MANDATORYDetermines authority and capability scope
Doctrine enforcementNM/ND compliance blockMANDATORYBinds agent to quality doctrine
Capability matrixDefined capabilities with metricsMANDATORYTestable capability declarations
Integration pointsConnection to other agentsREQUIREDInteroperability contracts
Quality gatesValidation criteriaREQUIREDAcceptance testing criteria
Security classificationAccess and isolation levelREQUIREDData handling and sandbox requirements
Telemetry eventsEmitted telemetry eventsRECOMMENDEDObservability integration

Runtime Enforcement Layer

During execution, agents are monitored against their declared capabilities. If an agent declares a P95 latency of 200ms for a given capability, the platform's telemetry system tracks actual performance and flags violations. This moves compliance from a static check to a living contract.

Continuous Audit Layer

The audit layer performs daily and on-demand compliance scans across the entire agent registry. Cross-reference integrity, version compatibility, and doctrine adherence are verified automatically. Results feed into the Quality Gates pipeline and contribute to the platform's overall quality score.

Agent Specification Format

Every AIAD agent definition follows a standardized YAML schema that enables machine parsing, automated validation, and registry indexing.

agent-spec:
  name: "blue-drift-detector"
  version: "2.1.0"
  classification: L2-Operational-Specialist
  domain: epistemic-defense
  authority: blue-commander

capabilities:
  - name: behavioral-drift-detection
    confidence: 0.92
    latency_p95_ms: 200
    test_coverage: 100%
  - name: configuration-drift-detection
    confidence: 0.95
    latency_p95_ms: 150
    test_coverage: 100%

enforcement:
  doctrine: "no-mercy-no-doubts"
  version: "2.0.0"
  compliance: mandatory

integration:
  reports_to: blue-commander
  receives_from: [telemetry-aggregator, config-monitor]
  emits_to: [blue-signal-aggregator, purple-coordinator]

quality_gates:
  - all_tests_pass
  - zero_compilation_warnings
  - dialyzer_clean
  - credo_strict_pass

The specification format is intentionally declarative. Agents declare what they can do and under what constraints, and the platform validates these declarations through automated testing. This inversion of control -- where the platform verifies agent claims rather than trusting self-reporting -- is fundamental to maintaining ecosystem integrity at scale.

Compliance Levels

Not all agents achieve full compliance simultaneously. The platform recognizes three compliance tiers to allow progressive adoption while maintaining minimum quality standards.

LevelDescriptionRequirementsAgent CountDeployment
FullComplete AIAD complianceAll components present and validated380+Unrestricted
PartialCore components presentSpec header + doctrine + capabilities40+Limited scope
Non-CompliantMissing required componentsBLOCKED from deployment0 (enforced)Blocked

The enforcement model ensures zero non-compliant agents reach production. Partial compliance is permitted during development and migration phases but carries scope restrictions -- partially compliant agents cannot participate in cross-domain operations or handle security-sensitive data.

Agent Tier System

The AIAD tier system defines escalating levels of authority, capability scope, and responsibility. Tiers are not arbitrary labels; they determine what an agent can invoke, what data it can access, and what operations it can authorize.

TierRoleAuthorityCapabilitiesExample Agents
L1 - TacticalSingle-task executionLimited to own domainSingle paradigm, no cross-agent callsData extractors, formatters
L2 - OperationalMulti-task coordinationCross-agent communicationDual paradigm, peer messagingBlue Team specialists, OSINT collectors
L3 - StrategicCampaign orchestrationCommand authority over L1-L2Full multi-paradigm, delegationTeam commanders, coordinators
L4 - SpecialistDeep domain expertiseSafety-critical overrideDomain-deep, override authorityEscalation guards, invariant provers

Tier Governance Rules

Tier governance prevents authority bypass and maintains the chain of command.

RuleEnforcementRationale
L1 cannot invoke L3 directlyHARDPrevents authority bypass
L3 commands route through chainHARDMaintains command structure
L4 safety-critical overridesHARDSafety always takes precedence
Cross-domain requires L3+HARDDomain isolation enforcement
Tier escalation requires reviewHARDPrevents privilege creep

Agent Registry

The Agent Registry maintains a live index of all AIAD-compliant agents. The registry is rebuilt automatically by the AIAD indexer and serves as the authoritative source for agent discovery, capability lookup, and compliance verification.

Registry FieldPurposeQuery Support
Agent NameUnique identifierExact match, prefix search
DomainFunctional domain (OSINT, security, epistemic, etc.)Domain filter
TierAuthority level (L1-L4)Tier filter
CapabilitiesDeclared capability listCapability search
StatusActive, deprecated, experimentalStatus filter
ComplianceAIAD compliance levelCompliance filter

Registry Operations

# Rebuild the full agent index
./.aiad/bin/aiad index

# Query agents by domain
./.aiad/bin/aiad list --domain=osint

# Verify single agent compliance
./.aiad/bin/aiad verify .aiad/agents/blue-drift-detector.agent.md

# List agents by tier
./.aiad/bin/aiad agents --tier L3

# Validate all definitions
./.aiad/bin/aiad validate

Platform Integration with Elixir/OTP

AIAD Compliance integrates deeply with the platform's Elixir runtime through a dedicated compliance checking module that validates agent specifications programmatically.

defmodule PrismaticAiad.ComplianceChecker do
  @moduledoc """
  Validates AIAD agent specifications against the standard schema.
  Enforces doctrine compliance, capability declarations, and
  integration contract validity.
  """

  @required_fields [:name, :version, :classification, :domain]
  @required_blocks [:enforcement, :capabilities, :quality_gates]

  @spec validate_agent(map()) :: {:ok, :compliant} | {:error, [violation()]}
  def validate_agent(agent_spec) do
    violations =
      []
      |> check_required_fields(agent_spec)
      |> check_required_blocks(agent_spec)
      |> check_doctrine_compliance(agent_spec)
      |> check_capability_metrics(agent_spec)
      |> check_integration_contracts(agent_spec)
      |> check_tier_authority(agent_spec)

    case violations do
      [] -> {:ok, :compliant}
      violations -> {:error, violations}
    end
  end

  defp check_doctrine_compliance(violations, %{enforcement: enforcement}) do
    case enforcement do
      %{doctrine: "no-mercy-no-doubts", compliance: "mandatory"} ->
        violations

      _ ->
        [{:doctrine, "NM/ND enforcement block missing or invalid"} | violations]
    end
  end

  defp check_capability_metrics(violations, %{capabilities: capabilities}) do
    Enum.reduce(capabilities, violations, fn cap, acc ->
      cond do
        not Map.has_key?(cap, :test_coverage) ->
          [{:capability, "#{cap.name}: missing test_coverage"} | acc]

        not Map.has_key?(cap, :confidence) ->
          [{:capability, "#{cap.name}: missing confidence score"} | acc]

        true ->
          acc
      end
    end)
  end
end

This module is invoked automatically during the AIAD indexing process, during pre-commit hooks, and as part of the CI/CD pipeline. Non-compliant agents are blocked at each stage, ensuring that violations are caught as early as possible in the development lifecycle.

Policy Enforcement Hierarchy

AIAD compliance is enforced through a hierarchy of policies that govern different aspects of agent behavior.

Doctrine Policies

PolicyScopeEnforcement
No Mercy, No DoubtsAll agentsMANDATORY -- no exceptions
Addiction PreservationEpistemic agentsMANDATORY for NABLA-integrated agents
Red Team SafetyAdversarial agentsMANDATORY -- sandbox isolation
Elixir Best PracticesAll Elixir codeMANDATORY -- OTP-first patterns
Page Load PerformanceWeb-facing agentsMANDATORY -- 250ms limit

Validation Pipeline

The validation pipeline processes agent specifications through six sequential stages. Failure at any stage blocks progression to subsequent stages.

Agent Definition --> Schema Validation --> Doctrine Check --> Capability Verify --> Integration Test --> Deploy
       |                  |                    |                   |                    |
    .agent.md        YAML schema          NM/ND block        Metrics testable     Contract tests
                     validates             present             against spec         with peers

Automated Compliance Checking

The platform performs continuous compliance verification across multiple frequencies.

CheckFrequencyFailure Action
Schema validationOn every agent file changeBlock merge
Doctrine block presentPre-commit hookBlock commit
Capability metrics testableCI pipelineBlock deployment
Integration contracts validCI pipelineBlock deployment
Cross-reference integrityDaily scanWarning + auto-fix
Runtime performanceContinuous telemetryAlert + investigation

Command Registry

Alongside agents, AIAD governs the platform's 210+ commands through the Command Registry. Commands follow the same specification-first, validation-enforced pattern as agents.

Command ComponentRequirementDescription
command-spec headerMANDATORYName, version, category
Input parametersMANDATORYTyped parameter definitions
Output specificationMANDATORYExpected output format
Authority requirementMANDATORYMinimum agent tier required
Doctrine enforcementMANDATORYNM/ND compliance block
command-spec:
  name: "/investigate"
  version: "1.5.0"
  category: intelligence
  authority: L2-Operational
  input:
    - name: target
      type: string
      required: true
    - name: depth
      type: integer
      default: 3
  output:
    format: investigation-report
    schema: investigation-report-v2

enforcement:
  doctrine: "no-mercy-no-doubts"
  compliance: mandatory

Coverage Statistics

MetricCountStatus
Total Agents404+All indexed
Full AIAD Compliance380+94%+
Commands Registered210+All documented
Domains Covered14Complete coverage
Policies Active32+All enforced
Pipelines Defined45All validated
Integration Tests5,864Comprehensive

Performance and Metrics

The compliance system itself is held to strict performance standards to avoid becoming a bottleneck in the development workflow.

MetricCurrent ValueTarget
Single agent validation< 50ms< 30ms
Full registry rebuild< 5s< 3s
Pre-commit compliance check< 2s< 1s
CI pipeline compliance stage< 30s< 20s
False positive rate< 0.1%0%
Daily audit scan< 60s< 30s

Integration

AIAD Compliance is a foundational capability that connects to virtually every other platform subsystem.


Connect & Contribute

Created by Tomáš Korcak (korczis) | Open Source under GHL