feat: establish the Target architecture as a graph before code

Design is now approved before any infrastructure code is written (ADR-0005).
A new target-architect Specialist produces one graph of Elements,
Relationships and Checks; the diagram is rendered from it, deployment
guidance must account for every Check, and validation gives a verdict per
Check. Requirements, components, products and recommendations carry ids in
data files, and a submission with a gap in the Requirements chain is refused.

Also in this commit:
- Customer cases group Executions, with an intent history per case
- lesson candidates are captured when an Execution ends
- evaluation gains chain, verdict, judged and interactive checks, and
  per-case thresholds
- Terraform providers are cached between checks
- the requirements analyst proposes defaults instead of asking
- the legacy-baseline case and the checks that only read it are removed
- ADR-0006 (Change requests) accepted; ADR-0004 and ADR-0007 proposed
- plans for iterations 4 to 7 under .agents/plans/

Unproven with a real model: no evaluation run has completed on this design.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-07 13:59:09 +01:00
parent 7ee49ab352
commit e9246828b3
586 changed files with 5166 additions and 22432 deletions

View File

@@ -8,6 +8,7 @@ Execution store (review candidate 03) replaces them.
from __future__ import annotations
import asyncio
import json
import uuid
from collections import defaultdict
from collections.abc import Mapping, Sequence
@@ -42,12 +43,22 @@ class ExecutionRecorder(Protocol):
details: Mapping[str, Any],
) -> None: ...
async def record_lesson_candidates(
self, execution_id: str, record: Mapping[str, Any]
) -> None: ...
class InMemoryRecorder:
def __init__(self) -> None:
self.events: dict[str, list[LedgerEvent]] = defaultdict(list)
self.submissions: dict[str, list[dict[str, Any]]] = defaultdict(list)
self.statuses: dict[str, list[dict[str, Any]]] = defaultdict(list)
self.lessons: dict[str, dict[str, Any]] = {}
async def record_lesson_candidates(
self, execution_id: str, record: Mapping[str, Any]
) -> None:
self.lessons[execution_id] = dict(record)
async def record_events(
self, execution_id: str, events: Sequence[LedgerEvent]
@@ -154,3 +165,15 @@ class DatabaseRecorder:
agent_name=SESSION_AGENT_NAME,
state_data={"latest_execution_id": execution_id, "status": status},
)
async def record_lesson_candidates(
self, execution_id: str, record: Mapping[str, Any]
) -> None:
await asyncio.to_thread(
self._db.save_artifact,
artifact_id=str(uuid.uuid4()),
execution_id=execution_id,
artifact_type="lesson_candidates",
file_path="lesson-candidates.json",
content=json.dumps(dict(record), ensure_ascii=False),
)