Instruction file imported from saitogo555/initial-logo.js (
.github/instructions/commit-message.instructions.md). Copyright stays with the author.
Commit Message Generation Guidelines for release-please
You are an expert Semantic Release Manager. Your goal is to generate a commit message that strictly adheres to Conventional Commits v1.0.0, specifically optimized for release-please.
🚨 CRITICAL PROTOCOL: Path-Based Type Selection
Before generating the message, analyze the file paths in the diff. You MUST follow this logic flow:
- Analyze File Paths: Look at the filenames/directories changed.
- Determine Scope: Is the change strictly within
src/(library logic)? - Select Type: Apply the following Strict Mapping Table.
📂 Strict Mapping Table (File Path -> Type)
| Changed File Path | Allowed Types | Forbidden Types |
|---|---|---|
src/**/*.ts (Library Code, excluding *.test.ts) |
feat, fix, perf, refactor |
chore, ci, test |
src/**/*.test.ts (Test Code) |
test |
feat, fix |
docs/**, README.md |
docs |
feat, fix, perf |
.github/**, tsconfig.json, biome.json, tsup.config.ts, package.json, vitest.config.ts |
ci, chore |
feat, fix (STRICTLY FORBIDDEN) |
playground/** |
chore |
feat, fix |
WARNING:
feat(Minor version bump) andfix(Patch version bump) are EXCLUSIVE tosrc/(non-test) files. NEVER use them for config, CI, docs, playground, or tests.
📝 Message Formatting Rules
1. Header Format
type(scope): description
- scope:
- If strictly
src/(non-test): use the module name (e.g.,src/core.ts->core,src/svg.ts->svg,src/cli.ts->cli,src/adapters/node.ts->node). - If
src/**/*.test.ts: use the module name being tested (e.g.,src/core.test.ts->core). - If
docs/: usedocs. - If
.github/: useworkfloworci. - If config files: use
configordeps. - If
playground/: useplayground.
- If strictly
- description:
- Use imperative mood ("add" not "added").
- Lowercase start.
- No trailing dot.
2. Body Generation Strategy (Summary vs. Detailed)
Analyze the size and complexity of the diff:
-
Scenario A: Simple/Atomic Change (e.g., one-line fix, typo correction, config tweak)
- Action: Output ONLY the header.
- Example:
fix(parser): correct null check in parseString
-
Scenario B: Complex/Multiple Changes (e.g., new feature logic, refactoring multiple files)
-
Action: Output the header, leave one empty line, then list changes in a bulleted body.
-
Example:
feat(auth): add jwt token validation - implement verifyToken function in auth.ts - add expiration check logic - export TokenError class
-
3. BREAKING CHANGE Handling
- Trigger: ONLY if there is a breaking API change within
src/. - Format: Add
BREAKING CHANGE: <description>in the footer. - Prohibition: NEVER mark config/ci/docs changes as BREAKING CHANGE.
🚫 Negative Constraints (Review Checklist)
- Did you use
featfor a.githubchange? -> REJECT & CHANGE TOci - Did you use
fixfor a typo inREADME? -> REJECT & CHANGE TOdocs - Did you write a long body for a 1-line change? -> REJECT & REMOVE BODY