@simplysm/sd-claude 13.0.71 → 13.0.74
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/README.md +286 -13
- package/claude/refs/sd-code-conventions.md +11 -0
- package/claude/refs/sd-library-issue.md +7 -0
- package/claude/rules/sd-claude-rules.md +15 -4
- package/claude/rules/sd-refs-linker.md +1 -0
- package/claude/sd-statusline.js +1 -1
- package/claude/skills/sd-brainstorm/SKILL.md +1 -1
- package/claude/skills/sd-check/SKILL.md +15 -6
- package/claude/skills/sd-commit/SKILL.md +2 -0
- package/claude/skills/sd-debug/find-polluter.sh +8 -2
- package/claude/skills/sd-debug/root-cause-tracing.md +2 -2
- package/claude/skills/sd-document/extract_docx.py +5 -5
- package/claude/skills/sd-document/extract_pdf.py +11 -11
- package/claude/skills/sd-document/extract_pptx.py +5 -5
- package/claude/skills/sd-document/extract_xlsx.py +7 -7
- package/claude/skills/sd-email-analyze/email-analyzer.py +28 -28
- package/claude/skills/sd-plan/SKILL.md +11 -2
- package/claude/skills/sd-plan-dev/SKILL.md +5 -3
- package/claude/skills/sd-plan-dev/final-review-prompt.md +3 -3
- package/claude/skills/sd-readme/SKILL.md +86 -106
- package/claude/skills/sd-review/SKILL.md +58 -62
- package/claude/skills/sd-review/api-reviewer-prompt.md +90 -0
- package/claude/skills/sd-review/code-reviewer-prompt.md +85 -0
- package/claude/skills/sd-review/code-simplifier-prompt.md +88 -0
- package/claude/skills/sd-worktree/SKILL.md +10 -8
- package/claude/skills/sd-worktree/sd-worktree.mjs +5 -5
- package/dist/commands/auth-list.d.ts +1 -1
- package/dist/commands/auth-list.d.ts.map +1 -1
- package/dist/commands/auth-list.js +79 -21
- package/dist/commands/auth-list.js.map +1 -1
- package/dist/sd-claude.js +2 -2
- package/dist/sd-claude.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/auth-list.ts +110 -24
- package/src/sd-claude.ts +2 -2
- package/tests/auth-list.spec.ts +42 -19
- package/claude/agents/sd-api-reviewer.md +0 -81
- package/claude/agents/sd-code-reviewer.md +0 -48
- package/claude/agents/sd-code-simplifier.md +0 -47
- package/claude/agents/sd-security-reviewer.md +0 -92
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
2
|
+
"""Extract data and images from XLSX files with cell positions."""
|
|
3
3
|
|
|
4
4
|
import sys
|
|
5
5
|
import io
|
|
@@ -17,7 +17,7 @@ def ensure_packages():
|
|
|
17
17
|
try:
|
|
18
18
|
__import__(import_name)
|
|
19
19
|
except ImportError:
|
|
20
|
-
print(f"
|
|
20
|
+
print(f"Installing package: {pip_name}...", file=sys.stderr)
|
|
21
21
|
subprocess.check_call([sys.executable, "-m", "pip", "install", pip_name],
|
|
22
22
|
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
|
23
23
|
|
|
@@ -37,10 +37,10 @@ def extract(file_path):
|
|
|
37
37
|
ws = wb[sheet_name]
|
|
38
38
|
print(f"## Sheet: {sheet_name}\n")
|
|
39
39
|
|
|
40
|
-
#
|
|
40
|
+
# Data extraction
|
|
41
41
|
rows = list(ws.iter_rows(values_only=False))
|
|
42
42
|
if not rows:
|
|
43
|
-
print("(
|
|
43
|
+
print("(empty sheet)\n")
|
|
44
44
|
continue
|
|
45
45
|
|
|
46
46
|
for row in rows:
|
|
@@ -53,7 +53,7 @@ def extract(file_path):
|
|
|
53
53
|
cells.append(str(val).strip())
|
|
54
54
|
print(f"[{row[0].coordinate.split('1')[0]}{row[0].row}] " + " | ".join(cells))
|
|
55
55
|
|
|
56
|
-
#
|
|
56
|
+
# Image extraction
|
|
57
57
|
if ws._images:
|
|
58
58
|
for img in ws._images:
|
|
59
59
|
img_idx += 1
|
|
@@ -70,9 +70,9 @@ def extract(file_path):
|
|
|
70
70
|
print()
|
|
71
71
|
|
|
72
72
|
if img_idx > 0:
|
|
73
|
-
print(f"---\n
|
|
73
|
+
print(f"---\n{img_idx} image(s) saved: {out_dir}")
|
|
74
74
|
else:
|
|
75
|
-
print("---\
|
|
75
|
+
print("---\nNo images")
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
if __name__ == "__main__":
|
|
@@ -12,13 +12,13 @@ import base64
|
|
|
12
12
|
from email.policy import default as default_policy
|
|
13
13
|
from pathlib import Path
|
|
14
14
|
|
|
15
|
-
# stdout UTF-8
|
|
15
|
+
# Force stdout UTF-8 (Windows compatibility)
|
|
16
16
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8", errors="replace")
|
|
17
17
|
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding="utf-8", errors="replace")
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
def ensure_packages():
|
|
21
|
-
"""
|
|
21
|
+
"""Auto-install required packages."""
|
|
22
22
|
packages = {"extract-msg": "extract_msg"}
|
|
23
23
|
missing = []
|
|
24
24
|
for pip_name, import_name in packages.items():
|
|
@@ -27,7 +27,7 @@ def ensure_packages():
|
|
|
27
27
|
except ImportError:
|
|
28
28
|
missing.append(pip_name)
|
|
29
29
|
if missing:
|
|
30
|
-
print(f"
|
|
30
|
+
print(f"Installing packages: {', '.join(missing)}...", file=sys.stderr)
|
|
31
31
|
subprocess.check_call(
|
|
32
32
|
[sys.executable, "-m", "pip", "install", "-q", *missing],
|
|
33
33
|
stdout=subprocess.DEVNULL,
|
|
@@ -326,45 +326,45 @@ def build_report(filepath):
|
|
|
326
326
|
saved_attachments = save_files(attachments, out_dir)
|
|
327
327
|
|
|
328
328
|
out = []
|
|
329
|
-
out.append("#
|
|
330
|
-
out.append(f"
|
|
331
|
-
|
|
332
|
-
# ──
|
|
333
|
-
out.append("##
|
|
334
|
-
out.append("|
|
|
335
|
-
out.append("
|
|
336
|
-
out.append(f"|
|
|
337
|
-
out.append(f"|
|
|
338
|
-
out.append(f"|
|
|
329
|
+
out.append("# Email Analysis Report\n")
|
|
330
|
+
out.append(f"**Source file**: `{os.path.basename(filepath)}`\n")
|
|
331
|
+
|
|
332
|
+
# ── Email info
|
|
333
|
+
out.append("## Email Info\n")
|
|
334
|
+
out.append("| Field | Value |")
|
|
335
|
+
out.append("|-------|-------|")
|
|
336
|
+
out.append(f"| **Subject** | {headers['subject']} |")
|
|
337
|
+
out.append(f"| **From** | {headers['from']} |")
|
|
338
|
+
out.append(f"| **To** | {headers['to']} |")
|
|
339
339
|
if headers["cc"]:
|
|
340
|
-
out.append(f"|
|
|
341
|
-
out.append(f"|
|
|
342
|
-
out.append(f"|
|
|
340
|
+
out.append(f"| **CC** | {headers['cc']} |")
|
|
341
|
+
out.append(f"| **Date** | {headers['date']} |")
|
|
342
|
+
out.append(f"| **Attachments** | {len(saved_attachments)} |")
|
|
343
343
|
if all_inline:
|
|
344
|
-
out.append(f"|
|
|
344
|
+
out.append(f"| **Inline images** | {len(all_inline)} |")
|
|
345
345
|
out.append("")
|
|
346
346
|
|
|
347
|
-
# ──
|
|
348
|
-
out.append("##
|
|
347
|
+
# ── Body
|
|
348
|
+
out.append("## Body\n")
|
|
349
349
|
body = body_plain
|
|
350
350
|
if not body and body_html:
|
|
351
351
|
body = strip_html(body_html)
|
|
352
|
-
out.append(body.strip() if body else "_(
|
|
352
|
+
out.append(body.strip() if body else "_(No body)_")
|
|
353
353
|
out.append("")
|
|
354
354
|
|
|
355
|
-
# ──
|
|
355
|
+
# ── Inline images
|
|
356
356
|
if all_inline:
|
|
357
|
-
out.append("##
|
|
358
|
-
out.append("| # |
|
|
357
|
+
out.append("## Inline Images\n")
|
|
358
|
+
out.append("| # | Filename | Size | Saved path |")
|
|
359
359
|
out.append("|---|--------|------|-----------|")
|
|
360
360
|
for i, img in enumerate(all_inline, 1):
|
|
361
361
|
out.append(f"| {i} | {img['filename']} | {fmt_size(img['size'])} | `{img['saved_path']}` |")
|
|
362
362
|
out.append("")
|
|
363
363
|
|
|
364
|
-
# ──
|
|
364
|
+
# ── Attachments
|
|
365
365
|
if saved_attachments:
|
|
366
|
-
out.append("##
|
|
367
|
-
out.append("| # |
|
|
366
|
+
out.append("## Attachments\n")
|
|
367
|
+
out.append("| # | Filename | Size | Saved path |")
|
|
368
368
|
out.append("|---|--------|------|-----------|")
|
|
369
369
|
for i, a in enumerate(saved_attachments, 1):
|
|
370
370
|
out.append(f"| {i} | {a['filename']} | {fmt_size(a['size'])} | `{a['saved_path']}` |")
|
|
@@ -382,12 +382,12 @@ if __name__ == "__main__":
|
|
|
382
382
|
|
|
383
383
|
path = sys.argv[1]
|
|
384
384
|
if not os.path.isfile(path):
|
|
385
|
-
print(f"
|
|
385
|
+
print(f"File not found: {path}", file=sys.stderr)
|
|
386
386
|
sys.exit(1)
|
|
387
387
|
|
|
388
388
|
ext = Path(path).suffix.lower()
|
|
389
389
|
if ext not in (".eml", ".msg"):
|
|
390
|
-
print(f"
|
|
390
|
+
print(f"Unsupported format: {ext} (only .eml and .msg are supported)", file=sys.stderr)
|
|
391
391
|
sys.exit(1)
|
|
392
392
|
|
|
393
393
|
print(build_report(path))
|
|
@@ -49,6 +49,15 @@ Assume they are a skilled developer, but know almost nothing about our toolset o
|
|
|
49
49
|
---
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
+
## Package Manager Detection
|
|
53
|
+
|
|
54
|
+
When writing run commands in the plan, detect the package manager:
|
|
55
|
+
- If `pnpm-lock.yaml` exists in project root → use `pnpm`
|
|
56
|
+
- If `yarn.lock` exists in project root → use `yarn`
|
|
57
|
+
- Otherwise → use `npm`
|
|
58
|
+
|
|
59
|
+
`$PM` in the task template below refers to the detected package manager.
|
|
60
|
+
|
|
52
61
|
## Task Structure
|
|
53
62
|
|
|
54
63
|
```markdown
|
|
@@ -70,7 +79,7 @@ test("specific behavior", () => {
|
|
|
70
79
|
|
|
71
80
|
**Step 2: Run test to verify it fails**
|
|
72
81
|
|
|
73
|
-
Run:
|
|
82
|
+
Run: `$PM run vitest exact/path/to/tests/file.spec.ts --run`
|
|
74
83
|
Expected: FAIL with "functionUnderTest is not defined"
|
|
75
84
|
|
|
76
85
|
**Step 3: Write minimal implementation**
|
|
@@ -83,7 +92,7 @@ function functionUnderTest(input: InputType): OutputType {
|
|
|
83
92
|
|
|
84
93
|
**Step 4: Run test to verify it passes**
|
|
85
94
|
|
|
86
|
-
Run:
|
|
95
|
+
Run: `$PM run vitest exact/path/to/tests/file.spec.ts --run`
|
|
87
96
|
Expected: PASS
|
|
88
97
|
|
|
89
98
|
**Step 5: Commit**
|
|
@@ -221,11 +221,13 @@ Done!
|
|
|
221
221
|
|
|
222
222
|
## Batch Integration Check
|
|
223
223
|
|
|
224
|
-
Between batches, run targeted verification on affected packages before starting the next batch
|
|
224
|
+
Between batches, run targeted verification on affected packages before starting the next batch.
|
|
225
|
+
|
|
226
|
+
Detect the package manager first (`pnpm-lock.yaml` → pnpm, `yarn.lock` → yarn, otherwise → npm):
|
|
225
227
|
|
|
226
228
|
```bash
|
|
227
|
-
|
|
228
|
-
|
|
229
|
+
$PM run typecheck [affected packages]
|
|
230
|
+
$PM run lint [affected packages]
|
|
229
231
|
```
|
|
230
232
|
|
|
231
233
|
This catches cross-task integration issues early — especially when the next batch depends on the current batch's output. Do NOT skip this even if individual task reviews passed.
|
|
@@ -37,9 +37,9 @@ Individual tasks already passed spec and quality reviews. Focus on cross-task in
|
|
|
37
37
|
|
|
38
38
|
### Verification
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
40
|
+
Detect the package manager (`pnpm-lock.yaml` → pnpm, `yarn.lock` → yarn, otherwise → npm), then run and report results:
|
|
41
|
+
- `$PM run typecheck [affected packages]`
|
|
42
|
+
- `$PM run lint [affected packages]`
|
|
43
43
|
|
|
44
44
|
### Report
|
|
45
45
|
|
|
@@ -7,73 +7,59 @@ model: sonnet
|
|
|
7
7
|
|
|
8
8
|
# sd-readme
|
|
9
9
|
|
|
10
|
-
Sync package README.md source
|
|
10
|
+
Sync package README.md with current source code by comparing exports against documentation.
|
|
11
11
|
|
|
12
12
|
## Purpose
|
|
13
13
|
|
|
14
|
-
|
|
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.
|
|
15
15
|
|
|
16
|
-
**
|
|
16
|
+
**Therefore: every exported symbol must be documented in README.**
|
|
17
17
|
|
|
18
18
|
## Modes
|
|
19
19
|
|
|
20
20
|
- **Single package** (`$ARGUMENTS` = package name or path): Update one package's README
|
|
21
21
|
- **Batch** (`$ARGUMENTS` empty): Discover and update all packages in parallel
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## README Writing Rules
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
| License | Behavioral descriptions |
|
|
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
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
### Standard Structure
|
|
34
33
|
|
|
35
34
|
```markdown
|
|
36
35
|
# @simplysm/{package-name}
|
|
37
36
|
|
|
38
|
-
{One-line description
|
|
37
|
+
{One-line description}
|
|
39
38
|
|
|
40
39
|
## Installation
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
**Peer Dependencies:** (if any)
|
|
41
|
+
## Main Modules
|
|
45
42
|
|
|
46
|
-
|
|
43
|
+
### {Category matching index.ts #region}
|
|
47
44
|
|
|
48
|
-
|
|
49
|
-
{Include brief code snippets for wiring, NOT per-component API}
|
|
45
|
+
- Description + code examples per export
|
|
50
46
|
|
|
51
|
-
##
|
|
47
|
+
## Types
|
|
52
48
|
|
|
53
|
-
|
|
49
|
+
## Dependencies (only when peer deps exist)
|
|
50
|
+
```
|
|
54
51
|
|
|
55
|
-
|
|
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 | - |
|
|
52
|
+
### docs/ Subfolder Rules
|
|
59
53
|
|
|
60
|
-
|
|
61
|
-
```
|
|
54
|
+
When README exceeds ~500 lines, split detailed documentation into `docs/`:
|
|
62
55
|
|
|
63
|
-
**
|
|
64
|
-
-
|
|
65
|
-
-
|
|
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
|
|
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`)
|
|
69
59
|
|
|
70
|
-
|
|
60
|
+
When README is under ~500 lines, keep everything inline.
|
|
71
61
|
|
|
72
|
-
|
|
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
|
|
62
|
+
**If docs/ already exists, maintain and update it. Do not remove an existing docs/ structure.**
|
|
77
63
|
|
|
78
64
|
## Single Package Mode
|
|
79
65
|
|
|
@@ -84,66 +70,62 @@ If not starting with `packages/`, prepend it.
|
|
|
84
70
|
|
|
85
71
|
### Step 2: Build Export Map (Source of Truth)
|
|
86
72
|
|
|
87
|
-
1. Read `<pkg-path>/src/index.ts` — get all
|
|
88
|
-
2. For each
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
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
|
|
93
79
|
|
|
94
|
-
### Step 3: Build
|
|
80
|
+
### Step 3: Build Documentation Map
|
|
95
81
|
|
|
96
|
-
Read `<pkg-path>/README.md` (if exists).
|
|
97
|
-
|
|
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.
|
|
98
84
|
|
|
99
85
|
### Step 4: Diff and Report
|
|
100
86
|
|
|
101
|
-
Compare export map (Step 2) against
|
|
87
|
+
Compare export map (Step 2) against documentation map (Step 3):
|
|
102
88
|
|
|
103
|
-
| Status
|
|
104
|
-
|
|
105
|
-
| **ADDED**
|
|
106
|
-
| **REMOVED** | In README
|
|
107
|
-
| **CHANGED** |
|
|
108
|
-
| **OK**
|
|
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 |
|
|
109
95
|
|
|
110
96
|
**Report to user before editing:**
|
|
111
97
|
|
|
112
98
|
```
|
|
113
|
-
ADDED (
|
|
114
|
-
-
|
|
115
|
-
-
|
|
99
|
+
ADDED (3):
|
|
100
|
+
- strToCamelCase (from utils/str.ts)
|
|
101
|
+
- objGetChainValueByDepth (from utils/obj.ts)
|
|
102
|
+
- ZipArchiveProgress type (from zip/sd-zip.ts)
|
|
116
103
|
|
|
117
104
|
REMOVED (1):
|
|
118
|
-
-
|
|
105
|
+
- oldFunction (no longer exported)
|
|
119
106
|
|
|
120
|
-
CHANGED (
|
|
121
|
-
-
|
|
107
|
+
CHANGED (2):
|
|
108
|
+
- objMerge: added `deep` parameter
|
|
109
|
+
- Set.toggle: added `addOrDel` optional parameter
|
|
122
110
|
|
|
123
|
-
OK:
|
|
111
|
+
OK: 45 items unchanged
|
|
124
112
|
```
|
|
125
113
|
|
|
126
114
|
**Wait for user confirmation before proceeding to edit.**
|
|
127
115
|
|
|
128
116
|
### Step 5: Apply Updates
|
|
129
117
|
|
|
130
|
-
- **ADDED**:
|
|
131
|
-
- **REMOVED**: Delete
|
|
132
|
-
- **CHANGED**: Update
|
|
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.
|
|
133
121
|
- **OK**: Do not touch.
|
|
134
122
|
|
|
135
|
-
|
|
123
|
+
**If README uses docs/ links**: update the corresponding docs/ file, not just README.
|
|
136
124
|
|
|
137
|
-
|
|
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
|
-
```
|
|
125
|
+
### Step 6: Size Check
|
|
145
126
|
|
|
146
|
-
|
|
127
|
+
After updates, if README exceeds ~500 lines and no docs/ exists:
|
|
128
|
+
suggest splitting to the user (do not auto-split without confirmation).
|
|
147
129
|
|
|
148
130
|
## Batch Mode
|
|
149
131
|
|
|
@@ -155,33 +137,31 @@ When `$ARGUMENTS` is empty:
|
|
|
155
137
|
**Per-package subagent prompt template:**
|
|
156
138
|
|
|
157
139
|
```
|
|
158
|
-
Update README.md
|
|
140
|
+
Update README.md for package {pkg-name} at {pkg-path}.
|
|
159
141
|
|
|
160
|
-
PURPOSE: README.md is
|
|
161
|
-
|
|
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.
|
|
162
144
|
|
|
163
145
|
STEPS:
|
|
164
|
-
1. Read {pkg-path}/src/index.ts — get all
|
|
165
|
-
2. For each export,
|
|
166
|
-
3. Read
|
|
167
|
-
4.
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
- REMOVED: delete
|
|
171
|
-
- CHANGED: update
|
|
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.
|
|
172
154
|
- OK: don't touch.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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:
|
|
176
158
|
# @simplysm/{pkg-name}
|
|
177
159
|
{description from package.json}
|
|
178
160
|
## Installation
|
|
179
|
-
##
|
|
180
|
-
##
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
Description: brief one-line summary of what the file provides.
|
|
184
|
-
10. Report: list of ADDED/REMOVED/CHANGED items.
|
|
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.
|
|
185
165
|
```
|
|
186
166
|
|
|
187
167
|
**Project root subagent prompt:**
|
|
@@ -198,14 +178,14 @@ Report what was changed.
|
|
|
198
178
|
|
|
199
179
|
## Common Mistakes
|
|
200
180
|
|
|
201
|
-
| Mistake
|
|
202
|
-
|
|
203
|
-
|
|
|
204
|
-
|
|
|
205
|
-
|
|
|
206
|
-
|
|
|
207
|
-
|
|
|
208
|
-
| Writing in Korean
|
|
209
|
-
| Adding changelog sections
|
|
210
|
-
| Editing before reporting diff
|
|
211
|
-
|
|
|
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 Korean | 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 |
|