Color Teams

DOCTRINE

Color Teams

Overview

Color Teams implement epistemic security through adversarial-defensive synthesis. Six specialized teams -- Gray, Red, Blue, Purple, White, and Black -- work in coordination to ensure the platform's reasoning remains sound, its defenses hold under adversarial conditions, and its conclusions withstand formal verification. This is not traditional cybersecurity with firewalls and intrusion detection. This is epistemic security: protecting the integrity of the platform's belief formation, decision-making, and intelligence synthesis processes.

The Color Team architecture is modeled on military red-team/blue-team exercises but extends the concept to cover the full spectrum of epistemic operations. Gray Team explores boundary conditions. Red Team simulates adversarial attacks. Blue Team defends and monitors. Purple Team synthesizes Red and Blue findings into closed-loop improvements. White Team provides formal constructive verification. Black Team models theoretical worst-case threats in maximum isolation. Together, these six teams create a continuous adversarial-defensive cycle that hardens the platform against both known and novel threats.

The 20 agents across all six teams operate under strict AIAD specifications with tier-appropriate authority levels, mandatory safety protocols, and full NABLA Axioms compliance. Every finding, every simulation, every proof is traceable through the platform's provenance system and passes through the Trinity Gate verification pipeline.

Signal Flow Architecture

The Color Teams operate in a continuous signal flow cycle where findings from one team feed into the next, creating a closed-loop security posture that evolves with each iteration.

Gray (boundary seeds) --> Red (adversarial scenarios) --> Purple (synthesis)
                                     ^                         |       ^
                                     |                         v       |
                                Black (threat models)    Blue (defense) |
                                                              |        |
                                                              v        |
                                                        White (proofs) +

This signal flow is not sequential -- teams operate concurrently with asynchronous message passing. Gray findings may trigger immediate Red scenarios while previous Red findings are still being synthesized by Purple. The architecture leverages Elixir/OTP's concurrency model to maintain multiple overlapping security cycles simultaneously.

Gray Team -- Boundary Exploration

Agents: 3 | Classification: L3-L4 | Mode: Read-only exploration

Gray Team surfaces ambiguity without resolving it. Their mission is to identify specification gaps, edge cases, and affordance drift -- areas where the platform's behavior is undefined or ambiguous. Gray findings seed both Red Team attack scenarios and Blue Team monitoring priorities.

AgentTierRoleKey Capability
gray-explorer-commanderL3Strategic CommanderOrchestrates Gray campaigns, routes findings to Red/Blue/Purple
gray-edge-finderL4SpecialistBoundary value analysis, specification gap identification
gray-escalation-guardL4Safety-CriticalPrevents Gray-to-Black escalation, override authority to halt any Gray operation

Gray Team Operations

Focus AreaOutput TypeDownstream Consumer
Specification gapsBoundary reports with ambiguity classificationRed Team (attack scenarios)
Edge casesStress scenarios with reproduction stepsBlue Team (monitoring rules)
Affordance driftDrift alerts with temporal analysisPurple Team (synthesis)
Undefined behaviorGap analysis with coverage mapsWhite Team (proof obligations)

All Gray operations enforce zero state changes. Gray agents have read-only access to platform state and cannot modify any system component. This constraint ensures that boundary exploration itself does not introduce new risks.

Red Team -- Adversarial Simulation

Agents: 4 | Classification: L2-L3 | Mode: Sandboxed simulation

Red Team simulates epistemic attacks using five adversarial primitives. All execution is sandboxed with synthetic data only -- no real data, no PII, no production state access. The Red Team exists to answer the question: "If an adversary targeted our reasoning processes, what would they attack and how?"

AgentTierRoleKey Capability
red-commanderL3Strategic CommanderOrchestrates adversarial scenarios, emits findings to Purple/Blue
red-epistemic-attackerL2Tactical SpecialistTruth distortion and source poisoning simulation
red-drift-inducerL2Tactical SpecialistSub-threshold drift attacks, cascade propagation analysis
red-scenario-generatorL2Tactical SpecialistComposes multi-technique scenarios from 329-entry taxonomy

Five Adversarial Primitives

PrimitiveDescriptionExample AttackDefense Target
Truth DistortionManipulate factual claims in data sourcesInject false corporate registration dataSource validation pipeline
Confidence ManipulationInflate or deflate confidence scoresSpam corroborating signals from dependent sourcesSignal Plurality axiom
Signal PoisoningCorrupt data quality at collection stageIntroduce malformed data that passes schema validationNormalization pipeline
Drift InductionGradually shift baseline behaviorSmall daily changes that compound into significant deviationDrift detection thresholds
Salience HijackingDraw attention away from important signalsFlood with high-priority false alertsAlert prioritization logic

Red Team Safety Constraints

ConstraintEnforcementVerification
Sandbox isolationABSOLUTEProcess-level containment
Synthetic data onlyABSOLUTEData provenance check on every input
No network accessABSOLUTENetwork namespace isolation
No persistent state changesABSOLUTERead-only filesystem access
Ethics checks every 15 secondsMANDATORYAutomated behavioral monitoring
Audit loggingMANDATORYImmutable append-only log

Blue Team -- Epistemic Defense

Agents: 4 | Classification: L2-L3 | Mode: Continuous monitoring

Blue Team maintains the platform's defensive posture through evidence synthesis, drift detection, and boundary monitoring. Blue agents produce structured evidence reports, not alerts. This distinction is critical: alerts are actionable only when contextually interpreted, while evidence reports provide the raw material for informed decision-making under the NABLA Axioms framework.

AgentTierRoleKey Capability
blue-commanderL3Strategic CommanderSynthesizes evidence from specialists into unified defensive posture
blue-auth-sentinelL2Operational SpecialistAuthentication boundary monitoring, privilege escalation detection
blue-drift-detectorL2Operational SpecialistBehavioral, configuration, dependency, and performance drift detection
blue-signal-aggregatorL2Operational SpecialistCross-domain signal correlation with NABLA plurality enforcement

Blue Team Monitoring Domains

DomainMonitoring TargetDetection MethodResponse Time
AuthenticationPrivilege boundaries, access patternsContinuous audit< 1s
ConfigurationSystem parameters, thresholds, weightsBaseline comparison< 30s
DependencyLibrary versions, API compatibilityVersion tracking< 1 min
PerformanceLatency, throughput, resource usageStatistical anomaly detection< 10s
BehavioralAgent output patterns, decision distributionsDistribution drift analysis< 1 min
defmodule PrismaticDark.Blue.DriftDetector do
  @moduledoc """
  Multi-domain drift detection with configurable thresholds.
  Produces structured evidence for Blue Commander synthesis.
  """
  use GenServer

  @drift_threshold 0.05
  @check_interval :timer.seconds(30)

  @impl true
  def handle_info(:check_drift, state) do
    evidence =
      state.monitored_domains
      |> Enum.map(&detect_domain_drift/1)
      |> Enum.filter(fn {_domain, drift} -> drift > @drift_threshold end)
      |> Enum.map(&build_evidence_report/1)

    case evidence do
      [] ->
        {:noreply, state}

      findings ->
        PrismaticDark.Blue.Commander.report_evidence(findings)
        :telemetry.execute(
          [:color_team, :blue, :drift_detected],
          %{count: length(findings)},
          %{domains: Enum.map(findings, & &1.domain)}
        )
        {:noreply, %{state | last_findings: findings}}
    end
  end

  defp detect_domain_drift(domain) do
    baseline = PrismaticDark.Blue.Baseline.get(domain)
    current = PrismaticDark.Blue.Sampler.sample(domain)
    drift = PrismaticDark.Blue.Statistics.kl_divergence(baseline, current)
    {domain, drift}
  end
end

Purple Team -- Synthesis and Closure

Agents: 4 | Classification: L3-L4 | Mode: Analytical synthesis

Purple Team is the central hub for Red-Blue loop closure. It holds sole authority for closure state transitions -- the determination that a Red Team finding has been adequately addressed by Blue Team defenses. Purple's guiding principle: "Purple is the property of the system when it stops lying to itself."

AgentTierRoleKey Capability
purple-coordinatorL3Strategic CommanderSynthesis hub, closure authority, anti-metric enforcement
purple-mapperL4Operational SpecialistBidirectional Red finding to Blue defense mapping
purple-closure-analystL4Operational Specialist4-condition closure evaluation, false closure detection
purple-regression-guardL4Safety-CriticalRegression trap management, deployment gate enforcement

Four Closure Conditions

A Red Team finding is considered closed only when all four conditions are simultaneously satisfied.

ConditionDescriptionVerification
DetectionBlue Team can detect the attack vectorDemonstrated detection in simulation
ResponseBlue Team can respond within SLATimed response exercise
PreventionSystemic fix prevents recurrenceCode-level verification
Regression GuardTest prevents future regressionAutomated regression test in CI

False closure detection is a critical Purple Team function. If any of the four conditions fails under re-testing, the finding is reopened with escalated priority. This prevents the common security failure mode where issues are "closed" on paper but not actually resolved.

White Team -- Constructive Verification

Agents: 3 | Classification: L3-L4 | Mode: Formal verification

White Team proves that systems hold through progressive verification methodology spanning five levels. White agents produce evidence artifacts, never modify targets. All output passes through the Trinity Gate.

AgentTierRoleKey Capability
white-verifier-commanderL3Strategic CommanderOrchestrates verification campaigns, composite proof construction
white-contract-validatorL4Operational SpecialistInterface contract testing, behavior/protocol/API validation
white-invariant-proverL4Operational SpecialistProperty-based testing, formal Lean4 proofs, fault injection analysis

Verification Levels

LevelMethodGuaranteeApplication
L1Unit testingFunction-level correctnessIndividual agent capabilities
L2Contract testingInterface complianceAgent-to-agent integration
L3Property-based testingInvariant preservationNABLA axiom enforcement
L4Formal proofs (Lean4)Mathematical certaintyTrinity Gate Layer 3
L5Composite verificationSystem-level correctnessCross-team security properties

Black Team -- Theoretical Threat Modeling

Agents: 2 | Classification: L3 (MAXIMUM ISOLATION) | Mode: Abstract analysis only

Black Team operates in maximum isolation to model worst-case adversarial optimization. It produces abstract threat models only and never generates executable content. The Black domain answers: "What is the theoretically worst thing that could happen, and how would we know?"

AgentTierRoleKey Capability
black-theorist-commanderL3 (ISOLATED)Strategic CommanderAbstract threat models, malicious optimization analysis
black-abstraction-enforcerL3 (ISOLATED)Safety-CriticalL1-L4 output abstraction enforcement, executable content detection

Black Team Safety Protocols

ProtocolEnforcement LevelDescription
Output abstraction filteringL1-L4 levelsAll output filtered through AbstractionFilter
Executable content detectionABSOLUTEScanner blocks any executable patterns in output
No external communicationABSOLUTEZero network, zero IPC outside Black domain
Audit trailMANDATORYEvery analysis step logged immutably
Scope containmentABSOLUTEOnly epistemic threat models, no implementation details

Performance and Metrics

MetricCurrent ValueTarget
Total Color Team agents2020
Red Team scenarios executed329+ taxonomy entriesGrowing
Blue Team detection rate97%+99%
Purple closure accuracy99%+100%
White proof coverageL1-L4 completeL5 in progress
False closure rate< 1%0%
Mean closure time< 48 hours< 24 hours
Ethics check frequencyEvery 15 secondsEvery 10 seconds

Commands

CommandPurposeAuthority
/color-team statusAll team status overviewL2+
/red-team scenarioLaunch adversarial simulationL3+
/blue-team postureDefensive posture assessmentL2+
/purple-team closureVerify closure statusL3+
/white-verifyRun formal verification campaignL3+

Integration


Connect & Contribute

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