Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
hyperframes/lefthook.yml at main · SamSammane/hyperframes · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
SamSammane
hyperframes
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
hyperframes
/
lefthook.yml
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
79 lines (78 loc) · 4.34 KB
main
Breadcrumbs
hyperframes
/
lefthook.yml
Copy path
Top
File metadata and controls
Code
Blame
79 lines (78 loc) · 4.34 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
pre-commit
:
parallel
:
true
commands
:
lint
:
glob
:
"
*.{js,jsx,ts,tsx}
"
run
:
bunx oxlint --no-error-on-unmatched-pattern {staged_files}
format
:
glob
:
"
*.{js,jsx,ts,tsx,json,md,yaml,yml}
"
#
Auto-format and re-stage so the committed snapshot is always formatted.
#
Replaces --check which only reports — that left unformatted files in
#
commits when the hook ran after the amend snapshot was taken.
run
:
bunx oxfmt --no-error-on-unmatched-pattern {staged_files} && git add -f {staged_files}
skills-manifest
:
glob
:
"
skills/**
"
#
Regenerate the freshness fingerprint when a skill changes, then re-stage
#
it so skills-manifest.json (repo root) never drifts from skills/ (CI
#
enforces the same via the "Skills: manifest in sync" job). Churn-free:
#
the generator rewrites only when a content hash actually changed.
run
:
bun packages/cli/scripts/gen-skills-manifest.ts && git add skills-manifest.json
catalog-index
:
glob
:
"
registry/*/*/registry-item.json
"
#
Rebuild the on-device search vectors when an item's searchable text
#
changes, then re-stage them so registry/catalog-artifact/ never drifts
#
from the registry (CI enforces the same via the "Catalog: search index
#
covers the registry" job). Churn-free: identical inputs re-embed to
#
identical bytes, so an unrelated registry edit leaves no diff.
#
Exit 3 is "no embedding model here", which is the normal case for an
#
outside contributor. Their commit must not be blocked over a 32 MB
#
opt-in they were never asked to install; CI names the gap instead.
run
:
|
bun scripts/catalog/build-local-vectors.ts || { [ $? -eq 3 ] && exit 0; exit 1; }
git add registry/registry.json registry/catalog-artifact/local-vectors.json registry/catalog-artifact/local-vectors.bin
typecheck
:
glob
:
"
*.{ts,tsx}
"
run
:
cd packages/core && bunx tsc --noEmit && cd ../studio && bunx tsc --noEmit && cd ../.. && bunx tsc --noEmit -p scripts/tsconfig.json
#
Mirrors the CI gate (same `--base origin/main` so the local hook can't
#
pass on a branch CI would fail). Audits the working tree, which means
#
unstaged WIP in `packages/**` is part of the diff — stash before
#
committing if that surprises you. `--gate new-only` (the default) only
#
fails on issues introduced by the branch, not inherited findings.
fallow
:
glob
:
"
packages/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}
"
#
Unset git worktree env vars: fallow creates a temp worktree internally and
#
GIT_DIR/GIT_INDEX_FILE (set by git in worktree hook context) break that.
#
env -u is safe in non-worktree contexts (no-op when var is unset).
run
:
env -u GIT_DIR -u GIT_INDEX_FILE -u GIT_WORK_TREE bunx fallow audit --base origin/main --fail-on-issues
largefiles
:
#
Reject large binaries committed straight into the git pack instead of
#
LFS. The script reads the staged set itself (via `git diff --cached`)
#
rather than taking lefthook's `{staged_files}` expansion, which would
#
split paths containing spaces. It skips files under the limit, anything
#
routed through LFS, and registry/ assets. Tune via HF_MAX_NONLFS_KB.
run
:
./scripts/check-large-files.sh
tracked-artifacts
:
#
Keep ignored dependency trees and platform metadata out of commits.
#
`git ls-files` observes the staged index, so staged removals pass and
#
an accidental force-add fails before the commit is created.
run
:
bun run check:tracked-artifacts
filesize
:
#
Scoped to packages/studio — the 600 LOC limit is a studio architecture
#
standard enforced as part of the App.tsx decomposition work. Player and
#
other packages enforce size discipline via code review and convention.
glob
:
"
packages/studio/**/*.{ts,tsx}
"
exclude
:
"
(
\\
.test
\\
.(ts|tsx)$|
\\
.generated
\\
.)
"
run
:
|
for f in {staged_files}; do
# Skip test and generated files (exclude pattern backup in case lefthook doesn't filter)
case "$f" in *.test.ts|*.test.tsx|*.generated.*) continue ;; esac
lines=$(wc -l < "$f")
if [ "$lines" -gt 600 ]; then
echo "ERROR: $f has $lines lines (max 600)"
exit 1
fi
done
commit-msg
:
commands
:
commitlint
:
run
:
bunx commitlint --edit "{1}"
You can’t perform that action at this time.