Docs/Rules/Workflow Rules

Workflow Rules

Rules that enforce development workflow conventions.

workflow/commit-conventions

Severity: warn | Event: Stop

Validates the most recent commit follows conventional commit format: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert.

workflow/pr-reminder

Severity: info | Event: Stop

At session end, checks for uncommitted or unpushed work and suggests next steps.

workflow/migration-safety

Severity: warn | Event: PreToolUse | Tools: Write

Warns about dangerous SQL patterns in .sql files:

  • DROP TABLE without IF EXISTS
  • DELETE without WHERE
  • TRUNCATE TABLE
  • UPDATE without WHERE
  • Hardcoded UUIDs
  • Missing migration header comments

workflow/review-gate

Severity: warn | Event: Stop

Warns when commits are made directly to main or master without a pull request. Suggests creating a feature branch.

workflow/todo-tracker

Severity: info | Event: PostToolUse | Tools: Write, Edit

Tracks TODO, FIXME, HACK, and XXX comments in source files and reports counts per category.

workflow/changelog-reminder

Severity: info | Event: Stop

When more than 5 files are changed or migration files are modified, warns if CHANGELOG.md hasn't been updated.

workflow/format-on-save

Severity: info | Event: PostToolUse | Tools: Write, Edit

Detects the project's formatter (Prettier, Biome, Black, gofmt, rustfmt) and suggests running it on modified files.

workflow/branch-naming

Severity: warn | Event: Stop

Warns when the current branch name doesn't follow naming conventions. Default pattern: feature/, fix/, chore/, hotfix/, release/, bugfix/ prefix. Skips main, master, dev, develop, staging.

rules: {
  'workflow/branch-naming': {
    pattern: '^(feature|fix|chore|hotfix|release)/[a-z0-9-]+$',
    skipBranches: ['main', 'master', 'dev'],
  },
}

workflow/lockfile-consistency

Severity: warn | Event: PreToolUse | Tools: Write

Warns when package.json is written with dependency sections, reminding to run the package manager to update the lockfile.