{"record":{"id":"863be9c5741e2c91","repo":"affaan-m/ECC","slug":"no-style-pack-at-sp-dir-expected-a-pack-json-manifest","errorCode":null,"errorMessage":"no style pack at {sp.dir} - expected a pack.json manifest","messagePattern":"no style pack at (.+?) - expected a pack\\.json manifest","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"skills/taste-application/scripts/tasteforge/pack.py","lineNumber":183,"sourceCode":"                for k in (\"mean_shot\", \"median_shot\", \"cuts_per_min\",\n                          \"rhythm_variance\", \"n_shots\", \"fps\",\n                          \"total_duration\")\n            } if cadence else {},\n            \"validation\": {\"status\": status, \"errors\": errors, \"warnings\": warnings},\n        }\n\n    @staticmethod\n    def _check(label: str, payload: dict, schem: dict, errors: list[str]) -> None:\n        problems = schema.validate(payload, schem)\n        for p in problems:\n            errors.append(f\"{label}: {p}\")\n\n\ndef load(path: str | Path) -> StylePack:\n    \"\"\"Load a pack directory; raises if no manifest exists.\"\"\"\n    sp = StylePack(Path(path))\n    if not sp.manifest_path.exists():\n        raise FileNotFoundError(\n            f\"no style pack at {sp.dir} - expected a pack.json manifest\"\n        )\n    try:\n        sp.manifest = json.loads(sp.manifest_path.read_text(encoding=\"utf-8\"))\n    except json.JSONDecodeError as exc:\n        sp.manifest = {}\n        sp.problems.append(f\"pack.json: {exc}\")\n    return sp\n","sourceCodeStart":165,"sourceCodeEnd":192,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/skills/taste-application/scripts/tasteforge/pack.py#L165-L192","documentation":"pack.load() wraps a directory as a StylePack and requires a pack.json manifest inside it. If the manifest file does not exist, it raises FileNotFoundError describing the directory and the expected manifest name, failing closed rather than returning an empty pack.","triggerScenarios":"Calling load(\"path/to/pack\") where path/to/pack/pack.json is absent — the directory does not exist, or the pack was created without writing its manifest, or the user pointed at a parent/child directory by mistake.","commonSituations":"Typo in the pack directory name; pointing at a freshly scaffolded directory before init/save wrote pack.json; unpacking an archive that omitted hidden or top-level files; passing the styles root instead of a single pack directory.","solutions":["Verify the directory exists and contains pack.json (ls the directory)","Run the pack creation/save step (e.g. distill or init workflow) to generate the manifest before loading","Correct the path to point at the actual pack directory, not its parent"],"exampleFix":"// before\npack = load(\"styles/my-pack\")  # no pack.json inside\n// after\nassert Path(\"styles/my-pack/pack.json\").is_file(), \"run distill first\"\npack = load(\"styles/my-pack\")","handlingStrategy":"try-catch","validationCode":"from pathlib import Path\np = Path(pack_dir)\nif not (p / \"pack.json\").is_file():\n    raise SystemExit(f\"{p} is not a style pack (missing pack.json)\")","typeGuard":null,"tryCatchPattern":"try:\n    sp = pack.load(path)\nexcept FileNotFoundError as e:\n    print(f\"Style pack missing: {e}. Run the distill/init step first.\")","preventionTips":["Create packs only through the library's own init/save workflow","Check for pack.json after unpacking or copying packs","Point loaders at pack directories, not the styles root"],"tags":["filesystem","style-pack","manifest","file-not-found"],"backgroundTag":"config-file-not-found","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"}