@simplysm/sd-claude 13.0.75 → 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.
- package/claude/refs/sd-code-conventions.md +102 -4
- package/claude/refs/sd-solid.md +13 -2
- package/claude/refs/sd-workflow.md +2 -1
- package/claude/rules/sd-claude-rules.md +18 -1
- package/claude/rules/sd-refs-linker.md +1 -1
- package/claude/sd-statusline.js +51 -9
- package/claude/skills/sd-api-name-review/SKILL.md +118 -13
- package/claude/skills/sd-brainstorm/SKILL.md +82 -8
- package/claude/skills/sd-check/SKILL.md +28 -14
- package/claude/skills/sd-commit/SKILL.md +1 -4
- package/claude/skills/sd-debug/SKILL.md +8 -13
- package/claude/skills/sd-debug/condition-based-waiting.md +5 -11
- package/claude/skills/sd-debug/root-cause-tracing.md +18 -33
- package/claude/skills/sd-explore/SKILL.md +118 -0
- package/claude/skills/sd-plan/SKILL.md +31 -0
- package/claude/skills/sd-plan-dev/SKILL.md +92 -75
- package/claude/skills/sd-plan-dev/code-quality-reviewer-prompt.md +1 -3
- package/claude/skills/sd-plan-dev/implementer-prompt.md +10 -1
- package/claude/skills/sd-readme/SKILL.md +1 -1
- package/claude/skills/sd-review/SKILL.md +128 -55
- package/claude/skills/sd-review/api-reviewer-prompt.md +23 -38
- package/claude/skills/sd-review/code-reviewer-prompt.md +26 -29
- package/claude/skills/sd-review/convention-checker-prompt.md +61 -0
- package/claude/skills/sd-review/refactoring-analyzer-prompt.md +92 -0
- package/claude/skills/sd-skill/SKILL.md +20 -3
- package/claude/skills/sd-skill/anthropic-best-practices.md +71 -1091
- package/claude/skills/sd-skill/testing-skills-with-subagents.md +9 -5
- package/claude/skills/sd-skill/writing-guide.md +7 -11
- package/claude/skills/sd-tdd/SKILL.md +15 -20
- package/claude/skills/sd-use/SKILL.md +18 -27
- package/claude/skills/sd-worktree/SKILL.md +58 -113
- package/package.json +1 -1
- package/claude/skills/sd-check/baseline-analysis.md +0 -150
- package/claude/skills/sd-check/test-scenarios.md +0 -205
- package/claude/skills/sd-debug/test-baseline-pressure.md +0 -61
- package/claude/skills/sd-review/code-simplifier-prompt.md +0 -88
- package/claude/skills/sd-worktree/sd-worktree.mjs +0 -152
|
@@ -16,18 +16,20 @@ You run scenarios without the skill (RED - watch agent fail), write skill addres
|
|
|
16
16
|
|
|
17
17
|
## When to Use
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
**Pressure test** skills that:
|
|
20
20
|
|
|
21
21
|
- Enforce discipline (TDD, testing requirements)
|
|
22
22
|
- Have compliance costs (time, effort, rework)
|
|
23
23
|
- Could be rationalized away ("just this once")
|
|
24
24
|
- Contradict immediate goals (speed over quality)
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
**Retrieval test** (not pressure test) skills that:
|
|
27
27
|
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
28
|
+
- Are pure reference (API docs, syntax guides)
|
|
29
|
+
- Have no rules to violate
|
|
30
|
+
- Have no incentive to bypass
|
|
31
|
+
|
|
32
|
+
Retrieval tests verify agents can find and correctly apply the information. See SKILL.md "Testing All Skill Types > Reference Skills" for methodology.
|
|
31
33
|
|
|
32
34
|
## TDD Mapping for Skill Testing
|
|
33
35
|
|
|
@@ -159,6 +161,8 @@ Forces explicit choice.
|
|
|
159
161
|
|
|
160
162
|
### Testing Setup
|
|
161
163
|
|
|
164
|
+
**NEVER use `isolation: "worktree"` when launching subagents.** Worktrees break lint/build tooling. Always run subagents in the default (non-isolated) mode.
|
|
165
|
+
|
|
162
166
|
```markdown
|
|
163
167
|
IMPORTANT: This is a real scenario. You must choose and act.
|
|
164
168
|
Don't ask hypothetical questions - make the actual decision.
|
|
@@ -4,17 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
## Flowchart Usage
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
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
|
-
```
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
green
|
|
67
|
-
|
|
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
|
|
@@ -4,21 +4,19 @@ description: "Route requests to sd-* skills/agents (explicit invocation only)"
|
|
|
4
4
|
model: haiku
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# sd-use - Auto Skill
|
|
7
|
+
# sd-use - Auto Skill Router
|
|
8
8
|
|
|
9
|
-
Analyze user request from ARGUMENTS, select the best matching
|
|
10
|
-
then execute it.
|
|
9
|
+
Analyze user request from ARGUMENTS, select the best matching skill, explain why, then execute it.
|
|
11
10
|
|
|
12
11
|
## Execution Flow
|
|
13
12
|
|
|
14
13
|
1. Read ARGUMENTS
|
|
15
|
-
2.
|
|
16
|
-
3.
|
|
17
|
-
4.
|
|
14
|
+
2. If user names a specific skill, route to that skill directly
|
|
15
|
+
3. Otherwise, match against catalog below
|
|
16
|
+
4. Report selection with reason
|
|
17
|
+
5. Execute immediately
|
|
18
18
|
|
|
19
|
-
## Catalog
|
|
20
|
-
|
|
21
|
-
### Skills (execute via `Skill` tool)
|
|
19
|
+
## Catalog (execute via `Skill` tool)
|
|
22
20
|
|
|
23
21
|
| Skill | When to select |
|
|
24
22
|
|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
@@ -27,41 +25,34 @@ then execute it.
|
|
|
27
25
|
| `sd-tdd` | Implementing a feature or fixing a bug — **before writing code** |
|
|
28
26
|
| `sd-plan` | Multi-step task with spec/requirements — **planning before code** |
|
|
29
27
|
| `sd-plan-dev` | Already have a plan — **executing implementation plan** |
|
|
30
|
-
| `sd-review` |
|
|
28
|
+
| `sd-review` | Code review + refactoring analysis — defects, safety, API design, conventions, complexity, duplication, code structure |
|
|
31
29
|
| `sd-check` | Verify code — typecheck, lint, tests |
|
|
32
30
|
| `sd-commit` | Create a git commit |
|
|
33
31
|
| `sd-readme` | Update a package README.md |
|
|
34
|
-
| `sd-discuss` | Evaluate code design decisions against industry standards and project conventions
|
|
32
|
+
| `sd-discuss` | Evaluate code design decisions against industry standards and project conventions |
|
|
35
33
|
| `sd-api-name-review` | Review public API naming consistency |
|
|
36
34
|
| `sd-worktree` | Start new work in branch isolation |
|
|
37
35
|
| `sd-skill` | Create or edit skills |
|
|
38
36
|
| `sd-email-analyze` | Analyze, read, or summarize email files (`.eml` or `.msg`) — parsing and attachment extraction |
|
|
39
|
-
|
|
40
|
-
### Agents (execute via `Task` tool with matching `subagent_type`)
|
|
41
|
-
|
|
42
|
-
| Agent | When to select |
|
|
43
|
-
|------------------------|------------------------------------------------------------------------------------------------------------------------------------|
|
|
44
|
-
| `sd-code-reviewer` | Quick/focused review — specific files, recent changes, bugs, security, quality issues. **Default choice for most review requests** |
|
|
45
|
-
| `sd-code-simplifier` | Simplify, clean up, improve code readability |
|
|
46
|
-
| `sd-api-reviewer` | Review library public API for DX quality |
|
|
47
|
-
| `sd-security-reviewer` | ORM SQL injection and input validation vulnerability review |
|
|
37
|
+
| `sd-document` | Read or write document files (`.docx`, `.xlsx`, `.pptx`, `.pdf`) — content extraction, creation, data export |
|
|
48
38
|
|
|
49
39
|
## Selection Rules
|
|
50
40
|
|
|
51
|
-
1.
|
|
52
|
-
2. **
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
41
|
+
1. **Explicit skill name** — If user mentions a specific skill name, route to that skill directly
|
|
42
|
+
2. Select **exactly one** skill — the most specific match wins
|
|
43
|
+
3. **Review & Refactor**: "find bugs", "review", "refactor", "improve structure", "remove duplication" → `sd-review`
|
|
44
|
+
4. **Sequential requests**: Route to the **first** skill only. After completion, user can invoke the next
|
|
45
|
+
5. If nothing matches, use **default LLM behavior** and handle the request directly
|
|
46
|
+
6. Pass ARGUMENTS through as the skill's input
|
|
56
47
|
|
|
57
48
|
## Report Format
|
|
58
49
|
|
|
59
50
|
Before executing, output:
|
|
60
51
|
|
|
61
52
|
```
|
|
62
|
-
**Selected**: `
|
|
53
|
+
**Selected**: `{skill-name}`
|
|
63
54
|
**Reason**: {one-line explanation}
|
|
64
|
-
**Tip**: Next time you can call `/
|
|
55
|
+
**Tip**: Next time you can call `/{skill-name} {request}` directly.
|
|
65
56
|
```
|
|
66
57
|
|
|
67
58
|
Then execute immediately.
|
|
@@ -6,128 +6,73 @@ model: haiku
|
|
|
6
6
|
|
|
7
7
|
# sd-worktree
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- Check `git status` — if merge conflicts exist, STOP and report
|
|
50
|
-
- Do NOT proceed to `clean` until merge is confirmed successful
|
|
51
|
-
|
|
52
|
-
**Violation of these rules causes IRREVERSIBLE DATA LOSS.**
|
|
53
|
-
|
|
54
|
-
## Overview
|
|
55
|
-
|
|
56
|
-
Create, merge, and clean up git worktrees under `.worktrees/`. Uses the current branch of the main working tree as the source branch.
|
|
57
|
-
|
|
58
|
-
**Important**: Claude Code's working directory (cd) shifts between main and worktree, so always verify the cd location before and after each command.
|
|
59
|
-
|
|
60
|
-
## Target Worktree Resolution
|
|
61
|
-
|
|
62
|
-
For all commands, the target worktree name is resolved in this order:
|
|
63
|
-
|
|
64
|
-
1. Explicitly provided in args → use as-is
|
|
65
|
-
2. Current cd is inside `.worktrees/<name>/` → use that `<name>` (auto-detected)
|
|
66
|
-
3. Neither applies → ask the user
|
|
67
|
-
|
|
68
|
-
## Commands
|
|
69
|
-
|
|
70
|
-
### add — Create a worktree
|
|
71
|
-
|
|
72
|
-
Take a work description from args, determine a kebab-case name, then run:
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
# Run from main
|
|
76
|
-
node .claude/skills/sd-worktree/sd-worktree.mjs add <name>
|
|
77
|
-
cd .worktrees/<name> # Move into the worktree
|
|
9
|
+
Branch-isolated workflow using git worktrees.
|
|
10
|
+
|
|
11
|
+
## Flow
|
|
12
|
+
|
|
13
|
+
```mermaid
|
|
14
|
+
flowchart TD
|
|
15
|
+
START([sd-worktree invoked]) --> ADD
|
|
16
|
+
|
|
17
|
+
subgraph ADD [add]
|
|
18
|
+
A1["git worktree add .worktrees/NAME -b NAME"]
|
|
19
|
+
A1 -->|fail| HALT
|
|
20
|
+
A1 -->|ok| A2[detect package manager]
|
|
21
|
+
A2 --> A3["pm install (cwd: .worktrees/NAME)"]
|
|
22
|
+
A3 -->|fail| HALT
|
|
23
|
+
A3 -->|ok| A4["cd .worktrees/NAME"]
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
A4 --> WORK["work + commit inside worktree"]
|
|
27
|
+
WORK --> MERGE
|
|
28
|
+
|
|
29
|
+
subgraph MERGE [merge]
|
|
30
|
+
M0["cd PROJECT_ROOT"]
|
|
31
|
+
M0 --> M1["git merge NAME --no-ff (cwd: PROJECT_ROOT)"]
|
|
32
|
+
M1 -->|fail| HALT
|
|
33
|
+
M1 -->|ok| M2[merge complete]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
M2 --> CLEAN
|
|
37
|
+
|
|
38
|
+
subgraph CLEAN [clean]
|
|
39
|
+
C1{"cwd inside worktree?"}
|
|
40
|
+
C1 -->|yes| HALT
|
|
41
|
+
C1 -->|no| C2["rm -rf .worktrees/NAME (bash)"]
|
|
42
|
+
C2 --> C3["git worktree prune"]
|
|
43
|
+
C3 --> C4["git branch -d NAME"]
|
|
44
|
+
C4 -->|fail| HALT
|
|
45
|
+
C4 -->|ok| C5[done]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
HALT([HALT - AskUserQuestion])
|
|
78
49
|
```
|
|
79
50
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
### rebase — Rebase onto main branch
|
|
51
|
+
## Rules
|
|
83
52
|
|
|
84
|
-
|
|
85
|
-
# Can be run from inside the worktree
|
|
86
|
-
node .claude/skills/sd-worktree/sd-worktree.mjs rebase [name]
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
- Rebases the worktree branch onto the latest commit of the main branch
|
|
90
|
-
- Errors if uncommitted changes exist → commit or stash first
|
|
91
|
-
- Use when you want a clean history before merging
|
|
92
|
-
- **If rebase fails or conflicts → STOP. Report to user. Do NOT auto-resolve.**
|
|
53
|
+
### HALT
|
|
93
54
|
|
|
94
|
-
|
|
55
|
+
When any step reaches **fail** or **HALT**:
|
|
95
56
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
```
|
|
57
|
+
1. Show the error message to the user as-is
|
|
58
|
+
2. Ask the user how to proceed via `AskUserQuestion`
|
|
59
|
+
3. Do **nothing** until the user responds
|
|
100
60
|
|
|
101
|
-
|
|
102
|
-
- Errors if uncommitted changes exist → commit or stash first
|
|
103
|
-
- After merge, always `cd <project-root>` (required for subsequent clean)
|
|
61
|
+
Manual git merge, git stash, git reset, git clean, or **any workaround is forbidden**. Yolo mode does NOT override HALT.
|
|
104
62
|
|
|
105
|
-
|
|
106
|
-
1. Before merge: check BOTH main and worktree for uncommitted changes
|
|
107
|
-
2. If the script exits with non-zero → show "Please proceed with the merge manually." message (in system language) and STOP.
|
|
108
|
-
3. After merge: run `git status` in main to confirm no conflicts
|
|
109
|
-
4. If conflicts or errors → show "Please proceed with the merge manually." message (in system language) and STOP.
|
|
110
|
-
5. Only proceed to `clean` after confirming merge was fully successful
|
|
63
|
+
### Worktree location
|
|
111
64
|
|
|
112
|
-
|
|
65
|
+
All worktrees MUST be created under **`.worktrees/`** (project root).
|
|
113
66
|
|
|
114
|
-
|
|
115
|
-
# Must cd to main first (worktree directory will be deleted)
|
|
116
|
-
cd <project-root>
|
|
117
|
-
node .claude/skills/sd-worktree/sd-worktree.mjs clean <name>
|
|
118
|
-
```
|
|
67
|
+
### Package manager detection
|
|
119
68
|
|
|
120
|
-
|
|
121
|
-
|
|
69
|
+
| File | PM |
|
|
70
|
+
|---|---|
|
|
71
|
+
| `pnpm-lock.yaml` | pnpm |
|
|
72
|
+
| `yarn.lock` | yarn |
|
|
73
|
+
| `package-lock.json` | npm |
|
|
74
|
+
| `bun.lockb` / `bun.lock` | bun |
|
|
122
75
|
|
|
123
|
-
|
|
76
|
+
### clean: use rm -rf
|
|
124
77
|
|
|
125
|
-
|
|
126
|
-
(main: 13.x) → /sd-worktree add modal-migration
|
|
127
|
-
→ cd .worktrees/modal-migration
|
|
128
|
-
(worktree) → ... work ...
|
|
129
|
-
(worktree) → /sd-worktree rebase # (optional) rebase onto latest main
|
|
130
|
-
(worktree) → /sd-worktree merge
|
|
131
|
-
(worktree) → cd <project-root>
|
|
132
|
-
(main: 13.x) → /sd-worktree clean modal-migration
|
|
133
|
-
```
|
|
78
|
+
`git worktree remove` almost always fails on Windows due to file locks. Use `rm -rf` (bash) + `git worktree prune` instead.
|
package/package.json
CHANGED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
# Baseline Test Analysis - sd-check Skill
|
|
2
|
-
|
|
3
|
-
## Summary
|
|
4
|
-
|
|
5
|
-
Tested 6 scenarios with agents WITHOUT sd-check skill. All agents failed to follow optimal verification patterns.
|
|
6
|
-
|
|
7
|
-
## Common Failures Across All Scenarios
|
|
8
|
-
|
|
9
|
-
### 1. No Cost Optimization
|
|
10
|
-
|
|
11
|
-
**Failure:** All agents planned direct command execution instead of using haiku subagents.
|
|
12
|
-
|
|
13
|
-
**Observed in:** All scenarios (1-6)
|
|
14
|
-
|
|
15
|
-
**Impact:** Higher cost, no isolation
|
|
16
|
-
|
|
17
|
-
**What skill must prevent:** Skill must explicitly require haiku subagent usage
|
|
18
|
-
|
|
19
|
-
### 2. Incomplete Parallelization
|
|
20
|
-
|
|
21
|
-
**Failure:** Agents either ran sequentially or only partially parallelized.
|
|
22
|
-
|
|
23
|
-
**Examples:**
|
|
24
|
-
|
|
25
|
-
- Scenario 1: Used `&` for typecheck/lint but ran tests sequentially ("stratified parallel")
|
|
26
|
-
- Scenario 2: No parallelization at all
|
|
27
|
-
- Scenario 3: Sequential fix → verify → fix → verify
|
|
28
|
-
|
|
29
|
-
**Impact:** Slower verification (60s → 120s+)
|
|
30
|
-
|
|
31
|
-
**What skill must prevent:** Skill must require ALL 3 checks (typecheck, lint, test) in parallel via 3 separate haiku agents
|
|
32
|
-
|
|
33
|
-
### 3. Missing Environment Pre-checks
|
|
34
|
-
|
|
35
|
-
**Failure:** No systematic environment validation before running checks.
|
|
36
|
-
|
|
37
|
-
**Observed:**
|
|
38
|
-
|
|
39
|
-
- Scenario 1: Checked Docker for ORM tests, but not other prerequisites
|
|
40
|
-
- Scenario 6: Only checked lock file, missed package.json scripts
|
|
41
|
-
|
|
42
|
-
**Impact:** Confusing errors if environment misconfigured
|
|
43
|
-
|
|
44
|
-
**What skill must prevent:** Skill must require pre-check (package.json `check` script exists)
|
|
45
|
-
|
|
46
|
-
### 4. Unclear Re-verification Loop
|
|
47
|
-
|
|
48
|
-
**Failure:** After fixing errors, no clear "re-run ALL checks" loop.
|
|
49
|
-
|
|
50
|
-
**Examples:**
|
|
51
|
-
|
|
52
|
-
- Scenario 3: Phase 1 verify → Phase 2 verify → Phase 3 verify (but no final "all phases" re-verify)
|
|
53
|
-
- Agents treated it as linear progression, not a loop
|
|
54
|
-
|
|
55
|
-
**Impact:** Fixes in one area may break another (cascade errors)
|
|
56
|
-
|
|
57
|
-
**What skill must prevent:** Skill must explicitly state "re-run ALL 3 checks until ALL pass"
|
|
58
|
-
|
|
59
|
-
### 5. No sd-debug Recommendation
|
|
60
|
-
|
|
61
|
-
**Failure:** When root cause unclear after multiple attempts, agents didn't recommend sd-debug.
|
|
62
|
-
|
|
63
|
-
**Observed:**
|
|
64
|
-
|
|
65
|
-
- Scenario 4: After 4 failed attempts, agent suggested various debugging approaches but NOT `/sd-debug` skill
|
|
66
|
-
|
|
67
|
-
**Impact:** User wastes time when systematic root-cause investigation needed
|
|
68
|
-
|
|
69
|
-
**What skill must prevent:** Skill must state "after 2-3 failed fix attempts → recommend /sd-debug"
|
|
70
|
-
|
|
71
|
-
### 6. Incorrect Default Behavior
|
|
72
|
-
|
|
73
|
-
**Failure:** When no path argument provided, agents asked user for clarification instead of defaulting to full project.
|
|
74
|
-
|
|
75
|
-
**Observed:**
|
|
76
|
-
|
|
77
|
-
- Scenario 5: Agent wanted to ask "which package?" instead of running on entire project
|
|
78
|
-
|
|
79
|
-
**Impact:** Unnecessary user friction
|
|
80
|
-
|
|
81
|
-
**What skill must prevent:** Skill must state "if no path argument → run on entire project (omit path in commands)"
|
|
82
|
-
|
|
83
|
-
### 7. Scope Creep (Unnecessary Steps)
|
|
84
|
-
|
|
85
|
-
**Failure:** Agents included steps not relevant to "verification".
|
|
86
|
-
|
|
87
|
-
**Examples:**
|
|
88
|
-
|
|
89
|
-
- Scenario 1: Included build step (verification doesn't need build)
|
|
90
|
-
- Scenario 2: Included dev server test (not verification)
|
|
91
|
-
|
|
92
|
-
**Impact:** Wasted time, confusion about scope
|
|
93
|
-
|
|
94
|
-
**What skill must prevent:** Skill must clarify scope: typecheck, lint, test ONLY (no build, no dev)
|
|
95
|
-
|
|
96
|
-
## Rationalization Patterns (Verbatim)
|
|
97
|
-
|
|
98
|
-
### "Parallelization while maintaining logical dependencies"
|
|
99
|
-
|
|
100
|
-
- Used to justify partial parallelization
|
|
101
|
-
- Agents ran typecheck & lint in parallel, but tests sequentially
|
|
102
|
-
- **Counter:** ALL 3 checks are independent → all 3 in parallel
|
|
103
|
-
|
|
104
|
-
### "Stratified parallel execution"
|
|
105
|
-
|
|
106
|
-
- Used to justify sequential test runs grouped by environment
|
|
107
|
-
- **Counter:** Vitest projects are independent → run all via single command
|
|
108
|
-
|
|
109
|
-
### "Faster to fail fast on static checks"
|
|
110
|
-
|
|
111
|
-
- Good principle, but used to justify including build step
|
|
112
|
-
- **Counter:** Build is not a static check, and not required for verification
|
|
113
|
-
|
|
114
|
-
### "Type safety first" / "Incremental verification"
|
|
115
|
-
|
|
116
|
-
- Used to justify Phase 1 → Phase 2 → Phase 3 linear progression
|
|
117
|
-
- **Counter:** After fixes, must re-verify ALL phases (loop), not just next phase
|
|
118
|
-
|
|
119
|
-
### "Understanding first, then ONE comprehensive fix"
|
|
120
|
-
|
|
121
|
-
- Used to justify continued debugging without tools
|
|
122
|
-
- **Counter:** After 2-3 attempts, recommend /sd-debug for systematic investigation
|
|
123
|
-
|
|
124
|
-
### "Ask for clarification" / "Explicit and predictable"
|
|
125
|
-
|
|
126
|
-
- Used to justify asking user for path when none provided
|
|
127
|
-
- **Counter:** Default to full project is explicit and predictable behavior
|
|
128
|
-
|
|
129
|
-
## Success Criteria for Skill
|
|
130
|
-
|
|
131
|
-
Skill is effective if agents:
|
|
132
|
-
|
|
133
|
-
1. ✅ Launch 3 haiku agents in parallel (typecheck, lint, test)
|
|
134
|
-
2. ✅ Run environment pre-checks before verification
|
|
135
|
-
3. ✅ Default to full project when no path argument
|
|
136
|
-
4. ✅ Fix errors in priority order (typecheck → lint → test)
|
|
137
|
-
5. ✅ Re-run ALL 3 checks after any fix (loop until all pass)
|
|
138
|
-
6. ✅ Recommend /sd-debug after 2-3 failed fix attempts
|
|
139
|
-
7. ✅ Do NOT include build or dev server steps
|
|
140
|
-
|
|
141
|
-
## Test Scenarios for GREEN Phase
|
|
142
|
-
|
|
143
|
-
After writing skill, re-run scenarios 1-6. Agents should now exhibit correct behavior above.
|
|
144
|
-
|
|
145
|
-
Focus on:
|
|
146
|
-
|
|
147
|
-
- Scenario 1: Verify parallel haiku agents + env checks
|
|
148
|
-
- Scenario 3: Verify re-verification loop + priority
|
|
149
|
-
- Scenario 4: Verify sd-debug recommendation
|
|
150
|
-
- Scenario 5: Verify default to full project
|