feat: start an Execution from a scope spec (ADR-0008, iteration 9 step 1)
Some checks failed
validation / verify (push) Failing after 10s
Some checks failed
validation / verify (push) Failing after 10s
A scope spec is a YAML file of what the customer wants and the facts a design depends on, complete or partly filled. It sits beside the Intent, which stays in the customer's words. - skills/scoping holds a provider-neutral catalogue of 63 fields; the Cloud provider's bundle supplies the values it allows for the fields left to it. - app/scope.py reads a spec against the catalogue with no model: it refuses an unknown field or a value of the wrong type, and yields what is stated, what is left to the agent, what is unknown and how pressing each gap is. A field may say ask, decide or not_applicable. - ExecutionEngine.start(scope=...), /generate, A2A metadata and evaluation cases accept one. Its statement is the request, its engagement reference names the Customer case, and its run options apply. A pre-approved start is refused when an essential field is not settled. - The spec as supplied is kept unaltered beside a completed copy with assumptions, gaps, provenance, readiness and a status. - Every Specialist is shown the spec and given the Skill: a stated choice binds, exclusions are out of scope. - Covers workloads and platform foundations; case-08-landing-zone starts from a benchmark spec. Plans for scoping (iteration 9) and the work breakdown structure (iteration 10, nothing built), and the design spec they come from. Not run with real models. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,7 @@ from typing import Any
|
||||
|
||||
import yaml
|
||||
|
||||
from app.scope import Catalogue, load_catalogue
|
||||
from app.skills.agent_skills import SkillFormatError, SkillMeta, discover_skills
|
||||
|
||||
TIERS = ("general", "cloud_read")
|
||||
@@ -85,6 +86,17 @@ class ProviderBundle:
|
||||
# The Skill approved lessons are published in (ADR-0004); None when the provider
|
||||
# has none. A Specialist is given it once it holds lessons for its Deliverable.
|
||||
lessons_skill: str | None = None
|
||||
# The Skill that holds the scope spec's catalogue (ADR-0008), and the values
|
||||
# this provider allows for the fields the catalogue leaves to a provider.
|
||||
scope_skill: str | None = None
|
||||
scope_values: Mapping[str, tuple[str, ...]] = field(default_factory=dict)
|
||||
|
||||
def scope_catalogue(self) -> Catalogue:
|
||||
if not self.scope_skill:
|
||||
raise ProviderConfigError(f"The {self.name} bundle names no scope Skill.")
|
||||
return load_catalogue(
|
||||
self.skills[self.scope_skill].path / "assets" / "catalogue.yaml"
|
||||
)
|
||||
|
||||
def mcp_servers_for_role(
|
||||
self, role: str, include_preview: bool = True
|
||||
@@ -233,6 +245,15 @@ def load_provider(name: str, root: Path | None = None) -> ProviderBundle:
|
||||
if lessons_skill is not None and lessons_skill not in skills:
|
||||
raise fail(f"'lessons_skill' references unknown skill {lessons_skill!r}")
|
||||
|
||||
scope = config.get("scope") or {}
|
||||
scope_skill = scope.get("skill") or None
|
||||
if scope_skill is not None and scope_skill not in skills:
|
||||
raise fail(f"'scope.skill' references unknown skill {scope_skill!r}")
|
||||
scope_values = {
|
||||
str(path): tuple(str(value) for value in values or ())
|
||||
for path, values in (scope.get("values") or {}).items()
|
||||
}
|
||||
|
||||
return ProviderBundle(
|
||||
name=name,
|
||||
skills_dirs=skills_dirs,
|
||||
@@ -256,4 +277,6 @@ def load_provider(name: str, root: Path | None = None) -> ProviderBundle:
|
||||
or ()
|
||||
),
|
||||
lessons_skill=lessons_skill,
|
||||
scope_skill=scope_skill,
|
||||
scope_values=scope_values,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user