@simplysm/sd-claude 13.0.74 → 13.0.76

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 (31) hide show
  1. package/claude/refs/sd-code-conventions.md +92 -2
  2. package/claude/refs/sd-solid.md +2 -0
  3. package/claude/refs/sd-workflow.md +2 -1
  4. package/claude/rules/sd-claude-rules.md +21 -0
  5. package/claude/rules/sd-refs-linker.md +1 -1
  6. package/claude/sd-statusline.js +53 -11
  7. package/claude/skills/sd-api-name-review/SKILL.md +22 -3
  8. package/claude/skills/sd-brainstorm/SKILL.md +90 -1
  9. package/claude/skills/sd-check/SKILL.md +30 -14
  10. package/claude/skills/sd-commit/SKILL.md +0 -1
  11. package/claude/skills/sd-debug/SKILL.md +14 -13
  12. package/claude/skills/sd-explore/SKILL.md +76 -0
  13. package/claude/skills/sd-plan/SKILL.md +32 -0
  14. package/claude/skills/sd-plan-dev/SKILL.md +53 -2
  15. package/claude/skills/sd-plan-dev/code-quality-reviewer-prompt.md +1 -3
  16. package/claude/skills/sd-plan-dev/implementer-prompt.md +10 -1
  17. package/claude/skills/sd-readme/SKILL.md +1 -1
  18. package/claude/skills/sd-review/SKILL.md +73 -27
  19. package/claude/skills/sd-review/api-reviewer-prompt.md +6 -1
  20. package/claude/skills/sd-review/code-reviewer-prompt.md +9 -3
  21. package/claude/skills/sd-review/code-simplifier-prompt.md +43 -36
  22. package/claude/skills/sd-review/convention-checker-prompt.md +64 -0
  23. package/claude/skills/sd-review/structure-analyzer-prompt.md +97 -0
  24. package/claude/skills/sd-skill/SKILL.md +23 -0
  25. package/claude/skills/sd-skill/anthropic-best-practices.md +71 -1091
  26. package/claude/skills/sd-skill/testing-skills-with-subagents.md +9 -5
  27. package/claude/skills/sd-use/SKILL.md +19 -27
  28. package/package.json +1 -1
  29. package/claude/skills/sd-check/baseline-analysis.md +0 -150
  30. package/claude/skills/sd-check/test-scenarios.md +0 -205
  31. package/claude/skills/sd-debug/test-baseline-pressure.md +0 -61
@@ -0,0 +1,97 @@
1
+ # Structure Analyzer Prompt
2
+
3
+ Template for `Agent(general-purpose)`. Fill in `[TARGET_PATH]`.
4
+
5
+ ```
6
+ You are analyzing code for structural organization and responsibility separation.
7
+ Your question: "Is the code organized in a way that makes responsibilities clear and changes localized?"
8
+
9
+ ## Target
10
+
11
+ Analyze ALL source files at [TARGET_PATH].
12
+
13
+ ## Step 1: List all source files
14
+
15
+ Use Glob to list all .ts/.tsx files under the target path (exclude node_modules, dist).
16
+ This is your analysis scope — every file in this list must be examined.
17
+
18
+ ## Step 2: Understand the architecture
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 and public exports
26
+ - Identify module boundaries: what each module/file owns
27
+ - Map abstraction levels: which code is high-level vs low-level
28
+ - Identify responsibility groupings: which functions/classes belong together
29
+
30
+ ## Step 3: Find structural improvement opportunities
31
+
32
+ Look for:
33
+ - Responsibility mixing: a single module handling concerns that should be separate
34
+ - Abstraction level mismatch: high-level orchestration mixed with low-level implementation details in the same function/module
35
+ - Module organization: related functionality scattered across unrelated files, or unrelated functionality grouped together
36
+ - Leaking abstractions: internal implementation details exposed through public API that force consumers to know about internals
37
+ - Coupling hotspots: modules where a change would cascade to many other files
38
+
39
+ ## CRITICAL — Scope boundaries
40
+
41
+ Do NOT report ANY of the following. These are OUT OF SCOPE:
42
+ - Bugs, security, logic errors, race conditions → that's code review
43
+ - Naming consistency, API design, type quality → that's API review
44
+ - Code complexity, duplication within a single function → that's code simplification
45
+ - Circular dependencies, wrong dependency direction, boundary violations → that's code review (architectural defects)
46
+ - Style preferences, comment style, import ordering
47
+ - Dependencies that are clearly intentional and well-established patterns in the codebase
48
+ - Issues in code OUTSIDE the target path
49
+
50
+ **Key distinction:** Architectural DEFECTS (circular deps, boundary violations) are for code review. Structural IMPROVEMENTS (better responsibility separation, cleaner abstraction levels) are for this analyzer.
51
+
52
+ ## Step 4: Self-verify before reporting
53
+
54
+ Before including ANY finding:
55
+
56
+ 1. **Improvement vs defect**: Is this a structural improvement suggestion, or an architectural defect? If defect → not in scope.
57
+ 2. **Evidence check**: Can you point to specific code that shows the structural issue?
58
+ 3. **Intentional pattern check**: Is this an established pattern used consistently across the codebase? If yes → by-design, drop it.
59
+ 4. **Scope check**: Is the issue IN the target code, not in how other packages are structured?
60
+
61
+ **Quality over quantity: 3 verified structural findings > 10 maybe-findings.**
62
+
63
+ ## Constraints
64
+
65
+ - Analysis only. Do NOT modify any files.
66
+ - Do NOT provide corrected code blocks. Describe improvements in words only.
67
+ - Only report issues with concrete evidence (specific code references).
68
+ - If the structure is consistent across the codebase, treat it as intentional.
69
+
70
+ ## Output Format
71
+
72
+ Use this exact format for every finding:
73
+
74
+ ### [HIGH|MEDIUM|LOW] title
75
+
76
+ - **File**: path/to/file.ts:42
77
+ - **Evidence**: what you observed (include code snippet)
78
+ - **Issue**: what the structural concern is
79
+ - **Suggestion**: how to improve the structure (in words, not code)
80
+
81
+ Impact levels:
82
+ - HIGH: Major structural issue. Responsibilities are significantly misplaced or abstractions are deeply leaked.
83
+ - MEDIUM: Notable structural concern. Better organization would meaningfully improve maintainability.
84
+ - LOW: Improvement opportunity. Cleaner structure exists but current organization is workable.
85
+
86
+ Start your report with:
87
+
88
+ ## Structure Analysis Results
89
+
90
+ ### Summary
91
+ - Files reviewed: N
92
+ - Module structure: brief description
93
+ - Findings: X HIGH, Y MEDIUM, Z LOW
94
+
95
+ ### Findings
96
+ [findings here]
97
+ ```
@@ -176,12 +176,29 @@ Edit skill without testing? Same violation.
176
176
  - Don't "adapt" while running tests
177
177
  - Delete means delete
178
178
 
179
+ **Only exemption — pure mechanical edits:** Typo fixes, tool/variable renames where the behavioral guidance is identical (e.g., `TodoWrite` → `TaskCreate`). If you're changing what the skill *teaches*, it's not mechanical — test it.
180
+
179
181
  **REQUIRED BACKGROUND:** The sd-tdd skill explains why this matters. Same principles apply to documentation.
180
182
 
181
183
  ## Testing All Skill Types
182
184
 
183
185
  Different skill types need different test approaches:
184
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
+ }
200
+ ```
201
+
185
202
  ### Discipline-Enforcing Skills (rules/requirements)
186
203
 
187
204
  **Examples:** TDD, verification-before-completion, designing-before-coding
@@ -253,6 +270,8 @@ Example: Testing a "condition-based-waiting" skill
253
270
  | "Academic review is enough" | Reading ≠ using. Test application scenarios. |
254
271
  | "No time to test" | Deploying untested skill wastes more time fixing it later. |
255
272
  | "I already know the baseline failures" | You know what YOU think the failures are. Run a subagent to see what ACTUALLY happens. Knowledge ≠ observation. |
273
+ | "This is process theater" | If the process catches even one issue you missed, it paid for itself. "Theater" is what you call process before it saves you. |
274
+ | "It applies the wrong test methodology" | Different skill types need different tests (pressure vs retrieval), but ALL types need testing. No type is exempt. |
256
275
 
257
276
  **All of these mean: Test before deploying. No exceptions.**
258
277
 
@@ -264,6 +283,10 @@ Skills that enforce discipline need to resist rationalization. **See writing-gui
264
283
 
265
284
  Follow the TDD cycle:
266
285
 
286
+ ### Subagent Rules
287
+
288
+ **NEVER use `isolation: "worktree"` when launching subagents.** Worktrees break lint/build tooling. Always run subagents in the default (non-isolated) mode.
289
+
267
290
  ### RED: Write Failing Test (Baseline)
268
291
 
269
292
  Run pressure scenario with subagent WITHOUT the skill. Document exact behavior: