Add CP1 Discovery agents in both patterns
All checks were successful
check agents / check (push) Successful in 10s

ALZ-F01 Discovery as a sub-agent orchestrator (sub-agents/) and as eight
individual declarative agents (individual-agents/), with their KAB workflow
exports. Shared check, render and import scripts, the alz-discovery-sample
MCP server, the crucible-kab-dev deploy profile, deployment docs, platform
issue reports and the source material. Agent steps time out at 20 minutes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 18:25:57 +00:00
commit 416c66ced4
331 changed files with 33561 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
# Context: individual agents, ALZ-F01 Discovery
Facts for this Feature's individual-agents pattern, for coding agents. Repository-wide facts are in `../../.agents/CONTEXT.md`. Per-agent context is in `<agent>/.agents/CONTEXT.md`.
## Pattern
- **Eight declarative agents, one per ALZ-DSC story.** Each declares its own read-only MCP tools under `mcp:` (allowed for top-level agents; only sub-agents can't hold MCP tools).
- **The workflow (`workflows/cp1-alz-discovery-individual.json`) is the orchestration:** step order through `parallelGroup` and `executionLevel`, and data through `from_steps` (`"<input>": "sN.<output field>"`). The step map is `STEPS` in `scripts/build_workflow.py`.
- **Nothing persists between steps** except their replies (ADR 0010). There's no workspace, no hooks and no enforced verdict; the critic is gated by a human approval (ADR 0006).
## Sources of truth
| What | Where |
|---|---|
| Requirements | ADO Epic 3214440, Feature 3214441, stories 3214451–3214458; v1.1 story files in the engineering hub workspace (`drafts/cp1/agentic-landing-zone/stories/F01-discovery/`) |
| Agent shape and repository conventions | `cp4-agents` (gitea.kyndemo.live/agents/cp4-agents) |
| Changes to requirements | `docs/adr/` (this pattern only) |
| The MCP server | `../../mcp-servers/alz-discovery-sample` (shared with the sub-agent pattern) |
## Platform facts
- **Runtime:** `cruciblecoredevacr.azurecr.io/kab/agent-runtime-adk:0.35.7`. Images are pushed to `cruciblecoredevacr.azurecr.io/kab/cp1/<agent>:<version>`.
- **Cluster:** `crucible-kab-dev-aks`, namespace `agents`, kubeconfig `/mnt/c/Users/JonathanBoniface/.kube/config`. The gateways are in `core-components`: LiteLLM on `:4000`, the MCP gateway on `:8000`. There's no `agent-platform-connections` ConfigMap, so the deploy profile sets the gateway URLs.
- **An agent needs its own `MCP_AGENT_API_KEY`** (Secret `<agent>-secrets`), issued when it's created in KAB. Without it, every request fails at startup.
- **As of 2026-10-29, MCP server registration fails** in the MCP gateway, because KAB's default tenant `6ada663eb5b88053a9e43723` isn't mapped there (it fails row-level security). This blocks every agent in both patterns.

View File

@@ -0,0 +1,27 @@
# Implementation plan: individual agents, ALZ-F01 Discovery
For coding agents. Update the status in the same change as the work.
Status values: `done`, `blocked (<on whom>)`, `todo`.
| # | Step | Verified by | Status |
|---|---|---|---|
| 1 | Generate the eight agent folders from the v1.1 stories, cp4-agents style, without `alz-run` or the write tools | `scripts/check_agents.py` (cp4's rules) 0 problems; the runtime parses every `agent.yaml`; every schema is valid | done |
| 2 | Eval cases per agent, Meridian estate, `timeout: 330` | `python -m kyndryl_agent_runtime.eval --validate` | done (not yet run live) |
| 3 | Workflow export: 8 steps, `from_steps` hand-offs, critic approval | `build_workflow.py` asserts the fields on both sides; same keys as cp4's export | done |
| 4 | Deploy profile and kustomize render | `render_k8s.py` + `kustomize build` (3 objects each) | done |
| 5 | Docs: README, user guides, ADRs 0001–0010; agent context | Review | done |
| 6 | Fix the MCP gateway tenant mapping so MCP servers can be registered | Registration saves | blocked (KAB platform admin) |
| 7 | Build and push the eight images | `podman push` | done (2026-10-29, on the pinned runtime 0.35.7) |
| 8 | Create the eight agents in KAB; store each `MCP_AGENT_API_KEY` | Secrets exist; no file holds a key | blocked (step 6) |
| 9 | `kubectl diff -k`, then `apply -k`, for each agent | Pods ready; agent cards served | done (2026-10-29): all 8 Ready, cards served; requests fail at startup until step 8 |
| 9a | Uploads and artifacts (ADR 0011): `source_documents` / `reference_documents` on the planner and inventory (0.2.0, regenerated), front steps in `build_workflow.py`, `scripts/kab_import_workflow.py` | cp4 check 0 problems; runtime parse; eval validation; builder asserts wiring | done (2026-10-29) |
| 9b | Move into `kab-agents-and-workflows/cp1-agents` (`individual-agents/<Feature>/`); shared scripts, MCP server and deploy profile at the repository root; `repo: cp1-agents-individual` kept per agent (Deployment selector) | `check_agents.py` 0 problems; `build_workflow.py` output identical; `kubectl diff -k` empty for all 8 | done (2026-10-29) |
| 9c | Timeouts: every workflow step 20 minutes (`AGENT_STEP_TIMEOUT_MINUTES`, shared); `AGENT_MAX_DURATION_SECONDS` 1140 in each ConfigMap and in the scaffold | Export rebuilt; `kubectl diff -k` shows only that line for all 8 | done (2026-10-29); not yet applied |
| 10 | Run each agent's eval cases, then the workflow on `ENG-MERIDIAN-001` | All cases pass; the critic step waits for approval | todo |
| 11 | Compare with `sub-agents/ALZ-F01: Discovery Workflow Agent/` and record which pattern is adopted | An ADR in both patterns | todo (product owner) |
## Open questions (owner)
- **Platform team:** the tenant mapping (step 6). Does the executor externalise large step outputs between steps? (ADR 0010)
- **Product owner:** confirm the Proposed ADRs: 0003, 0004, 0005, 0006, 0007, 0008, 0010.