affaan-m/ECC · error · FileNotFoundError
Spec file not found
Error message
Spec file not found: {path} What it means
Existence check at the top of parse_spec: the compliance spec path does not exist or is not a file, so YAML parsing cannot begin; raised as ValueError and surfaced to both generate_spec and the TDD spec tests.
Solutions
- Check the path for typos and run from the correct directory
- Generate the spec first if it does not exist yet
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at skills/skill-comply/scripts/parser.py:80 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/3c7a561b5eba6b91.
Report an issue: GitHub.
Appendix: source
Thrown at skills/skill-comply/scripts/parser.py:80
try:
events.append(ObservationEvent(
timestamp=raw["timestamp"],
event=raw["event"],
tool=raw["tool"],
session=raw["session"],
input=raw.get("input", ""),
output=raw.get("output", ""),
))
except KeyError as e:
raise ValueError(f"Missing required field {e} at line {i}") from e
return sorted(events, key=lambda e: e.timestamp)
def parse_spec(path: Path) -> ComplianceSpec:
"""Parse a YAML compliance spec file."""
if not path.is_file():
raise FileNotFoundError(f"Spec file not found: {path}")
raw = yaml.safe_load(path.read_text())
steps: list[Step] = []
for s in raw["steps"]:
d = s["detector"]
steps.append(Step(
id=s["id"],
description=s["description"],
required=s["required"],
detector=Detector(
description=d["description"],
after_step=d.get("after_step"),
before_step=d.get("before_step"),
),
))
if "scoring" not in raw:
raise KeyError("Missing 'scoring' section in compliance spec")View on GitHub (pinned to 8321021c54)