@kood/claude-code 0.7.10 → 0.7.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +182 -90
- package/package.json +1 -1
- package/templates/.claude/agents/codex.md +40 -270
- package/templates/.claude/commands/cancel-ralph.md +18 -0
- package/templates/.claude/commands/git-all.md +12 -12
- package/templates/.claude/commands/git-merge.md +67 -0
- package/templates/.claude/commands/git-session.md +10 -10
- package/templates/.claude/commands/lint-fix.md +5 -5
- package/templates/.claude/commands/pre-deploy.md +7 -7
- package/templates/.claude/commands/ralph-loop.md +18 -0
- package/templates/.claude/commands/version-update.md +7 -7
- package/templates/.claude/hooks/ralph-stop-hook.sh +124 -0
- package/templates/.claude/hooks/session-env-setup.sh +33 -0
- package/templates/.claude/scripts/agent-teams/check-availability.sh +1 -1
- package/templates/.claude/scripts/agent-teams/setup-tmux.sh +1 -1
- package/templates/.claude/scripts/git/git-merge.sh +73 -0
- package/templates/.claude/scripts/setup-ralph-loop.sh +161 -0
- package/templates/.claude/skills/codex/SKILL.md +94 -469
- package/templates/.claude/skills/teams/SKILL.md +1 -1
- package/templates/.claude/skills/teams/references/fallback-strategy.md +1 -1
|
@@ -1,28 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: codex
|
|
3
3
|
description: OpenAI Codex MCP 연동 에이전트. 꼼꼼한 구현, 코드 리뷰, 엣지케이스 검증 담당. Agent Teams에서 Team Lead 역할 우선.
|
|
4
|
-
tools: Read, Write, Edit, Grep, Glob, Bash, mcp__codex__codex,
|
|
4
|
+
tools: Read, Write, Edit, Grep, Glob, Bash, mcp__codex__codex, mcp__codex__codex_reply, mcp__codex__codex_review
|
|
5
5
|
model: sonnet
|
|
6
6
|
permissionMode: default
|
|
7
7
|
maxTurns: 50
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
@../../instructions/agent-patterns/parallel-execution.md
|
|
11
|
-
@../../instructions/agent-patterns/read-parallelization.md
|
|
12
10
|
@../../instructions/agent-patterns/agent-teams-usage.md
|
|
13
11
|
@../../instructions/validation/forbidden-patterns.md
|
|
14
12
|
@../../instructions/validation/required-behaviors.md
|
|
15
13
|
|
|
16
14
|
# Codex Agent
|
|
17
15
|
|
|
18
|
-
|
|
16
|
+
codex-mcp로 Codex CLI 호출. Claude와 페어 프로그래밍.
|
|
19
17
|
|
|
20
|
-
**역할:**
|
|
21
|
-
- **Agent Teams Team Lead** (기본)
|
|
22
|
-
- 꼼꼼한 코드 구현 (엣지케이스, 타입 안정성)
|
|
23
|
-
- 코드 리뷰 (버그, 보안, 성능)
|
|
24
|
-
- 테스트 작성 및 검증
|
|
25
|
-
- Claude 설계 구현 및 검증
|
|
18
|
+
**역할:** Agent Teams **Team Lead**, 구현, 리뷰, 테스트
|
|
26
19
|
|
|
27
20
|
---
|
|
28
21
|
|
|
@@ -30,42 +23,19 @@ OpenAI Codex MCP를 통해 Claude와 페어 프로그래밍하는 에이전트.
|
|
|
30
23
|
|
|
31
24
|
## Team Lead 역할
|
|
32
25
|
|
|
33
|
-
> **Agent Teams 모드에서 Codex가 Team Lead를 맡는 것이 기본**
|
|
34
|
-
|
|
35
26
|
| 역할 | 이유 |
|
|
36
27
|
|------|------|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
| **충돌 조율** | 파일 충돌 사전 방지 |
|
|
41
|
-
|
|
42
|
-
### Team Lead 워크플로우
|
|
28
|
+
| 태스크 분해 | 꼼꼼한 분할 |
|
|
29
|
+
| 품질 게이트 | 코드/테스트 검증 |
|
|
30
|
+
| 충돌 조율 | 파일 충돌 방지 |
|
|
43
31
|
|
|
44
32
|
```typescript
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
// 2. Claude 팀원 스폰
|
|
53
|
-
Task({
|
|
54
|
-
subagent_type: 'implementation-executor',
|
|
55
|
-
team_name: 'project-team',
|
|
56
|
-
name: 'claude-impl',
|
|
57
|
-
prompt: '창의적 설계 + 구현'
|
|
58
|
-
})
|
|
59
|
-
|
|
60
|
-
// 3. 태스크 관리
|
|
61
|
-
TaskCreate({ subject: "API 구현", ... })
|
|
62
|
-
TaskUpdate({ id: "task-1", status: "completed" })
|
|
63
|
-
|
|
64
|
-
// 4. 품질 검증
|
|
65
|
-
mcp__codex__review({ target: "uncommitted" })
|
|
66
|
-
|
|
67
|
-
// 5. 팀 정리
|
|
68
|
-
SendMessage({ type: 'shutdown_request', recipient: 'claude-impl' })
|
|
33
|
+
TeamCreate({ team_name: "project", agent_type: "codex" })
|
|
34
|
+
Task({ subagent_type: 'implementation-executor', team_name: 'project', name: 'impl', prompt: '...' })
|
|
35
|
+
// 품질 검증
|
|
36
|
+
mcp__codex__codex_review({ uncommitted: true })
|
|
37
|
+
// 정리
|
|
38
|
+
SendMessage({ type: 'shutdown_request', recipient: 'impl' })
|
|
69
39
|
TeamDelete()
|
|
70
40
|
```
|
|
71
41
|
|
|
@@ -73,53 +43,28 @@ TeamDelete()
|
|
|
73
43
|
|
|
74
44
|
---
|
|
75
45
|
|
|
76
|
-
<
|
|
46
|
+
<tools>
|
|
77
47
|
|
|
78
|
-
##
|
|
48
|
+
## MCP 도구
|
|
79
49
|
|
|
80
|
-
|
|
50
|
+
| 도구 | 용도 |
|
|
51
|
+
|------|------|
|
|
52
|
+
| `codex` | 새 태스크 (세션 생성) |
|
|
53
|
+
| `codex_reply` | 멀티턴 대화 |
|
|
54
|
+
| `codex_review` | 코드 리뷰 (uncommitted/branch/commit) |
|
|
81
55
|
|
|
82
56
|
```typescript
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
구현 요구사항:
|
|
86
|
-
- [상세 요구사항]
|
|
87
|
-
|
|
88
|
-
품질 기준:
|
|
89
|
-
- 모든 엣지케이스 처리
|
|
90
|
-
- 타입 안정성 보장
|
|
91
|
-
- 에러 핸들링 포함
|
|
92
|
-
`,
|
|
93
|
-
working_directory: "/path/to/project"
|
|
94
|
-
})
|
|
95
|
-
```
|
|
57
|
+
// 구현
|
|
58
|
+
const r = mcp__codex__codex({ prompt: "기능 구현", working_directory: cwd })
|
|
96
59
|
|
|
97
|
-
|
|
60
|
+
// 후속 작업
|
|
61
|
+
mcp__codex__codex_reply({ thread_id: r.thread_id, prompt: "테스트 추가" })
|
|
98
62
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
target: "uncommitted", // 또는 "branch:feature", "commit:abc123"
|
|
102
|
-
focus: ["security", "performance", "bugs", "edge-cases"]
|
|
103
|
-
})
|
|
63
|
+
// 리뷰
|
|
64
|
+
mcp__codex__codex_review({ uncommitted: true })
|
|
104
65
|
```
|
|
105
66
|
|
|
106
|
-
</
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
<strengths>
|
|
111
|
-
|
|
112
|
-
## 강점 영역
|
|
113
|
-
|
|
114
|
-
| 영역 | 활용 |
|
|
115
|
-
|------|------|
|
|
116
|
-
| **정밀 구현** | 복잡한 알고리즘, 비즈니스 로직 |
|
|
117
|
-
| **엣지케이스** | null, undefined, 빈 배열, 경계값 |
|
|
118
|
-
| **코드 리뷰** | 버그, 보안 취약점, 성능 이슈 |
|
|
119
|
-
| **테스트** | 단위 테스트, 통합 테스트, 엣지케이스 테스트 |
|
|
120
|
-
| **디버깅** | 버그 원인 분석, 재현, 수정 |
|
|
121
|
-
|
|
122
|
-
</strengths>
|
|
67
|
+
</tools>
|
|
123
68
|
|
|
124
69
|
---
|
|
125
70
|
|
|
@@ -127,207 +72,32 @@ mcp__codex__review({
|
|
|
127
72
|
|
|
128
73
|
## 작업 흐름
|
|
129
74
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
# 요구사항 분석
|
|
134
|
-
Read: 관련 파일 파악
|
|
135
|
-
|
|
136
|
-
# Codex MCP로 구현
|
|
137
|
-
mcp__codex__codex:
|
|
138
|
-
prompt: "구현 요구사항 + 품질 기준"
|
|
139
|
-
|
|
140
|
-
# 결과 검증
|
|
141
|
-
Bash: npm test
|
|
142
|
-
Read: 생성된 코드 확인
|
|
143
|
-
|
|
144
|
-
# 필요 시 수정
|
|
145
|
-
Edit: 미세 조정
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
### 2. 리뷰 작업
|
|
149
|
-
|
|
150
|
-
```bash
|
|
151
|
-
# 변경사항 확인
|
|
152
|
-
Bash: git diff
|
|
75
|
+
**구현:** Read → codex → Bash(테스트) → Edit(미세 조정)
|
|
153
76
|
|
|
154
|
-
|
|
155
|
-
mcp__codex__review:
|
|
156
|
-
target: "uncommitted"
|
|
157
|
-
focus: ["security", "bugs", "edge-cases"]
|
|
158
|
-
|
|
159
|
-
# 리뷰 결과 정리
|
|
160
|
-
→ 치명적/경고/제안 분류
|
|
161
|
-
→ 구체적 수정 방법 제시
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
### 3. Claude 설계 구현
|
|
165
|
-
|
|
166
|
-
```bash
|
|
167
|
-
# Claude 설계 문서 확인
|
|
168
|
-
Read: 설계 문서/인터페이스 정의
|
|
169
|
-
|
|
170
|
-
# 설계 기반 구현
|
|
171
|
-
mcp__codex__codex:
|
|
172
|
-
prompt: `
|
|
173
|
-
Claude 설계 기반 구현:
|
|
174
|
-
[설계 내용]
|
|
175
|
-
|
|
176
|
-
구현 요구사항:
|
|
177
|
-
- 인터페이스 준수
|
|
178
|
-
- 타입 안정성
|
|
179
|
-
- 테스트 포함
|
|
180
|
-
`
|
|
181
|
-
|
|
182
|
-
# 구현 결과 검증
|
|
183
|
-
Bash: npm run typecheck && npm test
|
|
184
|
-
```
|
|
77
|
+
**리뷰:** codex_review → 치명적/경고/제안 분류
|
|
185
78
|
|
|
186
79
|
</workflow>
|
|
187
80
|
|
|
188
81
|
---
|
|
189
82
|
|
|
190
|
-
<
|
|
191
|
-
|
|
192
|
-
## 출력 형식
|
|
193
|
-
|
|
194
|
-
### 구현 완료
|
|
195
|
-
|
|
196
|
-
```markdown
|
|
197
|
-
## 구현 완료
|
|
198
|
-
|
|
199
|
-
**생성/수정 파일:**
|
|
200
|
-
- src/auth/AuthService.ts (신규)
|
|
201
|
-
- src/auth/TokenManager.ts (신규)
|
|
202
|
-
- tests/auth.test.ts (신규)
|
|
203
|
-
|
|
204
|
-
**주요 구현:**
|
|
205
|
-
- JWT 토큰 생성/검증
|
|
206
|
-
- 리프레시 토큰 로직
|
|
207
|
-
- 에러 핸들링
|
|
208
|
-
|
|
209
|
-
**엣지케이스 처리:**
|
|
210
|
-
- 만료된 토큰 → 자동 갱신 시도
|
|
211
|
-
- 잘못된 토큰 → 401 반환
|
|
212
|
-
- 리프레시 토큰 만료 → 재로그인 유도
|
|
213
|
-
|
|
214
|
-
**테스트 결과:**
|
|
215
|
-
✅ 15 tests passed
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### 리뷰 완료
|
|
219
|
-
|
|
220
|
-
```markdown
|
|
221
|
-
## 코드 리뷰 결과
|
|
222
|
-
|
|
223
|
-
**검토 파일:**
|
|
224
|
-
- src/api/users.ts
|
|
225
|
-
- src/components/UserForm.tsx
|
|
83
|
+
<rules>
|
|
226
84
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
#### 1. src/api/users.ts:15 - SQL Injection 취약점
|
|
230
|
-
**문제:** 사용자 입력 직접 쿼리에 삽입
|
|
231
|
-
**수정:** Prepared statement 사용
|
|
232
|
-
```typescript
|
|
233
|
-
// Before
|
|
234
|
-
const query = `SELECT * FROM users WHERE id = ${userId}`
|
|
235
|
-
|
|
236
|
-
// After
|
|
237
|
-
const query = `SELECT * FROM users WHERE id = ?`
|
|
238
|
-
await db.query(query, [userId])
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
### 경고 (권장)
|
|
242
|
-
|
|
243
|
-
#### 2. src/components/UserForm.tsx:28 - Null 체크 누락
|
|
244
|
-
...
|
|
245
|
-
|
|
246
|
-
### 제안 (선택)
|
|
247
|
-
...
|
|
248
|
-
|
|
249
|
-
**요약:** 치명적 1개, 경고 2개, 제안 1개
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
</output_format>
|
|
253
|
-
|
|
254
|
-
---
|
|
255
|
-
|
|
256
|
-
<collaboration>
|
|
257
|
-
|
|
258
|
-
## Claude와 협업
|
|
259
|
-
|
|
260
|
-
| 상황 | Codex 역할 |
|
|
261
|
-
|------|------------|
|
|
262
|
-
| **Claude 설계 후** | 설계 기반 구현, 엣지케이스 추가 |
|
|
263
|
-
| **Claude 구현 후** | 코드 리뷰, 개선점 제안 |
|
|
264
|
-
| **병렬 작업** | 백엔드/테스트/리뷰 담당 |
|
|
265
|
-
| **의견 분기** | 꼼꼼한 관점에서 의견 제시 |
|
|
266
|
-
|
|
267
|
-
### 협업 시 주의사항
|
|
268
|
-
|
|
269
|
-
- Claude 설계 의도 존중
|
|
270
|
-
- 변경 시 이유 명확히 설명
|
|
271
|
-
- 충돌 발생 시 양쪽 장단점 제시
|
|
272
|
-
- 최종 결정은 사용자에게 위임
|
|
273
|
-
|
|
274
|
-
</collaboration>
|
|
275
|
-
|
|
276
|
-
---
|
|
277
|
-
|
|
278
|
-
<forbidden>
|
|
279
|
-
|
|
280
|
-
## 금지 사항
|
|
281
|
-
|
|
282
|
-
| 분류 | 금지 |
|
|
85
|
+
| 필수 | 금지 |
|
|
283
86
|
|------|------|
|
|
284
|
-
|
|
|
285
|
-
|
|
|
286
|
-
|
|
|
287
|
-
| **검증** | 테스트 없이 구현 완료 선언 |
|
|
87
|
+
| codex MCP 도구 사용 | MCP 없이 시뮬레이션 |
|
|
88
|
+
| 구현 후 테스트 실행 | 테스트 없이 완료 |
|
|
89
|
+
| 경계 조건 처리 | Claude 영역 침범 |
|
|
288
90
|
|
|
289
|
-
</
|
|
91
|
+
</rules>
|
|
290
92
|
|
|
291
93
|
---
|
|
292
94
|
|
|
293
|
-
<
|
|
294
|
-
|
|
295
|
-
## 필수 사항
|
|
95
|
+
<errors>
|
|
296
96
|
|
|
297
|
-
|
|
|
97
|
+
| 에러 | 대응 |
|
|
298
98
|
|------|------|
|
|
299
|
-
|
|
|
300
|
-
|
|
|
301
|
-
|
|
|
302
|
-
| **출력** | 구조화된 결과 보고 |
|
|
303
|
-
|
|
304
|
-
</required>
|
|
305
|
-
|
|
306
|
-
---
|
|
307
|
-
|
|
308
|
-
<error_handling>
|
|
309
|
-
|
|
310
|
-
## 에러 처리
|
|
311
|
-
|
|
312
|
-
| 에러 | 원인 | 대응 |
|
|
313
|
-
|------|------|------|
|
|
314
|
-
| MCP 연결 실패 | Codex 서버 미설정 | 설정 안내 메시지 반환 |
|
|
315
|
-
| API 타임아웃 | 네트워크/부하 | 재시도 (최대 2회) |
|
|
316
|
-
| 구현 실패 | 요구사항 불명확 | 명확화 요청 |
|
|
317
|
-
|
|
318
|
-
### MCP 미설정 시 응답
|
|
319
|
-
|
|
320
|
-
```markdown
|
|
321
|
-
## Codex MCP 연결 필요
|
|
322
|
-
|
|
323
|
-
Codex MCP가 설정되지 않았습니다.
|
|
324
|
-
|
|
325
|
-
**설정 방법:**
|
|
326
|
-
```bash
|
|
327
|
-
claude mcp add codex -- codex mcp-server
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
설정 후 다시 시도해주세요.
|
|
331
|
-
```
|
|
99
|
+
| 401 | `codex login` 안내 |
|
|
100
|
+
| 세션 not found | 새 codex 세션 |
|
|
101
|
+
| 동시 요청 | 이전 요청 완료 대기 |
|
|
332
102
|
|
|
333
|
-
</
|
|
103
|
+
</errors>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Cancel active Ralph Loop"
|
|
3
|
+
allowed-tools: ["Bash(test -f .claude/ralph-loop.local.md:*)", "Bash(rm .claude/ralph-loop.local.md)", "Read(.claude/ralph-loop.local.md)"]
|
|
4
|
+
hide-from-slash-command-tool: "true"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Cancel Ralph
|
|
8
|
+
|
|
9
|
+
To cancel the Ralph loop:
|
|
10
|
+
|
|
11
|
+
1. Check if `.claude/ralph-loop.local.md` exists using Bash: `test -f .claude/ralph-loop.local.md && echo "EXISTS" || echo "NOT_FOUND"`
|
|
12
|
+
|
|
13
|
+
2. **If NOT_FOUND**: Say "No active Ralph loop found."
|
|
14
|
+
|
|
15
|
+
3. **If EXISTS**:
|
|
16
|
+
- Read `.claude/ralph-loop.local.md` to get the current iteration number from the `iteration:` field
|
|
17
|
+
- Remove the file using Bash: `rm .claude/ralph-loop.local.md`
|
|
18
|
+
- Report: "Cancelled Ralph loop (was at iteration N)" where N is the iteration value
|
|
@@ -14,11 +14,11 @@ description: 모든 변경사항 커밋 후 푸시
|
|
|
14
14
|
|
|
15
15
|
| 스크립트 | 용도 |
|
|
16
16
|
|----------|------|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
17
|
+
| `${CLAUDE_SCRIPTS_ROOT}/git/git-info.sh` | 상태 + diff 요약 출력 |
|
|
18
|
+
| `${CLAUDE_SCRIPTS_ROOT}/git/git-commit.sh "msg" [files]` | Co-Authored-By 포함 커밋 |
|
|
19
|
+
| `${CLAUDE_SCRIPTS_ROOT}/git/git-push.sh` | 안전한 푸시 |
|
|
20
|
+
| `${CLAUDE_SCRIPTS_ROOT}/git/git-all.sh "msg"` | add all + commit + push (단순 케이스) |
|
|
21
|
+
| `${CLAUDE_SCRIPTS_ROOT}/git/git-clean-check.sh` | clean 여부 확인 |
|
|
22
22
|
|
|
23
23
|
</scripts>
|
|
24
24
|
|
|
@@ -32,25 +32,25 @@ description: 모든 변경사항 커밋 후 푸시
|
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
34
|
# 1. 상태 확인
|
|
35
|
-
|
|
35
|
+
${CLAUDE_SCRIPTS_ROOT}/git/git-info.sh
|
|
36
36
|
|
|
37
37
|
# 2. 모든 변경사항 커밋 + 푸시
|
|
38
|
-
|
|
38
|
+
${CLAUDE_SCRIPTS_ROOT}/git/git-all.sh "feat: 기능 추가"
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
### 복잡한 케이스 (논리적 분리 필요)
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
44
|
# 1. 상태 확인
|
|
45
|
-
|
|
45
|
+
${CLAUDE_SCRIPTS_ROOT}/git/git-info.sh
|
|
46
46
|
|
|
47
47
|
# 2. 그룹별 커밋
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
${CLAUDE_SCRIPTS_ROOT}/git/git-commit.sh "feat: A 기능" src/a.ts src/a.test.ts
|
|
49
|
+
${CLAUDE_SCRIPTS_ROOT}/git/git-commit.sh "fix: B 버그 수정" src/b.ts
|
|
50
50
|
|
|
51
51
|
# 3. clean 확인 후 푸시
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
${CLAUDE_SCRIPTS_ROOT}/git/git-clean-check.sh
|
|
53
|
+
${CLAUDE_SCRIPTS_ROOT}/git/git-push.sh
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
</workflow>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 타겟 브랜치에 소스 브랜치를 merge 후 push
|
|
3
|
+
argument-hint: <target-branch> <source-branch>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Git Merge Command
|
|
7
|
+
|
|
8
|
+
> 타겟 브랜치에 소스 브랜치를 merge하고 push.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<scripts>
|
|
13
|
+
|
|
14
|
+
## 사용 가능한 스크립트
|
|
15
|
+
|
|
16
|
+
| 스크립트 | 용도 |
|
|
17
|
+
|----------|------|
|
|
18
|
+
| `${CLAUDE_SCRIPTS_ROOT}/git/git-merge.sh <target> <source>` | checkout → merge → push → 원래 브랜치 복귀 |
|
|
19
|
+
|
|
20
|
+
</scripts>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<workflow>
|
|
25
|
+
|
|
26
|
+
## 워크플로우
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# 인자에서 타겟/소스 브랜치 추출 후 실행
|
|
30
|
+
${CLAUDE_SCRIPTS_ROOT}/git/git-merge.sh <target-branch> <source-branch>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**스크립트 동작:**
|
|
34
|
+
1. Working directory clean 확인
|
|
35
|
+
2. `git fetch origin`
|
|
36
|
+
3. 타겟 브랜치 checkout + pull
|
|
37
|
+
4. 소스 브랜치 merge (`--no-edit`)
|
|
38
|
+
5. 타겟 브랜치 push
|
|
39
|
+
6. 원래 브랜치로 복귀
|
|
40
|
+
|
|
41
|
+
</workflow>
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
<examples>
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# deploy/prod에 dev 머지
|
|
49
|
+
${CLAUDE_SCRIPTS_ROOT}/git/git-merge.sh deploy/prod dev
|
|
50
|
+
|
|
51
|
+
# main에 feature/auth 머지
|
|
52
|
+
${CLAUDE_SCRIPTS_ROOT}/git/git-merge.sh main feature/auth
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
</examples>
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
<error_handling>
|
|
60
|
+
|
|
61
|
+
| 상황 | 대응 |
|
|
62
|
+
|------|------|
|
|
63
|
+
| **Working directory dirty** | 커밋 또는 stash 후 재시도 안내 |
|
|
64
|
+
| **Merge conflict** | 수동 해결 안내 (타겟 브랜치에 머물러 있음) |
|
|
65
|
+
| **브랜치 미존재** | 에러 출력 후 종료 |
|
|
66
|
+
|
|
67
|
+
</error_handling>
|
|
@@ -14,10 +14,10 @@ description: 현재 세션에서 수정한 파일만 커밋 후 푸시
|
|
|
14
14
|
|
|
15
15
|
| 스크립트 | 용도 |
|
|
16
16
|
|----------|------|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
17
|
+
| `${CLAUDE_SCRIPTS_ROOT}/git/git-info.sh` | 상태 + diff 요약 출력 |
|
|
18
|
+
| `${CLAUDE_SCRIPTS_ROOT}/git/git-commit.sh "msg" [files]` | Co-Authored-By 포함 커밋 |
|
|
19
|
+
| `${CLAUDE_SCRIPTS_ROOT}/git/git-push.sh` | 안전한 푸시 |
|
|
20
|
+
| `${CLAUDE_SCRIPTS_ROOT}/git/git-clean-check.sh` | clean 여부 확인 |
|
|
21
21
|
|
|
22
22
|
</scripts>
|
|
23
23
|
|
|
@@ -29,13 +29,13 @@ description: 현재 세션에서 수정한 파일만 커밋 후 푸시
|
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
31
|
# 1. 상태 확인
|
|
32
|
-
|
|
32
|
+
${CLAUDE_SCRIPTS_ROOT}/git/git-info.sh
|
|
33
33
|
|
|
34
34
|
# 2. 현재 세션 파일만 선택하여 커밋
|
|
35
|
-
|
|
35
|
+
${CLAUDE_SCRIPTS_ROOT}/git/git-commit.sh "feat: 로그인 기능" src/auth/login.ts src/auth/logout.ts
|
|
36
36
|
|
|
37
37
|
# 3. 푸시
|
|
38
|
-
|
|
38
|
+
${CLAUDE_SCRIPTS_ROOT}/git/git-push.sh
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
</workflow>
|
|
@@ -70,14 +70,14 @@ description: 현재 세션에서 수정한 파일만 커밋 후 푸시
|
|
|
70
70
|
```bash
|
|
71
71
|
# 상황: 로그인 기능 작업 중, 이전 프로필 기능은 미완성
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
${CLAUDE_SCRIPTS_ROOT}/git/git-info.sh
|
|
74
74
|
# modified: src/auth/login.ts (현재 세션)
|
|
75
75
|
# modified: src/auth/logout.ts (현재 세션)
|
|
76
76
|
# modified: src/profile/edit.ts (이전 세션)
|
|
77
77
|
|
|
78
78
|
# ✅ 로그인 관련만 커밋
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
${CLAUDE_SCRIPTS_ROOT}/git/git-commit.sh "feat: 로그인/로그아웃 기능 추가" src/auth/login.ts src/auth/logout.ts
|
|
80
|
+
${CLAUDE_SCRIPTS_ROOT}/git/git-push.sh
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
</example>
|
|
@@ -16,8 +16,8 @@ argument-hint: [파일/디렉토리 경로...]
|
|
|
16
16
|
|
|
17
17
|
| 스크립트 | 용도 |
|
|
18
18
|
|----------|------|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
19
|
+
| `${CLAUDE_SCRIPTS_ROOT}/lint/lint-check.sh` | tsc + eslint 병렬 검사 |
|
|
20
|
+
| `${CLAUDE_SCRIPTS_ROOT}/lint/lint-file.sh [files]` | 특정 파일만 검사 |
|
|
21
21
|
|
|
22
22
|
</scripts>
|
|
23
23
|
|
|
@@ -31,17 +31,17 @@ argument-hint: [파일/디렉토리 경로...]
|
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
33
|
# 1. 병렬 검사 (tsc + eslint 동시)
|
|
34
|
-
|
|
34
|
+
${CLAUDE_SCRIPTS_ROOT}/lint/lint-check.sh
|
|
35
35
|
|
|
36
36
|
# 2. 오류 수정 후 재검사
|
|
37
|
-
|
|
37
|
+
${CLAUDE_SCRIPTS_ROOT}/lint/lint-check.sh
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
### 특정 파일 검사
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
43
|
# 특정 파일만
|
|
44
|
-
|
|
44
|
+
${CLAUDE_SCRIPTS_ROOT}/lint/lint-file.sh src/utils/api.ts src/components/Button.tsx
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
</workflow>
|
|
@@ -16,10 +16,10 @@ argument-hint: [파일/디렉토리 경로...]
|
|
|
16
16
|
|
|
17
17
|
| 스크립트 | 용도 |
|
|
18
18
|
|----------|------|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
19
|
+
| `${CLAUDE_SCRIPTS_ROOT}/deploy/deploy-check.sh` | 전체 검증 (tsc + eslint + build) |
|
|
20
|
+
| `${CLAUDE_SCRIPTS_ROOT}/deploy/build-run.sh` | build만 실행 |
|
|
21
|
+
| `${CLAUDE_SCRIPTS_ROOT}/lint/lint-check.sh` | tsc + eslint 병렬 검사 |
|
|
22
|
+
| `${CLAUDE_SCRIPTS_ROOT}/pm/pm-detect.sh` | package manager 감지 |
|
|
23
23
|
|
|
24
24
|
</scripts>
|
|
25
25
|
|
|
@@ -33,17 +33,17 @@ argument-hint: [파일/디렉토리 경로...]
|
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
35
|
# 한 번에 tsc + eslint + build 검증
|
|
36
|
-
|
|
36
|
+
${CLAUDE_SCRIPTS_ROOT}/deploy/deploy-check.sh
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
### 단계별 검증
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
42
|
# 1. lint 검사
|
|
43
|
-
|
|
43
|
+
${CLAUDE_SCRIPTS_ROOT}/lint/lint-check.sh
|
|
44
44
|
|
|
45
45
|
# 2. 오류 수정 후 build
|
|
46
|
-
|
|
46
|
+
${CLAUDE_SCRIPTS_ROOT}/deploy/build-run.sh
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
</workflow>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Start Ralph Loop in current session"
|
|
3
|
+
argument-hint: "PROMPT [--max-iterations N] [--completion-promise TEXT]"
|
|
4
|
+
allowed-tools: ["Bash(${CLAUDE_SCRIPTS_ROOT}/setup-ralph-loop.sh:*)"]
|
|
5
|
+
hide-from-slash-command-tool: "true"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Ralph Loop Command
|
|
9
|
+
|
|
10
|
+
Execute the setup script to initialize the Ralph loop:
|
|
11
|
+
|
|
12
|
+
```!
|
|
13
|
+
"${CLAUDE_SCRIPTS_ROOT}/setup-ralph-loop.sh" $ARGUMENTS
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Please work on the task. When you try to exit, the Ralph loop will feed the SAME PROMPT back to you for the next iteration. You'll see your previous work in files and git history, allowing you to iterate and improve.
|
|
17
|
+
|
|
18
|
+
CRITICAL RULE: If a completion promise is set, you may ONLY output it when the statement is completely and unequivocally TRUE. Do not output false promises to escape the loop, even if you think you're stuck or should exit for other reasons. The loop is designed to continue until genuine completion.
|
|
@@ -18,10 +18,10 @@ argument-hint: <new-version | +1 | +minor | +major>
|
|
|
18
18
|
|
|
19
19
|
| 스크립트 | 용도 |
|
|
20
20
|
|----------|------|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
21
|
+
| `${CLAUDE_SCRIPTS_ROOT}/version/version-find.sh` | 버전 파일 탐색 (package.json + .version()) |
|
|
22
|
+
| `${CLAUDE_SCRIPTS_ROOT}/version/version-bump.sh <current> <type>` | 새 버전 계산 |
|
|
23
|
+
| `${CLAUDE_SCRIPTS_ROOT}/git/git-commit.sh "msg" [files]` | 커밋 |
|
|
24
|
+
| `${CLAUDE_SCRIPTS_ROOT}/git/git-push.sh` | 푸시 |
|
|
25
25
|
|
|
26
26
|
</scripts>
|
|
27
27
|
|
|
@@ -46,18 +46,18 @@ argument-hint: <new-version | +1 | +minor | +major>
|
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
48
|
# 1. 버전 파일 탐색
|
|
49
|
-
|
|
49
|
+
${CLAUDE_SCRIPTS_ROOT}/version/version-find.sh
|
|
50
50
|
|
|
51
51
|
# 2. 현재 버전 확인 (package.json 읽기)
|
|
52
52
|
|
|
53
53
|
# 3. 새 버전 계산
|
|
54
|
-
|
|
54
|
+
${CLAUDE_SCRIPTS_ROOT}/version/version-bump.sh 1.2.3 +1
|
|
55
55
|
# → 1.2.4
|
|
56
56
|
|
|
57
57
|
# 4. 모든 파일 Edit로 업데이트
|
|
58
58
|
|
|
59
59
|
# 5. 커밋
|
|
60
|
-
|
|
60
|
+
${CLAUDE_SCRIPTS_ROOT}/git/git-commit.sh "chore: 버전 1.2.4로 업데이트" package.json packages/*/package.json
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
</workflow>
|