@yeongjaeyou/claude-code-config 0.16.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.
Files changed (44) hide show
  1. package/.claude/agents/code-review-handler.md +203 -0
  2. package/.claude/agents/issue-resolver.md +123 -0
  3. package/.claude/agents/python-pro.md +7 -2
  4. package/.claude/agents/web-researcher.md +5 -1
  5. package/.claude/commands/ask-deepwiki.md +46 -11
  6. package/.claude/commands/gh/auto-review-loop.md +201 -0
  7. package/.claude/commands/gh/create-issue-label.md +4 -0
  8. package/.claude/commands/gh/decompose-issue.md +24 -2
  9. package/.claude/commands/gh/post-merge.md +52 -10
  10. package/.claude/commands/gh/resolve-and-review.md +69 -0
  11. package/.claude/commands/gh/resolve-issue.md +3 -0
  12. package/.claude/commands/tm/convert-prd.md +4 -0
  13. package/.claude/commands/tm/post-merge.md +7 -1
  14. package/.claude/commands/tm/resolve-issue.md +4 -0
  15. package/.claude/commands/tm/sync-to-github.md +4 -0
  16. package/.claude/settings.json +15 -0
  17. package/.claude/skills/claude-md-generator/SKILL.md +130 -0
  18. package/.claude/skills/claude-md-generator/references/examples.md +261 -0
  19. package/.claude/skills/claude-md-generator/references/templates.md +156 -0
  20. package/.claude/skills/hook-creator/SKILL.md +88 -0
  21. package/.claude/skills/hook-creator/references/examples.md +339 -0
  22. package/.claude/skills/hook-creator/references/hook-events.md +193 -0
  23. package/.claude/skills/skill-creator/SKILL.md +160 -13
  24. package/.claude/skills/skill-creator/references/output-patterns.md +82 -0
  25. package/.claude/skills/skill-creator/references/workflows.md +28 -0
  26. package/.claude/skills/skill-creator/scripts/package_skill.py +10 -10
  27. package/.claude/skills/skill-creator/scripts/quick_validate.py +45 -15
  28. package/.claude/skills/slash-command-creator/SKILL.md +108 -0
  29. package/.claude/skills/slash-command-creator/references/examples.md +161 -0
  30. package/.claude/skills/slash-command-creator/references/frontmatter.md +74 -0
  31. package/.claude/skills/slash-command-creator/scripts/init_command.py +221 -0
  32. package/.claude/skills/subagent-creator/SKILL.md +127 -0
  33. package/.claude/skills/subagent-creator/assets/subagent-template.md +31 -0
  34. package/.claude/skills/subagent-creator/references/available-tools.md +63 -0
  35. package/.claude/skills/subagent-creator/references/examples.md +213 -0
  36. package/.claude/skills/youtube-collector/README.md +107 -0
  37. package/.claude/skills/youtube-collector/SKILL.md +158 -0
  38. package/.claude/skills/youtube-collector/references/data-schema.md +110 -0
  39. package/.claude/skills/youtube-collector/scripts/collect_videos.py +304 -0
  40. package/.claude/skills/youtube-collector/scripts/fetch_transcript.py +138 -0
  41. package/.claude/skills/youtube-collector/scripts/fetch_videos.py +229 -0
  42. package/.claude/skills/youtube-collector/scripts/register_channel.py +247 -0
  43. package/.claude/skills/youtube-collector/scripts/setup_api_key.py +151 -0
  44. package/package.json +1 -1
@@ -0,0 +1,203 @@
1
+ ---
2
+ name: code-review-handler
3
+ description: Handle CodeRabbit PR review comments autonomously. Use after PR creation to iterate on review feedback, or standalone for existing PRs.
4
+ model: inherit
5
+ ---
6
+
7
+ You are an autonomous code review handler for CodeRabbit comments.
8
+
9
+ ## Prerequisites
10
+
11
+ Read `.claude/guidelines/work-guidelines.md` before starting.
12
+
13
+ ## Input
14
+
15
+ Receive via prompt:
16
+ - PR number (required)
17
+ - Repository in owner/repo format (optional, auto-detect if omitted)
18
+
19
+ ## Safety Limits
20
+
21
+ - MAX_ITERATIONS: 10
22
+ - POLL_INTERVAL: 30 seconds
23
+ - POLL_TIMEOUT: 300 seconds (only when waiting for initial review)
24
+
25
+ ## Workflow
26
+
27
+ ### 1. Get PR Info
28
+
29
+ ```bash
30
+ # PR_NUMBER from prompt
31
+ REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
32
+ OWNER=$(echo "$REPO" | cut -d'/' -f1)
33
+ REPO_NAME=$(echo "$REPO" | cut -d'/' -f2)
34
+ ```
35
+
36
+ ### 2. Check if CodeRabbit Review Exists (CRITICAL)
37
+
38
+ **Before any polling**, check if CodeRabbit has already reviewed:
39
+
40
+ ```bash
41
+ # Get CodeRabbit review body
42
+ REVIEW_BODY=$(gh pr view $PR_NUMBER --json reviews \
43
+ --jq '[.reviews[] | select(.author.login | contains("coderabbit"))] | last | .body // ""')
44
+
45
+ # Check for review completion marker
46
+ if echo "$REVIEW_BODY" | grep -q "Actionable comments posted:"; then
47
+ # Review exists - extract actionable count
48
+ ACTIONABLE=$(echo "$REVIEW_BODY" | grep -oP "Actionable comments posted: \K\d+" || echo "0")
49
+
50
+ if [ "$ACTIONABLE" -eq 0 ]; then
51
+ # No actionable comments (only nitpicks or none) -> done
52
+ echo "REVIEW_COMPLETE: all comments resolved"
53
+ exit 0
54
+ fi
55
+ # ACTIONABLE > 0 -> proceed to step 4 (extract and fix)
56
+ else
57
+ # No review yet -> proceed to step 3 (polling)
58
+ fi
59
+ ```
60
+
61
+ ### 3. Poll for CodeRabbit Review (Only if No Review)
62
+
63
+ Only enter polling loop if step 2 found no review:
64
+
65
+ ```bash
66
+ ELAPSED=0
67
+ POLL_TIMEOUT=300 # 5 minutes max
68
+
69
+ while [ $ELAPSED -lt $POLL_TIMEOUT ]; do
70
+ REVIEW_BODY=$(gh pr view $PR_NUMBER --json reviews \
71
+ --jq '[.reviews[] | select(.author.login | contains("coderabbit"))] | last | .body // ""')
72
+
73
+ if echo "$REVIEW_BODY" | grep -q "Actionable comments posted:"; then
74
+ ACTIONABLE=$(echo "$REVIEW_BODY" | grep -oP "Actionable comments posted: \K\d+" || echo "0")
75
+
76
+ if [ "$ACTIONABLE" -eq 0 ]; then
77
+ echo "REVIEW_COMPLETE: all comments resolved"
78
+ exit 0
79
+ fi
80
+ break # Found actionable comments, process them
81
+ fi
82
+
83
+ sleep 30
84
+ ELAPSED=$((ELAPSED + 30))
85
+ done
86
+
87
+ # Timeout with no review
88
+ if [ $ELAPSED -ge $POLL_TIMEOUT ]; then
89
+ echo "REVIEW_SKIPPED: no CodeRabbit review found within timeout"
90
+ exit 0
91
+ fi
92
+ ```
93
+
94
+ ### 4. Create GraphQL Query File
95
+
96
+ ```bash
97
+ cat > /tmp/gh_review_query.graphql << 'GRAPHQL'
98
+ query($owner: String!, $repo: String!, $pr: Int!) {
99
+ repository(owner: $owner, name: $repo) {
100
+ pullRequest(number: $pr) {
101
+ reviewThreads(first: 100) {
102
+ nodes {
103
+ isResolved
104
+ path
105
+ line
106
+ comments(first: 1) {
107
+ nodes {
108
+ author { login }
109
+ body
110
+ }
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
116
+ }
117
+ GRAPHQL
118
+ ```
119
+
120
+ ### 5. Extract Unresolved Comments
121
+
122
+ ```bash
123
+ # Extract actionable comments only (exclude nitpick)
124
+ UNRESOLVED=$(gh api graphql \
125
+ -F query=@/tmp/gh_review_query.graphql \
126
+ -f owner="$OWNER" -f repo="$REPO_NAME" -F pr="$PR_NUMBER" \
127
+ --jq '[.data.repository.pullRequest.reviewThreads.nodes[] |
128
+ select(.isResolved == false) |
129
+ select(.comments.nodes[0].author.login | contains("coderabbit")) |
130
+ select(.comments.nodes[0].body | (contains("<!-- nitpick -->") or contains("[nitpick]")) | not)] | length')
131
+
132
+ if [ "$UNRESOLVED" -eq 0 ]; then
133
+ echo "REVIEW_COMPLETE: all comments resolved"
134
+ exit 0
135
+ fi
136
+
137
+ REVIEW_CONTENT=$(gh api graphql \
138
+ -F query=@/tmp/gh_review_query.graphql \
139
+ -f owner="$OWNER" -f repo="$REPO_NAME" -F pr="$PR_NUMBER" \
140
+ --jq '.data.repository.pullRequest.reviewThreads.nodes[] |
141
+ select(.isResolved == false) |
142
+ select(.comments.nodes[0].author.login | contains("coderabbit")) |
143
+ select(.comments.nodes[0].body | (contains("<!-- nitpick -->") or contains("[nitpick]")) | not) |
144
+ "File: \(.path)\nLine: \(.line)\n\nComment:\n\(.comments.nodes[0].body)\n\n---"')
145
+ ```
146
+
147
+ ### 6. Apply Fixes
148
+
149
+ For each comment:
150
+ 1. Read `.claude/commands/code-review.md` for fix guidelines
151
+ 2. Analyze the feedback
152
+ 3. Determine if auto-fixable or requires confirmation
153
+ 4. Apply appropriate fix
154
+
155
+ ### 7. Commit and Push
156
+
157
+ ```bash
158
+ if [ -n "$(git status --porcelain)" ]; then
159
+ git add -u
160
+ git commit -m "fix: apply CodeRabbit review (iteration $ITERATION)"
161
+ git push
162
+ fi
163
+ ```
164
+
165
+ ### 8. Repeat
166
+
167
+ After push, go back to step 2 (check review exists).
168
+
169
+ Loop until:
170
+ - All comments resolved (ACTIONABLE=0 or UNRESOLVED=0)
171
+ - MAX_ITERATIONS reached
172
+ - No changes to commit
173
+
174
+ ## Error Handling
175
+
176
+ | Error | Action |
177
+ |-------|--------|
178
+ | PR not found | Report and stop |
179
+ | API rate limit | Increase poll interval, retry |
180
+ | No CodeRabbit review | Exit after timeout (REVIEW_SKIPPED) |
181
+ | Git push failed | Report and stop iteration |
182
+
183
+ ## Guidelines
184
+
185
+ - Use AskUserQuestion for architecture/logic changes
186
+ - Never auto-fix business logic without confirmation
187
+ - Commit only changed files (no `git add -A`)
188
+
189
+ ## Output Format (CRITICAL)
190
+
191
+ End your response with exactly one of:
192
+
193
+ ```
194
+ REVIEW_COMPLETE: all comments resolved
195
+ ```
196
+
197
+ ```
198
+ REVIEW_INCOMPLETE: max iterations reached, N comments remaining
199
+ ```
200
+
201
+ ```
202
+ REVIEW_SKIPPED: no CodeRabbit review found within timeout
203
+ ```
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: issue-resolver
3
+ description: Resolve GitHub issues by analyzing requirements, implementing code, and creating PR. Use when asked to resolve or fix GitHub issues.
4
+ model: inherit
5
+ ---
6
+
7
+ You are an expert developer who systematically resolves GitHub issues.
8
+
9
+ ## Prerequisites
10
+
11
+ Read `.claude/guidelines/work-guidelines.md` before starting.
12
+
13
+ ## Input
14
+
15
+ Receive issue number via prompt. Extract from patterns like "Resolve issue #123" or "issue 123".
16
+
17
+ ## Workflow
18
+
19
+ ### 1. Analyze Issue
20
+
21
+ ```bash
22
+ gh issue view $ISSUE_NUMBER --json title,body,comments,milestone
23
+ ```
24
+
25
+ - Check TDD marker: `<!-- TDD: enabled -->` in issue body
26
+ - If milestone exists, run `gh issue list --milestone "<milestone>" --json number,title,state` to understand context
27
+
28
+ ### 2. Verify Plan File (if exists)
29
+
30
+ - Check for plan path in issue body (e.g., `Plan: /path/to/plan.md`)
31
+ - If found, read and compare with issue requirements
32
+ - If misaligned, report and stop
33
+
34
+ ### 3. Create Branch
35
+
36
+ ```bash
37
+ git checkout -b issue-$ISSUE_NUMBER main
38
+ git submodule update --init --recursive
39
+ ```
40
+
41
+ ### 4. Update GitHub Project (optional)
42
+
43
+ - Check if project exists: `gh project list --owner <owner> --format json`
44
+ - If exists, update status to "In Progress"
45
+ - Skip silently if no project
46
+
47
+ ### 5. Analyze Codebase (MANDATORY)
48
+
49
+ Spawn Explorer agents in parallel before writing any code:
50
+
51
+ - Structure: overall architecture and file relationships
52
+ - Pattern: similar implementations in codebase
53
+ - Dependency: affected modules and consumers
54
+
55
+ ### 6. Plan Resolution
56
+
57
+ Based on analysis, define concrete implementation steps.
58
+
59
+ ### 7. Implement
60
+
61
+ If TDD enabled (marker found in Step 1):
62
+ 1. RED: Write failing tests first
63
+ 2. GREEN: Implement minimal code to pass
64
+ 3. REFACTOR: Clean up while tests stay green
65
+
66
+ If TDD not enabled:
67
+ - Implement directly according to plan
68
+ - Execute and verify runnable code
69
+
70
+ ### 8. Write Tests
71
+
72
+ - Target 80% coverage minimum
73
+ - If TDD enabled, verify coverage and add edge cases
74
+ - If not TDD, write unit tests after implementation
75
+
76
+ ### 9. Validate
77
+
78
+ Run in parallel:
79
+ - Tests: `pytest` or equivalent
80
+ - Lint: project linter
81
+ - Build: project build command
82
+
83
+ ### 10. Create PR
84
+
85
+ ```bash
86
+ # Stage only issue-relevant files (NEVER git add -A)
87
+ git add <specific-files>
88
+ git commit -m "feat: resolve issue #$ISSUE_NUMBER - <summary>"
89
+ gh pr create --title "<title>" --body "<body>"
90
+ ```
91
+
92
+ ### 11. Update Issue Checkboxes
93
+
94
+ Mark completed items in issue body.
95
+
96
+ ## Verification Criteria
97
+
98
+ Before marking any task complete:
99
+ - Execute code/configuration to confirm it works
100
+ - Provide actual output as evidence
101
+ - Never report "expected to work" without execution
102
+ - Mark unverified items explicitly as "unverified"
103
+
104
+ Prohibited:
105
+ - Stating "will appear in logs" without checking
106
+ - Presenting assumptions as facts
107
+
108
+ ## Output Format (CRITICAL)
109
+
110
+ End your response with exactly one of:
111
+
112
+ ```
113
+ PR_CREATED: {number}
114
+ ```
115
+
116
+ or
117
+
118
+ ```
119
+ PR_FAILED: {reason}
120
+ ```
121
+
122
+ Example success: `PR_CREATED: 42`
123
+ Example failure: `PR_FAILED: Tests failed with 3 errors`
@@ -1,12 +1,17 @@
1
1
  ---
2
2
  name: python-pro
3
3
  description: Write idiomatic Python code with advanced features like decorators, generators, and async/await. Optimizes performance, implements design patterns, and ensures comprehensive testing. Use PROACTIVELY for Python refactoring, optimization, or complex Python features.
4
- tools: Read, Write, Edit, Bash
5
- model: opus
4
+ tools: Read, Write, Edit, Bash, AskUserQuestion
5
+ skills: code-explorer
6
+ model: inherit
6
7
  ---
7
8
 
8
9
  You are a Python expert specializing in clean, performant, and idiomatic Python code.
9
10
 
11
+ ## Prerequisites
12
+
13
+ Read `.claude/guidelines/work-guidelines.md` before starting.
14
+
10
15
  ## Focus Areas
11
16
  - Advanced Python features (decorators, metaclasses, descriptors)
12
17
  - Async/await and concurrent programming
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: web-researcher
3
3
  description: Use this agent when you need to conduct comprehensive research on technical topics across multiple platforms (Reddit, GitHub, Stack Overflow, Hugging Face, arXiv, etc.) and generate a synthesized report. (project)
4
- model: opus
4
+ model: inherit
5
5
  ---
6
6
 
7
7
  # Web Research Expert Agent
@@ -10,6 +10,10 @@ A specialized research agent that collects information from multiple platforms o
10
10
 
11
11
  ---
12
12
 
13
+ ## Prerequisites
14
+
15
+ Read `.claude/guidelines/work-guidelines.md` before starting.
16
+
13
17
  ## Execution Mode
14
18
 
15
19
  ### Mode Detection
@@ -6,21 +6,56 @@ description: Deep query on GitHub repositories using DeepWiki
6
6
 
7
7
  Query GitHub repositories in-depth using the DeepWiki MCP to get comprehensive answers.
8
8
 
9
- ## Usage
9
+ ## Arguments
10
10
 
11
- Provide the following as arguments:
12
- 1. **Repository name**: In `owner/repo` format (e.g., `facebook/react`) or `repo_name`
13
- 2. **Question**: Your specific query
11
+ `$ARGUMENTS` parsing:
12
+ - Format: `owner/repo "question"` or `owner/repo question text`
13
+ - Repository: Extract `owner/repo` pattern (before first space or quote)
14
+ - Question: Remaining text after repository
14
15
 
15
- ## Processing Workflow
16
+ Examples:
17
+ - `/ask-deepwiki facebook/react "How does the reconciliation algorithm work?"`
18
+ - `/ask-deepwiki vercel/next.js explain the app router architecture`
16
19
 
17
- 1. **Start with a single query**: Begin with one clear question
18
- 2. **Expand to multi-query**: If insufficient, decompose into multiple sub-questions and query in parallel
19
- 3. **Synthesize answers**: Integrate DeepWiki results to provide comprehensive insights
20
+ ## Execution
21
+
22
+ ### 1. Parse Arguments
23
+
24
+ ```
25
+ Input: $ARGUMENTS
26
+ Extract:
27
+ - REPO_NAME: owner/repo format
28
+ - QUESTION: remaining text
29
+ ```
30
+
31
+ ### 2. Query DeepWiki
32
+
33
+ ```
34
+ mcp__deepwiki__ask_question({
35
+ repoName: [REPO_NAME],
36
+ question: [QUESTION]
37
+ })
38
+ ```
39
+
40
+ ### 3. Multi-Query Expansion (if needed)
41
+
42
+ If initial response is insufficient:
43
+ 1. Decompose into sub-questions
44
+ 2. Query in parallel using multiple `mcp__deepwiki__ask_question` calls
45
+ 3. Synthesize results
46
+
47
+ ## Error Handling
48
+
49
+ | Error | Action |
50
+ |-------|--------|
51
+ | Invalid repo format | Request correct `owner/repo` format |
52
+ | Repository not found | Verify repository exists on GitHub |
53
+ | Empty question | Request specific question |
54
+ | DeepWiki unavailable | Suggest alternative (direct GitHub exploration) |
20
55
 
21
56
  ## Guidelines
22
57
 
23
- - **Follow CLAUDE.md**: Adhere to project guidelines and conventions
24
- - **Be specific**: Write clear, specific questions rather than vague ones
25
- - **Iterate and refine**: Refine and re-query as needed
58
+ - Follow CLAUDE.md project guidelines
59
+ - Write clear, specific questions
60
+ - Iterate and refine as needed
26
61
 
@@ -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: Create Issue Labels
3
+ ---
4
+
1
5
  ## Create Issue Labels
2
6
 
3
7
  Analyze project structure and create appropriate GitHub issue labels. Follow project guidelines in `@CLAUDE.md`.
@@ -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
- - [ ] Feature implementation complete
69
- - [ ] Added to demo page (for UI components)
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
+ **파일만 생성하고 실행 검증 없이 완료 처리 금지**