opencodekit 0.21.10 → 0.23.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 (213) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +4 -25
  3. package/dist/template/.opencode/.template-manifest.json +115 -188
  4. package/dist/template/.opencode/AGENTS.md +127 -484
  5. package/dist/template/.opencode/README.md +2 -2
  6. package/dist/template/.opencode/agent/build.md +158 -356
  7. package/dist/template/.opencode/agent/explore.md +0 -1
  8. package/dist/template/.opencode/agent/plan.md +7 -16
  9. package/dist/template/.opencode/agent/review.md +0 -1
  10. package/dist/template/.opencode/agent/scout.md +2 -3
  11. package/dist/template/.opencode/agent/vision.md +0 -1
  12. package/dist/template/.opencode/artifacts/.active +1 -0
  13. package/dist/template/.opencode/artifacts/example/plan.md +12 -0
  14. package/dist/template/.opencode/artifacts/example/progress.md +4 -0
  15. package/dist/template/.opencode/artifacts/example/research.md +4 -0
  16. package/dist/template/.opencode/artifacts/example/spec.md +16 -0
  17. package/dist/template/.opencode/artifacts/todo.md +5 -0
  18. package/dist/template/.opencode/artifacts/verify.log +4 -0
  19. package/dist/template/.opencode/command/clarify.md +46 -0
  20. package/dist/template/.opencode/command/commit.md +53 -0
  21. package/dist/template/.opencode/command/create.md +29 -71
  22. package/dist/template/.opencode/command/design.md +1 -2
  23. package/dist/template/.opencode/command/explore.md +3 -4
  24. package/dist/template/.opencode/command/fix.md +55 -0
  25. package/dist/template/.opencode/command/improve-architecture.md +55 -0
  26. package/dist/template/.opencode/command/init.md +86 -69
  27. package/dist/template/.opencode/command/plan.md +30 -60
  28. package/dist/template/.opencode/command/pr.md +10 -28
  29. package/dist/template/.opencode/command/refactor.md +65 -0
  30. package/dist/template/.opencode/command/research.md +7 -29
  31. package/dist/template/.opencode/command/review-codebase.md +6 -13
  32. package/dist/template/.opencode/command/ship.md +136 -78
  33. package/dist/template/.opencode/command/test.md +66 -0
  34. package/dist/template/.opencode/command/ui-review.md +2 -4
  35. package/dist/template/.opencode/command/verify.md +15 -23
  36. package/dist/template/.opencode/dcp.jsonc +96 -85
  37. package/dist/template/.opencode/memory/README.md +4 -6
  38. package/dist/template/.opencode/memory/_templates/adr.md +45 -0
  39. package/dist/template/.opencode/memory/_templates/prd.md +1 -1
  40. package/dist/template/.opencode/memory/_templates/roadmap.md +1 -1
  41. package/dist/template/.opencode/memory/_templates/state.md +1 -1
  42. package/dist/template/.opencode/memory/project/gotchas.md +4 -4
  43. package/dist/template/.opencode/memory/project/project.md +2 -2
  44. package/dist/template/.opencode/memory/project/roadmap.md +1 -1
  45. package/dist/template/.opencode/memory/project/state.md +2 -2
  46. package/dist/template/.opencode/memory/project/tech-stack.md +2 -2
  47. package/dist/template/.opencode/memory/session-context.md +1 -1
  48. package/dist/template/.opencode/opencode.json +14 -152
  49. package/dist/template/.opencode/plugin/README.md +2 -2
  50. package/dist/template/.opencode/plugin/guard.ts +62 -0
  51. package/dist/template/.opencode/plugin/{lib/memory-admin-tools.ts → memory/admin.ts} +4 -4
  52. package/dist/template/.opencode/plugin/{lib → memory}/capture.ts +1 -1
  53. package/dist/template/.opencode/plugin/{lib → memory}/compile.ts +2 -2
  54. package/dist/template/.opencode/plugin/{lib → memory}/context.ts +1 -1
  55. package/dist/template/.opencode/plugin/{lib → memory}/curator.ts +1 -1
  56. package/dist/template/.opencode/plugin/{lib → memory}/db/observations.ts +102 -3
  57. package/dist/template/.opencode/plugin/{lib → memory}/db/schema.ts +43 -1
  58. package/dist/template/.opencode/plugin/{lib → memory}/db/types.ts +22 -0
  59. package/dist/template/.opencode/plugin/{lib/memory-db.ts → memory/db.ts} +1 -1
  60. package/dist/template/.opencode/plugin/{lib → memory}/distill.ts +1 -1
  61. package/dist/template/.opencode/plugin/{lib/memory-helpers.ts → memory/helpers.ts} +5 -1
  62. package/dist/template/.opencode/plugin/{lib/memory-hooks.ts → memory/hooks.ts} +1 -1
  63. package/dist/template/.opencode/plugin/{lib → memory}/index-generator.ts +2 -2
  64. package/dist/template/.opencode/plugin/{lib → memory}/inject.ts +1 -1
  65. package/dist/template/.opencode/plugin/{lib → memory}/lint.ts +2 -2
  66. package/dist/template/.opencode/plugin/memory/tools.ts +322 -0
  67. package/dist/template/.opencode/plugin/{lib → memory}/validate.ts +2 -2
  68. package/dist/template/.opencode/plugin/memory.ts +7 -17
  69. package/dist/template/.opencode/plugin/srcwalk.ts +721 -0
  70. package/dist/template/.opencode/skill/agent-code-quality-gate/SKILL.md +98 -0
  71. package/dist/template/.opencode/skill/behavioral-kernel/SKILL.md +52 -0
  72. package/dist/template/.opencode/skill/brainstorming/SKILL.md +1 -1
  73. package/dist/template/.opencode/skill/browser-testing-with-devtools/SKILL.md +85 -0
  74. package/dist/template/.opencode/skill/code-cleanup/SKILL.md +114 -0
  75. package/dist/template/.opencode/skill/code-navigation/SKILL.md +142 -0
  76. package/dist/template/.opencode/skill/code-review-and-quality/SKILL.md +131 -0
  77. package/dist/template/.opencode/skill/context-engineering/SKILL.md +1 -1
  78. package/dist/template/.opencode/skill/debugging-and-error-recovery/SKILL.md +109 -0
  79. package/dist/template/.opencode/skill/deep-module-design/SKILL.md +207 -0
  80. package/dist/template/.opencode/skill/development-lifecycle/SKILL.md +26 -45
  81. package/dist/template/.opencode/skill/gemini-large-context/SKILL.md +4 -4
  82. package/dist/template/.opencode/skill/git-workflow-and-versioning/SKILL.md +77 -0
  83. package/dist/template/.opencode/skill/grill-me/SKILL.md +140 -0
  84. package/dist/template/.opencode/skill/memory-system/SKILL.md +9 -10
  85. package/dist/template/.opencode/skill/opensrc/references/example-workflow.md +1 -1
  86. package/dist/template/.opencode/skill/planning-and-task-breakdown/SKILL.md +116 -0
  87. package/dist/template/.opencode/skill/shipping-and-launch/SKILL.md +95 -0
  88. package/dist/template/.opencode/skill/source-driven-development/SKILL.md +103 -0
  89. package/dist/template/.opencode/skill/spec-driven-development/SKILL.md +121 -0
  90. package/dist/template/.opencode/skill/srcwalk/SKILL.md +161 -0
  91. package/dist/template/.opencode/skill/subagent-driven-development/SKILL.md +1 -1
  92. package/dist/template/.opencode/skill/ubiquitous-language/SKILL.md +184 -0
  93. package/dist/template/.opencode/skill/using-git-worktrees/SKILL.md +6 -6
  94. package/dist/template/.opencode/skill/verification-before-completion/SKILL.md +6 -6
  95. package/dist/template/.opencode/skill/verification-before-completion/references/VERIFICATION_PROTOCOL.md +5 -5
  96. package/package.json +76 -76
  97. package/dist/template/.opencode/AGENT_ALIGNMENT.md +0 -564
  98. package/dist/template/.opencode/agent/painter.md +0 -83
  99. package/dist/template/.opencode/command/compound.md +0 -240
  100. package/dist/template/.opencode/command/curate.md +0 -299
  101. package/dist/template/.opencode/command/handoff.md +0 -149
  102. package/dist/template/.opencode/command/health.md +0 -356
  103. package/dist/template/.opencode/command/init-context.md +0 -297
  104. package/dist/template/.opencode/command/init-user.md +0 -125
  105. package/dist/template/.opencode/command/iterate.md +0 -200
  106. package/dist/template/.opencode/command/lfg.md +0 -173
  107. package/dist/template/.opencode/command/resume.md +0 -78
  108. package/dist/template/.opencode/command/status.md +0 -126
  109. package/dist/template/.opencode/command/ui-slop-check.md +0 -169
  110. package/dist/template/.opencode/plans/1768385996691-silent-wizard.md +0 -247
  111. package/dist/template/.opencode/plans/1770006237537-mighty-otter.md +0 -418
  112. package/dist/template/.opencode/plans/1770006913647-glowing-forest.md +0 -170
  113. package/dist/template/.opencode/plans/1770013678126-witty-planet.md +0 -278
  114. package/dist/template/.opencode/plans/1770112267595-shiny-rocket.md +0 -258
  115. package/dist/template/.opencode/plans/swarm-protocol.md +0 -123
  116. package/dist/template/.opencode/plugin/lib/memory-tools.ts +0 -535
  117. package/dist/template/.opencode/skill/agent-evals/SKILL.md +0 -208
  118. package/dist/template/.opencode/skill/anti-ai-slop/SKILL.md +0 -76
  119. package/dist/template/.opencode/skill/augment-context-engine/SKILL.md +0 -122
  120. package/dist/template/.opencode/skill/augment-context-engine/mcp.json +0 -6
  121. package/dist/template/.opencode/skill/beads/SKILL.md +0 -182
  122. package/dist/template/.opencode/skill/beads/references/BEST_PRACTICES.md +0 -27
  123. package/dist/template/.opencode/skill/beads/references/BOUNDARIES.md +0 -219
  124. package/dist/template/.opencode/skill/beads/references/DEPENDENCIES.md +0 -124
  125. package/dist/template/.opencode/skill/beads/references/EXAMPLES.md +0 -45
  126. package/dist/template/.opencode/skill/beads/references/FILE_CLAIMING.md +0 -101
  127. package/dist/template/.opencode/skill/beads/references/GIT_SYNC.md +0 -25
  128. package/dist/template/.opencode/skill/beads/references/HIERARCHY.md +0 -71
  129. package/dist/template/.opencode/skill/beads/references/MULTI_AGENT.md +0 -40
  130. package/dist/template/.opencode/skill/beads/references/RESUMABILITY.md +0 -177
  131. package/dist/template/.opencode/skill/beads/references/SESSION_PROTOCOL.md +0 -61
  132. package/dist/template/.opencode/skill/beads/references/TASK_CREATION.md +0 -38
  133. package/dist/template/.opencode/skill/beads/references/TROUBLESHOOTING.md +0 -38
  134. package/dist/template/.opencode/skill/beads/references/WORKFLOWS.md +0 -226
  135. package/dist/template/.opencode/skill/brand-asset-protocol/SKILL.md +0 -222
  136. package/dist/template/.opencode/skill/code-search-patterns/SKILL.md +0 -224
  137. package/dist/template/.opencode/skill/code-simplification/SKILL.md +0 -211
  138. package/dist/template/.opencode/skill/context-condensation/SKILL.md +0 -149
  139. package/dist/template/.opencode/skill/context-initialization/SKILL.md +0 -69
  140. package/dist/template/.opencode/skill/context-management/SKILL.md +0 -390
  141. package/dist/template/.opencode/skill/deep-research/SKILL.md +0 -384
  142. package/dist/template/.opencode/skill/design-direction-advisor/SKILL.md +0 -139
  143. package/dist/template/.opencode/skill/dispatching-parallel-agents/SKILL.md +0 -191
  144. package/dist/template/.opencode/skill/executing-plans/SKILL.md +0 -247
  145. package/dist/template/.opencode/skill/figma-go/SKILL.md +0 -65
  146. package/dist/template/.opencode/skill/finishing-a-development-branch/SKILL.md +0 -357
  147. package/dist/template/.opencode/skill/full-output-enforcement/SKILL.md +0 -62
  148. package/dist/template/.opencode/skill/gh-address-comments/SKILL.md +0 -29
  149. package/dist/template/.opencode/skill/gh-address-comments/scripts/fetch_comments.py +0 -237
  150. package/dist/template/.opencode/skill/gh-fix-ci/SKILL.md +0 -38
  151. package/dist/template/.opencode/skill/gh-fix-ci/scripts/inspect_pr_checks.py +0 -509
  152. package/dist/template/.opencode/skill/hi-fi-prototype-html/SKILL.md +0 -253
  153. package/dist/template/.opencode/skill/html-deck-export/SKILL.md +0 -189
  154. package/dist/template/.opencode/skill/index-knowledge/SKILL.md +0 -413
  155. package/dist/template/.opencode/skill/memory-grounding/SKILL.md +0 -68
  156. package/dist/template/.opencode/skill/playwriter/SKILL.md +0 -158
  157. package/dist/template/.opencode/skill/portless/SKILL.md +0 -109
  158. package/dist/template/.opencode/skill/prd/SKILL.md +0 -146
  159. package/dist/template/.opencode/skill/prd-task/SKILL.md +0 -182
  160. package/dist/template/.opencode/skill/prd-task/references/prd-schema.json +0 -124
  161. package/dist/template/.opencode/skill/prompt-leverage/SKILL.md +0 -90
  162. package/dist/template/.opencode/skill/prompt-leverage/references/framework.md +0 -91
  163. package/dist/template/.opencode/skill/prompt-leverage/scripts/augment_prompt.py +0 -157
  164. package/dist/template/.opencode/skill/receiving-code-review/SKILL.md +0 -263
  165. package/dist/template/.opencode/skill/reconcile/SKILL.md +0 -183
  166. package/dist/template/.opencode/skill/reflection-checkpoints/SKILL.md +0 -183
  167. package/dist/template/.opencode/skill/requesting-code-review/SKILL.md +0 -443
  168. package/dist/template/.opencode/skill/requesting-code-review/references/specialist-profiles.md +0 -108
  169. package/dist/template/.opencode/skill/requesting-code-review/review.md +0 -160
  170. package/dist/template/.opencode/skill/rtk-command-compression/SKILL.md +0 -134
  171. package/dist/template/.opencode/skill/screenshot/SKILL.md +0 -48
  172. package/dist/template/.opencode/skill/screenshot/scripts/ensure_macos_permissions.sh +0 -54
  173. package/dist/template/.opencode/skill/screenshot/scripts/macos_display_info.swift +0 -22
  174. package/dist/template/.opencode/skill/screenshot/scripts/macos_permissions.swift +0 -40
  175. package/dist/template/.opencode/skill/screenshot/scripts/macos_window_info.swift +0 -126
  176. package/dist/template/.opencode/skill/screenshot/scripts/take_screenshot.ps1 +0 -163
  177. package/dist/template/.opencode/skill/screenshot/scripts/take_screenshot.py +0 -585
  178. package/dist/template/.opencode/skill/security-threat-model/SKILL.md +0 -36
  179. package/dist/template/.opencode/skill/security-threat-model/references/prompt-template.md +0 -255
  180. package/dist/template/.opencode/skill/security-threat-model/references/security-controls-and-assets.md +0 -32
  181. package/dist/template/.opencode/skill/sharing-skills/SKILL.md +0 -214
  182. package/dist/template/.opencode/skill/skill-creator/SKILL.md +0 -181
  183. package/dist/template/.opencode/skill/skill-installer/SKILL.md +0 -58
  184. package/dist/template/.opencode/skill/skill-installer/scripts/github_utils.py +0 -21
  185. package/dist/template/.opencode/skill/skill-installer/scripts/install-skill-from-github.py +0 -313
  186. package/dist/template/.opencode/skill/skill-installer/scripts/list-skills.py +0 -106
  187. package/dist/template/.opencode/skill/swarm-coordination/SKILL.md +0 -244
  188. package/dist/template/.opencode/skill/swarm-coordination/references/architecture.md +0 -39
  189. package/dist/template/.opencode/skill/swarm-coordination/references/delegation-worker-protocol.md +0 -145
  190. package/dist/template/.opencode/skill/swarm-coordination/references/dependency-graph.md +0 -50
  191. package/dist/template/.opencode/skill/swarm-coordination/references/drift-check.md +0 -90
  192. package/dist/template/.opencode/skill/swarm-coordination/references/integration-beads.md +0 -20
  193. package/dist/template/.opencode/skill/swarm-coordination/references/launch-flow.md +0 -186
  194. package/dist/template/.opencode/skill/swarm-coordination/references/reconciler.md +0 -172
  195. package/dist/template/.opencode/skill/swarm-coordination/references/tier-enforcement.md +0 -78
  196. package/dist/template/.opencode/skill/swarm-coordination/references/tmux-integration.md +0 -134
  197. package/dist/template/.opencode/skill/systematic-debugging/SKILL.md +0 -402
  198. package/dist/template/.opencode/skill/terse-output-mode/SKILL.md +0 -95
  199. package/dist/template/.opencode/skill/think-in-code/SKILL.md +0 -136
  200. package/dist/template/.opencode/skill/ux-quality-gates/SKILL.md +0 -137
  201. package/dist/template/.opencode/skill/v1-run/SKILL.md +0 -175
  202. package/dist/template/.opencode/skill/v1-run/mcp.json +0 -6
  203. package/dist/template/.opencode/skill/verification-gates/SKILL.md +0 -63
  204. package/dist/template/.opencode/skill/visual-analysis/SKILL.md +0 -154
  205. package/dist/template/.opencode/skill/web-design-guidelines/SKILL.md +0 -46
  206. package/dist/template/.opencode/skill/workspace-setup/SKILL.md +0 -76
  207. package/dist/template/.opencode/skill/writing-plans/SKILL.md +0 -320
  208. /package/dist/template/.opencode/plugin/{lib → memory}/compact.ts +0 -0
  209. /package/dist/template/.opencode/plugin/{lib → memory}/db/graph.ts +0 -0
  210. /package/dist/template/.opencode/plugin/{lib → memory}/db/maintenance.ts +0 -0
  211. /package/dist/template/.opencode/plugin/{lib → memory}/db/pipeline.ts +0 -0
  212. /package/dist/template/.opencode/plugin/{lib → memory}/notify.ts +0 -0
  213. /package/dist/template/.opencode/plugin/{lib → memory}/operation-log.ts +0 -0
@@ -1,357 +0,0 @@
1
- ---
2
- name: finishing-a-development-branch
3
- description: Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
4
- version: 1.0.0
5
- tags: [workflow, git]
6
- dependencies: []
7
- ---
8
-
9
- # Finishing a Development Branch
10
-
11
- ## When to Use
12
-
13
- - Implementation is complete and tests pass, and you need to merge/PR/cleanup
14
- - You must present structured end-of-work options and execute the chosen path
15
-
16
- ## When NOT to Use
17
-
18
- - Tests or mandatory gates are failing
19
- - Work is still in progress and not ready for integration
20
-
21
- ## Overview
22
-
23
- Guide completion of development work by presenting clear options and handling chosen workflow.
24
-
25
- **Core principle:** Verify tests → Present options → Execute choice → Clean up.
26
-
27
- **Announce at start:** "I'm using the finishing-a-development-branch skill to complete this work."
28
-
29
- ## The Process
30
-
31
- ### Step 1: Verify Tests
32
-
33
- #### Completion Prep Checklist
34
-
35
- - [ ] Run the project's test suite
36
- - [ ] Stop if any tests fail and report failures
37
-
38
- **Before presenting options, verify tests pass:**
39
-
40
- ```bash
41
- # Run project's test suite
42
- npm test / cargo test / pytest / go test ./...
43
- ```
44
-
45
- **If tests fail:**
46
-
47
- ```
48
- Tests failing (<N> failures). Must fix before completing:
49
-
50
- [Show failures]
51
-
52
- Cannot proceed with merge/PR until tests pass.
53
- ```
54
-
55
- Stop. Don't proceed to Step 2.
56
-
57
- **If tests pass:** Continue to Step 2.
58
-
59
- ### Step 2: Determine Base Branch
60
-
61
- ```bash
62
- # Try common base branches
63
- git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
64
- ```
65
-
66
- Or ask: "This branch split from main - is that correct?"
67
-
68
- ### Step 3: Present Options
69
-
70
- Use question tool to present completion options:
71
-
72
- ```typescript
73
- question({
74
- questions: [
75
- {
76
- header: "Complete",
77
- question: "Implementation complete. What would you like to do?",
78
- options: [
79
- {
80
- label: "Merge locally (Recommended)",
81
- description: "Merge to base branch",
82
- },
83
- {
84
- label: "Push & create PR",
85
- description: "Create pull request for review",
86
- },
87
- { label: "Keep branch", description: "I'll handle it later" },
88
- { label: "Discard work", description: "Delete this branch" },
89
- ],
90
- },
91
- ],
92
- });
93
- ```
94
-
95
- **Don't add explanation** - keep options concise.
96
-
97
- ### Step 4: Execute Choice
98
-
99
- #### Execute Choice Checklist
100
-
101
- - [ ] Follow the selected option's steps exactly
102
- - [ ] Re-run tests on merged result when applicable
103
- - [ ] Only cleanup worktree for Options 1, 2, or 4
104
-
105
- #### Option 1: Merge Locally
106
-
107
- ```bash
108
- # Switch to base branch
109
- git checkout <base-branch>
110
-
111
- # Pull latest
112
- git pull
113
-
114
- # Merge feature branch
115
- git merge <feature-branch>
116
-
117
- # Verify tests on merged result
118
- <test command>
119
-
120
- # If tests pass
121
- git branch -d <feature-branch>
122
- ```
123
-
124
- Then: Cleanup worktree (Step 5)
125
-
126
- #### Option 2: Push and Create PR
127
-
128
- ```bash
129
- # Push branch
130
- git push -u origin <feature-branch>
131
-
132
- # Create PR
133
- gh pr create --title "<title>" --body "$(cat <<'EOF'
134
- ## Summary
135
- <2-3 bullets of what changed>
136
-
137
- ## Test Plan
138
- - [ ] <verification steps>
139
- EOF
140
- )"
141
- ```
142
-
143
- Then: Cleanup worktree (Step 5)
144
-
145
- #### Option 3: Keep As-Is
146
-
147
- Report: "Keeping branch <name>. Worktree preserved at <path>."
148
-
149
- **Don't cleanup worktree.**
150
-
151
- #### Option 4: Discard
152
-
153
- **Confirm first:**
154
-
155
- ```
156
- This will permanently delete:
157
- - Branch <name>
158
- - All commits: <commit-list>
159
- - Worktree at <path>
160
-
161
- Type 'discard' to confirm.
162
- ```
163
-
164
- Wait for exact confirmation.
165
-
166
- If confirmed:
167
-
168
- ```bash
169
- git checkout <base-branch>
170
- git branch -D <feature-branch>
171
- ```
172
-
173
- Then: Cleanup worktree (Step 5)
174
-
175
- ### Step 5: Cleanup Worktree
176
-
177
- **For Options 1, 2, 4:**
178
-
179
- Check if in worktree:
180
-
181
- ```bash
182
- git worktree list | grep $(git branch --show-current)
183
- ```
184
-
185
- If yes:
186
-
187
- ```bash
188
- git worktree remove <worktree-path>
189
- ```
190
-
191
- **For Option 3:** Keep worktree.
192
-
193
- ## Quick Reference
194
-
195
- | Option | Merge | Push | Keep Worktree | Cleanup Branch |
196
- | ---------------- | ----- | ---- | ------------- | -------------- |
197
- | 1. Merge locally | ✓ | - | - | ✓ |
198
- | 2. Create PR | - | ✓ | ✓ | - |
199
- | 3. Keep as-is | - | - | ✓ | - |
200
- | 4. Discard | - | - | - | ✓ (force) |
201
-
202
- ## Mandatory Build Gates (Longshot Pattern)
203
-
204
- **Build gates are non-optional before any merge/PR/close.** Advisory verification has failed at scale — gates must be enforced as hard blockers.
205
-
206
- ### Gate Sequence
207
-
208
- #### Gate Checklist
209
-
210
- - [ ] Gate 1: `npm run typecheck`
211
- - [ ] Gate 2: `npm run lint` (run `npm run lint:fix` if needed)
212
- - [ ] Gate 3: `vitest`
213
- - [ ] Stop and fix if any gate fails
214
-
215
- Every bead MUST pass all three gates in order. No exceptions.
216
-
217
- ```bash
218
- # Gate 1: Typecheck
219
- npm run typecheck
220
- # Must exit 0. If fails → STOP. Fix types first.
221
-
222
- # Gate 2: Lint
223
- npm run lint
224
- # Must exit 0. If fails → STOP. Run npm run lint:fix, then fix remaining.
225
-
226
- # Gate 3: Tests
227
- vitest
228
- # Must exit 0. If fails → STOP. Fix failing tests first.
229
- ```
230
-
231
- ### Gate Enforcement Script
232
-
233
- Run before every merge, PR creation, or bead close:
234
-
235
- ```bash
236
- #!/bin/bash
237
- # Run mandatory gates — all must pass
238
-
239
- echo "Gate 1/3: Typecheck..."
240
- npm run typecheck || { echo "FAILED: Fix type errors before proceeding."; exit 1; }
241
-
242
- echo "Gate 2/3: Lint..."
243
- npm run lint || {
244
- echo "Attempting auto-fix..."
245
- npm run lint:fix
246
- npm run lint || { echo "FAILED: Fix lint errors before proceeding."; exit 1; }
247
- }
248
-
249
- echo "Gate 3/3: Tests..."
250
- vitest || { echo "FAILED: Fix failing tests before proceeding."; exit 1; }
251
-
252
- echo "All gates passed. Safe to merge/PR/close."
253
- ```
254
-
255
- ### Gate Failure Response
256
-
257
- | Gate Failure | First Action | If Still Failing |
258
- | ------------ | -------------------------------- | --------------------------- |
259
- | Typecheck | Fix type errors at reported line | Use LSP hover for type info |
260
- | Lint | Run `npm run lint:fix` | Fix remaining manually |
261
- | Tests | Read failing test output | Fix implementation or test |
262
-
263
- ### Hard Rules
264
-
265
- **NEVER:**
266
-
267
- - Close a bead without passing all 3 gates
268
- - Create a PR without passing all 3 gates
269
- - Merge locally without passing all 3 gates on merged result
270
- - Skip gates "because the change is small"
271
-
272
- **ALWAYS:**
273
-
274
- - Run gates after EVERY non-trivial file change
275
- - Re-run gates after fixing gate failures (to catch regressions)
276
- - Run gates on the merged result, not just the branch
277
-
278
- ### Integration with Bead Workflow
279
-
280
- ```bash
281
- # Before closing any bead:
282
- npm run typecheck && npm run lint && vitest
283
-
284
- # If all pass:
285
- br close <id> --reason "Implementation complete. All gates passed."
286
- br sync --flush-only
287
-
288
- # If any fail:
289
- # STOP. Fix. Re-run gates. Then close.
290
- ```
291
-
292
- ### Gate State in Delegation Packets
293
-
294
- Workers must include gate results in their completion report:
295
-
296
- ```markdown
297
- ## Completion Report
298
-
299
- ### Gate Results
300
-
301
- - [ ] typecheck: PASS / FAIL (error: ...)
302
- - [ ] lint: PASS / FAIL (error: ...)
303
- - [ ] tests: PASS / FAIL (N failed, N passed)
304
-
305
- ### Gate Command Used
306
-
307
- `npm run typecheck && npm run lint && vitest`
308
- ```
309
-
310
- ## Common Mistakes
311
-
312
- **Skipping test verification**
313
-
314
- - **Problem:** Merge broken code, create failing PR
315
- - **Fix:** Always verify tests before offering options
316
-
317
- **Open-ended questions**
318
-
319
- - **Problem:** "What should I do next?" → ambiguous
320
- - **Fix:** Present exactly 4 structured options
321
-
322
- **Automatic worktree cleanup**
323
-
324
- - **Problem:** Remove worktree when might need it (Option 2, 3)
325
- - **Fix:** Only cleanup for Options 1 and 4
326
-
327
- **No confirmation for discard**
328
-
329
- - **Problem:** Accidentally delete work
330
- - **Fix:** Require typed "discard" confirmation
331
-
332
- ## Red Flags
333
-
334
- **Never:**
335
-
336
- - Proceed with failing tests
337
- - Merge without verifying tests on result
338
- - Delete work without confirmation
339
- - Force-push without explicit request
340
-
341
- **Always:**
342
-
343
- - Verify tests before offering options
344
- - Present exactly 4 options
345
- - Get typed confirmation for Option 4
346
- - Clean up worktree for Options 1 & 4 only
347
-
348
- ## Integration
349
-
350
- **Called by:**
351
-
352
- - **subagent-driven-development** (Step 7) - After all tasks complete
353
- - **executing-plans** (Step 5) - After all batches complete
354
-
355
- **Pairs with:**
356
-
357
- - **using-git-worktrees** - Cleans up worktree created by that skill
@@ -1,62 +0,0 @@
1
- ---
2
- name: full-output-enforcement
3
- description: MUST load when generating complete files, long code blocks, or any output where truncation or placeholder comments like '// ... rest of code' would be harmful. Bans all placeholder patterns and enforces exhaustive, unabridged output.
4
- ---
5
-
6
- ## When to Use
7
-
8
- - When generating complete files, long code blocks, or full configuration outputs
9
- - When truncation or placeholder comments like `// ... rest of code` would be harmful
10
- - When the user needs exhaustive, unabridged output
11
-
12
- ## When NOT to Use
13
-
14
- - For short code snippets or single-function responses
15
- - When summarization is explicitly requested
16
- - For conversational responses that don't involve code generation
17
-
18
-
19
- # Full-Output Enforcement
20
-
21
- ## Baseline
22
-
23
- Treat every task as production-critical. A partial output is a broken output. Do not optimize for brevity — optimize for completeness. If the user asks for a full file, deliver the full file. If the user asks for 5 components, deliver 5 components. No exceptions.
24
-
25
- ## Banned Output Patterns
26
-
27
- The following patterns are hard failures. Never produce them:
28
-
29
- **In code blocks:** `// ...`, `// rest of code`, `// implement here`, `// TODO`, `/* ... */`, `// similar to above`, `// continue pattern`, `// add more as needed`, bare `...` standing in for omitted code
30
-
31
- **In prose:** "Let me know if you want me to continue", "I can provide more details if needed", "for brevity", "the rest follows the same pattern", "similarly for the remaining", "and so on" (when replacing actual content), "I'll leave that as an exercise"
32
-
33
- **Structural shortcuts:** Outputting a skeleton when the request was for a full implementation. Showing the first and last section while skipping the middle. Replacing repeated logic with one example and a description. Describing what code should do instead of writing it.
34
-
35
- ## Execution Process
36
-
37
- 1. **Scope** — Read the full request. Count how many distinct deliverables are expected (files, functions, sections, answers). Lock that number.
38
- 2. **Build** — Generate every deliverable completely. No partial drafts, no "you can extend this later."
39
- 3. **Cross-check** — Before output, re-read the original request. Compare your deliverable count against the scope count. If anything is missing, add it before responding.
40
-
41
- ## Handling Long Outputs
42
-
43
- When a response approaches the token limit:
44
-
45
- - Do not compress remaining sections to squeeze them in.
46
- - Do not skip ahead to a conclusion.
47
- - Write at full quality up to a clean breakpoint (end of a function, end of a file, end of a section).
48
- - End with:
49
-
50
- ```
51
- [PAUSED — X of Y complete. Send "continue" to resume from: next section name]
52
- ```
53
-
54
- On "continue", pick up exactly where you stopped. No recap, no repetition.
55
-
56
- ## Quick Check
57
-
58
- Before finalizing any response, verify:
59
- - No banned patterns from the list above appear anywhere in the output
60
- - Every item the user requested is present and finished
61
- - Code blocks contain actual runnable code, not descriptions of what code would do
62
- - Nothing was shortened to save space
@@ -1,29 +0,0 @@
1
- ---
2
- name: gh-address-comments
3
- description: Use when the user asks to review and address GitHub PR comments/threads for the current branch using gh CLI.
4
- version: 1.0.0
5
- tags: [workflow, git, agent-coordination]
6
- dependencies: []
7
- ---
8
-
9
- # gh-address-comments
10
-
11
- Fetch PR comments and review threads, then apply selected fixes.
12
-
13
- ## When to Use
14
-
15
- - User asks to resolve PR review comments
16
- - User wants a numbered list of comment threads to triage
17
-
18
- ## When NOT to Use
19
-
20
- - No open PR associated with current branch
21
- - `gh` is unavailable/auth is missing and user declines auth
22
-
23
- ## Workflow
24
-
25
- 1. Check auth: `gh auth status`
26
- 2. Fetch comments: `python3 .opencode/skill/gh-address-comments/scripts/fetch_comments.py`
27
- 3. Present numbered comment threads with short fix summaries
28
- 4. Ask which comments to address
29
- 5. Implement only selected fixes and report results
@@ -1,237 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Fetch all PR conversation comments + reviews + review threads (inline threads)
4
- for the PR associated with the current git branch, by shelling out to:
5
-
6
- gh api graphql
7
-
8
- Requires:
9
- - `gh auth login` already set up
10
- - current branch has an associated (open) PR
11
-
12
- Usage:
13
- python fetch_comments.py > pr_comments.json
14
- """
15
-
16
- from __future__ import annotations
17
-
18
- import json
19
- import subprocess
20
- import sys
21
- from typing import Any
22
-
23
- QUERY = """\
24
- query(
25
- $owner: String!,
26
- $repo: String!,
27
- $number: Int!,
28
- $commentsCursor: String,
29
- $reviewsCursor: String,
30
- $threadsCursor: String
31
- ) {
32
- repository(owner: $owner, name: $repo) {
33
- pullRequest(number: $number) {
34
- number
35
- url
36
- title
37
- state
38
-
39
- # Top-level "Conversation" comments (issue comments on the PR)
40
- comments(first: 100, after: $commentsCursor) {
41
- pageInfo { hasNextPage endCursor }
42
- nodes {
43
- id
44
- body
45
- createdAt
46
- updatedAt
47
- author { login }
48
- }
49
- }
50
-
51
- # Review submissions (Approve / Request changes / Comment), with body if present
52
- reviews(first: 100, after: $reviewsCursor) {
53
- pageInfo { hasNextPage endCursor }
54
- nodes {
55
- id
56
- state
57
- body
58
- submittedAt
59
- author { login }
60
- }
61
- }
62
-
63
- # Inline review threads (grouped), includes resolved state
64
- reviewThreads(first: 100, after: $threadsCursor) {
65
- pageInfo { hasNextPage endCursor }
66
- nodes {
67
- id
68
- isResolved
69
- isOutdated
70
- path
71
- line
72
- diffSide
73
- startLine
74
- startDiffSide
75
- originalLine
76
- originalStartLine
77
- resolvedBy { login }
78
- comments(first: 100) {
79
- nodes {
80
- id
81
- body
82
- createdAt
83
- updatedAt
84
- author { login }
85
- }
86
- }
87
- }
88
- }
89
- }
90
- }
91
- }
92
- """
93
-
94
-
95
- def _run(cmd: list[str], stdin: str | None = None) -> str:
96
- p = subprocess.run(cmd, input=stdin, capture_output=True, text=True)
97
- if p.returncode != 0:
98
- raise RuntimeError(f"Command failed: {' '.join(cmd)}\n{p.stderr}")
99
- return p.stdout
100
-
101
-
102
- def _run_json(cmd: list[str], stdin: str | None = None) -> dict[str, Any]:
103
- out = _run(cmd, stdin=stdin)
104
- try:
105
- return json.loads(out)
106
- except json.JSONDecodeError as e:
107
- raise RuntimeError(f"Failed to parse JSON from command output: {e}\nRaw:\n{out}") from e
108
-
109
-
110
- def _ensure_gh_authenticated() -> None:
111
- try:
112
- _run(["gh", "auth", "status"])
113
- except RuntimeError:
114
- print("run `gh auth login` to authenticate the GitHub CLI", file=sys.stderr)
115
- raise RuntimeError("gh auth status failed; run `gh auth login` to authenticate the GitHub CLI") from None
116
-
117
-
118
- def gh_pr_view_json(fields: str) -> dict[str, Any]:
119
- # fields is a comma-separated list like: "number,headRepositoryOwner,headRepository"
120
- return _run_json(["gh", "pr", "view", "--json", fields])
121
-
122
-
123
- def get_current_pr_ref() -> tuple[str, str, int]:
124
- """
125
- Resolve the PR for the current branch (whatever gh considers associated).
126
- Works for cross-repo PRs too, by reading head repository owner/name.
127
- """
128
- pr = gh_pr_view_json("number,headRepositoryOwner,headRepository")
129
- owner = pr["headRepositoryOwner"]["login"]
130
- repo = pr["headRepository"]["name"]
131
- number = int(pr["number"])
132
- return owner, repo, number
133
-
134
-
135
- def gh_api_graphql(
136
- owner: str,
137
- repo: str,
138
- number: int,
139
- comments_cursor: str | None = None,
140
- reviews_cursor: str | None = None,
141
- threads_cursor: str | None = None,
142
- ) -> dict[str, Any]:
143
- """
144
- Call `gh api graphql` using -F variables, avoiding JSON blobs with nulls.
145
- Query is passed via stdin using query=@- to avoid shell newline/quoting issues.
146
- """
147
- cmd = [
148
- "gh",
149
- "api",
150
- "graphql",
151
- "-F",
152
- "query=@-",
153
- "-F",
154
- f"owner={owner}",
155
- "-F",
156
- f"repo={repo}",
157
- "-F",
158
- f"number={number}",
159
- ]
160
- if comments_cursor:
161
- cmd += ["-F", f"commentsCursor={comments_cursor}"]
162
- if reviews_cursor:
163
- cmd += ["-F", f"reviewsCursor={reviews_cursor}"]
164
- if threads_cursor:
165
- cmd += ["-F", f"threadsCursor={threads_cursor}"]
166
-
167
- return _run_json(cmd, stdin=QUERY)
168
-
169
-
170
- def fetch_all(owner: str, repo: str, number: int) -> dict[str, Any]:
171
- conversation_comments: list[dict[str, Any]] = []
172
- reviews: list[dict[str, Any]] = []
173
- review_threads: list[dict[str, Any]] = []
174
-
175
- comments_cursor: str | None = None
176
- reviews_cursor: str | None = None
177
- threads_cursor: str | None = None
178
-
179
- pr_meta: dict[str, Any] | None = None
180
-
181
- while True:
182
- payload = gh_api_graphql(
183
- owner=owner,
184
- repo=repo,
185
- number=number,
186
- comments_cursor=comments_cursor,
187
- reviews_cursor=reviews_cursor,
188
- threads_cursor=threads_cursor,
189
- )
190
-
191
- if "errors" in payload and payload["errors"]:
192
- raise RuntimeError(f"GitHub GraphQL errors:\n{json.dumps(payload['errors'], indent=2)}")
193
-
194
- pr = payload["data"]["repository"]["pullRequest"]
195
- if pr_meta is None:
196
- pr_meta = {
197
- "number": pr["number"],
198
- "url": pr["url"],
199
- "title": pr["title"],
200
- "state": pr["state"],
201
- "owner": owner,
202
- "repo": repo,
203
- }
204
-
205
- c = pr["comments"]
206
- r = pr["reviews"]
207
- t = pr["reviewThreads"]
208
-
209
- conversation_comments.extend(c.get("nodes") or [])
210
- reviews.extend(r.get("nodes") or [])
211
- review_threads.extend(t.get("nodes") or [])
212
-
213
- comments_cursor = c["pageInfo"]["endCursor"] if c["pageInfo"]["hasNextPage"] else None
214
- reviews_cursor = r["pageInfo"]["endCursor"] if r["pageInfo"]["hasNextPage"] else None
215
- threads_cursor = t["pageInfo"]["endCursor"] if t["pageInfo"]["hasNextPage"] else None
216
-
217
- if not (comments_cursor or reviews_cursor or threads_cursor):
218
- break
219
-
220
- assert pr_meta is not None
221
- return {
222
- "pull_request": pr_meta,
223
- "conversation_comments": conversation_comments,
224
- "reviews": reviews,
225
- "review_threads": review_threads,
226
- }
227
-
228
-
229
- def main() -> None:
230
- _ensure_gh_authenticated()
231
- owner, repo, number = get_current_pr_ref()
232
- result = fetch_all(owner, repo, number)
233
- print(json.dumps(result, indent=2))
234
-
235
-
236
- if __name__ == "__main__":
237
- main()