ADR 2.0 is a modern evolution of Architecture Decision Records designed for AI-assisted software development. It extends traditional ADRs by introducing automation, agent integration, and machine-verifiable rules, enabling teams to maintain architectural consistency with minimal manual effort.
ADR 2.0 preserves architectural decisions in a way that:
- aligns with modern AI-assisted workflows,
- reduces documentation overhead,
- increases architectural integrity through continuous validation,
- and integrates seamlessly into repository-local development.
AARs are natural-language design reasoning files generated by AI agents or developers.
Characteristics:
- High-level conceptual reasoning
- Explains why a change was made
- Does not include code or diffs
- Stored only under
docs/aar/ - Serves as raw material for ADR creation
A formal, machine-readable decision document.
Characteristics:
- Stored only in
docs/adr/ - Created automatically from AARs
- Reviewed through PRs
- Defines long-term architectural constraints
- Contains Validation Rules that CI can enforce
# Title
# Context
Background, problem, constraints.
# Decision
The architectural decision made.
# Rationale
Why this decision was chosen (trade-offs & reasoning).
# Alternatives Considered
Options evaluated and why they were rejected.
# Consequences
Positive/negative outcomes of the decision.
# Validation Rules
Declarative technical constraints for CI enforcement.
# Agent Playbook
Imperative steps for agents: enforce, detect drift, remediate.
# Agent Signals
- Importance: high | medium | low
- Enforcement: must | should | monitor
AI agent hooks capture reasoning during development sessions and store AARs automatically.
CI or an automated agent determines whether an AAR includes an architectural decision and generates an ADR draft.
Engineers review the generated ADR via PR, ensuring accuracy and team alignment.
ADR Validation Rules are enforced on every PR, preventing architectural drift.
- Reduces the need for manual documentation
- Captures implicit agent reasoning
- Ensures architecture remains consistent over time
- Prevents violations through automated validation
- Works independently in each repository
- Reflects real-world design decisions made collaboratively with AI
ADR 2.0 accepts that:
- Most modern design reasoning originates from AI-assisted workflows.
- Architectural decisions must be captured with minimal friction.
- Documentation should flow naturally from development, not the other way around.
- Architecture governance must be automated to remain relevant.
ADR 2.0 is the natural evolution of architecture documentation in an AI-native development environment.
- Name: ADR 2.0 Agent Promotion
- Purpose: detect AARs under
docs/aar/, promote to ADRs underdocs/adr/ADR-XXXX-*.md, updatedocs/adr/index.json, and clean up processed AARs - Features: agent-friendly template (Agent Playbook, Agent Signals, Validation Rules), slim index, progress logs, automatic AAR cleanup
openai_api_key(required): OpenAI API keyopenai_model(optional, defaultgpt-5.1): model namegithub_token(required): token to open PR (PAT with repo write/PR write recommended; GITHUB_TOKEN may be insufficient in some orgs)pr_branch(optional, defaultadr/auto-update): branch for ADR PRpr_title(optional, defaultchore: ADR auto-update): PR title/commit messagepr_body(optional): PR bodypr_base(optional): base branch (defaults to repo default)language(optional, defaulten): ADR output language (not stored in front matter; applies to generated text)
permissions:
contents: writeNote: this repository only provides the Action for Marketplace. Workflows should be added in the consumer repository.
name: ADR 2.0 Agent Promotion
on:
workflow_dispatch:
push:
paths:
- "docs/aar/**"
permissions:
contents: write
jobs:
adr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: p2achAI/adr-agent@v1 # pin tag/commit
with:
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
openai_model: gpt-5.1
pr_branch: adr/auto-${{ github.run_id }}
pr_title: chore: ADR auto-update (#${{ github.run_number }})
pr_body: Automated ADR updates generated from AARs.- Scan
docs/aar/→ detect candidates - Generate ADRs (
docs/adr/ADR-XXXX-<slug>.mdwith front matterid/scope/created_at/updated_at/decision/context/rationale/alternatives/consequences/related/validation_rules/agent_playbook/agent_signals/index_terms) - Update slim
docs/adr/index.json(withdecision_summary) - Delete promoted AARs and non-candidates
- Open PR with the ADR/cleanup changes (skipped if no changes)
- ADR content generated in the selected
language(front matter only; no duplicated markdown body)
ADR2_REPO_ROOTis auto-set togithub.workspaceso the action runs against the calling repo.
- AAR source files under
docs/aar/are deleted after processing; back them up elsewhere if you need to keep originals.
- Front matter (YAML between
---):id,scope,created_at,updated_at,decision,context,rationale,alternatives,consequences,related,validation_rules,agent_playbook,agent_signals(importance/enforcement),index_terms - Body:
## Context (for humans)with the same context text (minimal human-readable section)