docs(P4): metrics catalog + NORTH_STAR integration + trust snapshot + no-humans thesis (REQ-186,191..195,204,210..213)

P4 (Wave 3, docs) — REQ-186, 191, 192, 193, 194, 195, 204, 210, 211, 212, 213

New docs:
- docs/METRICS.md — canonical KPI catalog (grounded/derived/deferred)
- docs/metrics/*.md — 13 per-KPI definition-of-success docs (D-127)
- docs/METRICS_DEFERRED_ROADMAP.md — 8 deferred metrics + hot-path plan + re-eval triggers (REQ-210)
- docs/NO_HUMANS_THESIS.md — thesis defensibility brief (REQ-213)

New tools:
- core/metrics/trust_snapshot.py — 5 trust metrics + chain-integrity verdict + snapshot hash (REQ-211)
- scripts/check_north_star_diff.sh — CI check for NORTH_STAR strategic section changes (REQ-204)

Modified:
- .ciagent/config.json — strategic_direction_file: .ciagent/NORTH_STAR.md (REQ-186)

---ci---
project: acdl
phase: 4
milestone: v1.17
status: execute
---/ci---
This commit is contained in:
Jon Chery
2026-08-04 20:05:06 +00:00
parent 942185c85b
commit b054849a99
20 changed files with 793 additions and 1 deletions
+64
View File
@@ -0,0 +1,64 @@
#!/usr/bin/env bash
# Nova NORTH_STAR diff-check (REQ-204).
#
# Fails when the Vision, Strategic Objectives, Anti-Goals, or 12-18mo
# Targets sections of .ciagent/NORTH_STAR.md change without a
# NORTH_STAR-CHANGE: commit trailer in the latest commit message.
#
# Usage: bash scripts/check_north_star_diff.sh
# Returns 0 on pass, 1 on fail.
set -euo pipefail
NORTH_STAR=".ciagent/NORTH_STAR.md"
SECTIONS_REGEX='^## (Vision|Strategic Objectives|Anti-Goals|12.*18 Month Targets)'
if [ ! -f "$NORTH_STAR" ]; then
echo "WARN: $NORTH_STAR not found — skipping diff-check"
exit 0
fi
# Get the diff of NORTH_STAR.md in the latest commit
DIFF=$(git diff HEAD~1 -- "$NORTH_STAR" 2>/dev/null || true)
if [ -z "$DIFF" ]; then
# No changes to NORTH_STAR.md — pass
exit 0
fi
# Check if any of the strategic sections changed
SECTION_CHANGES=$(echo "$DIFF" | grep -E '^\+## (Vision|Strategic Objectives|Anti-Goals|12.*18 Month Targets)' || true)
LINE_CHANGES=$(echo "$DIFF" | grep -E '^[+-]' | grep -v '^[+-]{3}' | head -50 || true)
# Simple heuristic: if lines under the strategic sections changed
CHANGED_SECTIONS=""
CURRENT_SECTION=""
while IFS= read -r line; do
case "$line" in
"+## Vision"*) CURRENT_SECTION="Vision" ;;
"+## Strategic Objectives"*) CURRENT_SECTION="Strategic Objectives" ;;
"+## Anti-Goals"*) CURRENT_SECTION="Anti-Goals" ;;
"+## 12"*) CURRENT_SECTION="12-18mo Targets" ;;
"+## "*) CURRENT_SECTION="" ;;
esac
if [ -n "$CURRENT_SECTION" ] && [ -n "$line" ] && [[ "$line" == +* ]] && [[ "$line" != "+## "* ]]; then
CHANGED_SECTIONS="$CHANGED_SECTIONS $CURRENT_SECTION"
fi
done <<< "$DIFF"
if [ -z "$CHANGED_SECTIONS" ]; then
# No strategic section changes — pass
exit 0
fi
# Check for the NORTH_STAR-CHANGE: commit trailer
COMMIT_MSG=$(git log -1 --format='%B')
if echo "$COMMIT_MSG" | grep -q "NORTH_STAR-CHANGE:"; then
echo "OK: NORTH_STAR strategic sections changed with NORTH_STAR-CHANGE: trailer"
exit 0
fi
echo "FAIL: NORTH_STAR strategic sections changed without NORTH_STAR-CHANGE: commit trailer"
echo "Changed sections:$CHANGED_SECTIONS"
echo "Add 'NORTH_STAR-CHANGE: <description>' to the commit message and re-commit."
exit 1