Pre Commit Gate Guard
Path:
pi-cybernetic/phase0-gate-governance/hooks/pre_commit_gate_guard.pyRelative: phase0-gate-governance/hooks/pre_commit_gate_guard.pySubproject: pi-cyberneticCategory: otherLines: 126Bytes: 4,956Imports: 5Exports: 5
Content Preview
- #!/usr/bin/env python3
- """pre_commit_gate_guard.py — git pre-commit enforcement of N15 (layer 3).
- Rules:
- 1. Any staged Modify/Delete/Rename of a gates/v*/ file that appears in
- HEAD's MANIFEST.json => reject. Additions are always allowed.
- 2. If gates/MANIFEST.json is staged, it must be append-only relative to
- HEAD: every existing entry byte-identical (delegates to
- gate_manifest.py append-check).
- 3. If any gates/ path is staged, the STAGED tree must be self-consistent:
- e