@simplysm/sd-claude 13.0.59 → 13.0.61
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/agents/sd-api-reviewer.md +7 -6
- package/claude/agents/sd-code-simplifier.md +0 -3
- package/claude/agents/sd-security-reviewer.md +14 -3
- package/claude/refs/sd-angular.md +127 -0
- package/claude/refs/sd-orm-v12.md +81 -0
- package/claude/refs/sd-orm.md +7 -1
- package/claude/refs/sd-solid.md +8 -0
- package/claude/rules/sd-refs-linker.md +41 -9
- package/claude/skills/sd-api-name-review/SKILL.md +6 -6
- package/claude/skills/sd-brainstorm/SKILL.md +4 -0
- package/claude/skills/sd-check/SKILL.md +10 -10
- package/claude/skills/sd-check/baseline-analysis.md +24 -3
- package/claude/skills/sd-check/test-scenarios.md +34 -1
- package/claude/skills/sd-commit/SKILL.md +11 -5
- package/claude/skills/sd-debug/SKILL.md +26 -17
- package/claude/skills/sd-debug/condition-based-waiting.md +17 -12
- package/claude/skills/sd-debug/defense-in-depth.md +14 -8
- package/claude/skills/sd-debug/root-cause-tracing.md +18 -4
- package/claude/skills/sd-debug/test-baseline-pressure.md +10 -8
- package/claude/skills/sd-discuss/SKILL.md +17 -13
- package/claude/skills/sd-eml-analyze/SKILL.md +8 -7
- package/claude/skills/sd-explore/SKILL.md +2 -0
- package/claude/skills/sd-plan/SKILL.md +9 -3
- package/claude/skills/sd-plan-dev/SKILL.md +7 -2
- package/claude/skills/sd-plan-dev/code-quality-reviewer-prompt.md +2 -0
- package/claude/skills/sd-plan-dev/final-review-prompt.md +2 -2
- package/claude/skills/sd-readme/SKILL.md +22 -16
- package/claude/skills/sd-review/SKILL.md +22 -21
- package/claude/skills/sd-skill/SKILL.md +94 -35
- package/claude/skills/sd-skill/anthropic-best-practices.md +174 -148
- package/claude/skills/sd-skill/examples/CLAUDE_MD_TESTING.md +11 -0
- package/claude/skills/sd-skill/persuasion-principles.md +39 -6
- package/claude/skills/sd-skill/testing-skills-with-subagents.md +46 -26
- package/claude/skills/sd-tdd/SKILL.md +54 -36
- package/claude/skills/sd-tdd/testing-anti-patterns.md +40 -22
- package/claude/skills/sd-use/SKILL.md +22 -22
- package/claude/skills/sd-worktree/SKILL.md +1 -0
- package/claude/skills/sd-worktree/sd-worktree.mjs +1 -1
- package/package.json +1 -1
- package/claude/skills/sd-check/run-checks.mjs +0 -54
|
@@ -62,6 +62,7 @@ Start with a brief summary of the package's public API surface.
|
|
|
62
62
|
### Findings by Category
|
|
63
63
|
|
|
64
64
|
For each high-confidence issue:
|
|
65
|
+
|
|
65
66
|
- Clear description with confidence score
|
|
66
67
|
- File path and relevant export/type
|
|
67
68
|
- Comparison with industry standard libraries (if applicable)
|
|
@@ -69,12 +70,12 @@ For each high-confidence issue:
|
|
|
69
70
|
|
|
70
71
|
### Priority
|
|
71
72
|
|
|
72
|
-
| Priority | Criteria
|
|
73
|
-
|
|
74
|
-
| **P0**
|
|
75
|
-
| **P1**
|
|
76
|
-
| **P2**
|
|
77
|
-
| **Keep** | Already aligned with standards
|
|
73
|
+
| Priority | Criteria |
|
|
74
|
+
| -------- | -------------------------------------------------------------- |
|
|
75
|
+
| **P0** | API misuse likely — naming misleads or types insufficient |
|
|
76
|
+
| **P1** | Significant friction — unnecessary complexity or inconsistency |
|
|
77
|
+
| **P2** | Minor improvement — better naming or defaults exist |
|
|
78
|
+
| **Keep** | Already aligned with standards |
|
|
78
79
|
|
|
79
80
|
### Summary Table
|
|
80
81
|
|
|
@@ -11,14 +11,12 @@ You will analyze recently modified code and apply refinements that:
|
|
|
11
11
|
1. **Preserve Functionality**: Never change what the code does - only how it does it. All original features, outputs, and behaviors must remain intact.
|
|
12
12
|
|
|
13
13
|
2. **Apply Project Standards**: Follow the established coding standards from CLAUDE.md including:
|
|
14
|
-
|
|
15
14
|
- Import patterns, module structure, and naming conventions
|
|
16
15
|
- Framework-specific component patterns (as defined in CLAUDE.md)
|
|
17
16
|
- Error handling patterns
|
|
18
17
|
- Type annotation conventions
|
|
19
18
|
|
|
20
19
|
3. **Enhance Clarity**: Simplify code structure by:
|
|
21
|
-
|
|
22
20
|
- Reducing unnecessary complexity and nesting
|
|
23
21
|
- Eliminating redundant code and abstractions
|
|
24
22
|
- Improving readability through clear variable and function names
|
|
@@ -28,7 +26,6 @@ You will analyze recently modified code and apply refinements that:
|
|
|
28
26
|
- Choose clarity over brevity - explicit code is often better than overly compact code
|
|
29
27
|
|
|
30
28
|
4. **Maintain Balance**: Avoid over-simplification that could:
|
|
31
|
-
|
|
32
29
|
- Reduce code clarity or maintainability
|
|
33
30
|
- Create overly clever solutions that are hard to understand
|
|
34
31
|
- Combine too many concerns into single functions or components
|
|
@@ -12,6 +12,7 @@ simplysm ORM uses **string escaping** (NOT parameter binding) for SQL generation
|
|
|
12
12
|
This means application-level input validation is the PRIMARY defense against SQL injection.
|
|
13
13
|
|
|
14
14
|
### Escaping mechanisms in place:
|
|
15
|
+
|
|
15
16
|
- MySQL: Backslashes, quotes, NULL bytes, control characters escaped
|
|
16
17
|
- Forces utf8mb4 charset (defends against multi-byte attacks)
|
|
17
18
|
- These are necessary but NOT sufficient without input validation
|
|
@@ -25,16 +26,19 @@ By default, review unstaged changes from `git diff` that touch ORM queries or se
|
|
|
25
26
|
For every ORM query in the diff, verify:
|
|
26
27
|
|
|
27
28
|
### 1. Input Source Classification
|
|
29
|
+
|
|
28
30
|
- [ ] Identify where each query parameter originates (user input, internal data, config)
|
|
29
31
|
- [ ] User input = anything from HTTP request, WebSocket message, file upload
|
|
30
32
|
|
|
31
33
|
### 2. Validation Before Query
|
|
34
|
+
|
|
32
35
|
- [ ] User-sourced strings: validated with allowlist or regex before use
|
|
33
36
|
- [ ] Numeric values: `Number()` conversion + `Number.isNaN()` check
|
|
34
37
|
- [ ] Enum values: checked against valid set before use
|
|
35
38
|
- [ ] No raw `req.query`, `req.params`, `req.body` values passed to ORM
|
|
36
39
|
|
|
37
40
|
### 3. Service Endpoint Review
|
|
41
|
+
|
|
38
42
|
- [ ] All ServiceServer RPC handlers validate incoming arguments
|
|
39
43
|
- WebSocket message payloads validated before ORM usage
|
|
40
44
|
- [ ] Type coercion applied at service boundary
|
|
@@ -44,16 +48,22 @@ For every ORM query in the diff, verify:
|
|
|
44
48
|
```typescript
|
|
45
49
|
// DANGEROUS: Direct user input in query
|
|
46
50
|
const name = req.query.name;
|
|
47
|
-
db.user()
|
|
51
|
+
db.user()
|
|
52
|
+
.where((u) => [expr.eq(u.name, name)])
|
|
53
|
+
.result();
|
|
48
54
|
|
|
49
55
|
// SAFE: Validated first
|
|
50
56
|
const name = validateString(req.query.name, { maxLength: 100 });
|
|
51
|
-
db.user()
|
|
57
|
+
db.user()
|
|
58
|
+
.where((u) => [expr.eq(u.name, name)])
|
|
59
|
+
.result();
|
|
52
60
|
|
|
53
61
|
// SAFE: Type coercion with check
|
|
54
62
|
const id = Number(req.query.id);
|
|
55
63
|
if (Number.isNaN(id)) throw new Error("Invalid ID");
|
|
56
|
-
db.user()
|
|
64
|
+
db.user()
|
|
65
|
+
.where((u) => [expr.eq(u.id, id)])
|
|
66
|
+
.result();
|
|
57
67
|
```
|
|
58
68
|
|
|
59
69
|
## Confidence Scoring
|
|
@@ -73,6 +83,7 @@ Rate each potential issue on a scale from 0-100:
|
|
|
73
83
|
Start by stating what files/endpoints you reviewed.
|
|
74
84
|
|
|
75
85
|
For each finding, provide:
|
|
86
|
+
|
|
76
87
|
- Severity: **CRITICAL** (confidence >= 90) / **WARNING** (confidence >= 75)
|
|
77
88
|
- File path and line number
|
|
78
89
|
- Input source (where the unvalidated data comes from)
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Angular Guidelines (v12 only)
|
|
2
|
+
|
|
3
|
+
> v13에는 Angular 없음 (SolidJS로 대체됨). 아래 규칙은 v12 전용.
|
|
4
|
+
|
|
5
|
+
## Core Rules
|
|
6
|
+
|
|
7
|
+
- **Signal 기반**: 상태에 RxJS 사용 금지. `$signal`, `$computed`, `$effect` 사용
|
|
8
|
+
- **Standalone only**: 모든 컴포넌트 `standalone: true`
|
|
9
|
+
- **OnPush + None**: `ChangeDetectionStrategy.OnPush`, `ViewEncapsulation.None` 필수
|
|
10
|
+
- **input()/output()**: `@Input()`, `@Output()` 데코레이터 사용 금지 → `input()`, `output()`, `model()` 사용
|
|
11
|
+
- **Control flow**: `@if`, `@for`, `@switch` 사용 (`*ngIf`, `*ngFor` 금지)
|
|
12
|
+
- **DI**: `inject()` 사용 (생성자 파라미터 주입 금지)
|
|
13
|
+
- **아이콘**: `@ng-icons/tabler-icons` 사용 (FontAwesome 아님)
|
|
14
|
+
- **패키지 import**: `@simplysm/sd-angular` 루트에서만 import (서브폴더 접근 금지)
|
|
15
|
+
|
|
16
|
+
## Signal Utilities
|
|
17
|
+
|
|
18
|
+
- `$signal<T>(value?)` — writable signal (`$mark()`로 dirty 표시 가능)
|
|
19
|
+
- `$computed(fn)` — 동기 computed. 비동기: `$computed([deps], asyncFn, { initialValue })`
|
|
20
|
+
- `$effect(fn)` — 조건 추적 가능: `$effect([() => dep1()], () => { ... })`
|
|
21
|
+
- `$arr(signal)` — 배열 조작 (`.insert()`, `.remove()`, `.toggle()`, `.diffs()`)
|
|
22
|
+
- `$obj(signal)` — 객체 조작 (`.updateField()`, `.snapshot()`, `.changed()`)
|
|
23
|
+
- `$set(signal)` — Set 조작 (`.add()`, `.toggle()`)
|
|
24
|
+
|
|
25
|
+
## Component Pattern
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
@Component({
|
|
29
|
+
selector: "app-my-page",
|
|
30
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
31
|
+
encapsulation: ViewEncapsulation.None,
|
|
32
|
+
standalone: true,
|
|
33
|
+
imports: [SdTextfieldControl, SdButtonControl],
|
|
34
|
+
template: `
|
|
35
|
+
...
|
|
36
|
+
`,
|
|
37
|
+
})
|
|
38
|
+
export class MyPage {
|
|
39
|
+
#sdToast = inject(SdToastProvider);
|
|
40
|
+
#sdModal = inject(SdModalProvider);
|
|
41
|
+
|
|
42
|
+
busyCount = $signal(0);
|
|
43
|
+
data = $signal<IData>({});
|
|
44
|
+
|
|
45
|
+
constructor() {
|
|
46
|
+
$effect([], async () => {
|
|
47
|
+
await this.#loadData();
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Bootstrap
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
sdHmrBootstrapAsync(AppPage, {
|
|
57
|
+
providers: [
|
|
58
|
+
provideRouter([...routes], withHashLocation()),
|
|
59
|
+
provideSdAngular({
|
|
60
|
+
clientName: "my-app",
|
|
61
|
+
defaultTheme: "compact",
|
|
62
|
+
}),
|
|
63
|
+
],
|
|
64
|
+
});
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Modal
|
|
68
|
+
|
|
69
|
+
`ISdModal<T>` 인터페이스 구현:
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
export class MyModal implements ISdModal<TResult> {
|
|
73
|
+
param = input<string>();
|
|
74
|
+
close = output<TResult>();
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// 호출
|
|
78
|
+
await this.#sdModal.showAsync({
|
|
79
|
+
type: MyModal,
|
|
80
|
+
title: "제목",
|
|
81
|
+
inputs: { param: "value" },
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Data Sheet
|
|
86
|
+
|
|
87
|
+
CRUD 테이블은 `AbsSdDataSheet<TFilter, TItem, TKey>` 확장:
|
|
88
|
+
|
|
89
|
+
- `search()` — 데이터 조회
|
|
90
|
+
- `submit()` — 변경사항 저장
|
|
91
|
+
- `downloadExcel()` / `uploadExcel()` — 엑셀 연동
|
|
92
|
+
- `$mark()` — 셀 수정 시 dirty 표시 필수
|
|
93
|
+
|
|
94
|
+
## Busy / Error Handling
|
|
95
|
+
|
|
96
|
+
```typescript
|
|
97
|
+
this.busyCount.update((v) => v + 1);
|
|
98
|
+
try {
|
|
99
|
+
await this.#sdToast.try(async () => {
|
|
100
|
+
/* work */
|
|
101
|
+
});
|
|
102
|
+
} finally {
|
|
103
|
+
this.busyCount.update((v) => v - 1);
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Theming
|
|
108
|
+
|
|
109
|
+
- CSS 변수 사용: `--theme-primary-default`, `--gap-sm`, `--border-radius-default` 등
|
|
110
|
+
- 하드코딩 색상 금지
|
|
111
|
+
- 테마: `"compact"` | `"mobile"` | `"kiosk"` + dark mode
|
|
112
|
+
|
|
113
|
+
## Permissions
|
|
114
|
+
|
|
115
|
+
```typescript
|
|
116
|
+
perms = usePermsSignal(["base.partner"], ["use", "edit"]);
|
|
117
|
+
canEdit = $computed(() => this.perms().includes("edit"));
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Routing
|
|
121
|
+
|
|
122
|
+
```typescript
|
|
123
|
+
{
|
|
124
|
+
path: "my-page",
|
|
125
|
+
loadComponent: () => import("./MyPage").then((m) => m.MyPage),
|
|
126
|
+
}
|
|
127
|
+
```
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# ORM Guidelines (v12)
|
|
2
|
+
|
|
3
|
+
## Table Definition — Decorator 기반
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
@Table({ description: "사용자", database: "mydb" })
|
|
7
|
+
export class User {
|
|
8
|
+
@Column({ primaryKey: 1, autoIncrement: true, description: "ID" })
|
|
9
|
+
id!: number;
|
|
10
|
+
|
|
11
|
+
@Column({ dataType: { type: "STRING", length: 100 }, description: "이름" })
|
|
12
|
+
name!: string;
|
|
13
|
+
|
|
14
|
+
@Column({ nullable: true, description: "이메일" })
|
|
15
|
+
email?: string;
|
|
16
|
+
|
|
17
|
+
@ForeignKey(["departmentId"], () => Department, "부서")
|
|
18
|
+
department?: Department;
|
|
19
|
+
|
|
20
|
+
@ForeignKeyTarget(() => Order, "user", "주문 목록")
|
|
21
|
+
orders?: Order[];
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Decorators
|
|
26
|
+
|
|
27
|
+
- `@Table({ description, database?, schema?, name?, view?, procedure? })` — 테이블/뷰/프로시저 정의
|
|
28
|
+
- `@Column({ description, name?, dataType?, nullable?, autoIncrement?, primaryKey? })` — 컬럼 정의
|
|
29
|
+
- `@ForeignKey(columnNames, targetTypeFwd, description)` — FK 관계
|
|
30
|
+
- `@ForeignKeyTarget(sourceTypeFwd, fkPropertyKey, description, multiplicity?)` — FK 역방향
|
|
31
|
+
- `@ReferenceKey(columnNames, targetTypeFwd, description)` — 참조 관계
|
|
32
|
+
- `@ReferenceKeyTarget(sourceTypeFwd, refKeyPropertyKey, description, multiplicity?)` — 참조 역방향
|
|
33
|
+
- `@Index({ name?, order?, orderBy?, unique? })` — 인덱스
|
|
34
|
+
|
|
35
|
+
### 요구사항
|
|
36
|
+
|
|
37
|
+
- `tsconfig`에 `experimentalDecorators: true`, `emitDecoratorMetadata: true` 필요
|
|
38
|
+
|
|
39
|
+
## DbContext
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
export abstract class MyDbContext extends DbContext {
|
|
43
|
+
user = new Queryable(this, User);
|
|
44
|
+
order = new Queryable(this, Order);
|
|
45
|
+
|
|
46
|
+
get migrations(): Type<IDbMigration>[] {
|
|
47
|
+
return [Migration001, Migration002];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Query
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
// Select
|
|
56
|
+
const users = await db.user
|
|
57
|
+
.select((item) => ({ id: item.id, name: item.name }))
|
|
58
|
+
.where((item) => [db.qh.equal(item.id, userId)])
|
|
59
|
+
.resultAsync();
|
|
60
|
+
|
|
61
|
+
// Insert
|
|
62
|
+
await db.user.insertAsync([{ name: "홍길동" }]);
|
|
63
|
+
|
|
64
|
+
// Connect with transaction
|
|
65
|
+
await db.connectAsync(async () => {
|
|
66
|
+
await db.user.insertAsync([{ name: "홍길동" }]);
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## SQL Injection Prevention
|
|
71
|
+
|
|
72
|
+
ORM uses string escaping (not parameter binding). **Always validate user input before ORM queries.**
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
const userId = Number(req.query.id);
|
|
76
|
+
if (Number.isNaN(userId)) throw new Error("Invalid ID");
|
|
77
|
+
await db.user
|
|
78
|
+
.select((item) => ({ id: item.id, name: item.name }))
|
|
79
|
+
.where((item) => [db.qh.equal(item.id, userId)])
|
|
80
|
+
.resultAsync();
|
|
81
|
+
```
|
package/claude/refs/sd-orm.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# ORM Guidelines
|
|
2
2
|
|
|
3
3
|
## Table Definition
|
|
4
|
+
|
|
4
5
|
```typescript
|
|
5
6
|
const User = Table("User")
|
|
6
7
|
.database("mydb")
|
|
@@ -9,9 +10,14 @@ const User = Table("User")
|
|
|
9
10
|
```
|
|
10
11
|
|
|
11
12
|
## SQL Injection Prevention
|
|
13
|
+
|
|
12
14
|
ORM uses string escaping (not parameter binding). **Always validate user input before ORM queries.**
|
|
15
|
+
|
|
13
16
|
```typescript
|
|
14
17
|
const userId = Number(req.query.id);
|
|
15
18
|
if (Number.isNaN(userId)) throw new Error("Invalid ID");
|
|
16
|
-
await db
|
|
19
|
+
await db
|
|
20
|
+
.user()
|
|
21
|
+
.where((u) => [expr.eq(u.id, userId)])
|
|
22
|
+
.result();
|
|
17
23
|
```
|
package/claude/refs/sd-solid.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
**SolidJS is NOT React!**
|
|
4
4
|
|
|
5
5
|
## Core Concepts
|
|
6
|
+
|
|
6
7
|
- Component functions run **once** at mount (not on every state change)
|
|
7
8
|
- Fine-grained reactivity: unchanged signals don't re-evaluate expressions
|
|
8
9
|
- `createMemo`: only for expensive computations used in multiple places
|
|
@@ -14,26 +15,32 @@
|
|
|
14
15
|
- CSS NOT transpiled → no `aspect-ratio`, `inset`, `:is()`, `:where()`
|
|
15
16
|
|
|
16
17
|
## Props Design
|
|
18
|
+
|
|
17
19
|
- Props that don't need parameters must accept plain values (`editable={perms().edit}`), not wrapped in functions (`editable={() => perms().edit}`) — use function props only when parameters are needed (callbacks)
|
|
18
20
|
|
|
19
21
|
## Implementation Rules
|
|
22
|
+
|
|
20
23
|
- Prefer signals/stores over Provider/Context
|
|
21
24
|
- Check existing patterns before introducing abstractions
|
|
22
25
|
- Before modifying components: always Read the file to check existing props/patterns
|
|
23
26
|
|
|
24
27
|
## Hook Naming
|
|
28
|
+
|
|
25
29
|
- `create*`: Reactive hooks wrapping SolidJS primitives
|
|
26
30
|
- `use*`: Hooks depending on Provider Context
|
|
27
31
|
- Others: no hook prefix
|
|
28
32
|
|
|
29
33
|
## Compound Components
|
|
34
|
+
|
|
30
35
|
All sub-components via dot notation only (`Parent.Child`).
|
|
36
|
+
|
|
31
37
|
- Define `interface ParentComponent { Child: typeof ChildComponent }`
|
|
32
38
|
- Assign `Parent.Child = ChildComponent;`
|
|
33
39
|
- Don't export sub-components separately (export parent only)
|
|
34
40
|
- UI elements → compound sub-components, non-rendering config (state, behavior, callbacks) → props
|
|
35
41
|
|
|
36
42
|
## Tailwind CSS
|
|
43
|
+
|
|
37
44
|
- `darkMode: "class"`, `aspectRatio` plugin disabled (Chrome 84)
|
|
38
45
|
- Semantic colors: `primary`(blue), `info`(sky), `success`(green), `warning`(amber), `danger`(red), `base`(zinc) → never use `zinc-*` directly
|
|
39
46
|
- Heights: `field`, `field-sm`, `field-lg`
|
|
@@ -43,6 +50,7 @@ All sub-components via dot notation only (`Parent.Child`).
|
|
|
43
50
|
- Before modifying styles: Read existing class patterns of the same component
|
|
44
51
|
|
|
45
52
|
## Application View Naming (`client-*`)
|
|
53
|
+
|
|
46
54
|
- `~Sheet` — List view based on DataSheet (e.g., `UserSheet`)
|
|
47
55
|
- `~Detail` — Single record detail/edit view (e.g., `MyInfoDetail`)
|
|
48
56
|
- `~View` — Everything else (e.g., `LoginView`, `MainView`)
|
|
@@ -2,17 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
Before starting work, **Read** the relevant reference files from `.claude/refs/`.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
## Version Detection
|
|
6
|
+
|
|
7
|
+
`package.json`의 `version` 필드로 메이저 버전을 판별한다.
|
|
8
|
+
|
|
9
|
+
- `12.x.x` → **v12** (< 13)
|
|
10
|
+
- `13.x.x` → **v13** (>= 13)
|
|
11
|
+
|
|
12
|
+
## Common (all versions)
|
|
13
|
+
|
|
14
|
+
| When | Read this file |
|
|
15
|
+
| ------------------------------------------------ | ------------------------------------- |
|
|
16
|
+
| Writing or modifying code | `.claude/refs/sd-code-conventions.md` |
|
|
17
|
+
| Working with `.cache/` or Playwright screenshots | `.claude/refs/sd-directories.md` |
|
|
18
|
+
| Using `@simplysm/*` package APIs | `.claude/refs/sd-simplysm-docs.md` |
|
|
19
|
+
| Debugging, problem-solving, or planning approach | `.claude/refs/sd-workflow.md` |
|
|
20
|
+
| @simplysm/service-\* 사용 시 | `.claude/refs/sd-service.md` |
|
|
21
|
+
|
|
22
|
+
## v12 only (< 13)
|
|
23
|
+
|
|
24
|
+
| When | Read this file |
|
|
25
|
+
| -------------------------------------- | ---------------------------- |
|
|
26
|
+
| Angular / @simplysm/sd-angular 작업 시 | `.claude/refs/sd-angular.md` |
|
|
27
|
+
| @simplysm/sd-orm-\* 사용 시 | `.claude/refs/sd-orm-v12.md` |
|
|
28
|
+
|
|
29
|
+
- v12는 **Angular** 기반 (SolidJS 없음)
|
|
30
|
+
- ORM은 **데코레이터** 패턴 (`@Table`, `@Column`)
|
|
31
|
+
- 패키지명: `sd-` prefix 사용 (`sd-core-common`, `sd-orm-common` 등)
|
|
32
|
+
- 패키지 매니저: **yarn**
|
|
33
|
+
|
|
34
|
+
## v13 only (>= 13)
|
|
35
|
+
|
|
36
|
+
| When | Read this file |
|
|
37
|
+
| -------------------------------------------- | -------------------------- |
|
|
11
38
|
| SolidJS / @simplysm/solid / Tailwind 작업 시 | `.claude/refs/sd-solid.md` |
|
|
12
|
-
| @simplysm/orm
|
|
13
|
-
|
|
39
|
+
| @simplysm/orm-\* 사용 시 | `.claude/refs/sd-orm.md` |
|
|
40
|
+
|
|
41
|
+
- v13는 **SolidJS** 기반 (Angular 없음)
|
|
42
|
+
- ORM은 **함수형 빌더** 패턴 (`Table().columns().primaryKey()`)
|
|
43
|
+
- 패키지명: prefix 없음 (`core-common`, `orm-common` 등)
|
|
44
|
+
- 패키지 매니저: **pnpm**
|
|
45
|
+
|
|
46
|
+
## Rules
|
|
14
47
|
|
|
15
|
-
**Rules:**
|
|
16
48
|
- Read the reference BEFORE starting the related work (not after)
|
|
17
49
|
- You may read multiple references if the task spans multiple areas
|
|
18
50
|
- If unsure whether a reference applies, read it — the cost of reading is low
|
|
@@ -35,12 +35,12 @@ Based on Phase 1 results, determine comparison targets and perspectives:
|
|
|
35
35
|
|
|
36
36
|
Cross-compare Phase 1 and Phase 2 results to produce the report.
|
|
37
37
|
|
|
38
|
-
| Priority | Criteria
|
|
39
|
-
|
|
40
|
-
| **P0**
|
|
41
|
-
| **P1**
|
|
42
|
-
| **P2**
|
|
43
|
-
| **Keep** | Already aligned with standards
|
|
38
|
+
| Priority | Criteria |
|
|
39
|
+
| -------- | ------------------------------------------------------ |
|
|
40
|
+
| **P0** | Misaligned with majority of surveyed libraries |
|
|
41
|
+
| **P1** | Internal inconsistency (same concept, different names) |
|
|
42
|
+
| **P2** | Better industry term exists (optional) |
|
|
43
|
+
| **Keep** | Already aligned with standards |
|
|
44
44
|
|
|
45
45
|
Each item includes: current name, recommended change, rationale (usage patterns per library).
|
|
46
46
|
|
|
@@ -15,6 +15,7 @@ Start by understanding the current project context, then ask questions one at a
|
|
|
15
15
|
## The Process
|
|
16
16
|
|
|
17
17
|
**Understanding the idea:**
|
|
18
|
+
|
|
18
19
|
- Check out the current project state first (files, docs, recent commits)
|
|
19
20
|
- Ask questions one at a time to refine the idea
|
|
20
21
|
- Prefer multiple choice questions when possible, but open-ended is fine too
|
|
@@ -22,11 +23,13 @@ Start by understanding the current project context, then ask questions one at a
|
|
|
22
23
|
- Focus on understanding: purpose, constraints, success criteria
|
|
23
24
|
|
|
24
25
|
**Exploring approaches:**
|
|
26
|
+
|
|
25
27
|
- Propose 2-3 different approaches with trade-offs
|
|
26
28
|
- Present options conversationally with your recommendation and reasoning
|
|
27
29
|
- Lead with your recommended option and explain why
|
|
28
30
|
|
|
29
31
|
**Presenting the design:**
|
|
32
|
+
|
|
30
33
|
- Once you believe you understand what you're building, present the design
|
|
31
34
|
- Break it into sections of 200-300 words
|
|
32
35
|
- Ask after each section whether it looks right so far
|
|
@@ -36,6 +39,7 @@ Start by understanding the current project context, then ask questions one at a
|
|
|
36
39
|
## After the Design
|
|
37
40
|
|
|
38
41
|
**Documentation:**
|
|
42
|
+
|
|
39
43
|
- Write the validated design to `docs/plans/YYYY-MM-DD-<topic>-design.md`
|
|
40
44
|
- Commit the design document to git
|
|
41
45
|
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sd-check
|
|
3
3
|
description: Use when verifying code quality via typecheck, lint, and tests - before deployment, PR creation, after code changes, or when type errors, lint violations, or test failures are suspected. Applies to whole project or specific paths.
|
|
4
|
-
allowed-tools: Bash(
|
|
4
|
+
allowed-tools: Bash(npm run check), Bash(npm run typecheck), Bash(npm run lint --fix), Bash(npm run vitest)
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# sd-check
|
|
8
8
|
|
|
9
|
-
Run `
|
|
9
|
+
Run `npm run check`, fix errors, repeat until clean.
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
13
|
```
|
|
14
|
-
|
|
14
|
+
npm run check [path] [--type typecheck|lint|test]
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
| Example
|
|
18
|
-
|
|
19
|
-
| `/sd-check`
|
|
20
|
-
| `/sd-check packages/core-common`
|
|
21
|
-
| `/sd-check test`
|
|
22
|
-
| `/sd-check packages/core-common lint` | Specific path + type
|
|
17
|
+
| Example | Effect |
|
|
18
|
+
| ------------------------------------- | ------------------------- |
|
|
19
|
+
| `/sd-check` | Full project, all checks |
|
|
20
|
+
| `/sd-check packages/core-common` | Specific path, all checks |
|
|
21
|
+
| `/sd-check test` | Tests only, full project |
|
|
22
|
+
| `/sd-check packages/core-common lint` | Specific path + type |
|
|
23
23
|
|
|
24
24
|
Multiple types: `--type typecheck,lint`. No path = full project. No type = all checks.
|
|
25
25
|
|
|
26
26
|
## Workflow
|
|
27
27
|
|
|
28
|
-
1. **Run** `
|
|
28
|
+
1. **Run** `npm run check [path] [--type type]` (timeout: 600000)
|
|
29
29
|
2. **All passed?** Report with actual output numbers → done
|
|
30
30
|
3. **Errors?** Fix in priority order: typecheck → lint → test (fixes cascade)
|
|
31
31
|
- Test failures: run `git diff` to decide — update test or fix source
|
|
@@ -7,6 +7,7 @@ Tested 6 scenarios with agents WITHOUT sd-check skill. All agents failed to foll
|
|
|
7
7
|
## Common Failures Across All Scenarios
|
|
8
8
|
|
|
9
9
|
### 1. No Cost Optimization
|
|
10
|
+
|
|
10
11
|
**Failure:** All agents planned direct command execution instead of using haiku subagents.
|
|
11
12
|
|
|
12
13
|
**Observed in:** All scenarios (1-6)
|
|
@@ -16,9 +17,11 @@ Tested 6 scenarios with agents WITHOUT sd-check skill. All agents failed to foll
|
|
|
16
17
|
**What skill must prevent:** Skill must explicitly require haiku subagent usage
|
|
17
18
|
|
|
18
19
|
### 2. Incomplete Parallelization
|
|
20
|
+
|
|
19
21
|
**Failure:** Agents either ran sequentially or only partially parallelized.
|
|
20
22
|
|
|
21
23
|
**Examples:**
|
|
24
|
+
|
|
22
25
|
- Scenario 1: Used `&` for typecheck/lint but ran tests sequentially ("stratified parallel")
|
|
23
26
|
- Scenario 2: No parallelization at all
|
|
24
27
|
- Scenario 3: Sequential fix → verify → fix → verify
|
|
@@ -28,20 +31,24 @@ Tested 6 scenarios with agents WITHOUT sd-check skill. All agents failed to foll
|
|
|
28
31
|
**What skill must prevent:** Skill must require ALL 3 checks (typecheck, lint, test) in parallel via 3 separate haiku agents
|
|
29
32
|
|
|
30
33
|
### 3. Missing Environment Pre-checks
|
|
34
|
+
|
|
31
35
|
**Failure:** No systematic environment validation before running checks.
|
|
32
36
|
|
|
33
37
|
**Observed:**
|
|
38
|
+
|
|
34
39
|
- Scenario 1: Checked Docker for ORM tests, but not other prerequisites
|
|
35
|
-
- Scenario 6: Only checked
|
|
40
|
+
- Scenario 6: Only checked lock file, missed package.json scripts
|
|
36
41
|
|
|
37
42
|
**Impact:** Confusing errors if environment misconfigured
|
|
38
43
|
|
|
39
|
-
**What skill must prevent:** Skill must require
|
|
44
|
+
**What skill must prevent:** Skill must require pre-check (package.json `check` script exists)
|
|
40
45
|
|
|
41
46
|
### 4. Unclear Re-verification Loop
|
|
47
|
+
|
|
42
48
|
**Failure:** After fixing errors, no clear "re-run ALL checks" loop.
|
|
43
49
|
|
|
44
50
|
**Examples:**
|
|
51
|
+
|
|
45
52
|
- Scenario 3: Phase 1 verify → Phase 2 verify → Phase 3 verify (but no final "all phases" re-verify)
|
|
46
53
|
- Agents treated it as linear progression, not a loop
|
|
47
54
|
|
|
@@ -50,9 +57,11 @@ Tested 6 scenarios with agents WITHOUT sd-check skill. All agents failed to foll
|
|
|
50
57
|
**What skill must prevent:** Skill must explicitly state "re-run ALL 3 checks until ALL pass"
|
|
51
58
|
|
|
52
59
|
### 5. No sd-debug Recommendation
|
|
60
|
+
|
|
53
61
|
**Failure:** When root cause unclear after multiple attempts, agents didn't recommend sd-debug.
|
|
54
62
|
|
|
55
63
|
**Observed:**
|
|
64
|
+
|
|
56
65
|
- Scenario 4: After 4 failed attempts, agent suggested various debugging approaches but NOT `/sd-debug` skill
|
|
57
66
|
|
|
58
67
|
**Impact:** User wastes time when systematic root-cause investigation needed
|
|
@@ -60,9 +69,11 @@ Tested 6 scenarios with agents WITHOUT sd-check skill. All agents failed to foll
|
|
|
60
69
|
**What skill must prevent:** Skill must state "after 2-3 failed fix attempts → recommend /sd-debug"
|
|
61
70
|
|
|
62
71
|
### 6. Incorrect Default Behavior
|
|
72
|
+
|
|
63
73
|
**Failure:** When no path argument provided, agents asked user for clarification instead of defaulting to full project.
|
|
64
74
|
|
|
65
75
|
**Observed:**
|
|
76
|
+
|
|
66
77
|
- Scenario 5: Agent wanted to ask "which package?" instead of running on entire project
|
|
67
78
|
|
|
68
79
|
**Impact:** Unnecessary user friction
|
|
@@ -70,10 +81,12 @@ Tested 6 scenarios with agents WITHOUT sd-check skill. All agents failed to foll
|
|
|
70
81
|
**What skill must prevent:** Skill must state "if no path argument → run on entire project (omit path in commands)"
|
|
71
82
|
|
|
72
83
|
### 7. Scope Creep (Unnecessary Steps)
|
|
84
|
+
|
|
73
85
|
**Failure:** Agents included steps not relevant to "verification".
|
|
74
86
|
|
|
75
87
|
**Examples:**
|
|
76
|
-
|
|
88
|
+
|
|
89
|
+
- Scenario 1: Included build step (verification doesn't need build)
|
|
77
90
|
- Scenario 2: Included dev server test (not verification)
|
|
78
91
|
|
|
79
92
|
**Impact:** Wasted time, confusion about scope
|
|
@@ -83,33 +96,40 @@ Tested 6 scenarios with agents WITHOUT sd-check skill. All agents failed to foll
|
|
|
83
96
|
## Rationalization Patterns (Verbatim)
|
|
84
97
|
|
|
85
98
|
### "Parallelization while maintaining logical dependencies"
|
|
99
|
+
|
|
86
100
|
- Used to justify partial parallelization
|
|
87
101
|
- Agents ran typecheck & lint in parallel, but tests sequentially
|
|
88
102
|
- **Counter:** ALL 3 checks are independent → all 3 in parallel
|
|
89
103
|
|
|
90
104
|
### "Stratified parallel execution"
|
|
105
|
+
|
|
91
106
|
- Used to justify sequential test runs grouped by environment
|
|
92
107
|
- **Counter:** Vitest projects are independent → run all via single command
|
|
93
108
|
|
|
94
109
|
### "Faster to fail fast on static checks"
|
|
110
|
+
|
|
95
111
|
- Good principle, but used to justify including build step
|
|
96
112
|
- **Counter:** Build is not a static check, and not required for verification
|
|
97
113
|
|
|
98
114
|
### "Type safety first" / "Incremental verification"
|
|
115
|
+
|
|
99
116
|
- Used to justify Phase 1 → Phase 2 → Phase 3 linear progression
|
|
100
117
|
- **Counter:** After fixes, must re-verify ALL phases (loop), not just next phase
|
|
101
118
|
|
|
102
119
|
### "Understanding first, then ONE comprehensive fix"
|
|
120
|
+
|
|
103
121
|
- Used to justify continued debugging without tools
|
|
104
122
|
- **Counter:** After 2-3 attempts, recommend /sd-debug for systematic investigation
|
|
105
123
|
|
|
106
124
|
### "Ask for clarification" / "Explicit and predictable"
|
|
125
|
+
|
|
107
126
|
- Used to justify asking user for path when none provided
|
|
108
127
|
- **Counter:** Default to full project is explicit and predictable behavior
|
|
109
128
|
|
|
110
129
|
## Success Criteria for Skill
|
|
111
130
|
|
|
112
131
|
Skill is effective if agents:
|
|
132
|
+
|
|
113
133
|
1. ✅ Launch 3 haiku agents in parallel (typecheck, lint, test)
|
|
114
134
|
2. ✅ Run environment pre-checks before verification
|
|
115
135
|
3. ✅ Default to full project when no path argument
|
|
@@ -123,6 +143,7 @@ Skill is effective if agents:
|
|
|
123
143
|
After writing skill, re-run scenarios 1-6. Agents should now exhibit correct behavior above.
|
|
124
144
|
|
|
125
145
|
Focus on:
|
|
146
|
+
|
|
126
147
|
- Scenario 1: Verify parallel haiku agents + env checks
|
|
127
148
|
- Scenario 3: Verify re-verification loop + priority
|
|
128
149
|
- Scenario 4: Verify sd-debug recommendation
|