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:
@@ -65,6 +65,10 @@
|
||||
{
|
||||
"source": "s3",
|
||||
"target": "s4"
|
||||
},
|
||||
{
|
||||
"source": "s4",
|
||||
"target": "s5"
|
||||
}
|
||||
],
|
||||
"steps": [
|
||||
@@ -148,7 +152,9 @@
|
||||
"inputs": {
|
||||
"from_workflow": [
|
||||
"engagement_id",
|
||||
"run_id"
|
||||
"run_id",
|
||||
"include_cmdb",
|
||||
"include_itsm"
|
||||
],
|
||||
"from_steps": {
|
||||
"source_documents": "u1.parsed_content"
|
||||
@@ -204,6 +210,7 @@
|
||||
"collect",
|
||||
"analyse",
|
||||
"critique",
|
||||
"report",
|
||||
null
|
||||
],
|
||||
"default": null,
|
||||
@@ -243,6 +250,24 @@
|
||||
"execution_output",
|
||||
"assessment_result"
|
||||
]
|
||||
},
|
||||
"include_cmdb": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"yes",
|
||||
"no"
|
||||
],
|
||||
"default": "yes",
|
||||
"description": "Use the engagement's CMDB connection in this run: yes or no. Read in the plan phase."
|
||||
},
|
||||
"include_itsm": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"yes",
|
||||
"no"
|
||||
],
|
||||
"default": "yes",
|
||||
"description": "Use the engagement's ITSM connection in this run: yes or no. Read in the plan phase."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -267,7 +292,8 @@
|
||||
"plan",
|
||||
"collect",
|
||||
"analyse",
|
||||
"critique"
|
||||
"critique",
|
||||
"report"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
@@ -331,6 +357,7 @@
|
||||
"collect",
|
||||
"analyse",
|
||||
"critique",
|
||||
"report",
|
||||
null
|
||||
]
|
||||
},
|
||||
@@ -382,6 +409,15 @@
|
||||
"manifest_head": {
|
||||
"type": "string",
|
||||
"description": "Hash at the head of the run's workspace manifest after this phase; each entry is chained to the one before it."
|
||||
},
|
||||
"report_markdown": {
|
||||
"type": "string"
|
||||
},
|
||||
"report_html": {
|
||||
"type": "string"
|
||||
},
|
||||
"report_data": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -474,6 +510,7 @@
|
||||
"collect",
|
||||
"analyse",
|
||||
"critique",
|
||||
"report",
|
||||
null
|
||||
],
|
||||
"default": null,
|
||||
@@ -513,6 +550,24 @@
|
||||
"execution_output",
|
||||
"assessment_result"
|
||||
]
|
||||
},
|
||||
"include_cmdb": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"yes",
|
||||
"no"
|
||||
],
|
||||
"default": "yes",
|
||||
"description": "Use the engagement's CMDB connection in this run: yes or no. Read in the plan phase."
|
||||
},
|
||||
"include_itsm": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"yes",
|
||||
"no"
|
||||
],
|
||||
"default": "yes",
|
||||
"description": "Use the engagement's ITSM connection in this run: yes or no. Read in the plan phase."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -537,7 +592,8 @@
|
||||
"plan",
|
||||
"collect",
|
||||
"analyse",
|
||||
"critique"
|
||||
"critique",
|
||||
"report"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
@@ -601,6 +657,7 @@
|
||||
"collect",
|
||||
"analyse",
|
||||
"critique",
|
||||
"report",
|
||||
null
|
||||
]
|
||||
},
|
||||
@@ -652,6 +709,15 @@
|
||||
"manifest_head": {
|
||||
"type": "string",
|
||||
"description": "Hash at the head of the run's workspace manifest after this phase; each entry is chained to the one before it."
|
||||
},
|
||||
"report_markdown": {
|
||||
"type": "string"
|
||||
},
|
||||
"report_html": {
|
||||
"type": "string"
|
||||
},
|
||||
"report_data": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -744,6 +810,7 @@
|
||||
"collect",
|
||||
"analyse",
|
||||
"critique",
|
||||
"report",
|
||||
null
|
||||
],
|
||||
"default": null,
|
||||
@@ -783,6 +850,24 @@
|
||||
"execution_output",
|
||||
"assessment_result"
|
||||
]
|
||||
},
|
||||
"include_cmdb": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"yes",
|
||||
"no"
|
||||
],
|
||||
"default": "yes",
|
||||
"description": "Use the engagement's CMDB connection in this run: yes or no. Read in the plan phase."
|
||||
},
|
||||
"include_itsm": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"yes",
|
||||
"no"
|
||||
],
|
||||
"default": "yes",
|
||||
"description": "Use the engagement's ITSM connection in this run: yes or no. Read in the plan phase."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -807,7 +892,8 @@
|
||||
"plan",
|
||||
"collect",
|
||||
"analyse",
|
||||
"critique"
|
||||
"critique",
|
||||
"report"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
@@ -871,6 +957,7 @@
|
||||
"collect",
|
||||
"analyse",
|
||||
"critique",
|
||||
"report",
|
||||
null
|
||||
]
|
||||
},
|
||||
@@ -922,6 +1009,15 @@
|
||||
"manifest_head": {
|
||||
"type": "string",
|
||||
"description": "Hash at the head of the run's workspace manifest after this phase; each entry is chained to the one before it."
|
||||
},
|
||||
"report_markdown": {
|
||||
"type": "string"
|
||||
},
|
||||
"report_html": {
|
||||
"type": "string"
|
||||
},
|
||||
"report_data": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -965,16 +1061,7 @@
|
||||
}
|
||||
},
|
||||
"hitl": {
|
||||
"enabled": true,
|
||||
"checkpoint_type": "approval",
|
||||
"review_focus": "The Engagement Lead reviews the critic's verdict, declared gaps and SME queues before Assessment starts. A fail verdict is never auto-approved.",
|
||||
"timeout_hours": 24,
|
||||
"allowed_actions": [
|
||||
"continue",
|
||||
"rerun",
|
||||
"abort"
|
||||
],
|
||||
"max_reruns": 2
|
||||
"enabled": false
|
||||
},
|
||||
"data": {
|
||||
"agentType": "cp1_alz_discovery_orchestrator_agent",
|
||||
@@ -1023,6 +1110,7 @@
|
||||
"collect",
|
||||
"analyse",
|
||||
"critique",
|
||||
"report",
|
||||
null
|
||||
],
|
||||
"default": null,
|
||||
@@ -1062,6 +1150,24 @@
|
||||
"execution_output",
|
||||
"assessment_result"
|
||||
]
|
||||
},
|
||||
"include_cmdb": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"yes",
|
||||
"no"
|
||||
],
|
||||
"default": "yes",
|
||||
"description": "Use the engagement's CMDB connection in this run: yes or no. Read in the plan phase."
|
||||
},
|
||||
"include_itsm": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"yes",
|
||||
"no"
|
||||
],
|
||||
"default": "yes",
|
||||
"description": "Use the engagement's ITSM connection in this run: yes or no. Read in the plan phase."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -1086,7 +1192,8 @@
|
||||
"plan",
|
||||
"collect",
|
||||
"analyse",
|
||||
"critique"
|
||||
"critique",
|
||||
"report"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
@@ -1150,6 +1257,7 @@
|
||||
"collect",
|
||||
"analyse",
|
||||
"critique",
|
||||
"report",
|
||||
null
|
||||
]
|
||||
},
|
||||
@@ -1201,6 +1309,324 @@
|
||||
"manifest_head": {
|
||||
"type": "string",
|
||||
"description": "Hash at the head of the run's workspace manifest after this phase; each entry is chained to the one before it."
|
||||
},
|
||||
"report_markdown": {
|
||||
"type": "string"
|
||||
},
|
||||
"report_html": {
|
||||
"type": "string"
|
||||
},
|
||||
"report_data": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"engagement_id",
|
||||
"run_id",
|
||||
"phase",
|
||||
"status",
|
||||
"artifacts",
|
||||
"summary",
|
||||
"issues",
|
||||
"next_phase",
|
||||
"verdict",
|
||||
"manifest_head"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "s5",
|
||||
"agent": "cp1_alz_discovery_orchestrator_agent",
|
||||
"agent_type": "cp1_alz_discovery_orchestrator_agent",
|
||||
"name": "CP1 - ALZ Discovery Orchestrator Agent - report Step",
|
||||
"timeout_minutes": 20,
|
||||
"type": "sequential",
|
||||
"executionLevel": 5,
|
||||
"parallelGroup": 5,
|
||||
"depends_on": [
|
||||
"s4"
|
||||
],
|
||||
"position": {
|
||||
"x": 1280,
|
||||
"y": 0
|
||||
},
|
||||
"inputs": {
|
||||
"from_workflow": [
|
||||
"engagement_id",
|
||||
"run_id"
|
||||
],
|
||||
"from_steps": {
|
||||
"phase": "s4.next_phase"
|
||||
}
|
||||
},
|
||||
"hitl": {
|
||||
"enabled": true,
|
||||
"checkpoint_type": "approval",
|
||||
"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"
|
||||
],
|
||||
"max_reruns": 2
|
||||
},
|
||||
"data": {
|
||||
"agentType": "cp1_alz_discovery_orchestrator_agent",
|
||||
"name": "CP1 - ALZ Discovery Orchestrator Agent - report Step",
|
||||
"description": "Phase report: Write the customer's report as Markdown and HTML, in code, from the run's records. No model is called.",
|
||||
"category": "agent",
|
||||
"temporalActivityName": "generic_agent_call",
|
||||
"endpoint": {
|
||||
"url": "http://cp1-alz-discovery-orchestrator-agent.agents.svc.cluster.local:8080",
|
||||
"method": "POST",
|
||||
"timeout": 1200,
|
||||
"protocol": "JSONRPC",
|
||||
"protocol_version": "0.3.0"
|
||||
},
|
||||
"agent_metadata": {
|
||||
"agent_name": "cp1_alz_discovery_orchestrator_agent"
|
||||
},
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"title": "One discovery phase for one engagement run",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"engagement_id": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$",
|
||||
"description": "The engagement being discovered. One engagement is one platform project.",
|
||||
"examples": [
|
||||
"ENG-MERIDIAN-001"
|
||||
]
|
||||
},
|
||||
"run_id": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$",
|
||||
"description": "The discovery run. Every phase of one run passes the same id, which is what lets a later phase read what an earlier one stored.",
|
||||
"examples": [
|
||||
"RUN-2026-10-29-01"
|
||||
]
|
||||
},
|
||||
"phase": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"enum": [
|
||||
"plan",
|
||||
"collect",
|
||||
"analyse",
|
||||
"critique",
|
||||
"report",
|
||||
null
|
||||
],
|
||||
"default": null,
|
||||
"description": "Which phase to run. Phases run in this order; each needs the one before it in the same run. Left out, the run's workspace decides: the first phase it has not yet stored. A workflow step passes the previous step's next_phase."
|
||||
},
|
||||
"batch": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"minimum": 1,
|
||||
"default": null,
|
||||
"description": "collect only: the scan batch from the plan to run. Null runs every batch, which suits a small estate."
|
||||
},
|
||||
"source_documents": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"default": null,
|
||||
"description": "plan only: the text of files uploaded at run time, as a 'Parse Assessment Files' step hands it on (its parsed_content), e.g. a CMDB or asset export or a scope list. Imported into the run workspace as plan/source-documents."
|
||||
},
|
||||
"artifacts": {
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
],
|
||||
"default": null,
|
||||
"items": {
|
||||
"type": "object"
|
||||
},
|
||||
"description": "plan only: project artifacts an 'Artifacts' step selected (its artifacts output), e.g. an earlier run's outputs or a file added to the project. Each is imported into the run workspace as plan/artifact-NN, with its id, type and sha256 kept as provenance.",
|
||||
"x-artifact-types": [
|
||||
"file",
|
||||
"structured_data",
|
||||
"report",
|
||||
"execution_output",
|
||||
"assessment_result"
|
||||
]
|
||||
},
|
||||
"include_cmdb": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"yes",
|
||||
"no"
|
||||
],
|
||||
"default": "yes",
|
||||
"description": "Use the engagement's CMDB connection in this run: yes or no. Read in the plan phase."
|
||||
},
|
||||
"include_itsm": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"yes",
|
||||
"no"
|
||||
],
|
||||
"default": "yes",
|
||||
"description": "Use the engagement's ITSM connection in this run: yes or no. Read in the plan phase."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"engagement_id",
|
||||
"run_id"
|
||||
]
|
||||
},
|
||||
"outputSchema": {
|
||||
"type": "object",
|
||||
"title": "The outcome of one discovery phase",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"engagement_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"run_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"phase": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"plan",
|
||||
"collect",
|
||||
"analyse",
|
||||
"critique",
|
||||
"report"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"completed",
|
||||
"completed_with_gaps",
|
||||
"halted",
|
||||
"failed"
|
||||
],
|
||||
"description": "completed only when the phase's checks passed. A critique whose verdict is not pass is never completed."
|
||||
},
|
||||
"artifacts": {
|
||||
"type": "array",
|
||||
"description": "What this phase stored in the run workspace, as recorded by the workspace itself (post_process replaces the model's list with the manifest).",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"ref": {
|
||||
"type": "string",
|
||||
"description": "Workspace reference: <phase>/<name>."
|
||||
},
|
||||
"sha256": {
|
||||
"type": "string"
|
||||
},
|
||||
"produced_by": {
|
||||
"type": "string",
|
||||
"description": "orchestrator, or the sub-agent whose reply this is."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"ref",
|
||||
"sha256",
|
||||
"produced_by"
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"maxLength": 800,
|
||||
"description": "Three sentences at most, for the engagement lead."
|
||||
},
|
||||
"issues": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Anything that stopped or weakened the phase: refused calls, failed sub-agents, failed checks, declared gaps."
|
||||
},
|
||||
"next_phase": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"enum": [
|
||||
"collect",
|
||||
"analyse",
|
||||
"critique",
|
||||
"report",
|
||||
null
|
||||
]
|
||||
},
|
||||
"verdict": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"description": "critique only: the verdict as enforced by post_process, not as the model wrote it.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"verdict": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pass",
|
||||
"fail"
|
||||
]
|
||||
},
|
||||
"coverage_complete": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"coverage_gaps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"declared_gaps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"reasons": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"verdict",
|
||||
"coverage_complete",
|
||||
"coverage_gaps",
|
||||
"declared_gaps",
|
||||
"reasons"
|
||||
]
|
||||
},
|
||||
"manifest_head": {
|
||||
"type": "string",
|
||||
"description": "Hash at the head of the run's workspace manifest after this phase; each entry is chained to the one before it."
|
||||
},
|
||||
"report_markdown": {
|
||||
"type": "string"
|
||||
},
|
||||
"report_html": {
|
||||
"type": "string"
|
||||
},
|
||||
"report_data": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
Reference in New Issue
Block a user