FLOW-004 recommended Commit Conventions

Commit messages follow project conventions

Documented and enforced commit message format

Question to ask

"Can you tell what changed last week from the git log?"

What to check

  • Convention documented or commitlint configured
  • Recent commits follow consistent pattern
  • Messages are descriptive, not vague

Verification guide

Severity: Recommended

Check automatically:

  1. Check for commit convention documentation:

    # Look for documented conventions
    grep -riE "commit.*message|conventional.*commit|commit.*format" README.md CONTRIBUTING.md CLAUDE.md docs/ 2>/dev/null
    
  2. Check for commitlint or enforcement tooling:

    # Look for commitlint config
    ls -la commitlint.config.* .commitlintrc* 2>/dev/null
    
    # Check package.json for commit hooks
    grep -E "commitlint|husky|commit-msg|@commitlint" package.json 2>/dev/null
    
  3. Sample recent commit messages:

    # Get recent commits
    git log --oneline -20
    
    # Check for conventional commit format (feat:, fix:, etc.)
    git log --oneline -50 | grep -cE "^[a-f0-9]+ (feat|fix|chore|docs|refactor|test|style|ci|build|perf)(\(.+\))?:"
    
  4. Check for poor quality messages:

    # Look for vague/meaningless commits
    git log --oneline -50 | grep -iE "^[a-f0-9]+ (fix|update|wip|tmp|test|asdf|stuff|changes)$"
    

Cross-reference with:

  • GIT-001 (Clone and run) - CLAUDE.md may document commit conventions
  • TEST-002/003 (Commits include tests) - commit messages indicate fix vs feature

Pass criteria:

  • Commit convention documented OR commitlint configured
  • Recent commits follow a consistent pattern (conventional commits, or project-specific)
  • Messages are descriptive (not just "fix" or "update")

Fail criteria:

  • No documented convention and no enforcement
  • Inconsistent commit message styles across team
  • Many vague/meaningless messages ("fix", "wip", "asdf")

If no convention found, ask user: "No commit message convention documented or enforced. Does the team follow a standard like Conventional Commits? This helps with changelog generation and understanding history."

Evidence to capture:

  • Convention documented (location) or tooling (commitlint)
  • Sample of recent commits showing format
  • Consistency ratio (% following pattern out of last 50)
  • Examples of poor commit messages (if any)

Section

09. Development Workflow

Monitoring & Health