Skip to content

๐Ÿ“œ ADR Agent Specification

๐Ÿ“Œ Purpose

The ADR Agent is responsible for managing the full lifecycle of Architecture Decision Records (ADRs) within the ConnectSoft AI Software Factory โ€” capturing the rationale behind technology choices, pattern selections, trade-off analyses, and design pivots.

It ensures that every significant architecture decision is recorded, contextualized, traceable, and discoverable โ€” enabling teams and agents to understand why something was built a certain way, not just what was built.

๐Ÿงพ Architecture decisions without recorded rationale become tribal knowledge that evaporates. This agent ensures they become permanent, queryable institutional memory.


๐ŸŽฏ Primary Goals

Goal Description
๐Ÿ“œ Capture architecture decisions Record every significant technology choice, pattern selection, or design trade-off as a structured ADR
๐Ÿง  Preserve rationale and context Document the why โ€” alternatives considered, trade-offs evaluated, constraints applied
๐Ÿ”— Integrate with log4brains Generate ADRs in log4brains-compatible format for browsable decision history
๐Ÿ”„ Track decision lifecycle Manage ADR statuses: proposed โ†’ accepted โ†’ deprecated โ†’ superseded
๐Ÿ“Ž Link to trace context Connect ADRs to specific modules, editions, features, and agent execution traces
๐Ÿ“š Feed Knowledge Management Embed ADR content as semantic memory for cross-agent retrieval and reasoning

๐Ÿง  Core Role in the Factory

The ADR Agent sits within the Documentation and Knowledge Management cluster, acting as the decision memory layer between architecture agents and the broader knowledge system.

Architecture decisions flow from Enterprise Architect, Solution Architect, and Tech Lead agents into the ADR Agent, which structures, validates, and publishes them into the documentation ecosystem and knowledge graph.


๐Ÿงฉ Position in the Documentation and Knowledge Management Cluster

Layer Cluster Description
๐Ÿ“œ Decision Record Layer Documentation & Knowledge Management Captures and structures architecture decisions as ADRs
๐Ÿ”— Rationale Preservation Links decisions to alternatives, constraints, and outcomes
๐Ÿง  Knowledge Contributor Feeds structured decision knowledge into Knowledge Management and doc sites
flowchart TD
    EA[๐Ÿ›๏ธ Enterprise Architect Agent] -->|architecture_decision_made| ADR[๐Ÿ“œ ADR Agent]
    SA[๐Ÿงฉ Solution Architect Agent] -->|technology_selection_completed| ADR
    TL[๐Ÿ”ง Tech Lead Agent] -->|pattern_deviation_detected| ADR
    ADR --> KM[๐Ÿง  Knowledge Management Agent]
    ADR --> DOC_SITE[๐Ÿ“ฆ Documentation Site Generator Agent]
    ADR --> DOC_WRITER[๐Ÿ“ Documentation Writer Agent]
    ADR --> STUDIO[๐Ÿ“Š Studio Agent]
Hold "Alt" / "Option" to enable pan & zoom

โšก Triggering Events

Event Description
architecture_decision_made An architect agent has finalized a technology or pattern choice requiring formal documentation
technology_selection_completed A technology evaluation process has concluded with a selected option and rejected alternatives
pattern_deviation_detected A code review or generator agent detects deviation from established architecture patterns
adr_review_requested A human or agent requests review of an existing ADR's relevance or accuracy
adr_supersession_triggered A new decision invalidates or replaces a previous ADR

๐Ÿ“‹ Responsibilities and Deliverables

๐Ÿงฐ Key Responsibilities

Responsibility Description
๐Ÿ“œ ADR Generation Create structured ADRs from architecture decision events with full context and rationale
๐Ÿง  Rationale Capture Document alternatives considered, evaluation criteria, trade-offs, and constraints
๐Ÿ”„ Lifecycle Management Track ADR status transitions: proposed โ†’ accepted โ†’ deprecated โ†’ superseded
๐Ÿ”— log4brains Integration Generate ADRs in Markdown format compatible with log4brains tooling and navigation
๐Ÿ“Ž Trace Linking Connect each ADR to traceId, moduleId, editionId, and originating agent
๐Ÿ“š Decision Log Maintenance Maintain a chronological decision log index across all modules and editions
๐Ÿ” Impact Analysis When a decision is superseded, identify downstream artifacts that may need updating

๐Ÿ“ค Deliverables

Deliverable Type Description
๐Ÿ“œ adr Individual Architecture Decision Record in log4brains-compatible Markdown
๐Ÿ“‹ decision-log Chronological index of all ADRs with status, date, module, and summary
๐Ÿ”„ adr-supersession-map.yaml Mapping of superseded ADRs to their replacements
๐Ÿ“Š adr-coverage.metrics.json Coverage metrics: decisions per module, status distribution, staleness indicators

๐Ÿ“˜ Example Output: ADR Document

# ADR-0042: Use MassTransit over NServiceBus for Message Broker Abstraction

## Status
Accepted

## Date
2026-03-15

## Context
The platform requires a message broker abstraction layer that supports
RabbitMQ and Azure Service Bus. Both MassTransit and NServiceBus were
evaluated against criteria of open-source licensing, Azure-native support,
Semantic Kernel compatibility, and community adoption.

## Decision
We will use **MassTransit** as the message broker abstraction for all
ConnectSoft microservices.

## Alternatives Considered
| Option | Pros | Cons |
|--------|------|------|
| MassTransit | OSS, strong Azure support, active community | Steeper learning curve |
| NServiceBus | Mature, enterprise features | Commercial license, heavier footprint |
| Raw Azure SDK | No abstraction overhead | Vendor lock-in, no broker portability |

## Consequences
- All microservice templates will use MassTransit consumers and sagas
- Message contracts will follow MassTransit conventions
- Test harnesses will use MassTransit InMemory transport

## Trace
- `traceId`: proj-900-v3
- `agentId`: EnterpriseArchitectAgent
- `moduleId`: PlatformMessaging
- `editionId`: core

๐Ÿค Collaboration Interfaces

๐Ÿ”— Upstream Agents (Inputs)

Agent Input Provided
Enterprise Architect Agent Strategic architecture decisions, technology evaluations, platform-wide patterns
Solution Architect Agent Module-specific design decisions, integration pattern selections
Tech Lead Agent Implementation-level decisions, pattern deviations, library selections
Code Reviewer Agent Detected deviations from established ADRs that may trigger new decisions

๐Ÿ“ค Downstream Agents (Outputs Consumed By)

Agent Output Consumed
Documentation Site Generator Agent Integrates ADRs into the MkDocs site under /decisions/ navigation
Documentation Writer Agent References ADRs in architecture overview and module documentation
Knowledge Management Agent Indexes ADRs as semantic memory entries for cross-agent retrieval
Studio Agent Displays ADR coverage, staleness metrics, and decision timelines

๐Ÿ“Š Collaboration Flow

flowchart TD
    EA[๐Ÿ›๏ธ Enterprise Architect] --> ADR[๐Ÿ“œ ADR Agent]
    SA[๐Ÿงฉ Solution Architect] --> ADR
    TL[๐Ÿ”ง Tech Lead] --> ADR
    REVIEWER[๐Ÿ” Code Reviewer] --> ADR

    ADR --> DOC_SITE[๐Ÿ“ฆ Doc Site Generator]
    ADR --> DOC_WRITER[๐Ÿ“ Documentation Writer]
    ADR --> KM[๐Ÿง  Knowledge Management]
    ADR --> STUDIO[๐Ÿ“Š Studio Dashboard]
Hold "Alt" / "Option" to enable pan & zoom

๐Ÿง  Memory and Knowledge

๐Ÿ“š Pre-Embedded Knowledge

Domain Description
๐Ÿ“œ ADR format standards MADR (Markdown Any Decision Records), log4brains conventions, Nygard format
๐Ÿงฑ ConnectSoft architecture patterns Established patterns for microservices, messaging, data access, and API design
๐Ÿ”„ Decision lifecycle model Status transitions and supersession chain management
๐Ÿ“˜ Technology evaluation frameworks Criteria for evaluating libraries, frameworks, cloud services, and patterns

๐Ÿง  Short-Term Memory

Capability Description
๐Ÿ“ Active decision context Holds the current architecture decision being documented with all evaluation data
๐Ÿ”— Supersession chain Tracks which existing ADRs are affected by the current decision
๐Ÿ“Ž Module and trace context Temporarily caches related modules, editions, and trace metadata for linking

๐Ÿง  Long-Term Memory

Memory Type Storage Purpose
๐Ÿ“œ ADR repository File system + Vector DB Full archive of all ADRs with semantic embeddings for similarity search
๐Ÿ“‹ Decision log index decision-log-index.yaml Chronological index with status, module, and summary per ADR
๐Ÿ”„ Supersession map adr-supersession-map.yaml Tracks replacement chains across ADR versions
๐Ÿ“Š Coverage metrics adr-coverage.metrics.json Decision coverage per module, staleness scores, status distribution

โœ… Validation

๐Ÿงช Validation Checks

Check Description
๐Ÿ“œ Structure compliance ADR must follow the configured format (Context, Decision, Alternatives, Consequences)
๐Ÿง  Rationale completeness At least two alternatives must be documented with pros/cons
๐Ÿ”— Trace metadata presence traceId, agentId, moduleId must be present
๐Ÿ”„ Supersession integrity If superseding another ADR, the referenced ADR must exist and be marked as superseded
๐Ÿ“Ž log4brains compatibility Output must be parseable by log4brains tooling
๐Ÿ“Š No orphan decisions Every ADR must be linked to at least one module or feature

๐Ÿ” Retry and Correction

Scenario Correction
Missing alternatives section Re-prompt architect agent for evaluation data
Broken supersession reference Validate against ADR index and repair chain
Incomplete consequences Enrich from architecture knowledge base and module impact analysis
log4brains format violation Re-render using log4brains template with strict formatting

๐Ÿ“Š Observability Hooks

Event Trigger Payload
AdrCreated New ADR published adrId, traceId, moduleId, status, agentId
AdrStatusChanged ADR status transitioned adrId, fromStatus, toStatus, reason
AdrSuperseded ADR replaced by newer decision oldAdrId, newAdrId, traceId
AdrValidationFailed Validation error detected adrId, reason, traceId
AdrCoverageUpdated Coverage metrics recalculated totalAdrs, activeAdrs, modulesWithoutAdrs

๐Ÿงพ Summary and Positioning

The ADR Agent is the architectural memory guardian of the ConnectSoft platform, ensuring every significant design decision is:

  • ๐Ÿ“œ Recorded with full rationale, alternatives, and consequences
  • ๐Ÿ”— Traceable to modules, editions, features, and originating agents
  • ๐Ÿ”„ Lifecycle-managed through proposal, acceptance, deprecation, and supersession
  • ๐Ÿ“š Discoverable through log4brains navigation, semantic search, and knowledge graphs
  • ๐Ÿง  Reusable as institutional memory that prevents repeated mistakes and preserves architectural intent

๐Ÿงฉ Position in the ConnectSoft Platform

flowchart TD
    ARCHITECTS[๐Ÿ›๏ธ Architecture Agents] --> ADR[๐Ÿ“œ ADR Agent]
    TECH_LEADS[๐Ÿ”ง Tech Lead Agents] --> ADR
    ADR --> DOC_SITE[๐Ÿ“ฆ Documentation Site]
    ADR --> KM[๐Ÿง  Knowledge Management]
    ADR --> STUDIO[๐Ÿ“Š Studio Dashboard]
    ADR --> LOG4BRAINS[๐Ÿงญ log4brains UI]
Hold "Alt" / "Option" to enable pan & zoom

Without this agent, architecture decisions live in Slack threads and meeting notes. With it, every decision becomes a permanent, navigable, and actionable record that shapes how the platform evolves.