{"record":{"id":"3c7a561b5eba6b91","repo":"affaan-m/ECC","slug":"spec-file-not-found-path","errorCode":null,"errorMessage":"Spec file not found: {path}","messagePattern":"Spec file not found: (.+?)","errorType":"validation","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"skills/skill-comply/scripts/parser.py","lineNumber":80,"sourceCode":"        try:\n            events.append(ObservationEvent(\n                timestamp=raw[\"timestamp\"],\n                event=raw[\"event\"],\n                tool=raw[\"tool\"],\n                session=raw[\"session\"],\n                input=raw.get(\"input\", \"\"),\n                output=raw.get(\"output\", \"\"),\n            ))\n        except KeyError as e:\n            raise ValueError(f\"Missing required field {e} at line {i}\") from e\n\n    return sorted(events, key=lambda e: e.timestamp)\n\n\ndef parse_spec(path: Path) -> ComplianceSpec:\n    \"\"\"Parse a YAML compliance spec file.\"\"\"\n    if not path.is_file():\n        raise FileNotFoundError(f\"Spec file not found: {path}\")\n    raw = yaml.safe_load(path.read_text())\n\n    steps: list[Step] = []\n    for s in raw[\"steps\"]:\n        d = s[\"detector\"]\n        steps.append(Step(\n            id=s[\"id\"],\n            description=s[\"description\"],\n            required=s[\"required\"],\n            detector=Detector(\n                description=d[\"description\"],\n                after_step=d.get(\"after_step\"),\n                before_step=d.get(\"before_step\"),\n            ),\n        ))\n\n    if \"scoring\" not in raw:\n        raise KeyError(\"Missing 'scoring' section in compliance spec\")","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/skills/skill-comply/scripts/parser.py#L62-L98","documentation":"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.","triggerScenarios":"Thrown at skills/skill-comply/scripts/parser.py:80 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the path for typos and run from the correct directory","Generate the spec first if it does not exist yet"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}