Validate Categorization

Path: loom-builder-sol/gates/validate-categorization.shRelative: gates/validate-categorization.shSubproject: loom-builder-solCategory: scripts
Lines: 123Bytes: 3,603Imports: 0Exports: 0

Content Preview

  1. #!/usr/bin/env bash
  2. # Deterministic quality gate for artifact categorization.
  3. # Exit 0 = PASS, exit 1 = FAIL. No LLM needed.
  4. set -eu
  5. DIR="/home/mikes/artifacts-hub-astro/artifacts-hub/src/content/artifacts"
  6. REPORT="$DIR/../CATEGORIZATION_REPORT.md"
  7. ALLOWED='Tools|Reports|Specs|Guides|Dashboards|Business|SEO|AI/Agents|Design'
  8. FAIL=0
  9. # 1. Report file exists and is non-empty
  10. if [ ! -s "$REPORT" ]; then
  11. echo "FAIL: CATEGORIZATION_REPORT.md missing or empty"
  12. FAIL=1
  13. fi
  14. # 2. Count HTML files
  15. TO