mirror of
https://github.com/boshu2/agentops.git
synced 2026-09-14 15:08:13 +08:00
a5fa4cfa8c
Close the skills/skills-codex ecosystem gaps surfaced by the recent audit: - docs/SKILLS.md now lists all 69 skills. Added an "Additional Skills" table covering the 21 previously undocumented entries (autodev, bootstrap, compile, deps, design, discovery, goals, grafana-platform-dashboard, harvest, perf, push, readme, red-team, refactor, reverse-engineer-rpi, review, scaffold, scenario, security, security-suite, test). Removed stale `/knowledge` router alias and nonexistent `extract` internal-table row. - Added `scripts/validate.sh` behavioral contracts to the 16 skills that lacked one (autodev, bootstrap, deps, design, discovery, dream, harvest, llm-wiki, perf, red-team, refactor, review, scaffold, scenario, test, validation). Each encodes skill-specific assertions beyond the frontmatter check. Coverage: 53/69 -> 69/69. - Fixed `scripts/check-codex-parity-drift.sh` which was a silent no-op: it passed a non-existent --check flag to audit-codex-parity.py, swallowed the argparse error via `|| true`, then grep'd for strings the audit never emits. Now uses the exit code + JSON output and correctly fails on drift. - Added `scripts/check-skill-size.sh` (warn>500, fail>800 lines) to flag oversized SKILL.md files that should decompose into references/*.md. Current state: 6 warnings (crank/implement/post-mortem/release/swarm/vibe), 0 fails. Hygiene sweep: heal.sh --strict clean, codex parity audit clean, 69/69 validators green, size-lint reports no failures. https://claude.ai/code/session_014AgjT36REb94fjL7sxrnFf
30 lines
1.1 KiB
Bash
Executable File
30 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# check-codex-parity-drift.sh — Goal gate script
|
|
# Runs audit-codex-parity.py and fails if any findings exist.
|
|
# Exit 0 = pass (no drift), exit 1 = fail (drift detected)
|
|
set -euo pipefail
|
|
|
|
ROOT=$(git rev-parse --show-toplevel 2>/dev/null) || { echo "Not in a git repo"; exit 1; }
|
|
|
|
AUDIT_PY="$ROOT/scripts/audit-codex-parity.py"
|
|
if [[ ! -f "$AUDIT_PY" ]]; then
|
|
echo "SKIP: $AUDIT_PY not found"
|
|
exit 0
|
|
fi
|
|
|
|
# Run audit in JSON mode. The script exits 0 when clean, 1 when drift exists.
|
|
# We always want to see findings on failure, so capture output and status separately.
|
|
JSON_OUTPUT=$(python3 "$AUDIT_PY" --repo-root "$ROOT" --json 2>/dev/null || true)
|
|
STATUS=0
|
|
python3 "$AUDIT_PY" --repo-root "$ROOT" >/dev/null 2>&1 || STATUS=$?
|
|
|
|
if [[ "$STATUS" -ne 0 ]]; then
|
|
FINDING_COUNT=$(python3 -c "import json,sys; print(len(json.loads(sys.argv[1] or '[]')))" "$JSON_OUTPUT" 2>/dev/null || echo "?")
|
|
echo "FAIL: $FINDING_COUNT codex parity finding(s) detected"
|
|
python3 "$AUDIT_PY" --repo-root "$ROOT" 2>&1 | head -40 || true
|
|
exit 1
|
|
fi
|
|
|
|
echo "PASS: No codex parity drift detected"
|
|
exit 0
|