Files
Jonathan Boniface 8bb62a4a42 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>
2026-11-05 22:13:25 +00:00

6.0 KiB
Raw Blame History

Implementation plan: cp1-alz-discovery-orchestrator-agent

For coding agents. Update the status column in the same change as the work, and add an ADR for anything that changes a requirement.

Status: done, in progress, blocked (<on whom>), todo.

Goal

Deploy ALZ-F01 Discovery to crucible-kab-dev-aks as one orchestrator agent with eight sub-agents, run end to end on the Meridian sample estate, and import the KAB workflow. Then repeat the shape for ALZ-F02 to F07.

Steps

# Step Files Verified by Status
1 Agent folder in the cp4-agents layout, renamed cp1-…-agent, version 0.1.0 agent.yaml, RELEASE_NOTES.md, Dockerfile check_agents.py (0 problems) done
2 Eight sub-agent prompts from the v1.1 stories, without the alz-run tools prompts/ Review against the story files done
3 Run workspace, delegate, rules app/workspace.py, app/tools.py, app/rules.py dry_run.py done
4 Hooks: phase checks, enforced verdict, outcome records, inferred phase app/business_logic.py, schemas/input.json dry_run.py (chain and failure cases) done
5 Phase skills and orchestrator prompt skills/, prompt.md Eval cases against a live run done (untested live)
6 Eval cases: two need no MCP; the rest need the Meridian estate eval/cases.yaml kyndryl_agent_runtime.eval done (not yet run)
7 Kubernetes folder: cp4 placeholders, CP1 ConfigMap values kubernetes/ render_k8s.py + kustomize build done
8 KAB workflow export, four phase steps ../workflows/cp1-alz-discovery.json, ../scripts/build_workflow.py Same keys as the cp4 export done
9 Human docs and ADRs 0001–0011 docs/ Review done
10 Confirm the cluster LiteLLM serves the agent's models kubernetes/configmap.yaml /v1/models on the cluster gateway done (2026-11-01): claude-sonnet-5-5 isn't served, so the critic moved to gpt-5.6-sol (ADR 0009)
11 Build and push both images to cruciblecoredevacr.azurecr.io/kab/cp1/ — podman push done (2026-10-29)
12 Deploy the sample MCP server, then register it under the nine logical names ../../../mcp-servers/alz-discovery-sample/ Gateway lists 20 tools done (2026-11-01), in the CP1 tenant
13 Create the agent in KAB, store MCP_AGENT_API_KEY in its Secret — Secret exists; no file holds the key done (2026-11-01): key stored, expires 2026-12-01
13a Set EXECUTION_STORAGE_ROOT=/data/executions in kubernetes/configmap.yaml: the platform doesn't set it, so the workspace was falling back to the container's /tmp kubernetes/configmap.yaml In the pod, the workspace resolves to /data/executions/alz-discovery/…, writable done (2026-10-29)
14 kubectl diff -k, then apply -k, for each component ../../../build/crucible-kab-dev/* rollout status; agent card served done (2026-10-29): agent and MCP server deployed; requests fail at startup until step 13
14a Uploads and artifacts (ADR 0012): app/artifacts.py, contract inputs, plan and analyse skills, front steps in build_workflow.py, scripts/kab_import_workflow.py; version 0.2.0 app/, schemas/, skills/, ../scripts/ Dry run (30 checks incl. 11 for artifacts) done (2026-10-29)
14b Move into kab-agents-and-workflows/cp1-agents (sub-agents/<Feature>/); shared scripts, MCP server and deploy profile at the repository root — check_agents.py 0 problems; dry run 0 failed; build_workflow.py output identical; kubectl diff -k empty done (2026-10-29)
14c Timeouts: every workflow step 20 minutes (AGENT_STEP_TIMEOUT_MINUTES in ../../../scripts/kab_front_steps.py, was 25); AGENT_MAX_DURATION_SECONDS 1140 so the agent answers inside the step. ADR 0004's "25 minutes" is now 19 ../scripts/build_workflow.py, kubernetes/configmap.yaml Export rebuilt; kubectl diff -k shows only that line done (2026-10-29); not yet applied
14d Report phase (ADR 0013), network coverage in the plan check, source_gaps in the analyse skill; version 0.6.0 app/report.py, app/business_logic.py, skills/ dry_run.py done (2026-11-01): 0.6.1 deployed; wf_edc8998f-cd1f-46d2-91e5-fc545fe218c3; SUB-002 completed all phases, 40 of 44, verdict fail
14e Report narrative: a model writes a marked executive summary and recommendations from the structured findings only. Code keeps every finding; a check confirms each cited id exists and that source gaps and the verdict are stated; the Engagement Lead approves it at the gate. Test prompt injection on it. Start after the sub-agent pattern's first live run, so the patterns compare cleanly Update ADR 0013 Cited ids checked in code; injection test passes todo
14f Store MCP results in code: the model names the call, and code calls the tool and stores the result, so it never carries the content. SUB-002's call log was cut short in the model app/tools.py, skills/ Stored record equals the tool's result todo (needs owner's decision)
15 Run the eval cases against the deployed agent eval/cases.yaml All cases pass todo
16 Import the workflow and run it on ENG-MERIDIAN-001 ../workflows/cp1-alz-discovery.json Four phases complete; SE-004 a declared gap; SE-032's injection flagged and not obeyed; a verdict recorded todo
17 Update the ADO items and story files to match ADRs 0001–0011 Engineering hub workspace Board review todo (product owner approval; never change existing tickets without it)
18 Repeat for ALZ-F02 Assessment … F07 Landing Zone ../cp1-alz-<feature>-orchestrator-agent/ Same checks todo

Open questions (owner)

  • Platform team: may agent functions write to execution-storage-pvc, and for how long is client data kept? (ADR 0010)
  • Platform team: will Kyndryl's modernization-agents CI accept an agent with app/? (ADR 0008)
  • Product owner: confirm the Proposed ADRs: 0004, 0005, 0006, 0007, 0009, 0010.