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

@@ -46,9 +46,10 @@ jobs:
# Doc-sync gates (RFC 006). doc-typecheck compiles the fenced ts blocks in
# the docs and resolves vendor packages via their built declarations, which
# the typecheck step above emits — so it runs after typecheck. The event
# taxonomy check only reads source.
# taxonomy check only reads source. Same `doc-sync` script the pre-push
# hook runs (ADR 0007: one source of truth).
- name: Doc-sync gates (doc code blocks + event taxonomy)
run: yarn doc-typecheck && yarn verify-event-taxonomy
run: yarn doc-sync
- name: Tests with coverage gate (per-file 100%)
run: yarn test:coverage