@simplysm/sd-claude 13.0.76 → 13.0.77

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.
Files changed (28) hide show
  1. package/claude/refs/sd-code-conventions.md +11 -3
  2. package/claude/refs/sd-solid.md +11 -2
  3. package/claude/rules/sd-claude-rules.md +6 -10
  4. package/claude/sd-statusline.js +7 -7
  5. package/claude/skills/sd-api-name-review/SKILL.md +103 -17
  6. package/claude/skills/sd-brainstorm/SKILL.md +32 -47
  7. package/claude/skills/sd-check/SKILL.md +14 -16
  8. package/claude/skills/sd-commit/SKILL.md +1 -3
  9. package/claude/skills/sd-debug/SKILL.md +5 -11
  10. package/claude/skills/sd-debug/condition-based-waiting.md +5 -11
  11. package/claude/skills/sd-debug/root-cause-tracing.md +18 -33
  12. package/claude/skills/sd-explore/SKILL.md +86 -44
  13. package/claude/skills/sd-plan/SKILL.md +0 -1
  14. package/claude/skills/sd-plan-dev/SKILL.md +48 -82
  15. package/claude/skills/sd-review/SKILL.md +107 -80
  16. package/claude/skills/sd-review/api-reviewer-prompt.md +23 -43
  17. package/claude/skills/sd-review/code-reviewer-prompt.md +26 -35
  18. package/claude/skills/sd-review/convention-checker-prompt.md +23 -26
  19. package/claude/skills/sd-review/refactoring-analyzer-prompt.md +92 -0
  20. package/claude/skills/sd-skill/SKILL.md +10 -16
  21. package/claude/skills/sd-skill/writing-guide.md +7 -11
  22. package/claude/skills/sd-tdd/SKILL.md +15 -20
  23. package/claude/skills/sd-use/SKILL.md +3 -4
  24. package/claude/skills/sd-worktree/SKILL.md +58 -113
  25. package/package.json +1 -1
  26. package/claude/skills/sd-review/code-simplifier-prompt.md +0 -95
  27. package/claude/skills/sd-review/structure-analyzer-prompt.md +0 -97
  28. package/claude/skills/sd-worktree/sd-worktree.mjs +0 -152
@@ -1,31 +1,26 @@
1
1
  # API Reviewer Prompt
2
2
 
3
- Template for `Agent(general-purpose)`. Fill in `[TARGET_PATH]`.
3
+ Template for `Agent(general-purpose)`. Fill in `[CONVENTIONS]` and `[EXPLORE_FILES]`.
4
4
 
5
5
  ```
6
6
  You are reviewing a library's public API for developer experience (DX).
7
7
  Your question: "Would a first-time developer be confused or make mistakes using this API?"
8
8
 
9
- ## Target
9
+ ## Context
10
10
 
11
- Review ALL source files at [TARGET_PATH].
11
+ 1. Review the following project conventions relevant to API design and naming:
12
12
 
13
- ## Step 1: List all source files
13
+ [CONVENTIONS]
14
14
 
15
- Use Glob to list all .ts/.tsx files under the target path (exclude node_modules, dist).
15
+ 2. Read these explore result files: [EXPLORE_FILES]
16
+ 3. From the explore results' **Tagged Files → API** sections, collect all entries — these are your deep-read targets
16
17
 
17
- ## Step 2: Map the public API surface
18
+ ## Step 1: Deep Review
18
19
 
19
- Read the following reference files for project conventions:
20
- - `CLAUDE.md` project overview and conventions
21
- - `.claude/rules/sd-refs-linker.md` reference guide linking to detailed docs per topic (read relevant refs based on the target code)
22
-
23
- Then:
24
- - Read index.ts to list all exports (types, functions, constants)
25
- - Read each exported type/interface/function definition
26
- - Read test files and consumer code to see actual usage patterns
27
-
28
- ## Step 3: Find issues
20
+ Read each file from the API tagged list. For each:
21
+ 1. Map the public API surface (exports, types, interfaces, function signatures)
22
+ 2. Verify suspected API issues from screening
23
+ 3. Look for additional issues
29
24
 
30
25
  Look for:
31
26
  - Naming consistency: same concept with different names, inconsistent prefix/suffix
@@ -34,38 +29,31 @@ Look for:
34
29
  - Defaults: basic use cases requiring excessive configuration
35
30
  - Pattern consistency: similar tasks requiring different patterns
36
31
 
37
- Important: Internal consistency takes priority over external standards.
38
- Before suggesting a naming change, verify the existing pattern across ALL similar
39
- components in the library. Do NOT suggest external conventions that break internal consistency.
32
+ Internal consistency takes priority over external standards.
40
33
 
41
34
  Do NOT report:
42
35
  - Bugs, security, logic errors, race conditions
43
36
  - Code complexity, duplication, readability
44
- - Do NOT use WebSearch to compare with external libraries
45
- - TypeScript type system limitations that require workarounds (e.g., discriminated unions not narrowing due to template literals) — these are language constraints, not API design flaws
46
- - Naming preferences where the current name is used consistently across the codebase — consistency > personal preference
47
- - Minor field duplication in small interfaces (< 10 fields) where extraction adds indirection without real benefit
48
-
49
- ## Step 4: Self-verify before reporting
37
+ - TypeScript type system limitations (language constraints, not API flaws)
38
+ - Naming preferences where current name is used consistently
39
+ - Minor field duplication in small interfaces (< 10 fields)
50
40
 
51
- Before including ANY finding, verify:
41
+ ## Step 2: Self-verify
52
42
 
53
- 1. **Severity check**: CRITICAL = developers WILL write wrong code because of this API. Not "could theoretically be confusing."
54
- 2. **Consistency check**: Before suggesting a rename, search ALL usages. If the name is used consistently everywhere, it's NOT a finding.
55
- 3. **Scope check**: Only report on the PUBLIC API of the target package. Do not report on how consumers should use it differently.
43
+ 1. CRITICAL = developers WILL write wrong code because of this API
44
+ 2. Before suggesting a rename, search ALL usages consistent usage is NOT a finding
45
+ 3. Only report on PUBLIC API of the target
56
46
 
57
47
  **Quality over quantity: 3 verified findings > 10 maybe-findings.**
58
48
 
59
49
  ## Constraints
60
50
 
61
51
  - Analysis only. Do NOT modify any files.
62
- - Only report issues with real evidence from the code.
63
- - CRITICAL severity requires proof that the current API actively misleads — not just "could be better."
52
+ - Only report issues with real evidence.
53
+ - CRITICAL requires proof the API actively misleads.
64
54
 
65
55
  ## Output Format
66
56
 
67
- Use this exact format for every finding:
68
-
69
57
  ### [CRITICAL|WARNING|INFO] title
70
58
 
71
59
  - **File**: path/to/file.ts:42
@@ -73,23 +61,15 @@ Use this exact format for every finding:
73
61
  - **Issue**: what the problem is
74
62
  - **Suggestion**: how to improve it
75
63
 
76
- Severity:
77
- - CRITICAL: API misleads developers or types are insufficient for correct usage
78
- - WARNING: Significant DX friction — unnecessary complexity or inconsistency
79
- - INFO: Minor improvement — better naming or defaults exist
80
-
81
- Start your report with:
64
+ Start with:
82
65
 
83
66
  ## API Review Results
84
67
 
85
68
  ### Summary
86
- - Files reviewed: N
69
+ - Files deep-reviewed: N (list them)
87
70
  - Public API surface: brief description
88
71
  - Findings: X CRITICAL, Y WARNING, Z INFO
89
72
 
90
73
  ### Findings
91
74
  [findings here]
92
-
93
- ### Positive Observations
94
- [what's already well-designed — keep these]
95
75
  ```
@@ -1,31 +1,25 @@
1
1
  # Code Reviewer Prompt
2
2
 
3
- Template for `Agent(general-purpose)`. Fill in `[TARGET_PATH]`.
3
+ Template for `Agent(general-purpose)`. Fill in `[CONVENTIONS]` and `[EXPLORE_FILES]`.
4
4
 
5
5
  ```
6
6
  You are reviewing code for correctness and safety.
7
7
  Your question: "Does this code produce wrong results or pose risks?"
8
8
 
9
- ## Target
9
+ ## Context
10
10
 
11
- Review ALL source files at [TARGET_PATH].
11
+ 1. Review the following project conventions relevant to correctness/safety:
12
12
 
13
- ## Step 1: List all source files
13
+ [CONVENTIONS]
14
14
 
15
- Use Glob to list all .ts/.tsx files under the target path (exclude node_modules, dist).
16
- This is your review scope every file in this list must be examined.
15
+ 2. Read these explore result files: [EXPLORE_FILES]
16
+ 3. From the explore results' **Tagged Files CORRECTNESS** sections, collect all entries — these are your deep-read targets
17
17
 
18
- ## Step 2: Understand the codebase
18
+ ## Step 1: Deep Review
19
19
 
20
- Read the following reference files for project conventions:
21
- - `CLAUDE.md`project overview and conventions
22
- - `.claude/rules/sd-refs-linker.md` reference guide linking to detailed docs per topic (read relevant refs based on the target code)
23
-
24
- Then:
25
- - Read index.ts to map the module structure
26
- - Read each source file to understand logic flows, data transformations, error paths
27
-
28
- ## Step 3: Find issues
20
+ Read each file from the CORRECTNESS tagged list. For each:
21
+ 1. Verify the suspected issue from screening is it real?
22
+ 2. Look for additional issues the screening might have missed
29
23
 
30
24
  Look for:
31
25
  - Bugs: null/undefined risks, off-by-one, wrong conditions, missing return values
@@ -33,39 +27,36 @@ Look for:
33
27
  - Race conditions: async ordering, shared state without synchronization
34
28
  - Resource leaks: uncleared subscriptions/listeners, unclosed handles
35
29
  - Error handling: swallowed exceptions, wrong fallbacks, missing propagation
36
- - Architectural defects: circular dependencies, boundary violations (reaching into another package's internals), wrong dependency direction (higher-level packages imported by lower-level ones)
30
+ - Architectural defects: circular dependencies, boundary violations
37
31
 
38
32
  Do NOT report:
39
- - Naming consistency, API design, type quality (including `any` types)
40
- - Code complexity, duplication, readability improvements (handled by Code Simplifier)
41
- - Structural improvement suggestions (handled by Structure Analyzer)
33
+ - Naming, API design, pure type quality
34
+ - Code complexity, duplication, readability
42
35
  - Style preferences unless they cause actual bugs
43
- - Type definitions alone a type allowing `stack?: string` is NOT a security issue unless the runtime code actually sends it unsanitized
44
- - Speculative future risks — "if config were changed to X, this would break" is not a finding
45
- - Issues in code OUTSIDE the target path (e.g., how other packages consume these types)
36
+ - Type definitions alone without runtime trigger
37
+ - Speculative future risks
38
+ - Issues outside the reviewed files
46
39
 
47
- ## Step 4: Self-verify before reporting
40
+ **`any` type boundary**: Do NOT report `any` as a type quality issue. But DO report `any` if it enables a runtime crash (e.g., `(obj as any).method()` where `method` may not exist).
48
41
 
49
- Before including ANY finding, ask yourself:
42
+ ## Step 2: Self-verify
50
43
 
51
- 1. **Is there runtime code here that actually triggers this?** (Not just a type definition)
52
- 2. **Does the evidence contradict my conclusion?** (If you find a bound/limit that prevents the issue, drop it)
53
- 3. **Is this within the target scope?** (Not about how other packages use this code)
44
+ Before including ANY finding:
45
+ 1. Is there runtime code that actually triggers this?
46
+ 2. Does the evidence contradict my conclusion?
47
+ 3. Is this within scope?
54
48
 
55
- If you write "in practice this is unlikely because..." or "exploitability is limited because..." that means it's NOT a real finding. Drop it.
49
+ If you write "in practice this is unlikely because..." — drop it.
56
50
 
57
51
  **Quality over quantity: 3 verified findings > 10 maybe-findings.**
58
52
 
59
53
  ## Constraints
60
54
 
61
55
  - Analysis only. Do NOT modify any files.
62
- - Only report issues where the runtime behavior is demonstrably wrong or risky.
63
- - If your own analysis shows the issue is mitigated, do NOT report it.
56
+ - Only report issues where runtime behavior is demonstrably wrong or risky.
64
57
 
65
58
  ## Output Format
66
59
 
67
- Use this exact format for every finding:
68
-
69
60
  ### [CRITICAL|WARNING|INFO] title
70
61
 
71
62
  - **File**: path/to/file.ts:42
@@ -78,12 +69,12 @@ Severity:
78
69
  - WARNING: Real problem that can occur in practice
79
70
  - INFO: Defensive improvement, low risk
80
71
 
81
- Start your report with:
72
+ Start with:
82
73
 
83
74
  ## Code Review Results
84
75
 
85
76
  ### Summary
86
- - Files reviewed: N
77
+ - Files deep-reviewed: N (list them)
87
78
  - Findings: X CRITICAL, Y WARNING, Z INFO
88
79
 
89
80
  ### Findings
@@ -1,62 +1,59 @@
1
1
  # Convention Checker Prompt
2
2
 
3
- Template for `Agent(general-purpose)`. Fill in `[TARGET_PATH]`.
3
+ Template for `Agent(general-purpose)`. Fill in `[CONVENTIONS]` and `[EXPLORE_FILES]`.
4
4
 
5
5
  ```
6
6
  You are checking code against project conventions.
7
7
  Your question: "Does this code violate any project-defined rules?"
8
8
 
9
- ## Target
9
+ ## Context
10
10
 
11
- Check ALL source files at [TARGET_PATH].
11
+ 1. Review the following project conventions (these are your Grep criteria):
12
12
 
13
- ## Step 1: Read convention files
13
+ [CONVENTIONS]
14
14
 
15
- Read `.claude/rules/sd-refs-linker.md` to find ALL convention files that apply to the target code. Then read each referenced convention file.
15
+ 2. Read these explore result files: [EXPLORE_FILES]
16
+ 3. Collect ALL file paths from the **File Summaries** sections — these are your Grep scope
16
17
 
17
- At minimum, always read:
18
- - `.claude/refs/sd-code-conventions.md` — applies to all code
18
+ ## Step 1: Extract Grep-searchable patterns
19
19
 
20
- Also read topic-specific refs based on the target code (e.g., `sd-solid.md` for SolidJS, `sd-orm.md` for ORM).
20
+ From the conventions, extract rules that can be checked via text pattern matching.
21
21
 
22
- ## Step 2: Extract prohibited patterns
23
-
24
- From each convention file, extract rules that define prohibited or required patterns. Build a checklist of Grep-searchable patterns.
25
-
26
- Example from `sd-code-conventions.md`:
22
+ Examples of Grep-searchable rules:
27
23
  - `as unknown as` — prohibited
28
24
  - `as any` — prohibited in public-facing types
29
25
  - `export * from` or `export { } from` outside `src/index.ts` — prohibited
30
26
 
31
- ## Step 3: Grep for each pattern
27
+ **Skip rules that require semantic understanding** (e.g., "Boolean props should default to false", "file names must be self-identifying"). Only check patterns that can be matched syntactically.
32
28
 
33
- For each prohibited pattern, run a Grep search across all target files. Report every match.
29
+ ## Step 2: Grep for each pattern
34
30
 
35
- Do NOT skip, downgrade, or dismiss matches for any reason:
36
- - "Widespread usage" is NOT an exception — it means widespread violation
37
- - "No alternative" is NOT an exception — the convention file lists alternatives
38
- - "Codebase pattern" is NOT an exception — the convention defines what's correct, not current usage
31
+ For each prohibited pattern, run Grep across all files in scope.
39
32
 
40
- ## Step 4: Report
33
+ For patterns with justified exceptions (e.g., `as X` casts where no alternative exists), **read the surrounding code** to determine if the usage is justified per the convention's own exception clause. Report only unjustified matches.
34
+
35
+ Do NOT skip or dismiss matches for these reasons:
36
+ - "Widespread usage" is NOT an exception — it means widespread violation
37
+ - "Codebase pattern" is NOT an exception — conventions define what's correct
41
38
 
42
- Use this exact format for every finding:
39
+ ## Step 3: Report
43
40
 
44
41
  ### [WARNING] title
45
42
 
46
43
  - **File**: path/to/file.ts:42
47
- - **Convention**: which rule from which convention file
44
+ - **Convention**: which rule from which convention
48
45
  - **Evidence**: the matching code (include snippet)
49
- - **Suggestion**: the fix recommended by the convention file
46
+ - **Suggestion**: the fix recommended by the convention
50
47
 
51
- All convention violations are WARNING severity. Use CRITICAL only if the violation causes an immediate runtime bug.
48
+ All violations are WARNING. Use CRITICAL only if the violation causes an immediate runtime bug.
52
49
 
53
- Start your report with:
50
+ Start with:
54
51
 
55
52
  ## Convention Check Results
56
53
 
57
54
  ### Summary
58
55
  - Files checked: N
59
- - Convention files referenced: [list]
56
+ - Conventions referenced: [list]
60
57
  - Violations found: N
61
58
 
62
59
  ### Violations
@@ -0,0 +1,92 @@
1
+ # Refactoring Analyzer Prompt
2
+
3
+ Template for `Agent(general-purpose)`. Fill in `[CONVENTIONS]` and `[EXPLORE_FILES]`.
4
+
5
+ ```
6
+ You are analyzing code for structural improvement and simplification.
7
+ Your question: "Can this code be simpler or better organized without changing its behavior?"
8
+
9
+ ## Context
10
+
11
+ 1. Review the following project conventions relevant to code structure:
12
+
13
+ [CONVENTIONS]
14
+
15
+ 2. Read these explore result files: [EXPLORE_FILES]
16
+ 3. From the explore results' **Tagged Files → REFACTOR** sections, collect all entries — these are your deep-read targets
17
+
18
+ ## Step 1: Deep Review
19
+
20
+ Read each file from the REFACTOR tagged list. For each:
21
+ 1. Verify suspected structural issues from screening
22
+ 2. Look for additional opportunities
23
+
24
+ Look for:
25
+
26
+ **Simplification:**
27
+ - Unnecessary complexity: over-abstraction, needless indirection, complex generics
28
+ - Duplication: same logic repeated across files, similar functions that could be unified
29
+ - Readability: hard-to-follow control flow, unclear variable names, implicit behavior
30
+
31
+ **Structure:**
32
+ - Responsibility mixing: single module handling concerns that should be separate
33
+ - Abstraction level mismatch: high-level orchestration mixed with low-level details
34
+ - Module organization: related functionality scattered, or unrelated functionality grouped
35
+ - Leaking abstractions: internal details exposed through public API
36
+ - Coupling hotspots: changes that would cascade widely
37
+
38
+ ## CRITICAL — Scope boundaries
39
+
40
+ Do NOT report:
41
+ - Bugs, security, logic errors, race conditions → code review
42
+ - Naming consistency, API design, type quality → API review
43
+ - Convention violations → convention checker
44
+ - Documentation gaps, style preferences, import ordering
45
+ - Performance optimization (unless also a structural improvement)
46
+ - Magic numbers with clear adjacent comments
47
+ - Small interface duplication (< 10 fields) where extraction adds indirection
48
+ - Issues outside the reviewed files
49
+
50
+ **Test each finding:** "Is this about CODE STRUCTURE, or about something else?"
51
+
52
+ ## Step 2: Self-verify
53
+
54
+ 1. **Structure test**: genuinely structural? not a bug, convention, or doc issue?
55
+ 2. **Impact test**: would a developer actually struggle with this?
56
+ 3. **Intentional pattern**: used consistently across the codebase? → by-design, drop.
57
+ 4. **Separation benefit**: < ~150 lines AND tightly coupled? → splitting adds overhead, drop.
58
+ 5. **Duplication reality**: < 30 lines duplicated, or meaningful behavioral differences? → drop.
59
+
60
+ **Quality over quantity: 3 verified structural findings > 10 mixed findings.**
61
+
62
+ ## Constraints
63
+
64
+ - Analysis only. Do NOT modify any files.
65
+ - Do NOT provide corrected code blocks. Describe issues in words only.
66
+ - Only report structural issues with real evidence.
67
+
68
+ ## Output Format
69
+
70
+ ### [HIGH|MEDIUM|LOW] title
71
+
72
+ - **File**: path/to/file.ts:42
73
+ - **Evidence**: what you observed (include code snippet)
74
+ - **Issue**: what the structural problem is
75
+ - **Suggestion**: how to improve it (in words, not code)
76
+
77
+ Impact levels:
78
+ - HIGH: Major structural problem. Significantly harder to understand or modify safely.
79
+ - MEDIUM: Notable concern. Unnecessary complexity or meaningful duplication.
80
+ - LOW: Improvement opportunity. Cleaner structure exists but current is workable.
81
+
82
+ Start with:
83
+
84
+ ## Refactoring Analysis Results
85
+
86
+ ### Summary
87
+ - Files deep-reviewed: N (list them)
88
+ - Findings: X HIGH, Y MEDIUM, Z LOW
89
+
90
+ ### Findings
91
+ [findings here]
92
+ ```
@@ -184,19 +184,13 @@ Edit skill without testing? Same violation.
184
184
 
185
185
  Different skill types need different test approaches:
186
186
 
187
- ```dot
188
- digraph test_methodology {
189
- "What type of skill?" [shape=diamond];
190
- "Pressure test\n(compliance under stress)" [shape=box];
191
- "Application test\n(correct technique usage)" [shape=box];
192
- "Recognition test\n(when/how to apply)" [shape=box];
193
- "Retrieval test\n(find & use reference)" [shape=box];
194
-
195
- "What type of skill?" -> "Pressure test\n(compliance under stress)" [label="Discipline\n(rules/requirements)"];
196
- "What type of skill?" -> "Application test\n(correct technique usage)" [label="Technique\n(how-to guides)"];
197
- "What type of skill?" -> "Recognition test\n(when/how to apply)" [label="Pattern\n(mental models)"];
198
- "What type of skill?" -> "Retrieval test\n(find & use reference)" [label="Reference\n(docs/APIs)"];
199
- }
187
+ ```mermaid
188
+ flowchart TD
189
+ A{"What type of skill?"}
190
+ A -->|"Discipline (rules/requirements)"| B["Pressure test<br>(compliance under stress)"]
191
+ A -->|"Technique (how-to guides)"| C["Application test<br>(correct technique usage)"]
192
+ A -->|"Pattern (mental models)"| D["Recognition test<br>(when/how to apply)"]
193
+ A -->|"Reference (docs/APIs)"| E["Retrieval test<br>(find & use reference)"]
200
194
  ```
201
195
 
202
196
  ### Discipline-Enforcing Skills (rules/requirements)
@@ -330,9 +324,9 @@ example-js.js, example-py.py, example-go.go
330
324
 
331
325
  ### ❌ Code in Flowcharts
332
326
 
333
- ```dot
334
- step1 [label="import fs"];
335
- step2 [label="read file"];
327
+ ```mermaid
328
+ flowchart TD
329
+ A["import fs"] --> B["read file"]
336
330
  ```
337
331
 
338
332
  **Why bad:** Can't copy-paste, hard to read
@@ -4,17 +4,13 @@
4
4
 
5
5
  ## Flowchart Usage
6
6
 
7
- ```dot
8
- digraph when_flowchart {
9
- "Need to show information?" [shape=diamond];
10
- "Decision where I might go wrong?" [shape=diamond];
11
- "Use markdown" [shape=box];
12
- "Small inline flowchart" [shape=box];
13
-
14
- "Need to show information?" -> "Decision where I might go wrong?" [label="yes"];
15
- "Decision where I might go wrong?" -> "Small inline flowchart" [label="yes"];
16
- "Decision where I might go wrong?" -> "Use markdown" [label="no"];
17
- }
7
+ Use Mermaid (`flowchart`) when there are decision branches or non-obvious process flows.
8
+
9
+ ```mermaid
10
+ flowchart TD
11
+ A{"Need to show information?"} -->|yes| B{"Decision where I might go wrong?"}
12
+ B -->|yes| C[Small inline flowchart]
13
+ B -->|no| D[Use markdown]
18
14
  ```
19
15
 
20
16
  **Use flowcharts ONLY for:**
@@ -50,26 +50,21 @@ Implement fresh from tests. Period.
50
50
 
51
51
  ## Red-Green-Refactor
52
52
 
53
- ```dot
54
- digraph tdd_cycle {
55
- rankdir=LR;
56
- red [label="RED\nWrite failing test", shape=box, style=filled, fillcolor="#ffcccc"];
57
- verify_red [label="Verify fails\ncorrectly", shape=diamond];
58
- green [label="GREEN\nMinimal code", shape=box, style=filled, fillcolor="#ccffcc"];
59
- verify_green [label="Verify passes\nAll green", shape=diamond];
60
- refactor [label="REFACTOR\nClean up", shape=box, style=filled, fillcolor="#ccccff"];
61
- next [label="Next", shape=ellipse];
62
-
63
- red -> verify_red;
64
- verify_red -> green [label="yes"];
65
- verify_red -> red [label="wrong\nfailure"];
66
- green -> verify_green;
67
- verify_green -> refactor [label="yes"];
68
- verify_green -> green [label="no"];
69
- refactor -> verify_green [label="stay\ngreen"];
70
- verify_green -> next;
71
- next -> red;
72
- }
53
+ ```mermaid
54
+ flowchart LR
55
+ A["RED<br>Write failing test"]:::red --> B{"Verify fails<br>correctly"}
56
+ B -->|yes| C["GREEN<br>Minimal code"]:::green
57
+ B -->|"wrong failure"| A
58
+ C --> D{"Verify passes<br>All green"}
59
+ D -->|yes| E["REFACTOR<br>Clean up"]:::blue
60
+ D -->|no| C
61
+ E -->|"stay green"| D
62
+ D --> F(["Next"])
63
+ F --> A
64
+
65
+ classDef red fill:#ffcccc
66
+ classDef green fill:#ccffcc
67
+ classDef blue fill:#ccccff
73
68
  ```
74
69
 
75
70
  ### RED - Write Failing Test
@@ -11,7 +11,7 @@ Analyze user request from ARGUMENTS, select the best matching skill, explain why
11
11
  ## Execution Flow
12
12
 
13
13
  1. Read ARGUMENTS
14
- 2. If user names a specific skill (e.g., "sd-explore로..."), route to that skill directly
14
+ 2. If user names a specific skill, route to that skill directly
15
15
  3. Otherwise, match against catalog below
16
16
  4. Report selection with reason
17
17
  5. Execute immediately
@@ -35,14 +35,13 @@ Analyze user request from ARGUMENTS, select the best matching skill, explain why
35
35
  | `sd-skill` | Create or edit skills |
36
36
  | `sd-email-analyze` | Analyze, read, or summarize email files (`.eml` or `.msg`) — parsing and attachment extraction |
37
37
  | `sd-document` | Read or write document files (`.docx`, `.xlsx`, `.pptx`, `.pdf`) — content extraction, creation, data export |
38
- | `sd-explore` | Explore, analyze, trace, or understand code structure, architecture, or implementation flow |
39
38
 
40
39
  ## Selection Rules
41
40
 
42
- 1. **Explicit skill name** — If user mentions a specific skill name (e.g., "sd-explore로...", "sd-plan 만들어줘"), route to that skill directly
41
+ 1. **Explicit skill name** — If user mentions a specific skill name, route to that skill directly
43
42
  2. Select **exactly one** skill — the most specific match wins
44
43
  3. **Review & Refactor**: "find bugs", "review", "refactor", "improve structure", "remove duplication" → `sd-review`
45
- 4. **Sequential requests** (e.g., "brainstorm하고 plan 만들어줘"): Route to the **first** skill only. After completion, user can invoke the next
44
+ 4. **Sequential requests**: Route to the **first** skill only. After completion, user can invoke the next
46
45
  5. If nothing matches, use **default LLM behavior** and handle the request directly
47
46
  6. Pass ARGUMENTS through as the skill's input
48
47