@nst173/superpowers-ccg 1.3.0

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 (97) hide show
  1. package/.agent/skills/brainstorming/SKILL.md +26 -0
  2. package/.agent/skills/coordinating-multi-model-work/SKILL.md +29 -0
  3. package/.agent/skills/executing-plans/SKILL.md +27 -0
  4. package/.agent/skills/using-superpowers/SKILL.md +29 -0
  5. package/.agent/skills/verifying-before-completion/SKILL.md +20 -0
  6. package/.agent/skills/writing-plans/SKILL.md +29 -0
  7. package/.cursor/agents/code-reviewer.md +22 -0
  8. package/.cursor/commands/brainstorm.md +11 -0
  9. package/.cursor/commands/execute-plan.md +12 -0
  10. package/.cursor/commands/write-plan.md +11 -0
  11. package/.cursor/hook-scripts/after-file-edit.mjs +3 -0
  12. package/.cursor/hook-scripts/before-shell-execution.mjs +3 -0
  13. package/.cursor/hook-scripts/session-end.mjs +3 -0
  14. package/.cursor/hooks.json +21 -0
  15. package/.cursor/mcp.json +20 -0
  16. package/.cursor/rules/checkpoint-protocol.mdc +11 -0
  17. package/.cursor/rules/orchestrator-routing.mdc +12 -0
  18. package/.cursor/rules/token-discipline.mdc +12 -0
  19. package/.cursor/skills/brainstorming/SKILL.md +26 -0
  20. package/.cursor/skills/coordinating-multi-model-work/SKILL.md +29 -0
  21. package/.cursor/skills/executing-plans/SKILL.md +27 -0
  22. package/.cursor/skills/using-superpowers/SKILL.md +29 -0
  23. package/.cursor/skills/verifying-before-completion/SKILL.md +20 -0
  24. package/.cursor/skills/writing-plans/SKILL.md +29 -0
  25. package/AGENTS.md +23 -0
  26. package/CLAUDE.md +78 -0
  27. package/GEMINI.md +27 -0
  28. package/LICENSE +21 -0
  29. package/README.md +171 -0
  30. package/agents/code-reviewer.md +54 -0
  31. package/cli/superpowers-ccg.mjs +8 -0
  32. package/commands/brainstorm.md +6 -0
  33. package/commands/execute-plan.md +6 -0
  34. package/commands/write-plan.md +6 -0
  35. package/config/antigravity/mcp_config.example.json +26 -0
  36. package/hooks/hooks.json +37 -0
  37. package/hooks/pre-tool-use-task.sh +4 -0
  38. package/hooks/run-hook.cmd +19 -0
  39. package/hooks/session-start.sh +72 -0
  40. package/hooks/user-prompt-submit.sh +31 -0
  41. package/package.json +56 -0
  42. package/skills/EVALUATION.md +201 -0
  43. package/skills/brainstorming/SKILL.md +120 -0
  44. package/skills/coordinating-multi-model-work/GATE.md +36 -0
  45. package/skills/coordinating-multi-model-work/INTEGRATION.md +51 -0
  46. package/skills/coordinating-multi-model-work/SKILL.md +51 -0
  47. package/skills/coordinating-multi-model-work/checkpoints.md +31 -0
  48. package/skills/coordinating-multi-model-work/cross-validation.md +37 -0
  49. package/skills/coordinating-multi-model-work/prompts/codex-base.md +40 -0
  50. package/skills/coordinating-multi-model-work/prompts/gemini-base.md +41 -0
  51. package/skills/coordinating-multi-model-work/review-chain.md +25 -0
  52. package/skills/coordinating-multi-model-work/routing-decision.md +50 -0
  53. package/skills/debugging-systematically/CREATION-LOG.md +119 -0
  54. package/skills/debugging-systematically/SKILL.md +325 -0
  55. package/skills/debugging-systematically/condition-based-waiting-example.ts +158 -0
  56. package/skills/debugging-systematically/condition-based-waiting.md +115 -0
  57. package/skills/debugging-systematically/defense-in-depth.md +122 -0
  58. package/skills/debugging-systematically/find-polluter.sh +63 -0
  59. package/skills/debugging-systematically/root-cause-tracing.md +169 -0
  60. package/skills/debugging-systematically/test-academic.md +14 -0
  61. package/skills/debugging-systematically/test-pressure-1.md +58 -0
  62. package/skills/debugging-systematically/test-pressure-2.md +68 -0
  63. package/skills/debugging-systematically/test-pressure-3.md +69 -0
  64. package/skills/developing-with-subagents/SKILL.md +51 -0
  65. package/skills/developing-with-subagents/code-quality-reviewer-prompt.md +30 -0
  66. package/skills/developing-with-subagents/implementer-prompt.md +41 -0
  67. package/skills/developing-with-subagents/spec-reviewer-prompt.md +25 -0
  68. package/skills/dispatching-parallel-agents/SKILL.md +195 -0
  69. package/skills/executing-plans/SKILL.md +67 -0
  70. package/skills/finishing-development-branches/SKILL.md +208 -0
  71. package/skills/practicing-test-driven-development/SKILL.md +346 -0
  72. package/skills/practicing-test-driven-development/testing-anti-patterns.md +299 -0
  73. package/skills/receiving-code-review/SKILL.md +221 -0
  74. package/skills/requesting-code-review/SKILL.md +127 -0
  75. package/skills/requesting-code-review/code-reviewer.md +146 -0
  76. package/skills/shared/multi-model-integration-section.md +32 -0
  77. package/skills/shared/protocol-threshold.md +46 -0
  78. package/skills/shared/supplementary-tools.md +132 -0
  79. package/skills/shared/task-format-reference.md +83 -0
  80. package/skills/using-git-worktrees/SKILL.md +225 -0
  81. package/skills/using-superpowers/SKILL.md +101 -0
  82. package/skills/verifying-before-completion/SKILL.md +159 -0
  83. package/skills/writing-plans/SKILL.md +55 -0
  84. package/skills/writing-skills/CHECKLIST.md +92 -0
  85. package/skills/writing-skills/SKILL.md +111 -0
  86. package/skills/writing-skills/STRUCTURE.md +208 -0
  87. package/skills/writing-skills/TESTING.md +155 -0
  88. package/skills/writing-skills/anthropic-best-practices.md +1150 -0
  89. package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  90. package/skills/writing-skills/graphviz-conventions.dot +172 -0
  91. package/skills/writing-skills/persuasion-principles.md +187 -0
  92. package/skills/writing-skills/render-graphs.js +168 -0
  93. package/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  94. package/src/cli.mjs +165 -0
  95. package/src/constants.mjs +7 -0
  96. package/src/install.mjs +186 -0
  97. package/src/io.mjs +81 -0
@@ -0,0 +1,92 @@
1
+ # Skill Creation Checklist
2
+
3
+ ## STOP: Before Moving to Next Skill
4
+
5
+ **After writing ANY skill, you MUST STOP and complete the deployment process.**
6
+
7
+ **Do NOT:**
8
+ - Create multiple skills in batch without testing each
9
+ - Move to next skill before current one is verified
10
+ - Skip testing because "batching is more efficient"
11
+
12
+ **The checklist below is MANDATORY for EACH skill.**
13
+
14
+
15
+ ## Skill Creation Checklist (TDD Adapted)
16
+
17
+ **IMPORTANT: Use TodoWrite to create todos for EACH checklist item below.**
18
+
19
+ ### RED Phase - Write Failing Test
20
+
21
+ - [ ] Create pressure scenarios (3+ combined pressures for discipline skills)
22
+ - [ ] Run scenarios WITHOUT skill - document baseline behavior verbatim
23
+ - [ ] Identify patterns in rationalizations/failures
24
+
25
+ ### GREEN Phase - Write Minimal Skill
26
+
27
+ - [ ] Name uses only letters, numbers, hyphens (no parentheses/special chars)
28
+ - [ ] YAML frontmatter with only name and description (max 1024 chars)
29
+ - [ ] Description starts with "Use when..." and includes specific triggers/symptoms
30
+ - [ ] Description written in third person
31
+ - [ ] Keywords throughout for search (errors, symptoms, tools)
32
+ - [ ] Clear overview with core principle
33
+ - [ ] Address specific baseline failures identified in RED
34
+ - [ ] Code inline OR link to separate file
35
+ - [ ] One excellent example (not multi-language)
36
+ - [ ] Run scenarios WITH skill - verify agents now comply
37
+
38
+ ### REFACTOR Phase - Close Loopholes
39
+
40
+ - [ ] Identify NEW rationalizations from testing
41
+ - [ ] Add explicit counters (if discipline skill)
42
+ - [ ] Build rationalization table from all test iterations
43
+ - [ ] Create red flags list
44
+ - [ ] Re-test until bulletproof
45
+
46
+ ### Quality Checks
47
+
48
+ - [ ] Small flowchart only if decision non-obvious
49
+ - [ ] Quick reference table
50
+ - [ ] Common mistakes section
51
+ - [ ] No narrative storytelling
52
+ - [ ] Supporting files only for tools or heavy reference
53
+
54
+ ### Deployment
55
+
56
+ - [ ] Commit skill to git and push to your fork (if configured)
57
+ - [ ] Consider contributing back via PR (if broadly useful)
58
+
59
+
60
+ ## Anti-Patterns
61
+
62
+ ### ❌ Narrative Example
63
+ "In a past session, we found empty projectDir caused..."
64
+ **Why bad:** Too specific, not reusable
65
+
66
+ ### ❌ Multi-Language Dilution
67
+ example-js.js, example-py.py, example-go.go
68
+ **Why bad:** Mediocre quality, maintenance burden
69
+
70
+ ### ❌ Code in Flowcharts
71
+ ```dot
72
+ step1 [label="import fs"];
73
+ step2 [label="read file"];
74
+ ```
75
+ **Why bad:** Can't copy-paste, hard to read
76
+
77
+ ### ❌ Generic Labels
78
+ helper1, helper2, step3, pattern4
79
+ **Why bad:** Labels should have semantic meaning
80
+
81
+
82
+ ## Discovery Workflow
83
+
84
+ How future Claude finds your skill:
85
+
86
+ 1. **Encounters problem** ("tests are flaky")
87
+ 3. **Finds SKILL** (description matches)
88
+ 4. **Scans overview** (is this relevant?)
89
+ 5. **Reads patterns** (quick reference table)
90
+ 6. **Loads example** (only when implementing)
91
+
92
+ **Optimize for this flow** - put searchable terms early and often.
@@ -0,0 +1,111 @@
1
+ ---
2
+ name: writing-skills
3
+ description: "Creates and maintains Claude Code skills using TDD principles for process documentation. Use when: creating new skills, editing existing skills, verifying skills work, or deploying skills. Keywords: skill creation, SKILL.md, skill authoring, agent skills"
4
+ ---
5
+
6
+ # Writing Skills
7
+
8
+ ## Overview
9
+
10
+ **Writing skills IS Test-Driven Development applied to process documentation.**
11
+
12
+ You write test cases (pressure scenarios with subagents), watch them fail (baseline behavior), write the skill (documentation), watch tests pass (agents comply), and refactor (close loopholes).
13
+
14
+ **Core principle:** If you didn't watch an agent fail without the skill, you don't know if the skill teaches the right thing.
15
+
16
+ **REQUIRED BACKGROUND:** You MUST understand superpowers:practicing-test-driven-development before using this skill.
17
+
18
+ **Official guidance:** See anthropic-best-practices.md for Anthropic's official skill authoring best practices.
19
+
20
+ ## What is a Skill?
21
+
22
+ A **skill** is a reference guide for proven techniques, patterns, or tools.
23
+
24
+ **Skills are:** Reusable techniques, patterns, tools, reference guides
25
+
26
+ **Skills are NOT:** Narratives about how you solved a problem once
27
+
28
+ ## TDD Mapping for Skills
29
+
30
+ | TDD Concept | Skill Creation |
31
+ |-------------|----------------|
32
+ | **Test case** | Pressure scenario with subagent |
33
+ | **Production code** | Skill document (SKILL.md) |
34
+ | **Test fails (RED)** | Agent violates rule without skill |
35
+ | **Test passes (GREEN)** | Agent complies with skill present |
36
+ | **Refactor** | Close loopholes while maintaining compliance |
37
+
38
+ ## When to Create a Skill
39
+
40
+ **Create when:**
41
+ - Technique wasn't intuitively obvious to you
42
+ - You'd reference this again across projects
43
+ - Pattern applies broadly (not project-specific)
44
+ - Others would benefit
45
+
46
+ **Don't create for:**
47
+ - One-off solutions
48
+ - Standard practices well-documented elsewhere
49
+ - Project-specific conventions (put in CLAUDE.md)
50
+ - Mechanical constraints (automate instead)
51
+
52
+ ## Skill Types
53
+
54
+ - **Technique:** Concrete method with steps (condition-based-waiting, root-cause-tracing)
55
+ - **Pattern:** Way of thinking about problems (flatten-with-flags, test-invariants)
56
+ - **Reference:** API docs, syntax guides, tool documentation (office docs)
57
+
58
+ ## Directory Structure
59
+
60
+ ```
61
+ skills/
62
+ skill-name/
63
+ SKILL.md # Main reference (required)
64
+ supporting-file.* # Only if needed
65
+ ```
66
+
67
+ **Flat namespace** - all skills in one searchable namespace
68
+
69
+ **Separate files for:** Heavy reference (100+ lines), reusable tools
70
+
71
+ **Keep inline:** Principles, concepts, code patterns (< 50 lines)
72
+
73
+ ## The Iron Law
74
+
75
+ ```
76
+ NO SKILL WITHOUT A FAILING TEST FIRST
77
+ ```
78
+
79
+ This applies to NEW skills AND EDITS to existing skills.
80
+
81
+ Write skill before testing? Delete it. Start over.
82
+
83
+ **REQUIRED BACKGROUND:** superpowers:practicing-test-driven-development explains why this matters.
84
+
85
+ ## Detailed Reference
86
+
87
+ For complete guidance, see these reference files:
88
+
89
+ - **[STRUCTURE.md](STRUCTURE.md)** - SKILL.md structure, CSO, flowcharts, code examples, file organization
90
+ - **[TESTING.md](TESTING.md)** - Testing skill types, rationalizations, bulletproofing, RED-GREEN-REFACTOR
91
+ - **[CHECKLIST.md](CHECKLIST.md)** - Creation checklist, anti-patterns, discovery workflow
92
+
93
+ ## Quick Reference
94
+
95
+ ```
96
+ RED Phase: Create pressure scenario → Run WITHOUT skill → Document failures
97
+ GREEN Phase: Write minimal skill → Run WITH skill → Verify compliance
98
+ REFACTOR: Find new rationalizations → Add counters → Re-test
99
+ ```
100
+
101
+ **Model tip:** Use `model: sonnet` for test execution subagents. Sonnet follows instructions well and is cost-effective for repeated testing iterations.
102
+
103
+ ## The Bottom Line
104
+
105
+ **Creating skills IS TDD for process documentation.**
106
+
107
+ Same Iron Law: No skill without failing test first.
108
+ Same cycle: RED (baseline) → GREEN (write skill) → REFACTOR (close loopholes).
109
+ Same benefits: Better quality, fewer surprises, bulletproof results.
110
+
111
+ If you follow TDD for code, follow it for skills.
@@ -0,0 +1,208 @@
1
+ # Skill Structure Reference
2
+
3
+ ## SKILL.md Structure
4
+
5
+ **Frontmatter (YAML):**
6
+ - Only two fields supported: `name` and `description`
7
+ - Max 1024 characters total
8
+ - `name`: Use letters, numbers, and hyphens only (no parentheses, special chars)
9
+ - `description`: Third-person, describes ONLY when to use (NOT what it does)
10
+ - Start with "Use when..." to focus on triggering conditions
11
+ - Include specific symptoms, situations, and contexts
12
+ - **NEVER summarize the skill's process or workflow** (see CSO section)
13
+ - Keep under 500 characters if possible
14
+
15
+ ```markdown
16
+ ---
17
+ name: Skill-Name-With-Hyphens
18
+ description: Use when [specific triggering conditions and symptoms]
19
+ ---
20
+
21
+ # Skill Name
22
+
23
+ ## Overview
24
+ What is this? Core principle in 1-2 sentences.
25
+
26
+ ## When to Use
27
+ [Small inline flowchart IF decision non-obvious]
28
+
29
+ Bullet list with SYMPTOMS and use cases
30
+ When NOT to use
31
+
32
+ ## Core Pattern (for techniques/patterns)
33
+ Before/after code comparison
34
+
35
+ ## Quick Reference
36
+ Table or bullets for scanning common operations
37
+
38
+ ## Implementation
39
+ Inline code for simple patterns
40
+ Link to file for heavy reference or reusable tools
41
+
42
+ ## Common Mistakes
43
+ What goes wrong + fixes
44
+
45
+ ## Real-World Impact (optional)
46
+ Concrete results
47
+ ```
48
+
49
+
50
+ ## Claude Search Optimization (CSO)
51
+
52
+ **Critical for discovery:** Future Claude needs to FIND your skill
53
+
54
+ ### 1. Rich Description Field
55
+
56
+ **Purpose:** Claude reads description to decide which skills to load. Make it answer: "Should I read this skill right now?"
57
+
58
+ **CRITICAL: Description = When to Use, NOT What the Skill Does**
59
+
60
+ The description should ONLY describe triggering conditions. Do NOT summarize the skill's process.
61
+
62
+ **Why this matters:** Testing revealed that when a description summarizes workflow, Claude may follow the description instead of reading the full skill content.
63
+
64
+ ```yaml
65
+ # ❌ BAD: Summarizes workflow
66
+ description: Use when executing plans - dispatches subagent per task with code review between tasks
67
+
68
+ # ✅ GOOD: Just triggering conditions
69
+ description: Use when executing implementation plans with independent tasks in the current session
70
+ ```
71
+
72
+ **Content:**
73
+ - Use concrete triggers, symptoms, and situations
74
+ - Describe the *problem* not *language-specific symptoms*
75
+ - Keep triggers technology-agnostic unless skill is technology-specific
76
+ - Write in third person
77
+ - **NEVER summarize workflow**
78
+
79
+ ### 2. Keyword Coverage
80
+
81
+ Use words Claude would search for:
82
+ - Error messages: "Hook timed out", "ENOTEMPTY", "race condition"
83
+ - Symptoms: "flaky", "hanging", "zombie", "pollution"
84
+ - Synonyms: "timeout/hang/freeze", "cleanup/teardown/afterEach"
85
+ - Tools: Actual commands, library names, file types
86
+
87
+ ### 3. Descriptive Naming
88
+
89
+ **Use active voice, verb-first:**
90
+ - ✅ `creating-skills` not `skill-creation`
91
+ - ✅ `condition-based-waiting` not `async-test-helpers`
92
+
93
+ **Gerunds (-ing) work well for processes:**
94
+ - `creating-skills`, `testing-skills`, `debugging-with-logs`
95
+
96
+ ### 4. Token Efficiency
97
+
98
+ **Target word counts:**
99
+ - getting-started workflows: <150 words each
100
+ - Frequently-loaded skills: <200 words total
101
+ - Other skills: <500 words (still be concise)
102
+
103
+ **Techniques:**
104
+
105
+ **Move details to tool help:**
106
+ ```bash
107
+ # ❌ BAD: Document all flags in SKILL.md
108
+ search-conversations supports --text, --both, --after DATE, --before DATE, --limit N
109
+
110
+ # ✅ GOOD: Reference --help
111
+ search-conversations supports multiple modes and filters. Run --help for details.
112
+ ```
113
+
114
+ **Use cross-references:**
115
+ ```markdown
116
+ # ❌ BAD: Repeat workflow details
117
+ When searching, dispatch subagent with template...
118
+ [20 lines of repeated instructions]
119
+
120
+ # ✅ GOOD: Reference other skill
121
+ Always use subagents (50-100x context savings). REQUIRED: Use [other-skill-name] for workflow.
122
+ ```
123
+
124
+ ### 5. Cross-Referencing Other Skills
125
+
126
+ Use skill name only, with explicit requirement markers:
127
+ - ✅ Good: `**REQUIRED SUB-SKILL:** Use superpowers:practicing-test-driven-development`
128
+ - ✅ Good: `**REQUIRED BACKGROUND:** You MUST understand superpowers:debugging-systematically`
129
+ - ❌ Bad: `See skills/testing/test-driven-development` (unclear if required)
130
+ - ❌ Bad: `@skills/testing/test-driven-development/SKILL.md` (force-loads, burns context)
131
+
132
+
133
+ ## Flowchart Usage
134
+
135
+ ```dot
136
+ digraph when_flowchart {
137
+ "Need to show information?" [shape=diamond];
138
+ "Decision where I might go wrong?" [shape=diamond];
139
+ "Use markdown" [shape=box];
140
+ "Small inline flowchart" [shape=box];
141
+
142
+ "Need to show information?" -> "Decision where I might go wrong?" [label="yes"];
143
+ "Decision where I might go wrong?" -> "Small inline flowchart" [label="yes"];
144
+ "Decision where I might go wrong?" -> "Use markdown" [label="no"];
145
+ }
146
+ ```
147
+
148
+ **Use flowcharts ONLY for:**
149
+ - Non-obvious decision points
150
+ - Process loops where you might stop too early
151
+ - "When to use A vs B" decisions
152
+
153
+ **Never use flowcharts for:**
154
+ - Reference material → Tables, lists
155
+ - Code examples → Markdown blocks
156
+ - Linear instructions → Numbered lists
157
+
158
+ See @graphviz-conventions.dot for graphviz style rules.
159
+
160
+
161
+ ## Code Examples
162
+
163
+ **One excellent example beats many mediocre ones**
164
+
165
+ Choose most relevant language:
166
+ - Testing techniques → TypeScript/JavaScript
167
+ - System debugging → Shell/Python
168
+ - Data processing → Python
169
+
170
+ **Good example:**
171
+ - Complete and runnable
172
+ - Well-commented explaining WHY
173
+ - From real scenario
174
+ - Shows pattern clearly
175
+ - Ready to adapt (not generic template)
176
+
177
+ **Don't:**
178
+ - Implement in 5+ languages
179
+ - Create fill-in-the-blank templates
180
+ - Write contrived examples
181
+
182
+
183
+ ## File Organization
184
+
185
+ ### Self-Contained Skill
186
+ ```
187
+ defense-in-depth/
188
+ SKILL.md # Everything inline
189
+ ```
190
+ When: All content fits, no heavy reference needed
191
+
192
+ ### Skill with Reusable Tool
193
+ ```
194
+ condition-based-waiting/
195
+ SKILL.md # Overview + patterns
196
+ example.ts # Working helpers to adapt
197
+ ```
198
+ When: Tool is reusable code, not just narrative
199
+
200
+ ### Skill with Heavy Reference
201
+ ```
202
+ pptx/
203
+ SKILL.md # Overview + workflows
204
+ pptxgenjs.md # 600 lines API reference
205
+ ooxml.md # 500 lines XML structure
206
+ scripts/ # Executable tools
207
+ ```
208
+ When: Reference material too large for inline
@@ -0,0 +1,155 @@
1
+ # Testing Skills
2
+
3
+ ## Testing All Skill Types
4
+
5
+ Different skill types need different test approaches:
6
+
7
+ ### Discipline-Enforcing Skills (rules/requirements)
8
+
9
+ **Examples:** TDD, verifying-before-completion, designing-before-coding
10
+
11
+ **Test with:**
12
+ - Academic questions: Do they understand the rules?
13
+ - Pressure scenarios: Do they comply under stress?
14
+ - Multiple pressures combined: time + sunk cost + exhaustion
15
+ - Identify rationalizations and add explicit counters
16
+
17
+ **Success criteria:** Agent follows rule under maximum pressure
18
+
19
+ ### Technique Skills (how-to guides)
20
+
21
+ **Examples:** condition-based-waiting, root-cause-tracing, defensive-programming
22
+
23
+ **Test with:**
24
+ - Application scenarios: Can they apply the technique correctly?
25
+ - Variation scenarios: Do they handle edge cases?
26
+ - Missing information tests: Do instructions have gaps?
27
+
28
+ **Success criteria:** Agent successfully applies technique to new scenario
29
+
30
+ ### Pattern Skills (mental models)
31
+
32
+ **Examples:** reducing-complexity, information-hiding concepts
33
+
34
+ **Test with:**
35
+ - Recognition scenarios: Do they recognize when pattern applies?
36
+ - Application scenarios: Can they use the mental model?
37
+ - Counter-examples: Do they know when NOT to apply?
38
+
39
+ **Success criteria:** Agent correctly identifies when/how to apply pattern
40
+
41
+ ### Reference Skills (documentation/APIs)
42
+
43
+ **Examples:** API documentation, command references, library guides
44
+
45
+ **Test with:**
46
+ - Retrieval scenarios: Can they find the right information?
47
+ - Application scenarios: Can they use what they found correctly?
48
+ - Gap testing: Are common use cases covered?
49
+
50
+ **Success criteria:** Agent finds and correctly applies reference information
51
+
52
+
53
+ ## Common Rationalizations for Skipping Testing
54
+
55
+ | Excuse | Reality |
56
+ |--------|---------|
57
+ | "Skill is obviously clear" | Clear to you ≠ clear to other agents. Test it. |
58
+ | "It's just a reference" | References can have gaps, unclear sections. Test retrieval. |
59
+ | "Testing is overkill" | Untested skills have issues. Always. 15 min testing saves hours. |
60
+ | "I'll test if problems emerge" | Problems = agents can't use skill. Test BEFORE deploying. |
61
+ | "Too tedious to test" | Testing is less tedious than debugging bad skill in production. |
62
+ | "I'm confident it's good" | Overconfidence guarantees issues. Test anyway. |
63
+ | "Academic review is enough" | Reading ≠ using. Test application scenarios. |
64
+ | "No time to test" | Deploying untested skill wastes more time fixing it later. |
65
+
66
+ **All of these mean: Test before deploying. No exceptions.**
67
+
68
+
69
+ ## Bulletproofing Skills Against Rationalization
70
+
71
+ Skills that enforce discipline need to resist rationalization. Agents are smart and will find loopholes when under pressure.
72
+
73
+ **Psychology note:** See persuasion-principles.md for research foundation (Cialdini, 2021; Meincke et al., 2025).
74
+
75
+ ### Close Every Loophole Explicitly
76
+
77
+ Don't just state the rule - forbid specific workarounds:
78
+
79
+ <Bad>
80
+ ```markdown
81
+ Write code before test? Delete it.
82
+ ```
83
+ </Bad>
84
+
85
+ <Good>
86
+ ```markdown
87
+ Write code before test? Delete it. Start over.
88
+
89
+ **No exceptions:**
90
+ - Don't keep it as "reference"
91
+ - Don't "adapt" it while writing tests
92
+ - Don't look at it
93
+ - Delete means delete
94
+ ```
95
+ </Good>
96
+
97
+ ### Address "Spirit vs Letter" Arguments
98
+
99
+ Add foundational principle early:
100
+
101
+ ```markdown
102
+ **Violating the letter of the rules is violating the spirit of the rules.**
103
+ ```
104
+
105
+ ### Build Rationalization Table
106
+
107
+ Capture rationalizations from baseline testing. Every excuse agents make goes in the table:
108
+
109
+ ```markdown
110
+ | Excuse | Reality |
111
+ |--------|---------|
112
+ | "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
113
+ | "I'll test after" | Tests passing immediately prove nothing. |
114
+ ```
115
+
116
+ ### Create Red Flags List
117
+
118
+ Make it easy for agents to self-check when rationalizing:
119
+
120
+ ```markdown
121
+ ## Red Flags - STOP and Start Over
122
+
123
+ - Code before test
124
+ - "I already manually tested it"
125
+ - "Tests after achieve the same purpose"
126
+ - "This is different because..."
127
+
128
+ **All of these mean: Delete code. Start over with TDD.**
129
+ ```
130
+
131
+
132
+ ## RED-GREEN-REFACTOR for Skills
133
+
134
+ Follow the TDD cycle:
135
+
136
+ ### RED: Write Failing Test (Baseline)
137
+
138
+ Run pressure scenario with subagent WITHOUT the skill. Document exact behavior:
139
+ - What choices did they make?
140
+ - What rationalizations did they use (verbatim)?
141
+ - Which pressures triggered violations?
142
+
143
+ This is "watch the test fail" - you must see what agents naturally do before writing the skill.
144
+
145
+ ### GREEN: Write Minimal Skill
146
+
147
+ Write skill that addresses those specific rationalizations. Don't add extra content for hypothetical cases.
148
+
149
+ Run same scenarios WITH skill. Agent should now comply.
150
+
151
+ ### REFACTOR: Close Loopholes
152
+
153
+ Agent found new rationalization? Add explicit counter. Re-test until bulletproof.
154
+
155
+ **Testing methodology:** See @testing-skills-with-subagents.md for the complete testing methodology.