ALZ-F01 Discovery: package step, value scorecard, application grouping, cases

- New cp1-discovery-package-agent (ADR 0020): one package per reviewed run, every part
  hashed (sha256 over canonical JSON), with a manifest and a value scorecard.
- Applications grouped CMDB -> tag -> resource group with a judged model fallback (ADR 0021):
  CMDB 0.7.0 carries ownership, dependency mapping 0.6.0 groups, report 0.9.0 shows them.
- Critic 0.6.1 accepts the producers' enums; build_workflow.py refuses a consumer enum
  narrower than its producer's.
- Code hooks, sub-agents and tests for the inventory, CMDB, dependency, planner and critic
  agents; the report and Well-Architected review agents; ADRs 0012-0021.
- Workflow cases with value bars and run limits; run evaluation and usage collection scripts;
  the run context template and the field-by-field review for ADR 0016.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-05 22:13:25 +00:00
parent f659564208
commit 9e503885cc
211 changed files with 18170 additions and 158 deletions

View File

@@ -1,6 +1,6 @@
# ALZ-F01 Discovery: individual agents
The ALZ-F01 Discovery Feature (ADO 3214441) as **eight separate agents with no orchestrator**, one per story, in KAB's declarative agent shape (`agent.yaml`, `prompt.md`, `schemas/`, `eval/`) on the KAB agent runtime. It follows `cp4-agents`: the same folder rules and the same workflow export format.
The ALZ-F01 Discovery Feature (ADO 3214441) as **eleven separate agents with no orchestrator**: one per story, plus the report (ADR 0012), the Well-Architected review (ADR 0014) and the package for the Assessment workflow (ADR 0020), in KAB's agent shape (`agent.yaml`, `prompt.md`, `schemas/`, `eval/`) on the KAB agent runtime. Steps whose answer can be computed are answered in code from a `pre_process` hook, and say so in their ADR. It follows `cp4-agents`: the same folder rules and the same workflow export format.
**This is one of two patterns for CP1 Discovery, and which one is adopted hasn't been decided.**
- **This folder:** separate agents, chained by the KAB workflow.
@@ -8,25 +8,33 @@ The ALZ-F01 Discovery Feature (ADO 3214441) as **eight separate agents with no o
The two patterns are kept apart so they can be compared, and each records its own decisions ([docs/adr/](docs/adr/README.md)).
| Step | Agent | Story | Takes from earlier steps |
|---|---|---|---|
| s1 | [`cp1-discovery-planner-agent`](cp1-discovery-planner-agent/) | ALZ-DSC-01 | — |
| s2 | [`cp1-estate-scan-executor-agent`](cp1-estate-scan-executor-agent/) | ALZ-DSC-02 | tasks |
| s3 | [`cp1-asset-inventory-normalisation-agent`](cp1-asset-inventory-normalisation-agent/) | ALZ-DSC-03 | findings |
| s4 | [`cp1-cmdb-itsm-reconciliation-agent`](cp1-cmdb-itsm-reconciliation-agent/) | ALZ-DSC-04 | tasks, records |
| s5 | [`cp1-data-classification-agent`](cp1-data-classification-agent/) | ALZ-DSC-05 | records |
| s6 | [`cp1-network-discovery-assessment-agent`](cp1-network-discovery-assessment-agent/) | ALZ-DSC-07 | tasks, records (runs alongside s5) |
| s7 | [`cp1-dependency-mapping-agent`](cp1-dependency-mapping-agent/) | ALZ-DSC-06 | records, drift_items, flows |
| s8 | [`cp1-discovery-critic-agent`](cp1-discovery-critic-agent/) | ALZ-DSC-08 | everything, then the Engagement Lead's approval |
| Step | Agent | Story | Answered by | Takes from earlier steps |
|---|---|---|---|---|
| s1 | [`cp1-discovery-planner-agent`](cp1-discovery-planner-agent/) | ALZ-DSC-01 | code (live) / model (sample) | the run context file |
| s2 | [`cp1-estate-scan-executor-agent`](cp1-estate-scan-executor-agent/) | ALZ-DSC-02 | model | tasks |
| s3 | [`cp1-asset-inventory-normalisation-agent`](cp1-asset-inventory-normalisation-agent/) | ALZ-DSC-03 | model in batches, judged in code (ADR 0015) | findings |
| s4 | [`cp1-cmdb-itsm-reconciliation-agent`](cp1-cmdb-itsm-reconciliation-agent/) | ALZ-DSC-04 | model in batches, judged and reconciled in code (ADR 0018) | tasks, records, uploaded CMDB exports |
| s5 | [`cp1-data-classification-agent`](cp1-data-classification-agent/) | ALZ-DSC-05 | model | records |
| s6 | [`cp1-network-discovery-assessment-agent`](cp1-network-discovery-assessment-agent/) | ALZ-DSC-07 | model | tasks, records (runs alongside s5) |
| s7 | [`cp1-dependency-mapping-agent`](cp1-dependency-mapping-agent/) | ALZ-DSC-06 | code (ADR 0019) | records, findings, drift, CMDB CIs and relationships |
| s8 | [`cp1-discovery-critic-agent`](cp1-discovery-critic-agent/) | ALZ-DSC-08 | model on a different model, with counts in code (ADR 0017) | everything |
| s11 | [`cp1-well-architected-review-agent`](cp1-well-architected-review-agent/) | ALZ-DSC-10 | code (ADR 0014) | records, source gaps, verdict |
| s9 | [`cp1-discovery-report-agent`](cp1-discovery-report-agent/) | report (ADR 0012) | code | everything, then **the Engagement Lead's approval** |
| s10, s12 | KAB `format_for_ui` | | platform | the approved report and review pages |
| s13 | [`cp1-discovery-package-agent`](cp1-discovery-package-agent/) | package (ADR 0020) | code | every step's output: one artifact for the Assessment workflow, with a manifest and the value scorecard |
How much of what Assessment needs a run gives is measured by the value scorecard; the plan for raising it is [docs/discovery-value-plan.md](docs/discovery-value-plan.md).
Read [MCP tools and context](../../docs/platform-issues/agent-tools-and-context/individual-agents-report-2026-11-01.md) before changing an agent. It explains why each agent holds its tools, and what carries from one step to the next.
## Layout
| Path | What it is |
|---|---|
| `cp1-*-agent/` | An agent. `README.md` and `docs/` are for people; `CLAUDE.md` and `.agents/` are for coding agents. |
| `workflows/` | This Feature's KAB workflow export |
| `scripts/` | `build_workflow.py` (writes `workflows/`) and `scaffold_from_stories.py` (generated the agent folders) |
| `docs/` | This pattern's [ADRs](docs/adr/README.md) |
| `workflows/` | This Feature's KAB workflow export, the run context template, and the workflow [cases](workflows/cases/README.md) |
| `scripts/` | `build_workflow.py` (writes `workflows/`; refuses a step whose input would refuse an earlier step's value), `evaluate_workflow_run.py` (judges a run against a case, with its scorecard), `collect_run_usage.py` (a run's tokens, model calls and seconds, for a case's limits), `check_context_doc.py`, and `scaffold_from_stories.py` (generated the first agent folders) |
| `docs/` | This pattern's [ADRs](docs/adr/README.md) and the [value plan](docs/discovery-value-plan.md) |
These are shared with the other pattern and live at the repository root:
- the MCP server `alz-discovery-sample` ([`../../mcp-servers/`](../../mcp-servers/));