--- name: discovery-analyse description: Analyse collected discovery data -- inventory, CMDB reconciliation, data classification, network and dependencies -- through the specialist sub-agents. Use when the request's phase is analyse. metadata: agent.tools: workspace_put workspace_get workspace_list delegate agent.tags: discovery analysis --- Run the analyse phase in these steps, in order. Each step's sub-agent needs the records the steps before it stored. Call `workspace_list()` first to see the refs. 1. Inventory. Call `alz-inventory.list_apps`, then `alz-inventory.get_app` for each asset it lists; store the results as `inventory-sources`. Then `delegate("dsc_03_inventory", ..., input_refs=[every collect/findings-* ref, "collect/cmdb-records", "collect/itsm-records", "analyse/inventory-sources", ])`. 2. Reconciliation. For each canonical record in `analyse/inventory`, call `alz-cmdb.cmdb_query`, then `alz-cmdb.diff_records` for each candidate; store the results as `cmdb-matches`. Then `delegate("dsc_04_cmdb_reconciliation", ..., input_refs=["analyse/inventory", "analyse/cmdb-matches", "collect/cmdb-records", "collect/itsm-records", "plan/task-graph", ])`. 3. Data classification. For each record in `analyse/inventory` whose `asset_class` is `database` or `storage_array`, call `alz-schema.scan_schema`; store the results as `schemas`. Then `delegate("dsc_05_data_classification", ..., input_refs=["analyse/inventory", "analyse/schemas"])`. 4. Network. For each site in the plan's `collect_network` tasks, call `alz-network.collect_topology`, `alz-network.map_flows` and `alz-network.analyze_bottlenecks`; store the results as `network-sources`. Then `delegate("dsc_07_network", ..., input_refs=["analyse/network-sources", "analyse/inventory"])`. 5. Dependencies. For each canonical record, call `alz-dependency.get_dependencies` and `alz-dependency.trace_calls`, then `alz-dependency.trace` for the set; store the results as `dependency-sources`. Then `delegate("dsc_06_dependency_mapping", ..., input_refs=["analyse/inventory", "analyse/drift-report", "analyse/network", "analyse/dependency-sources"])`. Never read row data and never pass a tool anything but ids. If a step's tool calls are refused, still delegate with what you stored, and report the refusal. Reply with the phase outcome: - `summary`: canonical records, drift items, classified stores, edges, network findings. - `issues`: refused calls, failed hand-offs, records queued for SME review. - `next_phase`: `critique`. `verdict`: null.