ALZ-F01 Discovery: package step, value scorecard, application grouping, cases

- New cp1-discovery-package-agent (ADR 0020): one package per reviewed run, every part
  hashed (sha256 over canonical JSON), with a manifest and a value scorecard.
- Applications grouped CMDB -> tag -> resource group with a judged model fallback (ADR 0021):
  CMDB 0.7.0 carries ownership, dependency mapping 0.6.0 groups, report 0.9.0 shows them.
- Critic 0.6.1 accepts the producers' enums; build_workflow.py refuses a consumer enum
  narrower than its producer's.
- Code hooks, sub-agents and tests for the inventory, CMDB, dependency, planner and critic
  agents; the report and Well-Architected review agents; ADRs 0012-0021.
- Workflow cases with value bars and run limits; run evaluation and usage collection scripts;
  the run context template and the field-by-field review for ADR 0016.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-05 22:13:25 +00:00
parent f659564208
commit 9e503885cc
211 changed files with 18170 additions and 158 deletions

View File

@@ -0,0 +1,47 @@
#!/usr/bin/env python3
"""Fail if docs/platform-issues/agent-tools-and-context/individual-agents-report-2026-11-01.md no longer matches the agents' tools, contracts or the workflow's wiring.
Usage (from this Feature folder): python3 scripts/check_context_doc.py
"""
import glob
import json
import sys
from pathlib import Path
import yaml
ROOT = Path(__file__).resolve().parents[1]
REPORT = ROOT.parents[1] / "docs" / "platform-issues" / "agent-tools-and-context" / "individual-agents-report-2026-11-01.md"
DOC = REPORT.read_text()
def main() -> int:
export = json.loads(next((ROOT / "workflows").glob("*.json")).read_text())
template = export.get("template") or export["workflow"]["template"]
problems, read = [], set()
for step in template["steps"]:
read.update((step.get("inputs") or {}).get("from_steps", {}).values())
for step in template["steps"]:
if step["id"] == "u1":
continue
agent = step["agent"].replace("_", "-")
if not (ROOT / agent).exists():
continue # a built-in activity, not an agent of this pattern
spec = yaml.safe_load((ROOT / agent / "agent.yaml").read_text())
for server, tools in spec.get("mcp", {}).items():
problems += [f"{agent}: {server} {tool}" for tool in tools if f"`{tool}`" not in DOC]
problems += [f"{step['id']}: receives {source}" for source in step["inputs"].get("from_steps", {}).values()
if f"`{source}`" not in DOC]
outputs = json.loads((ROOT / agent / "schemas" / "output.json").read_text()).get("properties", {})
problems += [f"{agent}: returns {field}" for field in outputs if f"`{field}`" not in DOC]
if step["id"] != "s9":
lost = [f for f in outputs if f"{step['id']}.{f}" not in read]
row = f"| {step['id']} | " + ", ".join(f"`{f}`" for f in lost) + " |"
if row not in DOC:
problems.append(f"{step['id']}: the unread fields are now {lost}")
print("\n".join(problems) or "The page matches.")
return 1 if problems else 0
if __name__ == "__main__":
sys.exit(main())