Initial commit with translated description

This commit is contained in:
2026-03-29 10:19:19 +08:00
commit 5aa1f324c6
81 changed files with 27526 additions and 0 deletions

48
scripts/checks/README.md Normal file
View File

@@ -0,0 +1,48 @@
# Pre-commit Checks
Automated enforcement of rules from `AGENTS.md` and `CONTRIBUTING.md`.
## Checks
| Check | Rule Source | Description |
| ----------------- | --------------------- | ---------------------------------------------------- |
| `version-sync.sh` | CONTRIBUTING.md | Ensures `package.json` and `SKILL.md` versions match |
| `no-user-data.sh` | public/data/AGENTS.md | Blocks commits of user-specific data files |
| `no-secrets.sh` | AGENTS.md | Scans for accidentally committed secrets |
## Adding New Checks
1. Create a new script in `scripts/checks/` named `<check-name>.sh`
2. Script must:
- Accept repo root as first argument (`$1`)
- Exit `0` on success
- Exit `1` on failure
- Print clear error messages when failing
3. Make it executable: `chmod +x scripts/checks/<check-name>.sh`
## Running Manually
```bash
# Run all checks
./scripts/pre-commit
# Run individual check
./scripts/checks/version-sync.sh .
```
## Installing the Hook
```bash
make install-hooks
# or manually:
cp scripts/pre-commit .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
```
## Bypassing (Not Recommended)
```bash
git commit --no-verify
```
Only use this if you understand why the check is failing and have a valid reason to bypass.