@yeongjaeyou/claude-code-config 0.11.1 → 0.13.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.
@@ -9,16 +9,23 @@ Break down large work items into manageable, independent issues. Follow project
9
9
  - Scan `.claude/agents/` for custom agents (read YAML frontmatter)
10
10
  - Scan `.claude/skills/` for available skills (read SKILL.md)
11
11
  - Check `.mcp.json` for configured MCP servers
12
- 3. Analyze work: Understand core requirements and objectives
13
- 4. Decompose work: Split major tasks into smaller, manageable sub-tasks or issues. **Aim for optimal count over excessive issues (keep it manageable)**
14
- 5. Analyze dependencies: Identify prerequisite tasks
15
- 6. Suggest milestone name: Propose a milestone to group decomposed tasks
16
- 7. Check related PRs (optional): Run `gh pr list --state closed --limit 20` for similar work references (skip if none)
17
- 8. Output decomposed issues: Display issues with proposed milestone name
18
- 9. Ask about GitHub creation: Use AskUserQuestion to let user decide on milestone and issue creation
19
- - Create milestone: `gh api repos/:owner/:repo/milestones -f title="Milestone Name" -f description="Description"`
20
- - Assign issues with `--milestone` option
21
- 10. **Add issues to GitHub Project (optional)**
12
+ - Detect test frameworks (jest.config.*, pytest.ini, vitest.config.*, pyproject.toml, etc.)
13
+ 3. **Check TDD applicability** (if user hasn't specified):
14
+ - Analyze work type: code implementation vs docs/infra/config
15
+ - If test framework detected + code work Ask: "TDD 기반으로 이슈 생성하시겠어요?"
16
+ - If no test framework Inform: "TDD 반영이 필요없습니다. (이유: 테스트 프레임워크 미감지)"
17
+ - If non-code work (docs/infra) → Inform: "TDD 반영이 필요없습니다. (이유: 비코드 작업)"
18
+ - If TDD selected: Add `<!-- TDD: enabled -->` marker to each issue body
19
+ 4. Analyze work: Understand core requirements and objectives
20
+ 5. Decompose work: Split major tasks into smaller, manageable sub-tasks or issues. **Aim for optimal count over excessive issues (keep it manageable)**
21
+ 6. Analyze dependencies: Identify prerequisite tasks
22
+ 7. Suggest milestone name: Propose a milestone to group decomposed tasks
23
+ 8. Check related PRs (optional): Run `gh pr list --state closed --limit 20` for similar work references (skip if none)
24
+ 9. Output decomposed issues: Display issues with proposed milestone name
25
+ 10. Ask about GitHub creation: Use AskUserQuestion to let user decide on milestone and issue creation
26
+ - Create milestone: `gh api repos/:owner/:repo/milestones -f title="Milestone Name" -f description="Description"`
27
+ - Assign issues with `--milestone` option
28
+ 11. **Add issues to GitHub Project (optional)**
22
29
  - Check for existing projects: `gh project list --owner <owner> --format json`
23
30
  - If no project exists: Display "No project found. You can create one with `/gh:init-project`" and skip
24
31
  - If project exists: Ask user via AskUserQuestion whether to add issues
@@ -46,6 +53,8 @@ Examples (vary by project, for reference only):
46
53
  - **Priority**: `priority: high`, `priority: medium`, `priority: low`
47
54
 
48
55
  ### Description
56
+ <!-- TDD: enabled --> ← Add this marker if TDD was selected in Step 3
57
+
49
58
  **Purpose**: [Why this is needed]
50
59
 
51
60
  **Tasks**:
@@ -7,6 +7,7 @@ Act as an expert developer who systematically analyzes and resolves GitHub issue
7
7
 
8
8
  1. **Analyze Issue**:
9
9
  - Run `gh issue view $ISSUE_NUMBER --json title,body,comments,milestone` to get issue title, body, labels, and milestone
10
+ - **Check TDD marker**: Look for `<!-- TDD: enabled -->` in issue body → Set TDD workflow flag
10
11
  - If milestone exists, run `gh issue list --milestone "<milestone-name>" --json number,title,state` to view related issues and understand overall context
11
12
  - Identify requirements precisely
12
13
 
@@ -48,9 +49,16 @@ Act as an expert developer who systematically analyzes and resolves GitHub issue
48
49
  6. **Plan Resolution**: Based on analysis results, develop a concrete resolution plan and define work steps.
49
50
 
50
51
  7. **Resolve Issue**: Spawn sub-agents to modify code and implement features according to the plan.
52
+ - **If TDD enabled** (marker detected in Step 1):
53
+ 1. 🔴 RED: Write failing tests first based on requirements
54
+ 2. 🟢 GREEN: Implement minimal code to pass tests
55
+ 3. 🔵 REFACTOR: Clean up while keeping tests green
56
+ - **If TDD not enabled**: Implement features directly according to the plan
51
57
  - **Execution verification required**: For Python scripts, executables, or any runnable code, always execute to verify correct behavior. Do not rely solely on file existence or previous results.
52
58
 
53
- 8. **Write Tests**: Spawn independent sub-agents per file to write unit tests in parallel, achieving at least 80% coverage.
59
+ 8. **Write Tests**:
60
+ - **If TDD enabled**: Verify test coverage meets target (tests already written in Step 7), add missing edge cases if needed
61
+ - **If TDD not enabled**: Spawn independent sub-agents per file to write unit tests in parallel, achieving at least 80% coverage
54
62
 
55
63
  9. **Validate**: Run tests, lint checks, and build verification in parallel using independent sub-agents to validate code quality.
56
64
 
@@ -0,0 +1,53 @@
1
+ #!/bin/bash
2
+ # Claude Code OSC Notification Script
3
+ # /dev/tty로 출력하여 터미널에 직접 전달
4
+
5
+ # stdin에서 JSON 읽기 (timeout으로 blocking 방지)
6
+ INPUT=$(timeout 1 cat 2>/dev/null || true)
7
+
8
+ # JSON 파싱
9
+ if command -v jq &>/dev/null && [ -n "$INPUT" ]; then
10
+ SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // empty' 2>/dev/null)
11
+ CWD=$(echo "$INPUT" | jq -r '.cwd // empty' 2>/dev/null)
12
+ EVENT=$(echo "$INPUT" | jq -r '.hook_event_name // empty' 2>/dev/null)
13
+ NOTIF_TYPE=$(echo "$INPUT" | jq -r '.notification_type // empty' 2>/dev/null)
14
+ MESSAGE=$(echo "$INPUT" | jq -r '.message // empty' 2>/dev/null)
15
+
16
+ FOLDER=$(basename "${CWD:-$PWD}" 2>/dev/null)
17
+ SHORT_ID="${SESSION_ID:0:8}"
18
+
19
+ # 제목 구성
20
+ TITLE="Claude"
21
+ [ -n "$FOLDER" ] && TITLE="$TITLE - $FOLDER"
22
+ [ -n "$SHORT_ID" ] && TITLE="$TITLE [$SHORT_ID]"
23
+
24
+ # 본문 구성
25
+ case "$EVENT" in
26
+ "Stop")
27
+ BODY="Task completed"
28
+ ;;
29
+ "Notification")
30
+ case "$NOTIF_TYPE" in
31
+ "permission_prompt") BODY="Permission needed" ;;
32
+ "idle_prompt") BODY="Waiting for input" ;;
33
+ *) BODY="${MESSAGE:-$NOTIF_TYPE}" ;;
34
+ esac
35
+ ;;
36
+ *)
37
+ BODY="${MESSAGE:-Notification}"
38
+ ;;
39
+ esac
40
+ else
41
+ TITLE="${1:-Claude Code}"
42
+ BODY="${2:-Task completed}"
43
+ fi
44
+
45
+ # OSC 777 알림 출력 (OSC 9는 중복 알림 발생하므로 제외)
46
+ # /dev/tty 사용 가능 시 직접 출력, 아니면 stdout
47
+ {
48
+ printf '\033]777;notify;%s;%s\007' "$TITLE" "$BODY"
49
+ } > /dev/tty 2>/dev/null || {
50
+ printf '\033]777;notify;%s;%s\007' "$TITLE" "$BODY"
51
+ }
52
+
53
+ exit 0
package/README.md CHANGED
@@ -267,6 +267,27 @@ cp node_modules/@yeongjaeyou/claude-code-config/.mcp.json .
267
267
  - Hugging Face model/dataset/Spaces search via `huggingface_hub` API
268
268
  - Download and analyze source code in temp directory (`/tmp/`)
269
269
 
270
+ ## Notification Hooks
271
+
272
+ Desktop notifications for Claude Code events using OSC escape sequences.
273
+
274
+ ### Quick Setup
275
+
276
+ ```bash
277
+ # 1. Install Terminal Notification extension in VSCode
278
+ # 2. Global install includes notify_osc.sh and auto-registers hooks
279
+ npx @yeongjaeyou/claude-code-config --global
280
+ ```
281
+
282
+ ### Supported Events
283
+
284
+ | Event | Description |
285
+ |-------|-------------|
286
+ | Stop | Task completion |
287
+ | Notification | Permission requests, idle prompts |
288
+
289
+ See [docs/notification-setup.md](docs/notification-setup.md) for detailed setup guide.
290
+
270
291
  ## License
271
292
 
272
293
  MIT License
package/bin/cli.js CHANGED
@@ -180,6 +180,33 @@ const DEFAULT_HOOKS_CONFIG = {
180
180
  ]
181
181
  };
182
182
 
183
+ // Global-only notification hooks (OSC desktop alerts)
184
+ const GLOBAL_NOTIFICATION_HOOKS = {
185
+ Stop: [
186
+ {
187
+ hooks: [
188
+ {
189
+ type: 'command',
190
+ command: '~/.claude/hooks/notify_osc.sh',
191
+ timeout: 10
192
+ }
193
+ ]
194
+ }
195
+ ],
196
+ Notification: [
197
+ {
198
+ matcher: '',
199
+ hooks: [
200
+ {
201
+ type: 'command',
202
+ command: '~/.claude/hooks/notify_osc.sh',
203
+ timeout: 10
204
+ }
205
+ ]
206
+ }
207
+ ]
208
+ };
209
+
183
210
  /**
184
211
  * Check if a hook with the same command already exists
185
212
  * @param {Array} hooks - Existing hooks array
@@ -232,6 +259,22 @@ function mergeSettingsJson() {
232
259
  console.log('inject-guidelines hook already exists in settings.json');
233
260
  }
234
261
 
262
+ // Add notification hooks for global install only
263
+ if (isGlobal) {
264
+ for (const [event, hookConfigs] of Object.entries(GLOBAL_NOTIFICATION_HOOKS)) {
265
+ if (!settings.hooks[event]) {
266
+ settings.hooks[event] = [];
267
+ }
268
+ const notifCommand = hookConfigs[0].hooks[0].command;
269
+ if (!hookExists(settings.hooks[event], notifCommand)) {
270
+ settings.hooks[event].push(hookConfigs[0]);
271
+ console.log(`Added ${event} notification hook to settings.json`);
272
+ } else {
273
+ console.log(`${event} notification hook already exists in settings.json`);
274
+ }
275
+ }
276
+ }
277
+
235
278
  // Write merged settings
236
279
  try {
237
280
  fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
@@ -337,6 +380,13 @@ async function main() {
337
380
  if (isGlobal) {
338
381
  console.log('Global installation complete.');
339
382
  console.log('Claude Code commands are now available in all projects.');
383
+ console.log('');
384
+ console.log('Desktop notifications enabled:');
385
+ console.log(' - Stop: Task completion alerts');
386
+ console.log(' - Notification: Permission/idle prompts');
387
+ console.log('');
388
+ console.log('Note: Install "Terminal Notification" VSCode extension for alerts.');
389
+ console.log('See docs/notification-setup.md for detailed setup guide.');
340
390
  }
341
391
  }
342
392
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeongjaeyou/claude-code-config",
3
- "version": "0.11.1",
3
+ "version": "0.13.0",
4
4
  "description": "Claude Code CLI custom commands, agents, and skills",
5
5
  "bin": {
6
6
  "claude-code-config": "./bin/cli.js"