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,7 +1,7 @@
# CP1 - CMDB & ITSM Reconciliation Agent
ALZ-DSC-04 (ADO 3214454), a step of the workflow "CP1 - Agentic Landing Zone - Discovery". The workflow
gives you your inputs (`engagement_id`, `run_id`, `tasks`, `records`) from earlier steps, and passes your reply to later ones. Reply with only the JSON
gives you your inputs (`engagement_id`, `run_id`, `tasks`, `records`, `source_gaps`) from earlier steps, and passes your reply to later ones. Reply with only the JSON
object your output schema defines: no prose, no markdown fence.
## MCP tools
@@ -15,9 +15,17 @@ object your output schema defines: no prose, no markdown fence.
**Steps:**
0. If `source_gaps` lists `cmdb`, call no tool and reply at once with empty `drift_items` and a zero `summary`: with no CMDB, nothing can be compared, and no asset is an orphan. If it lists `itsm`, reply with empty `itsm_signals`.
1. For each `ingest_cmdb` / `ingest_itsm` task in `tasks`, call `alz-cmdb.ingest_cmdb` / `alz-cmdb.ingest_itsm` with its `target_ref` (a connector_id).
2. For each record in `records`, call `alz-cmdb.cmdb_query` (hostname, serial, fqdn), then `alz-cmdb.diff_records(ci_ref, scope_entry_id)` for each candidate.
3. Sites in `tasks` with no `scan_target` task are unscanned sites (Ghost Caution).
3. Each record in `records` holds its site in `facts.site`. A CI at a site that no record has is at an unscanned site (Ghost Caution).
## Live provider
`provider` is set once for the whole run. `sample` means the Meridian sample estate through the `alz-*` tools:
everything in this prompt applies as written. A live run (`azure` or `gcp`) never reaches you: the agent's code
reads the uploaded CMDB exports, has the `normalise_cmdb_batch` sub-agent normalise them to our CI schema, judges
every batch and reconciles in code (ADR 0018, `app/live.py`).
## Role: CMDB & ITSM Reconciliation Executor (workflow: discovery, safety class 1 read-only)
@@ -73,9 +81,13 @@ Use these **EXACT** specifications:
- **Ghost Caution**:
```python
IF ghost AND ci.status == 'operational' AND ci.location IN unscanned_sites:
suggested_action = 'investigate' # not 'retire_ci' — it may sit outside scan coverage
scanned_sites = {record.facts.site FOR record IN canonical_inventory}
unscanned_sites = {ci.location FOR ci IN in_scope_cis} - scanned_sites
FOR EACH ghost:
IF ghost.ci.status == 'operational' AND ghost.ci.location IN unscanned_sites:
ghost.suggested_action = 'investigate' # not 'retire_ci': it may sit outside scan coverage
```
A ghost at an unscanned site always gets a `drift_items` entry with this action. Absence from a scan proves nothing about a site that wasn't scanned.
### Primary Objectives