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>
2.0 KiB
2.0 KiB
Step 7 — Implementation Detail
app/states/lessons.py:collect_lesson_candidatesbuilds one record when an Execution ends, from what the Execution already holds. Candidate types:revision: each reopen, with its reason and who asked.revision_limit: a reopen refused at the cap.change_request: the user's feedback on a Phase, with the Deliverables in it.finding: each entry of every submittedfindings.json, with the attempt it came from.refusal: each tool reply that did nothing (REJECTION_PREFIXES, now inapp/adk/runtime.py), with role, tool and Deliverable.unfinished: a Specialist that stopped or spent its budget.
- Refusals are captured in the nodes, not the runtime:
_noting_refusalswraps each tool, so any runtime, the fake included, produces them. Specialist refusals travel in the outcome record; the Orchestrator's are kept in state underrefusals. - The record names the Execution, its status, each role's Skills and a version per Skill.
skill_versioninapp/skills/agent_skills.pyis a 12-character content hash of the Skill's files. - It is written twice: through
ExecutionRecorder.record_lesson_candidates(the database recorder stores it as an artifact of typelesson_candidates), and tolessons/candidates/<execution_id>.jsonunder the output root. That directory is gitignored.
Changed from the plan: the file is not inside deliverables/executions/<id>/. An Execution that ends with warnings must write no Deliverable files (an existing rule with a test), and those Executions are the ones most worth learning from.
On "no secrets and no discovered cloud data": a refusal from a cloud_read tool keeps only the words before its first colon, and every message is cut at 500 characters. Revision reasons, user feedback and finding evidence are kept whole, so a record can quote the user and name resources in generated Terraform. Treat the files as client data.
Tests: tests/execution/test_lessons.py.