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:
@@ -27,6 +27,7 @@ def describe_prompt(prompt: Mapping[str, Any]) -> str:
|
||||
return (
|
||||
f"Please review the {approval['phase']} Phase: {approval['summary']}\n\n"
|
||||
f"Deliverables: {', '.join(approval['deliverables'])}.\n\n"
|
||||
f"{_describe_target_architecture(approval.get('target_architecture'))}"
|
||||
f"To approve, reply with the data {json.dumps(reply)}. "
|
||||
f"To request changes, reply with {json.dumps(changes)}. "
|
||||
"A text reply is recorded as conversation and never approves."
|
||||
@@ -46,6 +47,24 @@ def describe_prompt(prompt: Mapping[str, Any]) -> str:
|
||||
return "\n".join(lines) + "\n\nReply in text; answer every question you can."
|
||||
|
||||
|
||||
def _describe_target_architecture(summary: Mapping[str, Any] | None) -> str:
|
||||
"""What the design Approval commits to: no code is written until it is granted."""
|
||||
if not summary:
|
||||
return ""
|
||||
text = (
|
||||
f"The Target architecture has {summary['elements']} Elements, "
|
||||
f"{summary['relationships']} Relationships and {summary['checks']} Checks. "
|
||||
"No infrastructure code is written until you approve it; the code is then "
|
||||
"validated against those Checks.\n\n"
|
||||
)
|
||||
for item in summary.get("not_applicable", []):
|
||||
text += (
|
||||
f"Recommendation {item['recommendation']} is treated as not applicable: "
|
||||
f"{item['reason']}\n"
|
||||
)
|
||||
return text + ("\n" if summary.get("not_applicable") else "")
|
||||
|
||||
|
||||
def to_generate_response(
|
||||
interaction: Interaction, roles: Mapping[str, RoleSpec]
|
||||
) -> dict[str, Any]:
|
||||
@@ -86,7 +105,7 @@ def to_generate_response(
|
||||
"requirements_doc": requirements,
|
||||
"architecture_doc": content(DeliverableKind.ARCHITECTURE_DESCRIPTION),
|
||||
"mermaid_diagram": attachment(
|
||||
DeliverableKind.ARCHITECTURE_DIAGRAM, "architecture.mmd"
|
||||
DeliverableKind.TARGET_ARCHITECTURE, "architecture.mmd"
|
||||
),
|
||||
"terraform_code": attachment(
|
||||
DeliverableKind.DEPLOYMENT_GUIDANCE, "terraform/main.tf"
|
||||
|
||||
Reference in New Issue
Block a user