oh-my-opencode 4.4.0 → 4.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +178 -129
  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 +52205 -50528
  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,127 @@
1
+ # Execution Plan: Relax comment-checker hook false positives
2
+
3
+ ## Problem Analysis
4
+
5
+ The comment-checker hook delegates to an external Go binary (`code-yeongyu/go-claude-code-comment-checker`). The binary:
6
+ 1. Detects ALL comments in written/edited code using tree-sitter
7
+ 2. Filters out only BDD markers, linter directives, and shebangs
8
+ 3. Flags every remaining comment as problematic (exit code 2)
9
+ 4. In the output formatter (`formatter.go`), uses `AgentMemoFilter` to categorize comments for display
10
+
11
+ The `AgentMemoFilter` in `pkg/filters/agent_memo.go` contains the overly aggressive regex:
12
+ ```go
13
+ regexp.MustCompile(`(?i)^[\s#/*-]*note:\s*\w`),
14
+ ```
15
+
16
+ This matches ANY comment starting with `Note:` (case-insensitive) followed by a word character, causing legitimate comments like `// Note: Thread-safe implementation` or `// NOTE: See RFC 7231` to be classified as "AGENT MEMO" AI slop with an aggressive warning banner.
17
+
18
+ Additionally, the binary flags ALL non-filtered comments (not just agent memos), so even without the `Note:` regex, `// Note: ...` comments would still be flagged as generic "COMMENT DETECTED."
19
+
20
+ ## Architecture Understanding
21
+
22
+ ```
23
+ TypeScript (oh-my-opencode) Go Binary (go-claude-code-comment-checker)
24
+ ───────────────────────────── ──────────────────────────────────────────
25
+ hook.ts main.go
26
+ ├─ tool.execute.before ├─ Read JSON from stdin
27
+ │ └─ registerPendingCall() ├─ Detect comments (tree-sitter)
28
+ └─ tool.execute.after ├─ applyFilters (BDD, Directive, Shebang)
29
+ └─ processWithCli() ├─ FormatHookMessage (uses AgentMemoFilter for display)
30
+ └─ runCommentChecker() └─ exit 0 (clean) or exit 2 (comments found, message on stderr)
31
+ └─ spawn binary, pipe JSON
32
+ └─ read stderr → message
33
+ └─ append to output
34
+ ```
35
+
36
+ Key files in oh-my-opencode:
37
+ - `src/hooks/comment-checker/hook.ts` - Hook factory, registers before/after handlers
38
+ - `src/hooks/comment-checker/cli-runner.ts` - Orchestrates CLI invocation, semaphore
39
+ - `src/hooks/comment-checker/cli.ts` - Binary resolution, process spawning, timeout handling
40
+ - `src/hooks/comment-checker/types.ts` - PendingCall, CommentInfo types
41
+ - `src/config/schema/comment-checker.ts` - Config schema (currently only `custom_prompt`)
42
+
43
+ Key files in Go binary:
44
+ - `pkg/filters/agent_memo.go` - Contains the aggressive `note:\s*\w` regex (line 20)
45
+ - `pkg/output/formatter.go` - Uses AgentMemoFilter to add "AGENT MEMO" warnings
46
+ - `cmd/comment-checker/main.go` - Filter pipeline (BDD + Directive + Shebang only)
47
+
48
+ ## Step-by-Step Plan
49
+
50
+ ### Step 1: Create feature branch
51
+ ```bash
52
+ git checkout dev
53
+ git pull origin dev
54
+ git checkout -b fix/comment-checker-note-false-positive
55
+ ```
56
+
57
+ ### Step 2: Extend CommentCheckerConfigSchema
58
+ **File: `src/config/schema/comment-checker.ts`**
59
+
60
+ Add `allowed_comment_prefixes` field with sensible defaults. This lets users configure which comment prefixes should be treated as legitimate (not AI slop).
61
+
62
+ ### Step 3: Add a post-processing filter in cli-runner.ts
63
+ **File: `src/hooks/comment-checker/cli-runner.ts`**
64
+
65
+ After the Go binary returns its result, parse the stderr message to identify and suppress comments that match allowed prefixes. The binary's output contains XML like:
66
+ ```xml
67
+ <comments file="/path/to/file.ts">
68
+ <comment line-number="5">// Note: Thread-safe</comment>
69
+ </comments>
70
+ ```
71
+
72
+ Add a function `filterAllowedComments()` that:
73
+ 1. Extracts `<comment>` elements from the message
74
+ 2. Checks if the comment text matches any allowed prefix pattern
75
+ 3. If ALL flagged comments match allowed patterns, suppress the entire warning
76
+ 4. If some comments are legitimate and some aren't, rebuild the message without the legitimate ones
77
+
78
+ ### Step 4: Create dedicated filter module
79
+ **File: `src/hooks/comment-checker/allowed-prefix-filter.ts`** (new)
80
+
81
+ Extract the filtering logic into its own module per the 200 LOC / single-responsibility rule.
82
+
83
+ ### Step 5: Pass allowed_comment_prefixes through the hook chain
84
+ **File: `src/hooks/comment-checker/hook.ts`**
85
+
86
+ Thread the `allowed_comment_prefixes` config from `createCommentCheckerHooks()` down to `processWithCli()` and `processApplyPatchEditsWithCli()`.
87
+
88
+ ### Step 6: Add test cases
89
+ **File: `src/hooks/comment-checker/allowed-prefix-filter.test.ts`** (new)
90
+
91
+ Test cases covering:
92
+ - `// Note: Thread-safe implementation` - should NOT be flagged (false positive)
93
+ - `// NOTE: See RFC 7231 for details` - should NOT be flagged
94
+ - `// Note: changed from X to Y` - SHOULD still be flagged (genuine AI slop)
95
+ - `// TODO: implement caching` - should NOT be flagged
96
+ - `// FIXME: race condition` - should NOT be flagged
97
+ - `// HACK: workaround for upstream bug` - should NOT be flagged
98
+ - `// Added new validation logic` - SHOULD be flagged
99
+ - Custom allowed patterns from config
100
+
101
+ **File: `src/hooks/comment-checker/cli-runner.test.ts`** (new or extend cli.test.ts)
102
+
103
+ Integration-level tests for the post-processing pipeline.
104
+
105
+ ### Step 7: Verify
106
+ ```bash
107
+ bun test src/hooks/comment-checker/
108
+ bun run typecheck
109
+ ```
110
+
111
+ ### Step 8: Commit and push
112
+ ```bash
113
+ git add -A
114
+ git commit -m "fix(comment-checker): add allowed-prefix filter to reduce false positives on Note: comments"
115
+ git push -u origin fix/comment-checker-note-false-positive
116
+ ```
117
+
118
+ ### Step 9: Create PR
119
+ ```bash
120
+ gh pr create --title "fix(comment-checker): reduce false positives for legitimate Note: comments" --body-file /tmp/pr-body.md --base dev
121
+ ```
122
+
123
+ ### Step 10 (Follow-up): Upstream Go binary fix
124
+ File an issue or PR on `code-yeongyu/go-claude-code-comment-checker` to:
125
+ 1. Relax `(?i)^[\s#/*-]*note:\s*\w` to be more specific (e.g., `note:\s*(changed|modified|updated|added|removed|implemented|refactored)`)
126
+ 2. Add a dedicated `LegitimateCommentFilter` to the filter pipeline in `main.go`
127
+ 3. Support `--allow-prefix` CLI flag for external configuration
@@ -0,0 +1,42 @@
1
+ ## Summary
2
+
3
+ - Add `allowed_comment_prefixes` config to `CommentCheckerConfigSchema` with sensible defaults (Note:, TODO:, FIXME:, HACK:, WARNING:, etc.)
4
+ - Add post-processing filter in `allowed-prefix-filter.ts` that suppresses false positives from the Go binary's output before appending to tool output
5
+ - Add 11 test cases covering false positive scenarios (Note:, TODO:, FIXME:, case-insensitivity, mixed comments, agent memo header suppression)
6
+
7
+ ## Problem
8
+
9
+ The comment-checker hook's upstream Go binary (`go-claude-code-comment-checker`) flags ALL non-filtered comments as problematic. Its `AgentMemoFilter` regex `(?i)^[\s#/*-]*note:\s*\w` classifies any `Note:` comment as AI-generated "agent memo" slop, triggering an aggressive warning banner.
10
+
11
+ This causes false positives for legitimate, widely-used comment patterns:
12
+ ```typescript
13
+ // Note: Thread-safe implementation required due to concurrent access
14
+ // NOTE: See RFC 7231 section 6.5.4 for 404 semantics
15
+ // Note: This timeout matches the upstream service SLA
16
+ ```
17
+
18
+ These are standard engineering documentation patterns, not AI slop.
19
+
20
+ ## Solution
21
+
22
+ Rather than waiting for an upstream binary fix, this PR adds a configurable **post-processing filter** on the TypeScript side:
23
+
24
+ 1. **Config**: `comment_checker.allowed_comment_prefixes` - array of case-insensitive prefixes (defaults: `note:`, `todo:`, `fixme:`, `hack:`, `warning:`, `important:`, `bug:`, etc.)
25
+ 2. **Filter**: After the Go binary returns flagged comments, `filterAllowedComments()` parses the XML output and suppresses comments matching allowed prefixes
26
+ 3. **Behavior**: If ALL flagged comments are legitimate → suppress entire warning. If mixed → remove only the legitimate entries from the XML, keep the warning for actual slop.
27
+
28
+ Users can customize via config:
29
+ ```jsonc
30
+ {
31
+ "comment_checker": {
32
+ "allowed_comment_prefixes": ["note:", "todo:", "fixme:", "custom-prefix:"]
33
+ }
34
+ }
35
+ ```
36
+
37
+ ## Test Plan
38
+
39
+ - 11 new test cases in `allowed-prefix-filter.test.ts`
40
+ - Updated assertion in `hook.apply-patch.test.ts` for new parameter
41
+ - `bun test src/hooks/comment-checker/` passes
42
+ - `bun run typecheck` clean
@@ -0,0 +1,120 @@
1
+ # Verification Strategy
2
+
3
+ ## 1. Unit Tests
4
+
5
+ ### New test file: `allowed-prefix-filter.test.ts`
6
+ Run: `bun test src/hooks/comment-checker/allowed-prefix-filter.test.ts`
7
+
8
+ | # | Scenario | Input | Expected |
9
+ |---|----------|-------|----------|
10
+ | 1 | Only Note: comments (default prefixes) | `// Note: Thread-safe`, `// NOTE: See RFC` | `hasRemainingComments: false`, empty message |
11
+ | 2 | Only TODO/FIXME/HACK (default prefixes) | `// TODO: impl`, `// FIXME: race`, `# HACK: workaround` | Suppressed |
12
+ | 3 | Only AI slop comments | `// Added validation`, `// Refactored for perf` | Full message preserved |
13
+ | 4 | Mixed legitimate + slop | `// Note: Thread-safe`, `// Changed from old to new` | Message kept, Note: entry removed from XML |
14
+ | 5 | Case-insensitive Note: | `// note: lowercase test` | Suppressed |
15
+ | 6 | Hash-prefixed comments | `# Note: Python`, `# TODO: something` | Suppressed (prefix stripped before matching) |
16
+ | 7 | Security: prefix | `// Security: validate input` | Suppressed |
17
+ | 8 | Warning: prefix | `// WARNING: mutates input` | Suppressed |
18
+ | 9 | Empty allowed prefixes | `// Note: should pass through` | Full message preserved (no filtering) |
19
+ | 10 | Custom prefix | `// PERF: O(n log n)` with `["perf:"]` | Suppressed |
20
+ | 11 | Agent memo header + Note: | Full agent memo banner + `// Note: Thread-safe` | Entire message suppressed including banner |
21
+
22
+ ### Existing test: `hook.apply-patch.test.ts`
23
+ Run: `bun test src/hooks/comment-checker/hook.apply-patch.test.ts`
24
+
25
+ Verify the updated mock assertion accepts the new `allowedPrefixes` array parameter.
26
+
27
+ ### Existing test: `cli.test.ts`
28
+ Run: `bun test src/hooks/comment-checker/cli.test.ts`
29
+
30
+ Verify no regressions in binary spawning, timeout, and semaphore logic.
31
+
32
+ ## 2. Type Checking
33
+
34
+ ```bash
35
+ bun run typecheck
36
+ ```
37
+
38
+ Verify:
39
+ - `CommentCheckerConfigSchema` change propagates correctly to `CommentCheckerConfig` type
40
+ - All call sites in `hook.ts` and `cli-runner.ts` pass the new parameter
41
+ - `filterAllowedComments` return type matches usage in `cli-runner.ts`
42
+ - No new type errors introduced
43
+
44
+ ## 3. LSP Diagnostics
45
+
46
+ ```bash
47
+ # Check all changed files for errors
48
+ lsp_diagnostics src/config/schema/comment-checker.ts
49
+ lsp_diagnostics src/hooks/comment-checker/allowed-prefix-filter.ts
50
+ lsp_diagnostics src/hooks/comment-checker/cli-runner.ts
51
+ lsp_diagnostics src/hooks/comment-checker/hook.ts
52
+ lsp_diagnostics src/hooks/comment-checker/allowed-prefix-filter.test.ts
53
+ ```
54
+
55
+ ## 4. Full Test Suite
56
+
57
+ ```bash
58
+ bun test src/hooks/comment-checker/
59
+ ```
60
+
61
+ All 4 test files should pass:
62
+ - `cli.test.ts` (existing - no regressions)
63
+ - `pending-calls.test.ts` (existing - no regressions)
64
+ - `hook.apply-patch.test.ts` (modified assertion)
65
+ - `allowed-prefix-filter.test.ts` (new - all 11 cases)
66
+
67
+ ## 5. Build Verification
68
+
69
+ ```bash
70
+ bun run build
71
+ ```
72
+
73
+ Ensure the new module is properly bundled and exported.
74
+
75
+ ## 6. Integration Verification (Manual)
76
+
77
+ If binary is available locally:
78
+
79
+ ```bash
80
+ # Test with a file containing Note: comment
81
+ echo '{"session_id":"test","tool_name":"Write","transcript_path":"","cwd":"/tmp","hook_event_name":"PostToolUse","tool_input":{"file_path":"/tmp/test.ts","content":"// Note: Thread-safe implementation\nconst x = 1"}}' | ~/.cache/oh-my-opencode/bin/comment-checker check
82
+ echo "Exit code: $?"
83
+ ```
84
+
85
+ Expected: Binary returns exit 2 (comment detected), but the TypeScript post-filter should suppress it.
86
+
87
+ ## 7. Config Validation
88
+
89
+ Test that config changes work:
90
+
91
+ ```jsonc
92
+ // .opencode/oh-my-opencode.jsonc
93
+ {
94
+ "comment_checker": {
95
+ // Override: only allow Note: and TODO:
96
+ "allowed_comment_prefixes": ["note:", "todo:"]
97
+ }
98
+ }
99
+ ```
100
+
101
+ Verify Zod schema accepts the config and defaults are applied when field is omitted.
102
+
103
+ ## 8. Regression Checks
104
+
105
+ Verify the following still work correctly:
106
+ - AI slop comments (`// Added new feature`, `// Refactored for performance`) are still flagged
107
+ - BDD comments (`// given`, `// when`, `// then`) are still allowed (binary-side filter)
108
+ - Linter directives (`// eslint-disable`, `// @ts-ignore`) are still allowed (binary-side filter)
109
+ - Shebangs (`#!/usr/bin/env node`) are still allowed (binary-side filter)
110
+ - `custom_prompt` config still works
111
+ - Semaphore prevents concurrent comment-checker runs
112
+ - Timeout handling (30s) still works
113
+
114
+ ## 9. Edge Cases to Watch
115
+
116
+ - Empty message from binary (exit code 0) - filter should be no-op
117
+ - Binary not available - hook gracefully degrades (existing behavior)
118
+ - Message with no `<comment>` XML elements - filter passes through
119
+ - Very long messages with many comments - regex performance
120
+ - Comments containing XML-special characters (`<`, `>`, `&`) in text
@@ -0,0 +1 @@
1
+ {"total_tokens": null, "duration_ms": 399000, "total_duration_seconds": 399}