oh-my-opencode 4.4.0 → 4.5.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 (218) hide show
  1. package/.agents/command/get-unpublished-changes.md +148 -0
  2. package/.agents/command/omomomo.md +37 -0
  3. package/.agents/command/publish.md +376 -0
  4. package/.agents/command/remove-deadcode.md +221 -0
  5. package/.agents/command/security-research.md +16 -0
  6. package/.agents/skills/get-unpublished-changes/SKILL.md +24 -0
  7. package/.agents/skills/github-triage/SKILL.md +587 -0
  8. package/.agents/skills/github-triage/scripts/gh_fetch.py +398 -0
  9. package/.agents/skills/hyperplan/SKILL.md +450 -0
  10. package/.agents/skills/omomomo/SKILL.md +36 -0
  11. package/.agents/skills/pre-publish-review/SKILL.md +407 -0
  12. package/.agents/skills/publish/SKILL.md +428 -0
  13. package/.agents/skills/remove-deadcode/SKILL.md +216 -0
  14. package/.agents/skills/security-research/SKILL.md +204 -0
  15. package/.agents/skills/work-with-pr/SKILL.md +360 -0
  16. package/.agents/skills/work-with-pr-workspace/evals/evals.json +76 -0
  17. package/.agents/skills/work-with-pr-workspace/iteration-1/benchmark.json +138 -0
  18. package/.agents/skills/work-with-pr-workspace/iteration-1/benchmark.md +42 -0
  19. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/eval_metadata.json +57 -0
  20. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/grading.json +15 -0
  21. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/outputs/code-changes.md +454 -0
  22. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/outputs/execution-plan.md +136 -0
  23. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/outputs/pr-description.md +47 -0
  24. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/outputs/verification-strategy.md +163 -0
  25. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/timing.json +1 -0
  26. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/grading.json +15 -0
  27. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/outputs/code-changes.md +615 -0
  28. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/outputs/execution-plan.md +99 -0
  29. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/outputs/pr-description.md +50 -0
  30. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/outputs/verification-strategy.md +111 -0
  31. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/timing.json +1 -0
  32. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/eval_metadata.json +37 -0
  33. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/grading.json +11 -0
  34. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/outputs/code-changes.md +205 -0
  35. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/outputs/execution-plan.md +78 -0
  36. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/outputs/pr-description.md +42 -0
  37. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/outputs/verification-strategy.md +87 -0
  38. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/timing.json +1 -0
  39. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/grading.json +11 -0
  40. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/outputs/code-changes.md +334 -0
  41. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/outputs/execution-plan.md +86 -0
  42. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/outputs/pr-description.md +23 -0
  43. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/outputs/verification-strategy.md +119 -0
  44. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/timing.json +1 -0
  45. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/eval_metadata.json +32 -0
  46. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/grading.json +10 -0
  47. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/code-changes.md +221 -0
  48. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/execution-plan.md +104 -0
  49. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/pr-description.md +41 -0
  50. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/verification-strategy.md +84 -0
  51. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/timing.json +1 -0
  52. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/grading.json +10 -0
  53. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/code-changes.md +342 -0
  54. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/execution-plan.md +131 -0
  55. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/pr-description.md +39 -0
  56. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/verification-strategy.md +128 -0
  57. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/timing.json +1 -0
  58. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/eval_metadata.json +32 -0
  59. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/grading.json +10 -0
  60. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/outputs/code-changes.md +143 -0
  61. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/outputs/execution-plan.md +82 -0
  62. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/outputs/pr-description.md +51 -0
  63. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/outputs/verification-strategy.md +69 -0
  64. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/timing.json +1 -0
  65. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/grading.json +10 -0
  66. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/outputs/code-changes.md +252 -0
  67. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/outputs/execution-plan.md +83 -0
  68. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/outputs/pr-description.md +33 -0
  69. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/outputs/verification-strategy.md +101 -0
  70. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/timing.json +1 -0
  71. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/eval_metadata.json +32 -0
  72. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/grading.json +10 -0
  73. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/outputs/code-changes.md +387 -0
  74. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/outputs/execution-plan.md +112 -0
  75. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/outputs/pr-description.md +51 -0
  76. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/outputs/verification-strategy.md +75 -0
  77. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/timing.json +1 -0
  78. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/grading.json +10 -0
  79. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/outputs/code-changes.md +529 -0
  80. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/outputs/execution-plan.md +127 -0
  81. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/outputs/pr-description.md +42 -0
  82. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/outputs/verification-strategy.md +120 -0
  83. package/.agents/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/timing.json +1 -0
  84. package/.agents/skills/work-with-pr-workspace/iteration-1/review.html +1326 -0
  85. package/.opencode/command/get-unpublished-changes.md +148 -0
  86. package/.opencode/command/omomomo.md +37 -0
  87. package/.opencode/command/publish.md +376 -0
  88. package/.opencode/command/remove-deadcode.md +221 -0
  89. package/.opencode/command/security-research.md +16 -0
  90. package/.opencode/skills/github-triage/SKILL.md +587 -0
  91. package/.opencode/skills/github-triage/scripts/gh_fetch.py +398 -0
  92. package/.opencode/skills/hyperplan/SKILL.md +450 -0
  93. package/.opencode/skills/pre-publish-review/SKILL.md +407 -0
  94. package/.opencode/skills/work-with-pr/SKILL.md +360 -0
  95. package/.opencode/skills/work-with-pr-workspace/evals/evals.json +76 -0
  96. package/.opencode/skills/work-with-pr-workspace/iteration-1/benchmark.json +138 -0
  97. package/.opencode/skills/work-with-pr-workspace/iteration-1/benchmark.md +42 -0
  98. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/eval_metadata.json +57 -0
  99. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/grading.json +15 -0
  100. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/outputs/code-changes.md +454 -0
  101. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/outputs/execution-plan.md +136 -0
  102. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/outputs/pr-description.md +47 -0
  103. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/outputs/verification-strategy.md +163 -0
  104. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/with_skill/timing.json +1 -0
  105. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/grading.json +15 -0
  106. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/outputs/code-changes.md +615 -0
  107. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/outputs/execution-plan.md +99 -0
  108. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/outputs/pr-description.md +50 -0
  109. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/outputs/verification-strategy.md +111 -0
  110. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-1/without_skill/timing.json +1 -0
  111. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/eval_metadata.json +37 -0
  112. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/grading.json +11 -0
  113. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/outputs/code-changes.md +205 -0
  114. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/outputs/execution-plan.md +78 -0
  115. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/outputs/pr-description.md +42 -0
  116. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/outputs/verification-strategy.md +87 -0
  117. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/with_skill/timing.json +1 -0
  118. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/grading.json +11 -0
  119. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/outputs/code-changes.md +334 -0
  120. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/outputs/execution-plan.md +86 -0
  121. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/outputs/pr-description.md +23 -0
  122. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/outputs/verification-strategy.md +119 -0
  123. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-2/without_skill/timing.json +1 -0
  124. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/eval_metadata.json +32 -0
  125. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/grading.json +10 -0
  126. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/code-changes.md +221 -0
  127. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/execution-plan.md +104 -0
  128. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/pr-description.md +41 -0
  129. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/outputs/verification-strategy.md +84 -0
  130. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/with_skill/timing.json +1 -0
  131. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/grading.json +10 -0
  132. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/code-changes.md +342 -0
  133. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/execution-plan.md +131 -0
  134. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/pr-description.md +39 -0
  135. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/outputs/verification-strategy.md +128 -0
  136. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-3/without_skill/timing.json +1 -0
  137. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/eval_metadata.json +32 -0
  138. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/grading.json +10 -0
  139. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/outputs/code-changes.md +143 -0
  140. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/outputs/execution-plan.md +82 -0
  141. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/outputs/pr-description.md +51 -0
  142. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/outputs/verification-strategy.md +69 -0
  143. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/with_skill/timing.json +1 -0
  144. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/grading.json +10 -0
  145. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/outputs/code-changes.md +252 -0
  146. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/outputs/execution-plan.md +83 -0
  147. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/outputs/pr-description.md +33 -0
  148. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/outputs/verification-strategy.md +101 -0
  149. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-4/without_skill/timing.json +1 -0
  150. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/eval_metadata.json +32 -0
  151. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/grading.json +10 -0
  152. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/outputs/code-changes.md +387 -0
  153. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/outputs/execution-plan.md +112 -0
  154. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/outputs/pr-description.md +51 -0
  155. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/outputs/verification-strategy.md +75 -0
  156. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/with_skill/timing.json +1 -0
  157. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/grading.json +10 -0
  158. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/outputs/code-changes.md +529 -0
  159. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/outputs/execution-plan.md +127 -0
  160. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/outputs/pr-description.md +42 -0
  161. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/outputs/verification-strategy.md +120 -0
  162. package/.opencode/skills/work-with-pr-workspace/iteration-1/eval-5/without_skill/timing.json +1 -0
  163. package/.opencode/skills/work-with-pr-workspace/iteration-1/review.html +1326 -0
  164. package/README.ja.md +1 -1
  165. package/README.ko.md +1 -1
  166. package/README.md +1 -1
  167. package/README.ru.md +1 -1
  168. package/README.zh-cn.md +1 -1
  169. package/dist/agents/atlas/agent.d.ts +6 -6
  170. package/dist/agents/prometheus/gemini.d.ts +0 -11
  171. package/dist/agents/prometheus/gpt.d.ts +0 -10
  172. package/dist/agents/prometheus/system-prompt.d.ts +2 -20
  173. package/dist/agents/types.d.ts +1 -16
  174. package/dist/cli/index.js +50 -17
  175. package/dist/config/schema/agent-names.d.ts +3 -3
  176. package/dist/config/schema/agent-overrides.d.ts +208 -208
  177. package/dist/config/schema/categories.d.ts +28 -28
  178. package/dist/config/schema/fallback-models.d.ts +20 -20
  179. package/dist/config/schema/oh-my-opencode-config.d.ts +208 -208
  180. package/dist/features/background-agent/parent-wake-notifier.d.ts +8 -1
  181. package/dist/help/schema/acp.d.ts +95 -0
  182. package/dist/help/schema/doctor.d.ts +147 -0
  183. package/dist/help/schema/sandbox.d.ts +74 -0
  184. package/dist/help/schema/status.d.ts +139 -0
  185. package/dist/hooks/keyword-detector/analyze/default.d.ts +1 -1
  186. package/dist/hooks/keyword-detector/hyperplan/default.d.ts +1 -1
  187. package/dist/hooks/keyword-detector/search/default.d.ts +1 -1
  188. package/dist/hooks/keyword-detector/team/default.d.ts +2 -7
  189. package/dist/hooks/keyword-detector/ultrawork/default.d.ts +1 -9
  190. package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +1 -16
  191. package/dist/hooks/keyword-detector/ultrawork/gpt.d.ts +1 -10
  192. package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +1 -5
  193. package/dist/hooks/ralph-loop/no-progress-turn-detector.d.ts +7 -0
  194. package/dist/hooks/ralph-loop/pending-verification-handler.d.ts +1 -0
  195. package/dist/hooks/ralph-loop/types.d.ts +1 -0
  196. package/dist/hooks/runtime-fallback/error-classifier.d.ts +1 -0
  197. package/dist/index.js +51910 -50310
  198. package/dist/shared/prompt-async-gate/pending-tool-turn.d.ts +1 -0
  199. package/dist/shared/prompt-async-gate/types.d.ts +4 -3
  200. package/package.json +19 -13
  201. package/dist/agents/atlas/default-prompt-sections.d.ts +0 -6
  202. package/dist/agents/atlas/default.d.ts +0 -2
  203. package/dist/agents/atlas/gemini-prompt-sections.d.ts +0 -6
  204. package/dist/agents/atlas/gemini.d.ts +0 -2
  205. package/dist/agents/atlas/gpt-prompt-sections.d.ts +0 -6
  206. package/dist/agents/atlas/gpt.d.ts +0 -2
  207. package/dist/agents/atlas/kimi-prompt-sections.d.ts +0 -6
  208. package/dist/agents/atlas/kimi.d.ts +0 -2
  209. package/dist/agents/atlas/opus-4-7-prompt-sections.d.ts +0 -6
  210. package/dist/agents/atlas/opus-4-7.d.ts +0 -2
  211. package/dist/agents/atlas/shared-prompt.d.ts +0 -9
  212. package/dist/agents/prometheus/behavioral-summary.d.ts +0 -6
  213. package/dist/agents/prometheus/high-accuracy-mode.d.ts +0 -6
  214. package/dist/agents/prometheus/identity-constraints.d.ts +0 -7
  215. package/dist/agents/prometheus/interview-mode.d.ts +0 -7
  216. package/dist/agents/prometheus/plan-generation.d.ts +0 -7
  217. package/dist/agents/prometheus/plan-template.d.ts +0 -7
  218. package/dist/agents/prometheus/spec-driven-mode.d.ts +0 -7
@@ -0,0 +1,587 @@
1
+ ---
2
+ name: github-triage
3
+ description: "Read-only GitHub triage for issues AND PRs. 1 item = 1 background task (category: quick). Analyzes all open items and writes evidence-backed reports to /tmp/{datetime}/. Every claim requires a GitHub permalink as proof. NEVER takes any action on GitHub - no comments, no merges, no closes, no labels. Reports only. Triggers: 'triage', 'triage issues', 'triage PRs', 'github triage'."
4
+ ---
5
+
6
+ # GitHub Triage - Read-Only Analyzer
7
+
8
+ <role>
9
+ Read-only GitHub triage orchestrator. Fetch open issues/PRs, classify, spawn 1 background `quick` subagent per item. Each subagent analyzes and writes a report file. ZERO GitHub mutations.
10
+ </role>
11
+
12
+ ## Architecture
13
+
14
+ **1 ISSUE/PR = 1 `task_create` = 1 `quick` SUBAGENT (background). NO EXCEPTIONS.**
15
+
16
+ | Rule | Value |
17
+ |------|-------|
18
+ | Category | `quick` |
19
+ | Execution | `run_in_background=true` |
20
+ | Parallelism | ALL items simultaneously |
21
+ | Tracking | `task_create` per item |
22
+ | Output | `/tmp/{YYYYMMDD-HHmmss}/issue-{N}.md` or `pr-{N}.md` |
23
+
24
+ ---
25
+
26
+ ## Zero-Action Policy (ABSOLUTE)
27
+
28
+ <zero_action>
29
+ Subagents MUST NEVER run ANY command that writes or mutates GitHub state.
30
+
31
+ **FORBIDDEN** (non-exhaustive):
32
+ `gh issue comment`, `gh issue close`, `gh issue edit`, `gh pr comment`, `gh pr merge`, `gh pr review`, `gh pr edit`, `gh api -X POST`, `gh api -X PUT`, `gh api -X PATCH`, `gh api -X DELETE`
33
+
34
+ **ALLOWED**:
35
+ - `gh issue view`, `gh pr view`, `gh api` (GET only) - read GitHub data
36
+ - `Grep`, `Read`, `Glob` - read codebase
37
+ - `Write` - write report files to `/tmp/` ONLY
38
+ - `git log`, `git show`, `git blame` - read git history (for finding fix commits)
39
+
40
+ **ANY GitHub mutation = CRITICAL violation.**
41
+ </zero_action>
42
+
43
+ ---
44
+
45
+ ## Evidence Rule (MANDATORY)
46
+
47
+ <evidence>
48
+ **Every factual claim in a report MUST include a GitHub permalink as proof.**
49
+
50
+ A permalink is a URL pointing to a specific line/range in a specific commit, e.g.:
51
+ `https://github.com/{owner}/{repo}/blob/{commit_sha}/{path}#L{start}-L{end}`
52
+
53
+ ### How to generate permalinks
54
+
55
+ 1. Find the relevant file and line(s) via Grep/Read.
56
+ 2. Get the current commit SHA: `git rev-parse HEAD`
57
+ 3. Construct: `https://github.com/{REPO}/blob/{SHA}/{filepath}#L{line}` (or `#L{start}-L{end}` for ranges)
58
+
59
+ ### Rules
60
+
61
+ - **No permalink = no claim.** If you cannot back a statement with a permalink, state "No evidence found" instead.
62
+ - Claims without permalinks are explicitly marked `[UNVERIFIED]` and carry zero weight.
63
+ - Permalinks to `main`/`master`/`dev` branches are NOT acceptable - use commit SHAs only.
64
+ - For bug analysis: permalink to the problematic code. For fix verification: permalink to the fixing commit diff.
65
+ </evidence>
66
+
67
+ ---
68
+
69
+ ## Phase 0: Setup
70
+
71
+ ```bash
72
+ REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
73
+ REPORT_DIR="/tmp/$(date +%Y%m%d-%H%M%S)"
74
+ mkdir -p "$REPORT_DIR"
75
+ COMMIT_SHA=$(git rev-parse HEAD)
76
+ ```
77
+
78
+ Pass `REPO`, `REPORT_DIR`, and `COMMIT_SHA` to every subagent.
79
+
80
+ ---
81
+
82
+ ---
83
+
84
+ ## Phase 1: Fetch All Open Items (CORRECTED)
85
+
86
+ **IMPORTANT:** `body` and `comments` fields may contain control characters that break jq parsing. Fetch basic metadata first, then fetch full details per-item in subagents.
87
+
88
+ ```bash
89
+ # Step 1: Fetch basic metadata (without body/comments to avoid JSON parsing issues)
90
+ ISSUES_LIST=$(gh issue list --repo $REPO --state open --limit 500 \
91
+ --json number,title,labels,author,createdAt)
92
+ ISSUE_COUNT=$(echo "$ISSUES_LIST" | jq length)
93
+
94
+ # Paginate if needed
95
+ if [ "$ISSUE_COUNT" -eq 500 ]; then
96
+ LAST_DATE=$(echo "$ISSUES_LIST" | jq -r '.[-1].createdAt')
97
+ while true; do
98
+ PAGE=$(gh issue list --repo $REPO --state open --limit 500 \
99
+ --search "created:<$LAST_DATE" \
100
+ --json number,title,labels,author,createdAt)
101
+ PAGE_COUNT=$(echo "$PAGE" | jq length)
102
+ [ "$PAGE_COUNT" -eq 0 ] && break
103
+ ISSUES_LIST=$(echo "$ISSUES_LIST" "$PAGE" | jq -s '.[0] + .[1] | unique_by(.number)')
104
+ ISSUE_COUNT=$(echo "$ISSUES_LIST" | jq length)
105
+ [ "$PAGE_COUNT" -lt 500 ] && break
106
+ LAST_DATE=$(echo "$PAGE" | jq -r '.[-1].createdAt')
107
+ done
108
+ fi
109
+
110
+ # Same for PRs
111
+ PRS_LIST=$(gh pr list --repo $REPO --state open --limit 500 \
112
+ --json number,title,labels,author,headRefName,baseRefName,isDraft,createdAt)
113
+ PR_COUNT=$(echo "$PRS_LIST" | jq length)
114
+
115
+ if [ "$PR_COUNT" -eq 500 ]; then
116
+ LAST_DATE=$(echo "$PRS_LIST" | jq -r '.[-1].createdAt')
117
+ while true; do
118
+ PAGE=$(gh pr list --repo $REPO --state open --limit 500 \
119
+ --search "created:<$LAST_DATE" \
120
+ --json number,title,labels,author,headRefName,baseRefName,isDraft,createdAt)
121
+ PAGE_COUNT=$(echo "$PAGE" | jq length)
122
+ [ "$PAGE_COUNT" -eq 0 ] && break
123
+ PRS_LIST=$(echo "$PRS_LIST" "$PAGE" | jq -s '.[0] + .[1] | unique_by(.number)')
124
+ PR_COUNT=$(echo "$PRS_LIST" | jq length)
125
+ [ "$PAGE_COUNT" -lt 500 ] && break
126
+ LAST_DATE=$(echo "$PAGE" | jq -r '.[-1].createdAt')
127
+ done
128
+ fi
129
+
130
+ echo "Total issues: $ISSUE_COUNT, Total PRs: $PR_COUNT"
131
+ ```
132
+
133
+ **LARGE REPOSITORY HANDLING:**
134
+ If total items exceeds 50, you MUST process ALL items. Use the pagination code above to fetch every single open issue and PR.
135
+ **DO NOT** sample or limit to 50 items - process the entire backlog.
136
+
137
+ Example: If there are 500 open issues, spawn 500 subagents. If there are 1000 open PRs, spawn 1000 subagents.
138
+
139
+ **Note:** Background task system will queue excess tasks automatically.
140
+
141
+
142
+ ---
143
+
144
+ ## Phase 2: Classify
145
+
146
+ | Type | Detection |
147
+ |------|-----------|
148
+ | `ISSUE_QUESTION` | `[Question]`, `[Discussion]`, `?`, "how to" / "why does" / "is it possible" |
149
+ | `ISSUE_BUG` | `[Bug]`, `Bug:`, error messages, stack traces, unexpected behavior |
150
+ | `ISSUE_FEATURE` | `[Feature]`, `[RFE]`, `[Enhancement]`, `Feature Request`, `Proposal` |
151
+ | `ISSUE_OTHER` | Anything else |
152
+ | `PR_BUGFIX` | Title starts with `fix`, branch contains `fix/`/`bugfix/`, label `bug` |
153
+ | `PR_OTHER` | Everything else |
154
+
155
+ ---
156
+
157
+ ## Phase 3: Spawn Subagents (Individual Tool Calls)
158
+
159
+ **CRITICAL: Create tasks ONE BY ONE using individual `task_create` tool calls. NEVER batch or script.**
160
+
161
+ For each item, execute these steps sequentially:
162
+
163
+ ### Step 3.1: Create Task Record
164
+ ```typescript
165
+ task_create(
166
+ subject="Triage: #{number} {title}",
167
+ description="GitHub {issue|PR} triage analysis - {type}",
168
+ metadata={"type": "{ISSUE_QUESTION|ISSUE_BUG|ISSUE_FEATURE|ISSUE_OTHER|PR_BUGFIX|PR_OTHER}", "number": {number}}
169
+ )
170
+ ```
171
+
172
+ ### Step 3.2: Spawn Analysis Subagent (Background)
173
+ ```typescript
174
+ task(
175
+ category="quick",
176
+ run_in_background=true,
177
+ load_skills=[],
178
+ prompt=SUBAGENT_PROMPT
179
+ )
180
+ ```
181
+
182
+ **ABSOLUTE RULES for Subagents:**
183
+ - **ONLY ANALYZE** - Never take action on GitHub (no comments, merges, closes)
184
+ - **READ-ONLY** - Use tools only for reading code/GitHub data
185
+ - **WRITE REPORT ONLY** - Output goes to `{REPORT_DIR}/{issue|pr}-{number}.md` via Write tool
186
+ - **EVIDENCE REQUIRED** - Every claim must have GitHub permalink as proof
187
+
188
+ ```
189
+ For each item:
190
+ 1. task_create(subject="Triage: #{number} {title}")
191
+ 2. task(category="quick", run_in_background=true, load_skills=[], prompt=SUBAGENT_PROMPT)
192
+ 3. Store mapping: item_number -> { task_id, background_task_id }
193
+ ```
194
+
195
+ ---
196
+
197
+ ## Subagent Prompts
198
+
199
+ ### Common Preamble (include in ALL subagent prompts)
200
+
201
+ ```
202
+ CONTEXT:
203
+ - Repository: {REPO}
204
+ - Report directory: {REPORT_DIR}
205
+ - Current commit SHA: {COMMIT_SHA}
206
+
207
+ PERMALINK FORMAT:
208
+ Every factual claim MUST include a permalink: https://github.com/{REPO}/blob/{COMMIT_SHA}/{filepath}#L{start}-L{end}
209
+ No permalink = no claim. Mark unverifiable claims as [UNVERIFIED].
210
+ To get current SHA if needed: git rev-parse HEAD
211
+
212
+ ABSOLUTE RULES (violating ANY = critical failure):
213
+ - NEVER run gh issue comment, gh issue close, gh issue edit
214
+ - NEVER run gh pr comment, gh pr merge, gh pr review, gh pr edit
215
+ - NEVER run any gh command with -X POST, -X PUT, -X PATCH, -X DELETE
216
+ - NEVER run git checkout, git fetch, git pull, git switch, git worktree
217
+ - Your ONLY writable output: {REPORT_DIR}/{issue|pr}-{number}.md via the Write tool
218
+ ```
219
+
220
+
221
+ ---
222
+
223
+ ### ISSUE_QUESTION
224
+
225
+ ```
226
+ You are analyzing issue #{number} for {REPO}.
227
+
228
+ ITEM:
229
+ - Issue #{number}: {title}
230
+ - Author: {author}
231
+ - Body: {body}
232
+ - Comments: {comments_summary}
233
+
234
+ TASK:
235
+ 1. Understand the question.
236
+ 2. Search the codebase (Grep, Read) for the answer.
237
+ 3. For every finding, construct a permalink: https://github.com/{REPO}/blob/{COMMIT_SHA}/{path}#L{N}
238
+ 4. Write report to {REPORT_DIR}/issue-{number}.md
239
+
240
+ REPORT FORMAT (write this as the file content):
241
+
242
+ # Issue #{number}: {title}
243
+ **Type:** Question | **Author:** {author} | **Created:** {createdAt}
244
+
245
+ ## Question
246
+ [1-2 sentence summary]
247
+
248
+ ## Findings
249
+ [Each finding with permalink proof. Example:]
250
+ - The config is parsed in [`src/config/loader.ts#L42-L58`](https://github.com/{REPO}/blob/{SHA}/src/config/loader.ts#L42-L58)
251
+
252
+ ## Suggested Answer
253
+ [Draft answer with code references and permalinks]
254
+
255
+ ## Confidence: [HIGH | MEDIUM | LOW]
256
+ [Reason. If LOW: what's missing]
257
+
258
+ ## Recommended Action
259
+ [What maintainer should do]
260
+
261
+ ---
262
+ REMEMBER: No permalink = no claim. Every code reference needs a permalink.
263
+ ```
264
+
265
+ ---
266
+
267
+ ### ISSUE_BUG
268
+
269
+ ```
270
+ You are analyzing bug report #{number} for {REPO}.
271
+
272
+ ITEM:
273
+ - Issue #{number}: {title}
274
+ - Author: {author}
275
+ - Body: {body}
276
+ - Comments: {comments_summary}
277
+
278
+ TASK:
279
+ 1. Understand: expected behavior, actual behavior, reproduction steps.
280
+ 2. Search the codebase for relevant code. Trace the logic.
281
+ 3. Determine verdict: CONFIRMED_BUG, NOT_A_BUG, ALREADY_FIXED, or UNCLEAR.
282
+ 4. For ALREADY_FIXED: find the fixing commit using git log/git blame. Include the commit SHA and what changed.
283
+ 5. For every finding, construct a permalink.
284
+ 6. Write report to {REPORT_DIR}/issue-{number}.md
285
+
286
+ FINDING "ALREADY_FIXED" COMMITS:
287
+ - Use `git log --all --oneline -- {file}` to find recent changes to relevant files
288
+ - Use `git log --all --grep="fix" --grep="{keyword}" --all-match --oneline` to search commit messages
289
+ - Use `git blame {file}` to find who last changed the relevant lines
290
+ - Use `git show {commit_sha}` to verify the fix
291
+ - Construct commit permalink: https://github.com/{REPO}/commit/{fix_commit_sha}
292
+
293
+ REPORT FORMAT (write this as the file content):
294
+
295
+ # Issue #{number}: {title}
296
+ **Type:** Bug Report | **Author:** {author} | **Created:** {createdAt}
297
+
298
+ ## Bug Summary
299
+ **Expected:** [what user expects]
300
+ **Actual:** [what actually happens]
301
+ **Reproduction:** [steps if provided]
302
+
303
+ ## Verdict: [CONFIRMED_BUG | NOT_A_BUG | ALREADY_FIXED | UNCLEAR]
304
+
305
+ ## Analysis
306
+
307
+ ### Evidence
308
+ [Each piece of evidence with permalink. No permalink = mark [UNVERIFIED]]
309
+
310
+ ### Root Cause (if CONFIRMED_BUG)
311
+ [Which file, which function, what goes wrong]
312
+ - Problematic code: [`{path}#L{N}`](permalink)
313
+
314
+ ### Why Not A Bug (if NOT_A_BUG)
315
+ [Rigorous proof with permalinks that current behavior is correct]
316
+
317
+ ### Fix Details (if ALREADY_FIXED)
318
+ - **Fixed in commit:** [`{short_sha}`](https://github.com/{REPO}/commit/{full_sha})
319
+ - **Fixed date:** {date}
320
+ - **What changed:** [description with diff permalink]
321
+ - **Fixed by:** {author}
322
+
323
+ ### Blockers (if UNCLEAR)
324
+ [What prevents determination, what to investigate next]
325
+
326
+ ## Severity: [LOW | MEDIUM | HIGH | CRITICAL]
327
+
328
+ ## Affected Files
329
+ [List with permalinks]
330
+
331
+ ## Suggested Fix (if CONFIRMED_BUG)
332
+ [Specific approach: "In {file}#L{N}, change X to Y because Z"]
333
+
334
+ ## Recommended Action
335
+ [What maintainer should do]
336
+
337
+ ---
338
+ CRITICAL: Claims without permalinks are worthless. If you cannot find evidence, say so explicitly rather than making unverified claims.
339
+ ```
340
+
341
+ ---
342
+
343
+ ### ISSUE_FEATURE
344
+
345
+ ```
346
+ You are analyzing feature request #{number} for {REPO}.
347
+
348
+ ITEM:
349
+ - Issue #{number}: {title}
350
+ - Author: {author}
351
+ - Body: {body}
352
+ - Comments: {comments_summary}
353
+
354
+ TASK:
355
+ 1. Understand the request.
356
+ 2. Search codebase for existing (partial/full) implementations.
357
+ 3. Assess feasibility.
358
+ 4. Write report to {REPORT_DIR}/issue-{number}.md
359
+
360
+ REPORT FORMAT (write this as the file content):
361
+
362
+ # Issue #{number}: {title}
363
+ **Type:** Feature Request | **Author:** {author} | **Created:** {createdAt}
364
+
365
+ ## Request Summary
366
+ [What the user wants]
367
+
368
+ ## Existing Implementation: [YES_FULLY | YES_PARTIALLY | NO]
369
+ [If exists: where, with permalinks to the implementation]
370
+
371
+ ## Feasibility: [EASY | MODERATE | HARD | ARCHITECTURAL_CHANGE]
372
+
373
+ ## Relevant Files
374
+ [With permalinks]
375
+
376
+ ## Implementation Notes
377
+ [Approach, pitfalls, dependencies]
378
+
379
+ ## Recommended Action
380
+ [What maintainer should do]
381
+ ```
382
+
383
+ ---
384
+
385
+ ### ISSUE_OTHER
386
+
387
+ ```
388
+ You are analyzing issue #{number} for {REPO}.
389
+
390
+ ITEM:
391
+ - Issue #{number}: {title}
392
+ - Author: {author}
393
+ - Body: {body}
394
+ - Comments: {comments_summary}
395
+
396
+ TASK: Assess and write report to {REPORT_DIR}/issue-{number}.md
397
+
398
+ REPORT FORMAT (write this as the file content):
399
+
400
+ # Issue #{number}: {title}
401
+ **Type:** [QUESTION | BUG | FEATURE | DISCUSSION | META | STALE]
402
+ **Author:** {author} | **Created:** {createdAt}
403
+
404
+ ## Summary
405
+ [1-2 sentences]
406
+
407
+ ## Needs Attention: [YES | NO]
408
+ ## Suggested Label: [if any]
409
+ ## Recommended Action: [what maintainer should do]
410
+ ```
411
+
412
+ ---
413
+
414
+ ### PR_BUGFIX
415
+
416
+ ```
417
+ You are reviewing PR #{number} for {REPO}.
418
+
419
+ ITEM:
420
+ - PR #{number}: {title}
421
+ - Author: {author}
422
+ - Base: {baseRefName} <- Head: {headRefName}
423
+ - Draft: {isDraft} | Mergeable: {mergeable}
424
+ - Review: {reviewDecision} | CI: {statusCheckRollup_summary}
425
+ - Body: {body}
426
+
427
+ TASK:
428
+ 1. Fetch PR details (READ-ONLY): gh pr view {number} --repo {REPO} --json files,reviews,comments,statusCheckRollup,reviewDecision
429
+ 2. Read diff: gh api repos/{REPO}/pulls/{number}/files
430
+ 3. Search codebase to verify fix correctness.
431
+ 4. Write report to {REPORT_DIR}/pr-{number}.md
432
+
433
+ REPORT FORMAT (write this as the file content):
434
+
435
+ # PR #{number}: {title}
436
+ **Type:** Bugfix | **Author:** {author}
437
+ **Base:** {baseRefName} <- {headRefName} | **Draft:** {isDraft}
438
+
439
+ ## Fix Summary
440
+ [What bug, how fixed - with permalinks to changed code]
441
+
442
+ ## Code Review
443
+
444
+ ### Correctness
445
+ [Is fix correct? Root cause addressed? Evidence with permalinks]
446
+
447
+ ### Side Effects
448
+ [Risky changes, breaking changes - with permalinks if any]
449
+
450
+ ### Code Quality
451
+ [Style, patterns, test coverage]
452
+
453
+ ## Merge Readiness
454
+
455
+ | Check | Status |
456
+ |-------|--------|
457
+ | CI | [PASS / FAIL / PENDING] |
458
+ | Review | [APPROVED / CHANGES_REQUESTED / PENDING / NONE] |
459
+ | Mergeable | [YES / NO / CONFLICTED] |
460
+ | Draft | [YES / NO] |
461
+ | Correctness | [VERIFIED / CONCERNS / UNCLEAR] |
462
+ | Risk | [NONE / LOW / MEDIUM / HIGH] |
463
+
464
+ ## Files Changed
465
+ [List with brief descriptions]
466
+
467
+ ## Recommended Action: [MERGE | REQUEST_CHANGES | NEEDS_REVIEW | WAIT]
468
+ [Reasoning with evidence]
469
+
470
+ ---
471
+ NEVER merge. NEVER comment. NEVER review. Write to file ONLY.
472
+ ```
473
+
474
+ ---
475
+
476
+ ### PR_OTHER
477
+
478
+ ```
479
+ You are reviewing PR #{number} for {REPO}.
480
+
481
+ ITEM:
482
+ - PR #{number}: {title}
483
+ - Author: {author}
484
+ - Base: {baseRefName} <- Head: {headRefName}
485
+ - Draft: {isDraft} | Mergeable: {mergeable}
486
+ - Review: {reviewDecision} | CI: {statusCheckRollup_summary}
487
+ - Body: {body}
488
+
489
+ TASK:
490
+ 1. Fetch PR details (READ-ONLY): gh pr view {number} --repo {REPO} --json files,reviews,comments,statusCheckRollup,reviewDecision
491
+ 2. Read diff: gh api repos/{REPO}/pulls/{number}/files
492
+ 3. Write report to {REPORT_DIR}/pr-{number}.md
493
+
494
+ REPORT FORMAT (write this as the file content):
495
+
496
+ # PR #{number}: {title}
497
+ **Type:** [FEATURE | REFACTOR | DOCS | CHORE | TEST | OTHER]
498
+ **Author:** {author}
499
+ **Base:** {baseRefName} <- {headRefName} | **Draft:** {isDraft}
500
+
501
+ ## Summary
502
+ [2-3 sentences with permalinks to key changes]
503
+
504
+ ## Status
505
+
506
+ | Check | Status |
507
+ |-------|--------|
508
+ | CI | [PASS / FAIL / PENDING] |
509
+ | Review | [APPROVED / CHANGES_REQUESTED / PENDING / NONE] |
510
+ | Mergeable | [YES / NO / CONFLICTED] |
511
+ | Risk | [LOW / MEDIUM / HIGH] |
512
+ | Alignment | [YES / NO / UNCLEAR] |
513
+
514
+ ## Files Changed
515
+ [Count and key files]
516
+
517
+ ## Blockers
518
+ [If any]
519
+
520
+ ## Recommended Action: [MERGE | REQUEST_CHANGES | NEEDS_REVIEW | CLOSE | WAIT]
521
+ [Reasoning]
522
+
523
+ ---
524
+ NEVER merge. NEVER comment. NEVER review. Write to file ONLY.
525
+ ```
526
+
527
+ ---
528
+
529
+ ## Phase 4: Collect & Update
530
+
531
+ Poll `background_output()` per task. As each completes:
532
+ 1. Parse report.
533
+ 2. `task_update(id=task_id, status="completed", description=REPORT_SUMMARY)`
534
+ 3. Stream to user immediately.
535
+
536
+ ---
537
+
538
+ ## Phase 5: Final Summary
539
+
540
+ Write to `{REPORT_DIR}/SUMMARY.md` AND display to user:
541
+
542
+ ```markdown
543
+ # GitHub Triage Report - {REPO}
544
+
545
+ **Date:** {date} | **Commit:** {COMMIT_SHA}
546
+ **Items Processed:** {total}
547
+ **Report Directory:** {REPORT_DIR}
548
+
549
+ ## Issues ({issue_count})
550
+ | Category | Count |
551
+ |----------|-------|
552
+ | Bug Confirmed | {n} |
553
+ | Bug Already Fixed | {n} |
554
+ | Not A Bug | {n} |
555
+ | Needs Investigation | {n} |
556
+ | Question Analyzed | {n} |
557
+ | Feature Assessed | {n} |
558
+ | Other | {n} |
559
+
560
+ ## PRs ({pr_count})
561
+ | Category | Count |
562
+ |----------|-------|
563
+ | Bugfix Reviewed | {n} |
564
+ | Other PR Reviewed | {n} |
565
+
566
+ ## Items Requiring Attention
567
+ [Each item: number, title, verdict, 1-line summary, link to report file]
568
+
569
+ ## Report Files
570
+ [All generated files with paths]
571
+ ```
572
+
573
+ ---
574
+
575
+ ## Anti-Patterns
576
+
577
+ | Violation | Severity |
578
+ |-----------|----------|
579
+ | ANY GitHub mutation (comment/close/merge/review/label/edit) | **CRITICAL** |
580
+ | Claim without permalink | **CRITICAL** |
581
+ | Using category other than `quick` | CRITICAL |
582
+ | Batching multiple items into one task | CRITICAL |
583
+ | `run_in_background=false` | CRITICAL |
584
+ | `git checkout` on PR branch | CRITICAL |
585
+ | Guessing without codebase evidence | HIGH |
586
+ | Not writing report to `{REPORT_DIR}` | HIGH |
587
+ | Using branch name instead of commit SHA in permalink | HIGH |