Skip to content

[Chore] : Claude Code 워크플로우 커맨드 및 설정 구성 (#166)#167

Merged
GulSam00 merged 3 commits intodevelopfrom
chore/166-claudeCodeWorkflowSetup
Mar 21, 2026
Merged

[Chore] : Claude Code 워크플로우 커맨드 및 설정 구성 (#166)#167
GulSam00 merged 3 commits intodevelopfrom
chore/166-claudeCodeWorkflowSetup

Conversation

@GulSam00
Copy link
Copy Markdown
Owner

📌 PR 제목

[Chore] : Claude Code 워크플로우 커맨드 및 설정 구성

📌 변경 사항

  • .claude/commands/ 워크플로우 커맨드 추가 (start, spsc, red, green, refactor, verify, commit, pr)
  • .claude/settings.json Claude Code 설정 구성
  • .claude/skills/find-skills/ 스킬 설정 추가
  • CLAUDE.md 워크플로우 섹션 및 Git Conventions 업데이트
  • 미사용 .gitmessage.txt 제거 및 .gitignore 정리

💬 추가 참고 사항

GulSam00 and others added 3 commits March 22, 2026 01:00
- 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>
@GulSam00
Copy link
Copy Markdown
Owner Author

C:/Program Files/Git/describe

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Mar 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
singcode Ready Ready Preview, Comment Mar 21, 2026 4:08pm

@GulSam00
Copy link
Copy Markdown
Owner Author

C:/Program Files/Git/review

@GulSam00
Copy link
Copy Markdown
Owner Author

C:/Program Files/Git/improve

@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Add Claude Code workflow commands and configuration for TDD-based development

✨ Enhancement 📝 Documentation

Grey Divider

Walkthroughs

Description
• 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
Diagram
flowchart 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
Loading

Grey Divider

File Changes

1. .claude/commands/start.md ✨ Enhancement +76/-0

GitHub Issue creation and branch checkout command

.claude/commands/start.md


2. .claude/commands/spsc.md ✨ Enhancement +53/-0

Spec and scope definition from GitHub Issues

.claude/commands/spsc.md


3. .claude/commands/red.md ✨ Enhancement +41/-0

Test-first phase with Vitest framework

.claude/commands/red.md


View more (9)
4. .claude/commands/green.md ✨ Enhancement +40/-0

Implementation phase with coding rules

.claude/commands/green.md


5. .claude/commands/refactor.md ✨ Enhancement +58/-0

Code quality improvement checklist and guidelines

.claude/commands/refactor.md


6. .claude/commands/verify.md ✨ Enhancement +59/-0

Full quality validation workflow automation

.claude/commands/verify.md


7. .claude/commands/commit.md ✨ Enhancement +48/-0

Automated commit message generation with issue tracking

.claude/commands/commit.md


8. .claude/commands/pr.md ✨ Enhancement +83/-0

PR creation with Qodo AI code review integration

.claude/commands/pr.md


9. .claude/settings.json ⚙️ Configuration changes +16/-0

SessionStart hook for stale branch cleanup

.claude/settings.json


10. .claude/skills/find-skills/SKILL.md 📝 Documentation +143/-0

Agent skill discovery and installation documentation

.claude/skills/find-skills/SKILL.md


11. .gitmessage.txt Miscellaneous +0/-23

Remove legacy commit message template file

.gitmessage.txt


12. CLAUDE.md 📝 Documentation +42/-19

Update workflow commands, Git conventions, and self-maintenance

CLAUDE.md


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented Mar 21, 2026

Code Review by Qodo

🐞 Bugs (4) 📘 Rule violations (0) 📎 Requirement gaps (1) 📐 Spec deviations (0)

Grey Divider


Action required

1. Missing .claude/settings.local.json 📎 Requirement gap ✓ Correctness
Description
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.
Code

.claude/settings.json[R1-16]

+{
+  "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": "원격 삭제된 브랜치 정리 중..."
+          }
+        ]
+      }
+    ]
+  }
+}
Evidence
PR Compliance ID 2 requires creating or updating .claude/settings.local.json, but the only
settings file added in this PR is .claude/settings.json (no .claude/settings.local.json was
added/updated).

Configure local Claude settings in .claude/settings.local.json
.claude/settings.json[1-16]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## 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


2. Auto-deletes local branches 🐞 Bug ⛯ Reliability
Description
.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.
Code

.claude/settings.json[R2-11]

+  "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": "원격 삭제된 브랜치 정리 중..."
+          }
Evidence
The hook is configured to run automatically on SessionStart and executes git branch -D against
every branch matched as : gone], meaning branches can be force-deleted without an explicit user
action.

.claude/settings.json[1-16]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### 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


3. Verify runs missing scripts 🐞 Bug ✓ Correctness
Description
/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.
Code

.claude/commands/verify.md[R11-37]

+1. **Type check**
+
+   ```
+   pnpm build
+   ```
+
+   실패 시: TypeScript 에러를 수정한다.
+
+2. **Lint**
+
+   ```
+   pnpm lint
+   ```
+
+   실패 시: ESLint 에러를 수정한다. `eslint-disable` 주석으로 우회하지 않는다.
+
+3. **Format**
+
+   ```
+   pnpm format
+   ```
+
+4. **Unit test**
+
+   ```
+   pnpm test
+   ```
Evidence
The new /verify command calls pnpm build for type checking and pnpm test for unit tests. The
root package.json scripts do not include test (only build/dev/lint/format/check-types), and
turbo.json has no test pipeline task, so pnpm test from repo root will error.

.claude/commands/verify.md[11-40]
package.json[1-11]
turbo.json[18-38]
CLAUDE.md[9-32]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### 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


View more (1)
4. Red/Green use missing vitest 🐞 Bug ✓ Correctness
Description
/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.
Code

.claude/commands/red.md[R24-27]

+1. /spsc 에서 정의한 완료 기준을 기반으로 테스트 케이스 목록을 먼저 나열한다.
+2. 테스트 코드를 작성한다.
+3. `pnpm vitest run {파일경로}` 를 실행해 테스트가 실패하는지 확인한다.
+4. 실패 확인 후 아래를 출력한다.
Evidence
The new workflow docs require pnpm vitest, but no workspace declares a vitest dependency and the
lockfile contains no vitest entries, meaning the binary won’t be available via pnpm. Even
@repo/crawling references vitest in its test script but doesn’t declare it as a dependency.

.claude/commands/red.md[22-27]
.claude/commands/green.md[15-18]
packages/crawling/package.json[9-36]
pnpm-lock.yaml[1-50]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### 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



Remediation recommended

5. Conflicting git conventions docs 🐞 Bug ⚙ Maintainability
Description
Root CLAUDE.md now requires branch names and commit messages to include an issue number, but
apps/web/CLAUDE.md still documents the old formats without issue numbers. This creates
inconsistent guidance depending on which CLAUDE.md a developer/agent reads in a subdirectory.
Code

CLAUDE.md[R88-106]

+Branch format: `<type>/<issue-number>-<camelCaseName>` — flow: `feat/*` → `develop` → `main`

Types: `feat`, `fix`, `hotfix`, `chore`, `refactor`, `doc`

+Branch examples:
+```
+feat/42-addSearchFilter
+fix/57-songCardCss
+chore/61-versionBump
+```
+
+Commit format: `<type> : <Korean description> (#issue-number)` (space before and after colon)
+
Examples:

-feat : MarqueeText 자동 스크롤 텍스트 적용
-fix : SongCard css 수정
-chore : 버전 2.3.0
+feat : MarqueeText 자동 스크롤 텍스트 적용 (#42)
+fix : SongCard css 수정 (#57)
+chore : 버전 2.3.0 (#61)

Evidence
The root documentation was updated to <type>/<issue-number>-... branches and (#issue-number)
commits, but the web app’s CLAUDE.md still states <type>/<camelCaseName> and commits without issue
numbers, which is contradictory for day-to-day usage in apps/web/.

CLAUDE.md[86-106]
apps/web/CLAUDE.md[96-134]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
Git conventions are now documented differently in root vs `apps/web/`, causing inconsistent branch/commit naming depending on where the guidance is read.

### Issue Context
Root `CLAUDE.md` explicitly points readers to `apps/web/CLAUDE.md` for details, so mismatched conventions are especially confusing.

### Fix Focus Areas
- CLAUDE.md[86-106]
- apps/web/CLAUDE.md[96-134]

### Expected fix direction
Update `apps/web/CLAUDE.md` to match the new repo-wide convention (issue-number in branch and commit), or clearly document that `apps/web/` intentionally follows different rules (and why).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@GulSam00 GulSam00 merged commit 39a3523 into develop Mar 21, 2026
2 checks passed
@GulSam00 GulSam00 deleted the chore/166-claudeCodeWorkflowSetup branch March 21, 2026 16:09
Comment thread .claude/settings.json
Comment on lines +1 to +16
{
"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": "원격 삭제된 브랜치 정리 중..."
}
]
}
]
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

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

Comment thread .claude/settings.json
Comment on lines +2 to +11
"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": "원격 삭제된 브랜치 정리 중..."
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

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

Comment on lines +11 to +37
1. **Type check**

```
pnpm build
```

실패 시: TypeScript 에러를 수정한다.

2. **Lint**

```
pnpm lint
```

실패 시: ESLint 에러를 수정한다. `eslint-disable` 주석으로 우회하지 않는다.

3. **Format**

```
pnpm format
```

4. **Unit test**

```
pnpm test
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

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

Comment thread .claude/commands/red.md
Comment on lines +24 to +27
1. /spsc 에서 정의한 완료 기준을 기반으로 테스트 케이스 목록을 먼저 나열한다.
2. 테스트 코드를 작성한다.
3. `pnpm vitest run {파일경로}` 를 실행해 테스트가 실패하는지 확인한다.
4. 실패 확인 후 아래를 출력한다.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant