WORKFLOW · multi-agent-orchestration
Workflow: ADR validation in CI
A GitHub Actions workflow that validates architecture decision records against a schema, so agent-authored ADRs meet the same structural bar as human ones and the decision log stays machine-readable.
✓ verified 2026-07-18 · stack: github-actions, github · source
Agents both read and write ADRs now: they cite the decision log as context and propose new records in PRs. That only works while the records stay structurally consistent, and consistency by convention decays. This workflow validates every ADR against a schema in CI, using the structured-madr validator, so a malformed record (agent-authored or human) fails the PR instead of quietly rotting the log (structured-madr).
name: adr-validate
on: pull_request: paths: - "docs/adr/**"
permissions: contents: read
jobs: validate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 # Validates docs/adr/**.md frontmatter + structure against the # vendored MIF schema. Conformance level lives in config.yml # (mifConformanceLevel: 2 is the default profile). - uses: zircote/structured-madr@v1 with: mode: mifThe record shape the validator expects, seeded with the MADR template fields (MADR) that both agents and humans fill:
---status: proposeddate: 2026-07-18decision-makers: [paul]consulted: [platform-team]informed: [delivery-leads]---
# Use Bedrock rather than the direct API for production inference
## Context and problem statement
Production inference needs regional data routing and IAM-native costattribution; the team already operates in eu-west-2.
## Considered options
- Amazon Bedrock- Direct Claude API
## Decision outcome
Chosen option: "Amazon Bedrock", because it keeps inference inside theexisting AWS boundary and cost attribution rides IAM principals wealready tag.
### Consequences
- Good: CUR-native cost attribution, no new credential surface.- Bad: feature lag behind the direct API for some capabilities.What it does
- Validates only when
docs/adr/**changes, so the check costs nothing on ordinary PRs; wire the job into the branch ruleset to make it required. - Structural validation is what makes the log agent-legible both ways: an agent asked to “check the ADRs before proposing a design” can parse frontmatter it can rely on, and an agent proposing a decision has a schema to fail against before a human spends review attention.
- The
statusfield discipline (proposed, accepted, superseded) is what the ADR author command depends on: agents always propose, humans accept, and the validator keeps the field honest. - Conformance levels (
mifConformanceLevel: 1|2|3) let a team start permissive and ratchet: level 2 is the default profile;--strictturns warnings into failures when the log is clean enough to hold the line.
Failure modes
- A schema cannot judge a decision. It checks shape, not sense; a well-formed record of a bad decision passes. The human reviewer owns the judgement, the validator owns the structure, and neither substitutes for the other.
- Retro-validation of an old log hurts. Running the validator over
years of freeform ADRs fails everything at once. Scope the paths filter
to a new
docs/adr/era, or run one migration PR first and accept the diff noise once. - Pinned action, vendored schemas. The schemas are vendored and pinned
(
VENDOR.lock) in the action; treat validator upgrades like any other gate change, in their own PR, because a schema bump can fail previously green records. - Status drift. Nothing forces a superseding record to update the
superseded one’s
status; make that a review checklist item, since it is precisely the inconsistency agents then repeat as fact.
Verified against the structured-madr action invocation (zircote/structured-madr@v1,
mode: mif), conformance-level configuration, and the MADR template fields
at github.com/zircote/structured-madr and adr.github.io/madr, 2026-07-18.