{"record":{"id":"0975839f5635cf49","repo":"affaan-m/ECC","slug":"missing-scoring-section-in-compliance-spec","errorCode":null,"errorMessage":"Missing 'scoring' section in compliance spec","messagePattern":"Missing 'scoring' section in compliance spec","errorType":"exception","errorClass":"KeyError","httpStatus":null,"severity":"error","filePath":"skills/skill-comply/scripts/parser.py","lineNumber":98,"sourceCode":"        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\")\n\n    return ComplianceSpec(\n        id=raw[\"id\"],\n        name=raw[\"name\"],\n        source_rule=raw[\"source_rule\"],\n        version=raw[\"version\"],\n        steps=tuple(steps),\n        threshold_promote_to_hook=raw[\"scoring\"][\"threshold_promote_to_hook\"],\n    )\n","sourceCodeStart":80,"sourceCodeEnd":108,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/skills/skill-comply/scripts/parser.py#L80-L108","documentation":"Structural guard in parse_spec: the YAML loaded successfully but has no top-level 'scoring' key, so there is no promotion threshold to read. Steps alone are not enough; the spec must also define scoring rules.","triggerScenarios":"Thrown at skills/skill-comply/scripts/parser.py:98 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a scoring section to the spec YAML (it must include threshold_promote_to_hook)","Regenerate the spec; the generator normally emits a complete scoring block"],"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"}