opencodekit 0.21.10 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/AGENTS.md +116 -487
  3. package/dist/template/.opencode/README.md +1 -1
  4. package/dist/template/.opencode/agent/build.md +56 -396
  5. package/dist/template/.opencode/agent/explore.md +0 -1
  6. package/dist/template/.opencode/agent/review.md +0 -1
  7. package/dist/template/.opencode/agent/scout.md +0 -1
  8. package/dist/template/.opencode/agent/vision.md +0 -1
  9. package/dist/template/.opencode/command/clarify.md +48 -0
  10. package/dist/template/.opencode/command/commit.md +53 -0
  11. package/dist/template/.opencode/command/fix.md +56 -0
  12. package/dist/template/.opencode/command/improve-architecture.md +55 -0
  13. package/dist/template/.opencode/command/init.md +88 -68
  14. package/dist/template/.opencode/command/refactor.md +66 -0
  15. package/dist/template/.opencode/command/test.md +66 -0
  16. package/dist/template/.opencode/dcp.jsonc +13 -2
  17. package/dist/template/.opencode/memory/README.md +3 -5
  18. package/dist/template/.opencode/memory/_templates/adr.md +45 -0
  19. package/dist/template/.opencode/memory/project/gotchas.md +1 -1
  20. package/dist/template/.opencode/memory/session-context.md +1 -1
  21. package/dist/template/.opencode/plugin/README.md +1 -1
  22. package/dist/template/.opencode/plugin/guard.ts +62 -0
  23. package/dist/template/.opencode/plugin/{lib/memory-admin-tools.ts → memory/admin.ts} +4 -4
  24. package/dist/template/.opencode/plugin/{lib → memory}/capture.ts +1 -1
  25. package/dist/template/.opencode/plugin/{lib → memory}/compile.ts +2 -2
  26. package/dist/template/.opencode/plugin/{lib → memory}/context.ts +1 -1
  27. package/dist/template/.opencode/plugin/{lib → memory}/curator.ts +1 -1
  28. package/dist/template/.opencode/plugin/{lib → memory}/db/observations.ts +102 -3
  29. package/dist/template/.opencode/plugin/{lib → memory}/db/schema.ts +43 -1
  30. package/dist/template/.opencode/plugin/{lib → memory}/db/types.ts +22 -0
  31. package/dist/template/.opencode/plugin/{lib/memory-db.ts → memory/db.ts} +1 -1
  32. package/dist/template/.opencode/plugin/{lib → memory}/distill.ts +1 -1
  33. package/dist/template/.opencode/plugin/{lib/memory-helpers.ts → memory/helpers.ts} +5 -1
  34. package/dist/template/.opencode/plugin/{lib/memory-hooks.ts → memory/hooks.ts} +1 -1
  35. package/dist/template/.opencode/plugin/{lib → memory}/index-generator.ts +2 -2
  36. package/dist/template/.opencode/plugin/{lib → memory}/inject.ts +1 -1
  37. package/dist/template/.opencode/plugin/{lib → memory}/lint.ts +2 -2
  38. package/dist/template/.opencode/plugin/memory/tools.ts +322 -0
  39. package/dist/template/.opencode/plugin/{lib → memory}/validate.ts +2 -2
  40. package/dist/template/.opencode/plugin/memory.ts +7 -17
  41. package/dist/template/.opencode/plugin/srcwalk.ts +721 -0
  42. package/dist/template/.opencode/skill/agent-code-quality-gate/SKILL.md +98 -0
  43. package/dist/template/.opencode/skill/behavioral-kernel/SKILL.md +52 -0
  44. package/dist/template/.opencode/skill/browser-testing-with-devtools/SKILL.md +85 -0
  45. package/dist/template/.opencode/skill/code-cleanup/SKILL.md +114 -0
  46. package/dist/template/.opencode/skill/code-navigation/SKILL.md +142 -0
  47. package/dist/template/.opencode/skill/code-review-and-quality/SKILL.md +131 -0
  48. package/dist/template/.opencode/skill/debugging-and-error-recovery/SKILL.md +109 -0
  49. package/dist/template/.opencode/skill/deep-module-design/SKILL.md +207 -0
  50. package/dist/template/.opencode/skill/git-workflow-and-versioning/SKILL.md +77 -0
  51. package/dist/template/.opencode/skill/grill-me/SKILL.md +140 -0
  52. package/dist/template/.opencode/skill/memory-system/SKILL.md +9 -10
  53. package/dist/template/.opencode/skill/planning-and-task-breakdown/SKILL.md +116 -0
  54. package/dist/template/.opencode/skill/shipping-and-launch/SKILL.md +95 -0
  55. package/dist/template/.opencode/skill/source-driven-development/SKILL.md +103 -0
  56. package/dist/template/.opencode/skill/spec-driven-development/SKILL.md +121 -0
  57. package/dist/template/.opencode/skill/srcwalk/SKILL.md +161 -0
  58. package/dist/template/.opencode/skill/ubiquitous-language/SKILL.md +184 -0
  59. package/package.json +1 -1
  60. package/dist/template/.opencode/AGENT_ALIGNMENT.md +0 -564
  61. package/dist/template/.opencode/agent/painter.md +0 -83
  62. package/dist/template/.opencode/command/compound.md +0 -240
  63. package/dist/template/.opencode/command/curate.md +0 -299
  64. package/dist/template/.opencode/command/handoff.md +0 -149
  65. package/dist/template/.opencode/command/health.md +0 -356
  66. package/dist/template/.opencode/command/init-context.md +0 -297
  67. package/dist/template/.opencode/command/init-user.md +0 -125
  68. package/dist/template/.opencode/command/iterate.md +0 -200
  69. package/dist/template/.opencode/command/lfg.md +0 -173
  70. package/dist/template/.opencode/command/resume.md +0 -78
  71. package/dist/template/.opencode/command/status.md +0 -126
  72. package/dist/template/.opencode/command/ui-slop-check.md +0 -169
  73. package/dist/template/.opencode/plugin/lib/memory-tools.ts +0 -535
  74. package/dist/template/.opencode/skill/agent-evals/SKILL.md +0 -208
  75. package/dist/template/.opencode/skill/anti-ai-slop/SKILL.md +0 -76
  76. package/dist/template/.opencode/skill/augment-context-engine/SKILL.md +0 -122
  77. package/dist/template/.opencode/skill/augment-context-engine/mcp.json +0 -6
  78. package/dist/template/.opencode/skill/brand-asset-protocol/SKILL.md +0 -222
  79. package/dist/template/.opencode/skill/code-search-patterns/SKILL.md +0 -224
  80. package/dist/template/.opencode/skill/code-simplification/SKILL.md +0 -211
  81. package/dist/template/.opencode/skill/context-condensation/SKILL.md +0 -149
  82. package/dist/template/.opencode/skill/context-initialization/SKILL.md +0 -69
  83. package/dist/template/.opencode/skill/context-management/SKILL.md +0 -390
  84. package/dist/template/.opencode/skill/deep-research/SKILL.md +0 -384
  85. package/dist/template/.opencode/skill/design-direction-advisor/SKILL.md +0 -139
  86. package/dist/template/.opencode/skill/dispatching-parallel-agents/SKILL.md +0 -191
  87. package/dist/template/.opencode/skill/executing-plans/SKILL.md +0 -247
  88. package/dist/template/.opencode/skill/figma-go/SKILL.md +0 -65
  89. package/dist/template/.opencode/skill/finishing-a-development-branch/SKILL.md +0 -357
  90. package/dist/template/.opencode/skill/full-output-enforcement/SKILL.md +0 -62
  91. package/dist/template/.opencode/skill/gh-address-comments/SKILL.md +0 -29
  92. package/dist/template/.opencode/skill/gh-address-comments/scripts/fetch_comments.py +0 -237
  93. package/dist/template/.opencode/skill/gh-fix-ci/SKILL.md +0 -38
  94. package/dist/template/.opencode/skill/gh-fix-ci/scripts/inspect_pr_checks.py +0 -509
  95. package/dist/template/.opencode/skill/hi-fi-prototype-html/SKILL.md +0 -253
  96. package/dist/template/.opencode/skill/html-deck-export/SKILL.md +0 -189
  97. package/dist/template/.opencode/skill/index-knowledge/SKILL.md +0 -413
  98. package/dist/template/.opencode/skill/memory-grounding/SKILL.md +0 -68
  99. package/dist/template/.opencode/skill/playwriter/SKILL.md +0 -158
  100. package/dist/template/.opencode/skill/portless/SKILL.md +0 -109
  101. package/dist/template/.opencode/skill/prd/SKILL.md +0 -146
  102. package/dist/template/.opencode/skill/prd-task/SKILL.md +0 -182
  103. package/dist/template/.opencode/skill/prd-task/references/prd-schema.json +0 -124
  104. package/dist/template/.opencode/skill/prompt-leverage/SKILL.md +0 -90
  105. package/dist/template/.opencode/skill/prompt-leverage/references/framework.md +0 -91
  106. package/dist/template/.opencode/skill/prompt-leverage/scripts/augment_prompt.py +0 -157
  107. package/dist/template/.opencode/skill/receiving-code-review/SKILL.md +0 -263
  108. package/dist/template/.opencode/skill/reconcile/SKILL.md +0 -183
  109. package/dist/template/.opencode/skill/reflection-checkpoints/SKILL.md +0 -183
  110. package/dist/template/.opencode/skill/requesting-code-review/SKILL.md +0 -443
  111. package/dist/template/.opencode/skill/requesting-code-review/references/specialist-profiles.md +0 -108
  112. package/dist/template/.opencode/skill/requesting-code-review/review.md +0 -160
  113. package/dist/template/.opencode/skill/rtk-command-compression/SKILL.md +0 -134
  114. package/dist/template/.opencode/skill/screenshot/SKILL.md +0 -48
  115. package/dist/template/.opencode/skill/screenshot/scripts/ensure_macos_permissions.sh +0 -54
  116. package/dist/template/.opencode/skill/screenshot/scripts/macos_display_info.swift +0 -22
  117. package/dist/template/.opencode/skill/screenshot/scripts/macos_permissions.swift +0 -40
  118. package/dist/template/.opencode/skill/screenshot/scripts/macos_window_info.swift +0 -126
  119. package/dist/template/.opencode/skill/screenshot/scripts/take_screenshot.ps1 +0 -163
  120. package/dist/template/.opencode/skill/screenshot/scripts/take_screenshot.py +0 -585
  121. package/dist/template/.opencode/skill/security-threat-model/SKILL.md +0 -36
  122. package/dist/template/.opencode/skill/security-threat-model/references/prompt-template.md +0 -255
  123. package/dist/template/.opencode/skill/security-threat-model/references/security-controls-and-assets.md +0 -32
  124. package/dist/template/.opencode/skill/sharing-skills/SKILL.md +0 -214
  125. package/dist/template/.opencode/skill/skill-creator/SKILL.md +0 -181
  126. package/dist/template/.opencode/skill/skill-installer/SKILL.md +0 -58
  127. package/dist/template/.opencode/skill/skill-installer/scripts/github_utils.py +0 -21
  128. package/dist/template/.opencode/skill/skill-installer/scripts/install-skill-from-github.py +0 -313
  129. package/dist/template/.opencode/skill/skill-installer/scripts/list-skills.py +0 -106
  130. package/dist/template/.opencode/skill/swarm-coordination/SKILL.md +0 -244
  131. package/dist/template/.opencode/skill/swarm-coordination/references/architecture.md +0 -39
  132. package/dist/template/.opencode/skill/swarm-coordination/references/delegation-worker-protocol.md +0 -145
  133. package/dist/template/.opencode/skill/swarm-coordination/references/dependency-graph.md +0 -50
  134. package/dist/template/.opencode/skill/swarm-coordination/references/drift-check.md +0 -90
  135. package/dist/template/.opencode/skill/swarm-coordination/references/integration-beads.md +0 -20
  136. package/dist/template/.opencode/skill/swarm-coordination/references/launch-flow.md +0 -186
  137. package/dist/template/.opencode/skill/swarm-coordination/references/reconciler.md +0 -172
  138. package/dist/template/.opencode/skill/swarm-coordination/references/tier-enforcement.md +0 -78
  139. package/dist/template/.opencode/skill/swarm-coordination/references/tmux-integration.md +0 -134
  140. package/dist/template/.opencode/skill/systematic-debugging/SKILL.md +0 -402
  141. package/dist/template/.opencode/skill/terse-output-mode/SKILL.md +0 -95
  142. package/dist/template/.opencode/skill/think-in-code/SKILL.md +0 -136
  143. package/dist/template/.opencode/skill/ux-quality-gates/SKILL.md +0 -137
  144. package/dist/template/.opencode/skill/v1-run/SKILL.md +0 -175
  145. package/dist/template/.opencode/skill/v1-run/mcp.json +0 -6
  146. package/dist/template/.opencode/skill/verification-gates/SKILL.md +0 -63
  147. package/dist/template/.opencode/skill/visual-analysis/SKILL.md +0 -154
  148. package/dist/template/.opencode/skill/web-design-guidelines/SKILL.md +0 -46
  149. package/dist/template/.opencode/skill/workspace-setup/SKILL.md +0 -76
  150. package/dist/template/.opencode/skill/writing-plans/SKILL.md +0 -320
  151. /package/dist/template/.opencode/plugin/{lib → memory}/compact.ts +0 -0
  152. /package/dist/template/.opencode/plugin/{lib → memory}/db/graph.ts +0 -0
  153. /package/dist/template/.opencode/plugin/{lib → memory}/db/maintenance.ts +0 -0
  154. /package/dist/template/.opencode/plugin/{lib → memory}/db/pipeline.ts +0 -0
  155. /package/dist/template/.opencode/plugin/{lib → memory}/notify.ts +0 -0
  156. /package/dist/template/.opencode/plugin/{lib → memory}/operation-log.ts +0 -0
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: debugging-and-error-recovery
3
+ description: Guides root-cause debugging and safe recovery from failures. Use when tests fail, builds break, behavior is unexpected, or multiple fix attempts have not worked.
4
+ version: 1.0.0
5
+ tags: [debugging, workflow, verification]
6
+ dependencies: [test-driven-development, verification-before-completion]
7
+ agent_types: [worker, reviewer]
8
+ tools: [bash, srcwalk_search, srcwalk_deps]
9
+ ---
10
+
11
+ # Debugging & Error Recovery
12
+
13
+ ## Overview
14
+
15
+ Random fixes create new bugs. Debugging must move from symptom to root cause to guarded fix.
16
+
17
+ Core principle: reproduce, localize, reduce, fix, and guard before claiming resolution.
18
+
19
+ ## When to Use
20
+
21
+ - Test, lint, typecheck, build, or runtime failure.
22
+ - User reports a bug or unexpected behavior.
23
+ - A previous fix failed.
24
+ - Error crosses multiple layers or components.
25
+
26
+ ## When NOT to Use
27
+
28
+ - Feature work with no failure signal; use `incremental-implementation`.
29
+ - Pure research; use `source-driven-development`.
30
+
31
+ ## Workflow
32
+
33
+ 1. Read the full error and relevant logs.
34
+ 2. Reproduce the failure or state why it cannot be reproduced.
35
+ 3. Localize the failing layer: input, boundary, business logic, integration, environment.
36
+ 4. Reduce to the smallest failing case.
37
+ 5. Form one hypothesis and test it with one change or one diagnostic.
38
+ 6. Write a failing regression test when behavior can be tested.
39
+ 7. Fix the root cause, not only the symptom.
40
+ 8. Run the original reproduction and relevant regression checks.
41
+ 9. If three fix attempts fail, stop and escalate architecture/assumption risk.
42
+
43
+ ## Evidence Log
44
+
45
+ For complex bugs, maintain a short log in the response or a debug artifact:
46
+
47
+ ```markdown
48
+ ## Symptoms
49
+ - ...
50
+ ## Reproduction
51
+ - ...
52
+ ## Hypotheses Eliminated
53
+ - ...
54
+ ## Root Cause
55
+ - ...
56
+ ## Fix and Guard
57
+ - ...
58
+ ```
59
+
60
+ ## Common Rationalizations
61
+
62
+ | Rationalization | Rebuttal |
63
+ | --- | --- |
64
+ | "This is probably the issue" | Probably is a hypothesis, not evidence. Test it minimally. |
65
+ | "I'll patch the symptom now" | Symptom patches hide root causes and regress later. |
66
+ | "Multiple fixes will save time" | You will not know which change mattered. |
67
+ | "The test failure is unrelated" | Prove it with isolation before ignoring it. |
68
+ | "One more attempt" | After three failed fixes, the model is wrong. Stop and rethink. |
69
+
70
+ ## Red Flags
71
+
72
+ - Code changes before reproduction.
73
+ - Fix proposed before reading the full error.
74
+ - Same failure persists after two attempts.
75
+ - New failures appear in different layers.
76
+ - Regression test is skipped for a reproducible bug.
77
+ - Success claimed without re-running the original failing scenario.
78
+
79
+ ## Verification
80
+
81
+ - Original failure is reproduced or documented as non-reproducible.
82
+ - Root cause is stated with evidence.
83
+ - Regression test or guard exists when feasible.
84
+ - Original scenario now passes.
85
+ - Related tests/checks pass.
86
+
87
+ ## Skill Result Contract
88
+
89
+ ```xml
90
+ <skill_result>
91
+ <skill>debugging-and-error-recovery</skill>
92
+ <status>success|partial|blocked|failure</status>
93
+ <evidence>Reproduction, root cause, fix, and verification commands</evidence>
94
+ <artifacts>Changed files, tests, debug notes</artifacts>
95
+ <risks>Non-reproducible behavior, missing regression test, or none</risks>
96
+ </skill_result>
97
+ ```
98
+
99
+
100
+ ## Consolidated Debugging Workflow
101
+
102
+ This is the canonical active debugging skill. It absorbs systematic-debugging while preserving root-cause discipline. Use root-cause-tracing as an advanced companion when the failure is deep in execution.
103
+
104
+ Required posture:
105
+ - reproduce or observe the failure before fixing;
106
+ - state the hypothesis and evidence;
107
+ - change one causal layer at a time;
108
+ - verify the failure mode is gone;
109
+ - record recovery actions and residual risk.
@@ -0,0 +1,207 @@
1
+ ---
2
+ name: deep-module-design
3
+ description: Applies Ousterhout's deep module principles to code design — small interfaces, information hiding, pull complexity downward. Use when designing modules, refactoring shallow structures, or reviewing AI-generated code for structural quality.
4
+ version: 1.0.0
5
+ tags: [architecture, code-quality, ousterhout]
6
+ dependencies: []
7
+ agent_types: [planner, worker, reviewer]
8
+ tools: [srcwalk_search, srcwalk_deps]
9
+ ---
10
+
11
+ # Deep Module Design
12
+
13
+ > Based on John Ousterhout's *A Philosophy of Software Design*
14
+
15
+ ## Overview
16
+
17
+ A deep module has a **small interface relative to its implementation**. It provides significant functionality through a compact abstraction, hiding complexity from its callers. A shallow module has an **interface as complex as its implementation** — it wraps one small thing with ceremony, adding overhead without hiding anything.
18
+
19
+ **Why this matters for AI agents:** AI coding tools generate code faster than humans can review. Shallow modules compound this problem — every AI pass can produce more tiny, shallow abstractions that increase cognitive load without reducing complexity. Deep modules constrain the AI: a small, stable interface limits the blast radius of AI-generated changes and makes verification tractable.
20
+
21
+ > *"The most important technique for achieving deep modules is information hiding."* — Ousterhout
22
+
23
+ ## When to Use
24
+
25
+ - Designing a new module, class, or API boundary
26
+ - Reviewing code for structural quality (beyond just correctness)
27
+ - Refactoring a codebase where changes are too expensive because interfaces are too complex
28
+ - Working with AI agents that need tight, stable interfaces to produce reliable code
29
+ - Any time you find yourself writing a class/method that just calls another class/method
30
+
31
+ ## When NOT to Use
32
+
33
+ - Prototyping where the abstraction will change completely (use after stabilization)
34
+ - Tiny utility functions that are inherently single-purpose and shallow by nature
35
+ - Code that will be replaced within the sprint
36
+
37
+ ## Core Concept: Deep vs Shallow
38
+
39
+ ### Deep Module
40
+
41
+ ```
42
+ ┌─────────────────────────────────────┐
43
+ │ COMPLEX IMPLEMENTATION │
44
+ │ (caching, retries, batching, │
45
+ │ connection pooling, fallbacks) │
46
+ │ │
47
+ │ ┌─────────────────────────────┐ │
48
+ │ │ SMALL INTERFACE │ │
49
+ │ │ get(key), set(key, val) │ │
50
+ │ └─────────────────────────────┘ │
51
+ └─────────────────────────────────────┘
52
+ ```
53
+
54
+ Example: Unix I/O (`open`, `read`, `write`, `close`). Five system calls hide filesystems, device drivers, disk scheduling, buffering, permissions, and network mounts. The interface has not changed in decades.
55
+
56
+ ### Shallow Module
57
+
58
+ ```
59
+ ┌─────────────────────┐
60
+ │ SMALL IMPLEMENT. │
61
+ │ (just wraps one │
62
+ │ function call) │
63
+ │ │
64
+ │ ┌───────────────┐ │
65
+ │ │ COMPLEX IFACE │ │
66
+ │ │ many methods, │ │
67
+ │ │ many config │ │
68
+ │ │ options │ │
69
+ │ └───────────────┘ │
70
+ └─────────────────────┘
71
+ ```
72
+
73
+ Example: A "ParserFactory" that has one method `createParser(type)` which does a switch statement. The factory adds a class, an interface, and a registration mechanism — more surface area than the problem requires. Better to just call the parser directly or use a simple config object.
74
+
75
+ ### Self-Test
76
+
77
+ Ask about ANY module you design or review:
78
+
79
+ > "Can I understand this module's interface in 30 seconds?"
80
+ > "Does the caller need to know implementation details to use it?"
81
+ > "Is this module's API surface area proportional to the complexity it hides?"
82
+
83
+ If the interface takes longer to learn than the implementation, the module is shallow — either deepen it or eliminate it.
84
+
85
+ ## Design Principles
86
+
87
+ ### 1. Information Hiding
88
+
89
+ The most important technique for achieving deep modules. Every implementation detail that callers don't need to know about should be private, internal, or abstracted away.
90
+
91
+ **Signs of information leakage:**
92
+ - Configuration that callers must set but relates to internal behavior (buffer sizes, retry counts, thread pool sizes)
93
+ - Methods that expose internal types (returning database rows, internal DTOs)
94
+ - Callers constructing complex intermediate objects before calling your API
95
+
96
+ **Fix:** Move the complexity inside. Default everything. Accept simple inputs.
97
+
98
+ ### 2. Pull Complexity Downward
99
+
100
+ If a feature introduces complexity, handle it inside the module rather than pushing it to callers.
101
+
102
+ | ❌ Pushed to caller | ✅ Pulled downward |
103
+ |---|---|
104
+ | Caller must handle retries, timeouts, and fallbacks | Module handles them internally |
105
+ | Caller must format data correctly before passing | Module accepts raw data and transforms it |
106
+ | Caller must manage connection lifecycle | Module manages pools transparently |
107
+
108
+ > *"It is more important for a module to have a simple interface than a simple implementation."* — Ousterhout
109
+
110
+ ### 3. General-Purpose vs Special-Purpose
111
+
112
+ General-purpose modules tend to be **deeper** because they solve a class of problems, not just one specific case. Special-purpose modules tend to be **shallower** because they're closely coupled to one use case.
113
+
114
+ **Rule of thumb:** Design modules to solve general problems. A "UserRepository" is deep (CRUD + queries for any user need). A "GetUserForLoginHandler" is shallow (only handles one specific query) — better to have a general `getUser` method and let callers filter as needed.
115
+
116
+ **Exception:** If the general-purpose interface would be significantly harder to understand, keep it special-purpose. Depth wins over generality.
117
+
118
+ ### 4. Different Layer, Different Abstraction
119
+
120
+ Each layer of a system should provide a **different abstraction**. If two layers provide the same abstraction, one of them is redundant.
121
+
122
+ **Red flag — pass-through methods:**
123
+ ```typescript
124
+ // Layer 2: Service layer
125
+ class UserService {
126
+ constructor(private repo: UserRepository) {}
127
+
128
+ // This is a pass-through — it adds nothing
129
+ getUser(id: string) {
130
+ return this.repo.findById(id);
131
+ }
132
+ }
133
+ ```
134
+
135
+ If a method does nothing except delegate with the exact same signature, it's a **pass-through method** — a sign the layer boundary is wrong. Either make the layer do something meaningful, or remove it.
136
+
137
+ **Red flag — pass-through variables:**
138
+ ```typescript
139
+ // Top-level handler
140
+ function handleRequest(req, config) {
141
+ return processRequest(req, config);
142
+ }
143
+
144
+ // Middle layer
145
+ function processRequest(req, config) {
146
+ return executeQuery(req, config);
147
+ }
148
+
149
+ // Bottom layer
150
+ function executeQuery(req, config) {
151
+ return db.query(req, config);
152
+ }
153
+ ```
154
+
155
+ When the same variable (`config`) passes through multiple layers without being used by the middle layers, it's a **pass-through variable**. This couples all layers to the config shape. Fix: put config in a global context, or restructure so the middle layers don't need it.
156
+
157
+ ## Red Flag Catalog
158
+
159
+ | Red Flag | What it looks like | Fix |
160
+ |---|---|---|
161
+ | **Shallow module** | Interface as complex as its implementation | Eliminate or merge into caller |
162
+ | **Information leakage** | One module exposes types another module depends on | Move the types to a shared neutral location or hide them |
163
+ | **Pass-through method** | Method just delegates with same signature | Remove the middle layer or make it add value |
164
+ | **Pass-through variable** | Same data flows through many layers unused | Use a context object or restructure |
165
+ | **Replicated code smell** | Same pattern appears across modules instead of once | Extract a deeper module that encapsulates the pattern |
166
+ | **Configuration pollution** | Callers must configure internal behavior (buffer sizes, timeouts) | Auto-detect or default everything |
167
+ | **Returning internal state** | API exposes DB rows, internal DTOs, or raw storage types | Map to public types at the boundary |
168
+ | **Temporal coupling** | Methods must be called in a specific order not enforced by types | Design so invalid states are unrepresentable |
169
+
170
+ ## AI-Specific Applications
171
+
172
+ Deep modules are especially valuable for AI-generated code:
173
+
174
+ | Problem | Deep module solution |
175
+ |---|---|
176
+ | AI creates shallow wrappers every time it refactors | Eliminate or merge them — keep the abstraction layer count minimal |
177
+ | AI introduces pass-through methods when adding layers | Spot them in review and remove — they add surface area without depth |
178
+ | AI makes cascading changes because interfaces are too wide | Narrow interfaces — a small, stable surface limits blast radius |
179
+ | AI generates inconsistent implementations across similar operations | Create one deep general-purpose module the AI can reuse instead of reimplementing |
180
+ | AI hallucinates configuration options the module doesn't need | Remove configurability — deep modules default aggressively |
181
+
182
+ ## Verification
183
+
184
+ - [ ] Every module's interface is easier to understand than its implementation
185
+ - [ ] No pass-through methods (methods that just delegate with same signature)
186
+ - [ ] No information leakage (callers don't depend on internal types)
187
+ - [ ] No configuration that should be internalized
188
+ - [ ] Different layers provide different abstractions
189
+ - [ ] AI agents could safely use this module without reading its implementation
190
+
191
+ ## See Also
192
+
193
+ - **code-review-and-quality** — Assess for shallow modules and information leakage during review
194
+ - **api-and-interface-design** — Deep module principles applied to REST/API design
195
+ - **code-cleanup** — Consolidate shallow modules during cleanup passes
196
+
197
+ ## Skill Result Contract
198
+
199
+ ```xml
200
+ <skill_result>
201
+ <skill>deep-module-design</skill>
202
+ <status>success|partial|blocked|failure</status>
203
+ <evidence>Modules assessed, red flags found or cleared, depth ratio evaluated</evidence>
204
+ <artifacts>Files or modules reviewed/designed</artifacts>
205
+ <risks>Known shallow modules deferred, or none</risks>
206
+ </skill_result>
207
+ ```
@@ -0,0 +1,77 @@
1
+ ---
2
+ name: git-workflow-and-versioning
3
+ description: Use when making code changes that need safe git hygiene, atomic commits, branch strategy, versioning, changelog entries, or release preparation. Covers trunk-based development, commit-as-save-point discipline, and avoiding accidental unrelated changes.
4
+ version: 1.0.0
5
+ tags: [git, workflow, shipping]
6
+ dependencies: []
7
+ agent_types: [planner, worker, reviewer]
8
+ tools: [bash]
9
+ ---
10
+
11
+ # Git Workflow and Versioning
12
+
13
+ ## Overview
14
+
15
+ Git workflow keeps changes reviewable, reversible, and shippable. Treat commits as verified save points, not dumping grounds.
16
+
17
+ ## When to Use
18
+
19
+ - Any meaningful code change that may be committed, reviewed, or shipped.
20
+ - Creating or finishing a feature branch.
21
+ - Preparing release notes, version bumps, or changelog entries.
22
+ - Splitting a large diff into safe review units.
23
+ - Working in a dirty worktree where unrelated user changes may exist.
24
+
25
+ ## When NOT to Use
26
+
27
+ - Read-only investigation with no file changes.
28
+ - Throwaway local experiments that will be discarded before reporting.
29
+
30
+ ## Process
31
+
32
+ 1. Inspect worktree state before editing: `git status --short`.
33
+ 2. Identify unrelated changes and leave them untouched.
34
+ 3. Keep each change atomic: one intent, one reviewable diff, one verification story.
35
+ 4. Prefer trunk-based flow: short-lived branches, small PRs, frequent integration.
36
+ 5. Use commits as save points only after verification passes or after clearly labeling partial work.
37
+ 6. Scope staging to your files only; never use `git add .` in a mixed worktree.
38
+ 7. For versioning, update the smallest required surface: package version, changelog, migration note, release tag, or docs.
39
+ 8. Before shipping, confirm status, diff summary, verification evidence, and rollback path.
40
+
41
+ ## Common Rationalizations
42
+
43
+ | Rationalization | Rebuttal |
44
+ | --- | --- |
45
+ | "I'll clean up the commit later." | Later cleanup often loses intent. Keep the diff clean while it is fresh. |
46
+ | "This unrelated formatting is harmless." | It increases review noise and can hide real regressions. |
47
+ | "One big commit is faster." | Small verified commits are easier to review, revert, bisect, and ship. |
48
+ | "The worktree was already dirty." | Dirty worktrees require more discipline, not less. |
49
+
50
+ ## Red Flags
51
+
52
+ - Staging broad paths without reviewing the diff.
53
+ - Mixing feature work, refactors, formatting, and dependency updates.
54
+ - Committing generated or cache files unintentionally.
55
+ - Version bump without changelog or release rationale.
56
+ - Claiming clean worktree without checking status.
57
+
58
+ ## Verification
59
+
60
+ Before declaring git workflow complete, provide:
61
+
62
+ - `git status --short` summary.
63
+ - Diff or staged-file summary for touched files.
64
+ - Verification commands and outcomes.
65
+ - Commit/version/changelog action taken, or explicit reason none was needed.
66
+
67
+ ## Skill Result Contract
68
+
69
+ ```xml
70
+ <skill_result>
71
+ <skill>git-workflow-and-versioning</skill>
72
+ <status>completed|blocked|skipped</status>
73
+ <artifacts>Branch, commit, changelog, version file, or none</artifacts>
74
+ <evidence>git status/diff summary and verification commands</evidence>
75
+ <risks>Unrelated worktree changes, uncommitted files, release risk, or none</risks>
76
+ </skill_result>
77
+ ```
@@ -0,0 +1,140 @@
1
+ ---
2
+ name: grill-me
3
+ description: Adversarial interrogation of ideas before implementation — pushes on ambiguity, hidden assumptions, missing constraints, and hand-waving. Use when you have a rough idea, ADR, PRD, or spec that needs to survive scrutiny before code is written.
4
+ version: 1.0.0
5
+ tags: [planning, review, decision]
6
+ dependencies: [brainstorming, spec-driven-development]
7
+ agent_types: [planner, worker, reviewer]
8
+ tools: []
9
+ ---
10
+
11
+ # Grill Me — Adversarial Idea Interrogation
12
+
13
+ > **Replaces** skipping straight from idea to implementation without pressure-testing the plan.
14
+ > **Sits between** `brainstorming` (collaborative refinement) and `spec-driven-development` (formal spec/ADR creation).
15
+
16
+ ## When to Use
17
+
18
+ - You have a rough idea that needs to be tested before implementation
19
+ - You just finished brainstorming and need to find the flaws
20
+ - You have an existing ADR, PRD, or spec that needs to be stress-tested
21
+ - The agent (me) seems unclear about what to build and you want to surface that confusion
22
+
23
+ ## When NOT to Use
24
+
25
+ - Requirements are already well-understood and the task is mechanical
26
+ - You are already in implementation with a validated plan
27
+ - The task is trivial (< 1 file, no decisions needed)
28
+ - You need creative exploration (use `brainstorming` instead)
29
+
30
+ ## How This Is Different From Brainstorming
31
+
32
+ | Brainstorming | Grill Me |
33
+ |---|---|
34
+ | Collaborative exploration | Adversarial interrogation |
35
+ | "What do we need to build?" | "Why is this idea wrong or incomplete?" |
36
+ | Generates options and approaches | Destroys weak options |
37
+ | Asks clarifying questions | Asks challenging, uncomfortable questions |
38
+ | Refines the idea | Tests if the idea survives scrutiny |
39
+ | Output: a better design | Output: resolved uncertainties, killed bad ideas, hardened decisions |
40
+
41
+ ## Process
42
+
43
+ ### Phase 1: Surface the Idea
44
+
45
+ Read the available context — the user's prompt, any existing docs, the repo structure, relevant code. Identify exactly what is being proposed. Restate it clearly so the human can correct any misunderstanding.
46
+
47
+ ### Phase 2: Interrogate
48
+
49
+ Go after the idea systematically. Do not be polite. Do not assume the idea is sound. Push on:
50
+
51
+ **Ambiguity**
52
+ - Which terms in this description could mean different things to different people?
53
+ - What's the actual scope boundary — what's explicitly in, what's explicitly out?
54
+ - Can you point to a concrete example of the expected behavior?
55
+
56
+ **Hidden assumptions**
57
+ - What does this idea assume about the existing system?
58
+ - What does it assume about user behavior, data quality, or failure modes?
59
+ - What does it assume about team capacity, deployment timeline, or external dependencies?
60
+ - What does it assume the human reviewer will accept without question?
61
+
62
+ **Missing constraints**
63
+ - What constraints are implicit but never stated?
64
+ - Performance? Security? Backward compatibility? Error handling? Observability?
65
+ - What existing patterns in the codebase constrain this design?
66
+ - What deadlines or external commitments constrain the approach?
67
+
68
+ **Hand-waving**
69
+ - Where does the idea say "we'll figure that out later"?
70
+ - Where are the "obviously" or "simply" or "just" statements? Those are hiding complexity.
71
+ - What's the hardest part of this idea, and how does the current plan address it?
72
+ - What would have to go wrong for this idea to fail, and how would we know?
73
+
74
+ **Integration & blast radius**
75
+ - What existing code would this touch?
76
+ - What would break if this change were deployed?
77
+ - What tests would need to change?
78
+ - What documentation would become outdated?
79
+
80
+ ### Phase 3: Resolve
81
+
82
+ For each question raised in Phase 2:
83
+
84
+ 1. Present the question to the human with a concrete example
85
+ 2. Let the human answer or make a decision
86
+ 3. Record the resolution
87
+ 4. Update any existing documents (ADR, PRD, spec) with the new information
88
+
89
+ If the human cannot answer a question, flag it as a blocker — do not proceed to implementation until it's resolved.
90
+
91
+ ### Phase 4: Assess
92
+
93
+ After all questions have been addressed:
94
+
95
+ - **Is the idea clearly defined enough to proceed?** YES → recommend writing it up as an ADR or spec via `documentation-and-adrs` or `spec-driven-development`.
96
+ - **Is the idea fundamentally flawed?** YES → say so directly. Explain why and suggest alternatives.
97
+ - **Are there too many unresolved questions?** YES → recommend another brainstorming round or more research before committing to implementation.
98
+
99
+ ### Phase 5 (optional): Grill-with-Docs
100
+
101
+ If you're working with an existing ADR, PRD, or spec document:
102
+
103
+ 1. Read the document(s) thoroughly
104
+ 2. Apply the same interrogation against the document content
105
+ 3. For each gap found, propose edits to the document
106
+ 4. Present the proposed edits to the human for approval
107
+ 5. Apply approved edits
108
+
109
+ ## Success Criteria
110
+
111
+ The grilling is complete when:
112
+ - Questions start repeating (you've exhausted the line of inquiry)
113
+ - Added precision stops changing the plan (diminishing returns)
114
+ - Every ambiguity, assumption, constraint gap, and hand-wave has been surfaced and either resolved or flagged as a blocker
115
+ - You can state clearly: "this idea is ready for an ADR/spec" or "this idea should be killed/reworked"
116
+
117
+ ## Output
118
+
119
+ Leave behind a clear summary of:
120
+ - What was challenged and resolved
121
+ - What decisions were made
122
+ - What remains blocked or unresolved
123
+ - Recommended next step (ADR, spec, more research, kill the idea)
124
+
125
+ This summary becomes the input for the next phase (ADR writing or spec-driven-development).
126
+
127
+ ## Anti-Patterns
128
+
129
+ - **Being too nice.** This is not a collaborative exploration — this is an adversarial review. If you're not making the human think hard, you're doing it wrong.
130
+ - **Grilling during implementation.** Do this BEFORE any code is written. Once files change, the cost of finding a flaw is much higher.
131
+ - **Grilling trivial tasks.** A one-line bugfix doesn't need this. Use judgment.
132
+ - **Accepting "we'll fix it later."** If something is identified as risky, it needs a decision now or a clear blocker flag.
133
+ - **Grilling without context.** Read the repo, understand the existing patterns, and ground your questions in actual code.
134
+
135
+ ## See Also
136
+
137
+ - `brainstorming` — collaborative exploration (use before grilling)
138
+ - `spec-driven-development` — formal spec writing (use after grilling)
139
+ - `documentation-and-adrs` — recording decisions in ADR format
140
+ - `development-lifecycle` — full phased workflow
@@ -31,21 +31,20 @@ dependencies: []
31
31
  - Run `memory-search` with task keywords before implementation.
32
32
  - Check recent handoffs when resuming interrupted work.
33
33
  2. **Calibrate (progressive disclosure)**
34
- - Use search results as index.
35
- - Fetch full entries only for relevant IDs (`memory-get`).
36
- - Pull timeline context only when sequencing matters (`memory-timeline`).
34
+ - Use search results as index; `memory-search({ file: "..." })` for file access.
35
+ - Retrieve full observation details from search output.
37
36
  3. **Record (high-signal only)**
38
37
  - Create `observation` for decisions, bugfixes, patterns, warnings, or durable learnings.
39
38
  - Include searchable concepts and concrete file references.
40
39
  4. **Handoff (if session boundary)**
41
- - Write a concise status note with completed work, blockers, and next steps using `memory-update` under `handoffs/`.
40
+ - Write a concise status note with completed work, blockers, and next steps using `observation`.
42
41
 
43
42
  ## What Goes Where
44
43
 
45
44
  | Store | Put Here | Avoid Here |
46
45
  | --- | --- | --- |
47
- | `observation` (SQLite) | Events: decisions, bugfixes, reusable patterns, warnings | Temporary notes, speculative ideas without evidence |
48
- | `memory-update` files | Durable docs: handoffs, research, project notes | Every minor runtime detail from a single debug run |
46
+ | `observation` (SQLite) | Events: decisions, bugfixes, reusable patterns, warnings, handoffs | Temporary notes, speculative ideas without evidence |
47
+ | `memory-search` by file | Durable docs: handoffs, research, project notes | Every minor runtime detail from a single debug run |
49
48
  | Auto pipeline | Captured messages + distillations (automatic) | Manual copying of full transcripts |
50
49
 
51
50
  ## Observation Quality Bar
@@ -66,7 +65,7 @@ If most answers are "no", skip creating the observation.
66
65
  | Storing transient debugging info as permanent observations | Pollutes search results with low-value noise | Keep transient info in session context; record only durable findings |
67
66
  | Creating observations for every small finding (signal-to-noise) | Important items get buried and retrieval quality drops | Batch minor notes; publish one distilled observation per meaningful outcome |
68
67
  | Not searching memory before creating duplicate observations | Produces conflicting/duplicated records | Run `memory-search` first; update/supersede existing records when appropriate |
69
- | Using `memory-update` for data that should be an observation | Durable events become hard to discover and rank | Use `observation` for events; reserve `memory-update` for document-style files |
68
+ | Using `observation` with `file` param for document-style content | Document-style content should use `memory-search({ file: "..." })` for file access | Use `observation` for events; write to memory files when structured document storage is needed |
70
69
 
71
70
  ## Verification
72
71
 
@@ -114,9 +113,9 @@ memory-admin({ operation: "log" })
114
113
 
115
114
  ### Reading Compiled Artifacts
116
115
  ```
117
- memory-read({ file: "index" }) // Full observation catalog
118
- memory-read({ file: "compiled/auth" }) // Compiled article for "auth" concept
119
- memory-read({ file: "log" }) // Operation audit trail
116
+ memory-search({ file: "index" }) // Full observation catalog
117
+ memory-search({ file: "compiled/auth" }) // Compiled article for "auth" concept
118
+ memory-search({ file: "log" }) // Operation audit trail
120
119
  ```
121
120
 
122
121
  ## Validation Gate