@simplysm/sd-claude 13.0.83 → 13.0.84
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 +10 -6
- package/claude/rules/sd-simplysm-usage.md +5 -5
- package/claude/skills/sd-api-review/SKILL.md +51 -51
- package/claude/skills/sd-check/SKILL.md +40 -40
- 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-email-analyze/SKILL.md +22 -22
- package/claude/skills/sd-init/SKILL.md +63 -63
- package/claude/skills/sd-plan/SKILL.md +62 -62
- package/claude/skills/sd-readme/SKILL.md +59 -59
- package/claude/skills/sd-review/SKILL.md +35 -35
- package/claude/skills/sd-simplify/SKILL.md +30 -30
- package/package.json +1 -1
|
@@ -1,102 +1,102 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sd-init
|
|
3
|
-
description: "
|
|
3
|
+
description: Used when requesting "initialize", "init", "sd-init", "generate CLAUDE.md", etc.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# SD Init — CLAUDE.md
|
|
6
|
+
# SD Init — Auto-generate CLAUDE.md
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Analyze the project and auto-generate CLAUDE.md. Overwrite if the file already exists.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
## Step 1:
|
|
12
|
+
## Step 1: Detect Package Manager
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Determine the PM from the lock file in the project root:
|
|
15
15
|
|
|
16
16
|
1. `pnpm-lock.yaml` → pnpm
|
|
17
17
|
2. `yarn.lock` → yarn
|
|
18
|
-
3.
|
|
18
|
+
3. Otherwise → npm
|
|
19
19
|
|
|
20
|
-
## Step 2:
|
|
20
|
+
## Step 2: Analyze Scripts
|
|
21
21
|
|
|
22
|
-
`package.json
|
|
22
|
+
Read the `scripts` in `package.json`, and for each CLI tool invoked by a script, run `--help` or similar help commands via Bash to identify available arguments and flags.
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Based on the gathered information, group scripts by category (development, build, test, lint, etc.), and organize the basic usage and key flag examples for each script.
|
|
25
25
|
|
|
26
|
-
## Step 3:
|
|
26
|
+
## Step 3: Analyze Coding Rules
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Find and read the following config files from the project root (only those that exist):
|
|
29
29
|
|
|
30
|
-
- ESLint: `eslint.config.*`, `.eslintrc.*`, `packages/*/eslint
|
|
30
|
+
- ESLint: `eslint.config.*`, `.eslintrc.*`, `packages/*/eslint.*`, etc.
|
|
31
31
|
- Prettier: `.prettierrc*`, `prettier.config.*`
|
|
32
32
|
- EditorConfig: `.editorconfig`
|
|
33
|
-
- TypeScript: `tsconfig.json`
|
|
33
|
+
- TypeScript: `compilerOptions` in the root `tsconfig.json` that affect code style, such as `strict`, `noImplicitAny`, etc.
|
|
34
34
|
- Stylelint: `.stylelintrc*`, `stylelint.config.*`
|
|
35
35
|
|
|
36
|
-
Claude
|
|
36
|
+
Summarize only the frequently violated rules that Claude is likely to suggest incorrectly — keep it highly concise.
|
|
37
37
|
|
|
38
|
-
## Step 4: CLAUDE.md
|
|
38
|
+
## Step 4: Generate CLAUDE.md
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
Combine the information above and write `CLAUDE.md` in the project root:
|
|
41
41
|
|
|
42
|
-
-
|
|
43
|
-
- **PM**:
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
42
|
+
- **Project info**: `name` and `description` from `package.json`
|
|
43
|
+
- **PM**: Package manager detected in Step 1
|
|
44
|
+
- **Monorepo structure**: If a `workspaces` field or `pnpm-workspace.yaml` exists, briefly describe the workspace paths
|
|
45
|
+
- **Tech stack**: Identify key technologies (frameworks, bundlers, test tools, etc.) from `dependencies`/`devDependencies` and describe them very briefly
|
|
46
|
+
- **Commands**: Script usage organized in Step 2
|
|
47
|
+
- **Coding rules**: Rules from Step 3 that Claude should follow. Write as a `## Coding Rules` section
|
|
48
48
|
|
|
49
|
-
###
|
|
49
|
+
### Reference Example
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
Below is an example of a well-written CLAUDE.md. Do not copy the format verbatim — adapt it flexibly to the project's characteristics.
|
|
52
52
|
|
|
53
53
|
```markdown
|
|
54
54
|
# Simplysm
|
|
55
55
|
|
|
56
|
-
pnpm
|
|
56
|
+
pnpm monorepo. Package paths: `packages/*`, tests: `tests/*`
|
|
57
57
|
|
|
58
|
-
##
|
|
58
|
+
## Commands
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
`[targets..]
|
|
62
|
-
|
|
60
|
+
All commands internally run `pnpm sd-cli <command>`. The `--debug` flag is available for all commands.
|
|
61
|
+
If `[targets..]` is not specified, all packages defined in `sd.config.ts` are targeted.
|
|
62
|
+
Targets are specified by package path (e.g., `packages/core-common`, `tests/orm`).
|
|
63
63
|
|
|
64
|
-
###
|
|
64
|
+
### Development
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
|
-
pnpm dev [targets..] # client+server
|
|
68
|
-
pnpm dev packages/solid-demo #
|
|
69
|
-
pnpm dev -o key=value # sd.config.ts
|
|
67
|
+
pnpm dev [targets..] # Run client+server packages in dev mode
|
|
68
|
+
pnpm dev packages/solid-demo # Dev mode for a specific package only
|
|
69
|
+
pnpm dev -o key=value # Pass options to sd.config.ts
|
|
70
70
|
|
|
71
|
-
pnpm watch [targets..] #
|
|
72
|
-
pnpm watch packages/core-common #
|
|
71
|
+
pnpm watch [targets..] # Watch mode for library package builds
|
|
72
|
+
pnpm watch packages/core-common # Watch a specific package only
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
###
|
|
75
|
+
### Build & Deploy
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
|
-
pnpm build [targets..] #
|
|
79
|
-
pnpm build packages/solid #
|
|
78
|
+
pnpm build [targets..] # Production build
|
|
79
|
+
pnpm build packages/solid # Build a specific package only
|
|
80
80
|
|
|
81
|
-
pnpm pub [targets..] #
|
|
82
|
-
pnpm pub --no-build #
|
|
83
|
-
pnpm pub --dry-run #
|
|
81
|
+
pnpm pub [targets..] # Build then deploy (npm/sftp)
|
|
82
|
+
pnpm pub --no-build # Deploy only, skip build
|
|
83
|
+
pnpm pub --dry-run # Simulate without actual deployment
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
###
|
|
86
|
+
### Code Quality Checks
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
pnpm typecheck [targets..] # TypeScript
|
|
90
|
-
pnpm lint [targets..] # ESLint + Stylelint
|
|
91
|
-
pnpm lint:fix [targets..] #
|
|
92
|
-
pnpm check [targets..] #
|
|
93
|
-
pnpm vitest [targets..] # vitest
|
|
94
|
-
pnpm vitest run [targets..] #
|
|
89
|
+
pnpm typecheck [targets..] # TypeScript type check
|
|
90
|
+
pnpm lint [targets..] # Run ESLint + Stylelint
|
|
91
|
+
pnpm lint:fix [targets..] # Auto-fix lint issues (--fix)
|
|
92
|
+
pnpm check [targets..] # Full check (typecheck + lint + test in parallel)
|
|
93
|
+
pnpm vitest [targets..] # vitest watch mode
|
|
94
|
+
pnpm vitest run [targets..] # Run tests once
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
##
|
|
97
|
+
## Architecture
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
Dependency direction: top → bottom. `core-common` is a leaf package with no internal dependencies.
|
|
100
100
|
|
|
101
101
|
```
|
|
102
102
|
Apps: solid-demo (client) / solid-demo-server (server)
|
|
@@ -108,26 +108,26 @@ Tools: sd-cli, lint, excel, storage, sd-claude, mcp-playwright
|
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
|
|
111
|
-
##
|
|
111
|
+
## Integration Tests
|
|
112
112
|
|
|
113
|
-
`tests/`
|
|
113
|
+
Located in the `tests/` folder. Run with `pnpm vitest run tests/orm`, etc.
|
|
114
114
|
|
|
115
|
-
- `tests/orm` — DB
|
|
116
|
-
- `tests/service` —
|
|
115
|
+
- `tests/orm` — DB connection, DbContext, escape tests (MySQL, PostgreSQL, MSSQL). Requires Docker.
|
|
116
|
+
- `tests/service` — Service client-server communication tests.
|
|
117
117
|
|
|
118
|
-
##
|
|
118
|
+
## Coding Rules
|
|
119
119
|
|
|
120
|
-
- `import type`
|
|
121
|
-
- `console.*`
|
|
122
|
-
- `Buffer`
|
|
123
|
-
- SolidJS: props
|
|
124
|
-
- Prettier: 100
|
|
120
|
+
- `import type` required (`verbatimModuleSyntax`), `#private` forbidden → use `private` keyword
|
|
121
|
+
- `console.*` forbidden, `if (str)` forbidden → use explicit comparison `str !== ""` (nullable boolean/object allowed)
|
|
122
|
+
- `Buffer` forbidden → `Uint8Array`, `events` forbidden → `EventEmitter` from `@simplysm/core-common`
|
|
123
|
+
- SolidJS: no props destructuring, use `<For>` instead of `.map()`, use `class` instead of `className`
|
|
124
|
+
- Prettier: 100 chars, 2-space indent, semicolons, trailing comma, LF
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
-
## Step 5:
|
|
127
|
+
## Step 5: Completion Notice
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
When generation is complete, output the following:
|
|
130
130
|
|
|
131
131
|
```
|
|
132
|
-
CLAUDE.md
|
|
132
|
+
CLAUDE.md has been generated. Run /sd-commit to commit.
|
|
133
133
|
```
|
|
@@ -1,104 +1,104 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sd-plan
|
|
3
|
-
description:
|
|
3
|
+
description: This skill is used when the user requests "make a plan", "create a plan", "sd-plan", "implementation plan", "work plan", etc.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# SD Plan —
|
|
6
|
+
# SD Plan — Clear Plan Generation
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Receives a task request from the user, generates an initial plan, then iteratively reviews and asks questions about unclear parts to produce a perfectly clear plan.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
## Step 1:
|
|
12
|
+
## Step 1: Input Verification
|
|
13
13
|
|
|
14
|
-
-
|
|
15
|
-
1.
|
|
16
|
-
2.
|
|
17
|
-
3. **AskUserQuestion**:
|
|
18
|
-
-
|
|
14
|
+
- Obtain the task description in the following priority order:
|
|
15
|
+
1. **Task request**: The task description provided by the user when invoking the skill
|
|
16
|
+
2. **Current conversation**: If no task request is provided, determine the task from the current conversation context
|
|
17
|
+
3. **AskUserQuestion**: If neither of the above is sufficient, ask "What task should I create a plan for? Please describe the task."
|
|
18
|
+
- Proceed to Step 2 after obtaining a sufficient task description.
|
|
19
19
|
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
## Step 2:
|
|
22
|
+
## Step 2: Plan Generation + Clarification Loop
|
|
23
23
|
|
|
24
|
-
### 2-1.
|
|
24
|
+
### 2-1. Draft Creation
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
26
|
+
Draft the plan. Always follow TDD principles:
|
|
27
|
+
- For code tasks → Write test code first
|
|
28
|
+
- For non-code tasks → Define a self-verification checklist first
|
|
29
|
+
- For code tasks where the project has no test environment set up → Propose verification methods such as CLI or dry-run
|
|
30
30
|
|
|
31
|
-
### 2-2.
|
|
31
|
+
### 2-2. Clarification Cycle
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Repeat the following **until there are 0 unclear items**:
|
|
34
34
|
|
|
35
|
-
1.
|
|
36
|
-
2.
|
|
37
|
-
3.
|
|
38
|
-
-
|
|
39
|
-
4.
|
|
35
|
+
1. **Extract**: Compare the plan against all 12 "Ambiguity Criteria" listed below and enumerate all unclear items.
|
|
36
|
+
2. **Dependency analysis**: Identify dependencies between items. ("A must be decided before B can be asked" → B depends on A)
|
|
37
|
+
3. **Ask**: For items with no dependencies, use AskUserQuestion with **exactly one question per tool call**. Provide 2-5 options for each question.
|
|
38
|
+
- For each item, repeat "present one explanation -> AskUserQuestion"
|
|
39
|
+
4. **Apply**: Incorporate all answers to update the plan, then return to step 1.
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
0 unclear items → Move to **Step 2.5 Final Verification**.
|
|
42
42
|
|
|
43
|
-
###
|
|
43
|
+
### Ambiguity Criteria
|
|
44
44
|
|
|
45
|
-
>
|
|
45
|
+
> **Core principle**: Anything not explicitly stated by the user and not confirmed in the codebase is **treated as speculation/assumption** and classified as an unclear item. Even if Claude wrote it confidently, it is unclear if the source is unverified.
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
Compare against all 12 items below **during every review**. To skip an item as "not applicable", there must be concrete evidence (user statement or codebase confirmation).
|
|
48
48
|
|
|
49
|
-
1.
|
|
50
|
-
2.
|
|
51
|
-
3.
|
|
52
|
-
4.
|
|
53
|
-
5.
|
|
54
|
-
6.
|
|
55
|
-
7.
|
|
56
|
-
8.
|
|
57
|
-
9.
|
|
58
|
-
10.
|
|
59
|
-
11.
|
|
60
|
-
12.
|
|
49
|
+
1. **Unstated user assumptions**: Decisions filled in by Claude that the user did not specify
|
|
50
|
+
2. **Lack of specificity**: Expressions like "handle appropriately", "as needed" without explaining HOW
|
|
51
|
+
3. **Ambiguous scope**: IN/OUT scope is not defined
|
|
52
|
+
4. **Unspecified behavior**: Errors, invalid inputs, default values, etc. are not specified
|
|
53
|
+
5. **Unknown constraints**: Performance, compatibility, or platform requirements are unclear
|
|
54
|
+
6. **Missing edge cases**: Boundary conditions, concurrency, empty states, etc.
|
|
55
|
+
7. **Vague file/function references**: "Modify related files" without specific paths
|
|
56
|
+
8. **Unclear ordering/dependencies**: Precedence between steps is not specified
|
|
57
|
+
9. **Speculative expressions**: "Probably", "might be", "TBD", "???", etc.
|
|
58
|
+
10. **Missing integration details**: API contracts, data formats, interfaces are undefined
|
|
59
|
+
11. **No failure/rollback strategy**: No response plan for failures
|
|
60
|
+
12. **Undefined verification methods**: No verification method corresponding to an implementation step
|
|
61
61
|
|
|
62
62
|
---
|
|
63
63
|
|
|
64
|
-
## Step 2.5:
|
|
64
|
+
## Step 2.5: Final Verification (Required Before Declaring No Ambiguities)
|
|
65
65
|
|
|
66
|
-
"
|
|
66
|
+
**Immediately before** declaring "no ambiguities", you must perform the following:
|
|
67
67
|
|
|
68
|
-
1.
|
|
69
|
-
2.
|
|
70
|
-
-
|
|
71
|
-
- "
|
|
72
|
-
-
|
|
73
|
-
3.
|
|
74
|
-
4.
|
|
68
|
+
1. Re-read **every step of the plan from beginning to end**, comparing against the 12 criteria one more time.
|
|
69
|
+
2. Pay special attention to the following:
|
|
70
|
+
- Are there any parts that Claude decided on its own without user confirmation?
|
|
71
|
+
- Do all definitive statements (e.g., "will do X", "will handle as Y") have supporting evidence from user statements or the codebase?
|
|
72
|
+
- Are there any places missing specific file paths, function names, or data structures?
|
|
73
|
+
3. If **even one** unclear item is found during this verification, return to the question cycle in Step 2.
|
|
74
|
+
4. If truly none remain → Move to Step 3.
|
|
75
75
|
|
|
76
76
|
---
|
|
77
77
|
|
|
78
|
-
## Step 3:
|
|
78
|
+
## Step 3: Final Output
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Once all unclear items have been resolved, present the completed plan to the user and request implementation approval via AskUserQuestion.
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
- `{topic}`:
|
|
82
|
+
If the user approves, Write the plan to `.tmp/plans/${TS}_{topic}.md`.
|
|
83
|
+
- Generate the timestamp first: `TS=$(date +%y%m%d%H%M%S)`
|
|
84
|
+
- Filename example: `260311143052_add-progress-component.md`
|
|
85
|
+
- `{topic}`: Short kebab-case based on the task content (e.g., add-progress-component)
|
|
86
86
|
|
|
87
87
|
---
|
|
88
88
|
|
|
89
|
-
## Step 4:
|
|
89
|
+
## Step 4: Post-Implementation Guidance
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
If the user approves implementation, implement according to the plan. Once implementation is complete, output the following guidance:
|
|
92
92
|
|
|
93
|
-
-
|
|
93
|
+
- **If code changes are included**:
|
|
94
94
|
```
|
|
95
|
-
|
|
96
|
-
1. /sd-check —
|
|
97
|
-
2. /sd-simplify —
|
|
98
|
-
3. /sd-commit —
|
|
95
|
+
Implementation is complete. It is recommended to run the following steps in order:
|
|
96
|
+
1. /sd-check — Type check + lint + test inspection and auto-fix
|
|
97
|
+
2. /sd-simplify — Simplification review of changed code
|
|
98
|
+
3. /sd-commit — Commit changes
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
-
|
|
101
|
+
- **If no code changes are involved** (configuration, documentation, etc.):
|
|
102
102
|
```
|
|
103
|
-
|
|
103
|
+
Implementation is complete. Run /sd-commit to commit the changes.
|
|
104
104
|
```
|
|
@@ -1,126 +1,126 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sd-readme
|
|
3
|
-
description: "README
|
|
3
|
+
description: Used when requesting "README documentation generation", "sd-readme", etc.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# SD Readme —
|
|
6
|
+
# SD Readme — Monorepo Package README Documentation Generator
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Automatically generates README.md documentation for each package in the monorepo. Applies Progressive Disclosure principles by choosing either a single README.md or a README.md + docs/*.md structure depending on the package size.
|
|
9
9
|
|
|
10
|
-
ARGUMENTS:
|
|
10
|
+
ARGUMENTS: Package name (optional). If specified, only that package is processed; if omitted, all packages are processed in parallel.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Workflow
|
|
13
13
|
|
|
14
14
|
```mermaid
|
|
15
15
|
flowchart TD
|
|
16
|
-
A[
|
|
17
|
-
B -- Yes --> C[README.md
|
|
18
|
-
B -- No --> D[public
|
|
19
|
-
D --> E[
|
|
20
|
-
E --
|
|
16
|
+
A[Parse arguments] --> B{Package name specified?}
|
|
17
|
+
B -- Yes --> C[Generate README.md]
|
|
18
|
+
B -- No --> D[Collect public package list]
|
|
19
|
+
D --> E[Run Agent per package in parallel]
|
|
20
|
+
E -- Each Agent --> C
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
### A.
|
|
23
|
+
### A. Parse Arguments
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Extract the package name from the ARGUMENTS passed when invoking the skill.
|
|
26
26
|
|
|
27
|
-
-
|
|
28
|
-
-
|
|
27
|
+
- **Package name specified** → Find the corresponding directory under `packages/` and proceed directly to **C. Generate README.md**.
|
|
28
|
+
- **Package name not specified** → Proceed to **D. Collect public package list**.
|
|
29
29
|
|
|
30
|
-
### C. README.md
|
|
30
|
+
### C. Generate README.md
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Perform the following for a single target package.
|
|
33
33
|
|
|
34
|
-
#### C-1. package.json
|
|
34
|
+
#### C-1. Analyze package.json
|
|
35
35
|
|
|
36
|
-
`packages/<name>/package.json
|
|
36
|
+
Read `packages/<name>/package.json`:
|
|
37
37
|
|
|
38
|
-
1. `name`
|
|
39
|
-
2. `"private": true
|
|
40
|
-
3.
|
|
38
|
+
1. Check the `name` and `description` fields.
|
|
39
|
+
2. If `"private": true`, **skip** this package.
|
|
40
|
+
3. Identify the package entry point source code.
|
|
41
41
|
|
|
42
|
-
#### C-2.
|
|
42
|
+
#### C-2. Analyze Source Code
|
|
43
43
|
|
|
44
|
-
1.
|
|
45
|
-
2. JSDoc
|
|
44
|
+
1. Recursively read the entry point file and all exports to collect every public API.
|
|
45
|
+
2. If JSDoc comments exist, use them as descriptions for each item.
|
|
46
46
|
|
|
47
|
-
#### C-3.
|
|
47
|
+
#### C-3. Determine Document Structure and Generate
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Examine the source code size and the number of logical categories, then **autonomously** decide which of the two structures below is appropriate:
|
|
50
50
|
|
|
51
|
-
-
|
|
52
|
-
- **README.md + docs/*.md**:
|
|
51
|
+
- **Single README.md**: When the package is small, has few APIs, and category classification is unnecessary
|
|
52
|
+
- **README.md + docs/*.md**: When the package is large or has multiple logical categories
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
If an existing README.md or docs/ directory exists, **modify only the changed parts** based on the existing content. If no existing documentation exists, create it from scratch.
|
|
55
|
+
If the structure changes (B to A), delete the now-unnecessary `docs/` directory.
|
|
56
|
+
Write in **English**.
|
|
57
57
|
|
|
58
|
-
#### C-4. package.json files
|
|
58
|
+
#### C-4. Manage package.json files Field
|
|
59
59
|
|
|
60
|
-
`docs/`
|
|
60
|
+
When creating or deleting the `docs/` directory, update the `files` array in `package.json` accordingly:
|
|
61
61
|
|
|
62
|
-
-
|
|
63
|
-
-
|
|
62
|
+
- **When applying Structure B**: If the `files` array does not contain `"docs"`, add it.
|
|
63
|
+
- **When applying Structure A**: If the `files` array contains `"docs"`, remove it.
|
|
64
64
|
|
|
65
65
|
---
|
|
66
66
|
|
|
67
|
-
#####
|
|
67
|
+
##### Structure A: Single README.md (Small Packages)
|
|
68
68
|
|
|
69
|
-
`packages/<name>/README.md`
|
|
69
|
+
Create the `packages/<name>/README.md` file:
|
|
70
70
|
|
|
71
71
|
```markdown
|
|
72
72
|
# <package-name from package.json>
|
|
73
73
|
|
|
74
74
|
> <description from package.json>
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
<Write a detailed description of the package's main features and purpose in English>
|
|
77
77
|
|
|
78
78
|
## API Reference
|
|
79
79
|
|
|
80
80
|
### <exportedName>
|
|
81
81
|
|
|
82
82
|
```typescript
|
|
83
|
-
<export
|
|
83
|
+
<export signature code>
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
<Description of this API>
|
|
87
87
|
|
|
88
88
|
---
|
|
89
89
|
|
|
90
|
-
(...
|
|
90
|
+
(... Repeat for all exported items ...)
|
|
91
91
|
|
|
92
92
|
## Usage Examples
|
|
93
93
|
|
|
94
94
|
```typescript
|
|
95
95
|
import { ... } from "<package-name>";
|
|
96
96
|
|
|
97
|
-
//
|
|
97
|
+
// Main usage example code
|
|
98
98
|
```
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
---
|
|
102
102
|
|
|
103
|
-
#####
|
|
103
|
+
##### Structure B: README.md + docs/*.md (Large Packages)
|
|
104
104
|
|
|
105
|
-
**README.md** — `packages/<name>/README.md`
|
|
105
|
+
**README.md** — Create the `packages/<name>/README.md` file:
|
|
106
106
|
|
|
107
107
|
```markdown
|
|
108
108
|
# <package-name from package.json>
|
|
109
109
|
|
|
110
110
|
> <description from package.json>
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
<Write a detailed description of the package's main features and purpose in English>
|
|
113
113
|
|
|
114
114
|
## Documentation
|
|
115
115
|
|
|
116
116
|
| Category | Description |
|
|
117
117
|
|----------|-------------|
|
|
118
|
-
| [<Category1>](docs/<category1>.md) |
|
|
119
|
-
| [<Category2>](docs/<category2>.md) |
|
|
118
|
+
| [<Category1>](docs/<category1>.md) | <Category description and list of key items> |
|
|
119
|
+
| [<Category2>](docs/<category2>.md) | <Category description and list of key items> |
|
|
120
120
|
| ... | ... |
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
**docs/*.md** —
|
|
123
|
+
**docs/*.md** — Create a `packages/<name>/docs/<category>.md` file for each category:
|
|
124
124
|
|
|
125
125
|
```markdown
|
|
126
126
|
# <Category Name>
|
|
@@ -128,39 +128,39 @@ import { ... } from "<package-name>";
|
|
|
128
128
|
## <exportedName>
|
|
129
129
|
|
|
130
130
|
```typescript
|
|
131
|
-
<export
|
|
131
|
+
<export signature code>
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
<Description of this API>
|
|
135
135
|
|
|
136
136
|
---
|
|
137
137
|
|
|
138
|
-
(...
|
|
138
|
+
(... Repeat for all exported items in this category ...)
|
|
139
139
|
|
|
140
140
|
## Usage Examples
|
|
141
141
|
|
|
142
142
|
```typescript
|
|
143
143
|
import { ... } from "<package-name>";
|
|
144
144
|
|
|
145
|
-
//
|
|
145
|
+
// Main usage example code for this category
|
|
146
146
|
```
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
|
|
149
|
+
Determine category names and classifications autonomously, considering the source code directory structure, functional similarity, etc.
|
|
150
150
|
|
|
151
151
|
---
|
|
152
152
|
|
|
153
|
-
### D.
|
|
153
|
+
### D. Collect Public Package List
|
|
154
154
|
|
|
155
|
-
`packages/*/package.json
|
|
155
|
+
Use Glob to search `packages/*/package.json`, excluding packages with `private: true`.
|
|
156
156
|
|
|
157
157
|
---
|
|
158
158
|
|
|
159
|
-
### E.
|
|
159
|
+
### E. Run Agent Per Package in Parallel
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
For each remaining package, use the Agent tool to pass the following prompt **in parallel**:
|
|
162
162
|
```
|
|
163
|
-
/sd-readme
|
|
163
|
+
/sd-readme <package-name>
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
-
|
|
166
|
+
Terminate once all subagents have completed.
|