Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mnemion-js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion mnemion-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"license": "MIT",
"scripts": {
"prepare": "git config core.hooksPath mnemion-js/scripts/git-hooks || true",
"build:pages": "vite build --config vite.fragment.ts",
"build:web": "vite build --config vite.web.ts",
"preview:render": "vite dev --config vite.preview.ts --open /render-preview.html",
Expand Down Expand Up @@ -63,7 +64,7 @@
"@types/react-dom": "^19.2.0",
"@vitejs/plugin-react": "^5.0.0",
"ai": "^6.0.206",
"coherence-harness": "github:daniloc/coherence#v0.5.0",
"coherence-harness": "github:daniloc/coherence#v0.5.1",
"concurrently": "^9.0.0",
"typescript": "^6.0.3",
"vite": "^8.0.16",
Expand Down
20 changes: 20 additions & 0 deletions mnemion-js/scripts/git-hooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
# Block a push that would land STALE coherence docs.
#
# The committed docs/coherence/{graph.json,_graph.html} + AGENTS.md are derived
# from the spec tree + code; CI's `coherence:docs:check` fails if they drift. This
# hook moves that check left — to before the push leaves your machine — so the
# regenerate step is enforced by the tool, not remembered as a convention.
#
# With coherence >=0.5.1 the freshness gate ignores line numbers, so this fires
# ONLY on real structural drift (a new/removed/renamed symbol, import, component,
# claim, or boundary) committed without regenerating. Comment/line-shift edits
# pass silently. Installed via the `prepare` script (core.hooksPath); bypass a
# single push with `git push --no-verify` if you must.
cd "$(git rev-parse --show-toplevel)/mnemion-js" || exit 1
if ! npm run --silent coherence:docs:check; then
echo ""
echo "✗ push blocked: coherence docs are stale (a structural change without a regenerate)."
echo " Fix: (cd mnemion-js && npm run coherence:docs) then commit docs/coherence/ + AGENTS.md."
exit 1
fi
Loading