Why CI enforcement matters
- Generation-time hooks cover interactive and agentic Claude Code sessions
- Code can also arrive from manual edits, other tools, or agents without hook coverage
- CI enforcement is the backstop — every commit checked regardless of how it was produced
- Positions governance at three layers: generation time → PR review → CI gate
How it works
mneme checkvalidates a file or diff against the decision corpus in.mneme/project_memory.json- Run against changed files in a PR to surface any architectural violations
- Exit code 2 = violation found → CI step fails → PR blocked
- Exit code 0 = no violations → CI step passes
Example workflow
# .github/workflows/mneme-governance.yml
name: Architectural Governance
on:
pull_request:
branches: [main]
jobs:
governance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: pip install mneme
- name: Check changed files
run: |
git diff --name-only origin/main...HEAD | \
xargs -I{} mneme check {}
Status
- CI enforcement gate is Phase 1 current focus — see the roadmap
- The
mneme checkcommand is available today viapip install mneme - The GitHub Actions workflow above is the reference integration pattern
- Managed GitHub Actions workflow artifact coming in Q3 2026
Layered governance model
Layer 1: Generation-time enforcement via Claude Code hooks
Layer 2: PR review (human + AI)
Layer 3: CI gate via Mneme in GitHub Actions