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>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"""Write workflows/cp1-alz-discovery.json: the KAB workflow export for ALZ-F01 Discovery.
|
||||
|
||||
The same export format as cp4-agents' workflow (export_version 2.0.0). Four steps call the one orchestrator agent,
|
||||
one per phase. A step can pass only workflow inputs and earlier steps' outputs, so step 1 sends no phase (the agent
|
||||
one per phase. The report step stops for approval. A step can pass only workflow inputs and earlier steps' outputs, so step 1 sends no phase (the agent
|
||||
plans a new run) and each later step sends the previous step's next_phase. The critique step stops for the
|
||||
Engagement Lead's approval. The step schemas are the agent's own contract, read from its schemas/ folder, so run
|
||||
this again after changing them. Standard library only.
|
||||
@@ -39,6 +39,7 @@ PHASES = [
|
||||
("collect", "Ingest CMDB / ITSM records and scan the planned targets into one finding per scope entry."),
|
||||
("analyse", "Build the canonical inventory, CMDB drift, data classification, network map and dependency graph."),
|
||||
("critique", "Validate coverage, injection handling, evidence and tool-call integrity; the verdict is enforced in code."),
|
||||
("report", "Write the customer's report as Markdown and HTML, in code, from the run's records. No model is called."),
|
||||
]
|
||||
|
||||
|
||||
@@ -57,7 +58,7 @@ def build(with_upload: bool = True, artifact_ids=()) -> dict:
|
||||
steps, connections = list(front), []
|
||||
for index, (phase, description) in enumerate(PHASES):
|
||||
step_id = f"s{index + 1}"
|
||||
inputs = {"from_workflow": ["engagement_id", "run_id"]}
|
||||
inputs = {"from_workflow": ["engagement_id", "run_id"] + ([] if index else ["include_cmdb", "include_itsm"])}
|
||||
depends = [f"s{index}"] if index else []
|
||||
if index:
|
||||
inputs["from_steps"] = {"phase": f"s{index}.next_phase"}
|
||||
@@ -75,11 +76,11 @@ def build(with_upload: bool = True, artifact_ids=()) -> dict:
|
||||
depends.append(f["id"])
|
||||
connections.append({"source": f["id"], "target": step_id})
|
||||
hitl = {"enabled": False}
|
||||
if phase == "critique":
|
||||
if phase == "report":
|
||||
hitl = {
|
||||
"enabled": True,
|
||||
"checkpoint_type": "approval",
|
||||
"review_focus": "The Engagement Lead reviews the critic's verdict, declared gaps and SME queues before "
|
||||
"review_focus": "The Engagement Lead reads the report, with the verdict, declared gaps and SME queues, before "
|
||||
"Assessment starts. A fail verdict is never auto-approved.",
|
||||
"timeout_hours": 24,
|
||||
"allowed_actions": ["continue", "rerun", "abort"],
|
||||
|
||||
Reference in New Issue
Block a user