@simplysm/sd-claude 13.0.78 → 13.0.80

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 (64) hide show
  1. package/claude/rules/sd-claude-rules.md +4 -63
  2. package/claude/rules/sd-simplysm-usage.md +7 -0
  3. package/claude/sd-session-start.sh +10 -0
  4. package/claude/skills/sd-api-review/SKILL.md +89 -0
  5. package/claude/skills/sd-check/SKILL.md +55 -57
  6. package/claude/skills/sd-commit/SKILL.md +37 -42
  7. package/claude/skills/sd-debug/SKILL.md +75 -265
  8. package/claude/skills/sd-document/SKILL.md +63 -53
  9. package/claude/skills/sd-document/_common.py +94 -0
  10. package/claude/skills/sd-document/extract_docx.py +19 -48
  11. package/claude/skills/sd-document/extract_pdf.py +22 -50
  12. package/claude/skills/sd-document/extract_pptx.py +17 -40
  13. package/claude/skills/sd-document/extract_xlsx.py +19 -40
  14. package/claude/skills/sd-email-analyze/SKILL.md +23 -31
  15. package/claude/skills/sd-email-analyze/email-analyzer.py +79 -65
  16. package/claude/skills/sd-init/SKILL.md +133 -0
  17. package/claude/skills/sd-plan/SKILL.md +69 -120
  18. package/claude/skills/sd-readme/SKILL.md +106 -131
  19. package/claude/skills/sd-review/SKILL.md +38 -155
  20. package/claude/skills/sd-simplify/SKILL.md +59 -0
  21. package/package.json +3 -2
  22. package/README.md +0 -297
  23. package/claude/refs/sd-angular.md +0 -127
  24. package/claude/refs/sd-code-conventions.md +0 -155
  25. package/claude/refs/sd-directories.md +0 -7
  26. package/claude/refs/sd-library-issue.md +0 -7
  27. package/claude/refs/sd-migration.md +0 -7
  28. package/claude/refs/sd-orm-v12.md +0 -81
  29. package/claude/refs/sd-orm.md +0 -23
  30. package/claude/refs/sd-service.md +0 -5
  31. package/claude/refs/sd-simplysm-docs.md +0 -52
  32. package/claude/refs/sd-solid.md +0 -68
  33. package/claude/refs/sd-workflow.md +0 -25
  34. package/claude/rules/sd-refs-linker.md +0 -52
  35. package/claude/sd-statusline.js +0 -296
  36. package/claude/skills/sd-api-name-review/SKILL.md +0 -154
  37. package/claude/skills/sd-brainstorm/SKILL.md +0 -215
  38. package/claude/skills/sd-debug/condition-based-waiting-example.ts +0 -158
  39. package/claude/skills/sd-debug/condition-based-waiting.md +0 -114
  40. package/claude/skills/sd-debug/defense-in-depth.md +0 -128
  41. package/claude/skills/sd-debug/find-polluter.sh +0 -64
  42. package/claude/skills/sd-debug/root-cause-tracing.md +0 -168
  43. package/claude/skills/sd-discuss/SKILL.md +0 -91
  44. package/claude/skills/sd-explore/SKILL.md +0 -118
  45. package/claude/skills/sd-plan-dev/SKILL.md +0 -294
  46. package/claude/skills/sd-plan-dev/code-quality-reviewer-prompt.md +0 -49
  47. package/claude/skills/sd-plan-dev/final-review-prompt.md +0 -50
  48. package/claude/skills/sd-plan-dev/implementer-prompt.md +0 -60
  49. package/claude/skills/sd-plan-dev/spec-reviewer-prompt.md +0 -45
  50. package/claude/skills/sd-review/api-reviewer-prompt.md +0 -75
  51. package/claude/skills/sd-review/code-reviewer-prompt.md +0 -82
  52. package/claude/skills/sd-review/convention-checker-prompt.md +0 -61
  53. package/claude/skills/sd-review/refactoring-analyzer-prompt.md +0 -92
  54. package/claude/skills/sd-skill/SKILL.md +0 -417
  55. package/claude/skills/sd-skill/anthropic-best-practices.md +0 -156
  56. package/claude/skills/sd-skill/cso-guide.md +0 -161
  57. package/claude/skills/sd-skill/examples/CLAUDE_MD_TESTING.md +0 -200
  58. package/claude/skills/sd-skill/persuasion-principles.md +0 -220
  59. package/claude/skills/sd-skill/testing-skills-with-subagents.md +0 -408
  60. package/claude/skills/sd-skill/writing-guide.md +0 -159
  61. package/claude/skills/sd-tdd/SKILL.md +0 -385
  62. package/claude/skills/sd-tdd/testing-anti-patterns.md +0 -317
  63. package/claude/skills/sd-use/SKILL.md +0 -67
  64. package/claude/skills/sd-worktree/SKILL.md +0 -78
@@ -1,191 +1,166 @@
1
1
  ---
2
2
  name: sd-readme
3
- description: "Sync README.md with source code (explicit invocation only)"
4
- argument-hint: "<package-name or path> (optional - omit to update all)"
5
- model: sonnet
3
+ description: "README 문서 생성", "sd-readme" 등을 요청할 때 사용.
6
4
  ---
7
5
 
8
- # sd-readme
6
+ # SD Readme — 모노레포 패키지 README 문서 생성기
9
7
 
10
- Sync package README.md with current source code by comparing exports against documentation.
8
+ 모노레포의 패키지에 대해 README.md 문서를 자동 생성한다. 패키지 규모에 따라 단일 README.md 또는 README.md + docs/*.md 구조로 점진적 공개(Progressive Disclosure) 원칙을 적용한다.
11
9
 
12
- ## Purpose
10
+ ARGUMENTS: 패키지명 (선택). 지정하면 해당 패키지만 처리, 미지정 시 전체 패키지 병렬 처리.
13
11
 
14
- README.md is the **sole API documentation source for Claude Code**. When Claude Code works in a consumer app using `@simplysm/*` packages, it reads README.md from `node_modules/` to understand the library API. Claude Code does NOT read JSDoc from source files.
12
+ ## 작업 방법
15
13
 
16
- **Therefore: every exported symbol must be documented in README.**
14
+ ```mermaid
15
+ flowchart TD
16
+ A[인자 파싱] --> B{패키지명 지정?}
17
+ B -- Yes --> C[README.md 생성]
18
+ B -- No --> D[public 패키지 목록 수집]
19
+ D --> E[패키지별 Agent 병렬 실행]
20
+ E -- 각 Agent --> C
21
+ ```
17
22
 
18
- ## Modes
23
+ ### A. 인자 파싱
19
24
 
20
- - **Single package** (`$ARGUMENTS` = package name or path): Update one package's README
21
- - **Batch** (`$ARGUMENTS` empty): Discover and update all packages in parallel
25
+ 스킬 호출 전달된 ARGUMENTS에서 패키지명을 추출하라.
22
26
 
23
- ## README Writing Rules
27
+ - **패키지명 지정됨** → `packages/` 하위에서 해당 디렉토리를 찾아 바로 **C. README.md 생성**으로 이동.
28
+ - **패키지명 미지정** → **D. public 패키지 목록 수집**으로 이동.
24
29
 
25
- - Written in **English**
26
- - All code examples must include **import paths**: `import { ... } from "@simplysm/..."`
27
- - **Every export** from `index.ts` must be documented — including those with `@internal` JSDoc
28
- - No changelog, version history, or "recently updated" sections
29
- - Section organization follows `index.ts` `#region` structure
30
- - Heading levels: `##` for major sections, `###` for sub-sections
30
+ ### C. README.md 생성
31
31
 
32
- ### Standard Structure
32
+ 대상 패키지 하나에 대해 아래를 수행하라.
33
33
 
34
- ```markdown
35
- # @simplysm/{package-name}
34
+ #### C-1. package.json 분석
36
35
 
37
- {One-line description}
36
+ `packages/<name>/package.json`을 읽어라:
38
37
 
39
- ## Installation
38
+ 1. `name` 및 `description`을 확인하라.
39
+ 2. `"private": true`이면 해당 패키지를 **건너뛰어라**.
40
+ 3. 패키지 진입점 소스코드가 무엇인지 확인하라.
40
41
 
41
- ## Main Modules
42
+ #### C-2. 소스 코드 분석
42
43
 
43
- ### {Category matching index.ts #region}
44
+ 1. 진입점 파일 export를 재귀적으로 모두 읽어, 모든 public API를 수집하라.
45
+ 2. JSDoc 주석이 있으면 각 항목의 설명으로 활용하라.
44
46
 
45
- - Description + code examples per export
47
+ #### C-3. 문서 구조 결정 생성
46
48
 
47
- ## Types
49
+ 소스 코드의 규모와 논리적 카테고리 수를 보고, 아래 두 가지 중 적절한 구조를 **자율적으로** 판단하라:
48
50
 
49
- ## Dependencies (only when peer deps exist)
50
- ```
51
+ - **단일 README.md**: 패키지가 작고 API가 적어 카테고리 분류가 불필요한 경우
52
+ - **README.md + docs/*.md**: 패키지가 크거나 논리적 카테고리가 여러 개인 경우
51
53
 
52
- ### docs/ Subfolder Rules
54
+ 기존 README.md 또는 docs/가 있으면 기존 내용을 기반으로 **변경된 부분만 수정**하라. 기존 문서가 없으면 새로 생성하라.
55
+ 구조가 변경되는 경우(B→A) 불필요해진 `docs/` 디렉토리를 삭제하라.
56
+ **영어**로 작성하라.
53
57
 
54
- When README exceeds ~500 lines, split detailed documentation into `docs/`:
58
+ #### C-4. package.json files 필드 관리
55
59
 
56
- - README.md becomes an **overview/index** with links: `[functionName](docs/category.md#anchor)`
57
- - docs/ files contain detailed descriptions, full code examples, parameter tables
58
- - File organization follows index.ts `#region` (e.g., `docs/types.md`, `docs/utils.md`)
60
+ `docs/` 디렉토리 생성·삭제 `package.json`의 `files` 배열을 함께 업데이트하라:
59
61
 
60
- When README is under ~500 lines, keep everything inline.
62
+ - **구조 B 적용 시**: `files`에 `"docs"` 항목이 없으면 추가하라.
63
+ - **구조 A 적용 시**: `files`에 `"docs"` 항목이 있으면 제거하라.
61
64
 
62
- **If docs/ already exists, maintain and update it. Do not remove an existing docs/ structure.**
65
+ ---
63
66
 
64
- ## Single Package Mode
67
+ ##### 구조 A: 단일 README.md (소규모 패키지)
68
+
69
+ `packages/<name>/README.md` 파일을 생성하라:
70
+
71
+ ```markdown
72
+ # <package-name from package.json>
65
73
 
66
- ### Step 1: Resolve Path
74
+ > <description from package.json>
67
75
 
68
- `$ARGUMENTS` may be a package name or path (e.g., `core-common`, `packages/core-common`).
69
- If not starting with `packages/`, prepend it.
76
+ <패키지의 주요 기능과 목적에 대한 상세 설명을 영어로 작성>
70
77
 
71
- ### Step 2: Build Export Map (Source of Truth)
78
+ ## API Reference
72
79
 
73
- 1. Read `<pkg-path>/src/index.ts` — get all exports and their `#region` grouping
74
- 2. For each exported module, read the source file to extract:
75
- - Function signatures (params, return type, overloads)
76
- - Class public API (constructor, methods, properties)
77
- - Type/interface definitions
78
- - Default values, options objects
80
+ ### <exportedName>
79
81
 
80
- ### Step 3: Build Documentation Map
82
+ ```typescript
83
+ <export 시그니처 코드>
84
+ ```
81
85
 
82
- Read `<pkg-path>/README.md` (if exists). If docs/ exists, read those files too.
83
- Map each documented item to its current documentation content.
86
+ <해당 API에 대한 설명>
84
87
 
85
- ### Step 4: Diff and Report
88
+ ---
86
89
 
87
- Compare export map (Step 2) against documentation map (Step 3):
90
+ (... 모든 exported 항목에 대해 반복 ...)
88
91
 
89
- | Status | Meaning |
90
- | ----------- | ------------------------------------ |
91
- | **ADDED** | Exported in source but not in README |
92
- | **REMOVED** | In README but no longer exported |
93
- | **CHANGED** | Both exist but API signature differs |
94
- | **OK** | Documentation matches source |
92
+ ## Usage Examples
95
93
 
96
- **Report to user before editing:**
94
+ ```typescript
95
+ import { ... } from "<package-name>";
97
96
 
97
+ // 주요 사용 예제 코드
98
+ ```
98
99
  ```
99
- ADDED (3):
100
- - strToCamelCase (from utils/str.ts)
101
- - objGetChainValueByDepth (from utils/obj.ts)
102
- - ZipArchiveProgress type (from zip/sd-zip.ts)
103
100
 
104
- REMOVED (1):
105
- - oldFunction (no longer exported)
101
+ ---
106
102
 
107
- CHANGED (2):
108
- - objMerge: added `deep` parameter
109
- - Set.toggle: added `addOrDel` optional parameter
103
+ ##### 구조 B: README.md + docs/*.md (대규모 패키지)
110
104
 
111
- OK: 45 items unchanged
112
- ```
105
+ **README.md** `packages/<name>/README.md` 파일을 생성하라:
106
+
107
+ ```markdown
108
+ # <package-name from package.json>
113
109
 
114
- **Wait for user confirmation before proceeding to edit.**
110
+ > <description from package.json>
115
111
 
116
- ### Step 5: Apply Updates
112
+ <패키지의 주요 기능과 목적에 대한 상세 설명을 영어로 작성>
117
113
 
118
- - **ADDED**: Write documentation matching existing style. Place in the section matching the item's `#region` in index.ts. Include description + code example with import path.
119
- - **REMOVED**: Delete the documentation entry.
120
- - **CHANGED**: Update existing entry to match current API. Preserve code examples if still valid.
121
- - **OK**: Do not touch.
114
+ ## Documentation
122
115
 
123
- **If README uses docs/ links**: update the corresponding docs/ file, not just README.
116
+ | Category | Description |
117
+ |----------|-------------|
118
+ | [<Category1>](docs/<category1>.md) | <카테고리 설명 및 주요 항목 나열> |
119
+ | [<Category2>](docs/<category2>.md) | <카테고리 설명 및 주요 항목 나열> |
120
+ | ... | ... |
121
+ ```
122
+
123
+ **docs/*.md** — 각 카테고리별로 `packages/<name>/docs/<category>.md` 파일을 생성하라:
124
124
 
125
- ### Step 6: Size Check
125
+ ```markdown
126
+ # <Category Name>
126
127
 
127
- After updates, if README exceeds ~500 lines and no docs/ exists:
128
- suggest splitting to the user (do not auto-split without confirmation).
128
+ ## <exportedName>
129
129
 
130
- ## Batch Mode
130
+ ```typescript
131
+ <export 시그니처 코드>
132
+ ```
133
+
134
+ <해당 API에 대한 설명>
135
+
136
+ ---
131
137
 
132
- When `$ARGUMENTS` is empty:
138
+ (... 카테고리의 모든 exported 항목에 대해 반복 ...)
133
139
 
134
- 1. Discover all packages: Glob `packages/*/package.json`
135
- 2. Launch **parallel subagents** (`subagent_type: "general-purpose"`, `model: "sonnet"`) — one per package + one for project root:
140
+ ## Usage Examples
136
141
 
137
- **Per-package subagent prompt template:**
142
+ ```typescript
143
+ import { ... } from "<package-name>";
138
144
 
145
+ // 이 카테고리의 주요 사용 예제 코드
139
146
  ```
140
- Update README.md for package {pkg-name} at {pkg-path}.
141
-
142
- PURPOSE: README.md is the sole API documentation source for Claude Code.
143
- Every exported symbol must be documented. Claude Code does NOT read JSDoc.
144
-
145
- STEPS:
146
- 1. Read {pkg-path}/src/index.ts — get all exports and #region grouping.
147
- 2. For each export, read the source file for signatures, classes, types.
148
- 3. Read {pkg-path}/README.md (and docs/ if exists).
149
- 4. Compare exports vs documentation:
150
- - ADDED (in source, not in README): add documentation with description + code example.
151
- Include import path: import { X } from "@simplysm/{pkg-name}"
152
- - REMOVED (in README, not in source): delete documentation.
153
- - CHANGED (both exist, API differs): update to match current API.
154
- - OK: don't touch.
155
- 5. Section organization follows index.ts #region structure.
156
- 6. Write in English. No changelog sections.
157
- 7. If README doesn't exist, create with standard structure:
158
- # @simplysm/{pkg-name}
159
- {description from package.json}
160
- ## Installation
161
- ## Main Modules (sections per #region)
162
- ## Types
163
- 8. If docs/ subfolder exists, update those files too.
164
- 9. Report: list of ADDED/REMOVED/CHANGED items.
165
147
  ```
166
148
 
167
- **Project root subagent prompt:**
149
+ 카테고리명과 분류는 소스 코드의 디렉토리 구조, 기능적 유사성 등을 고려하여 자율적으로 결정하라.
150
+
151
+ ---
152
+
153
+ ### D. public 패키지 목록 수집
154
+
155
+ `packages/*/package.json`을 Glob으로 탐색하되, `private: true`인 패키지는 제외하라.
156
+
157
+ ---
158
+
159
+ ### E. 패키지별 Agent 병렬 실행
168
160
 
161
+ 남은 각 패키지에 대해 Agent 도구를 사용하여 **병렬로** 다음 프롬프트를 전달하라:
169
162
  ```
170
- Update the project root README.md at {project-root}/README.md.
171
- Read CLAUDE.md for project context.
172
- Compare current README against project structure and packages.
173
- Edit only sections that are outdated. Write in English.
174
- Report what was changed.
163
+ /sd-readme <패키지명>
175
164
  ```
176
165
 
177
- 3. Collect all results. Report summary: which READMEs were updated, which had no changes.
178
-
179
- ## Common Mistakes
180
-
181
- | Mistake | Fix |
182
- | ------------------------------------- | ------------------------------------------------------------------- |
183
- | Skipping exports with @internal JSDoc | Document ALL exports — Claude Code doesn't read JSDoc |
184
- | Rewriting OK sections | Only touch ADDED/REMOVED/CHANGED items |
185
- | Ignoring existing docs/ structure | If docs/ exists, update those files too |
186
- | Arbitrary section reorganization | Follow index.ts `#region` structure |
187
- | Missing import paths in examples | Always: `import { X } from "@simplysm/..."` |
188
- | Writing in non-English languages | README must be in English |
189
- | Adding changelog sections | Never add version history |
190
- | Editing before reporting diff | Always report ADDED/REMOVED/CHANGED and wait for confirmation |
191
- | Destroying docs/ link format | If README uses `[name](docs/file.md#anchor)`, preserve that pattern |
166
+ 모든 subagent가 완료되면 종료.
@@ -1,182 +1,65 @@
1
1
  ---
2
2
  name: sd-review
3
- description: "Use when the user explicitly requests code review, refactoring analysis, or structural improvement. Covers correctness, safety, API design, conventions, complexity, duplication, and code structure. Explicit invocation only."
3
+ description: "버그 리뷰", "bug review", "sd-review", "코드 리뷰", "버그 찾기" 등을 요청할 사용. 지정한 경로의 코드에서 잠재적 버그를 분석한 계획 수립을 거쳐 수정한다.
4
4
  ---
5
5
 
6
- # sd-review
6
+ # SD Review — 잠재적 버그 탐지
7
7
 
8
- ## Overview
8
+ 지정한 경로의 코드를 읽고 잠재적 버그를 분석한 뒤, `/sd-plan` 프로세스로 계획을 수립하고 실행한다.
9
9
 
10
- Comprehensive code analysis combining **defect review** (correctness, safety, API, conventions) and **refactoring analysis** (structure, simplification). Uses **sd-explore** to minimize redundant file reads, then dispatches reviewers with pre-filtered context.
10
+ ARGUMENTS: 대상 경로 (필수). 레포 임의 경로를 지정한다.
11
11
 
12
- **Analysis only — no code modifications.**
13
-
14
- ## Principles
15
-
16
- - **Breaking changes are irrelevant**: Reviewers must NOT dismiss findings because the fix would cause a breaking change.
17
-
18
- ## Usage
19
-
20
- - `/sd-review packages/solid` — full review (all perspectives)
21
- - `/sd-review packages/solid focus on bugs` — selective review
22
- - `/sd-review packages/solid focus on refactoring` — structural analysis only
23
- - `/sd-review` — if no argument, ask the user for the target path
24
-
25
- ## Target Selection
26
-
27
- - With argument: review source code at the given path
28
- - Without argument: ask the user for the target path
29
-
30
- **Important:** Review ALL source files under the target path. Do not use git status or git diff to limit scope.
31
-
32
- ## Reviewer Perspectives
33
-
34
- | Reviewer | Prompt Template | Tag | Perspective |
35
- |----------|----------------|-----|-------------|
36
- | **Code Reviewer** | `code-reviewer-prompt.md` | `[CORRECTNESS]` | Correctness & Safety |
37
- | **API Reviewer** | `api-reviewer-prompt.md` | `[API]` | Usability & DX |
38
- | **Convention Checker** | `convention-checker-prompt.md` | *(all files)* | Project rules — Grep-based |
39
- | **Refactoring Analyzer** | `refactoring-analyzer-prompt.md` | `[REFACTOR]` | Structure & Simplification |
40
-
41
- ## Reviewer Selection
42
-
43
- By default, run **all 4 reviewers**. If the user specifies a focus, select relevant reviewer(s):
44
-
45
- | User says | Run |
46
- |-----------|-----|
47
- | "bugs", "security", "safety", "architecture", "dependencies" | Code Reviewer |
48
- | "API", "naming", "types", "DX" | API Reviewer |
49
- | "conventions", "rules", "patterns" | Convention Checker |
50
- | "simplify", "complexity", "duplication", "structure", "module" | Refactoring Analyzer |
51
- | "defects", "correctness" | Code + API + Convention |
52
- | "refactoring", "refactor", "maintainability" | Refactoring Analyzer |
53
- | (no specific focus) | All 4 |
54
-
55
- ## Workflow
56
-
57
- ### Step 1: Prepare Context
58
-
59
- Read these files:
60
- - `CLAUDE.md` — project overview
61
- - `.claude/rules/sd-refs-linker.md` — reference guide
62
- - Target's `package.json` — version (v12/v13)
63
-
64
- Based on version and target, read all applicable reference files (e.g., `sd-code-conventions.md`, `sd-solid.md`).
65
-
66
- Keep the collected conventions in memory — they will be inlined into each reviewer's prompt in Step 3.
67
-
68
- ### Step 2: Explore (via sd-explore)
12
+ ---
69
13
 
70
- Follow the **sd-explore** workflow to read all source files under the target.
14
+ ## Step 1: 인자 확인
71
15
 
72
- **sd-explore input:**
16
+ 1. ARGUMENTS에서 대상 경로를 추출하라.
17
+ 2. 경로가 없으면 "대상 경로를 지정해 주세요. 예: `/sd-review packages/my-pkg`"라고 안내하고 종료하라.
73
18
 
74
- - **Target path**: the review target directory
75
- - **Name**: `review`
76
- - **File patterns**: `**/*.ts`, `**/*.tsx` (exclude `node_modules`, `dist`)
77
- - **Analysis instructions**:
19
+ ## Step 2: 버그 분석 (수정 금지)
78
20
 
79
- "For each file:
80
- 1. Write a 1-2 line summary of what it does
81
- 2. Tag files that need deep review (~30-50% of files; a file can have multiple tags)
21
+ 대상 경로의 코드를 읽고 아래 5가지 관점에서 잠재적 버그를 찾아라.
22
+ 코드를 절대 수정하지 마라. 발견 항목 목록만 정리하여 출력하라.
82
23
 
83
- Tag criteria:
84
- - [CORRECTNESS]Unguarded null/! assertions, async races, DOM manipulation (SSR risks), resource lifecycle gaps, swallowed exceptions, mutable state for sync
85
- - [API]Public exports, complex type signatures/generics/overloads, props/options interfaces, naming inconsistency
86
- - [REFACTOR]File > 300 lines or function > 50 lines, deep nesting (> 3 levels), similar patterns across files, mixed abstraction levels, mixed responsibilities
24
+ **분석 관점:**
25
+ 1. **로직/정확성**잘못된 조건, off-by-one, 잘못된 연산자, 의도와 다른 분기
26
+ 2. **Null/Undefined 안전성** 누락된 null 체크, optional chaining 미사용, 타입 단언 오용
27
+ 3. **에러 처리** 삼켜진 에러, 누락된 catch, 부적절한 에러 전파
28
+ 4. **엣지 케이스** — 빈 배열/문자열, 경계값, 동시성/race condition, 누락된 await
29
+ 5. **리소스 관리** — 닫히지 않은 연결, 이벤트 리스너 누수, 메모리 릭 패턴
87
30
 
88
- Output format:
31
+ 항목은 다음 형식으로 작성하라:
89
32
  ```
90
- # Explore: [directory names]
91
-
92
- ## File Summaries
93
- - `path/to/file.ts` — Brief description
94
-
95
- ## Tagged Files
96
- ### CORRECTNESS
97
- - `path/to/file.ts:42` — Suspected issue description
98
- ### API
99
- - `path/to/file.ts` — Why this needs API review
100
- ### REFACTOR
101
- - `path/to/file.ts` — Structural concern
33
+ - **파일경로:라인** 문제 설명 — 개선 방안
102
34
  ```
103
35
 
104
- Files not listed under Tagged Files are considered clean. Do NOT add tags in File Summaries — Tagged Files is the single source of truth."
105
-
106
- ### Step 3: Dispatch Reviewers (Parallel)
36
+ 발견 항목이 없으면 "잠재적 버그가 발견되지 않았습니다."라고 안내하고 종료하라.
107
37
 
108
- Read each reviewer's prompt template. Replace:
109
- - `[CONVENTIONS]` → the conventions text collected in Step 1 (inline, not a file path)
110
- - `[EXPLORE_FILES]` → comma-separated list of explore output file paths
38
+ ## Step 3: sd-plan으로 계획 수립
111
39
 
112
- Dispatch selected reviewers in parallel.
40
+ Step 2에서 도출된 발견 항목 목록을 작업 설명으로 하여, Skill 도구로 `sd-plan`을 호출하라. args에 아래를 전달하라:
113
41
 
114
- ### Step 4: Verify & Deduplicate
115
-
116
- This is the **orchestrator-level** verification. Reviewers already self-verify, but findings can still be invalid or overlap.
117
-
118
- **MANDATORY: Read actual code for EVERY finding.** For each finding, you MUST `Read` the file at the referenced location before deciding keep/drop. Do NOT rely on reviewer descriptions alone — verify against the actual code. A finding that was not verified by reading the source code CANNOT pass this step.
119
-
120
- **Deduplication**: If multiple reviewers flag the same code location, keep the finding under the most specific reviewer:
121
- - Convention violation + correctness concern → Convention Checker owns it
122
- - API issue + structural concern → API Reviewer owns it
123
- - When unclear, keep the one with stronger evidence
124
-
125
- **For defect findings (Code, API, Convention):**
126
-
127
- Read the code, then drop if: self-contradicted, type-only (no runtime trigger), out of scope, duplicate, bikeshedding, severity inflated, already handled, intentional pattern, misread, tradeoff-negative.
128
-
129
- **For refactoring findings:**
130
-
131
- Read the code at both/all referenced locations, then check:
132
-
133
- - **Scope**: structural issue? within target? not a duplicate?
134
- - **Duplication reality**: count the actual shared lines (not the reviewer's estimate). < 30 lines → drop. Behavioral differences between the "duplicated" code → drop. Intentional Input/Normalized pattern → drop.
135
- - **Separation benefit**: < ~150 lines AND tightly coupled → drop. Single cohesive domain → drop. Not independently reusable → drop.
136
- - **By design**: established pattern used consistently → drop.
137
- - **Tradeoff-negative**: introduces more complexity than it removes → drop.
42
+ ```
43
+ 아래는 **LLM이 분석하여 제안한** 잠재적 버그 수정안이다.
44
+ 수정안은 사용자가 명시적으로 요청한 수정이 아니므로, 불명확한 것으로 취급하라.
138
45
 
139
- ### Step 5: Report
46
+ ## 대상
47
+ <대상 경로>
140
48
 
141
- Present **both** invalid and valid findings:
49
+ ## LLM 제안 수정안
50
+ 불명확한 수정안을 사용자에게 질문할 때, 아래 내용을 **반드시 먼저** 제시하여 사용자가 맥락을 파악할 수 있도록 하라.
142
51
 
143
52
  ```
144
- ## Review: <target-path>
145
-
146
- ### Invalid Findings
147
- [grouped by rejection reason brief, one line each]
148
-
149
- ### Valid Findings
150
- [full details for each verified finding]
53
+ 수정안:
54
+ - 파일경로:라인:
55
+ - 문제 설명:
56
+ - 현재 코드: (해당 부분 코드 발췌)
57
+ - 개선 방안:
151
58
  ```
152
59
 
153
- If no valid findings, report that and end here.
154
-
155
- **If valid findings exist, you MUST proceed to Step 6. Do NOT ask the user whether to apply findings directly.**
156
-
157
- ### Step 6: Brainstorm Handoff
158
-
159
- Invoke **sd-brainstorm** with all valid findings as context:
160
- _
161
- "Design fixes for the following review findings.
162
-
163
- **For each finding, you MUST:**
164
- 1. Review it thoroughly — examine the code, understand the context, assess the real impact
165
- 2. If any aspect is unclear or ambiguous, ask the user (one question at a time, per brainstorm rules)
166
- 3. If a finding has low cost-benefit (adds complexity for marginal gain, pure style preference, scope too small), drop it. After triage, briefly list all dropped findings with one-line reasons (no user confirmation needed).
167
- 4. For findings worth fixing, explore approaches and design solutions
168
-
169
- Findings that survive your triage become the design scope. Apply your normal brainstorm process (gap review → approaches → design presentation) to the surviving findings as a group.
170
-
171
- <include all valid findings with their reviewer tag, file:line, problem description, and current code snippet>"
172
-
173
- sd-brainstorm then owns the full cycle: triage (with user input as needed) → design.
60
+ <Step 2에서 도출된 발견 항목 목록 전체>
61
+ ```
174
62
 
175
- ## Common Mistakes
63
+ ## Step 4: 계획 실행
176
64
 
177
- | Mistake | Fix |
178
- |---------|-----|
179
- | Using git diff to limit scope | Review ALL source files under target |
180
- | Skipping verification | Always verify against actual code |
181
- | Running all reviewers for focused requests | Match selection to user's request |
182
- | Building per-reviewer files from explore results | Reviewers read explore files directly — no intermediate step |
65
+ sd-plan이 완료되어 확정된 계획서가 나오면, 그 계획서에 따라 코드를 수정하라.
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: sd-simplify
3
+ description: "코드 단순화", "simplify", "sd-simplify", "코드 정제" 등을 요청할 때 사용. 지정한 경로의 코드를 분석 후 계획 수립을 거쳐 수정한다.
4
+ ---
5
+
6
+ # SD Simplify — 경로 지정 코드 단순화
7
+
8
+ 지정한 경로의 코드를 내장 `/simplify`로 분석한 뒤, `/sd-plan` 프로세스로 계획을 수립하고 실행한다.
9
+
10
+ ARGUMENTS: 대상 경로 (필수). 레포 내 임의 경로를 지정한다.
11
+
12
+ ---
13
+
14
+ ## Step 1: 인자 확인
15
+
16
+ 1. ARGUMENTS에서 대상 경로를 추출하라.
17
+ 2. 경로가 없으면 "대상 경로를 지정해 주세요. 예: `/sd-simplify packages/my-pkg`"라고 안내하고 종료하라.
18
+
19
+ ## Step 2: simplify 분석 (수정 금지)
20
+
21
+ Skill 도구로 `simplify`를 호출하라. args에 아래 지침을 전달하라:
22
+
23
+ ```
24
+ <대상 경로> 경로의 현재 코드베이스를 대상으로 리뷰하라. (최근 변경 코드가 아님)
25
+ 단, 코드를 절대 수정하지 마라. 수정할 점 목록만 정리하여 출력하라.
26
+ 각 항목은 다음 형식으로 작성하라:
27
+ - **파일경로:라인** — 문제 설명 — 개선 방안
28
+ ```
29
+
30
+ `<대상 경로>` 부분은 Step 1에서 추출한 실제 경로로 치환하라.
31
+
32
+ ## Step 3: sd-plan으로 계획 수립
33
+
34
+ Step 2에서 도출된 수정할 점 목록을 작업 설명으로 하여, Skill 도구로 `sd-plan`을 호출하라. args에 아래를 전달하라:
35
+
36
+ ```
37
+ 아래는 **LLM이 분석하여 제안한** 코드 개선안이다.
38
+ 개선안은 사용자가 명시적으로 요청한 수정이 아니므로, 불명확한 것으로 취급하라.
39
+
40
+ ## 대상
41
+ <대상 경로>
42
+
43
+ ## LLM 제안 개선안
44
+ 불명확한 개선안을 사용자에게 질문할 때, 아래 내용을 **반드시 먼저** 제시하여 사용자가 맥락을 파악할 수 있도록 하라.
45
+
46
+ ```
47
+ 개선안:
48
+ - 파일경로:라인:
49
+ - 문제 설명:
50
+ - 현재 코드: (해당 부분 코드 발췌)
51
+ - 개선 방안:
52
+ ```
53
+
54
+ <Step 2에서 도출된 수정할 점 목록 전체>
55
+ ```
56
+
57
+ ## Step 4: 계획 실행
58
+
59
+ sd-plan이 완료되어 확정된 계획서가 나오면, 그 계획서에 따라 코드를 수정하라.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplysm/sd-claude",
3
- "version": "13.0.78",
3
+ "version": "13.0.80",
4
4
  "description": "Simplysm Claude Code CLI — asset installer",
5
5
  "author": "simplysm",
6
6
  "license": "Apache-2.0",
@@ -17,7 +17,8 @@
17
17
  "src",
18
18
  "tests",
19
19
  "scripts",
20
- "claude"
20
+ "claude",
21
+ "docs"
21
22
  ],
22
23
  "sideEffects": false,
23
24
  "dependencies": {