@yeongjaeyou/claude-code-config 0.15.0 → 0.17.0
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/.claude/agents/code-review-handler.md +203 -0
- package/.claude/agents/issue-resolver.md +123 -0
- package/.claude/agents/python-pro.md +7 -2
- package/.claude/agents/web-researcher.md +5 -1
- package/.claude/commands/ask-deepwiki.md +46 -11
- package/.claude/commands/council.md +144 -36
- package/.claude/commands/gh/auto-review-loop.md +201 -0
- package/.claude/commands/gh/create-issue-label.md +4 -0
- package/.claude/commands/gh/decompose-issue.md +24 -2
- package/.claude/commands/gh/post-merge.md +52 -10
- package/.claude/commands/gh/resolve-and-review.md +69 -0
- package/.claude/commands/gh/resolve-issue.md +3 -0
- package/.claude/commands/tm/convert-prd.md +4 -0
- package/.claude/commands/tm/post-merge.md +7 -1
- package/.claude/commands/tm/resolve-issue.md +4 -0
- package/.claude/commands/tm/sync-to-github.md +4 -0
- package/.claude/settings.json +15 -0
- package/.claude/skills/claude-md-generator/SKILL.md +130 -0
- package/.claude/skills/claude-md-generator/references/examples.md +261 -0
- package/.claude/skills/claude-md-generator/references/templates.md +156 -0
- package/.claude/skills/hook-creator/SKILL.md +88 -0
- package/.claude/skills/hook-creator/references/examples.md +339 -0
- package/.claude/skills/hook-creator/references/hook-events.md +193 -0
- package/.claude/skills/skill-creator/SKILL.md +160 -13
- package/.claude/skills/skill-creator/references/output-patterns.md +82 -0
- package/.claude/skills/skill-creator/references/workflows.md +28 -0
- package/.claude/skills/skill-creator/scripts/package_skill.py +10 -10
- package/.claude/skills/skill-creator/scripts/quick_validate.py +45 -15
- package/.claude/skills/slash-command-creator/SKILL.md +108 -0
- package/.claude/skills/slash-command-creator/references/examples.md +161 -0
- package/.claude/skills/slash-command-creator/references/frontmatter.md +74 -0
- package/.claude/skills/slash-command-creator/scripts/init_command.py +221 -0
- package/.claude/skills/subagent-creator/SKILL.md +127 -0
- package/.claude/skills/subagent-creator/assets/subagent-template.md +31 -0
- package/.claude/skills/subagent-creator/references/available-tools.md +63 -0
- package/.claude/skills/subagent-creator/references/examples.md +213 -0
- package/.claude/skills/youtube-collector/README.md +107 -0
- package/.claude/skills/youtube-collector/SKILL.md +158 -0
- package/.claude/skills/youtube-collector/references/data-schema.md +110 -0
- package/.claude/skills/youtube-collector/scripts/collect_videos.py +304 -0
- package/.claude/skills/youtube-collector/scripts/fetch_transcript.py +138 -0
- package/.claude/skills/youtube-collector/scripts/fetch_videos.py +229 -0
- package/.claude/skills/youtube-collector/scripts/register_channel.py +247 -0
- package/.claude/skills/youtube-collector/scripts/setup_api_key.py +151 -0
- package/package.json +1 -1
|
@@ -23,11 +23,53 @@ Inspired by Andrej Karpathy's LLM Council: query multiple AI models with the sam
|
|
|
23
23
|
3. **Quick mode**: `/council --quick What's the best approach?`
|
|
24
24
|
|
|
25
25
|
**Flags:**
|
|
26
|
-
- `--quick`: Quick mode
|
|
26
|
+
- `--quick`: Quick mode (see below)
|
|
27
27
|
|
|
28
28
|
**Default behavior (no flags):**
|
|
29
|
-
- Maximum reasoning depth (Codex: xhigh
|
|
29
|
+
- Maximum reasoning depth (Codex: reasoningEffort=xhigh, model=gpt-5.1-codex-max)
|
|
30
30
|
- Full multi-round deliberation (up to 3 rounds)
|
|
31
|
+
- YAML schema enforced
|
|
32
|
+
|
|
33
|
+
**Quick mode (`--quick`):**
|
|
34
|
+
- All 4 models queried (Opus, Sonnet, Codex, Gemini)
|
|
35
|
+
- Single round only (Round 1 -> direct Synthesis, no Round 1.5 analysis)
|
|
36
|
+
- YAML schema not enforced (free-form responses accepted)
|
|
37
|
+
- Codex: reasoningEffort=high (instead of xhigh)
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Pre-flight Check
|
|
42
|
+
|
|
43
|
+
Before querying models, verify environment parity:
|
|
44
|
+
|
|
45
|
+
**1. CLI Installation:**
|
|
46
|
+
```bash
|
|
47
|
+
command -v claude && echo "Claude Code: OK" || echo "Claude Code: Missing"
|
|
48
|
+
command -v codex && echo "Codex CLI: OK" || echo "Codex CLI: Missing"
|
|
49
|
+
command -v gemini && echo "Gemini CLI: OK" || echo "Gemini CLI: Missing"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**2. Guidelines Files:**
|
|
53
|
+
```bash
|
|
54
|
+
[ -f ./CLAUDE.md ] && echo "CLAUDE.md: OK" || echo "CLAUDE.md: Missing"
|
|
55
|
+
[ -f ./AGENTS.md ] && echo "AGENTS.md: OK" || echo "AGENTS.md: Missing"
|
|
56
|
+
[ -f ./GEMINI.md ] && echo "GEMINI.md: OK" || echo "GEMINI.md: Missing"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**3. MCP Configuration:**
|
|
60
|
+
| CLI | Config Location | Check Command |
|
|
61
|
+
|-----|-----------------|---------------|
|
|
62
|
+
| Claude Code | `.mcp.json`, `~/.claude.json` | `claude mcp list` |
|
|
63
|
+
| Codex CLI | `~/.codex/config.toml` | `codex mcp --help` |
|
|
64
|
+
| Gemini CLI | `~/.gemini/settings.json`, `.gemini/settings.json` | `gemini mcp list` |
|
|
65
|
+
|
|
66
|
+
**Warning conditions (proceed with caution):**
|
|
67
|
+
- Guidelines file missing: model runs without project context
|
|
68
|
+
- MCP not configured: model has limited tool access
|
|
69
|
+
- CLI not installed: model excluded from council
|
|
70
|
+
|
|
71
|
+
**If warnings detected:**
|
|
72
|
+
Use AskUserQuestion to confirm whether to proceed or fix issues first.
|
|
31
73
|
|
|
32
74
|
---
|
|
33
75
|
|
|
@@ -41,15 +83,14 @@ council_member:
|
|
|
41
83
|
response:
|
|
42
84
|
summary: "1-2 sentence core answer"
|
|
43
85
|
detailed_answer: "full response content"
|
|
44
|
-
confidence: 0.0-1.0
|
|
45
86
|
key_points:
|
|
46
87
|
- point: "key insight"
|
|
47
88
|
evidence: "file:line or reasoning"
|
|
48
|
-
code_references:
|
|
89
|
+
code_references: # optional
|
|
49
90
|
- file: "/absolute/path/to/file.py"
|
|
50
91
|
lines: "42-58"
|
|
51
92
|
context: "why this is relevant"
|
|
52
|
-
caveats:
|
|
93
|
+
caveats: # optional
|
|
53
94
|
- "potential limitation or edge case"
|
|
54
95
|
# Round 2+ additional fields
|
|
55
96
|
gaps:
|
|
@@ -72,7 +113,6 @@ Before querying models, collect relevant context:
|
|
|
72
113
|
```
|
|
73
114
|
- git status / git diff (current changes)
|
|
74
115
|
- Directory structure (tree -L 2)
|
|
75
|
-
- Files mentioned in conversation (Read/Edit history)
|
|
76
116
|
|
|
77
117
|
Model-specific guidelines (project root):
|
|
78
118
|
- ./CLAUDE.md (Claude Opus/Sonnet)
|
|
@@ -80,6 +120,38 @@ Model-specific guidelines (project root):
|
|
|
80
120
|
- ./gemini.md (Gemini)
|
|
81
121
|
```
|
|
82
122
|
|
|
123
|
+
**Conditional Code Exploration:**
|
|
124
|
+
|
|
125
|
+
When relevant files are unclear from the question, spawn Explore agents to discover them:
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
Trigger conditions:
|
|
129
|
+
- Question mentions code/architecture/structure without specific files
|
|
130
|
+
- Question asks about "this", "the code", "current implementation" ambiguously
|
|
131
|
+
- UI/UX questions that need component/style file identification
|
|
132
|
+
|
|
133
|
+
Skip exploration when:
|
|
134
|
+
- User provides specific file paths or permalinks
|
|
135
|
+
- Question is conceptual (no code context needed)
|
|
136
|
+
- Files are obvious from recent git diff
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
Task(subagent_type="Explore", run_in_background: true):
|
|
141
|
+
prompt: |
|
|
142
|
+
Find files related to: [USER_QUESTION]
|
|
143
|
+
|
|
144
|
+
Return results in this format:
|
|
145
|
+
- /absolute/path/file.ext:LINE-LINE (brief context)
|
|
146
|
+
|
|
147
|
+
Focus on:
|
|
148
|
+
- Direct implementation files
|
|
149
|
+
- Related tests
|
|
150
|
+
- Configuration if relevant
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
After exploration, use discovered paths in the File Path Inclusion format below.
|
|
154
|
+
|
|
83
155
|
**File Path Inclusion (MANDATORY format):**
|
|
84
156
|
```
|
|
85
157
|
Relevant files for this question:
|
|
@@ -95,7 +167,7 @@ Use your file access tools to READ these files directly.
|
|
|
95
167
|
|-------|-------------------|
|
|
96
168
|
| Claude Opus/Sonnet | Read tool (images supported) |
|
|
97
169
|
| Codex | sandbox read-only file access |
|
|
98
|
-
| Gemini |
|
|
170
|
+
| Gemini | MCP tools or Bash file read (MCP supported since 2025) |
|
|
99
171
|
|
|
100
172
|
**Sensitive Data Filtering (exclude from prompts):**
|
|
101
173
|
```
|
|
@@ -114,6 +186,41 @@ Directories: node_modules/, __pycache__/, .git/
|
|
|
114
186
|
|
|
115
187
|
---
|
|
116
188
|
|
|
189
|
+
## Progress Tracking
|
|
190
|
+
|
|
191
|
+
Use TodoWrite to show progress at each stage:
|
|
192
|
+
|
|
193
|
+
**Round 1 start:**
|
|
194
|
+
```yaml
|
|
195
|
+
todos:
|
|
196
|
+
- content: "[Council] Query Opus"
|
|
197
|
+
status: "in_progress"
|
|
198
|
+
activeForm: "Querying Opus"
|
|
199
|
+
- content: "[Council] Query Sonnet"
|
|
200
|
+
status: "in_progress"
|
|
201
|
+
activeForm: "Querying Sonnet"
|
|
202
|
+
- content: "[Council] Query Codex"
|
|
203
|
+
status: "in_progress"
|
|
204
|
+
activeForm: "Querying Codex"
|
|
205
|
+
- content: "[Council] Query Gemini"
|
|
206
|
+
status: "in_progress"
|
|
207
|
+
activeForm: "Querying Gemini"
|
|
208
|
+
- content: "[Council] Analyze responses"
|
|
209
|
+
status: "pending"
|
|
210
|
+
activeForm: "Analyzing responses"
|
|
211
|
+
- content: "[Council] Synthesize"
|
|
212
|
+
status: "pending"
|
|
213
|
+
activeForm: "Synthesizing"
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**Update rules:**
|
|
217
|
+
- Model response received -> mark that model's todo as "completed"
|
|
218
|
+
- All models done -> "[Council] Analyze responses" to "in_progress"
|
|
219
|
+
- Round 2 needed -> add re-query todos for specific models
|
|
220
|
+
- Analysis done -> "[Council] Synthesize" to "in_progress"
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
117
224
|
## Execution
|
|
118
225
|
|
|
119
226
|
### Round 1: Collect Initial Responses
|
|
@@ -160,7 +267,7 @@ Task(subagent_type="general-purpose", run_in_background: true):
|
|
|
160
267
|
You are participating in an LLM Council deliberation as Codex.
|
|
161
268
|
|
|
162
269
|
## Tool Usage
|
|
163
|
-
Use
|
|
270
|
+
Use mcp__codex-cli__codex tool with:
|
|
164
271
|
- sandbox: "read-only"
|
|
165
272
|
- workingDirectory: "{PROJECT_ROOT}"
|
|
166
273
|
- reasoningEffort: "xhigh" (or "high" with --quick)
|
|
@@ -196,6 +303,8 @@ Task(subagent_type="general-purpose", run_in_background: true):
|
|
|
196
303
|
[GEMINI_PROMPT_WITH_CONTEXT]
|
|
197
304
|
EOF
|
|
198
305
|
```
|
|
306
|
+
Note: Gemini CLI supports MCP (since 2025). If MCP is configured,
|
|
307
|
+
Gemini can access project files directly via MCP tools.
|
|
199
308
|
|
|
200
309
|
## Guidelines
|
|
201
310
|
Read and follow ./gemini.md project guidelines.
|
|
@@ -204,8 +313,8 @@ Task(subagent_type="general-purpose", run_in_background: true):
|
|
|
204
313
|
## Question
|
|
205
314
|
[USER_QUESTION]
|
|
206
315
|
|
|
207
|
-
## Context Files (
|
|
208
|
-
[
|
|
316
|
+
## Context Files (READ directly using exact paths)
|
|
317
|
+
[FILE_LIST_WITH_LINE_NUMBERS]
|
|
209
318
|
|
|
210
319
|
## Instructions
|
|
211
320
|
Parse Gemini's response and return structured YAML following the schema.
|
|
@@ -232,15 +341,15 @@ Skipping Round 1.5 defeats the purpose of multi-round deliberation.
|
|
|
232
341
|
|
|
233
342
|
**1. Anonymize Responses:**
|
|
234
343
|
```
|
|
235
|
-
1.
|
|
236
|
-
2.
|
|
237
|
-
3. Create internal mapping:
|
|
344
|
+
1. Assign labels in response arrival order: Response A, B, C, D
|
|
345
|
+
2. Create internal mapping:
|
|
238
346
|
label_to_model = {
|
|
239
|
-
"Response A": "
|
|
240
|
-
"Response B": "
|
|
241
|
-
"Response C": "
|
|
242
|
-
"Response D": "
|
|
347
|
+
"Response A": "[first arrived]",
|
|
348
|
+
"Response B": "[second arrived]",
|
|
349
|
+
"Response C": "[third arrived]",
|
|
350
|
+
"Response D": "[fourth arrived]"
|
|
243
351
|
}
|
|
352
|
+
3. Present responses by label only (hide model names until synthesis)
|
|
244
353
|
```
|
|
245
354
|
|
|
246
355
|
**2. Gap Analysis:**
|
|
@@ -271,16 +380,17 @@ conflicts_detected:
|
|
|
271
380
|
**4. Convergence Check (REQUIRED before synthesis):**
|
|
272
381
|
```yaml
|
|
273
382
|
convergence_status:
|
|
274
|
-
|
|
275
|
-
new_information_ratio: 0.15
|
|
383
|
+
agreement_count: 3 # models with same core conclusion
|
|
276
384
|
gaps_remaining: 2
|
|
277
385
|
conflicts_remaining: 1
|
|
278
386
|
decision: "proceed_to_round_2" | "terminate_and_synthesize"
|
|
279
387
|
```
|
|
280
388
|
|
|
281
389
|
**Decision logic:**
|
|
282
|
-
- If `
|
|
390
|
+
- If `agreement_count >= 3` → `terminate_and_synthesize` (strong consensus)
|
|
391
|
+
- If `gaps_remaining == 0` AND `conflicts_remaining == 0` → `terminate_and_synthesize`
|
|
283
392
|
- If `conflicts_remaining > 0` AND round < 3 → `proceed_to_round_2`
|
|
393
|
+
- If `gaps_remaining > 0` AND round < 3 → `proceed_to_round_2`
|
|
284
394
|
- Otherwise → `terminate_and_synthesize`
|
|
285
395
|
|
|
286
396
|
### Round 2: Targeted Re-queries (Conditional)
|
|
@@ -292,11 +402,11 @@ If convergence criteria not met, re-query only models with gaps/conflicts:
|
|
|
292
402
|
## Previous Round Summary
|
|
293
403
|
Round 1 produced the following positions:
|
|
294
404
|
|
|
295
|
-
### Response A
|
|
405
|
+
### Response A
|
|
296
406
|
- Position: [summary]
|
|
297
407
|
- Key points: [list]
|
|
298
408
|
|
|
299
|
-
### Response B
|
|
409
|
+
### Response B
|
|
300
410
|
- Position: [summary]
|
|
301
411
|
- Key points: [list]
|
|
302
412
|
|
|
@@ -317,7 +427,6 @@ Please address specifically:
|
|
|
317
427
|
2. [specific gap or conflict to resolve]
|
|
318
428
|
|
|
319
429
|
Provide evidence and reasoning for your position.
|
|
320
|
-
Update your confidence score based on new information.
|
|
321
430
|
|
|
322
431
|
## Output (YAML format required)
|
|
323
432
|
[COUNCIL_MEMBER_SCHEMA with gaps/conflicts fields]
|
|
@@ -362,10 +471,9 @@ After convergence or max rounds:
|
|
|
362
471
|
### Soft Limits (Convergence - any triggers termination)
|
|
363
472
|
| Condition | Threshold |
|
|
364
473
|
|-----------|-----------|
|
|
365
|
-
|
|
|
366
|
-
| New information ratio | < 10% |
|
|
474
|
+
| Strong consensus | 3+ models agree on core conclusion |
|
|
367
475
|
| All gaps resolved | 0 remaining |
|
|
368
|
-
|
|
|
476
|
+
| All conflicts resolved | 0 remaining |
|
|
369
477
|
| Conflicts irreconcilable | Cannot be resolved with more queries |
|
|
370
478
|
|
|
371
479
|
---
|
|
@@ -387,29 +495,29 @@ After convergence or max rounds:
|
|
|
387
495
|
|
|
388
496
|
### Individual Responses (Anonymized)
|
|
389
497
|
|
|
390
|
-
#### Response A
|
|
498
|
+
#### Response A
|
|
391
499
|
[Content]
|
|
392
500
|
|
|
393
501
|
**Key Points:**
|
|
394
502
|
- [point 1] (evidence: file:line)
|
|
395
503
|
- [point 2] (evidence: file:line)
|
|
396
504
|
|
|
397
|
-
#### Response B
|
|
505
|
+
#### Response B
|
|
398
506
|
[Content]
|
|
399
507
|
|
|
400
|
-
#### Response C
|
|
508
|
+
#### Response C
|
|
401
509
|
[Content]
|
|
402
510
|
|
|
403
|
-
#### Response D
|
|
511
|
+
#### Response D
|
|
404
512
|
[Content]
|
|
405
513
|
|
|
406
514
|
### Model Reveal
|
|
407
|
-
| Label | Model |
|
|
408
|
-
|
|
409
|
-
| Response A | codex |
|
|
410
|
-
| Response B | opus |
|
|
411
|
-
| Response C | sonnet |
|
|
412
|
-
| Response D | gemini |
|
|
515
|
+
| Label | Model |
|
|
516
|
+
|-------|-------|
|
|
517
|
+
| Response A | codex |
|
|
518
|
+
| Response B | opus |
|
|
519
|
+
| Response C | sonnet |
|
|
520
|
+
| Response D | gemini |
|
|
413
521
|
|
|
414
522
|
### Coordinator Analysis
|
|
415
523
|
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Automatically fix CodeRabbit PR review comments until resolved
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Auto PR Review Loop
|
|
6
|
+
|
|
7
|
+
Automatically fix and push until CodeRabbit review comments reach zero.
|
|
8
|
+
|
|
9
|
+
## Arguments
|
|
10
|
+
|
|
11
|
+
`$ARGUMENTS` parsing:
|
|
12
|
+
- **No arguments**: Use current branch's PR
|
|
13
|
+
- **PR number**: `/gh:auto-review-loop 123` - Specify PR
|
|
14
|
+
|
|
15
|
+
## Safety Limits
|
|
16
|
+
|
|
17
|
+
- **MAX_ITERATIONS**: 10 (prevent infinite loops)
|
|
18
|
+
- **POLL_INTERVAL**: 30 seconds (API rate limit consideration)
|
|
19
|
+
- **POLL_TIMEOUT**: 300 seconds (max wait time for review)
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
### 1. Get PR Info
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Get PR number and repo info
|
|
27
|
+
PR_NUMBER=${ARGUMENTS:-$(gh pr view --json number -q .number 2>/dev/null)}
|
|
28
|
+
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
|
|
29
|
+
OWNER=$(echo "$REPO" | cut -d'/' -f1)
|
|
30
|
+
REPO_NAME=$(echo "$REPO" | cut -d'/' -f2)
|
|
31
|
+
|
|
32
|
+
echo "Target PR: #${PR_NUMBER} in ${REPO}"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 2. Start Iteration Loop
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
MAX_ITERATIONS=10
|
|
39
|
+
ITERATION=0
|
|
40
|
+
|
|
41
|
+
while [ $ITERATION -lt $MAX_ITERATIONS ]; do
|
|
42
|
+
ITERATION=$((ITERATION + 1))
|
|
43
|
+
echo "=== Iteration $ITERATION/$MAX_ITERATIONS ==="
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 3. Poll for Unresolved CodeRabbit Comments
|
|
47
|
+
|
|
48
|
+
Use GraphQL API with file-based query (inline `$` causes bash variable expansion issues):
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Timeout settings: first iteration waits longer for initial review
|
|
52
|
+
POLL_TIMEOUT_INITIAL=300 # First iteration: 5 minutes
|
|
53
|
+
POLL_TIMEOUT_SUBSEQUENT=120 # Subsequent iterations: 2 minutes (wait for new review)
|
|
54
|
+
POLL_INTERVAL=30
|
|
55
|
+
MIN_WAIT_BEFORE_EXIT=60 # Minimum wait before declaring "all resolved"
|
|
56
|
+
|
|
57
|
+
if [ $ITERATION -eq 1 ]; then
|
|
58
|
+
CURRENT_TIMEOUT=$POLL_TIMEOUT_INITIAL
|
|
59
|
+
else
|
|
60
|
+
CURRENT_TIMEOUT=$POLL_TIMEOUT_SUBSEQUENT
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
ELAPSED=0
|
|
64
|
+
|
|
65
|
+
# Create GraphQL query file (avoids $ variable expansion in bash)
|
|
66
|
+
cat > /tmp/gh_review_query.graphql << 'GRAPHQL'
|
|
67
|
+
query($owner: String!, $repo: String!, $pr: Int!) {
|
|
68
|
+
repository(owner: $owner, name: $repo) {
|
|
69
|
+
pullRequest(number: $pr) {
|
|
70
|
+
reviewThreads(first: 100) {
|
|
71
|
+
nodes {
|
|
72
|
+
isResolved
|
|
73
|
+
path
|
|
74
|
+
line
|
|
75
|
+
comments(first: 1) {
|
|
76
|
+
nodes {
|
|
77
|
+
author { login }
|
|
78
|
+
body
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
GRAPHQL
|
|
87
|
+
|
|
88
|
+
echo "Waiting for CodeRabbit review... (timeout: ${CURRENT_TIMEOUT}s)"
|
|
89
|
+
while [ $ELAPSED -lt $CURRENT_TIMEOUT ]; do
|
|
90
|
+
# Query unresolved review threads from CodeRabbit
|
|
91
|
+
# Filter: unresolved + coderabbit + NOT nitpick (actionable only)
|
|
92
|
+
UNRESOLVED=$(gh api graphql \
|
|
93
|
+
-F query=@/tmp/gh_review_query.graphql \
|
|
94
|
+
-f owner="$OWNER" -f repo="$REPO_NAME" -F pr="$PR_NUMBER" \
|
|
95
|
+
--jq '[.data.repository.pullRequest.reviewThreads.nodes[] |
|
|
96
|
+
select(.isResolved == false) |
|
|
97
|
+
select(.comments.nodes[0].author.login | contains("coderabbit")) |
|
|
98
|
+
select(.comments.nodes[0].body | (contains("<!-- nitpick -->") or contains("[nitpick]")) | not)] | length')
|
|
99
|
+
|
|
100
|
+
if [ "$UNRESOLVED" -gt 0 ]; then
|
|
101
|
+
echo "Found $UNRESOLVED unresolved CodeRabbit comments"
|
|
102
|
+
break
|
|
103
|
+
fi
|
|
104
|
+
|
|
105
|
+
# For subsequent iterations: require minimum wait before exit
|
|
106
|
+
if [ $ITERATION -gt 1 ] && [ $ELAPSED -ge $MIN_WAIT_BEFORE_EXIT ]; then
|
|
107
|
+
echo "No new comments after ${MIN_WAIT_BEFORE_EXIT}s wait. All resolved!"
|
|
108
|
+
exit 0
|
|
109
|
+
fi
|
|
110
|
+
|
|
111
|
+
sleep $POLL_INTERVAL
|
|
112
|
+
ELAPSED=$((ELAPSED + POLL_INTERVAL))
|
|
113
|
+
echo "Still waiting... ($ELAPSED/$CURRENT_TIMEOUT seconds)"
|
|
114
|
+
done
|
|
115
|
+
|
|
116
|
+
# Handle timeout
|
|
117
|
+
if [ "$UNRESOLVED" -eq 0 ]; then
|
|
118
|
+
if [ $ITERATION -eq 1 ]; then
|
|
119
|
+
echo "No CodeRabbit review received within timeout. Exiting."
|
|
120
|
+
exit 0
|
|
121
|
+
else
|
|
122
|
+
echo "All CodeRabbit comments resolved!"
|
|
123
|
+
exit 0
|
|
124
|
+
fi
|
|
125
|
+
fi
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### 4. Extract Unresolved Comments
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Extract actionable comments only (exclude nitpick)
|
|
132
|
+
REVIEW_CONTENT=$(gh api graphql \
|
|
133
|
+
-F query=@/tmp/gh_review_query.graphql \
|
|
134
|
+
-f owner="$OWNER" -f repo="$REPO_NAME" -F pr="$PR_NUMBER" \
|
|
135
|
+
--jq '.data.repository.pullRequest.reviewThreads.nodes[] |
|
|
136
|
+
select(.isResolved == false) |
|
|
137
|
+
select(.comments.nodes[0].author.login | contains("coderabbit")) |
|
|
138
|
+
select(.comments.nodes[0].body | (contains("<!-- nitpick -->") or contains("[nitpick]")) | not) |
|
|
139
|
+
"File: \(.path)\nLine: \(.line)\n\nComment:\n\(.comments.nodes[0].body)\n\n---"')
|
|
140
|
+
|
|
141
|
+
echo "=== Unresolved CodeRabbit Comments ==="
|
|
142
|
+
echo "$REVIEW_CONTENT"
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### 5. Apply Fixes
|
|
146
|
+
|
|
147
|
+
Read `.claude/commands/code-review.md` and process each comment following its Auto-fix vs Checklist criteria.
|
|
148
|
+
|
|
149
|
+
### 6. Commit & Push
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# Check for changes
|
|
153
|
+
if [ -n "$(git status --porcelain)" ]; then
|
|
154
|
+
git add -u
|
|
155
|
+
git commit -m "fix: apply CodeRabbit review (iteration $ITERATION)"
|
|
156
|
+
git push
|
|
157
|
+
echo "Changes pushed. Waiting for next review..."
|
|
158
|
+
sleep 60 # Wait for new review
|
|
159
|
+
else
|
|
160
|
+
echo "No changes to commit"
|
|
161
|
+
break
|
|
162
|
+
fi
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### 7. Loop Termination
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
done # end while loop
|
|
169
|
+
|
|
170
|
+
if [ $ITERATION -ge $MAX_ITERATIONS ]; then
|
|
171
|
+
echo "Max iterations reached. Manual review may be required."
|
|
172
|
+
exit 1
|
|
173
|
+
fi
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Output Format
|
|
177
|
+
|
|
178
|
+
Each iteration outputs:
|
|
179
|
+
```
|
|
180
|
+
=== Iteration N/10 ===
|
|
181
|
+
- Unresolved comments: X
|
|
182
|
+
- Auto-fixed: Y
|
|
183
|
+
- Requires confirmation: Z
|
|
184
|
+
- Pushed commit: abc1234
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Error Handling
|
|
188
|
+
|
|
189
|
+
| Error | Response |
|
|
190
|
+
|-------|----------|
|
|
191
|
+
| PR not found | Exit with error message |
|
|
192
|
+
| API rate limit | Increase poll interval, retry |
|
|
193
|
+
| No CodeRabbit review | Exit after timeout |
|
|
194
|
+
| Git push failed | Report error, stop iteration |
|
|
195
|
+
|
|
196
|
+
## Guidelines
|
|
197
|
+
|
|
198
|
+
- Follow `@CLAUDE.md` project conventions
|
|
199
|
+
- Use `AskUserQuestion` for architecture/logic changes
|
|
200
|
+
- Never auto-fix business logic without confirmation
|
|
201
|
+
- Commit only issue-relevant files (no `git add -A`)
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Decompose Work
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
## Decompose Work
|
|
2
6
|
|
|
3
7
|
Break down large work items into manageable, independent issues. Follow project guidelines in `@CLAUDE.md`.
|
|
@@ -65,8 +69,10 @@ Examples (vary by project, for reference only):
|
|
|
65
69
|
- `path/filename` - Change description
|
|
66
70
|
|
|
67
71
|
**Completion criteria**:
|
|
68
|
-
- [ ]
|
|
69
|
-
- [ ]
|
|
72
|
+
- [ ] Implementation complete (all tasks checked)
|
|
73
|
+
- [ ] Execution verified (no runtime errors)
|
|
74
|
+
- [ ] Tests pass (if applicable)
|
|
75
|
+
- [ ] Added to demo page (for UI components, if applicable)
|
|
70
76
|
|
|
71
77
|
**Dependencies**:
|
|
72
78
|
- [ ] None or prerequisite issue #number
|
|
@@ -167,3 +173,19 @@ MCP: none
|
|
|
167
173
|
Skills: ...
|
|
168
174
|
MCP: ...
|
|
169
175
|
```
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Verification Guidelines
|
|
180
|
+
|
|
181
|
+
이슈 작업 완료 시 반드시 실행 검증 수행:
|
|
182
|
+
|
|
183
|
+
| 작업 유형 | 검증 방법 |
|
|
184
|
+
|-----------|-----------|
|
|
185
|
+
| Python 코드 | `python -m py_compile file.py` + 실제 실행 |
|
|
186
|
+
| TypeScript/JS | `tsc --noEmit` 또는 빌드 |
|
|
187
|
+
| API/서버 | 엔드포인트 호출 테스트 |
|
|
188
|
+
| CLI 도구 | 기본 명령어 실행 |
|
|
189
|
+
| 설정 파일 | 관련 도구로 로드 확인 |
|
|
190
|
+
|
|
191
|
+
**파일만 생성하고 실행 검증 없이 완료 처리 금지**
|
|
@@ -54,16 +54,37 @@ Perform branch cleanup and CLAUDE.md updates after a PR has been merged. Follow
|
|
|
54
54
|
6. **Analyze and Update Configuration Files**
|
|
55
55
|
- Check which configuration files exist:
|
|
56
56
|
- `CLAUDE.md` - Claude Code specific instructions
|
|
57
|
-
- `AGENTS.md` - Cross-tool AI coding agent instructions
|
|
57
|
+
- `AGENTS.md` - Cross-tool AI coding agent instructions
|
|
58
58
|
- `GEMINI.md` - Google Gemini CLI specific instructions
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
59
|
+
- `.claude/rules/*.md` - Modular rule files
|
|
60
|
+
|
|
61
|
+
- **Placement Rules** (applies to all config files):
|
|
62
|
+
|
|
63
|
+
| Content Type | Placement |
|
|
64
|
+
|--------------|-----------|
|
|
65
|
+
| Project-wide constraints | Golden Rules > Immutable |
|
|
66
|
+
| Project-wide recommendations | Golden Rules > Do's |
|
|
67
|
+
| Project-wide prohibitions | Golden Rules > Don'ts |
|
|
68
|
+
| Module-specific rules | Delegate to `.claude/rules/[module].md` |
|
|
69
|
+
| New commands | Commands section |
|
|
70
|
+
| New module references | Modular Rules section |
|
|
71
|
+
|
|
72
|
+
- **Content Removal**:
|
|
73
|
+
- Temporary instructions (e.g., `TODO: remove after #N`)
|
|
74
|
+
- Resolved known issues
|
|
75
|
+
- Workaround descriptions for fixed bugs
|
|
76
|
+
|
|
77
|
+
- **Content Addition**:
|
|
78
|
+
- Module-specific rule -> propose `.claude/rules/[module].md` creation/update
|
|
79
|
+
- Project-wide rule -> add to appropriate Golden Rules subsection
|
|
80
|
+
- New module documented -> add `See @.claude/rules/[module].md` reference
|
|
81
|
+
|
|
82
|
+
- **Modular Rule Files** (.claude/rules/*.md):
|
|
83
|
+
- Check if relevant module file exists
|
|
84
|
+
- Propose path-specific rules with frontmatter: `paths: src/[module]/**/*.py`
|
|
85
|
+
- Follow structure: Role, Key Components, Do's, Don'ts
|
|
86
|
+
- **Always confirm with user before creating new rule files**
|
|
87
|
+
|
|
67
88
|
- Present proposal to user for confirmation before applying
|
|
68
89
|
|
|
69
90
|
7. **Commit Changes (Optional)**
|
|
@@ -75,7 +96,28 @@ Perform branch cleanup and CLAUDE.md updates after a PR has been merged. Follow
|
|
|
75
96
|
|
|
76
97
|
## Configuration File Update Guide
|
|
77
98
|
|
|
78
|
-
The following guidelines apply to CLAUDE.md, AGENTS.md,
|
|
99
|
+
The following guidelines apply to CLAUDE.md, AGENTS.md, GEMINI.md, and `.claude/rules/*.md`:
|
|
100
|
+
|
|
101
|
+
### Expected File Structure
|
|
102
|
+
|
|
103
|
+
**Root Config (CLAUDE.md, AGENTS.md, GEMINI.md)**:
|
|
104
|
+
1. Project Context - Business goal + tech stack (1-2 sentences)
|
|
105
|
+
2. Commands - Package manager and run commands
|
|
106
|
+
3. Golden Rules - Immutable / Do's / Don'ts
|
|
107
|
+
4. Modular Rules - `See @.claude/rules/[module].md` references
|
|
108
|
+
5. Project-Specific - Data locations, tracking, etc.
|
|
109
|
+
|
|
110
|
+
**Modular Rules (.claude/rules/*.md)**:
|
|
111
|
+
```markdown
|
|
112
|
+
---
|
|
113
|
+
paths: src/[module]/**/*.py # Optional: conditional loading
|
|
114
|
+
---
|
|
115
|
+
# [Module] Rules
|
|
116
|
+
Role description (1-2 lines)
|
|
117
|
+
## Key Components
|
|
118
|
+
## Do's
|
|
119
|
+
## Don'ts
|
|
120
|
+
```
|
|
79
121
|
|
|
80
122
|
### Examples of Content to Remove
|
|
81
123
|
- Temporary notes like `TODO: remove after #123 is resolved`
|