Files
ai-for-dummies/.husky/commit-msg
T
Marcos Paulo 2e79aacecc revert: drop task 03's out-of-scope audit-ui changes
The verification-engineer brief scopes task 03 to the snapshot regression net.
It also rewrote scripts/audit-ui.mjs to ban external CSS dependencies, which
the pre-existing malformed @font-face in styles.css violates, leaving the gate
red for every downstream task.

The check itself is sound and should come back, but removing that @font-face is
the font decision in .agents/context/design-system.md — task 02's call, and a
human one. Snapshot net kept intact.

Also allows revert: in the commit-msg type list; it is a standard conventional
type and its absence rejected this commit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-05 03:31:53 +00:00

27 lines
969 B
Plaintext

# Conventional commits, matching this repository's existing log
# (feat:, fix:, docs:, refactor:, chore:, test:, style:, ci:).
#
# Deliberately a plain regex rather than a commitlint dependency: this project's
# thesis is having no unnecessary dependencies, and one regex is legible to
# every agent that has to satisfy it.
message_file=$1
first_line=$(head -n1 "$message_file")
# Allow merge and revert commits through untouched.
case "$first_line" in
"Merge "*|"Revert "*) exit 0 ;;
esac
if ! printf '%s' "$first_line" | grep -qE '^(feat|fix|docs|refactor|chore|test|style|ci|perf|build|revert)(\([a-z0-9 -]+\))?: .{1,}$'; then
echo "commit-msg: subject must be '<type>: <subject>' (lowercase type)." >&2
echo " types: feat fix docs refactor chore test style ci perf build revert" >&2
echo " got: $first_line" >&2
exit 1
fi
if [ "${#first_line}" -gt 72 ]; then
echo "commit-msg: subject is ${#first_line} chars; keep it under 72." >&2
exit 1
fi