Skip to content

[Feat] commit_types project-config override for validate-commit-format #22

@atlas-apex

Description

@atlas-apex

Context

`validate-commit-format.sh` (shipped in #13) enforces a fixed type list: `feat, fix, refactor, test, docs, chore, style, perf, build, ci, revert`. This matches the PR-title regex in `git-conventions.md` and covers most teams, but some projects want different types:

  • Teams that use `wip` as an interim commit type
  • Teams that want `security` or `deps` as dedicated types
  • Teams that don't use `revert` or want to force squash-merges and therefore forbid it
  • Teams using custom conventions like `[MINOR]` / `[MAJOR]`

Currently, changing the type list requires editing the hook script directly. This ticket adds a project-config override so forks can customize without touching framework code.

Acceptance Criteria

  • `.claude/project-config.json` schema gains a `commit_types` field (JSON array of strings).
  • `validate-commit-format.sh` reads the field from `.claude/project-config.json` if it exists, falls back to the default 11-type list otherwise.
  • Same project-config file is also read by `validate-pr-create.sh` if that makes sense — OR keep them independent (PR titles vs commit messages may legitimately have different vocabularies). Decide in the implementation and document in the PR body.
  • `.claude/skills/onboard/SKILL.md` — update the discovery questions to ask about commit types (optional, default "use the framework's 11-type list").
  • `.claude/hooks/README.md` — document the override in the commit-format hook section.
  • Smoke test: project-config with `{"commit_types": ["wip", "feat", "fix"]}` accepts `wip: scratch` and rejects `refactor: cleanup`.

Non-goals

  • Does NOT change the default type list.
  • Does NOT add support for Conventional Commits breaking change markers (`feat!:`) — separate ticket.

Links

Metadata

Metadata

Assignees

Labels

P3Low — ergonomics, nice-to-have

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions