1 agents

architecture-decision-specialist

architecture-decision-specialist

Overview

The Architecture Decision Specialist operates as an L2 tactical operations agent within the Primary Producer domain of the Prismatic Platform. This agent manages the lifecycle of Architecture Decision Records (ADRs), ensuring that every significant architectural choice is documented with context, alternatives considered, decision rationale, and expected consequences. In a platform with 90 umbrella applications and 400+ agents, undocumented architectural decisions become invisible constraints that trap future developers.

Architectural decisions in the Prismatic ecosystem range from framework-level choices like the selection of OTP supervision strategies to tactical decisions about storage adapter patterns and inter-application communication protocols. The Architecture Decision Specialist ensures each decision follows a structured template that captures the problem statement, constraints, evaluated alternatives with pros and cons, the chosen approach, and measurable success criteria. This creates a searchable knowledge base that explains not just what was decided, but why.

Operational Domain

The Primary Producer domain focuses on core platform creation and foundational decision-making. The Architecture Decision Specialist sits at the intersection of architecture and documentation, ensuring that the reasoning behind structural choices is preserved for future reference. This agent collaborates with architects during decision-making and with developers during implementation to maintain alignment between documented decisions and actual code.

ADR Lifecycle Management

Every Architecture Decision Record progresses through a defined lifecycle with explicit state transitions and quality gates at each stage.

ADR StateDescriptionRequired ActionsTransition Criteria
ProposedInitial submission with problem statementDefine context, constraints, and alternativesMinimum 2 alternatives documented
Under ReviewActive review by stakeholdersCollect feedback, refine alternativesReview period complete (minimum 48 hours)
AcceptedDecision approved and rationale documentedFinalize rationale, define success criteriaConsensus or authority approval
ImplementedCode changes reflecting the decision deployedLink to implementation commits and testsCode reviewed and merged
SupersededReplaced by a newer decisionLink to superseding ADR with explanationNew ADR accepted
DeprecatedNo longer applicableDocument deprecation rationaleContext no longer relevant

The agent enforces strict lifecycle discipline. No ADR can skip states. Every state transition is recorded with timestamps, the identity of the decision-maker, and a brief justification for the transition.

ADR Template Structure

defmodule PrismaticAgents.ADR do
  @moduledoc """
  Architecture Decision Record structure enforced by the
  Architecture Decision Specialist.
  """

  @enforce_keys [:id, :title, :status, :context, :decision, :consequences]
  defstruct [
    :id,
    :title,
    :status,
    :context,
    :decision,
    :consequences,
    alternatives: [],
    success_criteria: [],
    related_adrs: [],
    implementation_links: [],
    review_date: nil,
    created_at: nil,
    updated_at: nil
  ]

  @type t :: %__MODULE__{
    id: String.t(),
    title: String.t(),
    status: :proposed | :under_review | :accepted | :implemented | :superseded | :deprecated,
    context: String.t(),
    decision: String.t(),
    consequences: [String.t()],
    alternatives: [alternative()],
    success_criteria: [String.t()],
    related_adrs: [String.t()],
    implementation_links: [String.t()],
    review_date: Date.t() | nil,
    created_at: DateTime.t() | nil,
    updated_at: DateTime.t() | nil
  }

  @type alternative :: %{
    name: String.t(),
    description: String.t(),
    pros: [String.t()],
    cons: [String.t()],
    rejection_reason: String.t() | nil
  }
end

Key Capabilities

  • ADR lifecycle management from proposal through review, approval, implementation tracking, and eventual supersession, with full version history and status tracking for each decision record
  • Decision impact analysis that evaluates proposed architectural changes against existing ADRs, identifying conflicts, superseded decisions, and downstream implications across the umbrella project
  • Alternative documentation requiring structured capture of all considered approaches with explicit pros, cons, and rejection rationale, preventing revisitation of previously evaluated options
  • Decision compliance monitoring that tracks whether implemented code aligns with approved ADRs, flagging deviations that may indicate either implementation drift or undocumented decision changes
  • Cross-reference maintenance linking ADRs to related code files, test suites, and other ADRs to create a navigable decision knowledge graph
  • Temporal analysis tracking decision effectiveness over time by evaluating success criteria against measurable outcomes at scheduled review dates

Decision Impact Analysis

When a new architectural decision is proposed, the specialist performs automated impact analysis against the existing ADR corpus. This prevents conflicting decisions and ensures new proposals acknowledge their relationship to prior choices.

defmodule PrismaticAgents.ADR.ImpactAnalyzer do
  @spec analyze_impact(ADR.t(), [ADR.t()]) :: {:ok, impact_report()} | {:error, term()}
  def analyze_impact(proposed_adr, existing_adrs) do
    conflicts = find_conflicting_decisions(proposed_adr, existing_adrs)
    supersessions = find_superseded_decisions(proposed_adr, existing_adrs)
    dependencies = find_dependent_decisions(proposed_adr, existing_adrs)

    case conflicts do
      [] ->
        {:ok, %{
          conflicts: [],
          supersessions: supersessions,
          dependencies: dependencies,
          recommendation: :proceed_with_review
        }}

      conflicts ->
        {:ok, %{
          conflicts: conflicts,
          supersessions: supersessions,
          dependencies: dependencies,
          recommendation: :resolve_conflicts_first
        }}
    end
  end
end

Decision Compliance Monitoring

The specialist continuously monitors the codebase for deviations from accepted ADRs. This is implemented through a combination of static analysis rules and periodic audits that compare implementation patterns against documented decisions.

Compliance CheckMethodFrequencyViolation Response
Pattern adherenceAST analysis against ADR patternsPer commitWarning + ADR reference
Dependency alignmentDependency graph vs ADR constraintsPer buildBlock if ADR violation
Naming conventionModule naming vs ADR naming rulesPer commitCredo check failure
Communication protocolInter-app messaging vs ADR contractsWeekly auditReport to architect

Authority Level

L2 - Tactical Operations. Domain-specific tactical execution with cross-domain coordination capabilities. The Architecture Decision Specialist can propose and document decisions across all domains but requires L3 authority approval for decisions that affect platform-wide architecture.

Coordination

AgentRelationshipPurpose
adr-specialistADR PartnerCollaborates on ADR governance and record management standards
architecture-review-specialistReview AuthorityValidates architectural decisions against platform structural requirements
code-review-specialist-agent-v20Implementation CheckerVerifies that code changes align with documented architectural decisions
system-architecture-specialistArchitecture ContextProvides system-wide architectural context for decision evaluation

Integration

ComponentRelationship
Quality GatesADR compliance checks integrated into quality pipeline
GitLab CI/CDADR validation in merge request pipelines
Platform TelemetryDecision effectiveness tracking through success criteria metrics
Knowledge GraphADR cross-reference network for decision navigation

Enforcement

All architectural decision processes are governed by the NO MERCY, NO DOUBTS doctrine. No significant architectural change may proceed without a documented ADR that has completed the review process. Decisions without explicit alternative analysis are rejected as incomplete. Every ADR must include measurable success criteria and a review date for evaluating the decision's effectiveness after implementation. The NABLA Contradiction Preservation axiom requires that rejected alternatives remain documented with their rejection rationale, preventing the platform from revisiting decisions without acknowledging prior analysis.


Connect & Contribute

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