F02: Assessment report and package (ADR 0014, 0015); register agents in KAB
Some checks failed
check agents / check (push) Failing after 14s
Some checks failed
check agents / check (push) Failing after 14s
- Report (cp1-assessment-report-agent 0.2.0, step s7): a model writes the Assessment report from facts worked out in code (register, gaps, scorecard, rule traces, checks, and what each application is from the Discovery package); code sets the verdict and renders the pages. The disposition_signoff review point moves from the critic to the report. - Package (cp1-assessment-package-agent 0.1.1, step s8): after sign-off, every step's output in one package, with a register, a gaps register, the sign-off record, lineage and a sha256 per part, in code. Page step s9. - scripts/kab_register_agents.py: registers deployed agents in KAB's agent catalog (an in-place workflow update doesn't). - Runs exec_1b1257380df7 (014) and exec_374d5d577077 (015) completed on crucible-kab-dev: critic pass, report figures all in its facts, package complete with every digest recomputing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,14 +3,18 @@
|
||||
|
||||
The same export format as the ALZ-F01 individual workflow (export_version 2.0.0). There is no orchestrator: each
|
||||
step is one agent, and each step's inputs are run inputs or named fields of earlier steps' outputs (`from_steps`).
|
||||
Profiling, risk and security posture run in parallel; the critic's step stops for the Engagement Lead's approval,
|
||||
which is the `disposition_signoff` gate (ADR 0004). The build refuses a critic on one of its executors' models (K-12, ADR
|
||||
Profiling, risk and security posture run in parallel; the report's step stops for the Engagement Lead's approval,
|
||||
which is the `disposition_signoff` gate (ADR 0004, moved by ADR 0015). The build refuses a critic on one of its executors' models (K-12, ADR
|
||||
0010), reading each agent's deployed model from its kubernetes/configmap.yaml. Each step's schemas are read from its agent's schemas/ folder,
|
||||
so run this again after changing them. Standard library only.
|
||||
|
||||
The intake (s0, ADR 0008) checks the Discovery package in code before the planner starts, and fails the run if the
|
||||
package is missing, changed, incomplete, from a failed critic, or from another run.
|
||||
|
||||
The report (s7, ADR 0015) is written by a model from facts worked out in code and carries the disposition_signoff
|
||||
review point. Only after it is continued do the package (s8, ADR 0014: every step's output in one Assessment package,
|
||||
in code, for Strategy and the later Features) and the approved report's page (s9) run.
|
||||
|
||||
Front steps (ADR 0002):
|
||||
a1 Artifacts: the Discovery run's artifacts, by exact id -> a1.artifacts
|
||||
p1 Parse Assessment Files over a1's records -> p1.parsed_content, p1.file_metadata
|
||||
@@ -42,7 +46,7 @@ STAMP = "2026-11-02T12:00:00"
|
||||
WF = ["engagement_id", "run_id", "discovery_execution_id"]
|
||||
# The rate card is a run input, its JSON as text (ADR 0009): an uploaded `file` reaches every step, and the parse
|
||||
# step that reads the Discovery package would read it instead.
|
||||
RATE_CARD_STEPS = ("s1", "s5", "s6")
|
||||
RATE_CARD_STEPS = ("s1", "s5", "s6", "s8")
|
||||
CRITIC_STATIC = {"critic_model": "gpt-5.4", "executor_models": ["gpt-5.6-sol"]} # ADR 0005
|
||||
|
||||
DOC = {"discovery_documents": "p1.parsed_content", "discovery_files": "p1.file_metadata"}
|
||||
@@ -67,6 +71,37 @@ STEPS = [
|
||||
"posture_status": "s4.status", "security_findings": "s4.findings",
|
||||
"dispositions": "s5.dispositions", "signoff_queue": "s5.signoff_queue"}),
|
||||
]
|
||||
# The report (ADR 0015) is written by a model from facts worked out in code, and carries the disposition_signoff review
|
||||
# point, so the Engagement Lead signs off from it. After that review point: the package for Strategy and the later
|
||||
# Features (ADR 0014), every input copied unchanged (cp1-assessment-package-agent/app/package.py INPUTS names the part
|
||||
# each one belongs to), and the approved report as a page.
|
||||
REPORT_STEP, PACKAGE_STEP, PAGE_STEP = "s7", "s8", "s9"
|
||||
REVIEW_STEP = REPORT_STEP
|
||||
PACKAGE_INPUTS = {
|
||||
"intake_verified": "s0.verified", "discovery_run_id": "s0.discovery_run_id",
|
||||
"discovery_package_version": "s0.package_version", "discovery_critic_verdict": "s0.critic_verdict",
|
||||
"discovery_provider": "s0.provider", "discovery_parts_verified": "s0.parts_verified",
|
||||
"discovery_absent_parts": "s0.absent_parts", "discovery_source_gaps": "s0.source_gaps",
|
||||
"discovery_agent_versions": "s0.agent_versions",
|
||||
"plan_status": "s1.status", "preconditions": "s1.preconditions", "rate_card_id": "s1.rate_card_id",
|
||||
"in_cloud_estate": "s1.in_cloud_estate", "application_source": "s1.application_source",
|
||||
"applications": "s1.applications", "tasks": "s1.tasks", "coverage_gaps": "s1.coverage_gaps",
|
||||
"plan_summary": "s1.summary", "plan_note": "s1.findings_note",
|
||||
"profiles": "s2.profiles", "profile_gaps": "s2.gaps", "profile_note": "s2.findings_note",
|
||||
"scores": "s3.scores", "high_risk_tail": "s3.high_risk_tail", "risk_note": "s3.findings_note",
|
||||
"posture_status": "s4.status", "security_provider": "s4.provider", "posture_score": "s4.posture_score",
|
||||
"controls": "s4.controls", "security_findings": "s4.findings", "pillars": "s4.pillars",
|
||||
"injection_flags": "s4.injection_flags", "security_note": "s4.findings_note",
|
||||
"dispositions": "s5.dispositions", "producer_signoff_queue": "s5.signoff_queue", "scoring_note": "s5.scoring_note",
|
||||
"verdict": "s6.verdict", "checks": "s6.checks", "rejected_dispositions": "s6.rejected_dispositions",
|
||||
"signoff_queue": "s6.signoff_queue", "unverified_claims": "s6.unverified_claims",
|
||||
"critic_model": "s6.critic_model", "executor_models": "s6.executor_models", "critic_summary": "s6.summary",
|
||||
}
|
||||
# The report also reads the Discovery package, to say what each application is (ADR 0015 addendum).
|
||||
REPORT_INPUTS = {**PACKAGE_INPUTS, "discovery_documents": "p1.parsed_content"}
|
||||
PACKAGE_INPUTS = {**PACKAGE_INPUTS, "report_markdown": f"{REPORT_STEP}.report_markdown"}
|
||||
STEPS += [(REPORT_STEP, "cp1-assessment-report-agent", 7, REPORT_INPUTS),
|
||||
(PACKAGE_STEP, "cp1-assessment-package-agent", 8, PACKAGE_INPUTS)]
|
||||
FRONT_OUTPUTS = {"a1": {"artifacts"},
|
||||
"p1": {"parsed_content", "file_metadata", "total_files", "total_content_length"}}
|
||||
PARSE_OUT = {"type": "object", "properties": {
|
||||
@@ -143,8 +178,14 @@ def build(artifact_ids=()) -> dict:
|
||||
continue
|
||||
src_out = json.loads((ROOT / by_id[src_step] / "schemas" / "output.json").read_text())
|
||||
assert src_field in src_out["properties"], f"{sid}: {source} is not an output of {by_id[src_step]}"
|
||||
inputs = {"from_workflow": WF + (["discovery_approval_ref"] if sid == "s1" else [])
|
||||
inputs = {"from_workflow": WF + (["discovery_approval_ref"] if sid in ("s1", REPORT_STEP, PACKAGE_STEP) else [])
|
||||
+ (["artifact_ids"] if sid == PACKAGE_STEP and not artifact_ids else [])
|
||||
+ (["rate_card_document"] if sid in RATE_CARD_STEPS else []), "from_steps": from_steps}
|
||||
if sid in (REPORT_STEP, PACKAGE_STEP):
|
||||
# Which agent versions produced the run, as built; for the package, a fixed Discovery artifact id too.
|
||||
inputs["static"] = {"agent_versions": {f: field(ROOT / f / "agent.yaml", "version")
|
||||
for _, f, _, _ in STEPS if f != folder},
|
||||
**({"artifact_ids": list(artifact_ids)} if artifact_ids and sid == PACKAGE_STEP else {})}
|
||||
if sid == "s6":
|
||||
for k in CRITIC_STATIC:
|
||||
assert k in input_schema["properties"], k
|
||||
@@ -155,13 +196,14 @@ def build(artifact_ids=()) -> dict:
|
||||
depends = sorted({s.split(".")[0] for s in from_steps.values()} | ({"s0"} if sid == "s1" else set()))
|
||||
connections += [{"source": d, "target": sid} for d in depends]
|
||||
hitl = {"enabled": False}
|
||||
if sid == "s6":
|
||||
if sid == REVIEW_STEP:
|
||||
hitl = {"enabled": True, "checkpoint_type": "approval",
|
||||
"review_focus": "disposition_signoff: the Engagement Lead reads the critic's verdict and every "
|
||||
"disposition in signoff_queue (confidence below 0.80, and every repurchase or "
|
||||
"relocate) before Strategy starts. A fail verdict is never approved.",
|
||||
"review_focus": "disposition_signoff: the Engagement Lead reads the Assessment report: the critic's "
|
||||
"verdict and every disposition in the sign-off queue (confidence below 0.80, and "
|
||||
"every repurchase or relocate). Continuing signs off that queue (ADR 0014) before "
|
||||
"Strategy starts. A fail verdict is never approved.",
|
||||
"timeout_hours": 72, "allowed_actions": ["continue", "rerun", "abort"], "max_reruns": 2}
|
||||
y = {"s2": -160, "s3": 0, "s4": 160}.get(sid, 0)
|
||||
y = {"s2": -160, "s3": 0, "s4": 160, PACKAGE_STEP: 160}.get(sid, 0)
|
||||
steps.append({
|
||||
"id": sid, "agent": agent_id, "agent_type": agent_id, "name": f"{display} Step",
|
||||
"timeout_minutes": AGENT_STEP_TIMEOUT_MINUTES, "type": "sequential", "executionLevel": group,
|
||||
@@ -175,6 +217,16 @@ def build(artifact_ids=()) -> dict:
|
||||
"agent_metadata": {"agent_name": agent_id},
|
||||
"inputSchema": input_schema, "outputSchema": output_schema}})
|
||||
agents.append({"name": agent_id, "display_name": display, "source_url": url, "category": "agent"})
|
||||
# After the review point: the approved report as a page, as this run's own artifact (as Discovery's, F01 ADR 0012).
|
||||
page = _activity_step(PAGE_STEP, "format_for_ui", "Format Assessment report for UI",
|
||||
"The approved Assessment report, for display as a page.",
|
||||
{"from_steps": {"input_data": f"{REPORT_STEP}.final_html"}, "static": {"format_type": "html"}},
|
||||
{"type": "object", "properties": {"input_data": {"type": "string"}, "format_type": {"type": "string"}}},
|
||||
{"type": "object", "properties": {"data": {"type": "object"}}}, y=-160)
|
||||
page.update({"depends_on": [REPORT_STEP], "executionLevel": 8, "parallelGroup": 8,
|
||||
"position": {"x": 320 * 7, "y": -160}})
|
||||
steps.append(page)
|
||||
connections.append({"source": REPORT_STEP, "target": PAGE_STEP})
|
||||
description = (f"{NAME}: the Discovery run's outputs and the rate card in; then "
|
||||
+ "; then ".join(field(ROOT / f / "agent.yaml", "display_name") for _, f, _, _ in STEPS) + ".")
|
||||
tags = ["cp1", "public-cloud", "agentic-landing-zone"]
|
||||
|
||||
Reference in New Issue
Block a user