@simplysm/sd-claude 13.0.83 → 13.0.85
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.
- package/claude/rules/sd-claude-rules.md +12 -6
- package/claude/rules/sd-library-issue.md +7 -0
- package/claude/rules/sd-simplysm-usage.md +5 -5
- package/claude/sd-statusline.py +5 -2
- package/claude/skills/sd-api-review/SKILL.md +49 -53
- package/claude/skills/sd-check/SKILL.md +45 -41
- package/claude/skills/sd-commit/SKILL.md +31 -31
- package/claude/skills/sd-debug/SKILL.md +77 -68
- package/claude/skills/sd-document/SKILL.md +56 -56
- package/claude/skills/sd-document/__pycache__/_common.cpython-313.pyc +0 -0
- package/claude/skills/sd-email-analyze/SKILL.md +22 -22
- package/claude/skills/sd-init/SKILL.md +63 -63
- package/claude/skills/sd-plan/SKILL.md +127 -66
- package/claude/skills/sd-readme/SKILL.md +59 -59
- package/claude/skills/sd-review/SKILL.md +42 -35
- package/claude/skills/sd-simplify/SKILL.md +37 -30
- package/package.json +4 -1
- package/scripts/cli.mjs +12 -0
- package/scripts/postinstall.mjs +20 -4
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
##
|
|
1
|
+
## Request Handling Rules
|
|
2
2
|
|
|
3
|
-
-
|
|
3
|
+
- Never modify code unless the user explicitly requests changes. (No autonomous decisions in response to questions, etc.)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Code Writing Rules
|
|
6
6
|
|
|
7
|
-
- YAGNI
|
|
7
|
+
- Follow the YAGNI principle.
|
|
8
8
|
|
|
9
|
-
## Playwright
|
|
9
|
+
## Playwright Rules
|
|
10
10
|
|
|
11
|
-
- Playwright
|
|
11
|
+
- All Playwright output (screenshots, PDFs, downloads, etc.) must be saved to the `.tmp/playwright/` directory.
|
|
12
|
+
- When using Playwright MCP tools with a `filename` parameter, always prefix the filename with `.tmp/playwright/` (e.g., `filename: ".tmp/playwright/my-screenshot.png"`).
|
|
13
|
+
- Never pass a bare filename without the `.tmp/playwright/` path prefix.
|
|
14
|
+
|
|
15
|
+
## Documentation Rules for LLMs
|
|
16
|
+
|
|
17
|
+
- Write in English. (including code comments)
|
|
12
18
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Simplysm Library Issue Reporting
|
|
2
|
+
|
|
3
|
+
Source code for `@simplysm/*` packages can be found in `node_modules/@simplysm/`. If debugging reveals the root cause is in the simplysm library itself, generate a GitHub issue-formatted text (title, reproduction steps, expected behavior, actual behavior) and display it to the user.
|
|
4
|
+
|
|
5
|
+
**Report facts only — do not suggest fixes or include code location hints. Do not auto-submit the issue — only display the text.**
|
|
6
|
+
|
|
7
|
+
The issue body must NEVER include internal analysis of library code (class names, variable names, style properties, inheritance chains, etc.). Only describe user-observable symptoms.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# @simplysm
|
|
1
|
+
# @simplysm Package Documentation
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
When you need detailed API information, usage examples, or component props for `@simplysm/*` packages,
|
|
4
|
+
read the corresponding package's README.md.
|
|
5
5
|
|
|
6
|
-
1.
|
|
7
|
-
2. README.md
|
|
6
|
+
1. Read the package's README.md: `packages/{package-name}/README.md`
|
|
7
|
+
2. If the README.md contains a `docs/` index (Documentation table), read only the relevant category's `docs/*.md` files as needed
|
package/claude/sd-statusline.py
CHANGED
|
@@ -218,8 +218,11 @@ def main():
|
|
|
218
218
|
model = format_model(model_id) if model_id else "?"
|
|
219
219
|
|
|
220
220
|
# Extract context %
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
ctx_window = stdin_data.get("context_window")
|
|
222
|
+
if ctx_window is not None:
|
|
223
|
+
ctx_str = f"{ctx_window.get('used_percentage') or 0}%"
|
|
224
|
+
else:
|
|
225
|
+
ctx_str = "?"
|
|
223
226
|
|
|
224
227
|
# Read cached usage data
|
|
225
228
|
cache = read_cache()
|
|
@@ -1,89 +1,85 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sd-api-review
|
|
3
|
-
description: "API
|
|
3
|
+
description: Used when requesting "API review", "api-review", "sd-api-review", "API improvement", "public API review", "API intuitiveness", etc.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# SD API Review — Public API
|
|
6
|
+
# SD API Review — Public API Intuitiveness Review and Improvement
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Extracts the public API from the specified path (package/folder/file), compares it against relevant standards and similar libraries to derive intuitiveness improvements, then establishes an implementation plan via the `/sd-plan` process. Breaking changes are permitted, and user intuitiveness is the top priority.
|
|
9
9
|
|
|
10
|
-
ARGUMENTS:
|
|
10
|
+
ARGUMENTS: Target path (required). Example: `/sd-api-review packages/my-pkg`
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
## Step 1:
|
|
14
|
+
## Step 1: Validate Arguments
|
|
15
15
|
|
|
16
|
-
1. ARGUMENTS
|
|
16
|
+
1. Extract the **target path** from ARGUMENTS. If no path is provided, display "Please specify a target path. Example: `/sd-api-review packages/my-pkg`" and terminate.
|
|
17
17
|
|
|
18
|
-
## Step 2: Public API
|
|
18
|
+
## Step 2: Extract Public API
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
20
|
+
Collect the public API of the target.
|
|
21
|
+
- **Folder/file target**: Directly analyze exports from the given path
|
|
22
|
+
- **Depth**: Exported symbols (classes, functions, interfaces, types, constants) + public methods/properties of exported classes
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
If there are no exports, display "The target has no exported API." and terminate.
|
|
25
25
|
|
|
26
|
-
## Step 3:
|
|
26
|
+
## Step 3: Comparative Analysis and Improvement Derivation
|
|
27
27
|
|
|
28
|
-
### 3-1.
|
|
28
|
+
### 3-1. Determine Comparison Targets
|
|
29
29
|
|
|
30
|
-
-
|
|
31
|
-
-
|
|
30
|
+
- Analyze package metadata and code contents to infer the domain, then automatically select multiple widely-used libraries in that domain.
|
|
31
|
+
- Automatically include relevant standards (HTML, WAI-ARIA, Web API, TC39, JavaScript, CSS, etc.) based on the domain.
|
|
32
32
|
|
|
33
|
-
### 3-2.
|
|
33
|
+
### 3-2. External API Research
|
|
34
34
|
|
|
35
|
-
WebSearch
|
|
36
|
-
|
|
35
|
+
Use WebSearch and WebFetch to research the following two axes with **equal weight**.
|
|
36
|
+
Compare at the **category/pattern level** (do not search for each individual symbol).
|
|
37
37
|
|
|
38
|
-
1.
|
|
39
|
-
2.
|
|
38
|
+
1. **Standards**: Research naming, attributes, and patterns from official specifications of domain-related standards.
|
|
39
|
+
2. **Libraries**: Research APIs from official documentation of the selected libraries.
|
|
40
40
|
|
|
41
|
-
### 3-3.
|
|
41
|
+
### 3-3. Derive Improvements
|
|
42
42
|
|
|
43
|
-
Step 2
|
|
43
|
+
Compare the API catalog from Step 2 against external APIs to derive improvements. Review from the perspectives of naming, structure, consistency, patterns, usability, and type quality.
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
- Breaking
|
|
47
|
-
- input/output
|
|
45
|
+
Precautions:
|
|
46
|
+
- Breaking changes are not a concern. They are fully permitted.
|
|
47
|
+
- When input/output/purpose differs or behavior differs, proposals may be incorrect — this must always be recognized. (A common mistake)
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
49
|
+
Each improvement must include the following:
|
|
50
|
+
- **Current**: Current API state (code example)
|
|
51
|
+
- **Proposed**: Improved API (code example)
|
|
52
|
+
- **Reasons to change**: Rationale for the change (including standard/library comparisons)
|
|
53
|
+
- **Reasons not to change**: Rationale for maintaining the current state
|
|
54
54
|
|
|
55
|
-
## Step 4: sd-plan
|
|
55
|
+
## Step 4: Establish Implementation Plan via sd-plan
|
|
56
56
|
|
|
57
|
-
Step 3
|
|
57
|
+
Using the improvements derived in Step 3 as the task description, invoke `sd-plan` via the Skill tool. Pass the following in args:
|
|
58
58
|
|
|
59
59
|
```
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
The following are API improvements **proposed by LLM analysis**.
|
|
61
|
+
Since the improvements are not explicitly requested modifications by the user, treat them as unclear.
|
|
62
62
|
|
|
63
|
-
##
|
|
64
|
-
|
|
63
|
+
## Target
|
|
64
|
+
<target path>
|
|
65
65
|
|
|
66
|
-
## LLM
|
|
67
|
-
|
|
66
|
+
## LLM-Proposed Improvements — Comparative Analysis Table
|
|
67
|
+
When asking the user about unclear improvements, **always present** the following content first so the user can understand the context.
|
|
68
68
|
|
|
69
69
|
```
|
|
70
|
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
70
|
+
Improvement:
|
|
71
|
+
- Current:
|
|
72
|
+
- Proposed:
|
|
73
|
+
- Reasons to change:
|
|
74
|
+
- Reasons not to change:
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
##
|
|
78
|
-
1. Breaking
|
|
79
|
-
2.
|
|
80
|
-
3.
|
|
77
|
+
## Required Considerations for Implementation
|
|
78
|
+
1. Breaking changes are not a concern. They are fully permitted.
|
|
79
|
+
2. Use Grep to search for usages of the changed API across the entire monorepo and update them together.
|
|
80
|
+
3. Do not leave deprecated wrappers (clean break).
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
## Step 5:
|
|
83
|
+
## Step 5: Execute the Plan
|
|
84
84
|
|
|
85
|
-
sd-plan
|
|
86
|
-
|
|
87
|
-
## Step 6: README 업데이트 추천
|
|
88
|
-
|
|
89
|
-
코드 수정이 발생한 경우, 사용자에게 `/sd-readme` 수행을 추천하라.
|
|
85
|
+
Once sd-plan is complete and a finalized plan is produced, modify the code according to that plan.
|
|
@@ -1,69 +1,73 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sd-check
|
|
3
|
-
description:
|
|
3
|
+
description: Used when requesting "check", "sd-check", "typecheck+lint+test", "full check", etc.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# SD Check —
|
|
6
|
+
# SD Check — Automated Check and Error Fix Loop
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Detects the package manager, runs the check script, reviews the results, and if there are code errors, invokes sd-debug to analyze the root cause, applies fixes, and re-runs the check. This loop repeats until all errors are resolved.
|
|
9
9
|
|
|
10
|
-
ARGUMENTS:
|
|
10
|
+
ARGUMENTS: Target paths (optional, multiple allowed). If not specified, determined from the conversation context. If no specific target exists or "all" is specified, run without targets.
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
## Step 1:
|
|
14
|
+
## Step 1: Preparation (PM Detection + Script Verification + Target Resolution)
|
|
15
15
|
|
|
16
|
-
1. **PM
|
|
17
|
-
- `pnpm-lock.yaml`
|
|
18
|
-
- `yarn.lock`
|
|
19
|
-
- `package-lock.json`
|
|
20
|
-
-
|
|
21
|
-
2.
|
|
22
|
-
3.
|
|
23
|
-
1.
|
|
24
|
-
2.
|
|
25
|
-
3.
|
|
16
|
+
1. **PM Detection**: Determine the package manager from the lock file in the project root.
|
|
17
|
+
- `pnpm-lock.yaml` exists → `pnpm`
|
|
18
|
+
- `yarn.lock` exists → `yarn`
|
|
19
|
+
- `package-lock.json` exists → `npm`
|
|
20
|
+
- None found → `npm` (default)
|
|
21
|
+
2. **Script Verification**: Check whether `scripts.check` exists in `package.json`. If not, inform the user with `"The check script is not defined in package.json."` and **stop**.
|
|
22
|
+
3. **Target Resolution**: Determine targets in the following priority order.
|
|
23
|
+
1. Targets explicitly specified in ARGUMENTS
|
|
24
|
+
2. Inferred from the current conversation context (e.g., user is working on a specific package)
|
|
25
|
+
3. If neither applies or "all" is specified → run without targets (full check)
|
|
26
26
|
|
|
27
|
-
## Step 2:
|
|
27
|
+
## Step 2: Run Check
|
|
28
28
|
|
|
29
29
|
1. `mkdir -p .tmp/check` (Bash)
|
|
30
|
-
2.
|
|
30
|
+
2. Run the following command via Bash:
|
|
31
31
|
```
|
|
32
|
-
$PM check [targets...] > .tmp/check
|
|
32
|
+
TS=$(date +%y%m%d%H%M%S); $PM check [targets...] > .tmp/check/${TS}.txt 2>&1; echo "EXIT_CODE:$?" >> .tmp/check/${TS}.txt
|
|
33
33
|
```
|
|
34
|
-
- `$PM` =
|
|
35
|
-
- `
|
|
36
|
-
-
|
|
37
|
-
3. Read
|
|
34
|
+
- `$PM` = the package manager detected in Step 1
|
|
35
|
+
- `$TS` = timestamp variable (e.g., `260312143025`)
|
|
36
|
+
- Include targets in the command if present; omit otherwise
|
|
37
|
+
3. Read the result file (`.tmp/check/${TS}.txt`) using the Read tool.
|
|
38
38
|
|
|
39
|
-
## Step 3:
|
|
39
|
+
## Step 3: Analyze Results
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Read the result file content and classify it into one of the following three categories:
|
|
42
42
|
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
43
|
+
- **Success**: All checks passed without errors → proceed to **Step 5 (Completion)**
|
|
44
|
+
- **Environment Error**: The issue is an environment/infrastructure problem rather than a code problem (e.g., missing dependencies, out of memory, command not found, network issues, etc.) → show the error details to the user and **stop immediately**. Do not attempt code fixes.
|
|
45
|
+
- **Code Error**: The issue is a source code problem such as type errors, lint violations, or test failures → proceed to **Step 4**
|
|
46
46
|
|
|
47
|
-
>
|
|
47
|
+
> The classification above should be determined by reading and interpreting the result content freely, not by hardcoded pattern matching.
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
**Iteration Limit**: If the current iteration count exceeds 5, report the remaining errors to the user, inform them with `"Errors remain after 5 iterations. Please review the remaining errors."`, and **stop**.
|
|
50
50
|
|
|
51
|
-
## Step 4:
|
|
51
|
+
## Step 4: Error Analysis and Fix (Using sd-debug)
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Invoke `sd-debug` via the Skill tool. Pass the following content as args:
|
|
54
54
|
|
|
55
55
|
```
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
Analyze the code errors from the check results below.
|
|
57
|
+
**Important workflow instructions:**
|
|
58
|
+
1. Perform Steps 1-2 thoroughly — gather problem information and conduct in-depth codebase analysis to identify the root cause. Do NOT skip or rush these steps.
|
|
59
|
+
2. Output the diagnostic report from Step 3, but skip the user confirmation (do not call AskUserQuestion).
|
|
60
|
+
3. Skip Steps 4-5 (do not invoke sd-plan).
|
|
61
|
+
4. Based on the analysis results and diagnostic report, apply fixes directly.
|
|
62
|
+
|
|
63
|
+
<Include the error content from the check result file here>
|
|
60
64
|
```
|
|
61
65
|
|
|
62
|
-
sd-debug
|
|
66
|
+
After sd-debug completes → return to **Step 2** (re-run check with a new txt file)
|
|
63
67
|
|
|
64
|
-
## Step 5:
|
|
68
|
+
## Step 5: Completion Report
|
|
65
69
|
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
+
When all checks pass, output the following:
|
|
71
|
+
- Total number of iterations
|
|
72
|
+
- Summary of fixes made in each iteration
|
|
73
|
+
- Format: `"Check complete: all checks passed after {N} iteration(s)."` + bullet list of fix details
|
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sd-commit
|
|
3
|
-
description:
|
|
3
|
+
description: Used when requesting "commit", "sd-commit", etc.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# SD Commit —
|
|
6
|
+
# SD Commit — Analyze Changes and Commit
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Stage changes, analyze the diff to generate a commit message, and commit.
|
|
9
9
|
|
|
10
|
-
ARGUMENTS: `all` (
|
|
10
|
+
ARGUMENTS: `all` (optional). If specified, target all changes; if omitted, target only files modified during the current conversation.
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
## Step 1:
|
|
14
|
+
## Step 1: Parse Arguments and Stage
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Check whether `all` is present in ARGUMENTS.
|
|
17
17
|
|
|
18
|
-
- **`all`**:
|
|
19
|
-
-
|
|
18
|
+
- **`all`**: Stage all changes in the working tree (modified, deleted, and new files).
|
|
19
|
+
- **Not `all` or no arguments**: Stage only files that were modified or created via the Edit or Write tools during the current conversation. Review the conversation context and extract the list of those files.
|
|
20
20
|
|
|
21
|
-
## Step 2:
|
|
21
|
+
## Step 2: Check for Changes
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
If there are no staged changes, inform the user "No changes to commit." and **stop**.
|
|
24
24
|
|
|
25
|
-
## Step 3:
|
|
25
|
+
## Step 3: Generate Commit Message and Commit
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Analyze the staged diff and generate a commit message according to the rules below, then commit.
|
|
28
28
|
|
|
29
|
-
###
|
|
29
|
+
### Commit Message Rules
|
|
30
30
|
|
|
31
|
-
- **Conventional Commits**
|
|
32
|
-
- prefix
|
|
33
|
-
- **subject** (
|
|
34
|
-
- **body**:
|
|
35
|
-
-
|
|
31
|
+
- **Conventional Commits** format: prefix + description
|
|
32
|
+
- prefix examples: `feat`, `fix`, `refactor`, `chore`, `docs`, `style`, `test`, `perf`, `ci`, `build`
|
|
33
|
+
- **subject** (first line): Summary of changes. 70 characters or fewer.
|
|
34
|
+
- **body**: After a blank line, list the key changes. If changes span multiple topics, group them with `[prefix]` tags per topic.
|
|
35
|
+
- Include `Co-Authored-By: Claude <noreply@anthropic.com>` at the end.
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Single-topic example:
|
|
38
38
|
```
|
|
39
|
-
feat:
|
|
39
|
+
feat: Add user authentication logic
|
|
40
40
|
|
|
41
|
-
-
|
|
42
|
-
-
|
|
41
|
+
- Implement JWT token verification in AuthService
|
|
42
|
+
- Add form validation to the login page
|
|
43
43
|
|
|
44
44
|
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
Multi-topic example:
|
|
48
48
|
```
|
|
49
|
-
chore:
|
|
49
|
+
chore: Add authentication feature and fix payment error
|
|
50
50
|
|
|
51
|
-
[feat]
|
|
52
|
-
-
|
|
53
|
-
-
|
|
51
|
+
[feat] User authentication
|
|
52
|
+
- Implement JWT token verification in AuthService
|
|
53
|
+
- Add form validation to the login page
|
|
54
54
|
|
|
55
|
-
[fix]
|
|
56
|
-
-
|
|
55
|
+
[fix] Payment module
|
|
56
|
+
- Fix retry logic on payment failure
|
|
57
57
|
|
|
58
58
|
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
## Step 4:
|
|
61
|
+
## Step 4: Output Result
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
After the commit is complete, show the full commit message to the user.
|