feat: run role files on the ADK runtime with scoped Skills
Increment 5 of .scratch/solution-architect-agent/spec.md, test-first. - agents/*.md: provider-neutral role files for the Orchestrator, nine Specialists and the pillar advisor, with a shared Specialist protocol. - app/agents/roles.py: load and validate role files; Skills, MCP servers and models come from the provider bundle. - app/agents/adk_runtime.py: AgentRuntime on google-adk 2.9 with a per-run LlmAgent, role-scoped SkillToolset (no run_skill_script), step budgets, early stop on turn-ending tools, LiteLLM models. - app/execution/pillars.py + toolkit.py: design advisor fans out to one advisor per WAF pillar in parallel. - Specialists receive every earlier-Phase Deliverable as input. - Bundle gains role_skills, pillar_skills and -latest Gemini aliases; pin google-adk[extensions]==2.9.0. - 37 new tests; full suite 158 passed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -60,6 +60,20 @@ def test_role_mcp_servers_can_exclude_preview_servers():
|
||||
assert bundle.mcp_servers_for_role("no-such-role") == ()
|
||||
|
||||
|
||||
def test_gcp_bundle_maps_roles_and_pillars_to_vendored_skills():
|
||||
bundle = load_provider("gcp")
|
||||
|
||||
assert bundle.role_skills["orchestrator"] == ("google-cloud-solution-architecture",)
|
||||
assert bundle.pillar_skills == {
|
||||
"security": "google-cloud-waf-security",
|
||||
"reliability": "google-cloud-waf-reliability",
|
||||
"operational-excellence": "google-cloud-waf-operational-excellence",
|
||||
"cost-optimization": "google-cloud-waf-cost-optimization",
|
||||
"performance-optimization": "google-cloud-waf-performance-optimization",
|
||||
"sustainability": "google-cloud-waf-sustainability",
|
||||
}
|
||||
|
||||
|
||||
def test_model_for_role_falls_back_to_default():
|
||||
bundle = load_provider("gcp")
|
||||
|
||||
@@ -154,6 +168,8 @@ def test_minimal_bundle_loads(tmp_path):
|
||||
"allow",
|
||||
),
|
||||
({"role_mcp_servers": {"describer": ["missing"]}}, "missing"),
|
||||
({"role_skills": {"describer": ["no-such-skill"]}}, "no-such-skill"),
|
||||
({"pillar_skills": {"security": "no-such-skill"}}, "no-such-skill"),
|
||||
],
|
||||
)
|
||||
def test_invalid_bundles_are_rejected(tmp_path, override, message):
|
||||
|
||||
Reference in New Issue
Block a user