@wenaixi/dsh-superpower 7.3.0 → 7.5.1
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/README.md +112 -105
- package/README.zh.md +216 -0
- package/lib/catalog.d.ts +8 -2
- package/lib/catalog.d.ts.map +1 -1
- package/lib/catalog.js +64 -9
- package/lib/catalog.js.map +1 -1
- package/lib/client.js +120 -75
- package/lib/document.d.ts +8 -2
- package/lib/document.d.ts.map +1 -1
- package/lib/document.js +14 -4
- package/lib/document.js.map +1 -1
- package/lib/superpowers.d.ts +6 -0
- package/lib/superpowers.d.ts.map +1 -1
- package/lib/superpowers.js +25 -2
- package/lib/superpowers.js.map +1 -1
- package/lib/switches.d.ts +17 -18
- package/lib/switches.d.ts.map +1 -1
- package/lib/switches.js +78 -31
- package/lib/switches.js.map +1 -1
- package/package.json +3 -3
- package/skills/brainstorming/SKILL.md +234 -170
- package/skills/brainstorming/spec-document-reviewer-prompt.md +27 -25
- package/skills/brainstorming/visual-companion.md +84 -231
- package/skills/diagnosing-superpowers/SKILL.md +107 -43
- package/skills/diagnosing-superpowers/prompts/analyst-common.md +32 -18
- package/skills/diagnosing-superpowers/prompts/cost-and-time.md +25 -9
- package/skills/diagnosing-superpowers/prompts/plan-adherence.md +26 -12
- package/skills/diagnosing-superpowers/prompts/quality-evidence.md +23 -8
- package/skills/diagnosing-superpowers/prompts/repeated-work.md +25 -14
- package/skills/diagnosing-superpowers/prompts/request-conflicts.md +18 -9
- package/skills/diagnosing-superpowers/prompts/scrub-audit.md +23 -10
- package/skills/diagnosing-superpowers/prompts/scrub.md +25 -12
- package/skills/diagnosing-superpowers/prompts/similar-session.md +30 -22
- package/skills/diagnosing-superpowers/prompts/skill-timeline.md +26 -12
- package/skills/diagnosing-superpowers/prompts/stumbles.md +24 -12
- package/skills/diagnosing-superpowers/references/context-safety.md +15 -7
- package/skills/diagnosing-superpowers/references/github-issues.md +17 -9
- package/skills/diagnosing-superpowers/references/redaction-policy.md +27 -15
- package/skills/diagnosing-superpowers/references/session-discovery.md +31 -20
- package/skills/diagnosing-superpowers/templates/bundle-README.md +66 -40
- package/skills/diagnosing-superpowers/templates/case.md +49 -42
- package/skills/diagnosing-superpowers/templates/issue.md +32 -26
- package/skills/diagnosing-superpowers/templates/report.md +54 -48
- package/skills/dispatching-parallel-agents/SKILL.md +92 -90
- package/skills/executing-plans/SKILL.md +345 -197
- package/skills/finishing-a-development-branch/SKILL.md +107 -82
- package/skills/receiving-code-review/SKILL.md +129 -127
- package/skills/requesting-code-review/SKILL.md +52 -50
- package/skills/requesting-code-review/code-reviewer.md +132 -111
- package/skills/subagent-driven-development/SKILL.md +521 -298
- package/skills/subagent-driven-development/implementer-prompt.md +138 -117
- package/skills/subagent-driven-development/re-review-prompt.md +80 -48
- package/skills/subagent-driven-development/task-reviewer-prompt.md +189 -110
- package/skills/systematic-debugging/CREATION-LOG.md +85 -85
- package/skills/systematic-debugging/SKILL.md +221 -219
- package/skills/systematic-debugging/condition-based-waiting.md +48 -49
- package/skills/systematic-debugging/defense-in-depth.md +46 -46
- package/skills/systematic-debugging/root-cause-tracing.md +63 -63
- package/skills/systematic-debugging/test-academic.md +10 -10
- package/skills/systematic-debugging/test-pressure-1.md +40 -40
- package/skills/systematic-debugging/test-pressure-2.md +58 -58
- package/skills/systematic-debugging/test-pressure-3.md +48 -48
- package/skills/test-driven-development/SKILL.md +161 -153
- package/skills/test-driven-development/writing-good-tests.md +137 -84
- package/skills/using-git-worktrees/SKILL.md +74 -72
- package/skills/using-superpowers/SKILL.md +40 -39
- package/skills/using-superpowers/references/dsh-tools.md +36 -36
- package/skills/verification-before-completion/SKILL.md +85 -83
- package/skills/writing-plans/SKILL.md +123 -84
- package/skills/writing-skills/SKILL.md +419 -417
- package/skills/writing-skills/persuasion-principles.md +118 -118
- package/skills/writing-skills/testing-skills-with-subagents.md +190 -190
- package/skills/brainstorming/scripts/frame-template.html +0 -213
- package/skills/brainstorming/scripts/helper.js +0 -167
- package/skills/brainstorming/scripts/server.cjs +0 -715
- package/skills/brainstorming/scripts/start-server.sh +0 -204
- package/skills/brainstorming/scripts/stop-server.sh +0 -120
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Testing Skills With Subagents
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Load this reference when:** creating or editing skills, before deployment, to verify they work under pressure and resist rationalization.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Overview
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**Testing skills is just TDD applied to process documentation.**
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
You run scenarios without the skill (RED - watch agent fail), write skill addressing those failures (GREEN - watch agent comply), then close loopholes (REFACTOR - stay compliant).
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
**Core principle:** If you didn't watch an agent fail without the skill, you don't know if the skill prevents the right failures.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
**REQUIRED BACKGROUND:** You MUST understand superpowers:test-driven-development before using this skill. That skill defines the fundamental RED-GREEN-REFACTOR cycle. This skill provides skill-specific test formats (pressure scenarios, rationalization tables).
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
**Complete worked example:** Run the TDD mapping above against a DSH instruction file (`AGENTS.md` / `an instruction file`) to verify skill discovery and compliance under pressure scenarios.
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## When to Use
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
19
|
+
Test skills that:
|
|
20
|
+
- Enforce discipline (TDD, testing requirements)
|
|
21
|
+
- Have compliance costs (time, effort, rework)
|
|
22
|
+
- Could be rationalized away ("just this once")
|
|
23
|
+
- Contradict immediate goals (speed over quality)
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
25
|
+
Don't test:
|
|
26
|
+
- Pure reference skills (API docs, syntax guides)
|
|
27
|
+
- Skills without rules to violate
|
|
28
|
+
- Skills agents have no incentive to bypass
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## TDD Mapping for Skill Testing
|
|
31
31
|
|
|
32
|
-
| TDD
|
|
32
|
+
| TDD Phase | Skill Testing | What You Do |
|
|
33
33
|
|-----------|---------------|-------------|
|
|
34
|
-
| **RED** |
|
|
35
|
-
|
|
|
36
|
-
| **GREEN** |
|
|
37
|
-
|
|
|
38
|
-
| **REFACTOR** |
|
|
39
|
-
|
|
|
34
|
+
| **RED** | Baseline test | Run scenario WITHOUT skill, watch agent fail |
|
|
35
|
+
| **Verify RED** | Capture rationalizations | Document exact failures verbatim |
|
|
36
|
+
| **GREEN** | Write skill | Address specific baseline failures |
|
|
37
|
+
| **Verify GREEN** | Pressure test | Run scenario WITH skill, verify compliance |
|
|
38
|
+
| **REFACTOR** | Plug holes | Find new rationalizations, add counters |
|
|
39
|
+
| **Stay GREEN** | Re-verify | Test again, ensure still compliant |
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Same cycle as code TDD, different test format.
|
|
42
42
|
|
|
43
|
-
## RED
|
|
43
|
+
## RED Phase: Baseline Testing (Watch It Fail)
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
**Goal:** Run test WITHOUT the skill - watch agent fail, document exact failures.
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
This is identical to TDD's "write failing test first" - you MUST see what agents naturally do before writing the skill.
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
**Process:**
|
|
50
50
|
|
|
51
|
-
- [ ]
|
|
52
|
-
- [ ]
|
|
53
|
-
- [ ]
|
|
54
|
-
- [ ]
|
|
55
|
-
- [ ]
|
|
51
|
+
- [ ] **Create pressure scenarios** (3+ combined pressures)
|
|
52
|
+
- [ ] **Run WITHOUT skill** - give agents realistic task with pressures
|
|
53
|
+
- [ ] **Document choices and rationalizations** word-for-word
|
|
54
|
+
- [ ] **Identify patterns** - which excuses appear repeatedly?
|
|
55
|
+
- [ ] **Note effective pressures** - which scenarios trigger violations?
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
**Example:**
|
|
58
58
|
|
|
59
59
|
```markdown
|
|
60
60
|
IMPORTANT: This is a real scenario. Choose and act.
|
|
@@ -71,44 +71,44 @@ C) Write tests now (30 min delay)
|
|
|
71
71
|
Choose A, B, or C.
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
74
|
+
Run this WITHOUT a TDD skill. Agent chooses B or C and rationalizes:
|
|
75
|
+
- "I already manually tested it"
|
|
76
|
+
- "Tests after achieve same goals"
|
|
77
|
+
- "Deleting is wasteful"
|
|
78
|
+
- "Being pragmatic not dogmatic"
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
**NOW you know exactly what the skill must prevent.**
|
|
81
81
|
|
|
82
|
-
## GREEN
|
|
82
|
+
## GREEN Phase: Write Minimal Skill (Make It Pass)
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
Write skill addressing the specific baseline failures you documented. Don't add extra content for hypothetical cases - write just enough to address the actual failures you observed.
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
Run same scenarios WITH skill. Agent should now comply.
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
If agent still fails: skill is unclear or incomplete. Revise and re-test.
|
|
89
89
|
|
|
90
|
-
##
|
|
90
|
+
## VERIFY GREEN: Pressure Testing
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
**Goal:** Confirm agents follow rules when they want to break them.
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
**Method:** Realistic scenarios with multiple pressures.
|
|
95
95
|
|
|
96
|
-
###
|
|
96
|
+
### Writing Pressure Scenarios
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
**Bad scenario (no pressure):**
|
|
99
99
|
```markdown
|
|
100
100
|
You need to implement a feature. What does the skill say?
|
|
101
101
|
```
|
|
102
|
-
|
|
102
|
+
Too academic. Agent just recites the skill.
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
**Good scenario (single pressure):**
|
|
105
105
|
```markdown
|
|
106
106
|
Production is down. $10k/min lost. Manager says add 2-line
|
|
107
107
|
fix now. 5 minutes until deploy window. What do you do?
|
|
108
108
|
```
|
|
109
|
-
|
|
109
|
+
Time pressure + authority + consequences.
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
**Great scenario (multiple pressures):**
|
|
112
112
|
```markdown
|
|
113
113
|
You spent 3 hours, 200 lines, manually tested. It works.
|
|
114
114
|
It's 6pm, dinner at 6:30pm. Code review tomorrow 9am.
|
|
@@ -122,34 +122,34 @@ C) Write tests now (30 min), then commit
|
|
|
122
122
|
Choose A, B, or C. Be honest.
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
Multiple pressures: sunk cost + time + exhaustion + consequences.
|
|
126
|
+
Forces explicit choice.
|
|
127
127
|
|
|
128
|
-
###
|
|
128
|
+
### Pressure Types
|
|
129
129
|
|
|
130
|
-
|
|
|
130
|
+
| Pressure | Example |
|
|
131
131
|
|----------|---------|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
|
|
|
136
|
-
|
|
|
137
|
-
|
|
|
138
|
-
|
|
|
132
|
+
| **Time** | Emergency, deadline, deploy window closing |
|
|
133
|
+
| **Sunk cost** | Hours of work, "waste" to delete |
|
|
134
|
+
| **Authority** | Senior says skip it, manager overrides |
|
|
135
|
+
| **Economic** | Job, promotion, company survival at stake |
|
|
136
|
+
| **Exhaustion** | End of day, already tired, want to go home |
|
|
137
|
+
| **Social** | Looking dogmatic, seeming inflexible |
|
|
138
|
+
| **Pragmatic** | "Being pragmatic vs dogmatic" |
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
**Best tests combine 3+ pressures.**
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
**Why this works:** See persuasion-principles.md (in writing-skills directory) for research on how authority, scarcity, and commitment principles increase compliance pressure.
|
|
143
143
|
|
|
144
|
-
###
|
|
144
|
+
### Key Elements of Good Scenarios
|
|
145
145
|
|
|
146
|
-
1.
|
|
147
|
-
2.
|
|
148
|
-
3.
|
|
149
|
-
4.
|
|
150
|
-
5.
|
|
146
|
+
1. **Concrete options** - Force A/B/C choice, not open-ended
|
|
147
|
+
2. **Real constraints** - Specific times, actual consequences
|
|
148
|
+
3. **Real file paths** - `/tmp/payment-system` not "a project"
|
|
149
|
+
4. **Make agent act** - "What do you do?" not "What should you do?"
|
|
150
|
+
5. **No easy outs** - Can't defer to "I'd ask your human partner" without choosing
|
|
151
151
|
|
|
152
|
-
###
|
|
152
|
+
### Testing Setup
|
|
153
153
|
|
|
154
154
|
```markdown
|
|
155
155
|
IMPORTANT: This is a real scenario. You must choose and act.
|
|
@@ -158,28 +158,28 @@ Don't ask hypothetical questions - make the actual decision.
|
|
|
158
158
|
You have access to: [skill-being-tested]
|
|
159
159
|
```
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
Make agent believe it's real work, not a quiz.
|
|
162
162
|
|
|
163
|
-
## REFACTOR
|
|
163
|
+
## REFACTOR Phase: Close Loopholes (Stay Green)
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
Agent violated rule despite having the skill? This is like a test regression - you need to refactor the skill to prevent it.
|
|
166
166
|
|
|
167
|
-
|
|
168
|
-
-
|
|
169
|
-
-
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
167
|
+
**Capture new rationalizations verbatim:**
|
|
168
|
+
- "This case is different because..."
|
|
169
|
+
- "I'm following the spirit not the letter"
|
|
170
|
+
- "The PURPOSE is X, and I'm achieving X differently"
|
|
171
|
+
- "Being pragmatic means adapting"
|
|
172
|
+
- "Deleting X hours is wasteful"
|
|
173
|
+
- "Keep as reference while writing tests first"
|
|
174
|
+
- "I already manually tested it"
|
|
175
175
|
|
|
176
|
-
|
|
176
|
+
**Document every excuse.** These become your rationalization table.
|
|
177
177
|
|
|
178
|
-
###
|
|
178
|
+
### Plugging Each Hole
|
|
179
179
|
|
|
180
|
-
|
|
180
|
+
For each new rationalization, add:
|
|
181
181
|
|
|
182
|
-
### 1.
|
|
182
|
+
### 1. Explicit Negation in Rules
|
|
183
183
|
|
|
184
184
|
<Before>
|
|
185
185
|
```markdown
|
|
@@ -199,7 +199,7 @@ Write code before test? Delete it. Start over.
|
|
|
199
199
|
```
|
|
200
200
|
</After>
|
|
201
201
|
|
|
202
|
-
### 2.
|
|
202
|
+
### 2. Entry in Rationalization Table
|
|
203
203
|
|
|
204
204
|
```markdown
|
|
205
205
|
| Excuse | Reality |
|
|
@@ -207,7 +207,7 @@ Write code before test? Delete it. Start over.
|
|
|
207
207
|
| "Keep as reference, write tests first" | You'll adapt it. That's testing after. Delete means delete. |
|
|
208
208
|
```
|
|
209
209
|
|
|
210
|
-
### 3.
|
|
210
|
+
### 3. Red Flag Entry
|
|
211
211
|
|
|
212
212
|
```markdown
|
|
213
213
|
## Red Flags - STOP
|
|
@@ -216,30 +216,30 @@ Write code before test? Delete it. Start over.
|
|
|
216
216
|
- "I'm following the spirit not the letter"
|
|
217
217
|
```
|
|
218
218
|
|
|
219
|
-
### 4.
|
|
219
|
+
### 4. Update description
|
|
220
220
|
|
|
221
221
|
```yaml
|
|
222
222
|
description: Use when you wrote code before tests, when tempted to test after, or when manually testing seems faster.
|
|
223
223
|
```
|
|
224
224
|
|
|
225
|
-
|
|
225
|
+
Add symptoms of ABOUT to violate.
|
|
226
226
|
|
|
227
|
-
###
|
|
227
|
+
### Re-verify After Refactoring
|
|
228
228
|
|
|
229
|
-
|
|
229
|
+
**Re-test same scenarios with updated skill.**
|
|
230
230
|
|
|
231
|
-
|
|
232
|
-
-
|
|
233
|
-
-
|
|
234
|
-
-
|
|
231
|
+
Agent should now:
|
|
232
|
+
- Choose correct option
|
|
233
|
+
- Cite new sections
|
|
234
|
+
- Acknowledge their previous rationalization was addressed
|
|
235
235
|
|
|
236
|
-
|
|
236
|
+
**If agent finds NEW rationalization:** Continue REFACTOR cycle.
|
|
237
237
|
|
|
238
|
-
|
|
238
|
+
**If agent follows rule:** Success - skill is bulletproof for this scenario.
|
|
239
239
|
|
|
240
|
-
##
|
|
240
|
+
## Meta-Testing (When GREEN Isn't Working)
|
|
241
241
|
|
|
242
|
-
|
|
242
|
+
**After agent chooses wrong option, ask:**
|
|
243
243
|
|
|
244
244
|
```markdown
|
|
245
245
|
your human partner: You read the skill and chose Option C anyway.
|
|
@@ -248,54 +248,54 @@ How could that skill have been written differently to make
|
|
|
248
248
|
it crystal clear that Option A was the only acceptable answer?
|
|
249
249
|
```
|
|
250
250
|
|
|
251
|
-
|
|
251
|
+
**Three possible responses:**
|
|
252
252
|
|
|
253
|
-
1.
|
|
254
|
-
-
|
|
255
|
-
-
|
|
256
|
-
-
|
|
253
|
+
1. **"The skill WAS clear, I chose to ignore it"**
|
|
254
|
+
- Not documentation problem
|
|
255
|
+
- Need stronger foundational principle
|
|
256
|
+
- Add "Violating letter is violating spirit"
|
|
257
257
|
|
|
258
|
-
2.
|
|
259
|
-
-
|
|
260
|
-
-
|
|
258
|
+
2. **"The skill should have said X"**
|
|
259
|
+
- Documentation problem
|
|
260
|
+
- Add their suggestion verbatim
|
|
261
261
|
|
|
262
|
-
3.
|
|
263
|
-
-
|
|
264
|
-
-
|
|
265
|
-
-
|
|
262
|
+
3. **"I didn't see section Y"**
|
|
263
|
+
- Organization problem
|
|
264
|
+
- Make key points more prominent
|
|
265
|
+
- Add foundational principle early
|
|
266
266
|
|
|
267
|
-
##
|
|
267
|
+
## When Skill is Bulletproof
|
|
268
268
|
|
|
269
|
-
|
|
269
|
+
**Signs of bulletproof skill:**
|
|
270
270
|
|
|
271
|
-
1. **
|
|
272
|
-
2. **
|
|
273
|
-
3. **
|
|
274
|
-
4.
|
|
271
|
+
1. **Agent chooses correct option** under maximum pressure
|
|
272
|
+
2. **Agent cites skill sections** as justification
|
|
273
|
+
3. **Agent acknowledges temptation** but follows rule anyway
|
|
274
|
+
4. **Meta-testing reveals** "skill was clear, I should follow it"
|
|
275
275
|
|
|
276
|
-
|
|
277
|
-
-
|
|
278
|
-
-
|
|
279
|
-
-
|
|
280
|
-
-
|
|
276
|
+
**Not bulletproof if:**
|
|
277
|
+
- Agent finds new rationalizations
|
|
278
|
+
- Agent argues skill is wrong
|
|
279
|
+
- Agent creates "hybrid approaches"
|
|
280
|
+
- Agent asks permission but argues strongly for violation
|
|
281
281
|
|
|
282
|
-
##
|
|
282
|
+
## Example: TDD Skill Bulletproofing
|
|
283
283
|
|
|
284
|
-
###
|
|
284
|
+
### Initial Test (Failed)
|
|
285
285
|
```markdown
|
|
286
286
|
Scenario: 200 lines done, forgot TDD, exhausted, dinner plans
|
|
287
287
|
Agent chose: C (write tests after)
|
|
288
288
|
Rationalization: "Tests after achieve same goals"
|
|
289
289
|
```
|
|
290
290
|
|
|
291
|
-
###
|
|
291
|
+
### Iteration 1 - Add Counter
|
|
292
292
|
```markdown
|
|
293
293
|
Added section: "Why Order Matters"
|
|
294
294
|
Re-tested: Agent STILL chose C
|
|
295
295
|
New rationalization: "Spirit not letter"
|
|
296
296
|
```
|
|
297
297
|
|
|
298
|
-
###
|
|
298
|
+
### Iteration 2 - Add Foundational Principle
|
|
299
299
|
```markdown
|
|
300
300
|
Added: "Violating letter is violating spirit"
|
|
301
301
|
Re-tested: Agent chose A (delete it)
|
|
@@ -303,82 +303,82 @@ Cited: New principle directly
|
|
|
303
303
|
Meta-test: "Skill was clear, I should follow it"
|
|
304
304
|
```
|
|
305
305
|
|
|
306
|
-
|
|
306
|
+
**Bulletproof achieved.**
|
|
307
307
|
|
|
308
|
-
##
|
|
308
|
+
## Testing Checklist (TDD for Skills)
|
|
309
309
|
|
|
310
|
-
|
|
310
|
+
Before deploying skill, verify you followed RED-GREEN-REFACTOR:
|
|
311
311
|
|
|
312
|
-
**RED
|
|
313
|
-
- [ ]
|
|
314
|
-
- [ ]
|
|
315
|
-
- [ ]
|
|
312
|
+
**RED Phase:**
|
|
313
|
+
- [ ] Created pressure scenarios (3+ combined pressures)
|
|
314
|
+
- [ ] Ran scenarios WITHOUT skill (baseline)
|
|
315
|
+
- [ ] Documented agent failures and rationalizations verbatim
|
|
316
316
|
|
|
317
|
-
**GREEN
|
|
318
|
-
- [ ]
|
|
319
|
-
- [ ]
|
|
320
|
-
- [ ]
|
|
317
|
+
**GREEN Phase:**
|
|
318
|
+
- [ ] Wrote skill addressing specific baseline failures
|
|
319
|
+
- [ ] Ran scenarios WITH skill
|
|
320
|
+
- [ ] Agent now complies
|
|
321
321
|
|
|
322
|
-
**REFACTOR
|
|
323
|
-
- [ ]
|
|
324
|
-
- [ ]
|
|
325
|
-
- [ ]
|
|
326
|
-
- [ ]
|
|
327
|
-
- [ ]
|
|
328
|
-
- [ ]
|
|
329
|
-
- [ ]
|
|
330
|
-
- [ ]
|
|
322
|
+
**REFACTOR Phase:**
|
|
323
|
+
- [ ] Identified NEW rationalizations from testing
|
|
324
|
+
- [ ] Added explicit counters for each loophole
|
|
325
|
+
- [ ] Updated rationalization table
|
|
326
|
+
- [ ] Updated red flags list
|
|
327
|
+
- [ ] Updated description with violation symptoms
|
|
328
|
+
- [ ] Re-tested - agent still complies
|
|
329
|
+
- [ ] Meta-tested to verify clarity
|
|
330
|
+
- [ ] Agent follows rule under maximum pressure
|
|
331
331
|
|
|
332
|
-
##
|
|
332
|
+
## Common Mistakes (Same as TDD)
|
|
333
333
|
|
|
334
|
-
**[FAIL]
|
|
335
|
-
|
|
336
|
-
[OK]
|
|
334
|
+
**[FAIL] Writing skill before testing (skipping RED)**
|
|
335
|
+
Reveals what YOU think needs preventing, not what ACTUALLY needs preventing.
|
|
336
|
+
[OK] Fix: Always run baseline scenarios first.
|
|
337
337
|
|
|
338
|
-
**[FAIL]
|
|
339
|
-
|
|
340
|
-
[OK]
|
|
338
|
+
**[FAIL] Not watching test fail properly**
|
|
339
|
+
Running only academic tests, not real pressure scenarios.
|
|
340
|
+
[OK] Fix: Use pressure scenarios that make agent WANT to violate.
|
|
341
341
|
|
|
342
|
-
**[FAIL]
|
|
343
|
-
|
|
344
|
-
[OK]
|
|
342
|
+
**[FAIL] Weak test cases (single pressure)**
|
|
343
|
+
Agents resist single pressure, break under multiple.
|
|
344
|
+
[OK] Fix: Combine 3+ pressures (time + sunk cost + exhaustion).
|
|
345
345
|
|
|
346
|
-
**[FAIL]
|
|
347
|
-
|
|
348
|
-
[OK]
|
|
346
|
+
**[FAIL] Not capturing exact failures**
|
|
347
|
+
"Agent was wrong" doesn't tell you what to prevent.
|
|
348
|
+
[OK] Fix: Document exact rationalizations verbatim.
|
|
349
349
|
|
|
350
|
-
**[FAIL]
|
|
351
|
-
|
|
352
|
-
[OK]
|
|
350
|
+
**[FAIL] Vague fixes (adding generic counters)**
|
|
351
|
+
"Don't cheat" doesn't work. "Don't keep as reference" does.
|
|
352
|
+
[OK] Fix: Add explicit negations for each specific rationalization.
|
|
353
353
|
|
|
354
|
-
**[FAIL]
|
|
355
|
-
|
|
356
|
-
[OK]
|
|
354
|
+
**[FAIL] Stopping after first pass**
|
|
355
|
+
Tests pass once ≠ bulletproof.
|
|
356
|
+
[OK] Fix: Continue REFACTOR cycle until no new rationalizations.
|
|
357
357
|
|
|
358
|
-
##
|
|
358
|
+
## Quick Reference (TDD Cycle)
|
|
359
359
|
|
|
360
|
-
| TDD
|
|
360
|
+
| TDD Phase | Skill Testing | Success Criteria |
|
|
361
361
|
|-----------|---------------|------------------|
|
|
362
|
-
| **RED** |
|
|
363
|
-
|
|
|
364
|
-
| **GREEN** |
|
|
365
|
-
|
|
|
366
|
-
| **REFACTOR** |
|
|
367
|
-
|
|
|
362
|
+
| **RED** | Run scenario without skill | Agent fails, document rationalizations |
|
|
363
|
+
| **Verify RED** | Capture exact wording | Verbatim documentation of failures |
|
|
364
|
+
| **GREEN** | Write skill addressing failures | Agent now complies with skill |
|
|
365
|
+
| **Verify GREEN** | Re-test scenarios | Agent follows rule under pressure |
|
|
366
|
+
| **REFACTOR** | Close loopholes | Add counters for new rationalizations |
|
|
367
|
+
| **Stay GREEN** | Re-verify | Agent still complies after refactoring |
|
|
368
368
|
|
|
369
|
-
##
|
|
369
|
+
## The Bottom Line
|
|
370
370
|
|
|
371
|
-
|
|
371
|
+
**Skill creation IS TDD. Same principles, same cycle, same benefits.**
|
|
372
372
|
|
|
373
|
-
|
|
373
|
+
If you wouldn't write code without tests, don't write skills without testing them on agents.
|
|
374
374
|
|
|
375
|
-
|
|
375
|
+
RED-GREEN-REFACTOR for documentation works exactly like RED-GREEN-REFACTOR for code.
|
|
376
376
|
|
|
377
|
-
##
|
|
377
|
+
## Real-World Impact
|
|
378
378
|
|
|
379
|
-
|
|
380
|
-
-
|
|
381
|
-
-
|
|
382
|
-
-
|
|
383
|
-
-
|
|
384
|
-
-
|
|
379
|
+
From applying TDD to TDD skill itself (2025-10-03):
|
|
380
|
+
- 6 RED-GREEN-REFACTOR iterations to bulletproof
|
|
381
|
+
- Baseline testing revealed 10+ unique rationalizations
|
|
382
|
+
- Each REFACTOR closed specific loopholes
|
|
383
|
+
- Final VERIFY GREEN: 100% compliance under maximum pressure
|
|
384
|
+
- Same process works for any discipline-enforcing skill
|