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:
@@ -481,6 +481,10 @@ def make_execution_nodes(
|
||||
role = dataclasses.replace(
|
||||
role, skills=(*role.skills, *(n for n in named if n not in role.skills))
|
||||
)
|
||||
scope_skill = task_input.get("scope_skill")
|
||||
if scope_skill and scope_skill not in role.skills:
|
||||
# An Execution with a scope spec: every Specialist can read what it means.
|
||||
role = dataclasses.replace(role, skills=(*role.skills, scope_skill))
|
||||
opted_in = bool(task_input.get("terraform_modules"))
|
||||
MODULES_OPTED_IN.set(opted_in)
|
||||
if opted_in and role.modules_skill:
|
||||
@@ -908,6 +912,7 @@ def _specialist_input(
|
||||
"allow_cloud_read": state.get("allow_cloud_read"),
|
||||
# Whether this Execution opted into published Terraform modules.
|
||||
"terraform_modules": bool(state.get("terraform_modules")),
|
||||
"scope_skill": (state.get("scope") or {}).get("skill"),
|
||||
"working": dict(state.get("working", {}).get(kind.value, {})),
|
||||
# Whether the user has been shown a draft of this Deliverable. Answering some
|
||||
# other question about it, such as what to do after it stopped, is not that.
|
||||
@@ -937,6 +942,9 @@ def _specialist_input(
|
||||
# Skills carrying the organisation's standards or this engagement's
|
||||
# constraints. Where one disagrees with general guidance, it wins.
|
||||
"overlay_skills": sorted(state.get("overlay_skills") or {}),
|
||||
# What the customer's scope spec states, leaves to the agent, and
|
||||
# leaves unknown. None when no spec was supplied.
|
||||
"scope": (state.get("scope") or {}).get("context"),
|
||||
# False: infrastructure code is plain resources. True: a published
|
||||
# module may be used where the modules Skill says one fits.
|
||||
"terraform_modules": bool(state.get("terraform_modules")),
|
||||
@@ -1357,6 +1365,12 @@ def _write_outputs(
|
||||
"overlay_skills": dict(state.get("overlay_skills") or {}),
|
||||
# Whether its infrastructure code was allowed published modules.
|
||||
"terraform_modules": bool(state.get("terraform_modules")),
|
||||
# How much of the scope spec the customer supplied; None without a spec.
|
||||
"scope": {
|
||||
key: (state.get("scope") or {}).get(key) for key in ("status", "readiness")
|
||||
}
|
||||
if state.get("scope")
|
||||
else None,
|
||||
"status": status,
|
||||
"warnings": list(state.get("warnings", [])),
|
||||
# Flags a person should look at; nothing was done about them.
|
||||
|
||||
Reference in New Issue
Block a user