# Contributing Conventions
GitHub 이슈 → 브랜치 → 커밋 → PR로 이어지는 작업 흐름의 컨벤션을 정리한 문서다.
---
## 이슈
### 제목
- 영어, 짧은 서술형 (동사로 시작)
- 예: `Add /health command`, `implement Alarm Feature`, `apply long polling for telegram get updating`
### 본문
`## Feature` 또는 `## 기능` / `## 수정 사항` 헤더 아래에 불릿 포인트로 작업 내용을 한국어로 서술한다.
```markdown
## Feature
- /alarm add <event-name> 명령어를 통해서 등록할 수 있다.
- /alarm remove <event-name>
- /alarm list: 등록된 list를 보여준다.
```
### 라벨
- `enhancement` 고정 사용 (버그 수정 포함 모든 작업)
---
## 브랜치
```
enhancement/<issue_number>
```
이슈 번호를 그대로 사용한다. 이슈 타입에 관계없이 `enhancement/` 접두사를 사용한다.
```
enhancement/1 ← issue #1
enhancement/5 ← issue #5
```
---
## 커밋 메시지
[Conventional Commits](https://www.conventionalcommits.org/) 형식을 따른다.
```
<type>[optional scope]: <description>
```
### 타입
| 타입 | 사용 상황 |
|------|-----------|
| `feat` | 새 기능 추가 |
| `fix` | 버그 수정 |
| `refactor` | 동작 변경 없는 코드 개선 |
| `docs` | 문서 수정 |
| `chore` | 빌드, 의존성, 경고 제거 등 |
### 스코프 (선택)
변경 범위가 모듈 단위로 명확할 때만 붙인다.
```
refactor(config): Split config module into multiple files
feat(alarm): Add alarm command
```
### 예시
```
feat: Add EventList command to retrieve available events
fix: Remove Sync bound from Stream return types
docs: Update README with detailed features and usage instructions
chore: Fix warnings and clean up codebase
```
### 본문 (선택)
변경 이유나 맥락이 필요할 때 빈 줄 뒤에 추가한다.
```
refactor(config): Split config module into multiple files
Splits the 'config' module in both the 'application' and 'infrastructure'
layers into multiple files, one for each domain ('auth', 'client', 'event', 'server').
```
---
## PR
### 제목
브랜치명을 그대로 PascalCase로 변환한다.
```
Enhancement/<issue_number>
```
```
Enhancement/5 ← branch: enhancement/5
Enhancement/6 ← branch: enhancement/6
```
### 본문
```markdown
close #<issue_number>
## Feature
- 변경 사항을 한국어 불릿 포인트로 서술
- 버그 수정이라면 `## 수정 사항` 헤더 사용
```
실제 예시:
```markdown
close #5
## Feature
- event
- cli를 통해서 event를 추가하고 설정
- alarm 등록 기능 구현
- event check 기능 구현
- log는 Stream을 통해서 받도록 구현
- health는 polling을 통해서 구현
- refactor
- file 관리 기능을 FileAccessor로 통합
- 의존성을 주입 받도록 구현
```
### 라벨
이슈와 동일하게 `enhancement`를 붙인다.
---
## 전체 흐름 요약
```
이슈 생성 (#N)
↓
브랜치 생성: enhancement/N
↓
커밋: feat: ..., fix: ..., etc.
↓
PR 생성: "Enhancement/N"
본문: close #N + ## Feature + 한국어 설명
↓
main 머지 → 이슈 자동 close
```