{"record":{"id":"e4da7c43ae5caeb9","repo":"nextlevelbuilder/ui-ux-pro-max-skill","slug":"catalog-summary-json-is-missing","errorCode":null,"errorMessage":"catalog-summary.json is missing","messagePattern":"catalog-summary\\.json is missing","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"warning","filePath":"scripts/generate-catalog-summary.py","lineNumber":123,"sourceCode":"        ),\n    }\n    for name, tokens in expected.items():\n        text = (ROOT / name).read_text(encoding=\"utf-8\")\n        missing = [token for token in tokens if token not in text]\n        if missing:\n            raise ValueError(f\"{name} catalog counts are stale: {', '.join(missing)}\")\n\n\ndef main():\n    parser = argparse.ArgumentParser(description=__doc__)\n    parser.add_argument(\"--verified-at\")\n    parser.add_argument(\"--check\", action=\"store_true\")\n    args = parser.parse_args()\n    try:\n        verified_at = args.verified_at\n        if args.check and not verified_at:\n            if not OUTPUT.exists():\n                raise ValueError(\"catalog-summary.json is missing\")\n            verified_at = json.loads(OUTPUT.read_text(encoding=\"utf-8\")).get(\"verifiedAt\")\n        if not verified_at:\n            raise ValueError(\"--verified-at is required when generating the summary\")\n        summary = build(verified_at)\n        content = json.dumps(summary, ensure_ascii=False, indent=2) + \"\\n\"\n        if args.check:\n            if not OUTPUT.exists() or OUTPUT.read_text(encoding=\"utf-8\") != content:\n                raise ValueError(\"catalog-summary.json is stale; regenerate it\")\n            check_readme_counts(summary)\n        else:\n            OUTPUT.write_text(content, encoding=\"utf-8\")\n    except (KeyError, OSError, ValueError, json.JSONDecodeError) as exc:\n        print(f\"generate-catalog-summary: {exc}\", file=sys.stderr)\n        return 2\n    print(\"Catalog summary is current.\" if args.check else \"Generated catalog summary.\")\n    return 0\n\n","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/nextlevelbuilder/ui-ux-pro-max-skill/blob/a38d04c3d5c298c851dbe5e6ee1965ee3de42cb5/scripts/generate-catalog-summary.py#L105-L141","documentation":"In --check mode without --verified-at, the script tries to read the verification date from the existing catalog-summary.json (the OUTPUT file); if that file doesn't exist, it throws. It means the verification step was run before the summary was ever generated in this checkout — the artifact the check exists to validate is absent.","triggerScenarios":"Running `python3 scripts/generate-catalog-summary.py --check` in a tree where the catalog-summary.json OUTPUT path was never generated, was deleted, or is excluded by .gitignore; a fresh clone whose CI invokes check before generate.","commonSituations":"The summary file isn't committed and CI assumes it exists; .gitignore accidentally covering the output path; a clean-build pipeline skipping the generation step.","solutions":["Generate the summary first: `python3 scripts/generate-catalog-summary.py --verified-at $(date +%F)`, then run --check.","If the file should be committed, commit it so fresh checkouts can run --check directly.","Check .gitignore doesn't exclude the OUTPUT path used by the script.","Order CI steps: generate (or restore) before check."],"exampleFix":"# before\npython3 scripts/generate-catalog-summary.py --check\n# after\npython3 scripts/generate-catalog-summary.py --verified-at $(date +%F)\npython3 scripts/generate-catalog-summary.py --check","handlingStrategy":"validation","validationCode":"from pathlib import Path\nOUTPUT = Path('data/catalog-summary.json')  # match the script's OUTPUT constant\nif args.check and not args.verified_at and not OUTPUT.exists():\n    raise SystemExit('catalog-summary.json missing - run generation with --verified-at first')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Order CI: generate (or restore from cache) before --check.","Commit the generated catalog-summary.json so fresh clones can check directly.","Ensure .gitignore doesn't match the OUTPUT path."],"tags":["python","ci","artifacts","developer-tooling"],"backgroundTag":null,"analyzedSha":"a38d04c3d5c298c851dbe5e6ee1965ee3de42cb5","analyzedAt":"2026-08-14T18:51:02.321Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}