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.
33 lines
781 B
YAML
33 lines
781 B
YAML
# Git hooks (lefthook). Hooks call the same package.json scripts CI runs —
|
|
# one source of truth; the hook is just an earlier, faster checkpoint.
|
|
# Install: `yarn lefthook install` (runs automatically via postinstall).
|
|
|
|
pre-commit:
|
|
parallel: true
|
|
jobs:
|
|
- name: lint (staged)
|
|
glob: '*.{ts,mts,cts,mjs}'
|
|
exclude:
|
|
- 'vendor/*/src/**'
|
|
run: node_modules/.bin/eslint --fix {staged_files} && git add {staged_files}
|
|
stage_fixed: true
|
|
|
|
- name: typecheck
|
|
glob: '*.ts'
|
|
run: yarn typecheck
|
|
|
|
- name: vendor manifest guard
|
|
run: scripts/check-vendor-manifest.sh
|
|
|
|
pre-push:
|
|
parallel: true
|
|
jobs:
|
|
- name: test
|
|
run: yarn test
|
|
|
|
- name: hygiene
|
|
run: yarn hygiene
|
|
|
|
- name: doc-sync
|
|
run: yarn doc-sync
|