@simplysm/sd-claude 13.0.40 → 13.0.42
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-code-conventions.md +34 -0
- package/claude/rules/sd-directories.md +7 -0
- package/claude/rules/sd-language.md +0 -1
- package/claude/rules/sd-workflow-rules.md +15 -0
- package/claude/skills/sd-skill/SKILL.md +13 -1
- package/package.json +1 -1
- package/claude/rules/sd-naming-conventions.md +0 -13
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Code Conventions
|
|
2
|
+
|
|
3
|
+
## Generic Type Parameters
|
|
4
|
+
|
|
5
|
+
- Always use descriptive names — single-letter `T` alone is not allowed
|
|
6
|
+
- Use `T` prefix + descriptive name: `TItem`, `TData`, `TResult`, `TKey`, `TValue`, `TAuthInfo`
|
|
7
|
+
|
|
8
|
+
## Prototype Extensions
|
|
9
|
+
|
|
10
|
+
Importing `@simplysm/core-common` adds extension methods to Array, Map, Set:
|
|
11
|
+
- `Array`: `single()`, `filterExists()`, `groupBy()`, `orderBy()`, etc.
|
|
12
|
+
- `Map`: `getOrCreate()`, `update()`
|
|
13
|
+
- `Set`: `adds()`, `toggle()`
|
|
14
|
+
|
|
15
|
+
Before using extension methods: Verify actual existence in `@simplysm/core-common` extensions (check README or source). Do not guess methods that don't exist.
|
|
16
|
+
|
|
17
|
+
## Function Naming Conventions
|
|
18
|
+
|
|
19
|
+
- Do not use `Async` suffix on function names — Async is the default
|
|
20
|
+
- When both sync and async versions exist, use `Sync` suffix on the sync function
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
// Good
|
|
24
|
+
async function readFile() { ... } // Async (default)
|
|
25
|
+
function readFileSync() { ... } // Sync version
|
|
26
|
+
|
|
27
|
+
// Bad
|
|
28
|
+
async function readFileAsync() { ... } // Async suffix prohibited
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## JSDoc Convention
|
|
32
|
+
|
|
33
|
+
- Not enforced — omit when code is self-explanatory
|
|
34
|
+
- When written, use Korean
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Directory Reference
|
|
2
|
+
|
|
3
|
+
- `.cache/`: Build cache (`eslint.cache`, `typecheck-{env}.tsbuildinfo`, `dts.tsbuildinfo`). Reset: delete `.cache/`
|
|
4
|
+
- `.playwright-mcp/`: Playwright MCP output directory
|
|
5
|
+
- Screenshots/snapshots must always be saved to the `.playwright-mcp/` directory
|
|
6
|
+
- When calling `browser_take_screenshot`, always prefix filename with `.playwright-mcp/` (e.g., `.playwright-mcp/screenshot.png`)
|
|
7
|
+
- `PLAYWRIGHT_OUTPUT_DIR` only applies to auto-generated filenames; explicitly specified filenames are resolved relative to cwd
|
|
@@ -4,4 +4,3 @@ Respond in the **system's configured language** (set via Claude Code's language
|
|
|
4
4
|
|
|
5
5
|
- Technical terms, code identifiers (variable names, function names, etc.), and library names should remain as-is
|
|
6
6
|
- Show English error messages and logs in their original form, but provide explanations in the system language
|
|
7
|
-
- Files in `.claude/` folder and each package's `README.md` are written in English for consistent documentation
|
|
@@ -1,3 +1,18 @@
|
|
|
1
1
|
# Workflow Rules
|
|
2
2
|
|
|
3
3
|
- **No auto-proceeding after skill completion**: When the user explicitly invokes a skill, report the result and **stop** once the skill finishes. Do not guess the next step and proceed arbitrarily. Wait for explicit user instructions if further work is needed.
|
|
4
|
+
|
|
5
|
+
## Problem-Solving Principles
|
|
6
|
+
|
|
7
|
+
- **Root cause first**: When encountering errors or unexpected behavior, always investigate the root cause before attempting a fix. Do not apply workarounds, hacks, or surface-level patches.
|
|
8
|
+
- **No band-aid fixes**: Avoid techniques like suppressing errors, adding defensive checks to hide symptoms, or bypassing validation. These mask the real problem and create technical debt.
|
|
9
|
+
- **Consider refactoring**: If the root cause reveals a design flaw or structural issue, propose a refactoring approach rather than working around it. A proper fix — even if larger in scope — is better than a fragile workaround.
|
|
10
|
+
- **Trace the full chain**: Follow the error or issue through the entire call chain (caller -> callee -> dependencies) to understand why it happens, not just where it happens.
|
|
11
|
+
- **When uncertain, ask**: If the root cause is unclear or the fix requires significant changes, discuss with the user before proceeding. Present findings and options rather than silently applying a quick fix.
|
|
12
|
+
|
|
13
|
+
## Pre-coding Checklist
|
|
14
|
+
|
|
15
|
+
- Before creating new files: Glob/Read similar existing files to check structure and patterns
|
|
16
|
+
- Before modifying functions/classes: Read the file to understand existing code style
|
|
17
|
+
- When unsure about API/method usage: Check signatures in source code
|
|
18
|
+
- **If confidence is low, ask the user instead of writing code**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sd-skill
|
|
3
3
|
description: Use when creating new skills, editing existing skills, or verifying skills work before deployment
|
|
4
|
-
model:
|
|
4
|
+
model: opus
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Writing Skills
|
|
@@ -401,6 +401,15 @@ Different skill types need different test approaches:
|
|
|
401
401
|
- Variation scenarios: Do they handle edge cases?
|
|
402
402
|
- Missing information tests: Do instructions have gaps?
|
|
403
403
|
|
|
404
|
+
**How to test:** Give a subagent a problem the technique solves, WITHOUT the skill. Observe what approach they use naturally. Then give the SAME problem WITH the skill and verify they apply the technique correctly.
|
|
405
|
+
|
|
406
|
+
```
|
|
407
|
+
Example: Testing a "condition-based-waiting" skill
|
|
408
|
+
1. Ask subagent: "Fix this flaky test that uses setTimeout(500)"
|
|
409
|
+
2. WITHOUT skill: Agent increases timeout to 2000ms (wrong approach)
|
|
410
|
+
3. WITH skill: Agent replaces with polling/condition check (correct)
|
|
411
|
+
```
|
|
412
|
+
|
|
404
413
|
**Success criteria:** Agent successfully applies technique to new scenario
|
|
405
414
|
|
|
406
415
|
### Pattern Skills (mental models)
|
|
@@ -437,6 +446,7 @@ Different skill types need different test approaches:
|
|
|
437
446
|
| "I'm confident it's good" | Overconfidence guarantees issues. Test anyway. |
|
|
438
447
|
| "Academic review is enough" | Reading ≠ using. Test application scenarios. |
|
|
439
448
|
| "No time to test" | Deploying untested skill wastes more time fixing it later. |
|
|
449
|
+
| "I already know the baseline failures" | You know what YOU think the failures are. Run a subagent to see what ACTUALLY happens. Knowledge ≠ observation. |
|
|
440
450
|
|
|
441
451
|
**All of these mean: Test before deploying. No exceptions.**
|
|
442
452
|
|
|
@@ -527,6 +537,8 @@ Run pressure scenario with subagent WITHOUT the skill. Document exact behavior:
|
|
|
527
537
|
|
|
528
538
|
This is "watch the test fail" - you must see what agents naturally do before writing the skill.
|
|
529
539
|
|
|
540
|
+
**You MUST actually run a subagent.** Do not substitute your own knowledge of "what agents would probably do." Your prediction of baseline behavior ≠ observed baseline behavior. Run the subagent, read the output, document what actually happened.
|
|
541
|
+
|
|
530
542
|
### GREEN: Write Minimal Skill
|
|
531
543
|
|
|
532
544
|
Write skill that addresses those specific rationalizations. Don't add extra content for hypothetical cases.
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Function Naming Conventions
|
|
2
|
-
|
|
3
|
-
- Do not use `Async` suffix on function names — Async is the default
|
|
4
|
-
- When both sync and async versions exist, use `Sync` suffix on the sync function
|
|
5
|
-
|
|
6
|
-
```typescript
|
|
7
|
-
// Good
|
|
8
|
-
async function readFile() { ... } // Async (default)
|
|
9
|
-
function readFileSync() { ... } // Sync version
|
|
10
|
-
|
|
11
|
-
// Bad
|
|
12
|
-
async function readFileAsync() { ... } // Async suffix prohibited
|
|
13
|
-
```
|