Skip to content

Add ADR curator extracting architecture decisions into per-repo decision log #284

@kai-linux

Description

@kai-linux

Goal

Add an ADR (Architecture Decision Record) curator agent that auto-extracts architectural decisions from merged PRs and maintains an immutable per-repo decision log the strategic planner consults when generating new sprints.

Success Criteria

  • New orchestrator/adr_curator.py runs after each merge or on a daily cadence
  • For PRs with task:architecture label OR file changes that match an architectural-surface allowlist (*/migrations/*, */schemas/*, pyproject.toml, Dockerfile, etc.), generates an ADR entry via Haiku/Sonnet using the PR title, body, and diff summary
  • Writes ADRs to <repo>/docs/adrs/NNNN-slug.md following the standard ADR template (Context / Decision / Consequences / Date / PR link)
  • Maintains an adrs/INDEX.md listing all ADRs in chronological order
  • Strategic planner reads the most recent N ADRs (default 10) and includes them in PLAN_PROMPT under a new --- Recent Architectural Decisions --- section so future sprints respect prior commitments
  • Regression test: synthetic merged architecture PR produces a well-formed ADR file and updated index

Constraints

  • ADRs are append-only — the curator never edits an existing ADR (a new ADR may supersede an old one, recorded in the new ADR's body)
  • Skip merges that are pure tech-debt cleanup, bot-generated style fixes, or dependabot-style automated bumps
  • Cap to 1 ADR per merged PR; multi-decision PRs get a single composite ADR

Task Type

architecture

Why

Architectural decisions today live only in STRATEGY.md prose and PR descriptions. The planner has no structured architectural memory, so it can re-propose work that contradicts prior decisions, and human reviewers have no quick way to audit "what did we commit to and why?".

Re-queued Context

Last agent summary

Rendered prompt is 134001 bytes, exceeding the 100000-byte ceiling.

Blockers

  • Prompt size 134001 bytes exceeds 100000-byte limit.
  • Retrying with more prior-attempt context will not help; the task body itself must be trimmed.

Files changed

  • None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions