@simplysm/sd-claude 13.0.69 → 13.0.71

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 (78) hide show
  1. package/README.md +12 -601
  2. package/claude/agents/sd-api-reviewer.md +0 -1
  3. package/claude/agents/sd-code-reviewer.md +0 -1
  4. package/claude/agents/sd-code-simplifier.md +1 -1
  5. package/claude/agents/sd-security-reviewer.md +0 -1
  6. package/claude/refs/sd-angular.md +26 -26
  7. package/claude/refs/sd-orm-v12.md +17 -17
  8. package/claude/rules/sd-refs-linker.md +14 -14
  9. package/claude/sd-statusline.js +21 -21
  10. package/claude/skills/sd-api-name-review/SKILL.md +1 -2
  11. package/claude/skills/sd-brainstorm/SKILL.md +3 -4
  12. package/claude/skills/sd-check/SKILL.md +1 -2
  13. package/claude/skills/sd-commit/SKILL.md +2 -3
  14. package/claude/skills/sd-debug/SKILL.md +1 -2
  15. package/claude/skills/sd-discuss/SKILL.md +1 -3
  16. package/claude/skills/sd-document/SKILL.md +99 -0
  17. package/claude/skills/sd-document/extract_docx.py +92 -0
  18. package/claude/skills/sd-document/extract_pdf.py +102 -0
  19. package/claude/skills/sd-document/extract_pptx.py +77 -0
  20. package/claude/skills/sd-document/extract_xlsx.py +83 -0
  21. package/claude/skills/sd-email-analyze/SKILL.md +6 -6
  22. package/claude/skills/sd-plan/SKILL.md +1 -3
  23. package/claude/skills/sd-plan-dev/SKILL.md +94 -111
  24. package/claude/skills/sd-plan-dev/code-quality-reviewer-prompt.md +1 -1
  25. package/claude/skills/sd-plan-dev/final-review-prompt.md +1 -1
  26. package/claude/skills/sd-plan-dev/spec-reviewer-prompt.md +1 -1
  27. package/claude/skills/sd-readme/SKILL.md +107 -88
  28. package/claude/skills/sd-review/SKILL.md +14 -16
  29. package/claude/skills/sd-skill/SKILL.md +6 -317
  30. package/claude/skills/sd-skill/cso-guide.md +161 -0
  31. package/claude/skills/sd-skill/writing-guide.md +163 -0
  32. package/claude/skills/sd-tdd/SKILL.md +1 -3
  33. package/claude/skills/sd-use/SKILL.md +1 -3
  34. package/claude/skills/sd-worktree/SKILL.md +52 -2
  35. package/dist/commands/auth-add.d.ts +2 -0
  36. package/dist/commands/auth-add.d.ts.map +1 -0
  37. package/dist/commands/auth-add.js +32 -0
  38. package/dist/commands/auth-add.js.map +6 -0
  39. package/dist/commands/auth-list.d.ts +2 -0
  40. package/dist/commands/auth-list.d.ts.map +1 -0
  41. package/dist/commands/auth-list.js +37 -0
  42. package/dist/commands/auth-list.js.map +6 -0
  43. package/dist/commands/auth-remove.d.ts +2 -0
  44. package/dist/commands/auth-remove.d.ts.map +1 -0
  45. package/dist/commands/auth-remove.js +22 -0
  46. package/dist/commands/auth-remove.js.map +6 -0
  47. package/dist/commands/auth-use.d.ts +2 -0
  48. package/dist/commands/auth-use.d.ts.map +1 -0
  49. package/dist/commands/auth-use.js +33 -0
  50. package/dist/commands/auth-use.js.map +6 -0
  51. package/dist/commands/auth-utils.d.ts +11 -0
  52. package/dist/commands/auth-utils.d.ts.map +1 -0
  53. package/dist/commands/auth-utils.js +57 -0
  54. package/dist/commands/auth-utils.js.map +6 -0
  55. package/dist/commands/install.js +3 -3
  56. package/dist/commands/install.js.map +1 -1
  57. package/dist/index.d.ts +5 -0
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +5 -0
  60. package/dist/index.js.map +1 -1
  61. package/dist/sd-claude.js +68 -3
  62. package/dist/sd-claude.js.map +1 -1
  63. package/package.json +3 -2
  64. package/scripts/sync-claude-assets.mjs +1 -1
  65. package/src/commands/auth-add.ts +36 -0
  66. package/src/commands/auth-list.ts +44 -0
  67. package/src/commands/auth-remove.ts +26 -0
  68. package/src/commands/auth-use.ts +53 -0
  69. package/src/commands/auth-utils.ts +65 -0
  70. package/src/commands/install.ts +19 -19
  71. package/src/index.ts +5 -0
  72. package/src/sd-claude.ts +81 -3
  73. package/tests/auth-add.spec.ts +74 -0
  74. package/tests/auth-list.spec.ts +175 -0
  75. package/tests/auth-remove.spec.ts +74 -0
  76. package/tests/auth-use.spec.ts +153 -0
  77. package/tests/auth-utils.spec.ts +173 -0
  78. package/claude/skills/sd-explore/SKILL.md +0 -78
@@ -1,66 +1,79 @@
1
1
  ---
2
2
  name: sd-readme
3
- description: Package README.md sync with current source code exports
4
- disable-model-invocation: true
3
+ description: "Sync README.md with source code (explicit invocation only)"
5
4
  argument-hint: "<package-name or path> (optional - omit to update all)"
6
5
  model: sonnet
7
6
  ---
8
7
 
9
8
  # sd-readme
10
9
 
11
- Sync package README.md with current source code by comparing exports against documentation.
10
+ Sync package README.md source index with current exports from `index.ts`.
12
11
 
13
12
  ## Purpose
14
13
 
15
- 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.
14
+ `@simplysm/*` packages ship `.ts` source and test files. Claude Code reads source files directly from `node_modules/` for API details (props, types, signatures, usage patterns).
16
15
 
17
- **Therefore: every exported symbol must be documented in README.**
16
+ **README.md is a source file index** it tells Claude Code **which files to read**, not the API itself.
18
17
 
19
18
  ## Modes
20
19
 
21
20
  - **Single package** (`$ARGUMENTS` = package name or path): Update one package's README
22
21
  - **Batch** (`$ARGUMENTS` empty): Discover and update all packages in parallel
23
22
 
24
- ## README Writing Rules
23
+ ## What Goes Where
25
24
 
26
- - Written in **English**
27
- - All code examples must include **import paths**: `import { ... } from "@simplysm/..."`
28
- - **Every export** from `index.ts` must be documented — including those with `@internal` JSDoc
29
- - No changelog, version history, or "recently updated" sections
30
- - Section organization follows `index.ts` `#region` structure
31
- - Heading levels: `##` for major sections, `###` for sub-sections
25
+ | In README | NOT in README (read from source) |
26
+ |-----------|----------------------------------|
27
+ | Package description (one-line) | Prop tables |
28
+ | Installation + peer dependencies | Code examples |
29
+ | Setup/configuration (Provider tree, Tailwind preset) | Type/interface definitions |
30
+ | **Source index table** | API signatures |
31
+ | License | Behavioral descriptions |
32
32
 
33
- ### Standard Structure
33
+ ## README Structure
34
34
 
35
35
  ```markdown
36
36
  # @simplysm/{package-name}
37
37
 
38
- {One-line description}
38
+ {One-line description from package.json}
39
39
 
40
40
  ## Installation
41
41
 
42
- ## Main Modules
42
+ pnpm add @simplysm/{package-name}
43
43
 
44
- ### {Category matching index.ts #region}
44
+ **Peer Dependencies:** (if any)
45
45
 
46
- - Description + code examples per export
46
+ ## Configuration
47
47
 
48
- ## Types
48
+ {Only for setup patterns — Provider wrapping, Tailwind preset, etc.}
49
+ {Include brief code snippets for wiring, NOT per-component API}
49
50
 
50
- ## Dependencies (only when peer deps exist)
51
- ```
51
+ ## Source Index
52
+
53
+ ### {Category matching index.ts #region}
52
54
 
53
- ### docs/ Subfolder Rules
55
+ | Source | Exports | Description | Test |
56
+ |--------|---------|-------------|------|
57
+ | `src/path/to/File.tsx` | `ComponentA`, `ComponentB` | Brief one-line description | `File.test.tsx` |
58
+ | `src/path/to/types.ts` | `TypeA`, `TypeB` | Type definitions for X | - |
54
59
 
55
- When README exceeds ~500 lines, split detailed documentation into `docs/`:
60
+ ## License
61
+ ```
56
62
 
57
- - README.md becomes an **overview/index** with links: `[functionName](docs/category.md#anchor)`
58
- - docs/ files contain detailed descriptions, full code examples, parameter tables
59
- - File organization follows index.ts `#region` (e.g., `docs/types.md`, `docs/utils.md`)
63
+ **Source index table rules:**
64
+ - One row per `export *` statement in `index.ts`
65
+ - Exports column: list all exported symbols from that file
66
+ - Description column: brief one-line summary of what the file provides (enough for Claude Code to decide whether to read the source)
67
+ - Test column: test file name if exists, `-` if not
68
+ - Source paths relative to package root
60
69
 
61
- When README is under ~500 lines, keep everything inline.
70
+ ## General Rules
62
71
 
63
- **If docs/ already exists, maintain and update it. Do not remove an existing docs/ structure.**
72
+ - Written in **English**
73
+ - Sections follow `index.ts` `#region` structure
74
+ - **Every `export *`** from `index.ts` must appear in source index
75
+ - No changelog, version history, or "recently updated" sections
76
+ - Configuration section: only setup/wiring patterns, NOT per-component API
64
77
 
65
78
  ## Single Package Mode
66
79
 
@@ -71,62 +84,66 @@ If not starting with `packages/`, prepend it.
71
84
 
72
85
  ### Step 2: Build Export Map (Source of Truth)
73
86
 
74
- 1. Read `<pkg-path>/src/index.ts` — get all exports and their `#region` grouping
75
- 2. For each exported module, read the source file to extract:
76
- - Function signatures (params, return type, overloads)
77
- - Class public API (constructor, methods, properties)
78
- - Type/interface definitions
79
- - Default values, options objects
87
+ 1. Read `<pkg-path>/src/index.ts` — get all `export *` statements and their `#region` grouping
88
+ 2. For each `export * from "./path/to/file"`:
89
+ - Resolve actual file path (`.ts`, `.tsx`)
90
+ - Read file to extract exported symbol names
91
+ - Write a brief one-line description of what the file provides
92
+ - Check if test file exists (e.g., `File.test.tsx`, `File.spec.ts`)
80
93
 
81
- ### Step 3: Build Documentation Map
94
+ ### Step 3: Build Index Map
82
95
 
83
- Read `<pkg-path>/README.md` (if exists). If docs/ exists, read those files too.
84
- Map each documented item to its current documentation content.
96
+ Read `<pkg-path>/README.md` (if exists).
97
+ Extract existing source index table entries — map each source file to its row.
85
98
 
86
99
  ### Step 4: Diff and Report
87
100
 
88
- Compare export map (Step 2) against documentation map (Step 3):
101
+ Compare export map (Step 2) against index map (Step 3):
89
102
 
90
- | Status | Meaning |
91
- | ----------- | ------------------------------------ |
92
- | **ADDED** | Exported in source but not in README |
93
- | **REMOVED** | In README but no longer exported |
94
- | **CHANGED** | Both exist but API signature differs |
95
- | **OK** | Documentation matches source |
103
+ | Status | Meaning |
104
+ |--------|---------|
105
+ | **ADDED** | `export *` in index.ts but source file not in README index |
106
+ | **REMOVED** | In README index but no longer in index.ts |
107
+ | **CHANGED** | Same file, but exported symbols changed |
108
+ | **OK** | Index entry matches source |
96
109
 
97
110
  **Report to user before editing:**
98
111
 
99
112
  ```
100
- ADDED (3):
101
- - strToCamelCase (from utils/str.ts)
102
- - objGetChainValueByDepth (from utils/obj.ts)
103
- - ZipArchiveProgress type (from zip/sd-zip.ts)
113
+ ADDED (2):
114
+ - src/providers/i18n/I18nContext.tsx (useI18n, useI18nOptional, I18nProvider)
115
+ - src/providers/i18n/I18nContext.types.ts (I18nContextValue, I18nConfigureOptions, FlatDict)
104
116
 
105
117
  REMOVED (1):
106
- - oldFunction (no longer exported)
118
+ - src/components/SelectList.tsx (no longer exported)
107
119
 
108
- CHANGED (2):
109
- - objMerge: added `deep` parameter
110
- - Set.toggle: added `addOrDel` optional parameter
120
+ CHANGED (1):
121
+ - src/features/shared-data/SharedDataSelectList.tsx: exports changed
111
122
 
112
- OK: 45 items unchanged
123
+ OK: 42 entries unchanged
113
124
  ```
114
125
 
115
126
  **Wait for user confirmation before proceeding to edit.**
116
127
 
117
128
  ### Step 5: Apply Updates
118
129
 
119
- - **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.
120
- - **REMOVED**: Delete the documentation entry.
121
- - **CHANGED**: Update existing entry to match current API. Preserve code examples if still valid.
130
+ - **ADDED**: Add row to source index table in the section matching the item's `#region` in index.ts.
131
+ - **REMOVED**: Delete row from source index table.
132
+ - **CHANGED**: Update exports column.
122
133
  - **OK**: Do not touch.
123
134
 
124
- **If README uses docs/ links**: update the corresponding docs/ file, not just README.
135
+ ### Step 6: Cleanup Check
125
136
 
126
- ### Step 6: Size Check
137
+ If `docs/` subfolder exists from old full-documentation approach, report it:
138
+
139
+ ```
140
+ NOTE: docs/ subfolder exists with old-style full documentation.
141
+ Source index approach makes docs/ redundant.
142
+ Files: docs/form-controls.md, docs/providers.md, ...
143
+ Remove docs/ folder? (requires user confirmation)
144
+ ```
127
145
 
128
- After updates, if README exceeds ~500 lines and no docs/ exists:
129
- suggest splitting to the user (do not auto-split without confirmation).
146
+ **Do not auto-delete docs/ always ask user first.**
130
147
 
131
148
  ## Batch Mode
132
149
 
@@ -138,31 +155,33 @@ When `$ARGUMENTS` is empty:
138
155
  **Per-package subagent prompt template:**
139
156
 
140
157
  ```
141
- Update README.md for package {pkg-name} at {pkg-path}.
158
+ Update README.md source index for package {pkg-name} at {pkg-path}.
142
159
 
143
- PURPOSE: README.md is the sole API documentation source for Claude Code.
144
- Every exported symbol must be documented. Claude Code does NOT read JSDoc.
160
+ PURPOSE: README.md is a source file index. @simplysm/* packages ship .ts source + tests.
161
+ Claude Code reads source files directly. README tells Claude WHICH files to read.
145
162
 
146
163
  STEPS:
147
- 1. Read {pkg-path}/src/index.ts — get all exports and #region grouping.
148
- 2. For each export, read the source file for signatures, classes, types.
149
- 3. Read {pkg-path}/README.md (and docs/ if exists).
150
- 4. Compare exports vs documentation:
151
- - ADDED (in source, not in README): add documentation with description + code example.
152
- Include import path: import { X } from "@simplysm/{pkg-name}"
153
- - REMOVED (in README, not in source): delete documentation.
154
- - CHANGED (both exist, API differs): update to match current API.
164
+ 1. Read {pkg-path}/src/index.ts — get all `export *` statements and #region grouping.
165
+ 2. For each export, resolve source file path and find test file.
166
+ 3. Read each source file to extract exported symbol names.
167
+ 4. Read {pkg-path}/README.md (if exists).
168
+ 5. Compare exports vs README source index:
169
+ - ADDED: add row to source index table.
170
+ - REMOVED: delete row.
171
+ - CHANGED: update exports/description column.
155
172
  - OK: don't touch.
156
- 5. Section organization follows index.ts #region structure.
157
- 6. Write in English. No changelog sections.
158
- 7. If README doesn't exist, create with standard structure:
173
+ 6. Section organization follows index.ts #region structure.
174
+ 7. Write in English. No changelog sections.
175
+ 8. If README doesn't exist, create with structure:
159
176
  # @simplysm/{pkg-name}
160
177
  {description from package.json}
161
178
  ## Installation
162
- ## Main Modules (sections per #region)
163
- ## Types
164
- 8. If docs/ subfolder exists, update those files too.
165
- 9. Report: list of ADDED/REMOVED/CHANGED items.
179
+ ## Source Index (tables per #region)
180
+ ## License
181
+ 9. Do NOT write prop tables, code examples, or type definitions.
182
+ Source index table only: Source | Exports | Description | Test
183
+ Description: brief one-line summary of what the file provides.
184
+ 10. Report: list of ADDED/REMOVED/CHANGED items.
166
185
  ```
167
186
 
168
187
  **Project root subagent prompt:**
@@ -179,14 +198,14 @@ Report what was changed.
179
198
 
180
199
  ## Common Mistakes
181
200
 
182
- | Mistake | Fix |
183
- | ------------------------------------- | ------------------------------------------------------------------- |
184
- | Skipping exports with @internal JSDoc | Document ALL exports — Claude Code doesn't read JSDoc |
185
- | Rewriting OK sections | Only touch ADDED/REMOVED/CHANGED items |
186
- | Ignoring existing docs/ structure | If docs/ exists, update those files too |
187
- | Arbitrary section reorganization | Follow index.ts `#region` structure |
188
- | Missing import paths in examples | Always: `import { X } from "@simplysm/..."` |
189
- | Writing in Korean | README must be in English |
190
- | Adding changelog sections | Never add version history |
191
- | Editing before reporting diff | Always report ADDED/REMOVED/CHANGED and wait for confirmation |
192
- | Destroying docs/ link format | If README uses `[name](docs/file.md#anchor)`, preserve that pattern |
201
+ | Mistake | Fix |
202
+ |---------|-----|
203
+ | Writing prop tables or code examples | README is a source index — Claude reads source files for API details |
204
+ | Missing or vague Description | Each row needs a brief description so Claude can decide whether to read the file |
205
+ | Skipping exports from index.ts | Every `export *` must appear in the source index |
206
+ | Putting per-component API in Configuration | Configuration = setup patterns only (Provider tree, Tailwind preset) |
207
+ | Arbitrary section reorganization | Follow index.ts `#region` structure |
208
+ | Writing in Korean | README must be in English |
209
+ | Adding changelog sections | Never add version history |
210
+ | Editing before reporting diff | Always report and wait for confirmation |
211
+ | Auto-deleting docs/ folder | Report docs/ existence, ask user before removing |
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: sd-review
3
- description: Multi-perspective comprehensive code review
4
- disable-model-invocation: true
3
+ description: "Comprehensive multi-perspective code review (explicit invocation only)"
5
4
  ---
6
5
 
7
6
  # sd-review
@@ -10,7 +9,7 @@ disable-model-invocation: true
10
9
 
11
10
  Perform a multi-perspective code review of a package or specified path, producing a comprehensive report. **Analysis only — no code modifications.**
12
11
 
13
- Analyzes code via the `sd-explore` skill, then runs up to 4 subagents in parallel for specialized review. Collects subagent results, verifies each finding against actual code, and writes the final report.
12
+ Analyzes code via the built-in Explore agent, then runs up to 4 subagents in parallel for specialized review. Collects subagent results, verifies each finding against actual code, and writes the final report.
14
13
 
15
14
  ## Usage
16
15
 
@@ -48,30 +47,29 @@ Run subagents in parallel via the Task tool:
48
47
 
49
48
  ## Workflow
50
49
 
51
- ### Step 1: Code Analysis via sd-explore
50
+ ### Step 1: Code Analysis via Explore Agent
52
51
 
53
- Invoke the `sd-explore` skill via the Skill tool to analyze the target path:
52
+ Invoke the built-in Explore agent via the Task tool to analyze the target path:
54
53
 
55
54
  ```
56
- Skill: sd-explore
57
- **Args:** <target-path>
55
+ Task(subagent_type=Explore)
56
+ Prompt: "very thorough" analysis of <target-path>:
57
+ - Entry points, core files, module boundaries
58
+ - Call chains, data transformations, state changes
59
+ - Abstraction layers, design patterns, dependency graph
60
+ - Error handling, public API surface
58
61
  ```
59
62
 
60
- This runs in a **separate context**, so it does not consume the main context window. The analysis covers:
61
-
62
- - Feature Discovery: entry points, core files, module boundaries
63
- - Code Flow Tracing: call chains, data transformations, state changes
64
- - Architecture Analysis: abstraction layers, design patterns, dependency graph
65
- - Implementation Details: error handling, public API surface, performance
63
+ This runs in a **separate context**, so it does not consume the main context window.
66
64
 
67
65
  ### Step 2: Dispatch Analysis to Reviewers
68
66
 
69
- Run subagents **in parallel** via the Task tool. Include the sd-explore analysis results in each subagent's prompt:
67
+ Run subagents **in parallel** via the Task tool. Include the Explore analysis results in each subagent's prompt:
70
68
 
71
69
  - **sd-code-reviewer**: Based on the analysis, find bugs, security vulnerabilities, logic errors, and convention issues. Each finding must include **file:line** and **evidence**.
72
70
  - **sd-code-simplifier**: Based on the analysis, find unnecessary complexity, code duplication, and readability issues. Each finding must include **file:line** and **evidence**. **No code modifications.**
73
71
  - **sd-api-reviewer**: Based on the analysis, review API intuitiveness, naming consistency, type hints, error messages, and configuration complexity. Each finding must include **file:line** and **evidence**.
74
- - **sd-security-reviewer** _(conditional)_: If the sd-explore analysis reveals ORM queries (`orm-common`, `orm-node`, query builders, `expr.eq`, `.where()`, `.result()`) or service endpoints (`ServiceServer`, RPC handlers), also dispatch this agent. Based on the analysis, find SQL injection risks, missing input validation, and unvalidated user input reaching ORM queries. Each finding must include **file:line** and **evidence**.
72
+ - **sd-security-reviewer** _(conditional)_: If the Explore analysis reveals ORM queries (`orm-common`, `orm-node`, query builders, `expr.eq`, `.where()`, `.result()`) or service endpoints (`ServiceServer`, RPC handlers), also dispatch this agent. Based on the analysis, find SQL injection risks, missing input validation, and unvalidated user input reaching ORM queries. Each finding must include **file:line** and **evidence**.
75
73
 
76
74
  ### Step 3: Verify Issues
77
75
 
@@ -90,7 +88,7 @@ Compile only **verified findings** into a comprehensive report.
90
88
 
91
89
  | Section | Priority | Source |
92
90
  | -------------------------------- | -------- | --------------------------------------------------------------- |
93
- | **Architecture Summary** | — | sd-explore analysis |
91
+ | **Architecture Summary** | — | Explore analysis |
94
92
  | **Critical Issues** | P0 | Bugs, security vulnerabilities |
95
93
  | **Security Issues** | P0 | SQL injection, input validation (when sd-security-reviewer ran) |
96
94
  | **Quality Issues** | P1 | Logic errors, missing error handling, performance |