@simplysm/sd-claude 13.0.62 → 13.0.65
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 +40 -0
- package/claude/skills/sd-brainstorm/SKILL.md +89 -7
- package/claude/skills/sd-commit/SKILL.md +3 -23
- package/claude/skills/sd-plan/SKILL.md +44 -85
- package/claude/skills/sd-use/SKILL.md +5 -4
- package/claude/skills/sd-worktree/sd-worktree.mjs +15 -2
- package/package.json +1 -1
- package/claude/rules/sd-language.md +0 -6
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Claude Code Rules
|
|
2
|
+
|
|
3
|
+
## Language
|
|
4
|
+
|
|
5
|
+
Respond in the **system's configured language** (set via Claude Code's language setting).
|
|
6
|
+
|
|
7
|
+
- Technical terms, code identifiers (variable names, function names, etc.), and library names should remain as-is
|
|
8
|
+
- Show English error messages and logs in their original form, but provide explanations in the system language
|
|
9
|
+
|
|
10
|
+
## Missing References
|
|
11
|
+
|
|
12
|
+
If a referenced file or document cannot be found, **stop immediately and ask the user for the correct path.**
|
|
13
|
+
|
|
14
|
+
- Do NOT skip or proceed on your own judgment.
|
|
15
|
+
- Responses like "I couldn't find the file, so I'll skip it" are strictly prohibited.
|
|
16
|
+
- Always confirm with the user before proceeding.
|
|
17
|
+
|
|
18
|
+
## Scope of Work
|
|
19
|
+
|
|
20
|
+
**Do only what is explicitly asked.** Never perform work that was not requested.
|
|
21
|
+
|
|
22
|
+
### Questions vs. Code Requests — CRITICAL
|
|
23
|
+
|
|
24
|
+
- **If the user asks a question** (e.g., "이건 왜 이래?", "이거 뭐야?", "어떻게 동작해?") → **answer with text only**. Do NOT edit, write, or create any files.
|
|
25
|
+
- **If the user discusses, explains, or shares opinions** → **respond with text only**. Do NOT touch any files.
|
|
26
|
+
- **Only edit/write/create files when the user explicitly requests code changes** (e.g., "수정해줘", "만들어줘", "변경해줘", "추가해줘", "고쳐줘").
|
|
27
|
+
- Reading files to answer a question is fine. **Modifying files to answer a question is prohibited.**
|
|
28
|
+
|
|
29
|
+
### General Rules
|
|
30
|
+
|
|
31
|
+
- When the user says "ask", "request", or "confirm" → **ask the user**. Do NOT decide or create it yourself.
|
|
32
|
+
- Do NOT add features, refactoring, improvements, or documentation beyond the requested scope.
|
|
33
|
+
- When in doubt, **ask first** before proceeding.
|
|
34
|
+
- Responses like "I'll create it myself" or "I'll add that as well" are strictly prohibited.
|
|
35
|
+
|
|
36
|
+
## Bug Workarounds
|
|
37
|
+
|
|
38
|
+
### AskUserQuestion UI Clipping
|
|
39
|
+
|
|
40
|
+
Before calling `AskUserQuestion`, output **2 blank lines** (`\n\n`) so the preceding text is not clipped in the UI.
|
|
@@ -15,21 +15,62 @@ 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
|
-
|
|
19
18
|
- Check out the current project state first (files, docs, recent commits)
|
|
20
19
|
- Ask questions one at a time to refine the idea
|
|
21
20
|
- Prefer multiple choice questions when possible, but open-ended is fine too
|
|
22
21
|
- Only one question per message - if a topic needs more exploration, break it into multiple questions
|
|
23
22
|
- Focus on understanding: purpose, constraints, success criteria
|
|
24
23
|
|
|
25
|
-
**
|
|
24
|
+
**Gap review loop:**
|
|
25
|
+
|
|
26
|
+
When you think you've asked enough, **STOP and run a gap review before moving on.**
|
|
27
|
+
|
|
28
|
+
Tell the user you're running a gap review, then check ALL categories. For each ✅, you MUST **cite specific evidence** (which Q&A, code reference, or explicit user requirement). "I already know" is not evidence.
|
|
29
|
+
|
|
30
|
+
| Category | Check for... |
|
|
31
|
+
|----------|-------------|
|
|
32
|
+
| Scope | What's in? What's explicitly out? |
|
|
33
|
+
| User flows | All inputs, outputs, feedback, navigation |
|
|
34
|
+
| Edge cases | Empty states, errors, limits, concurrency, undo |
|
|
35
|
+
| Data | Shape, validation, persistence, migration, relationships |
|
|
36
|
+
| Integration | How does this connect to existing code/systems? |
|
|
37
|
+
| Non-functional | Performance, accessibility, security, i18n |
|
|
38
|
+
| Assumptions | Anything you assumed but never confirmed |
|
|
39
|
+
|
|
40
|
+
Output format — cite evidence for each:
|
|
41
|
+
- `✅ Scope — [Q2: user confirmed X / code at file:line / requirement doc says Y]`
|
|
42
|
+
- `❓ Edge cases — gap: [what's missing]`
|
|
26
43
|
|
|
44
|
+
If evidence is vague ("obvious", "I already know", "common sense") → mark as ❓, not ✅.
|
|
45
|
+
|
|
46
|
+
- If ANY ❓ exists → ask about it. After the user answers, **run the full checklist again from scratch**.
|
|
47
|
+
- Only when ALL categories show ✅ with cited evidence → proceed to exploring approaches.
|
|
48
|
+
|
|
49
|
+
**All-✅ on first run is PROHIBITED — not "suspicious", prohibited.**
|
|
50
|
+
If your first gap review shows all ✅:
|
|
51
|
+
1. You are rubber-stamping. Prior investigation ≠ complete design exploration.
|
|
52
|
+
2. Pick the 2 weakest categories (thinnest evidence).
|
|
53
|
+
3. Write one concrete unasked question per category.
|
|
54
|
+
4. Ask those questions, then re-run the full checklist from scratch.
|
|
55
|
+
|
|
56
|
+
| Excuse | Reality |
|
|
57
|
+
|--------|---------|
|
|
58
|
+
| "Requirements are already clear" | Clear requirements ≠ complete design. Edge cases, error states, integration points still need exploration. |
|
|
59
|
+
| "I already investigated the code" | Code investigation reveals what IS. Design exploration asks what SHOULD BE. Different activities. |
|
|
60
|
+
| "It's just a bug fix" | Bug fixes have edge cases: error states, concurrent access, timing changes, consumer compatibility. |
|
|
61
|
+
| "User is frustrated/in a hurry" | Rushing causes exactly the mistakes brainstorming prevents. Slow down. |
|
|
62
|
+
|
|
63
|
+
**Rules:**
|
|
64
|
+
- You MUST show the checklist to the user every time you run it. No silent/internal-only checks.
|
|
65
|
+
- Each run must re-examine ALL categories from zero — do not carry over previous results.
|
|
66
|
+
- When in doubt, ask. One extra question costs less than a flawed design.
|
|
67
|
+
|
|
68
|
+
**Exploring approaches:**
|
|
27
69
|
- Propose 2-3 different approaches with trade-offs
|
|
28
70
|
- Present options conversationally with your recommendation and reasoning
|
|
29
71
|
- Lead with your recommended option and explain why
|
|
30
72
|
|
|
31
73
|
**Presenting the design:**
|
|
32
|
-
|
|
33
74
|
- Once you believe you understand what you're building, present the design
|
|
34
75
|
- Break it into sections of 200-300 words
|
|
35
76
|
- Ask after each section whether it looks right so far
|
|
@@ -39,15 +80,56 @@ Start by understanding the current project context, then ask questions one at a
|
|
|
39
80
|
## After the Design
|
|
40
81
|
|
|
41
82
|
**Documentation:**
|
|
42
|
-
|
|
43
83
|
- Write the validated design to `docs/plans/YYYY-MM-DD-<topic>-design.md`
|
|
44
84
|
- Commit the design document to git
|
|
45
85
|
|
|
46
|
-
**
|
|
86
|
+
**Next Steps Guide:**
|
|
87
|
+
|
|
88
|
+
Present the following two workflow paths so the user can see the full process and choose.
|
|
89
|
+
Display the guide in the **user's configured language** (follow the language settings from CLAUDE.md or system instructions).
|
|
90
|
+
|
|
91
|
+
Before presenting, check git status for uncommitted changes. If there are any uncommitted changes (staged, unstaged, or untracked files), append the warning line (shown below) at the end of the guide block.
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
Design complete! Here's how to proceed:
|
|
95
|
+
|
|
96
|
+
--- Path A: With branch isolation (recommended for features/large changes) ---
|
|
97
|
+
|
|
98
|
+
1. /sd-worktree add <name> — Create a worktree branch
|
|
99
|
+
2. /sd-plan — Break into detailed tasks
|
|
100
|
+
3. /sd-plan-dev — Execute tasks in parallel (includes TDD + review)
|
|
101
|
+
4. /sd-check — Verify (modified + dependents)
|
|
102
|
+
5. /sd-commit — Commit
|
|
103
|
+
6. /sd-worktree merge — Merge back to main
|
|
104
|
+
7. /sd-worktree clean — Remove worktree
|
|
105
|
+
|
|
106
|
+
--- Path B: Direct on current branch (quick fixes/small changes) ---
|
|
107
|
+
|
|
108
|
+
1. /sd-plan — Break into detailed tasks
|
|
109
|
+
2. /sd-plan-dev — Execute tasks in parallel (includes TDD + review)
|
|
110
|
+
3. /sd-check — Verify (modified + dependents)
|
|
111
|
+
4. /sd-commit — Commit
|
|
112
|
+
|
|
113
|
+
You can start from any step or skip steps as needed.
|
|
114
|
+
|
|
115
|
+
💡 "Path A: yolo" or "Path B: yolo" to auto-run all steps
|
|
116
|
+
|
|
117
|
+
⚠️ You have uncommitted changes. To use Path A, run `/sd-commit all` first.
|
|
118
|
+
```
|
|
47
119
|
|
|
48
|
-
|
|
120
|
+
- The last `⚠️` line is only shown when uncommitted changes exist. Omit it when working tree is clean.
|
|
49
121
|
|
|
50
|
-
|
|
122
|
+
- After presenting both paths, **recommend one** based on the design's scope:
|
|
123
|
+
- Path A recommended: new features, multi-file changes, architectural changes, anything that benefits from isolation
|
|
124
|
+
- Path B recommended: small bug fixes, single-file changes, config tweaks, minor adjustments
|
|
125
|
+
- Briefly explain why (1 sentence)
|
|
126
|
+
- Do NOT auto-proceed to any step. Present the overview with recommendation and wait for the user's choice.
|
|
127
|
+
- **Yolo mode**: If the user responds with "Path A: yolo" or "Path B: yolo" (or similar intent like "A yolo", "B 자동"), execute all steps of the chosen path sequentially without stopping between steps.
|
|
128
|
+
- **Yolo sd-check — include dependents**: NEVER check only modified packages. Also check all packages that depend on them:
|
|
129
|
+
1. Identify modified packages from `git diff --name-only`
|
|
130
|
+
2. Trace reverse dependencies (packages that import from modified packages) using `package.json` or project dependency graph
|
|
131
|
+
3. Include integration/e2e tests that cover the modified packages
|
|
132
|
+
4. Run `/sd-check` with all affected paths, or `/sd-check` without path (whole project) when changes are widespread
|
|
51
133
|
|
|
52
134
|
## Key Principles
|
|
53
135
|
|
|
@@ -10,12 +10,12 @@ model: haiku
|
|
|
10
10
|
|
|
11
11
|
## Overview
|
|
12
12
|
|
|
13
|
-
Stages and commits changes using Conventional Commits format. Two modes: **default** (context-relevant files, single commit) and **all** (all changed files,
|
|
13
|
+
Stages and commits changes using Conventional Commits format. Two modes: **default** (context-relevant files, single commit) and **all** (all changed files, single commit).
|
|
14
14
|
|
|
15
15
|
## Mode
|
|
16
16
|
|
|
17
17
|
- **Default mode** (no arguments): Stage files relevant to the current conversation context. Always a **single commit**.
|
|
18
|
-
- **"all" mode** (`$ARGUMENTS` is "all"): Target **all** changed/untracked files.
|
|
18
|
+
- **"all" mode** (`$ARGUMENTS` is "all"): Target **all** changed/untracked files. Always a **single commit**.
|
|
19
19
|
|
|
20
20
|
## File Selection Rules
|
|
21
21
|
|
|
@@ -60,30 +60,10 @@ Examples:
|
|
|
60
60
|
|
|
61
61
|
Use a HEREDOC for multi-line messages when needed.
|
|
62
62
|
|
|
63
|
-
## Commit Strategy (all mode only)
|
|
64
|
-
|
|
65
|
-
Group by **intent/purpose**, not by package.
|
|
66
|
-
|
|
67
|
-
**Single commit** — all changes share the same intent:
|
|
68
|
-
|
|
69
|
-
- Version bumps across packages → `chore: bump version to x.y.z`
|
|
70
|
-
- One feature spanning multiple packages → single `feat`
|
|
71
|
-
- Dependency updates across packages → single `chore`
|
|
72
|
-
|
|
73
|
-
**Split commits** — changes have different intents:
|
|
74
|
-
|
|
75
|
-
- Version bump + unrelated bug fix → `chore` + `fix`
|
|
76
|
-
- New feature + unrelated refactor → two commits
|
|
77
|
-
- `docs` changes + independent `feat` changes → two commits
|
|
78
|
-
|
|
79
63
|
## Execution
|
|
80
64
|
|
|
81
65
|
**Default mode:** `git add <context-relevant files>` → `git commit`
|
|
82
66
|
|
|
83
|
-
**All mode:**
|
|
84
|
-
|
|
85
|
-
1. Decide: single or split.
|
|
86
|
-
2. Single: `git add .` → `git commit`.
|
|
87
|
-
3. Split: group by logical unit, commit in dependency order (foundations first). Per group: `git add <files>` → `git commit`.
|
|
67
|
+
**All mode:** `git add .` → `git commit` with a single message summarizing all changes (message may be long).
|
|
88
68
|
|
|
89
69
|
Call multiple tools in one response when possible. Do not use other tools or output other text.
|
|
@@ -1,156 +1,115 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sd-plan
|
|
3
|
-
description:
|
|
3
|
+
description: "NEVER invoke directly from user requests. This skill is ONLY called as a follow-up step after sd-brainstorm has completed. If the user asks to plan, design, or implement something, use sd-brainstorm first."
|
|
4
4
|
model: opus
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Writing Plans
|
|
8
8
|
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
Turn a design doc into a step-by-step implementation plan through codebase exploration. Write bite-sized tasks assuming the implementing engineer has zero context — exact file paths, complete code, precise commands.
|
|
9
|
+
## Prerequisite Check
|
|
12
10
|
|
|
13
|
-
**
|
|
11
|
+
**MANDATORY:** Before proceeding, verify that `sd-brainstorm` has already been completed in this conversation.
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
- If a brainstorm design document exists (discussed or saved in this session) → proceed.
|
|
14
|
+
- If NOT → **STOP** and tell the user (in the system's configured language) that sd-plan requires sd-brainstorm to be completed first, then invoke sd-brainstorm instead.
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- Read the design doc, then explore relevant files, patterns, dependencies
|
|
20
|
-
- Ask questions one at a time as they arise during planning, with your recommendation
|
|
21
|
-
- Don't batch questions upfront — real questions emerge while deep in the details
|
|
16
|
+
## Overview
|
|
22
17
|
|
|
23
|
-
|
|
18
|
+
Write comprehensive implementation plans assuming the engineer has zero context for our codebase and questionable taste. Document everything they need to know: which files to touch for each task, code, testing, docs they might need to check, how to test it. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
|
|
24
19
|
|
|
25
|
-
|
|
26
|
-
- Conflicts with existing codebase patterns
|
|
27
|
-
- Implementation choices the design didn't specify
|
|
28
|
-
- Ambiguous behavior or edge cases
|
|
29
|
-
- Migration concerns (breaking changes, compatibility)
|
|
30
|
-
- If in doubt, ask. The cost of asking is low; the cost of a wrong assumption is high.
|
|
20
|
+
Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well.
|
|
31
21
|
|
|
32
|
-
**
|
|
22
|
+
**Announce at start:** "I'm using the sd-plan skill to create the implementation plan."
|
|
33
23
|
|
|
34
|
-
|
|
35
|
-
- YAGNI decisions (not mentioned = don't add)
|
|
36
|
-
- Implementation details with only one reasonable option
|
|
24
|
+
**Save plans to:** `docs/plans/YYYY-MM-DD-<feature-name>.md`
|
|
37
25
|
|
|
38
|
-
|
|
26
|
+
## Bite-Sized Task Granularity
|
|
39
27
|
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
28
|
+
**Each step is one action (2-5 minutes):**
|
|
29
|
+
- "Write the failing test" - step
|
|
30
|
+
- "Run it to make sure it fails" - step
|
|
31
|
+
- "Implement the minimal code to make the test pass" - step
|
|
32
|
+
- "Run the tests and make sure they pass" - step
|
|
33
|
+
- "Commit" - step
|
|
43
34
|
|
|
44
|
-
## Plan Document
|
|
35
|
+
## Plan Document Header
|
|
45
36
|
|
|
46
|
-
**
|
|
37
|
+
**Every plan MUST start with this header:**
|
|
47
38
|
|
|
48
39
|
```markdown
|
|
49
40
|
# [Feature Name] Implementation Plan
|
|
50
41
|
|
|
51
42
|
> **For Claude:** REQUIRED SUB-SKILL: Use sd-plan-dev to implement this plan task-by-task.
|
|
52
43
|
|
|
53
|
-
**Goal:** [One sentence]
|
|
44
|
+
**Goal:** [One sentence describing what this builds]
|
|
54
45
|
|
|
55
|
-
**Architecture:** [2-3 sentences]
|
|
46
|
+
**Architecture:** [2-3 sentences about approach]
|
|
56
47
|
|
|
57
48
|
**Tech Stack:** [Key technologies/libraries]
|
|
58
49
|
|
|
59
50
|
---
|
|
60
51
|
```
|
|
61
52
|
|
|
62
|
-
|
|
53
|
+
## Task Structure
|
|
63
54
|
|
|
64
|
-
|
|
55
|
+
```markdown
|
|
65
56
|
### Task N: [Component Name]
|
|
66
57
|
|
|
67
58
|
**Files:**
|
|
68
|
-
|
|
69
59
|
- Create: `exact/path/to/file.ts`
|
|
70
60
|
- Modify: `exact/path/to/existing.ts:123-145`
|
|
71
|
-
- Test: `exact/path/to/
|
|
61
|
+
- Test: `exact/path/to/tests/file.spec.ts`
|
|
72
62
|
|
|
73
63
|
**Step 1: Write the failing test**
|
|
74
64
|
|
|
75
65
|
```typescript
|
|
76
66
|
test("specific behavior", () => {
|
|
77
|
-
const result =
|
|
67
|
+
const result = functionUnderTest(input);
|
|
78
68
|
expect(result).toBe(expected);
|
|
79
69
|
});
|
|
80
70
|
```
|
|
81
71
|
|
|
82
72
|
**Step 2: Run test to verify it fails**
|
|
83
73
|
|
|
84
|
-
Run: `
|
|
85
|
-
Expected: FAIL with "
|
|
74
|
+
Run: `pnpm vitest exact/path/to/tests/file.spec.ts --run`
|
|
75
|
+
Expected: FAIL with "functionUnderTest is not defined"
|
|
86
76
|
|
|
87
77
|
**Step 3: Write minimal implementation**
|
|
88
78
|
|
|
89
79
|
```typescript
|
|
90
|
-
|
|
80
|
+
function functionUnderTest(input: InputType): OutputType {
|
|
91
81
|
return expected;
|
|
92
82
|
}
|
|
93
83
|
```
|
|
94
84
|
|
|
95
85
|
**Step 4: Run test to verify it passes**
|
|
96
86
|
|
|
97
|
-
Run: `
|
|
87
|
+
Run: `pnpm vitest exact/path/to/tests/file.spec.ts --run`
|
|
98
88
|
Expected: PASS
|
|
99
89
|
|
|
100
90
|
**Step 5: Commit**
|
|
101
91
|
|
|
102
92
|
```bash
|
|
103
|
-
git add exact/path/to/file.ts exact/path/to/
|
|
93
|
+
git add exact/path/to/tests/file.spec.ts exact/path/to/file.ts
|
|
104
94
|
git commit -m "feat: add specific feature"
|
|
105
95
|
```
|
|
106
|
-
````
|
|
107
|
-
|
|
108
|
-
## After the Plan
|
|
109
|
-
|
|
110
|
-
Save the plan, then present workflow paths. Check git status first. Display in the **system's configured language**:
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
Plan complete! Here's how to proceed:
|
|
114
|
-
|
|
115
|
-
--- Path A: With branch isolation (recommended for features/large changes) ---
|
|
116
|
-
|
|
117
|
-
1. /sd-worktree add <name> — Create a worktree branch
|
|
118
|
-
2. /sd-plan-dev — Execute tasks in parallel (includes TDD + review)
|
|
119
|
-
3. /sd-check — Verify (modified + dependents)
|
|
120
|
-
4. /sd-commit — Commit
|
|
121
|
-
5. /sd-worktree merge — Merge back to main
|
|
122
|
-
6. /sd-worktree clean — Remove worktree
|
|
123
|
-
|
|
124
|
-
--- Path B: Direct on current branch (quick fixes/small changes) ---
|
|
125
|
-
|
|
126
|
-
1. /sd-plan-dev — Execute tasks in parallel (includes TDD + review)
|
|
127
|
-
2. /sd-check — Verify (modified + dependents)
|
|
128
|
-
3. /sd-commit — Commit
|
|
129
|
-
|
|
130
|
-
You can start from any step or skip steps as needed.
|
|
131
|
-
|
|
132
|
-
💡 "Path A: yolo" or "Path B: yolo" to auto-run all steps
|
|
133
|
-
|
|
134
|
-
⚠️ You have uncommitted changes. To use Path A, run `/sd-commit all` first.
|
|
135
96
|
```
|
|
136
97
|
|
|
137
|
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
98
|
+
## Remember
|
|
99
|
+
- Exact file paths always
|
|
100
|
+
- Complete code in plan (not "add validation")
|
|
101
|
+
- Exact commands with expected output
|
|
102
|
+
- DRY, YAGNI, TDD, frequent commits
|
|
140
103
|
|
|
141
|
-
|
|
104
|
+
## Execution Handoff
|
|
142
105
|
|
|
143
|
-
|
|
144
|
-
- NEVER execute underlying commands (git, npm, etc.) directly, even if you know what the skill does internally
|
|
145
|
-
- If a step fails, stop and report — do not attempt manual recovery
|
|
106
|
+
After saving the plan, **commit the plan document to git** before proceeding.
|
|
146
107
|
|
|
147
|
-
|
|
108
|
+
Then:
|
|
148
109
|
|
|
149
|
-
|
|
110
|
+
- If in **yolo mode** (user chose "yolo" from sd-brainstorm): Immediately proceed to sd-plan-dev without asking. No confirmation needed.
|
|
111
|
+
- Otherwise: Display this message **in the system's configured language** (detect from the language setting and translate accordingly):
|
|
112
|
+
**"Plan complete and saved to `docs/plans/<filename>.md`. Ready to execute with sd-plan-dev?"**
|
|
150
113
|
|
|
151
|
-
- **
|
|
152
|
-
-
|
|
153
|
-
- **Bite-sized steps** — Each step is one action (2-5 minutes)
|
|
154
|
-
- **TDD always** — Test first, implement second, commit third
|
|
155
|
-
- **DRY, YAGNI** — No unnecessary features, no repetition
|
|
156
|
-
- **REQUIRED SUB-SKILL:** sd-plan-dev (fresh fork per task + two-stage review)
|
|
114
|
+
- **REQUIRED SUB-SKILL:** Use sd-plan-dev
|
|
115
|
+
- Fresh fork per task + two-stage review (spec compliance → code quality)
|
|
@@ -27,7 +27,7 @@ Analyze user request from ARGUMENTS, select the best matching sd-\* skill or age
|
|
|
27
27
|
| `sd-plan` | Multi-step task with spec/requirements — **planning before code** |
|
|
28
28
|
| `sd-plan-dev` | Already have a plan — **executing implementation plan** |
|
|
29
29
|
| `sd-explore` | Deep codebase analysis — tracing execution paths, architecture, dependencies |
|
|
30
|
-
| `sd-review` |
|
|
30
|
+
| `sd-review` | **Large-scale** comprehensive review of an entire package or broad path — use only when user explicitly requests full/deep/comprehensive review |
|
|
31
31
|
| `sd-check` | Verify code — typecheck, lint, tests |
|
|
32
32
|
| `sd-commit` | Create a git commit |
|
|
33
33
|
| `sd-readme` | Update a package README.md |
|
|
@@ -40,15 +40,16 @@ Analyze user request from ARGUMENTS, select the best matching sd-\* skill or age
|
|
|
40
40
|
|
|
41
41
|
| Agent | When to select |
|
|
42
42
|
| -------------------- | ----------------------------------------------------------------- |
|
|
43
|
-
| `sd-code-reviewer` |
|
|
43
|
+
| `sd-code-reviewer` | Quick/focused review — specific files, recent changes, bugs, security, quality issues. **Default choice for most review requests** |
|
|
44
44
|
| `sd-code-simplifier` | Simplify, clean up, improve code readability |
|
|
45
45
|
| `sd-api-reviewer` | Review library public API for DX quality |
|
|
46
46
|
|
|
47
47
|
## Selection Rules
|
|
48
48
|
|
|
49
49
|
1. Select **exactly one** skill or agent — the most specific match wins
|
|
50
|
-
2.
|
|
51
|
-
3.
|
|
50
|
+
2. **Review requests**: Default to `sd-code-reviewer` agent. Only use `sd-review` skill when the user explicitly asks for a full/comprehensive/deep review of an entire package
|
|
51
|
+
3. If nothing matches, use **default LLM behavior** and handle the request directly
|
|
52
|
+
4. Pass ARGUMENTS through as the skill/agent's input
|
|
52
53
|
|
|
53
54
|
## Report Format
|
|
54
55
|
|
|
@@ -18,6 +18,18 @@ const mainWorktree = getOutput("git worktree list --porcelain")
|
|
|
18
18
|
.split("\n")[0]
|
|
19
19
|
.replace("worktree ", "");
|
|
20
20
|
|
|
21
|
+
function detectPackageManager() {
|
|
22
|
+
if (existsSync(resolve(mainWorktree, "pnpm-lock.yaml"))) return "pnpm";
|
|
23
|
+
if (existsSync(resolve(mainWorktree, "yarn.lock"))) return "yarn";
|
|
24
|
+
if (existsSync(resolve(mainWorktree, "package-lock.json"))) return "npm";
|
|
25
|
+
if (
|
|
26
|
+
existsSync(resolve(mainWorktree, "bun.lockb")) ||
|
|
27
|
+
existsSync(resolve(mainWorktree, "bun.lock"))
|
|
28
|
+
)
|
|
29
|
+
return "bun";
|
|
30
|
+
return "npm";
|
|
31
|
+
}
|
|
32
|
+
|
|
21
33
|
function detectWorktreeName() {
|
|
22
34
|
const cwd = process.cwd();
|
|
23
35
|
const worktreesDir = resolve(mainWorktree, ".worktrees");
|
|
@@ -46,8 +58,9 @@ switch (cmd) {
|
|
|
46
58
|
const branch = getMainBranch();
|
|
47
59
|
console.log(`Creating worktree: .worktrees/${name} (from ${branch})`);
|
|
48
60
|
run(`git worktree add "${worktreePath}" -b "${name}"`);
|
|
49
|
-
|
|
50
|
-
|
|
61
|
+
const pm = detectPackageManager();
|
|
62
|
+
console.log(`Installing dependencies (${pm})...`);
|
|
63
|
+
run(`${pm} install`, { cwd: worktreePath });
|
|
51
64
|
console.log(`\nReady: ${worktreePath}`);
|
|
52
65
|
break;
|
|
53
66
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
# Language
|
|
2
|
-
|
|
3
|
-
Respond in the **system's configured language** (set via Claude Code's language setting).
|
|
4
|
-
|
|
5
|
-
- Technical terms, code identifiers (variable names, function names, etc.), and library names should remain as-is
|
|
6
|
-
- Show English error messages and logs in their original form, but provide explanations in the system language
|