mirror of
https://github.com/boshu2/agentops.git
synced 2026-09-14 15:08:13 +08:00
4269c66591
Same pattern as cycle 5 (check-goal-staleness.sh): these two scripts were written against the legacy GOALS.yaml format and now error out (exit 1/2) when GOALS.yaml is absent, which misleads local runs after the GOALS.md migration. - check-pillar-coverage.sh: skip with exit 0 when GOALS.yaml is missing and GOALS.md is present (pillar taxonomy lives in the narrative now, not as per-goal pillar: fields the script can machine-check). - check-goal-quality.sh: skip with exit 0 in the same condition (anti- pattern detection runs against YAML check: fields that don't exist in the markdown format). Both scripts preserve their existing error behavior when neither file is present — that is still a genuine misconfiguration. No downstream gate depends on either script today, so this is a signal-noise fix, not a contract change.
29 lines
1010 B
Bash
Executable File
29 lines
1010 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# check-pillar-coverage.sh — Verify GOALS.yaml has goals for all 4 pillars.
|
|
#
|
|
# Post-GOALS.md migration (see CLAUDE.md §Agent Goals): GOALS.yaml is the
|
|
# legacy YAML format. When it is absent but GOALS.md is present, skip with
|
|
# exit 0 because the markdown narrative does not carry machine-readable
|
|
# per-goal `pillar` fields; no downstream gate depends on this script today.
|
|
set -uo pipefail
|
|
|
|
GOALS_FILE="${1:-GOALS.yaml}"
|
|
|
|
if [ ! -f "$GOALS_FILE" ]; then
|
|
if [ -f "GOALS.md" ]; then
|
|
echo "SKIP: GOALS.yaml not found; repo uses GOALS.md (post-migration). Pillar coverage is documented in the narrative, not machine-checkable here." >&2
|
|
exit 0
|
|
fi
|
|
echo "ERROR: GOALS.yaml not found at $GOALS_FILE" >&2
|
|
exit 1
|
|
fi
|
|
|
|
pillars=$(yq '.goals[].pillar' "$GOALS_FILE" | sort -u)
|
|
|
|
for p in knowledge-compounding validated-acceleration goal-driven-automation zero-friction-workflow; do
|
|
if ! echo "$pillars" | grep -q "$p"; then
|
|
echo "MISSING pillar: $p" >&2
|
|
exit 1
|
|
fi
|
|
done
|