ALZ-F01 Discovery sub-agent pattern: report phase and fetch in code

Orchestrator report phase (ADR 0013) and fetching in code (ADR 0014), with the report renderer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-05 22:13:25 +00:00
parent e22d037ab0
commit 8bb62a4a42
33 changed files with 1449 additions and 128 deletions

View File

@@ -3,7 +3,7 @@
| | |
|---|---|
| Status | Proposed |
| Date | 2026-10-29 |
| Date | 2026-10-29, changed 2026-11-01 |
| Decided by | Built as a default; awaiting product owner and platform confirmation |
| Requirements changed | Earlier draft settings `claude-sonnet-4-5` / `gpt-5.4`; DSC-08's note "state if the critic shares a model with any executor" |
@@ -13,8 +13,8 @@ The Azure AI resource behind the gateway deploys `gpt-4o`, `gpt-5.6-sol`, `claud
## Decision
The agent and seven sub-agents use `gpt-5.6-sol` (temperature 1, max tokens 32000), as the CP4 agents do. The critic uses `claude-sonnet-5-5` (`DSC_08_CRITIC_LLM_MODEL`), a different model family from the agents it judges. Eval cases wait 330 seconds, because `gpt-5.6-sol` is a reasoning model.
The agent and all eight sub-agents use `gpt-5.6-sol` (temperature 1, max tokens 32000), as the CP4 agents do. The critic was to use `claude-sonnet-5-5`, but the cluster's LiteLLM doesn't serve it (checked 2026-11-01), so the product owner moved it to `gpt-5.6-sol`.
## Consequences
Confirm both names on the cluster's LiteLLM gateway before the first run. If `claude-sonnet-5-5` isn't served, the critic's calls fail and the critique phase reports `failed`. Point `DSC_08_CRITIC_LLM_MODEL` at another model the gateway serves. Removing the variable instead would put the critic on the same model as the agents it judges.
The critic can share blind spots with the agents it judges. It states this in its `note`, as DSC-08 requires. Its verdict is still enforced in code. A different model for the critic remains the better design, so revisit this when one is on the gateway.

View File

@@ -0,0 +1,15 @@
# ADR 0013: a report phase, written in code
Status: Proposed. Date: 2026-11-01.
## Context
The run ended at the verdict, with nothing an Engagement Lead could hand to a customer. The individual-agents pattern has a report step (its ADR 0012).
## Decision
Add a fifth phase, `report`, answered in `pre_process` with no model. It reads the workspace, takes the verdict from `_check_critique`, and stores the report as hash-chained records. `app/report.py` is this pattern's own copy: the two patterns share no code. The approval gate moves from the critique step to this one.
## Consequences
The report can't state more than the workspace holds, and it can't overrule the enforced verdict. A change to the report must be made in both patterns. The step's copy is a draft: `scripts/render_discovery_report.py` writes the clean copy from `report_data` after approval.

View File

@@ -0,0 +1,15 @@
# ADR 0014: MCP results are fetched and stored in code
Status: Proposed. Date: 2026-11-01. Changes how ADR 0003 works.
## Context
The orchestrator's model copied each MCP result into `workspace_put`. On `SUB-002` it stored only the first 7 entries of the call log, despite being told to store results unchanged. The critic then reported five real scans as unmatched. The hash chain protects a record once stored, but can't show that it matches what the tool returned.
## Decision
The model names the calls through `fetch`. Code makes them, stores the results exactly as they came back, and returns a receipt. `agent.yaml` still declares the MCP tools so that code can call them, and `before_model` withholds them from the model. `workspace_put` is no longer offered.
## Consequences
A stored result is what the tool returned, and a refused call is stored and reported. The model reads a record only when a step needs it, which saves tokens and suits large estates. It has less freedom, and every call must be one `fetch` allows. The sub-agents are unchanged.