Prismatic

Prismatic

1640 files Core

Overview

Prismatic is the core component of the Prismatic Platform's umbrella architecture. As the main application with 1,640 source files, it serves as the central coordination hub for OSINT operations, investigation workflows, agent orchestration, and cross-domain intelligence fusion. Every other application in the 99-app umbrella either depends on Prismatic for foundational services or coordinates through its public API.

The application embodies the platform's core philosophy: OTP-first design with stateful processes, supervision trees for fault tolerance, and pure functions at the computational boundaries. It houses the primary Mix tasks that drive platform operations, the facade modules that external applications consume, and the coordination logic that ties the entire ecosystem together.

As the largest application in the umbrella, Prismatic bears a unique architectural responsibility. It must provide stable, well-documented public APIs that dozens of downstream applications depend on, while continuously evolving to support new intelligence capabilities and operational workflows. This tension between stability and evolution is managed through a strict facade module pattern where public APIs are versioned and backward-compatible, while internal implementation details can change freely.

Architecture

ComponentDescription
Supervision TreeOTP supervisor managing investigation workers, OSINT coordinators, and agent dispatchers
Public APIFacade modules exposing core functionality with typespec contracts
ConfigurationRuntime configuration via config/runtime.exs with environment-specific overrides
TestsComprehensive test suite with property-based testing and contract tests
Quality DNA.claude/quality-dna/current-state.json for cross-session quality tracking

Core Responsibilities

OSINT Coordination

Prismatic orchestrates open-source intelligence operations across 250+ providers with priority scheduling, deduplication, and result aggregation:

ComponentPurposeImplementation
Provider RegistryCatalog of all OSINT sourcesETS-backed with hot reload
Priority SchedulerQuery prioritization and rate managementGenServer with configurable policies
Deduplication EnginePrevents redundant queries across providersContent-hash based with TTL
Result AggregatorMerges results from parallel provider queriesNABLA-compliant confidence fusion
Rate LimiterPer-provider request throttlingToken bucket with burst allowance

The OSINT coordination layer manages the complexity of querying hundreds of intelligence sources with varying rate limits, response formats, and reliability characteristics. The Priority Scheduler uses a weighted scoring system that considers query urgency (investigation priority), source quality (historical accuracy and relevance), and cost (API credits or rate limit budget) to determine query ordering. This ensures that high-priority investigations receive intelligence data first, while routine monitoring operates within sustainable rate limit budgets.

# OSINT coordination through Prismatic facade
{:ok, results} = Prismatic.investigate("example.com", [
  providers: [:shodan, :censys, :certificate_transparency],
  depth: 3,
  parallel: true,
  timeout: 30_000
])

Investigation Workflows

End-to-end investigation lifecycle management from initial lead through evidence collection to final reporting:

Lead --> Triage --> Collection --> Analysis --> Correlation --> Report --> Archive
  |         |           |            |              |             |          |
Target   Priority   Multi-source  Pattern      Cross-domain  Structured  Long-term
Input    + Scope    OSINT Queries  Matching     Entity Links  Output      Storage
Workflow PhasePrismatic ModuleOutput
Lead TriagePrismatic.Investigations.TriagePrioritized investigation plan
CollectionPrismatic.OSINT.CoordinatorRaw intelligence from providers
AnalysisPrismatic.Analysis.EnginePattern matches and anomalies
CorrelationPrismatic.Correlation.CrossDomainLinked entity profiles
ReportingPrismatic.Reports.GeneratorStructured intelligence reports

The investigation workflow engine supports both fully automated and analyst-guided investigation modes. In automated mode, the system follows pre-defined investigation templates that specify which sources to query, what analysis to perform, and how to correlate results. In guided mode, analysts make decisions at each phase while the system handles the operational complexity of source queries, data normalization, and result aggregation.

Agent Orchestration

Multi-agent task coordination with dependency resolution, parallel execution, and result aggregation:

Orchestration FeatureDescriptionScale
Task DecompositionComplex objectives split into agent-sized tasksUnlimited depth
Dependency ResolutionDAG-based task ordering with cycle detectionCross-domain
Parallel DispatchConcurrent Task execution with timeoutsLimited by system resources
Result AggregationTyped result merging with conflict resolutionNABLA-compliant
Failure RecoveryRetry, fallback, and graceful degradationPer-task configurable

Cross-Domain Fusion

Intelligence fusion engine combining data from network, financial, legal, and social domains into unified intelligence products:

Source DomainPrismatic AdapterData Types
NetworkPrismatic.OSINT.NetworkDNS, certificates, ports, cloud infrastructure
FinancialPrismatic.OSINT.FinancialAML, sanctions, crypto, transactions
LegalPrismatic.OSINT.LegalCourt records, registries, compliance
SocialPrismatic.OSINT.SocialProfiles, mentions, reputation
SecurityPrismatic.OSINT.SecurityVulnerabilities, exposures, threats

The cross-domain fusion engine is the analytical heart of the platform. It takes entity data from five independent domains and identifies connections, patterns, and anomalies that are invisible within any single domain. A domain's network infrastructure (discovered through DNS and certificate scans) is correlated with its corporate ownership (from business registries) and financial relationships (from AML databases), producing a unified entity profile that captures the full complexity of the target.

Facade Modules

Prismatic exposes its functionality through well-defined facade modules that serve as the public API:

FacadePurposeConsumer Applications
PrismaticTop-level coordination and investigationAll umbrella apps
Prismatic.OSINTOSINT provider orchestrationIntelligence apps
Prismatic.AgentsAgent discovery and dispatchPrismatic Agents
Prismatic.QualityQuality scoring and gate checkingQuality infrastructure
Prismatic.ConfigPlatform configuration accessAll umbrella apps

The Prismatic API auto-discovers these facade modules at boot time using Elixir introspection (Code.fetch_docs/1, Module.__info__/1) and exposes them as REST endpoints. This means that every function added to a facade module automatically becomes available through the REST API without additional configuration.

Mix Tasks

Prismatic houses the majority of platform Mix tasks that drive development and operations:

Task CategoryExamplesPurpose
Qualitymix quality.gates, mix quality.enforce_standardQuality enforcement
Evolutionmix autoheal.baseline, mix autoevolve.megaAutonomous evolution
OSINTmix osint.query, mix osint.investigateIntelligence operations
Git Treesmix git_trees, mix git_trees findCodebase exploration
Promomix promo.enhancePromo site management
Infrastructuremix supervisor, mix supervisor.discoverPlatform infrastructure

Testing

mix test apps/prismatic/test
mix test apps/prismatic/test --cover
Test CategoryTestsWhat It Verifies
Facade API20Public API contract stability, return type correctness
OSINT Coordination15Provider scheduling, deduplication, aggregation
Investigation Workflows12Phase transitions, data flow, error handling
Agent Orchestration10Task decomposition, dependency resolution, parallel dispatch
Cross-Domain Fusion8Entity correlation, multi-domain linking
Mix Tasks15Task execution, output format, error reporting

Integration Points

Integrates WithPurpose
Prismatic Storage CoreData persistence through the unified storage adapter layer
Prismatic AgentsAgent runtime for autonomous task execution
Prismatic OSINT CoreOSINT provider framework for intelligence gathering
Prismatic NablaEpistemic framework for confidence-scored intelligence
Prismatic APIREST gateway that auto-discovers Prismatic facade modules
Prismatic WebLiveView dashboards for platform operations

NABLA Compliance

As the central coordination hub, Prismatic enforces NABLA compliance across all intelligence operations. The Result Aggregator implements Signal Plurality by combining intelligence from multiple independent sources with explicit confidence weights. The Deduplication Engine satisfies the Contradiction Preservation axiom by logging contradictory results from different providers rather than silently discarding one. Investigation workflows carry full provenance through every phase, recording the sources queried, the analysis performed, and the decisions made, satisfying the Provenance Mandatory axiom. Cross-domain fusion operations require Trinity Gate passage for high-confidence assertions that span multiple intelligence domains.

  • Intelligence Synthesis -- Cross-domain intelligence fusion engine combining network, financial, legal, and social data
  • NABLA Axioms -- Confidence-scored result aggregation compliant with epistemic axioms
  • Autonomous Self-Healing -- Autoheal and autoevolve cycles maintaining platform health

Connect & Contribute

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