docs: add AGENTS.md and CLAUDE.md restricting AI agents from bypassing commit checks

This commit is contained in:
zjdndjf
2026-08-13 05:24:32 +08:00
parent 147ecaa7d9
commit 3fc2223448
2 changed files with 30 additions and 0 deletions

14
AGENTS.md Normal file
View File

@@ -0,0 +1,14 @@
# AGENTS.md
## Commit rules
- NEVER use `git commit --no-verify` or any other way to bypass git hooks.
- NEVER use `git push --no-verify`.
- The pre-commit hook runs `format:check`, `lint:check`, `typecheck`. Every commit must pass all three.
- If the hook fails, fix the root cause and retry. Never bypass.
- Run `pnpm run format:check && pnpm run lint:check && pnpm run typecheck` before committing.
## Generated files
- Do not edit `pnpm-lock.yaml` directly; change dependencies via pnpm.
- Do not edit `extra/sidecar/` or `node_modules/.temp/`; they are generated by `scripts/prepare.mjs`.

16
CLAUDE.md Normal file
View File

@@ -0,0 +1,16 @@
# CLAUDE.md
## Commit rules
- NEVER use `git commit --no-verify` or any other way to bypass git hooks.
- NEVER use `git push --no-verify`.
- The pre-commit hook runs `format:check`, `lint:check`, `typecheck`. Every commit must pass all three.
- If the hook fails, fix the root cause and retry. Never bypass.
- Run `pnpm run format:check && pnpm run lint:check && pnpm run typecheck` before committing.
## Generated files
- Do not edit `pnpm-lock.yaml` directly; change dependencies via pnpm.
- Do not edit `extra/sidecar/` or `node_modules/.temp/`; they are generated by `scripts/prepare.mjs`.
Same rules as `AGENTS.md` (for other AI tools).