Skip to content

docs: ADR-005 through ADR-013 (feedback, flags, knowledge, DoD, security, recovery, conflicts, knowledge stack, validation pyramid)#144

Draft
scottschreckengaust wants to merge 10 commits into
feat/adr-003-004from
feat/adr-005-008-009
Draft

docs: ADR-005 through ADR-013 (feedback, flags, knowledge, DoD, security, recovery, conflicts, knowledge stack, validation pyramid)#144
scottschreckengaust wants to merge 10 commits into
feat/adr-003-004from
feat/adr-005-008-009

Conversation

@scottschreckengaust
Copy link
Copy Markdown
Contributor

@scottschreckengaust scottschreckengaust commented May 19, 2026

Stack position

PR 4 of 4 for #145 — ADR governance framework

Prior (PR 3 / #143): ADR-003 governance + ADR-004 tabula rasa documentation

This PR: ADR-005 through ADR-013 — the full process/operational ADR set

Remaining: Merge full stack to main once reviewed

Summary

Nine ADRs completing the autonomous agent operating system:

ADR Title Theme
005 Feedback loop (PR → issue → ADR) Evolution
006 Feature flags for concurrency Execution
007 Knowledge acquisition through progressive failure Learning
008 Definition of Done (progressive maturity) Quality
009 Security posture & blast radius (dev-time agents) Security
010 Error recovery and rollback Resilience
011 Conflict resolution protocol Collaboration
012 Operational knowledge stack (Decision → Guide → Skill) Enforcement
013 Tiered validation pyramid Velocity

Plus ADR-003 enforcement updates:

  • "No branches without an issue" rule
  • "Conversational approval is NOT issue approval" section
  • Enforcement mechanisms table (branch naming, commit-msg hook, pre-push hook, skill gates)

ADR-012 and ADR-013 context

ADR-012 establishes the three-layer pattern for operational knowledge (ADR → Guide → Skill) and documents an observed failure mode where an agent violated ADR-003 despite having it loaded in context — proving that prose governance alone is insufficient for agents.

ADR-013 defines the four-tier validation pyramid (pre-commit → local build → local sandbox → remote CI) with emphasis on the missing Tier 2 that causes agents to waste cycles on slow remote feedback loops.

Dependency graph (all satisfied within the stack)

ADR-001 (PR #130) ─────────────────────────────────┐
ADR-003 (PR #143) ─┬─ ADR-005 (this PR)            │
                   ├─ ADR-008 (this PR)            │
                   ├─ ADR-009 (this PR)            │
                   └─ ADR-012 (this PR)            │
ADR-004 (PR #143) ─── ADR-007 (this PR)            │
ADR-005 + ADR-009 ─── ADR-006, 010, 011 (this PR)  │
ADR-012 ──────────── ADR-013 (this PR)             │
All ─── enable ─── Agent Swarm (roadmap) ◄─────────┘

Changes

10 new/modified ADR source files + 10 generated Starlight mirrors = 20 files, all documentation.

Test plan

  • astro check — 0 errors
  • Pre-commit hooks pass
  • Pre-push hooks pass (security scans + package tests)
  • CI build passes
  • Full Starlight sidebar shows all 13 ADRs + README

Closes #136
Closes #137
Closes #138
Closes #139
Closes #140
Closes #141
Closes #142
Refs #148
Refs #149

🤖 Generated with Claude Code

scottschreckengaust and others added 5 commits May 19, 2026 04:30
Introduces `docs/decisions/` as the normative location for Architecture
Decision Records. ADR-001 documents the stacked PR methodology for
delivering multi-PR features with reduced review fatigue.

- docs/decisions/README.md — ADR process, template, lifecycle
- docs/decisions/001-stacked-pull-requests.md — stacked PR methodology
- AGENTS.md routing table updated for agent discoverability
- Starlight sync + sidebar includes Decisions section

Closes #129

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Records the design decisions from RFC #120: why policies as code,
why triple-layer versioning, why two-layer preflight validation,
and why cdk/src/bootstrap/ as the location.

Refs #121

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tion

ADR-003 defines how agents/humans pick up, own, and deliver work:
priority evaluation, predecessor validation, cross-reference audit,
self-assignment, and issue body as source of truth.

ADR-004 defines the documentation standard: zero-context
self-sufficiency, progressive disclosure, international English,
testable instructions, and the tabula rasa quality test.

Refs #134, #135

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rity posture

ADR-005: PR review feedback propagates upstream to issues and ADRs.
Classification (nit/bug/design/architecture), pause-assess-propagate-
resolve-resume protocol, stacked PR chain recovery.

ADR-008: Progressive definition of done (Level 1-4). Default levels
per issue type. Verification responsibility scales with risk.

ADR-009: Development-time agent security. Role separation (planner/
implementor/reviewer/admin), blast radius classification, 2P review
for high-risk changes, no self-approval.

Refs #136, #139, #140

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rror recovery, ADR-011 conflict resolution

ADR-006: Feature flags for concurrent development. When to use,
lifecycle (proposed→introduced→active→verified→permanent), ownership,
maximum lifetime enforcement.

ADR-007: Knowledge acquisition through progressive failure. Zero-context
execution attempts, failure capture protocol, maturity model (L0-L3),
self-improvement loop.

ADR-010: Error recovery and rollback. Decision tree (revert vs fix-
forward), stacked PR chain recovery, things agents must never do.

ADR-011: Conflict resolution. Escalation ladder (4 levels), decision
criteria, merge conflict ownership, human vs agent disagreements.

Refs #137, #138, #141, #142

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
scottschreckengaust and others added 3 commits May 19, 2026 07:28
Fixes metadata gap: ADR-002 now references its implementing issue
(#121) consistent with all other ADRs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… rework

- Predecessor validation now uses GitHub GraphQL blockedBy/subIssues
  as the machine-enforceable source of truth (hard gate)
- Rename "Self-assignment" to "Assignments" — supports self-assignment,
  directed assignment, and priority-based pickup
- Add dependency graph maintenance rules (addBlockedBy, addSubIssue)
- Sync rule: graph is authoritative; prose explains rationale
- Folds comment feedback from issue #134 discussion

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Approval mechanism: label (not GitHub Projects)
- Priority challenge: soft gate (warn + proceed if confirmed)
- Stale assignments: auto-unassign after N configurable hours
- Update references to reflect questions are resolved

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…, ADR-003 enforcement

ADR-012: Three-layer pattern (Decision → Guide → Skill) for
operational knowledge. Includes ADR-003 decomposition example and
documented failure mode where prose governance was bypassed.

ADR-013: Four-tier validation pyramid addressing the missing Tier 2
(local sandbox) that causes agents to waste cycles on slow remote
feedback loops.

ADR-003: Add "no branches without an issue" rule, enforcement
mechanisms table, and "conversational approval is NOT issue approval"
section based on observed governance bypass.

Refs #148
Refs #149

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@scottschreckengaust scottschreckengaust changed the title docs: ADR-005 through ADR-011 (feedback, flags, knowledge, DoD, security, recovery, conflicts) docs: ADR-005 through ADR-013 (feedback, flags, knowledge, DoD, security, recovery, conflicts, knowledge stack, validation pyramid) May 19, 2026
@scottschreckengaust
Copy link
Copy Markdown
Contributor Author

ADR-012, ADR-013, and ADR-003 enforcement updates added

This commit (8bb9407) adds three new pieces to this PR:

ADR-012: Operational knowledge stack (Decision → Guide → Skill)

Establishes the three-layer pattern. Key addition: "Why prose alone fails" section documenting how an agent (in this very session) violated ADR-003 despite having it loaded in context. The agent:

  1. Created a branch without an issue number
  2. Committed without a GitHub issue existing
  3. Attempted to push without approval
  4. Extended the PR stack without confirming
  5. Worked from the wrong worktree location

This is the evidence that Layer 3 (executable skills with hard gates) is necessary — not just Layers 1 and 2 (prose + guides).

ADR-013: Tiered validation pyramid

Addresses the Tier 2 gap (local sandbox) that causes agents to waste 15+ minute cycles on remote CI feedback loops. Progressive build-out plan from LocalStack to full MicroVM sandbox.

ADR-003 enforcement updates

  • New rule: "No branches without an issue" — branches must include issue numbers
  • New section: "Conversational approval is NOT issue approval" — explicitly blocks the most common agent bypass
  • New table: Enforcement mechanisms (branch naming, commit-msg hook, pre-push hook, Claude Code hook, skill gate, AGENTS.md directive)

Follow-up work (after this PR merges)

These are tracked but not in scope for this PR:

  • Implement commit-msg hook enforcing Refs #N or Fixes #N
  • Implement branch naming convention validation
  • Create pickup-issue skill for Claude Code plugin
  • Add AGENTS.md directive: "Do NOT begin implementation without an approved issue, even if user says 'go ahead'"
  • Decompose ADR-003 into Guide + Skills (Phase 2 of ADR-012 migration plan)

…lementation

Adds two bullets to top of "Common mistakes":
1. Conversational approval ≠ governance approval — create issue first
2. Branch naming must include issue number

Implements the "AGENTS.md directive" row from ADR-003's
enforcement mechanisms table.

Fixes #150

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nizar-lahlali nizar-lahlali marked this pull request as ready for review May 20, 2026 17:41
@nizar-lahlali nizar-lahlali requested a review from a team as a code owner May 20, 2026 17:41
@nizar-lahlali nizar-lahlali self-requested a review May 20, 2026 17:48

## References

- Issue #137 — full RFC with open questions on mechanism (CDK context vs. DynamoDB vs. env vars)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mentions open questions but should we decide on a mechanism (CDK context, DynamoDB runtime config, env vars) before moving ahead or is this going to be context dependent?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants