Adopt spec v0.2: schema, semantic validator, operating modes; workplans updated
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 2s
Work Records / validate (push) Successful in 13s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: sonnet
Assistant-Process: 295952@bnt-lap001
Assistant-Session: e93f64ad-516c-46eb-9666-aad8d300c477
This commit is contained in:
tegwick 2026-09-29 10:49:10 +02:00
parent b6868a3a58
commit 79996ab249
15 changed files with 1090 additions and 64 deletions

View file

@ -26,6 +26,10 @@ class Pack:
def id(self) -> str:
return str(self.data.get("id", self.path.parent.name))
@property
def spec(self) -> str:
return str(self.data.get("spec", ""))
@property
def ok(self) -> bool:
return not self.errors
@ -97,6 +101,9 @@ def load(path: Path) -> Pack:
return Pack(path, {}, [f"invalid YAML: {e}"])
if not isinstance(data, dict):
return Pack(path, {}, ["manifest must be a mapping"])
if data.get("spec") == "runbook-pack/v0.2":
from . import v2
return Pack(path, data, v2.validate(data))
errs = _schema_errors(data)
if not errs:
errs = _semantic_errors(data)