build: run doc-sync gates in the local pre-push hook too

The doc-sync gates were CI-only, so the AGENTS.md doc-sync promise could be
missed locally until after push. Add a shared `doc-sync` package.json script
(doc-typecheck + verify-event-taxonomy) wired into the lefthook pre-push job,
and point the CI step at the same script — one source of truth per ADR 0007.
Addresses PR review finding.
This commit is contained in:
Tianyi Cui
2026-06-14 10:40:20 +08:00
parent 7a39616a06
commit fa7d1df6f2
4 changed files with 10 additions and 5 deletions

View File

@@ -23,6 +23,7 @@
"publint": "tsx scripts/publint-all.ts",
"doc-typecheck": "tsx scripts/doc-typecheck.ts",
"verify-event-taxonomy": "tsx scripts/verify-event-taxonomy.ts",
"doc-sync": "yarn doc-typecheck && yarn verify-event-taxonomy",
"hygiene": "yarn knip && yarn publint && yarn constraints",
"demo:echo": "node --expose-internals --import tsx examples/echo-agent/start.ts",
"demo:coding": "node --expose-internals --import tsx examples/coding-agent/start.ts",