Contextual Conventional CommitsA generic VS Code extension that composes Conventional Commit messages through the built-in Git Source Control interface. Read the complete documentation. Unlike flat scope pickers, this extension resolves scopes after the commit type is selected. Repository policy can therefore allow Features
Commands
ExampleGiven this policy:
The extension offers:
It rejects:
Configuration model
|
| Field | Meaning |
|---|---|
groups |
Named scope groups to expand |
scopes |
Scopes defined directly for this type |
exclude |
Redundant or forbidden scopes |
allowNone |
Whether an unscoped commit is accepted |
allowCustom |
Whether users may enter a scope outside the resolved list |
contextualConventionalCommits.typeTrailerMatrix
Maps each type to high-value trailer tokens and contextual cautions. The composer lets users add one recommended or custom token and value at a time, remove mistakes, repeat a token when necessary, and finish without writing a CSV list.
Recommended tokens display a concise meaning from contextualConventionalCommits.trailerDescriptions. After selection, the value box shows a token-specific example from contextualConventionalCommits.trailerExamples. Teams can override or add both for their own vocabulary:
{
"contextualConventionalCommits.trailerDescriptions": {
"Fixes": "Issue or causal commit whose defect this change corrects",
"Runbook": "Operational procedure affected by the change"
},
"contextualConventionalCommits.trailerExamples": {
"Fixes": "#321",
"Runbook": "docs/runbooks/batch-worker.md"
}
}
{
"contextualConventionalCommits.typeTrailerMatrix": {
"fix": {
"highValue": ["Fixes", "Closes", "Reported-by", "Tested-by"],
"discouraged": ["Implements-blueprint"]
},
"security": {
"highValue": ["CVE", "GHSA", "Security-impact", "Fixes", "Backport-to"],
"discouraged": ["Public embargo details before disclosure"]
}
}
}
Recommended semantic model
The type answers what kind of change occurred. The scope identifies which package, subsystem, component, platform, or artefact is affected.
Good examples:
feat(api): add batch endpoint
fix(parser): handle escaped names
build(pnpm): update lockfile
ci(github-actions): publish release assets
docs(cli): document authentication options
security(auth): reject replayed authentication tokens
Redundant examples rejected by the default policy:
feat(feature): add export
fix(bug): handle null value
build(build): update tooling
ci(ci): adjust workflow
docs(docs): improve guide
The alphabetized default policy combines types used across Conventional Commits, Angular, Vue, commitlint, semantic-release, Release Please, Conventional Changelog, Atom, and common monorepo and domain workflows. The domain-oriented entries are project extensions rather than built-in Conventional Commits types; projects using a restricted commitlint type-enum must add the extensions they retain. See docs/type-scope-best-practices.md for the source mapping and consolidated scope and trailer guidance.
Development
npm install
npm run check
npm run package
The extension requires VS Code 1.95 or newer.