From 4eada566598bf2ac49a282e07cc777ba900745e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=98=81=EC=B0=BD=28piknow=29?= Date: Sat, 25 Oct 2025 16:31:15 +0900 Subject: [PATCH] doc: create documentation for Conventional Commits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Requirement: Provide comprehensive documentation for commit conventions as the single source of truth, with clear guidelines on commit types, issue template mappings, and real-world scenarios. Support both English and Korean readers. Implementation: - Created docs/CONVENTIONAL_COMMITS.md with complete documentation - Documented all 9 commit types (feat, fix, doc, config, refactor, agent, format, test, perf) - Added scope usage guidelines and examples - Created commit type to issue template mapping table - Added real-world scenario matrix for quick reference - Documented current limitations and future improvements - Added links to custom commands that enforce conventions - Created docs/CONVENTIONAL_COMMITS.ko.md as Korean translation - Preserved technical terms and code examples in English - Translated explanations and guidelines to Korean - Updated README.md to link to documentation - Updated README.ko.md to link to Korean documentation πŸ€– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- README.ko.md | 3 +- README.md | 3 +- docs/CONVENTIONAL_COMMITS.ko.md | 489 ++++++++++++++++++++++++++++++++ docs/CONVENTIONAL_COMMITS.md | 489 ++++++++++++++++++++++++++++++++ 4 files changed, 982 insertions(+), 2 deletions(-) create mode 100644 docs/CONVENTIONAL_COMMITS.ko.md create mode 100644 docs/CONVENTIONAL_COMMITS.md diff --git a/README.ko.md b/README.ko.md index 00dbaba..9a36a70 100644 --- a/README.ko.md +++ b/README.ko.md @@ -43,7 +43,7 @@ - **Modern tooling**: μ΅œμ‹  GitHub κΈ°λŠ₯κ³Ό λ„κ΅¬λ‘œ μ§€μ†μ μœΌλ‘œ μ—…λ°μ΄νŠΈ - **ν•„μˆ˜ μžμ‚° 포함**: Issue Template, PR Template, Code of Conduct, Contribution Guide, Branch Rule 제곡 - **GitHub Projects 톡합**: GitHub Projects μ›Œν¬ν”Œλ‘œμš°μ™€ ν•¨κ»˜ μž‘λ™ν•˜λ„λ‘ 섀계 -- **Custom Commit Convention**: 이 ν…œν”Œλ¦Ώμ— λ§žμΆ€ν™”λœ Conventional Commits의 μˆ˜μ • 버전 μ‚¬μš© +- **Custom Commit Convention**: 이 ν…œν”Œλ¦Ώμ— λ§žμΆ€ν™”λœ Conventional Commits의 μˆ˜μ • 버전 μ‚¬μš©. μžμ„Έν•œ λ‚΄μš©μ€ [Conventional Commits κ°€μ΄λ“œ](docs/CONVENTIONAL_COMMITS.ko.md)λ₯Ό μ°Έκ³ ν•˜μ„Έμš”. --- @@ -57,6 +57,7 @@ - **LICENSE**: λΌμ΄μ„ μŠ€ 정보 - **agents.md**: ν”„λ‘œμ νŠΈ μ—­ν• κ³Ό μ±…μž„ μ •μ˜ - **docs/** + - **CONVENTIONAL_COMMITS.md**: 컀밋 μ»¨λ²€μ…˜μ— λŒ€ν•œ 포괄적인 κ°€μ΄λ“œ - **project-board.md**: GitHub Projects μ›Œν¬ν”Œλ‘œμš° κ°€μ΄λ“œ - **.github/** - **ISSUE_TEMPLATE/**: GitHub Issue ν…œν”Œλ¦Ώ diff --git a/README.md b/README.md index f20f70c..6af3ab7 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ This process is repetitive, time-consuming, and often inconsistent across projec - **Modern tooling**: Continuously updated with the latest GitHub features and tools. - **Essential assets included**: Provides Issue Templates, PR Templates, Code of Conduct, Contribution Guide, and branch rules. - **GitHub Projects integration**: Designed to work with GitHub Projects workflows. -- **Custom commit convention**: Uses a modified version of Conventional Commits tailored for this template. +- **Custom commit convention**: Uses a modified version of Conventional Commits tailored for this template. See [Conventional Commits Guide](docs/CONVENTIONAL_COMMITS.md) for details. --- @@ -57,6 +57,7 @@ This template includes the essential documents and configurations required for r - **LICENSE**: License information - **agents.md**: Defines project roles and responsibilities - **docs/** + - **CONVENTIONAL_COMMITS.md**: Comprehensive guide for commit conventions - **project-board.md**: Guide for GitHub Projects workflow - **.github/** - **ISSUE_TEMPLATE/**: GitHub Issue templates diff --git a/docs/CONVENTIONAL_COMMITS.ko.md b/docs/CONVENTIONAL_COMMITS.ko.md new file mode 100644 index 0000000..9c32a73 --- /dev/null +++ b/docs/CONVENTIONAL_COMMITS.ko.md @@ -0,0 +1,489 @@ +# Conventional Commits + +[English](CONVENTIONAL_COMMITS.md) | ν•œκ΅­μ–΄ + +이 λ¬Έμ„œλŠ” OSS Kit ν”„λ‘œμ νŠΈμ˜ 컀밋 μ»¨λ²€μ…˜μ— λŒ€ν•œ 단일 정보원(source of truth)μž…λ‹ˆλ‹€. + +## λͺ©μ°¨ + +- [κ°œμš”](#κ°œμš”) +- [컀밋 νƒ€μž…](#컀밋-νƒ€μž…) +- [Scope μ‚¬μš©λ²•](#scope-μ‚¬μš©λ²•) +- [컀밋 νƒ€μž…κ³Ό 이슈 ν…œν”Œλ¦Ώ λ§€ν•‘](#컀밋-νƒ€μž…κ³Ό-이슈-ν…œν”Œλ¦Ώ-λ§€ν•‘) +- [μ‹€μ œ μ‹œλ‚˜λ¦¬μ˜€](#μ‹€μ œ-μ‹œλ‚˜λ¦¬μ˜€) +- [ν˜„μž¬ μ œμ•½μ‚¬ν•­](#ν˜„μž¬-μ œμ•½μ‚¬ν•­) +- [μ»€μŠ€ν…€ λͺ…λ Ήμ–΄](#μ»€μŠ€ν…€-λͺ…λ Ήμ–΄) + +## κ°œμš” + +### μ™œ Conventional Commitsλ₯Ό μ‚¬μš©ν•˜λ‚˜μš”? + +μš°λ¦¬λŠ” λ‹€μŒκ³Ό 같은 이유둜 Conventional Commitsλ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€: + +- **λͺ…ν™•μ„± μœ μ§€**: 컀밋 λ©”μ‹œμ§€κ°€ λ³€κ²½ μ‚¬ν•­μ˜ νŠΉμ„±μ„ λͺ…ν™•ν•˜κ²Œ μ „λ‹¬ν•©λ‹ˆλ‹€ +- **μžλ™ν™” κ°€λŠ₯**: ν‘œμ€€ν™”λœ ν˜•μ‹μ„ 톡해 도ꡬ가 μžλ™μœΌλ‘œ changelogλ₯Ό μƒμ„±ν•˜κ³ , 버전 증가λ₯Ό κ²°μ •ν•˜λ©°, 릴리슀λ₯Ό 관리할 수 μžˆμŠ΅λ‹ˆλ‹€ +- **ν˜‘μ—… κ°œμ„ **: κΈ°μ—¬μžλ“€μ΄ λ³€κ²½ μ‚¬ν•­μ˜ λͺ©μ κ³Ό λ²”μœ„λ₯Ό λΉ λ₯΄κ²Œ 이해할 수 μžˆμŠ΅λ‹ˆλ‹€ +- **일관성 보μž₯**: μžλ™ν™” 도ꡬ가 ν”„λ‘œμ νŠΈ μ „μ²΄μ—μ„œ μ»¨λ²€μ…˜μ„ κ°•μ œν•©λ‹ˆλ‹€ + +### 곡식 μŠ€νŽ™ + +이 ν”„λ‘œμ νŠΈλŠ” [Conventional Commits specification](https://www.conventionalcommits.org/)을 λ”°λ¦…λ‹ˆλ‹€. + +### μš°λ¦¬κ°€ μ‚¬μš©ν•˜λŠ” 방법 + +컀밋 μ»¨λ²€μ…˜μ€ 개발 μ›Œν¬ν”Œλ‘œμš° μ „λ°˜μ— ν†΅ν•©λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€: + +- **Issue Templates**: 각 이슈 νƒ€μž…μ€ νŠΉμ • 컀밋 νƒ€μž…κ³Ό λ§€ν•‘λ©λ‹ˆλ‹€ +- **Custom Commands**: `/make-commit`, `/make-branch`, `/make-pr` λͺ…λ Ήμ–΄κ°€ 이 μ»¨λ²€μ…˜μ„ κ°•μ œν•©λ‹ˆλ‹€ +- **Git Workflow**: λͺ¨λ“  컀밋이 일관성을 μœ„ν•΄ λ™μΌν•œ ꡬ쑰λ₯Ό λ”°λ¦…λ‹ˆλ‹€ + +## 컀밋 νƒ€μž… + +이 ν”„λ‘œμ νŠΈμ—μ„œλŠ” 9κ°€μ§€ 컀밋 νƒ€μž…μ„ μ‚¬μš©ν•©λ‹ˆλ‹€. 각 νƒ€μž…μ€ νŠΉμ •ν•œ λͺ©μ κ³Ό μ‚¬μš© 사둀λ₯Ό κ°€μ§€κ³  μžˆμŠ΅λ‹ˆλ‹€. + +### `feat`: New Features + +**μ •μ˜**: μƒˆλ‘œμš΄ κΈ°λŠ₯, μ—…λ°μ΄νŠΈ, λ˜λŠ” 좜λ ₯을 λ³€κ²½ν•˜λŠ” μ½”λ“œ μΆ”κ°€. + +**μ–Έμ œ μ‚¬μš©ν•˜λ‚˜μš”**: +- μƒˆλ‘œμš΄ κΈ°λŠ₯ μΆ”κ°€ +- κΈ°μ‘΄ κΈ°λŠ₯에 μƒˆλ‘œμš΄ κΈ°λŠ₯을 μΆ”κ°€ν•˜μ—¬ κ°œμ„  +- 좜λ ₯μ΄λ‚˜ λ™μž‘μ— 영ν–₯을 λ―ΈμΉ˜λŠ” λ³€κ²½ 사항 + +**μ˜ˆμ‹œ**: +``` +feat: create commits CC custom command + +Requirement: +Add a custom command to analyze git changes and create well-structured commits. + +Implementation: +- Created /make-commit command +- Analyzes staged and unstaged changes +- Groups files by intent +- Generates commit messages with Requirement and Implementation sections +``` + +**Anti-pattern**: 버그 μˆ˜μ •, λ¦¬νŒ©ν† λ§, λ˜λŠ” λ¬Έμ„œ 변경에 `feat`λ₯Ό μ‚¬μš©ν•˜μ§€ λ§ˆμ„Έμš”. + +--- + +### `fix`: Bug Fixes + +**μ •μ˜**: 버그 μˆ˜μ • 및 μ‹€μˆ˜ μ •μ •. + +**μ–Έμ œ μ‚¬μš©ν•˜λ‚˜μš”**: +- λ²„κ·Έλ‚˜ μ—λŸ¬ μˆ˜μ • +- 잘λͺ»λœ λ™μž‘ μ •μ • +- μ‚¬μš©μžλ‚˜ ν…ŒμŠ€νŠΈμ—μ„œ 보고된 이슈 ν•΄κ²° + +**μ˜ˆμ‹œ**: +``` +fix: resolve type error in make-pr command + +Requirement: +The make-pr command fails when branch name doesn't match expected pattern. + +Implementation: +- Added null check for branch name parsing +- Added error message for invalid branch names +- Updated tests to cover edge cases +``` + +**Anti-pattern**: μƒˆλ‘œμš΄ κΈ°λŠ₯ μΆ”κ°€λ‚˜ μž‘λ™ν•˜λŠ” μ½”λ“œμ˜ λ¦¬νŒ©ν† λ§μ— `fix`λ₯Ό μ‚¬μš©ν•˜μ§€ λ§ˆμ„Έμš”. + +--- + +### `doc`: Documentation + +**μ •μ˜**: λ¬Έμ„œ λ³€κ²½λ§Œ 포함. + +**μ–Έμ œ μ‚¬μš©ν•˜λ‚˜μš”**: +- README 파일 생성 λ˜λŠ” μ—…λ°μ΄νŠΈ +- 기술 λ¬Έμ„œ μž‘μ„± λ˜λŠ” μ—…λ°μ΄νŠΈ +- μ½”λ“œ μ£Όμ„μ΄λ‚˜ docstring μΆ”κ°€ +- κ°€μ΄λ“œλ‚˜ νŠœν† λ¦¬μ–Ό μž‘μ„± + +**μ˜ˆμ‹œ**: +``` +doc: create comprehensive README for oss-kit + +Requirement: +Provide clear documentation for contributors and users to understand the project. + +Implementation: +- Added project overview and goals +- Documented installation steps +- Added usage examples +- Included contributing guidelines +``` + +**Anti-pattern**: μ½”λ“œ 변경이 ν¬ν•¨λœ 경우 `doc`λ₯Ό μ‚¬μš©ν•˜μ§€ λ§ˆμ„Έμš” (μ½”λ“œ 변경에 μ ν•©ν•œ νƒ€μž…μ„ μ‚¬μš©ν•˜μ„Έμš”). + +--- + +### `config`: Configuration Changes + +**μ •μ˜**: 도ꡬ, μ˜μ‘΄μ„±, CI/CD, λ˜λŠ” 개발 ν™˜κ²½μ— λŒ€ν•œ μ„€μ • μ—…λ°μ΄νŠΈ. + +**μ–Έμ œ μ‚¬μš©ν•˜λ‚˜μš”**: +- prettier, eslint, λ˜λŠ” λ‹€λ₯Έ linter μ„€μ • μ—…λ°μ΄νŠΈ +- CI/CD νŒŒμ΄ν”„λΌμΈ μ„€μ • μˆ˜μ • +- μ˜μ‘΄μ„± μ„€μΉ˜ λ˜λŠ” 버전 μ—…λ°μ΄νŠΈ +- Docker μ„€μ • λ³€κ²½ +- VSCode μ„€μ • λ˜λŠ” workspace μ„€μ • μ—…λ°μ΄νŠΈ + +**μ™œ `chore` λŒ€μ‹  `config`λ₯Ό μ‚¬μš©ν•˜λ‚˜μš”**: μš°λ¦¬λŠ” μ˜λ„μ μœΌλ‘œ "chore"λΌλŠ” μš©μ–΄λ₯Ό ν”Όν•©λ‹ˆλ‹€. μ΄λŠ” μž‘μ—…μ΄ μ€‘μš”ν•˜μ§€ μ•Šλ‹€λŠ” 의미λ₯Ό λ‚΄ν¬ν•˜μ§€λ§Œ, μ„€μ • 변경은 ν”„λ‘œμ νŠΈ 건강성에 맀우 μ€‘μš”ν•©λ‹ˆλ‹€. + +**μ˜ˆμ‹œ**: +``` +config: add label and auto-assign workflows + +Requirement: +Automate issue and PR labeling to reduce manual effort. + +Implementation: +- Created auto-label.yml workflow +- Added auto-assign.yml for PR assignment +- Configured label detection based on title prefix +``` + +**Anti-pattern**: μ½”λ“œ λ¦¬νŒ©ν† λ§μ΄λ‚˜ κΈ°λŠ₯ 좔가에 `config`λ₯Ό μ‚¬μš©ν•˜μ§€ λ§ˆμ„Έμš”. + +--- + +### `refactor`: Code Refactoring + +**μ •μ˜**: Lint μˆ˜μ •, prettier μˆ˜μ •, λ˜λŠ” 좜λ ₯을 λ³€κ²½ν•˜μ§€ μ•ŠλŠ” μ½”λ“œ κ°œμ„ . + +**μ–Έμ œ μ‚¬μš©ν•˜λ‚˜μš”**: +- Lint μˆ˜μ • 적용 +- prettier ν¬λ§·νŒ… μ‹€ν–‰ +- λ™μž‘μ„ λ³€κ²½ν•˜μ§€ μ•Šκ³  μ½”λ“œ μž¬κ΅¬μ‘°ν™” +- λͺ…확성을 μœ„ν•΄ λ³€μˆ˜λ‚˜ ν•¨μˆ˜ 이름 λ³€κ²½ +- μž¬μ‚¬μš© κ°€λŠ₯ν•œ ν•¨μˆ˜λ‘œ μ½”λ“œ μΆ”μΆœ + +**μ˜ˆμ‹œ**: +``` +refactor: simplify plan-issue GitHub API data fetching + +Goal: +Reduce code complexity and improve maintainability. + +Implementation: +- Replaced multiple gh api calls with single JSON query +- Extracted common logic into helper function +- Simplified error handling +``` + +**Anti-pattern**: λ™μž‘μ΄λ‚˜ 좜λ ₯이 λ³€κ²½λ˜λŠ” 경우 `refactor`λ₯Ό μ‚¬μš©ν•˜μ§€ λ§ˆμ„Έμš” (`feat` λ˜λŠ” `fix` μ‚¬μš©). + +--- + +### `agent`: Agent Rules and Commands + +**μ •μ˜**: agent rule, command, λ˜λŠ” automation μΆ”κ°€ λ˜λŠ” μ—…λ°μ΄νŠΈ. + +**μ–Έμ œ μ‚¬μš©ν•˜λ‚˜μš”**: +- Claude Code μ»€μŠ€ν…€ λͺ…λ Ήμ–΄ 생성 λ˜λŠ” μˆ˜μ • +- agent μ„€μ • μ—…λ°μ΄νŠΈ +- μžλ™ν™” 슀크립트 μΆ”κ°€ +- workflow automation μˆ˜μ • + +**μ˜ˆμ‹œ**: +``` +agent: add make-task-issue command and agent type support + +Requirement: +Streamline GitHub issue creation with automatic template selection and project assignment. + +Implementation: +- Created /make-task-issue command +- Added support for 9 issue templates +- Implemented automatic project board integration +- Added agent type to all custom commands +``` + +**Anti-pattern**: 일반 μ½”λ“œλ‚˜ λ¬Έμ„œ 변경에 `agent`λ₯Ό μ‚¬μš©ν•˜μ§€ λ§ˆμ„Έμš”. + +--- + +### `format`: Code Formatting + +**μ •μ˜**: μ½”λ“œ ν¬λ§·νŒ… λ³€κ²½ (곡백, λ“€μ—¬μ“°κΈ°, μ„Έλ―Έμ½œλ‘  λ“±) + +**μ–Έμ œ μ‚¬μš©ν•˜λ‚˜μš”**: +- 순수 ν¬λ§·νŒ… λ³€κ²½ +- 곡백 μ‘°μ • +- λ“€μ—¬μ“°κΈ° μˆ˜μ • +- μ„Έλ―Έμ½œλ‘  μΆ”κ°€/제거 + +**μ˜ˆμ‹œ**: +``` +format: fix indentation in custom commands + +Goal: +Ensure consistent formatting across all command files. + +Implementation: +- Fixed tab/space inconsistencies +- Standardized indentation to 2 spaces +``` + +**Anti-pattern**: 둜직 λ³€κ²½κ³Ό ν•¨κ»˜ ν¬ν•¨λœ 경우 `format`을 μ‚¬μš©ν•˜μ§€ λ§ˆμ„Έμš” (`refactor` μ‚¬μš©). + +**μ°Έκ³ **: 이 νƒ€μž…μ€ μ»€μŠ€ν…€ λͺ…λ Ήμ–΄μ—λŠ” μ‘΄μž¬ν•˜μ§€λ§Œ λŒ€μ‘ν•˜λŠ” 이슈 ν…œν”Œλ¦Ώμ΄ μ—†μŠ΅λ‹ˆλ‹€ ([ν˜„μž¬ μ œμ•½μ‚¬ν•­](#ν˜„μž¬-μ œμ•½μ‚¬ν•­) μ°Έμ‘°). + +--- + +### `test`: Tests + +**μ •μ˜**: ν…ŒμŠ€νŠΈ μΆ”κ°€ λ˜λŠ” κ°œμ„ , Storybook story 포함. + +**μ–Έμ œ μ‚¬μš©ν•˜λ‚˜μš”**: +- μƒˆλ‘œμš΄ ν…ŒμŠ€νŠΈ μΆ”κ°€ +- κΈ°μ‘΄ ν…ŒμŠ€νŠΈ μ—…λ°μ΄νŠΈ +- Storybook story μΆ”κ°€ +- ν…ŒμŠ€νŠΈ fixture λ˜λŠ” μœ ν‹Έλ¦¬ν‹° 생성 + +**μ˜ˆμ‹œ**: +``` +test: add unit tests for make-commit command + +Requirement: +Ensure commit message generation logic works correctly. + +Implementation: +- Added tests for type prefix detection +- Added tests for file grouping logic +- Added tests for message formatting +- Achieved 95% code coverage +``` + +**Anti-pattern**: μ£Όμš” 변경이 κΈ°λŠ₯ μ½”λ“œμΈ 경우 `test`λ₯Ό μ‚¬μš©ν•˜μ§€ λ§ˆμ„Έμš” (κΈ°λŠ₯ 컀밋에 ν…ŒμŠ€νŠΈλ₯Ό ν¬ν•¨ν•˜μ„Έμš”). + +--- + +### `perf`: Performance Improvements + +**μ •μ˜**: κΈ°λŠ₯을 λ³€κ²½ν•˜μ§€ μ•ŠλŠ” μ„±λŠ₯ κ°œμ„ . + +**μ–Έμ œ μ‚¬μš©ν•˜λ‚˜μš”**: +- μ•Œκ³ λ¦¬μ¦˜ μ΅œμ ν™” +- λ©”λͺ¨λ¦¬ μ‚¬μš©λŸ‰ κ°μ†Œ +- 응닡 μ‹œκ°„ κ°œμ„  +- 캐싱 κ°œμ„  + +**μ˜ˆμ‹œ**: +``` +perf: optimize issue fetching with GraphQL + +Goal: +Reduce API calls and improve command execution time. + +Implementation: +- Replaced REST API calls with GraphQL queries +- Reduced API calls from 5 to 1 +- Decreased execution time by 60% +``` + +**Anti-pattern**: κΈ°λŠ₯이 λ³€κ²½λ˜λŠ” 경우 `perf`λ₯Ό μ‚¬μš©ν•˜μ§€ λ§ˆμ„Έμš” (`feat` λ˜λŠ” `fix` μ‚¬μš©). + +## Scope μ‚¬μš©λ²• + +### 문법 + +ScopeλŠ” 선택사항이며 μΆ”κ°€ μ»¨ν…μŠ€νŠΈλ₯Ό μ œκ³΅ν•©λ‹ˆλ‹€: + +``` +(): +``` + +### Scopeλ₯Ό μ‚¬μš©ν•˜λŠ” 경우 + +ScopeλŠ” λ‹€μŒκ³Ό 같은 κ²½μš°μ— μœ μš©ν•©λ‹ˆλ‹€: +- μ–΄λ–€ νŒŒμΌμ΄λ‚˜ λͺ¨λ“ˆμ΄ λ³€κ²½λ˜μ—ˆλŠ”μ§€ μ§€μ • +- μ–΄λ–€ μ»΄ν¬λ„ŒνŠΈλ‚˜ νŒ¨ν‚€μ§€κ°€ 영ν–₯을 λ°›μ•˜λŠ”μ§€ ν‘œμ‹œ +- μ½”λ“œλ² μ΄μŠ€μ˜ μ˜μ—­μ„ κ°•μ‘° + +### μ˜ˆμ‹œ + +``` +feat(cli): add interactive mode to make-commit +fix(api): resolve timeout issue in GitHub client +doc(readme): update installation instructions +config(eslint): add new rule for import ordering +``` + +### ν˜„μž¬ μ‚¬μš© ν˜„ν™© + +ν˜„μž¬ 이 ν”„λ‘œμ νŠΈμ—μ„œλŠ” scopeλ₯Ό 많이 μ‚¬μš©ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. λͺ…확성을 μ œκ³΅ν•˜λŠ” 경우 자유둭게 μΆ”κ°€ν•˜μ„Έμš”. ν•˜μ§€λ§Œ ν•„μˆ˜λŠ” μ•„λ‹™λ‹ˆλ‹€. + +## 컀밋 νƒ€μž…κ³Ό 이슈 ν…œν”Œλ¦Ώ λ§€ν•‘ + +이슈 ν…œν”Œλ¦Ώμ€ 컀밋 νƒ€μž…κ³Ό 직접 λŒ€μ‘λ©λ‹ˆλ‹€: + +| 컀밋 νƒ€μž… | 이슈 ν…œν”Œλ¦Ώ | μ„€λͺ… | +|-------------|----------------|-------------| +| `feat` | [feat.md](.github/ISSUE_TEMPLATE/feat.md) | μƒˆλ‘œμš΄ κΈ°λŠ₯ λ˜λŠ” κ°œμ„  μΆ”κ°€ | +| `fix` | [fix.md](.github/ISSUE_TEMPLATE/fix.md) | 버그 μˆ˜μ • 및 μ •μ • | +| `doc` | [doc.md](.github/ISSUE_TEMPLATE/doc.md) | λ¬Έμ„œ λ³€κ²½ | +| `config` | [config.md](.github/ISSUE_TEMPLATE/config.md) | μ„€μ • μ—…λ°μ΄νŠΈ | +| `refactor` | [refactor.md](.github/ISSUE_TEMPLATE/refactor.md) | μ½”λ“œ λ¦¬νŒ©ν† λ§ | +| `agent` | [agent.md](.github/ISSUE_TEMPLATE/agent.md) | Agent rule 및 command | +| `format` | ❌ ν…œν”Œλ¦Ώ μ—†μŒ | μ½”λ“œ ν¬λ§·νŒ… λ³€κ²½ | +| `test` | [test.md](.github/ISSUE_TEMPLATE/test.md) | ν…ŒμŠ€νŠΈ μΆ”κ°€ λ˜λŠ” κ°œμ„  | +| `perf` | [perf.md](.github/ISSUE_TEMPLATE/perf.md) | μ„±λŠ₯ κ°œμ„  | + +**νŠΉλ³„ν•œ 경우**: 버그 보고λ₯Ό μœ„ν•œ [bug.md](.github/ISSUE_TEMPLATE/bug.md) ν…œν”Œλ¦Ώλ„ μžˆμ§€λ§Œ, λŒ€μ‘ν•˜λŠ” 컀밋 νƒ€μž…μ€ `fix`μž…λ‹ˆλ‹€ (`bug`κ°€ μ•„λ‹˜). + +## μ‹€μ œ μ‹œλ‚˜λ¦¬μ˜€ + +일반적인 μ‹œλ‚˜λ¦¬μ˜€μ™€ μ‚¬μš©ν•΄μ•Ό ν•  μ˜¬λ°”λ₯Έ 컀밋 νƒ€μž…: + +### 개발 μ‹œλ‚˜λ¦¬μ˜€ + +| μ‹œλ‚˜λ¦¬μ˜€ | 컀밋 νƒ€μž… | μ˜ˆμ‹œ | +|----------|-------------|---------| +| μƒˆλ‘œμš΄ API endpoint μΆ”κ°€ | `feat` | `feat: add user authentication endpoint` | +| μƒˆλ‘œμš΄ μ»΄ν¬λ„ŒνŠΈ 생성 | `feat` | `feat: implement Button component` | +| νƒ€μž… μ—λŸ¬ μˆ˜μ • | `fix` | `fix: resolve type error in API client` | +| λŸ°νƒ€μž„ 버그 μˆ˜μ • | `fix` | `fix: prevent null pointer in user service` | +| README μ—…λ°μ΄νŠΈ | `doc` | `doc: add API documentation` | +| μ½”λ“œ 주석 μΆ”κ°€ | `doc` | `doc: document authentication flow` | +| μƒˆλ‘œμš΄ μ˜μ‘΄μ„± μ„€μΉ˜ | `config` | `config: add lodash dependency` | +| ESLint rule μ—…λ°μ΄νŠΈ | `config` | `config: enable strict mode in ESLint` | +| GitHub Actions μ—…λ°μ΄νŠΈ | `config` | `config: add automated testing workflow` | +| λ³€μˆ˜λͺ… λ³€κ²½ | `refactor` | `refactor: rename getUserData to fetchUser` | +| helper ν•¨μˆ˜ μΆ”μΆœ | `refactor` | `refactor: extract validation logic` | +| Claude λͺ…λ Ήμ–΄ 생성 | `agent` | `agent: add make-branch command` | +| workflow automation μ—…λ°μ΄νŠΈ | `agent` | `agent: update auto-label workflow` | +| λ“€μ—¬μ“°κΈ° μˆ˜μ • | `format` | `format: fix indentation in utils` | +| unit test μΆ”κ°€ | `test` | `test: add tests for auth service` | +| 쿼리 μ„±λŠ₯ μ΅œμ ν™” | `perf` | `perf: add database index for user lookup` | + +### 컀밋 λ©”μ‹œμ§€ ꡬ쑰 + +λͺ¨λ“  컀밋 λ©”μ‹œμ§€λŠ” λ‹€μŒ ꡬ쑰λ₯Ό 따라야 ν•©λ‹ˆλ‹€: + +``` +: + +Requirement: (λ˜λŠ” Goal:) + + +Implementation: + +``` + +#### "Requirement" vs "Goal" + +- **"Requirement:" μ‚¬μš©**: λŒ€λΆ€λΆ„μ˜ 컀밋 - ν•΄κ²°ν•΄μ•Ό ν•  νŠΉμ • μš”κ΅¬μ‚¬ν•­μ΄λ‚˜ λ¬Έμ œκ°€ μžˆμ„ λ•Œ +- **"Goal:" μ‚¬μš©**: νŠΉμ • μš”κ΅¬μ‚¬ν•­ 없이 λŠ₯동적인 κ°œμ„ μ„ μœ„ν•œ κ²½μš°μ—λ§Œ (예: 자발적 λ¦¬νŒ©ν† λ§, μ„±λŠ₯ μ΅œμ ν™”) + +**Requirementλ₯Ό μ‚¬μš©ν•œ μ˜ˆμ‹œ:** +``` +fix: resolve authentication timeout issue + +Requirement: +Users are experiencing timeout errors during login when API response is slow. + +Implementation: +- Increased timeout from 5s to 30s +- Added retry logic with exponential backoff +- Added loading state to prevent duplicate requests +``` + +**Goal을 μ‚¬μš©ν•œ μ˜ˆμ‹œ:** +``` +refactor: extract common validation logic + +Goal: +Reduce code duplication and improve maintainability across validation functions. + +Implementation: +- Created shared validateInput utility function +- Replaced duplicated validation code in 5 files +- Added unit tests for validation logic +``` + +## ν˜„μž¬ μ œμ•½μ‚¬ν•­ + +λ‹€μŒκ³Ό 같은 κ°­κ³Ό ν–₯ν›„ κ°œμ„  μ˜μ—­μ„ μΈμ •ν•©λ‹ˆλ‹€: + +### 1. `format` νƒ€μž…μ— 이슈 ν…œν”Œλ¦Ώμ΄ μ—†μŒ + +**κ°­**: `format` 컀밋 νƒ€μž…μ€ μ»€μŠ€ν…€ λͺ…령어에 μ‘΄μž¬ν•˜μ§€λ§Œ λŒ€μ‘ν•˜λŠ” 이슈 ν…œν”Œλ¦Ώμ΄ μ—†μŠ΅λ‹ˆλ‹€. + +**영ν–₯**: κ°œλ°œμžκ°€ ν¬λ§·νŒ… μž‘μ—…μ— λŒ€ν•œ 이슈λ₯Ό μ–Έμ œ 생성해야 ν• μ§€ ν˜Όλž€μŠ€λŸ¬μšΈ 수 μžˆμŠ΅λ‹ˆλ‹€. + +**ν–₯ν›„ 고렀사항**: `format` 이슈 ν…œν”Œλ¦Ώμ„ μΆ”κ°€ν• μ§€, λ˜λŠ” ν¬λ§·νŒ… μž‘μ—…μ„ `refactor` 이슈둜 톡합할지 κ²°μ •. + +### 2. `bug` vs `fix` μš©μ–΄ + +**κ°­**: `bug` 이슈 ν…œν”Œλ¦Ώμ€ μžˆμ§€λ§Œ 컀밋 νƒ€μž…μœΌλ‘œλŠ” `fix`λ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€. + +**이유**: 이슈 ν…œν”Œλ¦Ώμ€ 문제(bug)λ₯Ό μ„€λͺ…ν•˜μ§€λ§Œ, 컀밋은 ν•΄κ²°μ±…(fix)을 μ„€λͺ…ν•©λ‹ˆλ‹€. + +**영ν–₯**: μ΅œμ†Œ - 일단 μ΄ν•΄ν•˜λ©΄ 맀핑이 μ§κ΄€μ μž…λ‹ˆλ‹€. + +### 3. Scope μ‚¬μš©μ΄ ν‘œμ€€ν™”λ˜μ§€ μ•ŠμŒ + +**κ°­**: Scopeκ°€ μ§€μ›λ˜μ§€λ§Œ ν”„λ‘œμ νŠΈ μ „λ°˜μ— 걸쳐 μΌκ΄€λ˜κ²Œ μ‚¬μš©λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. + +**ν–₯ν›„ 고렀사항**: Scope μ‚¬μš©μ΄ μ¦κ°€ν•˜λ©΄ scope 넀이밍 μ»¨λ²€μ…˜μ„ 확립. + +### 4. Commitlint μ„€μ • μ—†μŒ + +**κ°­**: μ»¨λ²€μ…˜μ΄ λ¬Έμ„œν™”λ˜μ–΄ μžˆμ§€λ§Œ, commitlintλ₯Ό ν†΅ν•œ μžλ™ κ°•μ œκ°€ μ—†μŠ΅λ‹ˆλ‹€. + +**ν–₯ν›„ 고렀사항**: CI/CD νŒŒμ΄ν”„λΌμΈμ—μ„œ 컀밋 λ©”μ‹œμ§€λ₯Ό κ²€μ¦ν•˜κΈ° μœ„ν•΄ commitlint μΆ”κ°€. + +### 5. Breaking Changeκ°€ λͺ…μ‹œμ μœΌλ‘œ μ²˜λ¦¬λ˜μ§€ μ•ŠμŒ + +**κ°­**: Conventional Commits μŠ€νŽ™μ€ breaking change 문법(`!` λ˜λŠ” `BREAKING CHANGE:`)을 ν¬ν•¨ν•˜μ§€λ§Œ, 우리의 μ ‘κ·Ό 방식을 λ¬Έμ„œν™”ν•˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€. + +**ν–₯ν›„ 고렀사항**: ν•„μš”μ‹œ breaking changeλ₯Ό μ²˜λ¦¬ν•˜λŠ” 방법 μ •μ˜. + +## μ»€μŠ€ν…€ λͺ…λ Ήμ–΄ + +λ‹€μŒ μ»€μŠ€ν…€ λͺ…령어듀이 μžλ™μœΌλ‘œ 이 μ»¨λ²€μ…˜μ„ κ°•μ œν•©λ‹ˆλ‹€: + +### `/make-commit` + +**λͺ©μ **: git λ³€κ²½ 사항을 λΆ„μ„ν•˜κ³  잘 κ΅¬μ‘°ν™”λœ 컀밋 생성 + +**μ»¨λ²€μ…˜ μ‚¬μš© 방법**: +- μ μ ˆν•œ 컀밋 νƒ€μž…μ„ μ„ νƒν•˜λ„λ‘ ν”„λ‘¬ν”„νŠΈ +- "Requirement"와 "Implementation" μ„Ήμ…˜μ΄ μžˆλŠ” 컀밋 λ©”μ‹œμ§€ 생성 +- 논리적 컀밋을 보μž₯ν•˜κΈ° μœ„ν•΄ νŒŒμΌμ„ μ˜λ„λ³„λ‘œ κ·Έλ£Ήν™” + +**μ°Έκ³ **: [.claude/commands/make-commit.md](.claude/commands/make-commit.md) + +### `/make-branch` + +**λͺ©μ **: GitHub 이슈 μ •λ³΄μ—μ„œ μΌκ΄€λœ 브랜치 이름 생성 + +**μ»¨λ²€μ…˜ μ‚¬μš© 방법**: +- 컀밋과 λ™μΌν•œ νƒ€μž… 접두사 μ‚¬μš© +- ν˜•μ‹μœΌλ‘œ 브랜치 이름 생성: `i{issue-number}-{type}/{description}` +- 브랜치 이름이 μ΅œμ’… 컀밋과 μΌμΉ˜ν•˜λ„λ‘ 보μž₯ + +**μ°Έκ³ **: [.claude/commands/make-branch.md](.claude/commands/make-branch.md) + +### `/make-pr` + +**λͺ©μ **: draft pull request μžλ™ 생성 + +**μ»¨λ²€μ…˜ μ‚¬μš© 방법**: +- 컀밋을 λΆ„μ„ν•˜μ—¬ requirement와 implementation 세뢀사항 μΆ”μΆœ +- μ˜¬λ°”λ₯Έ νƒ€μž… μ ‘λ‘μ‚¬λ‘œ PR 제λͺ© 생성 +- 컀밋 뢄석을 기반으둜 κ΅¬μ‘°ν™”λœ PR μ„€λͺ… 생성 + +**μ°Έκ³ **: [.claude/commands/make-pr.md](.claude/commands/make-pr.md) + +--- + +## μ§ˆλ¬Έμ΄λ‚˜ ν”Όλ“œλ°±? + +μ–΄λ–€ 컀밋 νƒ€μž…μ„ μ‚¬μš©ν•΄μ•Ό ν• μ§€ κΆκΈˆν•˜κ±°λ‚˜ 이 μ»¨λ²€μ…˜ κ°œμ„ μ— λŒ€ν•œ μ œμ•ˆμ΄ μžˆλ‹€λ©΄, 이슈λ₯Ό μ—΄μ–΄μ£Όμ„Έμš”! diff --git a/docs/CONVENTIONAL_COMMITS.md b/docs/CONVENTIONAL_COMMITS.md new file mode 100644 index 0000000..2fe7068 --- /dev/null +++ b/docs/CONVENTIONAL_COMMITS.md @@ -0,0 +1,489 @@ +# Conventional Commits + +English | [ν•œκ΅­μ–΄](CONVENTIONAL_COMMITS.ko.md) + +This document serves as the source of truth for commit conventions in the OSS Kit project. + +## Table of Contents + +- [Overview](#overview) +- [Commit Types](#commit-types) +- [Scope Usage](#scope-usage) +- [Commit Type to Issue Template Mapping](#commit-type-to-issue-template-mapping) +- [Real-World Scenarios](#real-world-scenarios) +- [Current Limitations](#current-limitations) +- [Custom Commands](#custom-commands) + +## Overview + +### Why Conventional Commits? + +We use Conventional Commits to: + +- **Maintain clarity**: Commit messages clearly communicate the nature of changes +- **Enable automation**: Standardized formats allow tools to automatically generate changelogs, determine version bumps, and manage releases +- **Improve collaboration**: Contributors can quickly understand the purpose and scope of changes +- **Ensure consistency**: Automated tools enforce conventions across the entire project + +### Official Specification + +This project follows the [Conventional Commits specification](https://www.conventionalcommits.org/). + +### How We Use It + +Our commit conventions are integrated throughout the development workflow: + +- **Issue Templates**: Each issue type maps to a specific commit type +- **Custom Commands**: `/make-commit`, `/make-branch`, and `/make-pr` enforce these conventions +- **Git Workflow**: All commits follow the same structure for consistency + +## Commit Types + +We use 9 commit types in this project. Each type has a specific purpose and use case. + +### `feat`: New Features + +**Definition**: New features, updates, or output-changing code additions. + +**When to use**: +- Adding a new feature +- Enhancing an existing feature with new functionality +- Making changes that affect the output or behavior + +**Examples**: +``` +feat: create commits CC custom command + +Requirement: +Add a custom command to analyze git changes and create well-structured commits. + +Implementation: +- Created /make-commit command +- Analyzes staged and unstaged changes +- Groups files by intent +- Generates commit messages with Requirement and Implementation sections +``` + +**Anti-pattern**: Don't use `feat` for bug fixes, refactoring, or documentation changes. + +--- + +### `fix`: Bug Fixes + +**Definition**: Bug fixes and corrections to mistakes. + +**When to use**: +- Fixing a bug or error +- Correcting incorrect behavior +- Resolving issues reported by users or tests + +**Examples**: +``` +fix: resolve type error in make-pr command + +Requirement: +The make-pr command fails when branch name doesn't match expected pattern. + +Implementation: +- Added null check for branch name parsing +- Added error message for invalid branch names +- Updated tests to cover edge cases +``` + +**Anti-pattern**: Don't use `fix` for adding new features or refactoring working code. + +--- + +### `doc`: Documentation + +**Definition**: Documentation changes only. + +**When to use**: +- Creating or updating README files +- Writing or updating technical documentation +- Adding code comments or docstrings +- Creating guides or tutorials + +**Examples**: +``` +doc: create comprehensive README for oss-kit + +Requirement: +Provide clear documentation for contributors and users to understand the project. + +Implementation: +- Added project overview and goals +- Documented installation steps +- Added usage examples +- Included contributing guidelines +``` + +**Anti-pattern**: Don't use `doc` when code changes are included (use the appropriate type for the code change). + +--- + +### `config`: Configuration Changes + +**Definition**: Configuration updates for tools, dependencies, CI/CD, or development environment. + +**When to use**: +- Updating prettier, eslint, or other linter configs +- Modifying CI/CD pipeline configurations +- Installing or bumping dependencies +- Changing Docker configurations +- Updating VSCode settings or workspace configs + +**Why `config` instead of `chore`**: We deliberately avoid the term "chore" because it implies the work is unimportant, when configuration changes are critical to project health. + +**Examples**: +``` +config: add label and auto-assign workflows + +Requirement: +Automate issue and PR labeling to reduce manual effort. + +Implementation: +- Created auto-label.yml workflow +- Added auto-assign.yml for PR assignment +- Configured label detection based on title prefix +``` + +**Anti-pattern**: Don't use `config` for code refactoring or feature additions. + +--- + +### `refactor`: Code Refactoring + +**Definition**: Lint fixes, prettier fixes, or code improvements that don't change output. + +**When to use**: +- Applying lint fixes +- Running prettier formatting +- Restructuring code without changing behavior +- Renaming variables or functions for clarity +- Extracting code into reusable functions + +**Examples**: +``` +refactor: simplify plan-issue GitHub API data fetching + +Goal: +Reduce code complexity and improve maintainability. + +Implementation: +- Replaced multiple gh api calls with single JSON query +- Extracted common logic into helper function +- Simplified error handling +``` + +**Anti-pattern**: Don't use `refactor` if the behavior or output changes (use `feat` or `fix` instead). + +--- + +### `agent`: Agent Rules and Commands + +**Definition**: Add or update agent rules, commands, or automation. + +**When to use**: +- Creating or modifying Claude Code custom commands +- Updating agent configuration +- Adding automation scripts +- Modifying workflow automation + +**Examples**: +``` +agent: add make-task-issue command and agent type support + +Requirement: +Streamline GitHub issue creation with automatic template selection and project assignment. + +Implementation: +- Created /make-task-issue command +- Added support for 9 issue templates +- Implemented automatic project board integration +- Added agent type to all custom commands +``` + +**Anti-pattern**: Don't use `agent` for regular code or documentation changes. + +--- + +### `format`: Code Formatting + +**Definition**: Code formatting changes (whitespace, indentation, semicolons, etc.) + +**When to use**: +- Pure formatting changes +- Whitespace adjustments +- Indentation fixes +- Semicolon additions/removals + +**Examples**: +``` +format: fix indentation in custom commands + +Goal: +Ensure consistent formatting across all command files. + +Implementation: +- Fixed tab/space inconsistencies +- Standardized indentation to 2 spaces +``` + +**Anti-pattern**: Don't use `format` when combined with logic changes (use `refactor` instead). + +**Note**: This type exists in custom commands but does not have a corresponding issue template (see [Current Limitations](#current-limitations)). + +--- + +### `test`: Tests + +**Definition**: Test additions or improvements, including Storybook stories. + +**When to use**: +- Adding new tests +- Updating existing tests +- Adding Storybook stories +- Creating test fixtures or utilities + +**Examples**: +``` +test: add unit tests for make-commit command + +Requirement: +Ensure commit message generation logic works correctly. + +Implementation: +- Added tests for type prefix detection +- Added tests for file grouping logic +- Added tests for message formatting +- Achieved 95% code coverage +``` + +**Anti-pattern**: Don't use `test` when the primary change is feature code (include tests in the feature commit). + +--- + +### `perf`: Performance Improvements + +**Definition**: Performance improvements without changing functionality. + +**When to use**: +- Optimizing algorithms +- Reducing memory usage +- Improving response times +- Caching improvements + +**Examples**: +``` +perf: optimize issue fetching with GraphQL + +Goal: +Reduce API calls and improve command execution time. + +Implementation: +- Replaced REST API calls with GraphQL queries +- Reduced API calls from 5 to 1 +- Decreased execution time by 60% +``` + +**Anti-pattern**: Don't use `perf` if functionality changes (use `feat` or `fix` instead). + +## Scope Usage + +### Syntax + +Scopes are optional and provide additional context: + +``` +(): +``` + +### When to Use Scopes + +Scopes are useful for: +- Specifying which file or module was changed +- Indicating which component or package was affected +- Highlighting the area of the codebase + +### Examples + +``` +feat(cli): add interactive mode to make-commit +fix(api): resolve timeout issue in GitHub client +doc(readme): update installation instructions +config(eslint): add new rule for import ordering +``` + +### Current Usage + +Scopes are not heavily used in this project currently. Feel free to add them when they provide clarity, but they are not required. + +## Commit Type to Issue Template Mapping + +Our issue templates directly correspond to commit types: + +| Commit Type | Issue Template | Description | +|-------------|----------------|-------------| +| `feat` | [feat.md](.github/ISSUE_TEMPLATE/feat.md) | Add a new feature or enhancement | +| `fix` | [fix.md](.github/ISSUE_TEMPLATE/fix.md) | Bug fixes and corrections | +| `doc` | [doc.md](.github/ISSUE_TEMPLATE/doc.md) | Documentation changes | +| `config` | [config.md](.github/ISSUE_TEMPLATE/config.md) | Configuration updates | +| `refactor` | [refactor.md](.github/ISSUE_TEMPLATE/refactor.md) | Code refactoring | +| `agent` | [agent.md](.github/ISSUE_TEMPLATE/agent.md) | Agent rules and commands | +| `format` | ❌ No template | Code formatting changes | +| `test` | [test.md](.github/ISSUE_TEMPLATE/test.md) | Test additions or improvements | +| `perf` | [perf.md](.github/ISSUE_TEMPLATE/perf.md) | Performance improvements | + +**Special case**: There's also a [bug.md](.github/ISSUE_TEMPLATE/bug.md) template for reporting bugs, but the corresponding commit type is `fix` (not `bug`). + +## Real-World Scenarios + +Here are common scenarios and the correct commit type to use: + +### Development Scenarios + +| Scenario | Commit Type | Example | +|----------|-------------|---------| +| Adding a new API endpoint | `feat` | `feat: add user authentication endpoint` | +| Creating a new component | `feat` | `feat: implement Button component` | +| Fixing a type error | `fix` | `fix: resolve type error in API client` | +| Fixing a runtime bug | `fix` | `fix: prevent null pointer in user service` | +| Updating README | `doc` | `doc: add API documentation` | +| Adding code comments | `doc` | `doc: document authentication flow` | +| Installing new dependency | `config` | `config: add lodash dependency` | +| Updating ESLint rules | `config` | `config: enable strict mode in ESLint` | +| Updating GitHub Actions | `config` | `config: add automated testing workflow` | +| Renaming variables | `refactor` | `refactor: rename getUserData to fetchUser` | +| Extracting helper function | `refactor` | `refactor: extract validation logic` | +| Creating Claude command | `agent` | `agent: add make-branch command` | +| Updating workflow automation | `agent` | `agent: update auto-label workflow` | +| Fixing indentation | `format` | `format: fix indentation in utils` | +| Adding unit tests | `test` | `test: add tests for auth service` | +| Optimizing query performance | `perf` | `perf: add database index for user lookup` | + +### Commit Message Structure + +Every commit message should follow this structure: + +``` +: + +Requirement: (or Goal:) + + +Implementation: + +``` + +#### "Requirement" vs "Goal" + +- **Use "Requirement:"** for most commits - when there's a specific need or problem to solve +- **Use "Goal:"** only for proactive improvements without specific requirements (e.g., voluntary refactoring, performance optimization) + +**Example with Requirement:** +``` +fix: resolve authentication timeout issue + +Requirement: +Users are experiencing timeout errors during login when API response is slow. + +Implementation: +- Increased timeout from 5s to 30s +- Added retry logic with exponential backoff +- Added loading state to prevent duplicate requests +``` + +**Example with Goal:** +``` +refactor: extract common validation logic + +Goal: +Reduce code duplication and improve maintainability across validation functions. + +Implementation: +- Created shared validateInput utility function +- Replaced duplicated validation code in 5 files +- Added unit tests for validation logic +``` + +## Current Limitations + +We acknowledge the following gaps and areas for future improvement: + +### 1. `format` Type Has No Issue Template + +**Gap**: The `format` commit type exists in custom commands but has no corresponding issue template. + +**Impact**: Developers might be confused about when to create issues for formatting work. + +**Future consideration**: Decide whether to add a `format` issue template or fold formatting work into `refactor` issues. + +### 2. `bug` vs `fix` Terminology + +**Gap**: We have a `bug` issue template but use `fix` as the commit type. + +**Why**: Issue templates describe the problem (bug), while commits describe the solution (fix). + +**Impact**: Minimal - the mapping is intuitive once understood. + +### 3. Scope Usage Not Standardized + +**Gap**: Scopes are supported but not consistently used across the project. + +**Future consideration**: Establish scope naming conventions if scope usage increases. + +### 4. No Commitlint Configuration + +**Gap**: While we have conventions documented, there's no automated enforcement via commitlint. + +**Future consideration**: Add commitlint to validate commit messages in CI/CD pipeline. + +### 5. Breaking Changes Not Explicitly Handled + +**Gap**: The Conventional Commits spec includes breaking change syntax (`!` or `BREAKING CHANGE:`), but we haven't documented our approach. + +**Future consideration**: Define how to handle breaking changes when needed. + +## Custom Commands + +The following custom commands automatically enforce these conventions: + +### `/make-commit` + +**Purpose**: Analyze git changes and create well-structured commits + +**How it uses conventions**: +- Prompts you to select the appropriate commit type +- Generates commit messages with "Requirement" and "Implementation" sections +- Groups files by intent to ensure logical commits + +**Reference**: [.claude/commands/make-commit.md](.claude/commands/make-commit.md) + +### `/make-branch` + +**Purpose**: Generate consistent branch names from GitHub issue information + +**How it uses conventions**: +- Uses the same type prefixes as commits +- Creates branch names in format: `i{issue-number}-{type}/{description}` +- Ensures branch names align with eventual commits + +**Reference**: [.claude/commands/make-branch.md](.claude/commands/make-branch.md) + +### `/make-pr` + +**Purpose**: Automatically generate draft pull requests + +**How it uses conventions**: +- Analyzes commits to extract requirements and implementation details +- Generates PR titles with correct type prefixes +- Creates structured PR descriptions based on commit analysis + +**Reference**: [.claude/commands/make-pr.md](.claude/commands/make-pr.md) + +--- + +## Questions or Feedback? + +If you have questions about which commit type to use or suggestions for improving these conventions, please open an issue!