[Chore] : Claude Code 워크플로우 커맨드 및 설정 구성 (#166)#167
Conversation
- JIRA 연동을 GitHub Issues 기반으로 전환 (spsc, commit) - /start 커맨드 추가 (이슈 생성 + 브랜치 체크아웃) - 모든 커맨드에 다음 단계 네비게이션 및 사이클 규칙 추가 - CLAUDE.md에 Workflow Commands, Self-Maintenance 섹션 추가 - Git Conventions에 이슈 번호 포함 형식 반영 - SessionStart hook으로 stale 브랜치 자동 정리 설정 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
C:/Program Files/Git/describe |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
C:/Program Files/Git/review |
|
C:/Program Files/Git/improve |
Review Summary by QodoAdd Claude Code workflow commands and configuration for TDD-based development
WalkthroughsDescription• Add 8 Claude Code workflow commands for TDD-based development cycle - /start: GitHub Issue creation + branch checkout - /spsc: Spec & scope definition from issues - /red: Test-first phase (failing tests) - /green: Implementation phase (passing tests) - /refactor: Code quality improvement - /verify: Full quality validation (build, lint, format, test) - /commit: Automated commit message generation - /pr: PR creation with Qodo AI code review integration • Configure Claude Code settings with SessionStart hook for stale branch cleanup • Add find-skills documentation for agent skill discovery • Update CLAUDE.md with workflow commands, Git conventions (issue-number format), and self-maintenance guidelines • Remove legacy .gitmessage.txt template file Diagramflowchart LR
Start["/start<br/>Issue + Branch"] --> Spsc["/spsc<br/>Scope Definition"]
Spsc --> Red["/red<br/>Write Tests"]
Red --> Green["/green<br/>Implement"]
Green --> Refactor["/refactor<br/>Quality"]
Refactor --> Verify["/verify<br/>Validation"]
Verify --> Commit["/commit<br/>Git Commit"]
Commit --> PR["/pr<br/>Pull Request"]
PR --> Review["Qodo AI Review"]
Settings["settings.json<br/>SessionStart Hook"] -.-> Verify
File Changes1. .claude/commands/start.md
|
Code Review by Qodo
1. Missing .claude/settings.local.json
|
| { | ||
| "hooks": { | ||
| "SessionStart": [ | ||
| { | ||
| "hooks": [ | ||
| { | ||
| "type": "command", | ||
| "command": "git fetch --prune 2>&1 && git branch -vv | awk '/: gone]/{print $1}' | xargs -r git branch -D 2>&1 || true", | ||
| "timeout": 30, | ||
| "statusMessage": "원격 삭제된 브랜치 정리 중..." | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } |
There was a problem hiding this comment.
1. Missing .claude/settings.local.json 📎 Requirement gap ✓ Correctness
The PR adds .claude/settings.json but does not create/update the required .claude/settings.local.json, so the intended local workflow configuration is not present. This can prevent the Claude Code workflow from operating as specified.
Agent Prompt
## Issue description
The ticket/compliance requires local Claude configuration in `.claude/settings.local.json`, but the PR only adds `.claude/settings.json`.
## Issue Context
Without `.claude/settings.local.json`, the workflow-related settings may not be applied as intended.
## Fix Focus Areas
- .claude/settings.json[1-16]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| "hooks": { | ||
| "SessionStart": [ | ||
| { | ||
| "hooks": [ | ||
| { | ||
| "type": "command", | ||
| "command": "git fetch --prune 2>&1 && git branch -vv | awk '/: gone]/{print $1}' | xargs -r git branch -D 2>&1 || true", | ||
| "timeout": 30, | ||
| "statusMessage": "원격 삭제된 브랜치 정리 중..." | ||
| } |
There was a problem hiding this comment.
2. Auto-deletes local branches 🐞 Bug ⛯ Reliability
.claude/settings.json runs a SessionStart hook that force-deletes all local branches whose upstream is marked gone via git branch -D, without confirmation. This can irreversibly delete unmerged local work whenever Claude Code starts a session.
Agent Prompt
### Issue description
A SessionStart hook currently force-deletes (`git branch -D`) local branches whose upstream is gone. This is a high-risk, destructive default that can cause data loss.
### Issue Context
Because this runs automatically (on every Claude Code session start), developers can lose local-only work if their remote branch was deleted or if they intentionally keep a local branch after remote cleanup.
### Fix Focus Areas
- .claude/settings.json[1-16]
### Expected fix direction (choose one)
1) Remove the branch-deletion behavior from SessionStart entirely and turn it into a manual, explicitly-invoked command.
2) If keeping automation, switch to safer behavior:
- Use `git branch -d` (not `-D`)
- Exclude current branch and protected branches (main/develop)
- Print the candidate branches and require explicit confirmation before deleting
- Avoid overly broad parsing of `git branch -vv` output
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| 1. **Type check** | ||
|
|
||
| ``` | ||
| pnpm build | ||
| ``` | ||
|
|
||
| 실패 시: TypeScript 에러를 수정한다. | ||
|
|
||
| 2. **Lint** | ||
|
|
||
| ``` | ||
| pnpm lint | ||
| ``` | ||
|
|
||
| 실패 시: ESLint 에러를 수정한다. `eslint-disable` 주석으로 우회하지 않는다. | ||
|
|
||
| 3. **Format** | ||
|
|
||
| ``` | ||
| pnpm format | ||
| ``` | ||
|
|
||
| 4. **Unit test** | ||
|
|
||
| ``` | ||
| pnpm test | ||
| ``` |
There was a problem hiding this comment.
3. Verify runs missing scripts 🐞 Bug ✓ Correctness
/verify instructs running pnpm test, but the repo root has no test script and Turborepo defines no test task, so this step fails as written. It also labels pnpm build as “Type check” even though the repo’s explicit typecheck command is pnpm check-types.
Agent Prompt
### Issue description
The `/verify` workflow is currently not executable in this repository because it calls `pnpm test` (no such root script / turbo task) and uses `pnpm build` as a stand-in for type-checking even though the repo defines `pnpm check-types`.
### Issue Context
Developers following `/verify` will get immediate command failures at the unit test step, and type checking guidance is misleading.
### Fix Focus Areas
- .claude/commands/verify.md[11-40]
- package.json[1-11]
- turbo.json[18-38]
### Fix options (pick one)
**Option A (doc-only):**
- Change Type check step to `pnpm check-types`
- Replace Unit test step with a workspace-specific instruction (e.g., `pnpm --filter @repo/crawling test`) or remove it until a root-level test workflow exists.
**Option B (make commands real):**
- Add a root `test` script (e.g., `turbo run test`)
- Add a `test` task in `turbo.json`
- Ensure relevant workspaces define a `test` script so Turbo can run them.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| 1. /spsc 에서 정의한 완료 기준을 기반으로 테스트 케이스 목록을 먼저 나열한다. | ||
| 2. 테스트 코드를 작성한다. | ||
| 3. `pnpm vitest run {파일경로}` 를 실행해 테스트가 실패하는지 확인한다. | ||
| 4. 실패 확인 후 아래를 출력한다. |
There was a problem hiding this comment.
4. Red/green use missing vitest 🐞 Bug ✓ Correctness
/red and /green instruct running pnpm vitest run ..., but this repo doesn’t include Vitest in any package.json nor in pnpm-lock.yaml, so those commands won’t work. As a result, the TDD workflow steps are not runnable in the current codebase.
Agent Prompt
### Issue description
The new `/red` and `/green` command docs require `pnpm vitest ...`, but Vitest is not installed in this monorepo (not in any package.json / lockfile). This makes the workflow steps fail.
### Issue Context
If you want TDD workflow to be executable, the repo needs a consistent test runner setup.
### Fix Focus Areas
- .claude/commands/red.md[22-27]
- .claude/commands/green.md[15-18]
- packages/crawling/package.json[9-36]
### Fix options
1) **Make vitest available**: add `vitest` (and any needed test deps) to the relevant workspace(s) devDependencies (or a shared tooling package) and ensure there is a consistent way to run it (scripts).
2) **Adjust docs to current reality**: replace `pnpm vitest ...` with the actual runnable command(s) in this repo (e.g., workspace-filtered `pnpm --filter ... test`) or remove the step until tests are set up.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
📌 PR 제목
[Chore] : Claude Code 워크플로우 커맨드 및 설정 구성
📌 변경 사항
.claude/commands/워크플로우 커맨드 추가 (start, spsc, red, green, refactor, verify, commit, pr).claude/settings.jsonClaude Code 설정 구성.claude/skills/find-skills/스킬 설정 추가CLAUDE.md워크플로우 섹션 및 Git Conventions 업데이트.gitmessage.txt제거 및.gitignore정리💬 추가 참고 사항