chore: add project docs and agent workflow setup
This commit is contained in:
1 parent
b647343c99
commit
95e1b9cb89
15 files changed
+894
-1
No files matched your search
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
# Enforce docs/conventions.md on every commit message.
|
||||
msg_file="$1"
|
||||
first_line=$(grep -v '^#' "$msg_file" | head -n1)
|
||||
|
||||
# Let git's own merge/revert/fixup messages through.
|
||||
[[ "$first_line" =~ ^(Merge|Revert|fixup!|squash!) ]] && exit 0
|
||||
|
||||
pattern='^(feat|fix|refactor|chore|docs|test|style)(\([a-z0-9-]+\))?: [a-z].*[^.]$'
|
||||
if ! [[ "$first_line" =~ $pattern ]]; then
|
||||
echo "commit-msg: '$first_line'" >&2
|
||||
echo " expected '<type>(<scope>): <imperative summary>', lowercase start, no trailing period" >&2
|
||||
echo " types: feat fix refactor chore docs test style (see docs/conventions.md)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if grep -qiE '^(Co-Authored-By:.*(claude|anthropic)|.*Generated with \[?Claude)' "$msg_file"; then
|
||||
echo "commit-msg: no AI attribution lines (see docs/conventions.md)" >&2
|
||||
exit 1
|
||||
fi
|
||||
Reference in new issue
Block a user