@leejungkiin/awkit 1.4.3 → 1.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.
Files changed (64) hide show
  1. package/README.md +38 -14
  2. package/bin/awk.js +438 -86
  3. package/bin/claude-generators.js +3 -1
  4. package/bin/cline-generators.js +3 -1
  5. package/bin/codex-generators.js +7 -2
  6. package/core/orchestrator.md +17 -3
  7. package/core/skill-runtime-manifest.json +37 -0
  8. package/package.json +2 -2
  9. package/skill-packs/creator-studio/README.md +19 -0
  10. package/skill-packs/creator-studio/pack.json +10 -0
  11. package/skill-packs/marketing/README.md +64 -0
  12. package/skill-packs/marketing/pack.json +37 -0
  13. package/skill-packs/mobile-android/README.md +16 -0
  14. package/skill-packs/mobile-android/pack.json +10 -0
  15. package/skill-packs/mobile-ios/README.md +22 -0
  16. package/skill-packs/mobile-ios/pack.json +16 -0
  17. package/skill-packs/neural-memory/pack.json +8 -2
  18. package/skill-packs/superpowers/pack.json +1 -0
  19. package/skill-packs/superpowers/skills/single-flow-task-execution/SKILL.md +59 -358
  20. package/skill-packs/superpowers/skills/writing-skills/SKILL.md +60 -654
  21. package/skill-packs/superpowers/skills/writing-skills/examples/anti-rationalization.md +75 -0
  22. package/skill-packs/superpowers/skills/writing-skills/examples/cso-optimization.md +67 -0
  23. package/skill-packs/superpowers/skills/writing-skills/examples/tdd-for-skills.md +63 -0
  24. package/skills/CATALOG.md +49 -44
  25. package/skills/brainstorm-agent/SKILL.md +55 -315
  26. package/skills/brainstorm-agent/templates/brief-template.md +76 -0
  27. package/skills/codex-conductor/SKILL.md +55 -259
  28. package/skills/codex-conductor/examples/prompt-templates.md +72 -0
  29. package/skills/module-spec-writer/SKILL.md +38 -365
  30. package/skills/module-spec-writer/examples/port-migration-mode.md +40 -0
  31. package/skills/module-spec-writer/templates/module-spec-template.md +118 -0
  32. package/skills/orchestrator/SKILL.md +17 -8
  33. package/skills/single-flow-task-execution/SKILL.md +56 -363
  34. package/skills/single-flow-task-execution/examples/workflow-example.md +91 -0
  35. package/skills/smali-to-kotlin/SKILL.md +23 -416
  36. package/skills/smali-to-kotlin/examples/getting-started/tech-stack.md +58 -0
  37. package/skills/smali-to-kotlin/examples/pipeline/data-ui-parity.md +118 -0
  38. package/skills/smali-to-kotlin/examples/pipeline/scanner-and-bootstrap.md +106 -0
  39. package/skills/smali-to-swift/SKILL.md +18 -621
  40. package/skills/smali-to-swift/examples/getting-started/tech-stack.md +72 -0
  41. package/skills/smali-to-swift/examples/getting-started/toolchain.md +32 -0
  42. package/skills/smali-to-swift/examples/pipeline/core-logic.md +45 -0
  43. package/skills/smali-to-swift/examples/pipeline/data-layer.md +76 -0
  44. package/skills/smali-to-swift/examples/pipeline/framework-scanner.md +73 -0
  45. package/skills/smali-to-swift/examples/pipeline/project-bootstrap.md +76 -0
  46. package/skills/smali-to-swift/examples/pipeline/sdk-integration.md +66 -0
  47. package/skills/smali-to-swift/examples/pipeline/ui-viewmodel.md +96 -0
  48. package/skills/smali-to-swift/references/objc-to-swift-mapping.md +57 -0
  49. package/skills/spec-gate/SKILL.md +51 -265
  50. package/skills/spec-gate/templates/design-templates.md +93 -0
  51. package/skills/symphony-enforcer/SKILL.md +24 -555
  52. package/skills/symphony-enforcer/examples/startup-protocol.md +92 -0
  53. package/skills/symphony-enforcer/examples/task-completion.md +100 -0
  54. package/skills/symphony-enforcer/examples/three-phase.md +107 -0
  55. package/skills/symphony-enforcer/examples/trigger-points.md +99 -0
  56. package/skills/symphony-orchestrator/SKILL.md +1 -1
  57. package/skills/writing-skills/SKILL.md +82 -70
  58. package/skills/writing-skills/examples/anti-rationalization.md +53 -0
  59. package/skills/writing-skills/examples/cso-optimization.md +52 -0
  60. package/skills/writing-skills/examples/tdd-for-skills.md +48 -0
  61. package/templates/help.html +447 -0
  62. package/skills/memory-sync/SKILL.md +0 -424
  63. package/skills/memory-sync/memory-router.md +0 -185
  64. package/skills/memory-sync/memory-templates.md +0 -201
@@ -1,716 +1,122 @@
1
1
  ---
2
2
  name: writing-skills
3
- description: Use when creating new skills, editing existing skills, or verifying skills work before deployment
3
+ description: Use when creating or updating AWKit skills or workflow documentation and you need a lean, searchable, testable skill structure.
4
4
  ---
5
5
 
6
- # Writing Skills
6
+ # Writing Skills — Router
7
7
 
8
8
  ## Overview
9
9
 
10
10
  **Writing skills IS Test-Driven Development applied to process documentation.**
11
11
 
12
- **Personal skills live in agent-specific directories (`~/.gemini/skills` for Antigravity)**
12
+ Write pressure scenarios, observe failure, write the minimum useful skill, then close loopholes without bloating the main file.
13
13
 
14
- You write test cases (pressure scenarios with explicit task execution), watch them fail (baseline behavior), write the skill (documentation), watch tests pass (agents comply), and refactor (close loopholes).
14
+ **Core principle:** If you did not watch an agent fail without the skill, you do not know whether the skill teaches the right behavior.
15
15
 
16
- **Core principle:** If you didn't watch an agent fail without the skill, you don't know if the skill teaches the right thing.
17
-
18
- **REQUIRED BACKGROUND:** You MUST understand `.agent/skills/test-driven-development/SKILL.md` before using this skill. That skill defines the fundamental RED-GREEN-REFACTOR cycle. This skill adapts TDD to documentation.
19
-
20
- **Official guidance:** For Antigravity's official skill authoring best practices, see antigravity-best-practices.md. This document provides additional patterns and guidelines that complement the TDD-focused approach in this skill.
16
+ **Required background:** `test-driven-development` from the same `superpowers` pack when you need the full RED-GREEN-REFACTOR discipline.
21
17
 
22
18
  ## What is a Skill?
23
19
 
24
- A **skill** is a reference guide for proven techniques, patterns, or tools. Skills help future Antigravity sessions find and apply effective approaches.
25
-
26
20
  **Skills are:** Reusable techniques, patterns, tools, reference guides
21
+ **Skills are not:** Session narratives or one-off implementation logs
27
22
 
28
- **Skills are NOT:** Narratives about how you solved a problem once
29
-
30
- ## TDD Mapping for Skills
31
-
32
- | TDD Concept | Skill Creation |
33
- | ----------------------- | ------------------------------------------------ |
34
- | **Test case** | Pressure scenario with explicit task execution |
35
- | **Production code** | Skill document (SKILL.md) |
36
- | **Test fails (RED)** | Agent violates rule without skill (baseline) |
37
- | **Test passes (GREEN)** | Agent complies with skill present |
38
- | **Refactor** | Close loopholes while maintaining compliance |
39
- | **Write test first** | Run baseline scenario BEFORE writing skill |
40
- | **Watch it fail** | Document exact rationalizations agent uses |
41
- | **Minimal code** | Write skill addressing those specific violations |
42
- | **Watch it pass** | Verify agent now complies |
43
- | **Refactor cycle** | Find new rationalizations → plug → re-verify |
44
-
45
- The entire skill creation process follows RED-GREEN-REFACTOR.
46
-
47
- ## When to Create a Skill
48
-
49
- **Create when:**
50
-
51
- - Technique wasn't intuitively obvious to you
52
- - You'd reference this again across projects
53
- - Pattern applies broadly (not project-specific)
54
- - Others would benefit
55
-
56
- **Don't create for:**
57
-
58
- - One-off solutions
59
- - Standard practices well-documented elsewhere
60
- - Project-specific conventions (put in `.agent/AGENTS.md`)
61
- - Mechanical constraints (if it's enforceable with regex/validation, automate it—save documentation for judgment calls)
62
-
63
- ## Skill Types
64
-
65
- ### Technique
66
-
67
- Concrete method with steps to follow (condition-based-waiting, root-cause-tracing)
68
-
69
- ### Pattern
23
+ ### Skill Types
70
24
 
71
- Way of thinking about problems (flatten-with-flags, test-invariants)
25
+ - **Technique** Concrete method with steps
26
+ - **Pattern** — Decision framework or mental model
27
+ - **Reference** — API docs, syntax guides, environment-specific notes
72
28
 
73
- ### Reference
29
+ ## Topic Index
74
30
 
75
- API docs, syntax guides, tool documentation (office docs)
76
-
77
- ## Directory Structure
78
-
79
- ```
80
- skills/
81
- skill-name/
82
- SKILL.md # Main reference (required)
83
- supporting-file.* # Only if needed
84
- ```
85
-
86
- **Flat namespace** - all skills in one searchable namespace
87
-
88
- **Separate files for:**
89
-
90
- 1. **Heavy reference** (100+ lines) - API docs, comprehensive syntax
91
- 2. **Reusable tools** - Scripts, utilities, templates
92
-
93
- **Keep inline:**
94
-
95
- - Principles and concepts
96
- - Code patterns (< 50 lines)
97
- - Everything else
31
+ | Topic | When to Load | File |
32
+ |-------|--------------|------|
33
+ | Search optimization and descriptions | Naming skills and writing trigger metadata | `examples/cso-optimization.md` |
34
+ | TDD for skills | Designing validation for skills and workflow docs | `examples/tdd-for-skills.md` |
35
+ | Anti-rationalization patterns | Hardening discipline skills against loopholes | `examples/anti-rationalization.md` |
98
36
 
99
37
  ## SKILL.md Structure
100
38
 
101
- **Frontmatter (YAML):**
39
+ **Frontmatter:** Only `name` and `description`
102
40
 
103
- - Only two fields supported: `name` and `description`
104
- - Max 1024 characters total
105
- - `name`: Use letters, numbers, and hyphens only (no parentheses, special chars)
106
- - `description`: Third-person, describes ONLY when to use (NOT what it does)
107
- - Start with "Use when..." to focus on triggering conditions
108
- - Include specific symptoms, situations, and contexts
109
- - **NEVER summarize the skill's process or workflow** (see CSO section for why)
110
- - Keep under 500 characters if possible
41
+ - `name`: letters, numbers, hyphens only
42
+ - `description`: start with `Use when...`
43
+ - Keep the description focused on trigger conditions, not on the workflow internals
111
44
 
112
45
  ```markdown
113
46
  ---
114
- name: Skill-Name-With-Hyphens
115
- description: Use when [specific triggering conditions and symptoms]
47
+ name: skill-name
48
+ description: Use when [triggering conditions and symptoms]
116
49
  ---
117
50
 
118
51
  # Skill Name
119
-
120
52
  ## Overview
121
-
122
- What is this? Core principle in 1-2 sentences.
123
-
124
- ## When to Use
125
-
126
- [Small inline flowchart IF decision non-obvious]
127
-
128
- Bullet list with SYMPTOMS and use cases
129
- When NOT to use
130
-
131
- ## Core Pattern (for techniques/patterns)
132
-
133
- Before/after code comparison
134
-
53
+ ## When to Use / When Not to Use
54
+ ## Core Pattern
135
55
  ## Quick Reference
136
-
137
- Table or bullets for scanning common operations
138
-
139
56
  ## Implementation
140
-
141
- Inline code for simple patterns
142
- Link to file for heavy reference or reusable tools
143
-
144
57
  ## Common Mistakes
145
-
146
- What goes wrong + fixes
147
-
148
- ## Real-World Impact (optional)
149
-
150
- Concrete results
151
- ```
152
-
153
- ## Antigravity Search Optimization (CSO)
154
-
155
- **Critical for discovery:** Future Antigravity needs to FIND your skill
156
-
157
- ### 1. Rich Description Field
158
-
159
- **Purpose:** Antigravity reads description to decide which skills to load for a given task. Make it answer: "Should I read this skill right now?"
160
-
161
- **Format:** Start with "Use when..." to focus on triggering conditions
162
-
163
- **CRITICAL: Description = When to Use, NOT What the Skill Does**
164
-
165
- The description should ONLY describe triggering conditions. Do NOT summarize the skill's process or workflow in the description.
166
-
167
- **Why this matters:** Testing revealed that when a description summarizes the skill's workflow, Antigravity may follow the description instead of reading the full skill content. A description saying "code review between tasks" caused Antigravity to do ONE review, even though the skill's flowchart clearly showed TWO reviews (spec compliance then code quality).
168
-
169
- When the description was changed to just "Use when executing implementation plans with independent tasks" (no workflow summary), Antigravity correctly read the flowchart and followed the two-stage review process.
170
-
171
- **The trap:** Descriptions that summarize workflow create a shortcut Antigravity will take. The skill body becomes documentation Antigravity skips.
172
-
173
- ```yaml
174
- # ❌ BAD: Summarizes workflow - Antigravity may follow this instead of reading skill
175
- description: Use when executing plans - executes tasks sequentially with code review between tasks
176
-
177
- # ❌ BAD: Too much process detail
178
- description: Use for TDD - write test first, watch it fail, write minimal code, refactor
179
-
180
- # ✅ GOOD: Just triggering conditions, no workflow summary
181
- description: Use when executing implementation plans with independent tasks in the current session
182
-
183
- # ✅ GOOD: Triggering conditions only
184
- description: Use when implementing any feature or bugfix, before writing implementation code
185
58
  ```
186
59
 
187
- **Content:**
188
-
189
- - Use concrete triggers, symptoms, and situations that signal this skill applies
190
- - Describe the _problem_ (race conditions, inconsistent behavior) not _language-specific symptoms_ (setTimeout, sleep)
191
- - Keep triggers technology-agnostic unless the skill itself is technology-specific
192
- - If skill is technology-specific, make that explicit in the trigger
193
- - Write in third person (injected into system prompt)
194
- - **NEVER summarize the skill's process or workflow**
195
-
196
- ```yaml
197
- # ❌ BAD: Too abstract, vague, doesn't include when to use
198
- description: For async testing
199
-
200
- # ❌ BAD: First person
201
- description: I can help you with async tests when they're flaky
202
-
203
- # ❌ BAD: Mentions technology but skill isn't specific to it
204
- description: Use when tests use setTimeout/sleep and are flaky
205
-
206
- # ✅ GOOD: Starts with "Use when", describes problem, no workflow
207
- description: Use when tests have race conditions, timing dependencies, or pass/fail inconsistently
208
-
209
- # ✅ GOOD: Technology-specific skill with explicit trigger
210
- description: Use when using React Router and handling authentication redirects
211
- ```
212
-
213
- ### 2. Keyword Coverage
214
-
215
- Use words Antigravity would search for:
216
-
217
- - Error messages: "Hook timed out", "ENOTEMPTY", "race condition"
218
- - Symptoms: "flaky", "hanging", "zombie", "pollution"
219
- - Synonyms: "timeout/hang/freeze", "cleanup/teardown/afterEach"
220
- - Tools: Actual commands, library names, file types
221
-
222
- ### 3. Descriptive Naming
223
-
224
- **Use active voice, verb-first:**
225
-
226
- - ✅ `creating-skills` not `skill-creation`
227
- - ✅ `condition-based-waiting` not `async-test-helpers`
228
-
229
- ### 4. Token Efficiency (Critical)
230
-
231
- **Problem:** getting-started and frequently-referenced skills load into EVERY conversation. Every token counts.
232
-
233
- **Target word counts:**
234
-
235
- - getting-started workflows: <150 words each
236
- - Frequently-loaded skills: <200 words total
237
- - Other skills: <500 words (still be concise)
238
-
239
- **Techniques:**
240
-
241
- **Move details to tool help:**
242
-
243
- ```bash
244
- # ❌ BAD: Document all flags in SKILL.md
245
- search-conversations supports --text, --both, --after DATE, --before DATE, --limit N
246
-
247
- # ✅ GOOD: Reference --help
248
- search-conversations supports multiple modes and filters. Run --help for details.
249
- ```
250
-
251
- **Use cross-references:**
252
-
253
- ```markdown
254
- # ❌ BAD: Repeat workflow details
255
-
256
- When searching, run task steps without a reusable template...
257
- [20 lines of repeated instructions]
258
-
259
- # ✅ GOOD: Reference other skill
260
-
261
- Always use explicit workflow skill references. REQUIRED: Use [other-skill-name] for workflow.
262
- ```
263
-
264
- **Compress examples:**
265
-
266
- ```markdown
267
- # ❌ BAD: Verbose example (42 words)
268
-
269
- your human partner: "How did we handle authentication errors in React Router before?"
270
- You: I'll search past conversations for React Router authentication patterns.
271
- [Run task_boundary search: "React Router authentication error handling 401"]
272
-
273
- # ✅ GOOD: Minimal example (20 words)
274
-
275
- Partner: "How did we handle auth errors in React Router?"
276
- You: Searching...
277
- [Run synthesis step]
278
- ```
279
-
280
- **Eliminate redundancy:**
281
-
282
- - Don't repeat what's in cross-referenced skills
283
- - Don't explain what's obvious from command
284
- - Don't include multiple examples of same pattern
285
-
286
- **Verification:**
287
-
288
- ```bash
289
- wc -w skills/path/SKILL.md
290
- # getting-started workflows: aim for <150 each
291
- # Other frequently-loaded: aim for <200 total
292
- ```
293
-
294
- **Name by what you DO or core insight:**
295
-
296
- - ✅ `condition-based-waiting` > `async-test-helpers`
297
- - ✅ `using-skills` not `skill-usage`
298
- - ✅ `flatten-with-flags` > `data-structure-refactoring`
299
- - ✅ `root-cause-tracing` > `debugging-techniques`
300
-
301
- **Gerunds (-ing) work well for processes:**
302
-
303
- - `creating-skills`, `testing-skills`, `debugging-with-logs`
304
- - Active, describes the action you're taking
305
-
306
- ### 4. Cross-Referencing Other Skills
307
-
308
- **When writing documentation that references other skills:**
309
-
310
- Use skill name only, with explicit requirement markers:
311
-
312
- - ✅ Good: `**REQUIRED SKILL:** Use .agent/skills/test-driven-development/SKILL.md`
313
- - ✅ Good: `**REQUIRED BACKGROUND:** You MUST understand .agent/skills/systematic-debugging/SKILL.md`
314
- - ❌ Bad: `See skills/testing/test-driven-development` (unclear if required)
315
- - ❌ Bad: `@skills/testing/test-driven-development/SKILL.md` (force-loads, burns context)
316
-
317
- **Why no @ links:** `@` syntax force-loads files immediately, consuming 200k+ context before you need them.
318
-
319
- ## Flowchart Usage
60
+ ## Directory Structure
320
61
 
321
- ```dot
322
- digraph when_flowchart {
323
- "Need to show information?" [shape=diamond];
324
- "Decision where I might go wrong?" [shape=diamond];
325
- "Use markdown" [shape=box];
326
- "Small inline flowchart" [shape=box];
327
-
328
- "Need to show information?" -> "Decision where I might go wrong?" [label="yes"];
329
- "Decision where I might go wrong?" -> "Small inline flowchart" [label="yes"];
330
- "Decision where I might go wrong?" -> "Use markdown" [label="no"];
331
- }
62
+ ```text
63
+ skills/skill-name/
64
+ ├── SKILL.md
65
+ ├── examples/
66
+ ├── references/
67
+ └── scripts/
332
68
  ```
333
69
 
334
- **Use flowcharts ONLY for:**
335
-
336
- - Non-obvious decision points
337
- - Process loops where you might stop too early
338
- - "When to use A vs B" decisions
339
-
340
- **Never use flowcharts for:**
341
-
342
- - Reference material → Tables, lists
343
- - Code examples → Markdown blocks
344
- - Linear instructions → Numbered lists
345
- - Labels without semantic meaning (step1, helper2)
346
-
347
- See @graphviz-conventions.dot for graphviz style rules.
348
-
349
- **Visualizing for your human partner:** Use `render-graphs.js` in this directory to render a skill's flowcharts to SVG:
350
-
351
- ```bash
352
- ./render-graphs.js ../some-skill # Each diagram separately
353
- ./render-graphs.js ../some-skill --combine # All diagrams in one SVG
354
- ```
70
+ Put only the routing logic and core rules in `SKILL.md`. Push heavy references and extended examples into side files.
355
71
 
356
72
  ## Code Examples
357
73
 
358
- **One excellent example beats many mediocre ones**
359
-
360
- Choose most relevant language:
361
-
362
- - Testing techniques → TypeScript/JavaScript
363
- - System debugging → Shell/Python
364
- - Data processing → Python
365
-
366
- **Good example:**
367
-
368
- - Complete and runnable
369
- - Well-commented explaining WHY
370
- - From real scenario
371
- - Shows pattern clearly
372
- - Ready to adapt (not generic template)
74
+ **One excellent example beats many mediocre ones.**
373
75
 
374
- **Don't:**
76
+ Prefer one real, runnable example over five thin examples in different languages.
375
77
 
376
- - Implement in 5+ languages
377
- - Create fill-in-the-blank templates
378
- - Write contrived examples
379
-
380
- You're good at porting - one great example is enough.
381
-
382
- ## File Organization
383
-
384
- ### Self-Contained Skill
385
-
386
- ```
387
- defense-in-depth/
388
- SKILL.md # Everything inline
389
- ```
390
-
391
- When: All content fits, no heavy reference needed
392
-
393
- ### Skill with Reusable Tool
394
-
395
- ```
396
- condition-based-waiting/
397
- SKILL.md # Overview + patterns
398
- example.ts # Working helpers to adapt
399
- ```
400
-
401
- When: Tool is reusable code, not just narrative
402
-
403
- ### Skill with Heavy Reference
404
-
405
- ```
406
- pptx/
407
- SKILL.md # Overview + workflows
408
- pptxgenjs.md # 600 lines API reference
409
- ooxml.md # 500 lines XML structure
410
- scripts/ # Executable tools
411
- ```
78
+ ## Flowchart Usage
412
79
 
413
- When: Reference material too large for inline
80
+ Use flowcharts only for non-obvious branching or loops where agents commonly stop too early. Use plain markdown for linear instructions and reference material.
414
81
 
415
- ## The Iron Law (Same as TDD)
82
+ ## The Iron Law
416
83
 
417
- ```
84
+ ```text
418
85
  NO SKILL WITHOUT A FAILING TEST FIRST
419
86
  ```
420
87
 
421
- This applies to NEW skills AND EDITS to existing skills.
422
-
423
- Write skill before testing? Delete it. Start over.
424
- Edit skill without testing? Same violation.
425
-
426
- **No exceptions:**
427
-
428
- - Not for "simple additions"
429
- - Not for "just adding a section"
430
- - Not for "documentation updates"
431
- - Don't keep untested changes as "reference"
432
- - Don't "adapt" while running tests
433
- - Delete means delete
434
-
435
- **REQUIRED BACKGROUND:** `.agent/skills/test-driven-development/SKILL.md` explains why this matters. Same principles apply to documentation.
436
-
437
- ## Testing All Skill Types
438
-
439
- Different skill types need different test approaches:
440
-
441
- ### Discipline-Enforcing Skills (rules/requirements)
442
-
443
- **Examples:** TDD, verification-before-completion, designing-before-coding
444
-
445
- **Test with:**
446
-
447
- - Academic questions: Do they understand the rules?
448
- - Pressure scenarios: Do they comply under stress?
449
- - Multiple pressures combined: time + sunk cost + exhaustion
450
- - Identify rationalizations and add explicit counters
451
-
452
- **Success criteria:** Agent follows rule under maximum pressure
453
-
454
- ### Technique Skills (how-to guides)
455
-
456
- **Examples:** condition-based-waiting, root-cause-tracing, defensive-programming
457
-
458
- **Test with:**
459
-
460
- - Application scenarios: Can they apply the technique correctly?
461
- - Variation scenarios: Do they handle edge cases?
462
- - Missing information tests: Do instructions have gaps?
463
-
464
- **Success criteria:** Agent successfully applies technique to new scenario
465
-
466
- ### Pattern Skills (mental models)
467
-
468
- **Examples:** reducing-complexity, information-hiding concepts
469
-
470
- **Test with:**
471
-
472
- - Recognition scenarios: Do they recognize when pattern applies?
473
- - Application scenarios: Can they use the mental model?
474
- - Counter-examples: Do they know when NOT to apply?
475
-
476
- **Success criteria:** Agent correctly identifies when/how to apply pattern
477
-
478
- ### Reference Skills (documentation/APIs)
479
-
480
- **Examples:** API documentation, command references, library guides
481
-
482
- **Test with:**
483
-
484
- - Retrieval scenarios: Can they find the right information?
485
- - Application scenarios: Can they use what they found correctly?
486
- - Gap testing: Are common use cases covered?
487
-
488
- **Success criteria:** Agent finds and correctly applies reference information
489
-
490
- ## Common Rationalizations for Skipping Testing
491
-
492
- | Excuse | Reality |
493
- | ------------------------------ | ---------------------------------------------------------------- |
494
- | "Skill is obviously clear" | Clear to you ≠ clear to other agents. Test it. |
495
- | "It's just a reference" | References can have gaps, unclear sections. Test retrieval. |
496
- | "Testing is overkill" | Untested skills have issues. Always. 15 min testing saves hours. |
497
- | "I'll test if problems emerge" | Problems = agents can't use skill. Test BEFORE deploying. |
498
- | "Too tedious to test" | Testing is less tedious than debugging bad skill in production. |
499
- | "I'm confident it's good" | Overconfidence guarantees issues. Test anyway. |
500
- | "Academic review is enough" | Reading ≠ using. Test application scenarios. |
501
- | "No time to test" | Deploying untested skill wastes more time fixing it later. |
502
-
503
- **All of these mean: Test before deploying. No exceptions.**
504
-
505
- ## Bulletproofing Skills Against Rationalization
506
-
507
- Skills that enforce discipline (like TDD) need to resist rationalization. Agents are smart and will find loopholes when under pressure.
508
-
509
- **Psychology note:** Understanding WHY persuasion techniques work helps you apply them systematically. See persuasion-principles.md for research foundation (Cialdini, 2021; Meincke et al., 2025) on authority, commitment, scarcity, social proof, and unity principles.
510
-
511
- ### Close Every Loophole Explicitly
512
-
513
- Don't just state the rule - forbid specific workarounds:
514
-
515
- <Bad>
516
- ```markdown
517
- Write code before test? Delete it.
518
- ```
519
- </Bad>
520
-
521
- <Good>
522
- ```markdown
523
- Write code before test? Delete it. Start over.
88
+ No exceptions for "small doc updates" or "just adding one section".
524
89
 
525
- **No exceptions:**
90
+ ## Skill Creation Checklist
526
91
 
527
- - Don't keep it as "reference"
528
- - Don't "adapt" it while writing tests
529
- - Don't look at it
530
- - Delete means delete
92
+ **RED**
531
93
 
532
- ````
533
- </Good>
94
+ - [ ] Create pressure scenarios or realistic retrieval tasks
95
+ - [ ] Run them without the skill
96
+ - [ ] Capture exact failures and rationalizations
534
97
 
535
- ### Address "Spirit vs Letter" Arguments
98
+ **GREEN**
536
99
 
537
- Add foundational principle early:
100
+ - [ ] Write the minimum skill that addresses the observed failures
101
+ - [ ] Keep trigger metadata short and precise
102
+ - [ ] Add only the references/examples required to teach the missing behavior
538
103
 
539
- ```markdown
540
- **Violating the letter of the rules is violating the spirit of the rules.**
541
- ````
104
+ **REFACTOR**
542
105
 
543
- This cuts off entire class of "I'm following the spirit" rationalizations.
106
+ - [ ] Add explicit counters for new loopholes
107
+ - [ ] Keep `SKILL.md` lean and move detail to side files
108
+ - [ ] Re-run the same validation after every material change
544
109
 
545
- ### Build Rationalization Table
110
+ ## Stop Rule
546
111
 
547
- Capture rationalizations from baseline testing (see Testing section below). Every excuse agents make goes in the table:
112
+ Do not batch-create multiple skills without validating each one first.
548
113
 
549
- ```markdown
550
- | Excuse | Reality |
551
- | -------------------------------- | ----------------------------------------------------------------------- |
552
- | "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
553
- | "I'll test after" | Tests passing immediately prove nothing. |
554
- | "Tests after achieve same goals" | Tests-after = "what does this do?" Tests-first = "what should this do?" |
555
- ```
114
+ ## Integration
556
115
 
557
- ### Create Red Flags List
116
+ - `awf-version-tracker` snapshot skill changes
117
+ - `single-flow-task-execution` — useful when implementing multi-step skill refactors
118
+ - `superpowers` pack — deeper TDD and verification references when you need them
558
119
 
559
- Make it easy for agents to self-check when rationalizing:
560
-
561
- ```markdown
562
- ## Red Flags - STOP and Start Over
563
-
564
- - Code before test
565
- - "I already manually tested it"
566
- - "Tests after achieve the same purpose"
567
- - "It's about spirit not ritual"
568
- - "This is different because..."
569
-
570
- **All of these mean: Delete code. Start over with TDD.**
571
- ```
572
-
573
- ### Update CSO for Violation Symptoms
574
-
575
- Add to description: symptoms of when you're ABOUT to violate the rule:
576
-
577
- ```yaml
578
- description: use when implementing any feature or bugfix, before writing implementation code
579
- ```
580
-
581
- ## RED-GREEN-REFACTOR for Skills
582
-
583
- Follow the TDD cycle:
584
-
585
- ### RED: Write Failing Test (Baseline)
586
-
587
- Run pressure scenario with explicit task execution WITHOUT the skill. Document exact behavior:
588
-
589
- - What choices did they make?
590
- - What rationalizations did they use (verbatim)?
591
- - Which pressures triggered violations?
592
-
593
- This is "watch the test fail" - you must see what agents naturally do before writing the skill.
594
-
595
- ### GREEN: Write Minimal Skill
596
-
597
- Write skill that addresses those specific rationalizations. Don't add extra content for hypothetical cases.
598
-
599
- Run same scenarios WITH skill. Agent should now comply.
600
-
601
- ### REFACTOR: Close Loopholes
602
-
603
- Agent found new rationalization? Add explicit counter. Re-test until bulletproof.
604
-
605
- **Testing methodology:** See @testing-skills-with-subagents.md for the complete testing methodology:
606
-
607
- - How to write pressure scenarios
608
- - Pressure types (time, sunk cost, authority, exhaustion)
609
- - Plugging holes systematically
610
- - Meta-testing techniques
611
-
612
- ## Anti-Patterns
613
-
614
- ### ❌ Narrative Example
615
-
616
- "In session 2025-10-03, we found empty projectDir caused..."
617
- **Why bad:** Too specific, not reusable
618
-
619
- ### ❌ Multi-Language Dilution
620
-
621
- example-js.js, example-py.py, example-go.go
622
- **Why bad:** Mediocre quality, maintenance burden
623
-
624
- ### ❌ Code in Flowcharts
625
-
626
- ```dot
627
- step1 [label="import fs"];
628
- step2 [label="read file"];
629
- ```
630
-
631
- **Why bad:** Can't copy-paste, hard to read
632
-
633
- ### ❌ Generic Labels
634
-
635
- helper1, helper2, step3, pattern4
636
- **Why bad:** Labels should have semantic meaning
637
-
638
- ## STOP: Before Moving to Next Skill
639
-
640
- **After writing ANY skill, you MUST STOP and complete the deployment process.**
641
-
642
- **Do NOT:**
643
-
644
- - Create multiple skills in batch without testing each
645
- - Move to next skill before current one is verified
646
- - Skip testing because "batching is more efficient"
647
-
648
- **The deployment checklist below is MANDATORY for EACH skill.**
649
-
650
- Deploying untested skills = deploying untested code. It's a violation of quality standards.
651
-
652
- ## Skill Creation Checklist (TDD Adapted)
653
-
654
- **IMPORTANT: Update `<project-root>/docs/plans/task.md` for EACH checklist item below (table-only tracker, no instructions).**
655
-
656
- **RED Phase - Write Failing Test:**
657
-
658
- - [ ] Create pressure scenarios (3+ combined pressures for discipline skills)
659
- - [ ] Run scenarios WITHOUT skill - document baseline behavior verbatim
660
- - [ ] Identify patterns in rationalizations/failures
661
-
662
- **GREEN Phase - Write Minimal Skill:**
663
-
664
- - [ ] Name uses only letters, numbers, hyphens (no parentheses/special chars)
665
- - [ ] YAML frontmatter with only name and description (max 1024 chars)
666
- - [ ] Description starts with "Use when..." and includes specific triggers/symptoms
667
- - [ ] Description written in third person
668
- - [ ] Keywords throughout for search (errors, symptoms, tools)
669
- - [ ] Clear overview with core principle
670
- - [ ] Address specific baseline failures identified in RED
671
- - [ ] Code inline OR link to separate file
672
- - [ ] One excellent example (not multi-language)
673
- - [ ] Run scenarios WITH skill - verify agents now comply
674
-
675
- **REFACTOR Phase - Close Loopholes:**
676
-
677
- - [ ] Identify NEW rationalizations from testing
678
- - [ ] Add explicit counters (if discipline skill)
679
- - [ ] Build rationalization table from all test iterations
680
- - [ ] Create red flags list
681
- - [ ] Re-test until bulletproof
682
-
683
- **Quality Checks:**
684
-
685
- - [ ] Small flowchart only if decision non-obvious
686
- - [ ] Quick reference table
687
- - [ ] Common mistakes section
688
- - [ ] No narrative storytelling
689
- - [ ] Supporting files only for tools or heavy reference
690
-
691
- **Deployment:**
692
-
693
- - [ ] Commit skill to git and push to your fork (if configured)
694
- - [ ] Consider contributing back via PR (if broadly useful)
695
-
696
- ## Discovery Workflow
697
-
698
- How future Antigravity finds your skill:
699
-
700
- 1. **Encounters problem** ("tests are flaky")
701
- 2. **Finds SKILL** (description matches)
702
- 3. **Scans overview** (is this relevant?)
703
- 4. **Reads patterns** (quick reference table)
704
- 5. **Loads example** (only when implementing)
705
-
706
- **Optimize for this flow** - put searchable terms early and often.
707
-
708
- ## The Bottom Line
709
-
710
- **Creating skills IS TDD for process documentation.**
711
-
712
- Same Iron Law: No skill without failing test first.
713
- Same cycle: RED (baseline) → GREEN (write skill) → REFACTOR (close loopholes).
714
- Same benefits: Better quality, fewer surprises, bulletproof results.
120
+ ---
715
121
 
716
- If you follow TDD for code, follow it for skills. It's the same discipline applied to documentation.
122
+ *writing-skills Lean Router Architecture*