@simplysm/sd-claude 13.0.51 → 13.0.53

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.
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env python3
2
+ import json, sys, os, subprocess
3
+
4
+ data = json.load(sys.stdin)
5
+
6
+ dir_name = os.path.basename(data.get("cwd", ""))
7
+
8
+ ps_cmd = (
9
+ "Add-Type -AssemblyName System.Windows.Forms; "
10
+ "$notify = New-Object System.Windows.Forms.NotifyIcon; "
11
+ "$notify.Icon = [System.Drawing.SystemIcons]::Information; "
12
+ "$notify.Visible = $true; "
13
+ f"$notify.ShowBalloonTip(3000, 'Claude Code', '[{dir_name}] 작업 완료', "
14
+ "[System.Windows.Forms.ToolTipIcon]::Info); "
15
+ "Start-Sleep -Milliseconds 3500"
16
+ )
17
+ subprocess.run(["powershell.exe", "-Command", ps_cmd])
@@ -1,7 +1,7 @@
1
1
  # Directory Reference
2
2
 
3
3
  - `.cache/`: Build cache (`eslint.cache`, `typecheck-{env}.tsbuildinfo`, `dts.tsbuildinfo`). Reset: delete `.cache/`
4
- - `.playwright-mcp/`: Playwright MCP output directory
5
- - Screenshots/snapshots must always be saved to the `.playwright-mcp/` directory
6
- - When calling `browser_take_screenshot`, always prefix filename with `.playwright-mcp/` (e.g., `.playwright-mcp/screenshot.png`)
4
+ - `.tmp/playwright/`: Playwright MCP output directory
5
+ - Screenshots/snapshots must always be saved to the `.tmp/playwright/` directory
6
+ - When calling `browser_take_screenshot`, always prefix filename with `.tmp/playwright/` (e.g., `.tmp/playwright/screenshot.png`)
7
7
  - `PLAYWRIGHT_OUTPUT_DIR` only applies to auto-generated filenames; explicitly specified filenames are resolved relative to cwd
@@ -39,13 +39,11 @@ Start by understanding the current project context, then ask questions one at a
39
39
  - Write the validated design to `docs/plans/YYYY-MM-DD-<topic>-design.md`
40
40
  - Commit the design document to git
41
41
 
42
- **Next Step:**
43
-
44
- Display in the **system's configured language**:
42
+ **STOP here.** Report the result to the user in the **system's configured language**:
45
43
 
46
44
  **"Design complete and saved to `docs/plans/<filename>.md`. Next step: `/sd-plan` to create the implementation plan."**
47
45
 
48
- Do NOT auto-proceed. Wait for the user's explicit instruction.
46
+ Do NOT invoke `/sd-plan` or any other skill. Do NOT auto-proceed. Wait for the user's explicit instruction.
49
47
 
50
48
  ## Key Principles
51
49
 
@@ -62,17 +62,17 @@ Replace `[path]` with user's argument, or OMIT if no argument (defaults to full
62
62
  **Output format:**
63
63
  ```
64
64
  ====== TYPECHECK: PASS ======
65
- [last few lines]
66
65
 
67
- ====== LINT: FAIL ======
68
- [full error output]
66
+ ====== LINT: FAIL → .tmp/sd-check/lint.log ======
69
67
 
70
68
  ====== TEST: PASS (47 tests) ======
71
- [last few lines]
72
69
 
73
70
  ====== SUMMARY: 1/3 FAILED (lint) ======
74
71
  ```
75
72
 
73
+ - Failed checks write full output to `.tmp/sd-check/{name}.log`
74
+ - Use the **Read tool** to read log files for error details
75
+
76
76
  - **ENV-CHECK FAIL**: Environment prerequisites missing. Report to user and STOP.
77
77
  - **SUMMARY: ALL PASSED**: Complete (see Completion Criteria).
78
78
  - **SUMMARY: N/3 FAILED**: Proceed to Step 2.
@@ -82,7 +82,7 @@ Replace `[path]` with user's argument, or OMIT if no argument (defaults to full
82
82
  1. **Analyze by priority:** Typecheck → Lint → Test
83
83
  - Typecheck errors may cause lint/test errors (cascade)
84
84
 
85
- 2. **Read failing files** to identify root cause
85
+ 2. **Read log files** (`.tmp/sd-check/{name}.log`) to see full error output, then **read failing source files** to identify root cause
86
86
 
87
87
  3. **Fix with Edit:**
88
88
  - **Typecheck:** Fix type issues
@@ -1,4 +1,4 @@
1
- import { readFileSync, existsSync } from "fs";
1
+ import { readFileSync, existsSync, mkdirSync, writeFileSync } from "fs";
2
2
  import { resolve } from "path";
3
3
  import { spawn } from "child_process";
4
4
 
@@ -48,7 +48,7 @@ if (errors.length > 0) {
48
48
  // Phase 2: Run 3 checks in parallel
49
49
  // ══════════════════════════════════════════
50
50
 
51
- const TAIL_LINES = 15;
51
+ const logDir = resolve(root, ".tmp/sd-check");
52
52
 
53
53
  function runCommand(name, cmd, args) {
54
54
  return new Promise((res) => {
@@ -69,12 +69,6 @@ function runCommand(name, cmd, args) {
69
69
  });
70
70
  }
71
71
 
72
- function tail(text, n) {
73
- const lines = text.trimEnd().split("\n");
74
- if (lines.length <= n) return text.trimEnd();
75
- return "...\n" + lines.slice(-n).join("\n");
76
- }
77
-
78
72
  function extractTestCount(output) {
79
73
  const match =
80
74
  output.match(/(\d+)\s+tests?\s+passed/i) ??
@@ -96,6 +90,7 @@ const results = await Promise.all(checks.map((c) => runCommand(c.name, c.cmd, c.
96
90
  // ══════════════════════════════════════════
97
91
 
98
92
  const failed = [];
93
+ mkdirSync(logDir, { recursive: true });
99
94
 
100
95
  for (const r of results) {
101
96
  const passed = r.code === 0;
@@ -106,12 +101,12 @@ for (const r of results) {
106
101
  if (count) label = `PASS (${count} tests)`;
107
102
  }
108
103
 
109
- console.log(`\n${"=".repeat(6)} ${r.name}: ${label} ${"=".repeat(6)}`);
110
-
111
104
  if (passed) {
112
- console.log(tail(r.output, TAIL_LINES));
105
+ console.log(`\n${"=".repeat(6)} ${r.name}: ${label} ${"=".repeat(6)}`);
113
106
  } else {
114
- console.log(r.output.trimEnd());
107
+ const logFile = resolve(logDir, `${r.name.toLowerCase()}.log`);
108
+ writeFileSync(logFile, r.output, "utf8");
109
+ console.log(`\n${"=".repeat(6)} ${r.name}: ${label} → ${logFile} ${"=".repeat(6)}`);
115
110
  failed.push(r.name.toLowerCase());
116
111
  }
117
112
  }
@@ -4,129 +4,102 @@ description: Use when you have a spec or requirements for a multi-step task, bef
4
4
  model: opus
5
5
  ---
6
6
 
7
- # Writing Plans
7
+ # Turning Designs Into Implementation Plans
8
8
 
9
9
  ## Overview
10
10
 
11
- Write comprehensive implementation plans assuming the engineer has zero context for our codebase and questionable taste. Document everything they need to know: which files to touch for each task, code, testing, docs they might need to check, how to test it. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
12
-
13
- Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well.
14
-
15
- **Announce at start:** "I'm using the sd-plan skill to create the implementation plan."
11
+ Turn a design doc into a step-by-step implementation plan through codebase exploration. Write bite-sized tasks assuming the implementing engineer has zero context exact file paths, complete code, precise commands.
16
12
 
17
13
  **Save plans to:** `docs/plans/YYYY-MM-DD-<feature-name>.md`
18
14
 
19
- ## Clarification Phase
15
+ ## The Process
20
16
 
21
- **Before writing the plan**, read the design doc and explore the codebase. Then identify implementation decisions the design didn't specify.
17
+ **Exploring the codebase:**
18
+ - Read the design doc, then explore relevant files, patterns, dependencies
19
+ - Ask questions one at a time as they arise during planning, with your recommendation
20
+ - Don't batch questions upfront — real questions emerge while deep in the details
22
21
 
23
- **Ask the user about:**
24
- - Core behavior choices (state management approach, error handling strategy, validation UX)
25
- - User-facing behavior not specified (what the user sees on error, how navigation works)
26
- - Architectural choices with multiple valid options (which pattern, which abstraction level)
22
+ **Ask about:**
23
+ - Conflicts with existing codebase patterns discovered while exploring
24
+ - Implementation choices the design didn't specify (which pattern, which abstraction level)
25
+ - Ambiguous behavior uncovered while designing tests or file structure
27
26
 
28
27
  **Don't ask — just decide:**
29
28
  - Internal details covered by project conventions (file naming, export patterns)
30
- - Pure YAGNI decisions (features not mentioned = don't add)
29
+ - YAGNI decisions (not mentioned = don't add)
31
30
  - Implementation details with only one reasonable option
32
31
 
33
- **Format:** Present all discovered gaps as a single numbered list with your recommended option for each. Wait for user confirmation before writing the plan.
34
-
35
- ```
36
- Before writing the plan, I found these implementation decisions not covered in the design:
37
-
38
- 1. **[Topic]**: [The gap]. I'd recommend [option A] because [reason]. Alternatively, [option B].
39
- 2. **[Topic]**: [The gap]. I'd recommend [option] because [reason].
40
- ...
41
-
42
- Should I proceed with these recommendations, or would you like to change any?
43
- ```
44
-
45
- If no gaps are found, skip this phase and proceed directly to writing the plan.
32
+ **Writing the plan:**
33
+ - Break into independent tasks
34
+ - Include exact file paths, complete code, exact commands with expected output
35
+ - Never write "add validation" write the actual validation code
46
36
 
47
- ## Bite-Sized Task Granularity
37
+ ## Plan Document Format
48
38
 
49
- **Each step is one action (2-5 minutes):**
50
- - "Write the failing test" - step
51
- - "Run it to make sure it fails" - step
52
- - "Implement the minimal code to make the test pass" - step
53
- - "Run the tests and make sure they pass" - step
54
- - "Commit" - step
55
-
56
- ## Plan Document Header
57
-
58
- **Every plan MUST start with this header:**
39
+ **Header:**
59
40
 
60
41
  ```markdown
61
42
  # [Feature Name] Implementation Plan
62
43
 
63
44
  > **For Claude:** REQUIRED SUB-SKILL: Use sd-plan-dev to implement this plan task-by-task.
64
45
 
65
- **Goal:** [One sentence describing what this builds]
46
+ **Goal:** [One sentence]
66
47
 
67
- **Architecture:** [2-3 sentences about approach]
48
+ **Architecture:** [2-3 sentences]
68
49
 
69
50
  **Tech Stack:** [Key technologies/libraries]
70
51
 
71
52
  ---
72
53
  ```
73
54
 
74
- ## Task Structure
55
+ **Each task (TDD steps):**
75
56
 
76
- ```markdown
57
+ ````markdown
77
58
  ### Task N: [Component Name]
78
59
 
79
60
  **Files:**
80
61
  - Create: `exact/path/to/file.ts`
81
62
  - Modify: `exact/path/to/existing.ts:123-145`
82
- - Test: `exact/path/to/tests/file.spec.ts`
63
+ - Test: `exact/path/to/test.spec.ts`
83
64
 
84
65
  **Step 1: Write the failing test**
85
66
 
86
67
  ```typescript
87
68
  test("specific behavior", () => {
88
- const result = functionUnderTest(input);
69
+ const result = fn(input);
89
70
  expect(result).toBe(expected);
90
71
  });
91
72
  ```
92
73
 
93
74
  **Step 2: Run test to verify it fails**
94
75
 
95
- Run: `pnpm vitest exact/path/to/tests/file.spec.ts --run`
96
- Expected: FAIL with "functionUnderTest is not defined"
76
+ Run: `pnpm vitest exact/path/to/test.spec.ts --project=node`
77
+ Expected: FAIL with "fn is not defined"
97
78
 
98
79
  **Step 3: Write minimal implementation**
99
80
 
100
81
  ```typescript
101
- function functionUnderTest(input: InputType): OutputType {
82
+ export function fn(input: string): string {
102
83
  return expected;
103
84
  }
104
85
  ```
105
86
 
106
87
  **Step 4: Run test to verify it passes**
107
88
 
108
- Run: `pnpm vitest exact/path/to/tests/file.spec.ts --run`
89
+ Run: `pnpm vitest exact/path/to/test.spec.ts --project=node`
109
90
  Expected: PASS
110
91
 
111
92
  **Step 5: Commit**
112
93
 
113
94
  ```bash
114
- git add exact/path/to/tests/file.spec.ts exact/path/to/file.ts
95
+ git add exact/path/to/file.ts exact/path/to/test.spec.ts
115
96
  git commit -m "feat: add specific feature"
116
97
  ```
117
- ```
98
+ ````
118
99
 
119
- ## Remember
120
- - Exact file paths always
121
- - Complete code in plan (not "add validation")
122
- - Exact commands with expected output
123
- - DRY, YAGNI, TDD, frequent commits
100
+ ## After the Plan
124
101
 
125
- ## Execution Handoff
126
-
127
- After saving the plan, present the following workflow paths in the **system's configured language**.
128
-
129
- Before presenting, check git status for uncommitted changes. If there are any, append the `⚠️` warning line.
102
+ Save the plan, then present workflow paths. Check git status first. Display in the **system's configured language**:
130
103
 
131
104
  ```
132
105
  Plan complete! Here's how to proceed:
@@ -153,20 +126,22 @@ You can start from any step or skip steps as needed.
153
126
  ⚠️ You have uncommitted changes. To use Path A, run `/sd-commit all` first.
154
127
  ```
155
128
 
156
- - The `⚠️` line is only shown when uncommitted changes exist. Omit it when working tree is clean.
157
- - **Recommend one** based on the plan's scope:
158
- - Path A: new features, multi-file changes, architectural changes
159
- - Path B: small bug fixes, single-file changes, minor adjustments
160
- - Briefly explain why (1 sentence)
129
+ - The `⚠️` line only when uncommitted changes exist
130
+ - **Recommend one** based on scope (1 sentence why)
161
131
  - Do NOT auto-proceed. Wait for user's choice.
162
132
 
163
- **Yolo mode:** If the user responds with "Path A: yolo" or "Path B: yolo" (or similar intent like "A yolo", "B 자동"), execute all steps of the chosen path sequentially without stopping between steps. **Each `/sd-*` step MUST be invoked via the Skill tool** (e.g., `Skill("sd-worktree", "add <name>")`, `Skill("sd-plan-dev")`, `Skill("sd-check")`, `Skill("sd-commit")`, `Skill("sd-worktree", "merge")`, `Skill("sd-worktree", "clean")`). Do NOT execute the underlying git/shell commands directly — always delegate to the skill.
133
+ **Yolo mode:** Execute all steps sequentially.
134
+ - Each `/sd-*` step MUST be invoked via the Skill tool
135
+ - NEVER execute underlying commands (git, pnpm, etc.) directly, even if you know what the skill does internally
136
+ - If a step fails, stop and report — do not attempt manual recovery
137
+
138
+ **Yolo sd-check:** NEVER check only modified packages. Trace reverse dependencies and include all affected paths.
164
139
 
165
- **Yolo sd-check — include dependents:** NEVER check only modified packages. Also check all packages that depend on them:
166
- 1. Identify modified packages from `git diff --name-only`
167
- 2. Trace reverse dependencies (packages that import from modified packages) using `package.json` or project dependency graph
168
- 3. Include integration/e2e tests that cover the modified packages
169
- 4. Run `/sd-check` with all affected paths, or `/sd-check` without path (whole project) when changes are widespread
140
+ ## Key Principles
170
141
 
171
- - **REQUIRED SUB-SKILL:** Use sd-plan-dev
172
- - Fresh fork per task + two-stage review (spec compliance code quality)
142
+ - **One question at a time** — Ask inline during planning, not batched upfront
143
+ - **Exact everything** File paths, complete code, commands with expected output
144
+ - **Bite-sized steps** — Each step is one action (2-5 minutes)
145
+ - **TDD always** — Test first, implement second, commit third
146
+ - **DRY, YAGNI** — No unnecessary features, no repetition
147
+ - **REQUIRED SUB-SKILL:** sd-plan-dev (fresh fork per task + two-stage review)
@@ -33,6 +33,8 @@ All execution uses `Task(general-purpose)` for parallel execution.
33
33
 
34
34
  Independent tasks run as **parallel Task calls in a single message**. Within each task agent, spec and quality reviews also run as **parallel sub-Task calls**.
35
35
 
36
+ **CRITICAL: Do NOT use `run_in_background: true`** — achieve parallelism by making multiple Task calls in a single message (foreground parallel). This ensures the orchestrator waits for all tasks to complete before proceeding to the next batch, and prevents Stop hooks from firing prematurely.
37
+
36
38
  ## The Process
37
39
 
38
40
  ```dot
@@ -257,6 +259,7 @@ This catches cross-task integration issues early — especially when the next ba
257
259
  - Accept "close enough" on spec compliance
258
260
  - Skip review loops (issue found → fix → re-review)
259
261
  - Skip batch integration checks between batches
262
+ - Use `run_in_background: true` on Task calls (use foreground parallel instead)
260
263
 
261
264
  **If task agent returns questions:**
262
265
  - Answer clearly and completely
@@ -275,11 +278,6 @@ This catches cross-task integration issues early — especially when the next ba
275
278
  - Escalate to user with specific error details before proceeding
276
279
  - Do NOT re-launch on potentially partially-modified files without inspection
277
280
 
278
- ## After Completion
279
-
280
- When all tasks and final review are done, if the current working directory is inside a worktree (`.worktrees/`), guide the user to:
281
- - `/sd-worktree merge` — Merge the worktree branch back into main
282
-
283
281
  ## Integration
284
282
 
285
283
  **Related skills:**
@@ -129,7 +129,7 @@ function setupMcpConfig(projectRoot) {
129
129
  command: "node",
130
130
  args: [sdClaudeBin, "npx", "@playwright/mcp@latest", "--headless"],
131
131
  env: {
132
- PLAYWRIGHT_OUTPUT_DIR: ".playwright-mcp"
132
+ PLAYWRIGHT_OUTPUT_DIR: ".tmp/playwright"
133
133
  }
134
134
  };
135
135
  changed = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplysm/sd-claude",
3
- "version": "13.0.51",
3
+ "version": "13.0.53",
4
4
  "description": "Simplysm Claude Code CLI — asset installer and cross-platform npx wrapper",
5
5
  "author": "김석래",
6
6
  "license": "Apache-2.0",
@@ -189,7 +189,7 @@ function setupMcpConfig(projectRoot: string): void {
189
189
  command: "node",
190
190
  args: [sdClaudeBin, "npx", "@playwright/mcp@latest", "--headless"],
191
191
  env: {
192
- PLAYWRIGHT_OUTPUT_DIR: ".playwright-mcp",
192
+ PLAYWRIGHT_OUTPUT_DIR: ".tmp/playwright",
193
193
  },
194
194
  };
195
195
  changed = true;