tdd-commit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTDD Commit
TDD Commit
호출 방법
调用方式
/tdd-commit [story-id]- 인수 없음 — 에서 활성 세션 파일을 자동 감지
.tdd-sessions/ - 스토리 ID 제공 — 를 직접 사용
.tdd-sessions/{story-id}.md
/tdd-commit [story-id]- 无参数 — 自动检测.tdd-sessions/中的活跃会话文件
- 提供故事ID — 直接使用文件
.tdd-sessions/{story-id}.md
1단계: 세션 파일 찾기
第1步:查找会话文件
- 내 파일 목록 조회
.tdd-sessions/ - 디렉토리가 존재하지 않거나 비어 있는 경우:
중단.
"No active TDD session found. Run /tdd-plan to start a new session." - 파일이 정확히 하나인 경우: 해당 파일 사용
- 파일이 여러 개인 경우:
일시 중지하고 선택을 기다림.
"Multiple sessions found. Which story are you committing? [1] 12345678.md — User Profile Update [2] payment-intent-2026-03-31.md — (no ID) Type the number or story ID."
- 查询目录下的文件列表
.tdd-sessions/ - 目录不存在或为空时:
终止执行。
"No active TDD session found. Run /tdd-plan to start a new session." - 目录下仅有一个文件时: 使用该文件
- 目录下有多个文件时:
暂停执行,等待用户选择。
"Multiple sessions found. Which story are you committing? [1] 12345678.md — User Profile Update [2] payment-intent-2026-03-31.md — (no ID) Type the number or story ID."
2단계: 변경 사항 요약 출력
第2步:输出变更摘要
markdown
undefinedmarkdown
undefinedChanges Summary
Changes Summary
Story: [ID]: [title]
Stack: [stack]
Story: [ID]: [title]
Stack: [stack]
Completed Tasks
Completed Tasks
- ✅ Task 1: [title] — [type]
- ✅ Task 2: [title] — [type]
- ⏳ Task 3: [title] — [type] ← skipped / not started
- ✅ Task 1: [title] — [type]
- ✅ Task 2: [title] — [type]
- ⏳ Task 3: [title] — [type] ← skipped / not started
Pending Tasks (not committed)
Pending Tasks (not committed)
- [list any ⏳ pending tasks, or "none — all tasks complete"]
미완료 태스크가 있는 경우 다음을 표시: "이 태스크들은 완료되지 않았으며 이번 커밋에 포함되지 않습니다."
---- [list any ⏳ pending tasks, or "none — all tasks complete"]
如果存在未完成任务,显示:"这些任务尚未完成,不会包含在本次提交中。"
---3단계: 커밋 메시지 제안
第3步:提供提交消息建议
Conventional Commits 형식 사용:
feat(<scope>): <short description under 72 chars>
Implements [STORY-ID]: [story title]
Tasks completed:
- [task 1 title]: [one-line description of what was implemented]
- [task 2 title]: [one-line description]
- [task N title]: [one-line description]
TDD: ping-pong pair programming session使用Conventional Commits格式:
feat(<scope>): <short description under 72 chars>
Implements [STORY-ID]: [story title]
Tasks completed:
- [task 1 title]: [one-line description of what was implemented]
- [task 2 title]: [one-line description]
- [task N title]: [one-line description]
TDD: ping-pong pair programming session스코프 선택
范围选择
기술 레이어가 아닌 기능/도메인 이름을 사용:
| 컨텍스트 | 스코프 예시 |
|---|---|
| TypeScript React | |
| Kotlin/Java Spring | |
| Python FastAPI | |
使用功能/领域名称,而非技术层:
| 上下文 | 范围示例 |
|---|---|
| TypeScript React | |
| Kotlin/Java Spring | |
| Python FastAPI | |
타입 선택
类型选择
| 상황 | 타입 |
|---|---|
| 새 기능 (가장 일반적) | |
| 버그 수정 | |
| 리팩토링만, 새로운 동작 없음 | |
| 场景 | 类型 |
|---|---|
| 新增功能(最常见) | |
| 修复Bug | |
| 仅重构,无新功能改动 | |
4단계: 커밋 미리보기 출력 후 일시 중지
第4步:输出提交预览后暂停
markdown
undefinedmarkdown
undefinedCommit Preview
Commit Preview
Message:
[full commit message]Files to stage:
[list source + test files created or modified during the session]
(Build artifacts, .env files, and IDE folders will NOT be staged)
Ready to commit?
→ Type "commit" or "ship it" to execute
→ Type your preferred message to override it
→ Type "cancel" to exit without committing
일시 중지하고 기다림.
---Message:
[full commit message]Files to stage:
[list source + test files created or modified during the session]
(Build artifacts, .env files, and IDE folders will NOT be staged)
Ready to commit?
→ Type "commit" or "ship it" to execute
→ Type your preferred message to override it
→ Type "cancel" to exit without committing
暂停执行,等待用户输入。
---5단계: 커밋 실행
第5步:执行提交
개발자가 확인하면:
- 세션의 모든 소스 및 테스트 파일을 스테이징 (스테이징 금지: ,
.env,.env.*,target/,build/,dist/,__pycache__/등 빌드 아티팩트).gradle/ - 후
git add [files]실행git commit -m "[message]" - 결과 커밋 해시 출력:
✅ Committed: abc1234 feat(payment): add payment intent creation endpoint
开发者确认后:
- 暂存会话期间创建或修改的所有源码和测试文件(禁止暂存:、
.env、.env.*、target/、build/、dist/、__pycache__/等构建制品).gradle/ - 执行后运行
git add [files]git commit -m "[message]" - 输出提交哈希结果:
✅ Committed: abc1234 feat(payment): add payment intent creation endpoint
6단계: 세션 파일 정리
第6步:清理会话文件
Delete `.tdd-sessions/[filename]`? (yes / no)
→ "yes" — delete the file
→ "no" — keep it (useful if the story spans multiple sessions)일시 중지하고 기다림. 응답에 따라 실행.
삭제 후 가 비어 있어도 그대로 두면 됩니다 — 이미 gitignore에 등록되어 있습니다.
.tdd-sessions/Delete `.tdd-sessions/[filename]`? (yes / no)
→ "yes" — 删除文件
→ "no" — 保留文件(适用于故事跨多个会话的场景)暂停执行,等待用户输入,根据响应执行对应操作。
删除后即使目录为空也可保留,该目录已加入gitignore。
.tdd-sessions/레퍼런스 파일
参考文件
| 파일 | 읽는 시점 |
|---|---|
| 전체 커밋 형식 규칙 및 멀티 세션 전략 |
| 文件 | 读取时机 |
|---|---|
| 查看完整提交格式规则及多会话策略 |