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 configured
docs/aar/directories, promote to ADRs under each paireddocs/adr/ADR-XXXX-*.md, update eachdocs/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
operation(optional, defaultreconcile):reconcileupdates an existing ADR before creating a new one,consolidatebackfills ownership and merges judged duplicates, andindexdeterministically regenerates indexes without an LLM keyrequire_ownership(optional, defaultfalse): reject missing ownership/domain metadata and catalog conflictspublish_mode(optional, defaultpull-request):pull-requestopens a bot PR,directcommits anindexresult to the base branch, andnoneonly validates/generates in the workspaceopenai_api_key(required forreconcileandconsolidatewith OpenAI): OpenAI API keyopenai_model(optional, defaultgpt-5.1): model namegithub_token(required): token to open a PR or directly push an index (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)reviewers(optional): comma or newline separated GitHub usernames to request as PR reviewersdocs_dirs(optional, defaultdocs): comma or newline separated docs directories to process. Each directory must containaar/andadr/add_paths(optional, defaultdocs/**): paths passed tocreate-pull-requestadd-pathslanguage(optional, defaulten): ADR output language (not stored in front matter; applies to generated text)
permissions:
contents: write
pull-requests: 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@v2.0.0
with:
operation: reconcile
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.
reviewers: JuHyung-Son
docs_dirs: |
apps/backend/docs
apps/frontend/docs
add_paths: |
apps/**/docs/adr/**
apps/**/docs/aar/**reconcile: compare each AAR with a bounded existing-ADR shortlist and choosecovered,amend,create,reject, ordeferconsolidate: backfillowns/contracts/applies_to, judge exact ownership collisions, and move merged duplicates underdocs/adr/superseded/index: rebuild schema-v2index.jsonfrom active ADR front matter without an LLM key- Open a reviewable PR with changed paths; the action never merges its own PR
ADR2_REPO_ROOTis auto-set togithub.workspaceso the action runs against the calling repo.ADR2_DOCS_DIRSis auto-set fromdocs_dirs.
deferkeeps the AAR.covered,amend,create, andrejectremove it only in the generated PR.
- Front matter (YAML between
---): existing v1 fields plusowns,contracts,applies_to, and typedrelations. Top-levelrelatedremains readable during v2 migration. - Index: deterministic schema v2 with
schema_version,source_hash, ownership/contract/relation/rule metadata. Setrequire_ownership: trueafter backfill to reject missing ownership, invalid domains, broken relations, and duplicate producers. - Body:
## Context (for humans)with the same context text (minimal human-readable section)
Set llm_provider: bedrock to invoke OpenAI models through the Bedrock runtime
Responses API. Existing openai (default) and direct claude providers are unchanged.
bedrock_model: required runtime inference profile ID, for exampleglobal.openai.gpt-5.6-terra. This provider uses the OpenAI Responses API, not the Anthropic Messages API; Claude models are not supported by this provider.bedrock_reasoning_effort: defaults tomedium.aws_region: explicit region; otherwiseAWS_REGION, thenAWS_DEFAULT_REGION.- Authentication uses SigV4 and the AWS SDK credential chain, including runner roles or temporary credentials from GitHub OIDC. No OpenAI/Anthropic API key is needed. The Action does not assume a role itself.
- The caller needs
bedrock:InvokeModelfor the selected inference profile, underlying models, and the account's default Bedrock project. Check model access and regional availability before deploying. global.*profiles can process requests across commercial AWS Regions; use an appropriate geographic profile when data residency constraints apply.- Responses use
store: false; repository content is not persisted as Responses conversation state. Provider errors do not fall back to another provider. operation: indexremains deterministic and requires no LLM credentials.
After configuring AWS credentials in the caller job:
- uses: p2achAI/adr-agent@v2.1.0
with:
operation: reconcile
llm_provider: bedrock
bedrock_model: global.openai.gpt-5.6-terra
bedrock_reasoning_effort: medium
aws_region: ap-northeast-2
github_token: ${{ secrets.RW_TOKEN }}AWS authentication and GitHub PR permissions are separate. For OIDC, restrict role trust to the intended repository and branch or GitHub environment.