Files
msd-core/docs/features/community-hooks-opt-in.md
Tom Boucher 4e1c449281 enh(#3811): add hooks.commit_types config surface to gsd-validate-commit (#4340)
* enh(#3811): add hooks.commit_types config surface to gsd-validate-commit

Extends the opt-in Conventional Commits hook with a hooks.commit_types
config array that adds project-specific types to the 10 built-ins
without replacing them. Configured values pass a safe-token filter
before reaching the compiled regex, so a config entry can never alter
the pattern's structure. The regex alternation, the human-readable
error text, and a new typed valid_types JSON field all derive from one
list instead of the two hand-synced copies this replaces.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* chore(#3811): backfill changeset PR number

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: sim <sim@local>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-05 18:35:09 -04:00

1.3 KiB

id, title, group
id title group
88 Community Hooks Opt-In v1.32 Features

Hooks: gsd-validate-commit.sh, gsd-session-state.sh, gsd-phase-boundary.sh

Purpose: Optional git and session hooks for GSD projects, gated behind hooks.community: true in config.

Requirements:

  • REQ-COMMUNITY-01: All community hooks MUST be no-ops unless hooks.community is true in .planning/config.json
  • REQ-COMMUNITY-02: gsd-validate-commit.sh MUST enforce Conventional Commits format on git commit messages
  • REQ-COMMUNITY-03: gsd-session-state.sh MUST track session state transitions
  • REQ-COMMUNITY-04: gsd-phase-boundary.sh MUST enforce phase boundary checks

Config:

Setting Type Default Description
hooks.community boolean false Enable optional community hooks for commit validation, session state, and phase boundaries
hooks.commit_types array of strings [] Extra Conventional Commits types gsd-validate-commit.sh accepts, in addition to the built-in feat, fix, docs, style, refactor, perf, test, build, ci, chore — never replaces them. Each entry must match ^[a-z][a-z0-9-]*$ (lowercase letters, digits, hyphens); non-conforming or non-string entries are dropped. Example: { "hooks": { "community": true, "commit_types": ["enhance", "enh", "revert"] } }.