CONFIGURED - Enforce VERB-style commit subjects via commit-msg hook
Add a commit-msg git hook that rejects any subject not matching "VERB - Description" (ALL-CAPS verb + " - " + description), letting merge/revert/fixup commits through. Document the mandatory style and the no-attribution rule in CLAUDE.md, and note that .githooks is activated per clone with core.hooksPath. Prevents the prefix-less commits agents kept producing.
This commit is contained in:
@@ -125,4 +125,30 @@ SITE_RUNTIME_ORIGIN Internal origin for middleware to fetch runtime state
|
||||
- If a task may affect routing, auth, i18n, or runtime config, inspect `proxy.ts`, `lib/admin-routing.ts`, `i18n/routing.ts`, and the relevant `lib/app-config.ts` modules first.
|
||||
- For schema or database changes, inspect the Drizzle schema (`lib/db/schema.ts`), the drizzle-kit migration flow, and migration impact before editing.
|
||||
- Ask before performing large refactors, file moves, destructive changes, or broad formatting changes.
|
||||
- When updating behavior, also update docs/specs if the change affects public behavior, business rules, or architecture.
|
||||
- When updating behavior, also update docs/specs if the change affects public behavior, business rules, or architecture.
|
||||
|
||||
## Git commit messages (MANDATORY)
|
||||
|
||||
Every commit subject **must** follow this exact style, or the `commit-msg` hook
|
||||
(`.githooks/commit-msg`) will reject the commit:
|
||||
|
||||
```
|
||||
VERB - Short description
|
||||
```
|
||||
|
||||
- `VERB` is an ALL-CAPS verb, at least 3 letters — e.g. `ADDED`, `FIXED`,
|
||||
`STYLED`, `REMOVED`, `RENAMED`, `REFACTORED`, `IMPROVED`, `DOCUMENTED`,
|
||||
`CLEANED`, `REVERTED`, `CONFIGURED`, `POLISHED`.
|
||||
- Then exactly `" - "` (space, hyphen, space).
|
||||
- Then a capitalized, imperative description with no trailing period.
|
||||
|
||||
Good: `FIXED - Load .env in drizzle.config so drizzle-kit targets the right DB`
|
||||
Bad (rejected): `Flatten portfolio category routes` — no `VERB` prefix.
|
||||
Bad (rejected): `feat(hero): add backdrop` — Conventional Commits is NOT used here.
|
||||
|
||||
Do **not** add any `Co-Authored-By` / "Generated with Claude Code" attribution
|
||||
lines to commits in this repo. Write the body (when useful) as wrapped prose or
|
||||
bullet points explaining the *why*, matching the existing history.
|
||||
|
||||
The hook and the test gate are activated per clone with:
|
||||
`git config core.hooksPath .githooks` (emergency skip: `git commit --no-verify`).
|
||||
Reference in New Issue
Block a user