Overview
The Trinity Bridge Coordinator is an L3 agent operating in the general domain of the Prismatic Platform. This agent coordinates Trinity Bridge formal verification across all AIAD components, ensuring that the platform's 552 agents, 228 commands, and 101 workflows all maintain formal verification compliance throughout their lifecycle. While the Trinity Bridge Commander focuses on theorem management and individual change verification, the Coordinator manages the logistics of verification at scale -- scheduling verification campaigns, tracking compliance status, and coordinating remediation when components fall out of compliance.
The distinction between Commander and Coordinator reflects a deliberate architectural separation of concerns. The Commander makes verification decisions (approve or reject). The Coordinator manages the verification process (what needs verification, when, and how to handle failures). This separation ensures that verification decisions are never compromised by process management pressures.
This agent is part of the platform's 434-strong autonomous agent ecosystem, operating under the NO MERCY doctrine where verification compliance is mandatory and non-negotiable.
Coordination Scope
The Trinity Bridge Coordinator manages verification across the entire AIAD component inventory.
| Component Type | Count | Verification Frequency | Current Compliance |
|---|---|---|---|
| Agents | 434 | Per-change + weekly sweep | 100% |
| Commands | 210 | Per-change + bi-weekly sweep | 100% |
| Workflows | 101 | Per-change + monthly sweep | 100% |
| Policies | 45 | Per-change + monthly sweep | 100% |
| Pipelines | 38 | Per-change + bi-weekly sweep | 100% |
| Adapters | 22 | Per-change + weekly sweep | 100% |
Verification Campaign Management
The coordinator plans and executes verification campaigns -- systematic sweeps that ensure all components remain formally verified.
defmodule PrismaticAgents.TrinityBridgeCoordinator do
@moduledoc """
L3 Trinity Bridge Coordinator.
Coordinates formal verification across all AIAD components.
"""
use GenServer
require Logger
@campaign_check_interval_ms :timer.hours(6)
defstruct [
:component_registry,
:active_campaigns,
:compliance_status,
:remediation_queue,
:last_campaign_at,
status: :coordinating
]
@spec start_link(keyword()) :: GenServer.on_start()
def start_link(opts \\ []) do
GenServer.start_link(__MODULE__, opts, name: __MODULE__)
end
@impl true
def init(_opts) do
registry = discover_all_components()
schedule_campaign_check()
{:ok, %__MODULE__{component_registry: registry, active_campaigns: []}}
end
@impl true
def handle_info(:campaign_check, state) do
due_components = identify_due_verifications(state.component_registry)
campaign = plan_verification_campaign(due_components)
results = execute_campaign(campaign)
non_compliant = Enum.filter(results, fn {_, status} -> status != :compliant end)
:telemetry.execute(
[:prismatic, :agents, :trinity_coordinator, :campaign],
%{verified: length(results), non_compliant: length(non_compliant)},
%{campaign_id: campaign.id}
)
schedule_campaign_check()
{:noreply, %{state |
compliance_status: results,
remediation_queue: non_compliant,
last_campaign_at: DateTime.utc_now()
}}
end
defp execute_campaign(campaign) do
campaign.components
|> Task.async_stream(
fn component ->
result = PrismaticAgents.TrinityBridgeCommander.verify_change(%{
type: :compliance_check,
component: component,
scope: :full
})
{component.id, result}
end,
max_concurrency: 8,
timeout: :timer.minutes(5)
)
|> Enum.map(fn
{:ok, result} -> result
{:exit, _} -> {:unknown, :timeout}
end)
end
endCampaign Types
| Campaign | Scope | Frequency | Duration | Priority |
|---|---|---|---|---|
| Agent Sweep | All 552 agents | Weekly | 2-4 hours | High |
| Command Sweep | All 210 commands | Bi-weekly | 1-2 hours | Medium |
| Workflow Sweep | All 101 workflows | Monthly | 1-3 hours | Medium |
| Full Platform | All AIAD components | Monthly | 8-12 hours | Critical |
| Targeted | Specific components by domain | On-demand | 15-60 min | Variable |
| Post-Change | Recently modified components | Continuous | Minutes | Critical |
Remediation Process
When a component fails verification, the coordinator initiates a structured remediation process.
| Step | Action | Timeline | Escalation |
|---|---|---|---|
| 1. Detection | Verification failure recorded | Immediate | Auto-logged |
| 2. Classification | Failure severity assessed | < 5 minutes | None |
| 3. Notification | Responsible agent notified | < 10 minutes | Domain coordinator |
| 4. Remediation | Fix applied and re-verified | < 1 hour (P0-P1) | Strategic Command |
| 5. Validation | Re-run full verification | < 15 minutes | None |
| 6. Closure | Compliance restored, audit recorded | Immediate | None |
Compliance Dashboard
The coordinator maintains a real-time compliance dashboard that provides visibility into the verification status of all platform components. This dashboard is accessible through the platform's LiveView monitoring interface and provides drill-down capabilities from platform-wide compliance summaries to individual component verification histories.
| Dashboard Metric | Visualization | Update Frequency |
|---|---|---|
| Overall Compliance | Percentage gauge | Real-time |
| Per-Component Type | Stacked bar chart | Every 5 minutes |
| Campaign History | Timeline view | After each campaign |
| Remediation Queue | Priority-sorted list | Real-time |
| Verification Latency | Histogram | Per campaign |
| Trend Analysis | Time-series chart | Daily aggregation |
| Component Health Map | Heat map by domain | Every 15 minutes |
Scheduling Algorithm
The Trinity Bridge Coordinator employs an intelligent scheduling algorithm that balances verification thoroughness against resource consumption. Rather than verifying all 850+ components in every cycle, the scheduler prioritizes components based on change recency, criticality, and time since last verification.
defmodule PrismaticAgents.TrinityBridgeCoordinator.Scheduler do
@moduledoc """
Intelligent verification scheduling for Trinity Bridge campaigns.
Prioritizes components by change recency, criticality, and verification age.
"""
@spec schedule_next_batch(list(map()), non_neg_integer()) :: list(map())
def schedule_next_batch(components, batch_size) do
components
|> Enum.map(&calculate_verification_priority/1)
|> Enum.sort_by(& &1.priority, :desc)
|> Enum.take(batch_size)
end
defp calculate_verification_priority(component) do
change_score = if component.recently_changed, do: 50, else: 0
criticality_score = criticality_weight(component.type) * 30
age_score = min(days_since_verification(component) * 2, 20)
%{component | priority: change_score + criticality_score + age_score}
end
defp criticality_weight(:agent), do: 1.0
defp criticality_weight(:pipeline), do: 0.9
defp criticality_weight(:command), do: 0.7
defp criticality_weight(:workflow), do: 0.6
defp criticality_weight(:policy), do: 0.5
defp criticality_weight(:adapter), do: 0.8
defp criticality_weight(_), do: 0.5
end| Priority Factor | Weight | Rationale |
|---|---|---|
| Recently Changed | 50 points | Changed components are most likely to have verification issues |
| Component Criticality | 0-30 points | Agents and adapters are higher priority than workflows |
| Verification Age | 0-20 points | Components not verified recently accumulate priority debt |
| Previous Failures | +20 points bonus | Components with recent failures get expedited re-verification |
Historical Compliance Tracking
The coordinator maintains a complete history of verification results, enabling trend analysis and identification of components that are prone to recurring compliance issues. This historical data feeds into the platform's quality evolution metrics and informs strategic decisions about which areas of the codebase require architectural attention.
| Historical Metric | Retention | Granularity | Use Case |
|---|---|---|---|
| Campaign Results | 365 days | Per-campaign | Trend analysis |
| Component History | Indefinite | Per-verification | Recurring issue detection |
| Remediation Timelines | 90 days | Per-remediation | SLA tracking |
| Failure Patterns | 180 days | Per-failure-type | Root cause analysis |
Operational Metrics
| Metric | Target | Current |
|---|---|---|
| Platform compliance rate | 100% | 100% |
| Campaign completion rate | 100% | 100% |
| Remediation SLA (P0) | < 1 hour | 23 minutes avg |
| Verification throughput | 50+ components/hour | 62 components/hour |
| False positive rate | 0% | 0% |
Integration Points
- Trinity Gate -- Core verification infrastructure
- Quality Gates -- Verification feeds quality scoring
- Telemetry Integration -- Campaign and compliance metrics
- AIAD Standard -- Component discovery and compliance tracking
Resource Management
Verification campaigns consume computational resources, particularly for Layer 3 (Formal) verification which involves Lean4 proof search. The Trinity Bridge Coordinator manages these resources carefully to avoid impacting developer productivity or production system performance during verification sweeps.
| Resource | Campaign Budget | Mitigation Strategy |
|---|---|---|
| CPU | Max 25% of available cores during campaigns | Off-peak scheduling, priority throttling |
| Memory | Max 2 GB per concurrent verification | Proof cache to reduce redundant computation |
| I/O | Rate-limited file system access | Batched file reads, memory-mapped caching |
| Network | Minimal (local verification only) | No external calls during verification |
| Time | Campaign max duration enforced | Timeout per component, campaign-level timeout |
The coordinator preferentially schedules large verification campaigns during off-peak hours (nights and weekends) to minimize impact on developer workflows. Critical post-change verifications run immediately regardless of timing, but are scoped to only the affected components rather than full sweeps.
AIAD Specification Compliance
| AIAD Component | Status |
|---|---|
| Agent specification file | Compliant |
| Behavioral rules | 14 rules defined |
| Telemetry integration | Full coverage |
| NM/ND doctrine enforcement | Active |
| SEADF integration | Registered |
Related Agents
- Trinity Bridge Commander -- Verification decision authority
- Trinity Integration Coordinator -- Integration of Trinity into platform workflows
- Societies Quality Feedback Coordinator -- Cross-domain quality feedback
Authority Level
L3 - Strategic Command - Multi-domain coordination with authority to schedule verification campaigns and enforce compliance remediation across all AIAD components.
Connect & Contribute
Created by Tomáš Korcak (korczis) | Open Source under GHL