|
| 1 | +#!/usr/bin/env bash |
| 2 | +set -euo pipefail |
| 3 | + |
| 4 | +fail() { |
| 5 | + echo "[validate-product-cases] ERROR: $*" >&2 |
| 6 | + exit 1 |
| 7 | +} |
| 8 | + |
| 9 | +required_docs=( |
| 10 | + docs/EFFECTIVENESS_BAR.md |
| 11 | + docs/INTERACTIVE_CAPABILITY_ROUTING.md |
| 12 | + docs/OUTCOME_FORCE_MULTIPLIER.md |
| 13 | + docs/GOLDEN_PRODUCT_CASES.md |
| 14 | +) |
| 15 | + |
| 16 | +for doc in "${required_docs[@]}"; do |
| 17 | + test -f "$doc" || fail "missing required product doc: $doc" |
| 18 | +done |
| 19 | + |
| 20 | +required_examples=( |
| 21 | + examples/golden-repo-audit.example.html |
| 22 | + examples/golden-pr-review.example.html |
| 23 | + examples/golden-technical-diagnosis.example.html |
| 24 | + examples/golden-roadmap-prioritization.example.html |
| 25 | + examples/golden-execution-strategy.example.html |
| 26 | +) |
| 27 | + |
| 28 | +for artifact in "${required_examples[@]}"; do |
| 29 | + test -f "$artifact" || fail "missing golden product artifact: $artifact" |
| 30 | + python3 scripts/audit-artifact.py "$artifact" --min-score 90 --json >/tmp/validate-product-case.json || fail "$artifact failed artifact audit" |
| 31 | + grep -qi "Evidence" "$artifact" || fail "$artifact missing evidence language" |
| 32 | + grep -qi "Consequence" "$artifact" || fail "$artifact missing consequence language" |
| 33 | + grep -qi "Action implied" "$artifact" || fail "$artifact missing action-implied language" |
| 34 | + grep -qi "Work this saves" "$artifact" || fail "$artifact missing work-saved language" |
| 35 | + grep -qi "Ignore for now" "$artifact" || fail "$artifact missing strategic exclusion language" |
| 36 | + grep -qi "Copy prompt" "$artifact" || fail "$artifact missing reusable prompt control" |
| 37 | + grep -qi "Save this?" "$artifact" || fail "$artifact missing memory decision" |
| 38 | +done |
| 39 | + |
| 40 | +grep -q "confusion -> decision -> execution" docs/OUTCOME_FORCE_MULTIPLIER.md || fail "Outcome Force Multiplier missing core transition" |
| 41 | +grep -q "Evidence without consequence" docs/OUTCOME_FORCE_MULTIPLIER.md || fail "Outcome Force Multiplier missing evidence consequence rule" |
| 42 | +grep -q "Interactive Capability Routing" docs/INTERACTIVE_CAPABILITY_ROUTING.md || fail "interactive routing doc missing title" |
| 43 | +grep -q "Golden Product Cases" docs/GOLDEN_PRODUCT_CASES.md || fail "golden product cases doc missing title" |
| 44 | + |
| 45 | +echo "[validate-product-cases] OK: ${#required_examples[@]} golden product artifacts validated" |
0 commit comments