@athenaflow/plugin-matt-pocock-skills 0.1.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 (172) hide show
  1. package/.claude-plugin/plugin.json +24 -0
  2. package/.codex-plugin/plugin.json +16 -0
  3. package/NOTICE.md +11 -0
  4. package/dist/0.1.1/.agents/plugins/marketplace.json +14 -0
  5. package/dist/0.1.1/GENERATED.md +12 -0
  6. package/dist/0.1.1/claude/plugin/.claude-plugin/plugin.json +24 -0
  7. package/dist/0.1.1/claude/plugin/NOTICE.md +11 -0
  8. package/dist/0.1.1/claude/plugin/package.json +21 -0
  9. package/dist/0.1.1/claude/plugin/skills/diagnose/SKILL.md +117 -0
  10. package/dist/0.1.1/claude/plugin/skills/diagnose/agents/claude.yaml +2 -0
  11. package/dist/0.1.1/claude/plugin/skills/diagnose/agents/openai.yaml +4 -0
  12. package/dist/0.1.1/claude/plugin/skills/diagnose/scripts/hitl-loop.template.sh +41 -0
  13. package/dist/0.1.1/claude/plugin/skills/grill-me/SKILL.md +10 -0
  14. package/dist/0.1.1/claude/plugin/skills/grill-me/agents/claude.yaml +2 -0
  15. package/dist/0.1.1/claude/plugin/skills/grill-me/agents/openai.yaml +4 -0
  16. package/dist/0.1.1/claude/plugin/skills/grill-with-docs/ADR-FORMAT.md +47 -0
  17. package/dist/0.1.1/claude/plugin/skills/grill-with-docs/CONTEXT-FORMAT.md +77 -0
  18. package/dist/0.1.1/claude/plugin/skills/grill-with-docs/SKILL.md +88 -0
  19. package/dist/0.1.1/claude/plugin/skills/grill-with-docs/agents/claude.yaml +2 -0
  20. package/dist/0.1.1/claude/plugin/skills/grill-with-docs/agents/openai.yaml +4 -0
  21. package/dist/0.1.1/claude/plugin/skills/improve-codebase-architecture/DEEPENING.md +37 -0
  22. package/dist/0.1.1/claude/plugin/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +44 -0
  23. package/dist/0.1.1/claude/plugin/skills/improve-codebase-architecture/LANGUAGE.md +53 -0
  24. package/dist/0.1.1/claude/plugin/skills/improve-codebase-architecture/SKILL.md +71 -0
  25. package/dist/0.1.1/claude/plugin/skills/improve-codebase-architecture/agents/claude.yaml +2 -0
  26. package/dist/0.1.1/claude/plugin/skills/improve-codebase-architecture/agents/openai.yaml +4 -0
  27. package/dist/0.1.1/claude/plugin/skills/prototype/LOGIC.md +79 -0
  28. package/dist/0.1.1/claude/plugin/skills/prototype/SKILL.md +30 -0
  29. package/dist/0.1.1/claude/plugin/skills/prototype/UI.md +112 -0
  30. package/dist/0.1.1/claude/plugin/skills/prototype/agents/claude.yaml +2 -0
  31. package/dist/0.1.1/claude/plugin/skills/prototype/agents/openai.yaml +4 -0
  32. package/dist/0.1.1/claude/plugin/skills/setup-matt-pocock-skills/SKILL.md +120 -0
  33. package/dist/0.1.1/claude/plugin/skills/setup-matt-pocock-skills/agents/claude.yaml +3 -0
  34. package/dist/0.1.1/claude/plugin/skills/setup-matt-pocock-skills/agents/openai.yaml +4 -0
  35. package/dist/0.1.1/claude/plugin/skills/setup-matt-pocock-skills/domain.md +51 -0
  36. package/dist/0.1.1/claude/plugin/skills/setup-matt-pocock-skills/issue-tracker-github.md +22 -0
  37. package/dist/0.1.1/claude/plugin/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +23 -0
  38. package/dist/0.1.1/claude/plugin/skills/setup-matt-pocock-skills/issue-tracker-local.md +19 -0
  39. package/dist/0.1.1/claude/plugin/skills/setup-matt-pocock-skills/triage-labels.md +15 -0
  40. package/dist/0.1.1/claude/plugin/skills/tdd/SKILL.md +109 -0
  41. package/dist/0.1.1/claude/plugin/skills/tdd/agents/claude.yaml +2 -0
  42. package/dist/0.1.1/claude/plugin/skills/tdd/agents/openai.yaml +4 -0
  43. package/dist/0.1.1/claude/plugin/skills/tdd/deep-modules.md +33 -0
  44. package/dist/0.1.1/claude/plugin/skills/tdd/interface-design.md +31 -0
  45. package/dist/0.1.1/claude/plugin/skills/tdd/mocking.md +59 -0
  46. package/dist/0.1.1/claude/plugin/skills/tdd/refactoring.md +10 -0
  47. package/dist/0.1.1/claude/plugin/skills/tdd/tests.md +61 -0
  48. package/dist/0.1.1/claude/plugin/skills/to-issues/SKILL.md +83 -0
  49. package/dist/0.1.1/claude/plugin/skills/to-issues/agents/claude.yaml +2 -0
  50. package/dist/0.1.1/claude/plugin/skills/to-issues/agents/openai.yaml +4 -0
  51. package/dist/0.1.1/claude/plugin/skills/to-prd/SKILL.md +76 -0
  52. package/dist/0.1.1/claude/plugin/skills/to-prd/agents/claude.yaml +2 -0
  53. package/dist/0.1.1/claude/plugin/skills/to-prd/agents/openai.yaml +4 -0
  54. package/dist/0.1.1/claude/plugin/skills/triage/AGENT-BRIEF.md +168 -0
  55. package/dist/0.1.1/claude/plugin/skills/triage/OUT-OF-SCOPE.md +101 -0
  56. package/dist/0.1.1/claude/plugin/skills/triage/SKILL.md +103 -0
  57. package/dist/0.1.1/claude/plugin/skills/triage/agents/claude.yaml +2 -0
  58. package/dist/0.1.1/claude/plugin/skills/triage/agents/openai.yaml +4 -0
  59. package/dist/0.1.1/claude/plugin/skills/zoom-out/SKILL.md +6 -0
  60. package/dist/0.1.1/claude/plugin/skills/zoom-out/agents/claude.yaml +3 -0
  61. package/dist/0.1.1/claude/plugin/skills/zoom-out/agents/openai.yaml +4 -0
  62. package/dist/0.1.1/codex/plugin/.codex-plugin/plugin.json +16 -0
  63. package/dist/0.1.1/codex/plugin/NOTICE.md +11 -0
  64. package/dist/0.1.1/codex/plugin/package.json +21 -0
  65. package/dist/0.1.1/codex/plugin/skills/diagnose/SKILL.md +117 -0
  66. package/dist/0.1.1/codex/plugin/skills/diagnose/agents/claude.yaml +2 -0
  67. package/dist/0.1.1/codex/plugin/skills/diagnose/agents/openai.yaml +4 -0
  68. package/dist/0.1.1/codex/plugin/skills/diagnose/scripts/hitl-loop.template.sh +41 -0
  69. package/dist/0.1.1/codex/plugin/skills/grill-me/SKILL.md +10 -0
  70. package/dist/0.1.1/codex/plugin/skills/grill-me/agents/claude.yaml +2 -0
  71. package/dist/0.1.1/codex/plugin/skills/grill-me/agents/openai.yaml +4 -0
  72. package/dist/0.1.1/codex/plugin/skills/grill-with-docs/ADR-FORMAT.md +47 -0
  73. package/dist/0.1.1/codex/plugin/skills/grill-with-docs/CONTEXT-FORMAT.md +77 -0
  74. package/dist/0.1.1/codex/plugin/skills/grill-with-docs/SKILL.md +88 -0
  75. package/dist/0.1.1/codex/plugin/skills/grill-with-docs/agents/claude.yaml +2 -0
  76. package/dist/0.1.1/codex/plugin/skills/grill-with-docs/agents/openai.yaml +4 -0
  77. package/dist/0.1.1/codex/plugin/skills/improve-codebase-architecture/DEEPENING.md +37 -0
  78. package/dist/0.1.1/codex/plugin/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +44 -0
  79. package/dist/0.1.1/codex/plugin/skills/improve-codebase-architecture/LANGUAGE.md +53 -0
  80. package/dist/0.1.1/codex/plugin/skills/improve-codebase-architecture/SKILL.md +71 -0
  81. package/dist/0.1.1/codex/plugin/skills/improve-codebase-architecture/agents/claude.yaml +2 -0
  82. package/dist/0.1.1/codex/plugin/skills/improve-codebase-architecture/agents/openai.yaml +4 -0
  83. package/dist/0.1.1/codex/plugin/skills/prototype/LOGIC.md +79 -0
  84. package/dist/0.1.1/codex/plugin/skills/prototype/SKILL.md +30 -0
  85. package/dist/0.1.1/codex/plugin/skills/prototype/UI.md +112 -0
  86. package/dist/0.1.1/codex/plugin/skills/prototype/agents/claude.yaml +2 -0
  87. package/dist/0.1.1/codex/plugin/skills/prototype/agents/openai.yaml +4 -0
  88. package/dist/0.1.1/codex/plugin/skills/setup-matt-pocock-skills/SKILL.md +120 -0
  89. package/dist/0.1.1/codex/plugin/skills/setup-matt-pocock-skills/agents/claude.yaml +3 -0
  90. package/dist/0.1.1/codex/plugin/skills/setup-matt-pocock-skills/agents/openai.yaml +4 -0
  91. package/dist/0.1.1/codex/plugin/skills/setup-matt-pocock-skills/domain.md +51 -0
  92. package/dist/0.1.1/codex/plugin/skills/setup-matt-pocock-skills/issue-tracker-github.md +22 -0
  93. package/dist/0.1.1/codex/plugin/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +23 -0
  94. package/dist/0.1.1/codex/plugin/skills/setup-matt-pocock-skills/issue-tracker-local.md +19 -0
  95. package/dist/0.1.1/codex/plugin/skills/setup-matt-pocock-skills/triage-labels.md +15 -0
  96. package/dist/0.1.1/codex/plugin/skills/tdd/SKILL.md +109 -0
  97. package/dist/0.1.1/codex/plugin/skills/tdd/agents/claude.yaml +2 -0
  98. package/dist/0.1.1/codex/plugin/skills/tdd/agents/openai.yaml +4 -0
  99. package/dist/0.1.1/codex/plugin/skills/tdd/deep-modules.md +33 -0
  100. package/dist/0.1.1/codex/plugin/skills/tdd/interface-design.md +31 -0
  101. package/dist/0.1.1/codex/plugin/skills/tdd/mocking.md +59 -0
  102. package/dist/0.1.1/codex/plugin/skills/tdd/refactoring.md +10 -0
  103. package/dist/0.1.1/codex/plugin/skills/tdd/tests.md +61 -0
  104. package/dist/0.1.1/codex/plugin/skills/to-issues/SKILL.md +83 -0
  105. package/dist/0.1.1/codex/plugin/skills/to-issues/agents/claude.yaml +2 -0
  106. package/dist/0.1.1/codex/plugin/skills/to-issues/agents/openai.yaml +4 -0
  107. package/dist/0.1.1/codex/plugin/skills/to-prd/SKILL.md +76 -0
  108. package/dist/0.1.1/codex/plugin/skills/to-prd/agents/claude.yaml +2 -0
  109. package/dist/0.1.1/codex/plugin/skills/to-prd/agents/openai.yaml +4 -0
  110. package/dist/0.1.1/codex/plugin/skills/triage/AGENT-BRIEF.md +168 -0
  111. package/dist/0.1.1/codex/plugin/skills/triage/OUT-OF-SCOPE.md +101 -0
  112. package/dist/0.1.1/codex/plugin/skills/triage/SKILL.md +103 -0
  113. package/dist/0.1.1/codex/plugin/skills/triage/agents/claude.yaml +2 -0
  114. package/dist/0.1.1/codex/plugin/skills/triage/agents/openai.yaml +4 -0
  115. package/dist/0.1.1/codex/plugin/skills/zoom-out/SKILL.md +6 -0
  116. package/dist/0.1.1/codex/plugin/skills/zoom-out/agents/claude.yaml +3 -0
  117. package/dist/0.1.1/codex/plugin/skills/zoom-out/agents/openai.yaml +4 -0
  118. package/dist/0.1.1/release.json +18 -0
  119. package/package.json +25 -0
  120. package/skills/diagnose/SKILL.md +117 -0
  121. package/skills/diagnose/agents/claude.yaml +2 -0
  122. package/skills/diagnose/agents/openai.yaml +4 -0
  123. package/skills/diagnose/scripts/hitl-loop.template.sh +41 -0
  124. package/skills/grill-me/SKILL.md +10 -0
  125. package/skills/grill-me/agents/claude.yaml +2 -0
  126. package/skills/grill-me/agents/openai.yaml +4 -0
  127. package/skills/grill-with-docs/ADR-FORMAT.md +47 -0
  128. package/skills/grill-with-docs/CONTEXT-FORMAT.md +77 -0
  129. package/skills/grill-with-docs/SKILL.md +88 -0
  130. package/skills/grill-with-docs/agents/claude.yaml +2 -0
  131. package/skills/grill-with-docs/agents/openai.yaml +4 -0
  132. package/skills/improve-codebase-architecture/DEEPENING.md +37 -0
  133. package/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +44 -0
  134. package/skills/improve-codebase-architecture/LANGUAGE.md +53 -0
  135. package/skills/improve-codebase-architecture/SKILL.md +71 -0
  136. package/skills/improve-codebase-architecture/agents/claude.yaml +2 -0
  137. package/skills/improve-codebase-architecture/agents/openai.yaml +4 -0
  138. package/skills/prototype/LOGIC.md +79 -0
  139. package/skills/prototype/SKILL.md +30 -0
  140. package/skills/prototype/UI.md +112 -0
  141. package/skills/prototype/agents/claude.yaml +2 -0
  142. package/skills/prototype/agents/openai.yaml +4 -0
  143. package/skills/setup-matt-pocock-skills/SKILL.md +120 -0
  144. package/skills/setup-matt-pocock-skills/agents/claude.yaml +3 -0
  145. package/skills/setup-matt-pocock-skills/agents/openai.yaml +4 -0
  146. package/skills/setup-matt-pocock-skills/domain.md +51 -0
  147. package/skills/setup-matt-pocock-skills/issue-tracker-github.md +22 -0
  148. package/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +23 -0
  149. package/skills/setup-matt-pocock-skills/issue-tracker-local.md +19 -0
  150. package/skills/setup-matt-pocock-skills/triage-labels.md +15 -0
  151. package/skills/tdd/SKILL.md +109 -0
  152. package/skills/tdd/agents/claude.yaml +2 -0
  153. package/skills/tdd/agents/openai.yaml +4 -0
  154. package/skills/tdd/deep-modules.md +33 -0
  155. package/skills/tdd/interface-design.md +31 -0
  156. package/skills/tdd/mocking.md +59 -0
  157. package/skills/tdd/refactoring.md +10 -0
  158. package/skills/tdd/tests.md +61 -0
  159. package/skills/to-issues/SKILL.md +83 -0
  160. package/skills/to-issues/agents/claude.yaml +2 -0
  161. package/skills/to-issues/agents/openai.yaml +4 -0
  162. package/skills/to-prd/SKILL.md +76 -0
  163. package/skills/to-prd/agents/claude.yaml +2 -0
  164. package/skills/to-prd/agents/openai.yaml +4 -0
  165. package/skills/triage/AGENT-BRIEF.md +168 -0
  166. package/skills/triage/OUT-OF-SCOPE.md +101 -0
  167. package/skills/triage/SKILL.md +103 -0
  168. package/skills/triage/agents/claude.yaml +2 -0
  169. package/skills/triage/agents/openai.yaml +4 -0
  170. package/skills/zoom-out/SKILL.md +6 -0
  171. package/skills/zoom-out/agents/claude.yaml +3 -0
  172. package/skills/zoom-out/agents/openai.yaml +4 -0
@@ -0,0 +1,15 @@
1
+ # Triage Labels
2
+
3
+ The skills speak in terms of five canonical triage roles. This file maps those roles to the actual label strings used in this repo's issue tracker.
4
+
5
+ | Label in mattpocock/skills | Label in our tracker | Meaning |
6
+ | -------------------------- | -------------------- | ---------------------------------------- |
7
+ | `needs-triage` | `needs-triage` | Maintainer needs to evaluate this issue |
8
+ | `needs-info` | `needs-info` | Waiting on reporter for more information |
9
+ | `ready-for-agent` | `ready-for-agent` | Fully specified, ready for an AFK agent |
10
+ | `ready-for-human` | `ready-for-human` | Requires human implementation |
11
+ | `wontfix` | `wontfix` | Will not be actioned |
12
+
13
+ When a skill mentions a role (e.g. "apply the AFK-ready triage label"), use the corresponding label string from this table.
14
+
15
+ Edit the right-hand column to match whatever vocabulary you actually use.
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: tdd
3
+ description: Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.
4
+ ---
5
+
6
+ # Test-Driven Development
7
+
8
+ ## Philosophy
9
+
10
+ **Core principle**: Tests should verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't.
11
+
12
+ **Good tests** are integration-style: they exercise real code paths through public APIs. They describe _what_ the system does, not _how_ it does it. A good test reads like a specification - "user can checkout with valid cart" tells you exactly what capability exists. These tests survive refactors because they don't care about internal structure.
13
+
14
+ **Bad tests** are coupled to implementation. They mock internal collaborators, test private methods, or verify through external means (like querying a database directly instead of using the interface). The warning sign: your test breaks when you refactor, but behavior hasn't changed. If you rename an internal function and tests fail, those tests were testing implementation, not behavior.
15
+
16
+ See [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines.
17
+
18
+ ## Anti-Pattern: Horizontal Slices
19
+
20
+ **DO NOT write all tests first, then all implementation.** This is "horizontal slicing" - treating RED as "write all tests" and GREEN as "write all code."
21
+
22
+ This produces **crap tests**:
23
+
24
+ - Tests written in bulk test _imagined_ behavior, not _actual_ behavior
25
+ - You end up testing the _shape_ of things (data structures, function signatures) rather than user-facing behavior
26
+ - Tests become insensitive to real changes - they pass when behavior breaks, fail when behavior is fine
27
+ - You outrun your headlights, committing to test structure before understanding the implementation
28
+
29
+ **Correct approach**: Vertical slices via tracer bullets. One test → one implementation → repeat. Each test responds to what you learned from the previous cycle. Because you just wrote the code, you know exactly what behavior matters and how to verify it.
30
+
31
+ ```
32
+ WRONG (horizontal):
33
+ RED: test1, test2, test3, test4, test5
34
+ GREEN: impl1, impl2, impl3, impl4, impl5
35
+
36
+ RIGHT (vertical):
37
+ RED→GREEN: test1→impl1
38
+ RED→GREEN: test2→impl2
39
+ RED→GREEN: test3→impl3
40
+ ...
41
+ ```
42
+
43
+ ## Workflow
44
+
45
+ ### 1. Planning
46
+
47
+ When exploring the codebase, use the project's domain glossary so that test names and interface vocabulary match the project's language, and respect ADRs in the area you're touching.
48
+
49
+ Before writing any code:
50
+
51
+ - [ ] Confirm with user what interface changes are needed
52
+ - [ ] Confirm with user which behaviors to test (prioritize)
53
+ - [ ] Identify opportunities for [deep modules](deep-modules.md) (small interface, deep implementation)
54
+ - [ ] Design interfaces for [testability](interface-design.md)
55
+ - [ ] List the behaviors to test (not implementation steps)
56
+ - [ ] Get user approval on the plan
57
+
58
+ Ask: "What should the public interface look like? Which behaviors are most important to test?"
59
+
60
+ **You can't test everything.** Confirm with the user exactly which behaviors matter most. Focus testing effort on critical paths and complex logic, not every possible edge case.
61
+
62
+ ### 2. Tracer Bullet
63
+
64
+ Write ONE test that confirms ONE thing about the system:
65
+
66
+ ```
67
+ RED: Write test for first behavior → test fails
68
+ GREEN: Write minimal code to pass → test passes
69
+ ```
70
+
71
+ This is your tracer bullet - proves the path works end-to-end.
72
+
73
+ ### 3. Incremental Loop
74
+
75
+ For each remaining behavior:
76
+
77
+ ```
78
+ RED: Write next test → fails
79
+ GREEN: Minimal code to pass → passes
80
+ ```
81
+
82
+ Rules:
83
+
84
+ - One test at a time
85
+ - Only enough code to pass current test
86
+ - Don't anticipate future tests
87
+ - Keep tests focused on observable behavior
88
+
89
+ ### 4. Refactor
90
+
91
+ After all tests pass, look for [refactor candidates](refactoring.md):
92
+
93
+ - [ ] Extract duplication
94
+ - [ ] Deepen modules (move complexity behind simple interfaces)
95
+ - [ ] Apply SOLID principles where natural
96
+ - [ ] Consider what new code reveals about existing code
97
+ - [ ] Run tests after each refactor step
98
+
99
+ **Never refactor while RED.** Get to GREEN first.
100
+
101
+ ## Checklist Per Cycle
102
+
103
+ ```
104
+ [ ] Test describes behavior, not implementation
105
+ [ ] Test uses public interface only
106
+ [ ] Test would survive internal refactor
107
+ [ ] Code is minimal for this test
108
+ [ ] No speculative features added
109
+ ```
@@ -0,0 +1,2 @@
1
+ frontmatter:
2
+ user-invocable: true
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "TDD"
3
+ short_description: "Test-driven development with a red-green-refactor loop, one vertical slice at a time"
4
+ default_prompt: "Build this feature using red-green-refactor TDD, vertical slices only."
@@ -0,0 +1,33 @@
1
+ # Deep Modules
2
+
3
+ From "A Philosophy of Software Design":
4
+
5
+ **Deep module** = small interface + lots of implementation
6
+
7
+ ```
8
+ ┌─────────────────────┐
9
+ │ Small Interface │ ← Few methods, simple params
10
+ ├─────────────────────┤
11
+ │ │
12
+ │ │
13
+ │ Deep Implementation│ ← Complex logic hidden
14
+ │ │
15
+ │ │
16
+ └─────────────────────┘
17
+ ```
18
+
19
+ **Shallow module** = large interface + little implementation (avoid)
20
+
21
+ ```
22
+ ┌─────────────────────────────────┐
23
+ │ Large Interface │ ← Many methods, complex params
24
+ ├─────────────────────────────────┤
25
+ │ Thin Implementation │ ← Just passes through
26
+ └─────────────────────────────────┘
27
+ ```
28
+
29
+ When designing interfaces, ask:
30
+
31
+ - Can I reduce the number of methods?
32
+ - Can I simplify the parameters?
33
+ - Can I hide more complexity inside?
@@ -0,0 +1,31 @@
1
+ # Interface Design for Testability
2
+
3
+ Good interfaces make testing natural:
4
+
5
+ 1. **Accept dependencies, don't create them**
6
+
7
+ ```typescript
8
+ // Testable
9
+ function processOrder(order, paymentGateway) {}
10
+
11
+ // Hard to test
12
+ function processOrder(order) {
13
+ const gateway = new StripeGateway();
14
+ }
15
+ ```
16
+
17
+ 2. **Return results, don't produce side effects**
18
+
19
+ ```typescript
20
+ // Testable
21
+ function calculateDiscount(cart): Discount {}
22
+
23
+ // Hard to test
24
+ function applyDiscount(cart): void {
25
+ cart.total -= discount;
26
+ }
27
+ ```
28
+
29
+ 3. **Small surface area**
30
+ - Fewer methods = fewer tests needed
31
+ - Fewer params = simpler test setup
@@ -0,0 +1,59 @@
1
+ # When to Mock
2
+
3
+ Mock at **system boundaries** only:
4
+
5
+ - External APIs (payment, email, etc.)
6
+ - Databases (sometimes - prefer test DB)
7
+ - Time/randomness
8
+ - File system (sometimes)
9
+
10
+ Don't mock:
11
+
12
+ - Your own classes/modules
13
+ - Internal collaborators
14
+ - Anything you control
15
+
16
+ ## Designing for Mockability
17
+
18
+ At system boundaries, design interfaces that are easy to mock:
19
+
20
+ **1. Use dependency injection**
21
+
22
+ Pass external dependencies in rather than creating them internally:
23
+
24
+ ```typescript
25
+ // Easy to mock
26
+ function processPayment(order, paymentClient) {
27
+ return paymentClient.charge(order.total);
28
+ }
29
+
30
+ // Hard to mock
31
+ function processPayment(order) {
32
+ const client = new StripeClient(process.env.STRIPE_KEY);
33
+ return client.charge(order.total);
34
+ }
35
+ ```
36
+
37
+ **2. Prefer SDK-style interfaces over generic fetchers**
38
+
39
+ Create specific functions for each external operation instead of one generic function with conditional logic:
40
+
41
+ ```typescript
42
+ // GOOD: Each function is independently mockable
43
+ const api = {
44
+ getUser: (id) => fetch(`/users/${id}`),
45
+ getOrders: (userId) => fetch(`/users/${userId}/orders`),
46
+ createOrder: (data) => fetch('/orders', { method: 'POST', body: data }),
47
+ };
48
+
49
+ // BAD: Mocking requires conditional logic inside the mock
50
+ const api = {
51
+ fetch: (endpoint, options) => fetch(endpoint, options),
52
+ };
53
+ ```
54
+
55
+ The SDK approach means:
56
+ - Each mock returns one specific shape
57
+ - No conditional logic in test setup
58
+ - Easier to see which endpoints a test exercises
59
+ - Type safety per endpoint
@@ -0,0 +1,10 @@
1
+ # Refactor Candidates
2
+
3
+ After TDD cycle, look for:
4
+
5
+ - **Duplication** → Extract function/class
6
+ - **Long methods** → Break into private helpers (keep tests on public interface)
7
+ - **Shallow modules** → Combine or deepen
8
+ - **Feature envy** → Move logic to where data lives
9
+ - **Primitive obsession** → Introduce value objects
10
+ - **Existing code** the new code reveals as problematic
@@ -0,0 +1,61 @@
1
+ # Good and Bad Tests
2
+
3
+ ## Good Tests
4
+
5
+ **Integration-style**: Test through real interfaces, not mocks of internal parts.
6
+
7
+ ```typescript
8
+ // GOOD: Tests observable behavior
9
+ test("user can checkout with valid cart", async () => {
10
+ const cart = createCart();
11
+ cart.add(product);
12
+ const result = await checkout(cart, paymentMethod);
13
+ expect(result.status).toBe("confirmed");
14
+ });
15
+ ```
16
+
17
+ Characteristics:
18
+
19
+ - Tests behavior users/callers care about
20
+ - Uses public API only
21
+ - Survives internal refactors
22
+ - Describes WHAT, not HOW
23
+ - One logical assertion per test
24
+
25
+ ## Bad Tests
26
+
27
+ **Implementation-detail tests**: Coupled to internal structure.
28
+
29
+ ```typescript
30
+ // BAD: Tests implementation details
31
+ test("checkout calls paymentService.process", async () => {
32
+ const mockPayment = jest.mock(paymentService);
33
+ await checkout(cart, payment);
34
+ expect(mockPayment.process).toHaveBeenCalledWith(cart.total);
35
+ });
36
+ ```
37
+
38
+ Red flags:
39
+
40
+ - Mocking internal collaborators
41
+ - Testing private methods
42
+ - Asserting on call counts/order
43
+ - Test breaks when refactoring without behavior change
44
+ - Test name describes HOW not WHAT
45
+ - Verifying through external means instead of interface
46
+
47
+ ```typescript
48
+ // BAD: Bypasses interface to verify
49
+ test("createUser saves to database", async () => {
50
+ await createUser({ name: "Alice" });
51
+ const row = await db.query("SELECT * FROM users WHERE name = ?", ["Alice"]);
52
+ expect(row).toBeDefined();
53
+ });
54
+
55
+ // GOOD: Verifies through interface
56
+ test("createUser makes user retrievable", async () => {
57
+ const user = await createUser({ name: "Alice" });
58
+ const retrieved = await getUser(user.id);
59
+ expect(retrieved.name).toBe("Alice");
60
+ });
61
+ ```
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: to-issues
3
+ description: Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, or break down work into issues.
4
+ ---
5
+
6
+ # To Issues
7
+
8
+ Break a plan into independently-grabbable issues using vertical slices (tracer bullets).
9
+
10
+ The issue tracker and triage label vocabulary should have been provided to you — run `/setup-matt-pocock-skills` if not.
11
+
12
+ ## Process
13
+
14
+ ### 1. Gather context
15
+
16
+ Work from whatever is already in the conversation context. If the user passes an issue reference (issue number, URL, or path) as an argument, fetch it from the issue tracker and read its full body and comments.
17
+
18
+ ### 2. Explore the codebase (optional)
19
+
20
+ If you have not already explored the codebase, do so to understand the current state of the code. Issue titles and descriptions should use the project's domain glossary vocabulary, and respect ADRs in the area you're touching.
21
+
22
+ ### 3. Draft vertical slices
23
+
24
+ Break the plan into **tracer bullet** issues. Each issue is a thin vertical slice that cuts through ALL integration layers end-to-end, NOT a horizontal slice of one layer.
25
+
26
+ Slices may be 'HITL' or 'AFK'. HITL slices require human interaction, such as an architectural decision or a design review. AFK slices can be implemented and merged without human interaction. Prefer AFK over HITL where possible.
27
+
28
+ <vertical-slice-rules>
29
+ - Each slice delivers a narrow but COMPLETE path through every layer (schema, API, UI, tests)
30
+ - A completed slice is demoable or verifiable on its own
31
+ - Prefer many thin slices over few thick ones
32
+ </vertical-slice-rules>
33
+
34
+ ### 4. Quiz the user
35
+
36
+ Present the proposed breakdown as a numbered list. For each slice, show:
37
+
38
+ - **Title**: short descriptive name
39
+ - **Type**: HITL / AFK
40
+ - **Blocked by**: which other slices (if any) must complete first
41
+ - **User stories covered**: which user stories this addresses (if the source material has them)
42
+
43
+ Ask the user:
44
+
45
+ - Does the granularity feel right? (too coarse / too fine)
46
+ - Are the dependency relationships correct?
47
+ - Should any slices be merged or split further?
48
+ - Are the correct slices marked as HITL and AFK?
49
+
50
+ Iterate until the user approves the breakdown.
51
+
52
+ ### 5. Publish the issues to the issue tracker
53
+
54
+ For each approved slice, publish a new issue to the issue tracker. Use the issue body template below. These issues are considered ready for AFK agents, so publish them with the correct triage label unless instructed otherwise.
55
+
56
+ Publish issues in dependency order (blockers first) so you can reference real issue identifiers in the "Blocked by" field.
57
+
58
+ <issue-template>
59
+ ## Parent
60
+
61
+ A reference to the parent issue on the issue tracker (if the source was an existing issue, otherwise omit this section).
62
+
63
+ ## What to build
64
+
65
+ A concise description of this vertical slice. Describe the end-to-end behavior, not layer-by-layer implementation.
66
+
67
+ Avoid specific file paths or code snippets — they go stale fast. Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it here and note briefly that it came from a prototype. Trim to the decision-rich parts — not a working demo, just the important bits.
68
+
69
+ ## Acceptance criteria
70
+
71
+ - [ ] Criterion 1
72
+ - [ ] Criterion 2
73
+ - [ ] Criterion 3
74
+
75
+ ## Blocked by
76
+
77
+ - A reference to the blocking ticket (if any)
78
+
79
+ Or "None - can start immediately" if no blockers.
80
+
81
+ </issue-template>
82
+
83
+ Do NOT close or modify any parent issue.
@@ -0,0 +1,2 @@
1
+ frontmatter:
2
+ user-invocable: true
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "To Issues"
3
+ short_description: "Break a plan, spec, or PRD into independently-grabbable issues using vertical slices"
4
+ default_prompt: "Break this PRD into vertical-slice issues with clear acceptance criteria."
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: to-prd
3
+ description: Turn the current conversation context into a PRD and publish it to the project issue tracker. Use when user wants to create a PRD from the current context.
4
+ ---
5
+
6
+ This skill takes the current conversation context and codebase understanding and produces a PRD. Do NOT interview the user — just synthesize what you already know.
7
+
8
+ The issue tracker and triage label vocabulary should have been provided to you — run `/setup-matt-pocock-skills` if not.
9
+
10
+ ## Process
11
+
12
+ 1. Explore the repo to understand the current state of the codebase, if you haven't already. Use the project's domain glossary vocabulary throughout the PRD, and respect any ADRs in the area you're touching.
13
+
14
+ 2. Sketch out the major modules you will need to build or modify to complete the implementation. Actively look for opportunities to extract deep modules that can be tested in isolation.
15
+
16
+ A deep module (as opposed to a shallow module) is one which encapsulates a lot of functionality in a simple, testable interface which rarely changes.
17
+
18
+ Check with the user that these modules match their expectations. Check with the user which modules they want tests written for.
19
+
20
+ 3. Write the PRD using the template below, then publish it to the project issue tracker. Apply the `ready-for-agent` triage label - no need for additional triage.
21
+
22
+ <prd-template>
23
+
24
+ ## Problem Statement
25
+
26
+ The problem that the user is facing, from the user's perspective.
27
+
28
+ ## Solution
29
+
30
+ The solution to the problem, from the user's perspective.
31
+
32
+ ## User Stories
33
+
34
+ A LONG, numbered list of user stories. Each user story should be in the format of:
35
+
36
+ 1. As an <actor>, I want a <feature>, so that <benefit>
37
+
38
+ <user-story-example>
39
+ 1. As a mobile bank customer, I want to see balance on my accounts, so that I can make better informed decisions about my spending
40
+ </user-story-example>
41
+
42
+ This list of user stories should be extremely extensive and cover all aspects of the feature.
43
+
44
+ ## Implementation Decisions
45
+
46
+ A list of implementation decisions that were made. This can include:
47
+
48
+ - The modules that will be built/modified
49
+ - The interfaces of those modules that will be modified
50
+ - Technical clarifications from the developer
51
+ - Architectural decisions
52
+ - Schema changes
53
+ - API contracts
54
+ - Specific interactions
55
+
56
+ Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.
57
+
58
+ Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it within the relevant decision and note briefly that it came from a prototype. Trim to the decision-rich parts — not a working demo, just the important bits.
59
+
60
+ ## Testing Decisions
61
+
62
+ A list of testing decisions that were made. Include:
63
+
64
+ - A description of what makes a good test (only test external behavior, not implementation details)
65
+ - Which modules will be tested
66
+ - Prior art for the tests (i.e. similar types of tests in the codebase)
67
+
68
+ ## Out of Scope
69
+
70
+ A description of the things that are out of scope for this PRD.
71
+
72
+ ## Further Notes
73
+
74
+ Any further notes about the feature.
75
+
76
+ </prd-template>
@@ -0,0 +1,2 @@
1
+ frontmatter:
2
+ user-invocable: true
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "To PRD"
3
+ short_description: "Synthesize the current conversation into a PRD on the issue tracker"
4
+ default_prompt: "Turn what we just discussed into a PRD and submit it as an issue."
@@ -0,0 +1,168 @@
1
+ # Writing Agent Briefs
2
+
3
+ An agent brief is a structured comment posted on a GitHub issue when it moves to `ready-for-agent`. It is the authoritative specification that an AFK agent will work from. The original issue body and discussion are context — the agent brief is the contract.
4
+
5
+ ## Principles
6
+
7
+ ### Durability over precision
8
+
9
+ The issue may sit in `ready-for-agent` for days or weeks. The codebase will change in the meantime. Write the brief so it stays useful even as files are renamed, moved, or refactored.
10
+
11
+ - **Do** describe interfaces, types, and behavioral contracts
12
+ - **Do** name specific types, function signatures, or config shapes that the agent should look for or modify
13
+ - **Don't** reference file paths — they go stale
14
+ - **Don't** reference line numbers
15
+ - **Don't** assume the current implementation structure will remain the same
16
+
17
+ ### Behavioral, not procedural
18
+
19
+ Describe **what** the system should do, not **how** to implement it. The agent will explore the codebase fresh and make its own implementation decisions.
20
+
21
+ - **Good:** "The `SkillConfig` type should accept an optional `schedule` field of type `CronExpression`"
22
+ - **Bad:** "Open src/types/skill.ts and add a schedule field on line 42"
23
+ - **Good:** "When a user runs `/triage` with no arguments, they should see a summary of issues needing attention"
24
+ - **Bad:** "Add a switch statement in the main handler function"
25
+
26
+ ### Complete acceptance criteria
27
+
28
+ The agent needs to know when it's done. Every agent brief must have concrete, testable acceptance criteria. Each criterion should be independently verifiable.
29
+
30
+ - **Good:** "Running `gh issue list --label needs-triage` returns issues that have been through initial classification"
31
+ - **Bad:** "Triage should work correctly"
32
+
33
+ ### Explicit scope boundaries
34
+
35
+ State what is out of scope. This prevents the agent from gold-plating or making assumptions about adjacent features.
36
+
37
+ ## Template
38
+
39
+ ```markdown
40
+ ## Agent Brief
41
+
42
+ **Category:** bug / enhancement
43
+ **Summary:** one-line description of what needs to happen
44
+
45
+ **Current behavior:**
46
+ Describe what happens now. For bugs, this is the broken behavior.
47
+ For enhancements, this is the status quo the feature builds on.
48
+
49
+ **Desired behavior:**
50
+ Describe what should happen after the agent's work is complete.
51
+ Be specific about edge cases and error conditions.
52
+
53
+ **Key interfaces:**
54
+ - `TypeName` — what needs to change and why
55
+ - `functionName()` return type — what it currently returns vs what it should return
56
+ - Config shape — any new configuration options needed
57
+
58
+ **Acceptance criteria:**
59
+ - [ ] Specific, testable criterion 1
60
+ - [ ] Specific, testable criterion 2
61
+ - [ ] Specific, testable criterion 3
62
+
63
+ **Out of scope:**
64
+ - Thing that should NOT be changed or addressed in this issue
65
+ - Adjacent feature that might seem related but is separate
66
+ ```
67
+
68
+ ## Examples
69
+
70
+ ### Good agent brief (bug)
71
+
72
+ ```markdown
73
+ ## Agent Brief
74
+
75
+ **Category:** bug
76
+ **Summary:** Skill description truncation drops mid-word, producing broken output
77
+
78
+ **Current behavior:**
79
+ When a skill description exceeds 1024 characters, it is truncated at exactly
80
+ 1024 characters regardless of word boundaries. This produces descriptions
81
+ that end mid-word (e.g. "Use when the user wants to confi").
82
+
83
+ **Desired behavior:**
84
+ Truncation should break at the last word boundary before 1024 characters
85
+ and append "..." to indicate truncation.
86
+
87
+ **Key interfaces:**
88
+ - The `SkillMetadata` type's `description` field — no type change needed,
89
+ but the validation/processing logic that populates it needs to respect
90
+ word boundaries
91
+ - Any function that reads SKILL.md frontmatter and extracts the description
92
+
93
+ **Acceptance criteria:**
94
+ - [ ] Descriptions under 1024 chars are unchanged
95
+ - [ ] Descriptions over 1024 chars are truncated at the last word boundary
96
+ before 1024 chars
97
+ - [ ] Truncated descriptions end with "..."
98
+ - [ ] The total length including "..." does not exceed 1024 chars
99
+
100
+ **Out of scope:**
101
+ - Changing the 1024 char limit itself
102
+ - Multi-line description support
103
+ ```
104
+
105
+ ### Good agent brief (enhancement)
106
+
107
+ ```markdown
108
+ ## Agent Brief
109
+
110
+ **Category:** enhancement
111
+ **Summary:** Add `.out-of-scope/` directory support for tracking rejected feature requests
112
+
113
+ **Current behavior:**
114
+ When a feature request is rejected, the issue is closed with a `wontfix` label
115
+ and a comment. There is no persistent record of the decision or reasoning.
116
+ Future similar requests require the maintainer to recall or search for the
117
+ prior discussion.
118
+
119
+ **Desired behavior:**
120
+ Rejected feature requests should be documented in `.out-of-scope/<concept>.md`
121
+ files that capture the decision, reasoning, and links to all issues that
122
+ requested the feature. When triaging new issues, these files should be
123
+ checked for matches.
124
+
125
+ **Key interfaces:**
126
+ - Markdown file format in `.out-of-scope/` — each file should have a
127
+ `# Concept Name` heading, a `**Decision:**` line, a `**Reason:**` line,
128
+ and a `**Prior requests:**` list with issue links
129
+ - The triage workflow should read all `.out-of-scope/*.md` files early
130
+ and match incoming issues against them by concept similarity
131
+
132
+ **Acceptance criteria:**
133
+ - [ ] Closing a feature as wontfix creates/updates a file in `.out-of-scope/`
134
+ - [ ] The file includes the decision, reasoning, and link to the closed issue
135
+ - [ ] If a matching `.out-of-scope/` file already exists, the new issue is
136
+ appended to its "Prior requests" list rather than creating a duplicate
137
+ - [ ] During triage, existing `.out-of-scope/` files are checked and surfaced
138
+ when a new issue matches a prior rejection
139
+
140
+ **Out of scope:**
141
+ - Automated matching (human confirms the match)
142
+ - Reopening previously rejected features
143
+ - Bug reports (only enhancement rejections go to `.out-of-scope/`)
144
+ ```
145
+
146
+ ### Bad agent brief
147
+
148
+ ```markdown
149
+ ## Agent Brief
150
+
151
+ **Summary:** Fix the triage bug
152
+
153
+ **What to do:**
154
+ The triage thing is broken. Look at the main file and fix it.
155
+ The function around line 150 has the issue.
156
+
157
+ **Files to change:**
158
+ - src/triage/handler.ts (line 150)
159
+ - src/types.ts (line 42)
160
+ ```
161
+
162
+ This is bad because:
163
+ - No category
164
+ - Vague description ("the triage thing is broken")
165
+ - References file paths and line numbers that will go stale
166
+ - No acceptance criteria
167
+ - No scope boundaries
168
+ - No description of current vs desired behavior