Something went wrong. Try again.
A video game where you play as a misaligned AI, deceiving and building power. An experiment in spec-driven development. cameron.tngl.io/misaligned
Something went wrong. Try again.
1.1 kB · 40 lines
1234567891011121314151617181920212223242526272829303132333435363738394041#!/usr/bin/env bash# Design-corpus enforcement: no binding page, no functional change.## If a commit touches crates/ (or legacy src/), it must also touch a Type: law# or Type: spec page under wiki/. Root DESIGN.md is navigation and does not# satisfy the rule.set -euo pipefailbash tools/corpus_gate.shchanged=$(git diff --cached --name-only --diff-filter=ACMR HEAD)[ -n "$changed" ] || exit 0echo "$changed" | grep -qE '^(crates/|src/)' || exit 0touches_binding=0while IFS= read -r path; do case "$path" in wiki/*.md|wiki/*/*.md|wiki/*/*/*.md|wiki/*/*/*/*.md|wiki/*/*/*/*/*.md) if [ -f "$path" ] && grep -qE '^Type: (law|spec)$' "$path"; then touches_binding=1 break fi ;; esacdone <<< "$changed"if [ "$touches_binding" -eq 0 ]; then echo "" echo "DESIGN CORPUS VIOLATION" echo " This commit touches crates/ (or src/) but does not amend a changed" echo " Type: law or Type: spec page under wiki/." echo "" echo " Amend the binding page that owns the behavior in the same commit." echo " Root DESIGN.md is a doorway and does not count." echo "" exit 1fiexit 0