dsh-compound-engineering 0.0.0-stage → 0.1.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 (461) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +160 -2
  3. package/README.zh.md +161 -0
  4. package/cordis.patch.yml +6 -0
  5. package/lib/frontmatter.js +167 -0
  6. package/lib/index.js +46 -0
  7. package/lib/provider.js +201 -0
  8. package/package.json +62 -4
  9. package/skills/CODING_STANDARDS.md +68 -0
  10. package/skills/ce-babysit-pr/SKILL.md +59 -0
  11. package/skills/ce-babysit-pr/references/branch-currency.md +22 -0
  12. package/skills/ce-babysit-pr/references/envelope.md +44 -0
  13. package/skills/ce-babysit-pr/references/pipeline.md +15 -0
  14. package/skills/ce-babysit-pr/references/report.md +20 -0
  15. package/skills/ce-babysit-pr/references/settle.md +37 -0
  16. package/skills/ce-babysit-pr/references/setup.md +33 -0
  17. package/skills/ce-babysit-pr/references/stack-commands.md +39 -0
  18. package/skills/ce-babysit-pr/references/stack.md +43 -0
  19. package/skills/ce-babysit-pr/references/tick.md +102 -0
  20. package/skills/ce-babysit-pr/references/watch-loop.md +222 -0
  21. package/skills/ce-babysit-pr/scripts/pr-snapshot +3656 -0
  22. package/skills/ce-bakeoff/SKILL.md +48 -0
  23. package/skills/ce-bakeoff/references/candidates.md +37 -0
  24. package/skills/ce-bakeoff/references/judging.md +19 -0
  25. package/skills/ce-bakeoff/references/output.md +11 -0
  26. package/skills/ce-bakeoff/references/verification.md +15 -0
  27. package/skills/ce-brainstorm/SKILL.md +69 -0
  28. package/skills/ce-brainstorm/references/agents/slack-researcher.md +127 -0
  29. package/skills/ce-brainstorm/references/approaches.md +57 -0
  30. package/skills/ce-brainstorm/references/bakeoff.md +9 -0
  31. package/skills/ce-brainstorm/references/blindspot-pass.md +70 -0
  32. package/skills/ce-brainstorm/references/brainstorm-sections.md +458 -0
  33. package/skills/ce-brainstorm/references/dialogue.md +89 -0
  34. package/skills/ce-brainstorm/references/handoff.md +187 -0
  35. package/skills/ce-brainstorm/references/html-rendering.md +638 -0
  36. package/skills/ce-brainstorm/references/interaction-rules.md +33 -0
  37. package/skills/ce-brainstorm/references/markdown-rendering.md +242 -0
  38. package/skills/ce-brainstorm/references/model-tiers.md +13 -0
  39. package/skills/ce-brainstorm/references/output-mode.md +26 -0
  40. package/skills/ce-brainstorm/references/phase-0.md +104 -0
  41. package/skills/ce-brainstorm/references/plan-write.md +32 -0
  42. package/skills/ce-brainstorm/references/product-pressure-test.md +42 -0
  43. package/skills/ce-brainstorm/references/reasoning-elevation.md +124 -0
  44. package/skills/ce-brainstorm/references/settled-decisions.md +45 -0
  45. package/skills/ce-brainstorm/references/synthesis-summary.md +149 -0
  46. package/skills/ce-brainstorm/references/universal-brainstorming.md +72 -0
  47. package/skills/ce-brainstorm/references/verdict-routing.md +26 -0
  48. package/skills/ce-brainstorm/references/visual-probes.md +164 -0
  49. package/skills/ce-brainstorm/scripts/elevation-dispatch.sh +288 -0
  50. package/skills/ce-brainstorm/scripts/light-webserver.js +1275 -0
  51. package/skills/ce-brainstorm/scripts/packs-resolve.py +737 -0
  52. package/skills/ce-brainstorm/scripts/peer-job-runner.py +2594 -0
  53. package/skills/ce-code-review/SKILL.md +40 -0
  54. package/skills/ce-code-review/references/action-class-rubric.md +67 -0
  55. package/skills/ce-code-review/references/cross-model-recovery.md +38 -0
  56. package/skills/ce-code-review/references/cross-model-review.md +191 -0
  57. package/skills/ce-code-review/references/depth-paths.md +32 -0
  58. package/skills/ce-code-review/references/diff-scope.md +59 -0
  59. package/skills/ce-code-review/references/dispatch-reviewers.md +135 -0
  60. package/skills/ce-code-review/references/findings-schema.json +125 -0
  61. package/skills/ce-code-review/references/finish-input.md +118 -0
  62. package/skills/ce-code-review/references/finish-review.md +202 -0
  63. package/skills/ce-code-review/references/intent-and-plan.md +73 -0
  64. package/skills/ce-code-review/references/modes-and-output.md +156 -0
  65. package/skills/ce-code-review/references/persona-catalog.md +66 -0
  66. package/skills/ce-code-review/references/personas/adversarial-reviewer.md +111 -0
  67. package/skills/ce-code-review/references/personas/agent-native-reviewer.md +173 -0
  68. package/skills/ce-code-review/references/personas/api-contract-reviewer.md +44 -0
  69. package/skills/ce-code-review/references/personas/correctness-reviewer.md +48 -0
  70. package/skills/ce-code-review/references/personas/data-migration-reviewer.md +111 -0
  71. package/skills/ce-code-review/references/personas/deployment-verification-agent.md +157 -0
  72. package/skills/ce-code-review/references/personas/julik-frontend-races-reviewer.md +45 -0
  73. package/skills/ce-code-review/references/personas/learnings-researcher.md +260 -0
  74. package/skills/ce-code-review/references/personas/maintainability-reviewer.md +85 -0
  75. package/skills/ce-code-review/references/personas/performance-reviewer.md +45 -0
  76. package/skills/ce-code-review/references/personas/previous-comments-reviewer.md +59 -0
  77. package/skills/ce-code-review/references/personas/project-standards-reviewer.md +77 -0
  78. package/skills/ce-code-review/references/personas/reliability-reviewer.md +49 -0
  79. package/skills/ce-code-review/references/personas/security-reviewer.md +50 -0
  80. package/skills/ce-code-review/references/personas/swift-ios-reviewer.md +99 -0
  81. package/skills/ce-code-review/references/personas/testing-reviewer.md +51 -0
  82. package/skills/ce-code-review/references/review-output-template.md +172 -0
  83. package/skills/ce-code-review/references/scope.md +176 -0
  84. package/skills/ce-code-review/references/select-and-route.md +93 -0
  85. package/skills/ce-code-review/references/subagent-template.md +206 -0
  86. package/skills/ce-code-review/references/validator-batch-template.md +67 -0
  87. package/skills/ce-code-review/scripts/cross-model-adversarial-review.sh +1275 -0
  88. package/skills/ce-code-review/scripts/findings-mechanics.py +274 -0
  89. package/skills/ce-code-review/scripts/packs-resolve.py +737 -0
  90. package/skills/ce-code-review/scripts/peer-job-runner.py +2594 -0
  91. package/skills/ce-code-review/scripts/review-scope.py +419 -0
  92. package/skills/ce-code-review/scripts/run-log.py +280 -0
  93. package/skills/ce-commit/SKILL.md +60 -0
  94. package/skills/ce-commit-push-pr/SKILL.md +69 -0
  95. package/skills/ce-commit-push-pr/references/apply-and-handoff.md +79 -0
  96. package/skills/ce-commit-push-pr/references/branch-creation.md +47 -0
  97. package/skills/ce-commit-push-pr/references/commit-and-push.md +26 -0
  98. package/skills/ce-commit-push-pr/references/compose.md +29 -0
  99. package/skills/ce-commit-push-pr/references/context.md +42 -0
  100. package/skills/ce-commit-push-pr/references/gh-stack-cli.md +83 -0
  101. package/skills/ce-commit-push-pr/references/pr-description-writing.md +208 -0
  102. package/skills/ce-commit-push-pr/references/stack-submit.md +81 -0
  103. package/skills/ce-compound/SKILL.md +79 -0
  104. package/skills/ce-compound/assets/resolution-template.md +96 -0
  105. package/skills/ce-compound/references/agents/best-practices-researcher.md +115 -0
  106. package/skills/ce-compound/references/agents/data-integrity-guardian.md +68 -0
  107. package/skills/ce-compound/references/agents/framework-docs-researcher.md +93 -0
  108. package/skills/ce-compound/references/agents/pattern-recognition-specialist.md +55 -0
  109. package/skills/ce-compound/references/agents/performance-oracle.md +108 -0
  110. package/skills/ce-compound/references/agents/security-sentinel.md +91 -0
  111. package/skills/ce-compound/references/agents/session-historian.md +82 -0
  112. package/skills/ce-compound/references/assembly.md +127 -0
  113. package/skills/ce-compound/references/concepts-vocabulary.md +98 -0
  114. package/skills/ce-compound/references/enhancement.md +42 -0
  115. package/skills/ce-compound/references/grounding-validation.md +89 -0
  116. package/skills/ce-compound/references/lightweight.md +56 -0
  117. package/skills/ce-compound/references/modes.md +13 -0
  118. package/skills/ce-compound/references/refresh-and-discoverability.md +96 -0
  119. package/skills/ce-compound/references/report.md +115 -0
  120. package/skills/ce-compound/references/research.md +144 -0
  121. package/skills/ce-compound/references/schema.yaml +236 -0
  122. package/skills/ce-compound/references/session-history.md +73 -0
  123. package/skills/ce-compound/references/yaml-schema.md +130 -0
  124. package/skills/ce-compound/scripts/packs-resolve.py +737 -0
  125. package/skills/ce-compound/scripts/session-history/__pycache__/dsh_session.cpython-314.pyc +0 -0
  126. package/skills/ce-compound/scripts/session-history/discover-sessions.sh +290 -0
  127. package/skills/ce-compound/scripts/session-history/discover_dsh.py +123 -0
  128. package/skills/ce-compound/scripts/session-history/dsh_session.py +225 -0
  129. package/skills/ce-compound/scripts/session-history/extract-errors.py +178 -0
  130. package/skills/ce-compound/scripts/session-history/extract-metadata.py +301 -0
  131. package/skills/ce-compound/scripts/session-history/extract-skeleton.py +346 -0
  132. package/skills/ce-compound/scripts/validate-doc-claims.py +497 -0
  133. package/skills/ce-compound/scripts/validate-frontmatter.py +137 -0
  134. package/skills/ce-compound-refresh/SKILL.md +88 -0
  135. package/skills/ce-compound-refresh/assets/resolution-template.md +96 -0
  136. package/skills/ce-compound-refresh/references/classify.md +42 -0
  137. package/skills/ce-compound-refresh/references/commit.md +7 -0
  138. package/skills/ce-compound-refresh/references/concepts-vocabulary.md +116 -0
  139. package/skills/ce-compound-refresh/references/discoverability.md +15 -0
  140. package/skills/ce-compound-refresh/references/investigate.md +23 -0
  141. package/skills/ce-compound-refresh/references/modes.md +27 -0
  142. package/skills/ce-compound-refresh/references/per-action-flows.md +142 -0
  143. package/skills/ce-compound-refresh/references/report.md +23 -0
  144. package/skills/ce-compound-refresh/references/schema.yaml +236 -0
  145. package/skills/ce-compound-refresh/references/scope.md +18 -0
  146. package/skills/ce-compound-refresh/references/worth-audit.md +35 -0
  147. package/skills/ce-compound-refresh/references/yaml-schema.md +130 -0
  148. package/skills/ce-compound-refresh/scripts/validate-doc-claims.py +497 -0
  149. package/skills/ce-compound-refresh/scripts/validate-frontmatter.py +137 -0
  150. package/skills/ce-debug/SKILL.md +122 -0
  151. package/skills/ce-debug/references/anti-patterns.md +91 -0
  152. package/skills/ce-debug/references/defense-in-depth.md +39 -0
  153. package/skills/ce-debug/references/fix.md +21 -0
  154. package/skills/ce-debug/references/investigate.md +114 -0
  155. package/skills/ce-debug/references/investigation-techniques.md +384 -0
  156. package/skills/ce-debug/references/pipeline-mode.md +78 -0
  157. package/skills/ce-debug/references/post-fix-handoff.md +60 -0
  158. package/skills/ce-debug/references/return-to-caller.md +57 -0
  159. package/skills/ce-doc-review/SKILL.md +75 -0
  160. package/skills/ce-doc-review/references/bulk-preview.md +146 -0
  161. package/skills/ce-doc-review/references/cross-model-review.md +207 -0
  162. package/skills/ce-doc-review/references/decision-primer.md +47 -0
  163. package/skills/ce-doc-review/references/dispatch.md +56 -0
  164. package/skills/ce-doc-review/references/document-intake.md +44 -0
  165. package/skills/ce-doc-review/references/findings-schema.json +85 -0
  166. package/skills/ce-doc-review/references/modes.md +20 -0
  167. package/skills/ce-doc-review/references/open-questions-defer.md +158 -0
  168. package/skills/ce-doc-review/references/persona-selection.md +41 -0
  169. package/skills/ce-doc-review/references/personas/adversarial-document-reviewer.md +109 -0
  170. package/skills/ce-doc-review/references/personas/coherence-reviewer.md +69 -0
  171. package/skills/ce-doc-review/references/personas/design-lens-reviewer.md +48 -0
  172. package/skills/ce-doc-review/references/personas/feasibility-reviewer.md +50 -0
  173. package/skills/ce-doc-review/references/personas/product-lens-reviewer.md +85 -0
  174. package/skills/ce-doc-review/references/personas/scope-guardian-reviewer.md +83 -0
  175. package/skills/ce-doc-review/references/personas/security-lens-reviewer.md +41 -0
  176. package/skills/ce-doc-review/references/personas/whole-doc-reviewer.md +25 -0
  177. package/skills/ce-doc-review/references/rendering-floor.md +175 -0
  178. package/skills/ce-doc-review/references/review-output-template.md +123 -0
  179. package/skills/ce-doc-review/references/subagent-template.md +188 -0
  180. package/skills/ce-doc-review/references/synthesis-and-presentation.md +350 -0
  181. package/skills/ce-doc-review/references/walkthrough.md +347 -0
  182. package/skills/ce-doc-review/scripts/cross-model-doc-review.sh +1270 -0
  183. package/skills/ce-doc-review/scripts/packs-resolve.py +737 -0
  184. package/skills/ce-doc-review/scripts/peer-job-runner.py +2594 -0
  185. package/skills/ce-dogfood/SKILL.md +66 -0
  186. package/skills/ce-dogfood/agents/openai.yaml +2 -0
  187. package/skills/ce-dogfood/references/dogfood-report-template.md +97 -0
  188. package/skills/ce-dogfood/references/phases.md +167 -0
  189. package/skills/ce-dogfood/references/test-matrix-taxonomy.md +62 -0
  190. package/skills/ce-dogfood/scripts/packs-resolve.py +737 -0
  191. package/skills/ce-explain/SKILL.md +81 -0
  192. package/skills/ce-explain/references/agents/behavior-trace-scout.md +19 -0
  193. package/skills/ce-explain/references/agents/work-recap-scout.md +23 -0
  194. package/skills/ce-explain/references/check-in.md +18 -0
  195. package/skills/ce-explain/references/destinations.md +35 -0
  196. package/skills/ce-explain/references/explainer-html.md +29 -0
  197. package/skills/ce-explain/references/explainer-markdown.md +24 -0
  198. package/skills/ce-explain/references/intake.md +50 -0
  199. package/skills/ce-explain/references/orchestration.md +46 -0
  200. package/skills/ce-handoff/SKILL.md +54 -0
  201. package/skills/ce-handoff/references/create.md +88 -0
  202. package/skills/ce-handoff/references/resume.md +46 -0
  203. package/skills/ce-ideate/SKILL.md +75 -0
  204. package/skills/ce-ideate/references/agents/issue-intelligence-analyst.md +166 -0
  205. package/skills/ce-ideate/references/agents/learnings-researcher.md +247 -0
  206. package/skills/ce-ideate/references/agents/slack-researcher.md +127 -0
  207. package/skills/ce-ideate/references/agents/web-researcher.md +121 -0
  208. package/skills/ce-ideate/references/decomposition.md +39 -0
  209. package/skills/ce-ideate/references/divergent-ideation.md +112 -0
  210. package/skills/ce-ideate/references/grounding.md +138 -0
  211. package/skills/ce-ideate/references/html-rendering.md +638 -0
  212. package/skills/ce-ideate/references/ideation-sections.md +191 -0
  213. package/skills/ce-ideate/references/issue-intelligence.md +44 -0
  214. package/skills/ce-ideate/references/markdown-rendering.md +242 -0
  215. package/skills/ce-ideate/references/output-mode.md +34 -0
  216. package/skills/ce-ideate/references/post-ideation-workflow.md +169 -0
  217. package/skills/ce-ideate/references/scope-gates.md +148 -0
  218. package/skills/ce-ideate/references/universal-ideation.md +119 -0
  219. package/skills/ce-ideate/references/user-research-artifacts.md +28 -0
  220. package/skills/ce-ideate/references/web-research-cache.md +56 -0
  221. package/skills/ce-noslop/SKILL.md +45 -0
  222. package/skills/ce-noslop/references/patterns.md +61 -0
  223. package/skills/ce-noslop/references/terminology.md +3 -0
  224. package/skills/ce-optimize/SKILL.md +64 -0
  225. package/skills/ce-optimize/references/agents/learnings-researcher.md +247 -0
  226. package/skills/ce-optimize/references/agents/repo-research-analyst.md +258 -0
  227. package/skills/ce-optimize/references/example-expensive-benchmark-spec.yaml +88 -0
  228. package/skills/ce-optimize/references/example-hard-spec.yaml +64 -0
  229. package/skills/ce-optimize/references/example-judge-spec.yaml +83 -0
  230. package/skills/ce-optimize/references/example-text-target-spec.yaml +80 -0
  231. package/skills/ce-optimize/references/experiment-log-schema.yaml +563 -0
  232. package/skills/ce-optimize/references/experiment-prompt-template.md +143 -0
  233. package/skills/ce-optimize/references/judge-prompt-template.md +117 -0
  234. package/skills/ce-optimize/references/loop.md +286 -0
  235. package/skills/ce-optimize/references/measurement.md +168 -0
  236. package/skills/ce-optimize/references/optimize-spec-schema.yaml +570 -0
  237. package/skills/ce-optimize/references/persistence.md +93 -0
  238. package/skills/ce-optimize/references/spec.md +107 -0
  239. package/skills/ce-optimize/references/text-targets.md +51 -0
  240. package/skills/ce-optimize/references/usage-guide.md +147 -0
  241. package/skills/ce-optimize/references/wrap-up.md +54 -0
  242. package/skills/ce-optimize/scripts/decide.mjs +676 -0
  243. package/skills/ce-optimize/scripts/experiment-worktree.sh +330 -0
  244. package/skills/ce-optimize/scripts/measure.sh +140 -0
  245. package/skills/ce-optimize/scripts/parallel-probe.sh +134 -0
  246. package/skills/ce-plan/SKILL.md +60 -0
  247. package/skills/ce-plan/references/agents/agent-native-planning-strategist.md +66 -0
  248. package/skills/ce-plan/references/agents/architecture-strategist.md +46 -0
  249. package/skills/ce-plan/references/agents/best-practices-researcher.md +118 -0
  250. package/skills/ce-plan/references/agents/data-integrity-guardian.md +68 -0
  251. package/skills/ce-plan/references/agents/framework-docs-researcher.md +97 -0
  252. package/skills/ce-plan/references/agents/git-history-analyzer.md +40 -0
  253. package/skills/ce-plan/references/agents/learnings-researcher.md +268 -0
  254. package/skills/ce-plan/references/agents/pattern-recognition-specialist.md +55 -0
  255. package/skills/ce-plan/references/agents/performance-oracle.md +108 -0
  256. package/skills/ce-plan/references/agents/repo-research-analyst.md +262 -0
  257. package/skills/ce-plan/references/agents/security-sentinel.md +91 -0
  258. package/skills/ce-plan/references/agents/slack-researcher.md +131 -0
  259. package/skills/ce-plan/references/agents/spec-flow-analyzer.md +84 -0
  260. package/skills/ce-plan/references/agents/web-researcher.md +125 -0
  261. package/skills/ce-plan/references/approach-altitude.md +55 -0
  262. package/skills/ce-plan/references/bakeoff.md +9 -0
  263. package/skills/ce-plan/references/deepening-workflow.md +263 -0
  264. package/skills/ce-plan/references/final-review.md +134 -0
  265. package/skills/ce-plan/references/html-rendering.md +638 -0
  266. package/skills/ce-plan/references/intake.md +158 -0
  267. package/skills/ce-plan/references/markdown-rendering.md +242 -0
  268. package/skills/ce-plan/references/output-contracts.md +29 -0
  269. package/skills/ce-plan/references/output-mode.md +45 -0
  270. package/skills/ce-plan/references/plan-handoff.md +116 -0
  271. package/skills/ce-plan/references/plan-sections.md +489 -0
  272. package/skills/ce-plan/references/reasoning-elevation.md +124 -0
  273. package/skills/ce-plan/references/research.md +211 -0
  274. package/skills/ce-plan/references/resume.md +61 -0
  275. package/skills/ce-plan/references/settled-decisions.md +45 -0
  276. package/skills/ce-plan/references/structure.md +207 -0
  277. package/skills/ce-plan/references/synthesis-summary.md +260 -0
  278. package/skills/ce-plan/references/universal-planning.md +170 -0
  279. package/skills/ce-plan/scripts/elevation-dispatch.sh +288 -0
  280. package/skills/ce-plan/scripts/packs-resolve.py +737 -0
  281. package/skills/ce-plan/scripts/peer-job-runner.py +2594 -0
  282. package/skills/ce-polish/SKILL.md +22 -0
  283. package/skills/ce-polish/agents/openai.yaml +2 -0
  284. package/skills/ce-polish/references/dev-server-astro.md +58 -0
  285. package/skills/ce-polish/references/dev-server-detection.md +40 -0
  286. package/skills/ce-polish/references/dev-server-next.md +61 -0
  287. package/skills/ce-polish/references/dev-server-nuxt.md +58 -0
  288. package/skills/ce-polish/references/dev-server-procfile.md +59 -0
  289. package/skills/ce-polish/references/dev-server-rails.md +50 -0
  290. package/skills/ce-polish/references/dev-server-remix.md +58 -0
  291. package/skills/ce-polish/references/dev-server-sveltekit.md +58 -0
  292. package/skills/ce-polish/references/dev-server-vite.md +48 -0
  293. package/skills/ce-polish/references/install-riffrec.md +35 -0
  294. package/skills/ce-polish/references/launch-json-schema.md +177 -0
  295. package/skills/ce-polish/references/live-loop.md +98 -0
  296. package/skills/ce-polish/references/live-remote.md +35 -0
  297. package/skills/ce-polish/references/live-start.md +93 -0
  298. package/skills/ce-polish/references/live-stream-contract.md +253 -0
  299. package/skills/ce-polish/references/run.md +67 -0
  300. package/skills/ce-polish/scripts/detect-project-type.sh +277 -0
  301. package/skills/ce-polish/scripts/detect-riffrec.sh +225 -0
  302. package/skills/ce-polish/scripts/live-endpoint.js +2841 -0
  303. package/skills/ce-polish/scripts/read-launch-json.sh +117 -0
  304. package/skills/ce-polish/scripts/resolve-package-manager.sh +95 -0
  305. package/skills/ce-polish/scripts/resolve-port.sh +307 -0
  306. package/skills/ce-pov/SKILL.md +64 -0
  307. package/skills/ce-pov/references/agents/external-evidence-researcher.md +26 -0
  308. package/skills/ce-pov/references/agents/pov-peer.md +43 -0
  309. package/skills/ce-pov/references/agents/precedent-activity-scout.md +21 -0
  310. package/skills/ce-pov/references/agents/project-grounding-scout.md +32 -0
  311. package/skills/ce-pov/references/boundaries.md +36 -0
  312. package/skills/ce-pov/references/cross-model-panel.md +596 -0
  313. package/skills/ce-pov/references/followup.md +9 -0
  314. package/skills/ce-pov/references/grounding.md +47 -0
  315. package/skills/ce-pov/references/intake.md +61 -0
  316. package/skills/ce-pov/references/invocation.md +47 -0
  317. package/skills/ce-pov/references/method.md +68 -0
  318. package/skills/ce-pov/references/pov-schema.json +56 -0
  319. package/skills/ce-pov/references/report.md +7 -0
  320. package/skills/ce-pov/scripts/cross-model-pov.sh +1110 -0
  321. package/skills/ce-pov/scripts/peer-job-runner.py +2594 -0
  322. package/skills/ce-product-pulse/SKILL.md +81 -0
  323. package/skills/ce-product-pulse/agents/openai.yaml +2 -0
  324. package/skills/ce-product-pulse/references/config.md +20 -0
  325. package/skills/ce-product-pulse/references/interview.md +260 -0
  326. package/skills/ce-product-pulse/references/report-template.md +89 -0
  327. package/skills/ce-product-pulse/references/run.md +46 -0
  328. package/skills/ce-product-pulse/references/setup.md +43 -0
  329. package/skills/ce-promote/SKILL.md +90 -0
  330. package/skills/ce-promote/agents/openai.yaml +2 -0
  331. package/skills/ce-promote/references/spiral-cli.md +149 -0
  332. package/skills/ce-proof/SKILL.md +65 -0
  333. package/skills/ce-proof/references/api.md +176 -0
  334. package/skills/ce-proof/references/workflows.md +124 -0
  335. package/skills/ce-prototype/SKILL.md +59 -0
  336. package/skills/ce-prototype/assets/annotate.css +206 -0
  337. package/skills/ce-prototype/assets/annotate.js +837 -0
  338. package/skills/ce-prototype/references/annotation-loop.md +32 -0
  339. package/skills/ce-prototype/references/build.md +39 -0
  340. package/skills/ce-prototype/references/craft-floor.md +43 -0
  341. package/skills/ce-prototype/references/preview.md +118 -0
  342. package/skills/ce-prototype/references/scoping.md +38 -0
  343. package/skills/ce-prototype/references/write-back.md +37 -0
  344. package/skills/ce-prototype/scripts/light-webserver.js +1275 -0
  345. package/skills/ce-resolve-pr-feedback/SKILL.md +60 -0
  346. package/skills/ce-resolve-pr-feedback/references/agents/pr-comment-resolver.md +59 -0
  347. package/skills/ce-resolve-pr-feedback/references/evaluation-rubric.md +141 -0
  348. package/skills/ce-resolve-pr-feedback/references/full-mode.md +336 -0
  349. package/skills/ce-resolve-pr-feedback/references/pipeline-mode.md +23 -0
  350. package/skills/ce-resolve-pr-feedback/references/resume.md +60 -0
  351. package/skills/ce-resolve-pr-feedback/references/return-to-caller.md +111 -0
  352. package/skills/ce-resolve-pr-feedback/references/targeted-mode.md +48 -0
  353. package/skills/ce-resolve-pr-feedback/scripts/get-pr-comments +176 -0
  354. package/skills/ce-resolve-pr-feedback/scripts/get-thread-for-comment +84 -0
  355. package/skills/ce-resolve-pr-feedback/scripts/pending-feedback.py +287 -0
  356. package/skills/ce-resolve-pr-feedback/scripts/reply-to-pr-thread +57 -0
  357. package/skills/ce-resolve-pr-feedback/scripts/resolve-pr-thread +23 -0
  358. package/skills/ce-retune/SKILL.md +42 -0
  359. package/skills/ce-retune/agents/openai.yaml +2 -0
  360. package/skills/ce-retune/references/baseline-mining.md +122 -0
  361. package/skills/ce-retune/references/corpus-audit.md +128 -0
  362. package/skills/ce-retune/references/cut-passes.md +129 -0
  363. package/skills/ce-retune/references/halt-taxonomy.md +123 -0
  364. package/skills/ce-retune/references/noise-floor.md +131 -0
  365. package/skills/ce-retune/references/workflow-shapes.md +73 -0
  366. package/skills/ce-riffrec-feedback-analysis/SKILL.md +33 -0
  367. package/skills/ce-riffrec-feedback-analysis/references/analyzer.md +18 -0
  368. package/skills/ce-riffrec-feedback-analysis/references/compound-engineering-feedback-format.md +116 -0
  369. package/skills/ce-riffrec-feedback-analysis/references/extensive-analysis.md +98 -0
  370. package/skills/ce-riffrec-feedback-analysis/references/install-riffrec.md +27 -0
  371. package/skills/ce-riffrec-feedback-analysis/references/quick-bug-report.md +38 -0
  372. package/skills/ce-riffrec-feedback-analysis/scripts/analyze_riffrec_zip.py +1306 -0
  373. package/skills/ce-setup/SKILL.md +103 -0
  374. package/skills/ce-setup/agents/openai.yaml +2 -0
  375. package/skills/ce-setup/assets/compounding-directive.md +11 -0
  376. package/skills/ce-setup/assets/noslop-directive.md +7 -0
  377. package/skills/ce-setup/assets/pack-rule-template.md +11 -0
  378. package/skills/ce-setup/references/acpx-cache-warm.md +14 -0
  379. package/skills/ce-setup/references/config-template.yaml +210 -0
  380. package/skills/ce-setup/references/legacy-codex-tool-map.md +15 -0
  381. package/skills/ce-setup/references/pack-scaffold.md +45 -0
  382. package/skills/ce-setup/references/repo-fixes.md +121 -0
  383. package/skills/ce-setup/scripts/check-health +929 -0
  384. package/skills/ce-setup/scripts/packs-resolve.py +737 -0
  385. package/skills/ce-simplify-code/SKILL.md +76 -0
  386. package/skills/ce-simplify-code/references/personas/code-quality-reviewer.md +17 -0
  387. package/skills/ce-simplify-code/references/personas/code-reuse-reviewer.md +7 -0
  388. package/skills/ce-simplify-code/references/personas/comment-reviewer.md +24 -0
  389. package/skills/ce-simplify-code/references/personas/efficiency-reviewer.md +11 -0
  390. package/skills/ce-simplify-code/references/personas/test-value-reviewer.md +23 -0
  391. package/skills/ce-simplify-code/references/reviewer-dispatch.md +11 -0
  392. package/skills/ce-simplify-code/references/standalone-report.md +25 -0
  393. package/skills/ce-strategy/SKILL.md +61 -0
  394. package/skills/ce-strategy/references/grounding.md +22 -0
  395. package/skills/ce-strategy/references/interview.md +179 -0
  396. package/skills/ce-strategy/references/strategy-template.md +94 -0
  397. package/skills/ce-strategy/references/update-run.md +33 -0
  398. package/skills/ce-sweep/SKILL.md +93 -0
  399. package/skills/ce-sweep/agents/openai.yaml +2 -0
  400. package/skills/ce-sweep/references/agents/media-analyzer.md +54 -0
  401. package/skills/ce-sweep/references/interview.md +208 -0
  402. package/skills/ce-sweep/references/model-tiers.md +13 -0
  403. package/skills/ce-sweep/references/plan-template.md +62 -0
  404. package/skills/ce-sweep/references/run.md +126 -0
  405. package/skills/ce-sweep/references/sources/email.md +57 -0
  406. package/skills/ce-sweep/references/sources/github-issues.md +59 -0
  407. package/skills/ce-sweep/references/sources/slack.md +61 -0
  408. package/skills/ce-sweep/references/state-schema.md +157 -0
  409. package/skills/ce-sweep/references/subagent-template.md +60 -0
  410. package/skills/ce-sweep/scripts/analyze_riffrec_zip.py +1306 -0
  411. package/skills/ce-sweep/scripts/sweep-state.py +793 -0
  412. package/skills/ce-test-browser/SKILL.md +50 -0
  413. package/skills/ce-test-browser/references/agent-browser-driver.md +47 -0
  414. package/skills/ce-test-browser/references/pipeline-orchestration.md +45 -0
  415. package/skills/ce-test-browser/references/route-and-report.md +129 -0
  416. package/skills/ce-test-browser/scripts/resolve-port.sh +41 -0
  417. package/skills/ce-test-xcode/SKILL.md +26 -0
  418. package/skills/ce-test-xcode/agents/openai.yaml +2 -0
  419. package/skills/ce-test-xcode/references/setup-and-build.md +32 -0
  420. package/skills/ce-test-xcode/references/test-and-report.md +64 -0
  421. package/skills/ce-work/SKILL.md +62 -0
  422. package/skills/ce-work/references/agents/figma-design-sync.md +27 -0
  423. package/skills/ce-work/references/agents/implementation-worker.md +17 -0
  424. package/skills/ce-work/references/cross-model-execution.md +191 -0
  425. package/skills/ce-work/references/execution-engines.md +64 -0
  426. package/skills/ce-work/references/execution-strategy.md +73 -0
  427. package/skills/ce-work/references/implementation-loop.md +107 -0
  428. package/skills/ce-work/references/implementation-result-schema.json +52 -0
  429. package/skills/ce-work/references/input-triage.md +50 -0
  430. package/skills/ce-work/references/non-code-execution.md +23 -0
  431. package/skills/ce-work/references/return-to-caller.md +33 -0
  432. package/skills/ce-work/references/review-findings-followup.md +82 -0
  433. package/skills/ce-work/references/shipping-workflow.md +89 -0
  434. package/skills/ce-work/references/tracker-defer.md +150 -0
  435. package/skills/ce-work/references/work-intake.md +51 -0
  436. package/skills/ce-work/references/workspace-setup.md +27 -0
  437. package/skills/ce-work/scripts/__pycache__/unit_workspace_jobs.cpython-314.pyc +0 -0
  438. package/skills/ce-work/scripts/__pycache__/unit_workspace_state.cpython-314.pyc +0 -0
  439. package/skills/ce-work/scripts/cross-model-work.sh +1385 -0
  440. package/skills/ce-work/scripts/peer-job-runner.py +2594 -0
  441. package/skills/ce-work/scripts/unit-workspace.py +215 -0
  442. package/skills/ce-work/scripts/unit_workspace_ignored.py +93 -0
  443. package/skills/ce-work/scripts/unit_workspace_integration.py +677 -0
  444. package/skills/ce-work/scripts/unit_workspace_jobs.py +1216 -0
  445. package/skills/ce-work/scripts/unit_workspace_lifecycle.py +981 -0
  446. package/skills/ce-work/scripts/unit_workspace_state.py +1379 -0
  447. package/skills/ce-work/scripts/unit_workspace_transaction.py +612 -0
  448. package/skills/ce-worktree/SKILL.md +54 -0
  449. package/skills/lfg/SKILL.md +59 -0
  450. package/skills/lfg/references/debug-return.md +25 -0
  451. package/skills/lfg/references/intake.md +30 -0
  452. package/skills/lfg/references/next-work-handoff.md +96 -0
  453. package/skills/lfg/references/plan-brief.md +36 -0
  454. package/skills/lfg/references/review-followup.md +78 -0
  455. package/skills/lfg/references/shipping.md +65 -0
  456. package/skills/lfg/references/stage-routing.md +49 -0
  457. package/skills/lfg/references/task-visibility.md +11 -0
  458. package/skills/lfg/references/tracker-defer.md +150 -0
  459. package/skills/lfg/references/work-return.md +27 -0
  460. package/skills/wtf/SKILL.md +33 -0
  461. package/skills/wtf/agents/openai.yaml +2 -0
@@ -0,0 +1,336 @@
1
+ # Full Mode
2
+
3
+ Read this reference when Mode Detection (in SKILL.md) routes to **Full Mode** — no argument given, a PR number was provided, or a whole-PR URL (`.../pull/N` with no comment fragment) was provided. Full mode processes all unresolved threads on the PR. When the argument is a PR URL, parse the host, `OWNER/REPO`, and number from it — the host feeds the `GH_HOST` prefix below, and `OWNER/REPO` targets the correct repo for a fork→upstream PR.
4
+
5
+ The shape: **fetch once, judge centrally, dispatch subagents only for the fixes.** You, the orchestrator, hold every thread from a single fetch, so you judge validity in your own context, where you can read each file once, spot a reviewer who is wrong across several threads, and weigh the author's design intent. Subagents are dispatched only to *implement* fixes you have already approved. Do not delegate the judgment: a subagent per thread pays per-agent overhead, re-reads the same files, and loses the cross-thread view, and you would pay that even for threads that turn out to be skips.
6
+
7
+ ## 1. Fetch Unresolved Threads
8
+
9
+ If no PR number was provided, detect from the current branch:
10
+ ```bash
11
+ gh pr view --json number -q .number
12
+ ```
13
+
14
+ Then fetch all feedback using the GraphQL script at [scripts/get-pr-comments](../scripts/get-pr-comments). Set `SKILL_DIR` to the absolute directory you loaded the ce-resolve-pr-feedback SKILL.md from — the Bash tool's CWD is the user's project, not the skill dir, and shell state does not persist between Bash calls, so set it inline in each block below that runs a bundled script. If the bundled script is missing on disk the call fails plainly; fall back to the `gh` commands shown after this block.
15
+
16
+ **GitHub Enterprise host.** The bundled `gh api graphql` scripts hit `gh`'s default host unless told otherwise, so on a GHE PR they would wrongly target `github.com`. Derive the host: if the caller passed a full PR **URL**, take its host; otherwise read it from `gh repo view --json url -q .url`. Then — because shell state does **not** persist between separate Bash calls — pass the host as a `GH_HOST=<host>` **env prefix inline on every bundled-script call** (`gh api` honors `GH_HOST` as the request host). A single `export` in one block does **not** carry to the reply/resolve/verify blocks that run as later Bash calls, which is why each call below shows the prefix. On `github.com`, drop the `GH_HOST=<host> ` prefix entirely.
17
+
18
+ ```bash
19
+ PR_HOST=$(printf '%s' "<pr-url-if-one-was-passed>" | sed -n 's#^https\?://\([^/]*\)/.*#\1#p');
20
+ [ -z "$PR_HOST" ] && PR_HOST=$(gh repo view --json url -q .url 2>/dev/null | sed -n 's#^https\?://\([^/]*\)/.*#\1#p');
21
+ echo "$PR_HOST" # github.com -> no prefix; any other host -> prefix GH_HOST=<host> on each script call below
22
+ ```
23
+
24
+ ```bash
25
+ SKILL_DIR="<absolute path of the directory containing the ce-resolve-pr-feedback SKILL.md>";
26
+ GH_HOST=<derived-host> bash "$SKILL_DIR/scripts/get-pr-comments" PR_NUMBER OWNER/REPO # omit GH_HOST=<derived-host> on github.com
27
+ ```
28
+
29
+ **Pass the base `OWNER/REPO`** (parsed from the PR URL, when one was given) as the second arg. `get-pr-comments` otherwise falls back to `gh repo view` in the *current checkout* — so for a fork→upstream PR handed in as a URL, omitting it would fetch review feedback from the fork (or fail) instead of the upstream base repo. Every `get-pr-comments` call below (fetch and verify) takes the same `OWNER/REPO`.
30
+
31
+ Returns a JSON object with these keys:
32
+
33
+ | Key | Contents | Has file/line? | Resolvable? |
34
+ |-----|----------|---------------|-------------|
35
+ | `pending_review` | Node ID of your own unsubmitted (PENDING) review on this PR, or `null` | n/a | n/a |
36
+ | `review_threads` | Unresolved inline code review threads (includes outdated); each wrapper carries `root_comment_id` for REST replies and each node carries its GraphQL thread ID for resolution | Yes | Yes (GraphQL) |
37
+ | `pr_comments` | Top-level PR conversation comments | No | No |
38
+ | `review_bodies` | Review submission bodies with non-empty text | No | No |
39
+ | `pr_author` / `viewer` | The PR author's login and the acting account's login, for judging identity in step 2 | n/a | n/a |
40
+
41
+ **All three kinds of feedback are in scope.** `review_threads`, `pr_comments`, and `review_bodies` are judged the same way in step 3; only the reply and resolve mechanics differ (step 7). The fetch excludes nothing based on who wrote it — a top-level comment from the PR author is the ordinary way a human asks for a change on an agent-opened PR, so it is feedback like any other.
42
+
43
+ **Stop here if `pending_review` is non-null.** Thread replies posted while you hold an unsubmitted review are absorbed into that draft: the reply call returns a comment ID and URL as if it succeeded, but nothing is visible to the reviewer until the draft is submitted. Do not proceed into steps 2-8 — the fixes would land while every reply silently disappeared. Tell the user they have an unsubmitted review on the PR, that it must be submitted or discarded before this skill can reply, and stop. Do not submit or discard it yourself; a draft review is unsent human writing.
44
+
45
+ If the script fails, fall back to:
46
+ ```bash
47
+ gh pr view PR_NUMBER --json reviews,comments
48
+ gh api repos/{owner}/{repo}/pulls/PR_NUMBER/comments
49
+ ```
50
+
51
+ ## 2. Triage: Separate New from Pending
52
+
53
+ Before processing, reconcile the reply and resolution state of each piece of feedback.
54
+
55
+ **Review threads**: An ordinarily handled thread is complete only when it has both a visible, submitted substantive reply and authoritative thread resolution. Reconcile those conditions independently:
56
+
57
+ - A reply that explicitly defers a human choice (e.g., "need to align on this", "going to think through this", or options without a decision) is a **pending decision**. Keep the thread open and do not re-process it.
58
+ - A reply that records a completed fix or reply verdict while the thread is still open is **resolution-pending**. Do not repost the reply or reapply the fix; carry the existing visible reply to step 7 and complete only the missing resolution after pending-review state is empty.
59
+ - A thread without either kind of substantive response is **new**.
60
+
61
+ **PR comments and review bodies**: These have no resolve mechanism, so they reappear on every run. Apply two filters in order:
62
+
63
+ 1. **Actionability**: An item is actionable when it is someone's open request to this PR: something to fix, answer, or decide. This filter is also what keeps the run from looping on its own output. A reply posted by this run or an earlier one is a record of handling, not a request, so it drops here, whether it reports a fix or carries a parked `needs-human` decision. That parked item is already tracked as itself; re-reading its own write-up as fresh feedback is how the loop would never settle. Who posted an item never decides this, including the account that opened the PR. Examples: review wrapper text ("Here are some automated review suggestions..."), approvals ("this looks great!"), status badges ("Validated"), CI summaries with no follow-up asks. If there's nothing to fix, answer, or decide, it's not actionable -- drop it from the count entirely.
64
+ 2. **Already replied**: For actionable items, check the PR conversation for an existing reply that quotes and addresses the feedback. If a reply already exists, skip. If not, it's new.
65
+
66
+ The distinction is about content, not who posted what. A deferral from a teammate, a previous skill run, or a manual reply all count. Similarly, actionability is about content -- bot feedback that requests a specific code change is actionable; a bot's boilerplate header wrapping those requests is not.
67
+
68
+ **Silent drop.** Non-actionable items are dropped without narration. Do not announce, list, or count dropped items in conversation, the task list, or the step 9 summary. Review-bot wrappers from CodeRabbit, Codex, Gemini Code Assist, and Copilot (bodies like "Here are some automated review suggestions...") commonly appear here -- recognize them by their boilerplate content, drop silently. The fetch script filters out only blank bodies. Every author and every kind of feedback — the PR author, CI/status bots such as Codecov, review bots — goes through this content check, so a reused account or a changed format cannot silently hide actionable feedback.
69
+
70
+ If there are no new or resolution-pending items across all feedback types, skip steps 3-8 and go straight to step 9. If only resolution-pending threads remain, skip steps 3-6 and go straight to step 7.
71
+
72
+ ## 3. Consolidate & Decide (the legitimacy gate)
73
+
74
+ This is where validity is decided. Judge every **new** item here, in your own context, before any fix is dispatched. Apply the rubric in [references/evaluation-rubric.md](evaluation-rubric.md) (read it now) across the whole batch at once. When the invocation carries a `trajectory`, apply the non-convergence test in [references/pipeline-mode.md](pipeline-mode.md) before dispatching anything — a demonstrated shared root is answered once, at the root, instead of fixing each instance.
75
+
76
+ Working over the full set lets you do what a per-thread subagent can't:
77
+ - **Dedup reads by file** — read a file once and judge all its threads together.
78
+ - **Cross-item reasoning** — cluster findings by root assumption; a source (often a bot) that's wrong in one place is suspect across its siblings; converging requests from independent reviewers are a strong fix signal.
79
+ - **Selective depth** — clear nits need only the comment plus the diff line; deep-read (callers, invariants, `git blame`/PR rationale for author intent) only where a finding is contestable or the code looks deliberate. That deep read on the contestable minority is what catches a confidently-wrong reviewer.
80
+
81
+ Produce a verdict per item and sort into three lists:
82
+
83
+ - **fix-list** — `fixed` / `fixed-differently`. These get dispatched to fixers in step 4. For each, note the file/location (and for outdated threads, the resolved location or anchor) and a one-line "what to change." **Class fix:** when the cross-item pass (rubric: "A validated finding can span sites this PR itself introduced") found equivalent same-invariant sites this PR touched, record them as **one** fix-list item that enumerates every concrete location (`file:line`) and lists every feedback ID it covers — one class item → one fixer (step 4), so the sites are edited coherently and every covered thread/comment is replied-to and resolved from that single result. Enumerate only sites whose treatment is unambiguous; a site needing its own judgment stays a separate item.
84
+ - **reply-list** — `replied` / `not-addressing` / `declined`. No code change. Compose the reply text now per the rubric (you have the evidence) and carry it to step 7.
85
+ - **human-list** — `needs-human`. Compose `decision_context` now and run the rubric's "Adjudicate before escalating" step on each judgment-bound item; an adjudicated verdict moves the item to the list it names, and the rest carry to steps 7 and 9.
86
+
87
+ Create a task list of all new items (e.g., `TaskCreate` in Claude Code, `update_plan` in Codex, `todo_write` in DeepSeek Harness) tagged with their verdict, so progress is visible.
88
+
89
+ **At scale.** If the batch is large (many threads spanning many files) and judging them all inline would overflow your context, process the consolidation in groups (e.g., file-clustered groups of ~8-10 threads), emitting the three lists incrementally. Don't fan the judgment out to subagents to avoid this — batch it instead.
90
+
91
+ If the fix-list is empty (all verdicts are reply/needs-human), skip steps 4-6 and go to step 7.
92
+
93
+ ## 4. Fix (fix-list only)
94
+
95
+ Dispatch fixers **only** for fix-list items. Reply-list and human-list items never reach a subagent.
96
+
97
+ ### Where each fix runs
98
+
99
+ Step 3 already read the code behind every fix-list item. Dispatch fixers when the items form a real parallel batch (two or more items on disjoint files), or for an item whose fix reaches well beyond what you read (a rename across callers, a class fix over many sites). Apply every other item in this context, with the fixer prompt below as your own instructions.
100
+
101
+ Every fix-list item ends with one **per-item result** in the return format below, whether a fixer produced it or you did. The **change set** for this run is the union of those results' `files_changed`. Steps 5-7 read only per-item results and the change set, never which path produced them.
102
+
103
+ ### Dispatch
104
+
105
+ Read [references/agents/pr-comment-resolver.md](agents/pr-comment-resolver.md) and spawn a generic subagent seeded with that fixer prompt for each fix-list item you are delegating. Do not dispatch a standalone agent by type/name. The fixer only implements: the validity judgment is already done, so it implements and returns; it does not re-judge whether the fix is worthwhile.
106
+
107
+ Each fixer receives:
108
+ - The feedback_id (thread ID or comment ID) and feedback type.
109
+ - The file path and location fields: `line`, `originalLine`, `startLine`, `originalStartLine` (for outdated threads, the resolved location/anchor from step 3).
110
+ - The reviewer's comment text.
111
+ - Your step-3 note: what to change and why it was judged valid.
112
+ - The PR number.
113
+
114
+ For `pr_comment` / `review_body` fix-list items (no file/line), the fixer identifies the relevant files from the comment text and the PR diff.
115
+
116
+ **No subagent capability — apply the fixes yourself, sequentially.** When the harness exposes no way to dispatch (or a dispatch fails), work the fix-list in this context one item at a time, using the fixer prompt as your own instructions and producing the same per-item result. This is a supported path, not a shortfall to report as lost coverage: the decision about whether each item is valid already happened in step 3, and fixers only *implement* changes you approved, so running them here costs parallelism and context headroom — never correctness. Keep the dispatch path's discipline: one item at a time, re-read each file before editing it, and stop to re-evaluate if implementing reveals a contradiction (the `blocked` handling applies unchanged). Items you apply in this context by choice follow the same discipline.
117
+
118
+ This skill therefore does not depend on agent-tool authorization to complete a review. That is deliberate: it runs unattended under `ce-babysit-pr`, where a permission prompt would stall the whole loop, so it needs few tools and can still fix without dispatch.
119
+
120
+ ### Per-item result format (fixer or inline)
121
+
122
+ - **verdict**: `fixed`, `fixed-differently`, or `blocked`
123
+ - **feedback_id**, **feedback_type**
124
+ - **reply_text**: markdown reply to post (quoting the relevant feedback) — omit for `blocked`
125
+ - **files_changed**: list of files modified (empty for `blocked`)
126
+ - **reason**: what was done, or the concrete contradiction for `blocked`
127
+
128
+ **Handling `blocked`.** A fixer returns `blocked` only when implementing revealed a concrete contradiction that the fixer could see and you could not (the change breaks a caller/test it can see, or the code isn't what the finding described). Re-evaluate it yourself with that evidence: either re-dispatch with a corrected instruction, or move it to the reply-list (`not-addressing`/`declined`) or human-list. Don't silently drop it.
129
+
130
+ ### Batching and conflict avoidance
131
+
132
+ **Batching**: If 1-4 items are delegated, dispatch them all in parallel. For 5+, batch in groups of 4.
133
+
134
+ **Conflict avoidance**: No two fixers that touch the same file run in parallel. You already know the target files from step 3 — serialize fixers that share a file (dispatch one, wait, then the next); non-overlapping items run in parallel. For a **class item**, feed the fixer its full enumerated location set and every covered feedback ID (not a single thread), and account for **all** of its sites in this check — a class fix touching files another fixer also touches must be serialized against every one of them. When one fixer handles multiple threads on the same file, it addresses them sequentially.
135
+
136
+ **Sequential fallback**: Platforms that do not support parallel dispatch run fixers sequentially.
137
+
138
+ Fixes can occasionally expand beyond their referenced file (e.g., renaming a method updates callers elsewhere). This is rare but can cause parallel fixers to collide. Step 5 (combined validation) catches test breakage; step 8 (verify) catches unresolved threads. If either reveals inconsistent changes, re-run the affected fixers sequentially.
139
+
140
+ ## 5. Validate Combined State
141
+
142
+ If the change set is empty, skip steps 5 and 6 and proceed to step 7.
143
+
144
+ Each fix runs only targeted tests on its own change. This step runs the project's full validation **once** against the combined diff to catch interactions between fixes that targeted runs can't see.
145
+
146
+ 1. **Run the project's validation command** (test suite, type check, or whatever the project's active conventions specify). Run once, not per-agent.
147
+
148
+ 2. **Green** -> proceed to step 6.
149
+
150
+ 3. **Red, failures touch files in the change set** -> one inline diagnose-and-fix pass. Re-run validation. If still red, escalate with a `needs-human` item containing the test output; do **not** commit.
151
+
152
+ 4. **Red, failures touch only files outside the change set** -> treat as pre-existing. Proceed to step 6, but add a footer to the commit message: `Note: pre-existing failure in <test> not addressed by this PR.`
153
+
154
+ Record the validation outcome (command run, pass/fail counts, any pre-existing failures noted) for the step 9 summary.
155
+
156
+ ## 6. Commit and Publication
157
+
158
+ Commit only the change set, preserving unrelated work in the tree and index, with a message referencing the PR:
159
+
160
+ ```bash
161
+ git add [files in the change set]
162
+ git commit -m "Address PR review feedback (#PR_NUMBER)
163
+
164
+ - [list changes from per-item results]" -- [files in the change set]
165
+ ```
166
+
167
+ In `mode:return-to-caller`, capture the combined fix commit SHA and follow [references/return-to-caller.md](return-to-caller.md) to save every judged action and intended checklist tick. Return after saving; do not push or enter steps 7-8 for any part of this batch. A failed commit or save reports the actual local state and incomplete handoff, never completion.
168
+
169
+ Ordinary and pipeline execution publish the commit before the remote tail:
170
+ ```bash
171
+ git push
172
+ ```
173
+
174
+ ## 7. Reply and Resolve
175
+
176
+ Enter the remote tail only when the batch's fix commit is published, or the batch created no code changes. Return-to-caller batches with a fix stop at step 6; their saved reply-only and human-list items remain deferred too. No-change return-to-caller batches use this existing protocol and save observed progress even when a write fails. Resume enters here only through the publication and reconciliation conditions in [references/resume.md](resume.md), uses the saved verdicts and exact reply bodies, and returns there after completing or stopping the remote tail. Apply eligible PR checklist ticks under the entrypoint's publication condition.
177
+
178
+ The done condition for an ordinary review thread is one visible, submitted substantive reply plus authoritative resolution; satisfy each condition independently and never repeat a satisfied half. Post for every newly handled item: fix-list items use the `reply_text` from their per-item result; reply-list and human-list items use the reply text you composed in step 3. A **class item** carries multiple covered feedback IDs (`feedback_ids`/`feedback_types` from its fixer) — reply to and resolve *every* one, posting the shared `reply_text` on each thread, not just the first; a covered thread left unresolved shows up as new work again in the next `ce-babysit-pr` loop. The mechanism depends on the feedback type.
179
+
180
+ ### Reply format
181
+
182
+ All replies quote the relevant part of the original feedback for continuity — the specific sentence or passage, not the entire comment if it's long. The per-verdict templates are in [references/evaluation-rubric.md](evaluation-rubric.md) (skip verdicts) and [references/agents/pr-comment-resolver.md](agents/pr-comment-resolver.md) (`fixed` / `fixed-differently`).
183
+
184
+ For `needs-human` verdicts, post the natural-sounding reply but do NOT resolve the thread. Leave it open for human input.
185
+
186
+ ### Review threads
187
+
188
+ For every calling mode, select the first unsatisfied completion condition before acting. A thread with no visible submitted substantive reply runs steps 0-4. A `resolution-pending` thread skips only step 1, uses its existing reply IDs for step 2, and runs steps 2-4; do not judge, fix, or post again. A `needs-human` thread stops after its visible submitted reply and remains unresolved.
189
+
190
+ Current GitHub state decides independently of local progress. A POST may succeed before the helper's pending-review check fails or before a checkpoint is written. Reconcile the existing reply and its submitted visibility before retrying; adopt a verified reply instead of reposting it, and verify authoritative resolution separately.
191
+
192
+ 0. **Verify the thread ID** before replying. GitHub Enterprise can return inconsistent node IDs for the same thread depending on the query path. Always confirm the ID from `get-pr-comments` resolves to the correct thread using [scripts/get-thread-for-comment](../scripts/get-thread-for-comment) with the comment's numeric URL ID. Extract the numeric comment ID from the comment URL (e.g. `discussion_r2589700` → `2589700`) for the `gh api` call; if the bundled script is missing, use `gh api` to inspect the review thread instead:
193
+ ```bash
194
+ SKILL_DIR="<absolute path of the directory containing the ce-resolve-pr-feedback SKILL.md>";
195
+ GH_HOST=<derived-host> GH_REPO=OWNER/REPO gh api repos/{owner}/{repo}/pulls/comments/COMMENT_ID --jq .node_id
196
+ GH_HOST=<derived-host> bash "$SKILL_DIR/scripts/get-thread-for-comment" PR_NUMBER COMMENT_NODE_ID OWNER/REPO
197
+ ```
198
+ The returned `id` is the authoritative thread ID for resolution, and `root_comment_id` is the numeric ID of the thread's first comment for the REST reply. If the thread ID differs from what `get-pr-comments` returned, use the one from this script.
199
+
200
+ 1. **Reply directly to the root comment over REST** using [scripts/reply-to-pr-thread](../scripts/reply-to-pr-thread). If the bundled script is missing, use the same `POST repos/{owner}/{repo}/pulls/PR_NUMBER/comments/ROOT_COMMENT_ID/replies` endpoint. Do not substitute `addPullRequestReviewThreadReply`, `gh pr review`, or a `/reviews` POST: those operations go through review-submission state, so the reply can sit unsubmitted, while a successful reply must be immediately submitted and visible.
201
+ Feed the body from a private OS scratch file. For a fresh reply, the quoted heredoc below writes multiline Markdown without shell expansion; never use `echo "..."` or `printf` to interpret escape sequences. For a saved reply, write its exact decoded `reply_body` bytes to that file with a tool instead of running the illustrative heredoc, which would add a terminal newline. Preserve all existing line breaks, including terminal ones:
202
+ ```bash
203
+ SKILL_DIR="<absolute path of the directory containing the ce-resolve-pr-feedback SKILL.md>";
204
+ REPLY_BODY_FILE="<absolute private OS scratch reply file>";
205
+ cat > "$REPLY_BODY_FILE" <<'EOF'
206
+ > the specific sentence being addressed from the reviewer's comment
207
+
208
+ Fixed in abc1234 — the lookup now null-checks before dereferencing.
209
+ EOF
210
+ GH_HOST=<derived-host> bash "$SKILL_DIR/scripts/reply-to-pr-thread" PR_NUMBER ROOT_COMMENT_ID OWNER/REPO < "$REPLY_BODY_FILE"
211
+ ```
212
+ The helper exits nonzero if a pending review is visible after the POST. Stop without resolving on that error; do not submit or discard the review. Check that the returned comment URL contains the correct `OWNER/REPO` and PR number before proceeding.
213
+
214
+ 2. **Verify the REST-created reply is visible and submitted** before resolving. Take its numeric ID from the returned URL fragment (`#discussion_r2589700` → `2589700`) and read back what GitHub stored:
215
+ ```bash
216
+ GH_HOST=<derived-host> GH_REPO=OWNER/REPO gh api repos/{owner}/{repo}/pulls/comments/REPLY_COMMENT_ID --jq .body
217
+ GH_HOST=<derived-host> GH_REPO=OWNER/REPO gh api repos/{owner}/{repo}/pulls/comments/REPLY_COMMENT_ID --jq '.pull_request_review_id // empty'
218
+ ```
219
+ The first command prints the decoded body, which must show real line breaks. If instead it shows `\n` (or `\n\n`) as literal backslash-n characters inside one line, the body was posted escaped: **do not resolve the thread**. Fix it first by rewriting the body through a heredoc, then re-verify:
220
+ ```bash
221
+ GH_HOST=<derived-host> GH_REPO=OWNER/REPO gh api --method PATCH repos/{owner}/{repo}/pulls/comments/REPLY_COMMENT_ID -f body="$(cat <<'EOF'
222
+ > the specific sentence being addressed from the reviewer's comment
223
+
224
+ Fixed in abc1234 — the lookup now null-checks before dereferencing.
225
+ EOF
226
+ )"
227
+ ```
228
+ If the second command prints a review ID, fetch that review and require a state other than `PENDING`; a pending state means the reply is not submitted, regardless of the successful POST response:
229
+ ```bash
230
+ GH_HOST=<derived-host> GH_REPO=OWNER/REPO gh api repos/{owner}/{repo}/pulls/PR_NUMBER/reviews/REVIEW_ID --jq .state
231
+ ```
232
+
233
+ 3. **Re-fetch pending-review state after posting.** This closes the race after the initial fetch and detects a draft created during the reply loop:
234
+ ```bash
235
+ SKILL_DIR="<absolute path of the directory containing the ce-resolve-pr-feedback SKILL.md>";
236
+ GH_HOST=<derived-host> bash "$SKILL_DIR/scripts/get-pr-comments" PR_NUMBER OWNER/REPO | jq -r '.pending_review // empty'
237
+ ```
238
+ If this prints an ID, stop without resolving any thread from this reply pass. Report the pending review, but do not submit or discard it.
239
+
240
+ 4. **Resolve** using [scripts/resolve-pr-thread](../scripts/resolve-pr-thread) (if the bundled script is missing, resolve the thread with `gh api` if supported):
241
+ ```bash
242
+ SKILL_DIR="<absolute path of the directory containing the ce-resolve-pr-feedback SKILL.md>";
243
+ GH_HOST=<derived-host> bash "$SKILL_DIR/scripts/resolve-pr-thread" THREAD_ID
244
+ ```
245
+
246
+ ### PR comments and review bodies
247
+
248
+ These cannot be resolved via GitHub's API. Reply with a top-level PR comment referencing the original (pass `-R OWNER/REPO` — the parsed base repo — so a fork→upstream reply posts on the watched upstream PR, not the fork namespace):
249
+
250
+ ```bash
251
+ REPLY_BODY_FILE="<absolute private OS scratch reply file>";
252
+ cat > "$REPLY_BODY_FILE" <<'EOF'
253
+ > the specific sentence being addressed from the reviewer's comment
254
+
255
+ Fixed in abc1234 — the lookup now null-checks before dereferencing.
256
+ EOF
257
+ GH_HOST=<derived-host> gh pr comment PR_NUMBER -R OWNER/REPO --body-file "$REPLY_BODY_FILE"
258
+ ```
259
+
260
+ For a saved reply, populate the file with its exact decoded bytes instead of running the illustrative heredoc. `--body-file` preserves terminal newlines that command substitution would strip. Confirm the posted body matches the intended Markdown, including actual line breaks.
261
+
262
+ Include enough quoted context in the reply so the reader can follow which comment is being addressed without scrolling.
263
+
264
+ ## 8. Verify
265
+
266
+ Re-fetch feedback to confirm resolution:
267
+
268
+ ```bash
269
+ SKILL_DIR="<absolute path of the directory containing the ce-resolve-pr-feedback SKILL.md>";
270
+ GH_HOST=<derived-host> bash "$SKILL_DIR/scripts/get-pr-comments" PR_NUMBER OWNER/REPO
271
+ ```
272
+
273
+ The `review_threads` array should be empty (except `needs-human` items).
274
+
275
+ In resume, verify only the saved actions and report new feedback through its caller result; return to [references/resume.md](resume.md) without entering another fix cycle.
276
+
277
+ **For fresh-feedback modes, if new threads remain**, check the iteration count -- counting rounds **for this PR**, not just this invocation. An orchestrator such as `ce-babysit-pr` re-invokes this skill fresh each round, so a per-invocation counter never trips; count instead the earlier review-fix commits already on the branch (`git log <base>..HEAD` subjects that address review feedback) plus this run's own cycles.
278
+
279
+ - **First or second fix-verify cycle**: Repeat from step 2 for the remaining threads.
280
+
281
+ - **After the second fix-verify cycle** (3rd pass would begin): Stop looping. Show the remaining issues to the user with context about the recurring pattern: "Multiple rounds of feedback on [area/theme] suggest a deeper issue. Here's what we've fixed so far and what keeps appearing." Use the same `needs-human` escalation pattern -- leave threads open and present the pattern for the user to decide.
282
+
283
+ PR comments and review bodies have no resolve mechanism, so they will still appear in the output. Verify they were replied to by checking the PR conversation.
284
+
285
+ ## 9. Summary
286
+
287
+ In `mode:return-to-caller`, emit the structured result in [references/return-to-caller.md](return-to-caller.md) instead of the interactive summary below. Save actual no-change completion and any incomplete remote tail before returning; human decisions stay open and retain their typed payloads.
288
+
289
+ Present a concise summary of all work done. Group by verdict, one line per item describing *what was done* not just *where*. This is the primary output the user sees, and the place where your step 3 (Consolidate & Decide) judgments become visible: the user can see exactly what was fixed, what was skipped, and why.
290
+
291
+ Format:
292
+
293
+ ```
294
+ Resolved N of M new items on PR #NUMBER:
295
+
296
+ Fixed (count): [brief description of each fix]
297
+ Fixed differently (count): [what was changed and why the approach differed]
298
+ Replied (count): [what questions were answered]
299
+ Not addressing (count): [what was skipped and the evidence]
300
+ Declined (count): [what was declined and the harm cited]
301
+
302
+ Validation: [one line -- e.g., "bun test passed (893/893)" or "bun test passed with pre-existing failure in X noted"; omit when no code changes were committed]
303
+ ```
304
+
305
+ If any item is `needs-human`, append a decisions section. These are rare but high-signal. Each carries the `needs-human` object composed in step 3: quoted feedback, investigation, the reason autonomous action is unsafe or ambiguous, concrete options with tradeoffs, a recommendation if any, and links to every still-open thread it covers.
306
+
307
+ Present the `decision_context` directly -- it's already structured for the user to decide quickly:
308
+
309
+ ```
310
+ ## Needs your decision
311
+
312
+ 1. [decision_context.quoted_feedback]
313
+ - Investigated: [decision_context.investigation]
314
+ - Decision needed: [decision_context.decision_reason]
315
+ - Options: [decision_context.options, preserving each option and tradeoff]
316
+ - Recommendation: [decision_context.recommendation, when non-null]
317
+ - Open threads: [thread_urls]
318
+ ```
319
+
320
+ The `needs-human` threads already have a natural-sounding acknowledgment reply posted and remain open on the PR.
321
+
322
+ If there are **pending decisions from a previous run** (threads detected in step 2 (Triage) as already responded to but still unresolved), list them after the new work:
323
+
324
+ ```
325
+ Still pending from a previous run (count):
326
+
327
+ 1. [Thread path:line] -- [brief description of what's pending]
328
+ Previous reply: [link to the existing reply]
329
+ [Re-present the decision options if available, or summarize what was asked]
330
+ ```
331
+
332
+ If a blocking question tool is available, use it to ask about all pending decisions (both new `needs-human` and previous-run pending) together. If there are only pending decisions and no new work was done, the summary is just the pending items.
333
+
334
+ Use the host's blocking question tool already in the current tool list (match by capability, not by a host-specific name). Presence in the current tool list is proof the tool exists; never call a user-facing question tool to discover whether it exists. If a matching tool is listed but unloaded, use the host's tool-discovery mechanism to load that capability — do not search for another host's tool name. Use it to present the decisions and wait for the user's response. After they decide, process the remaining items: fix the code, compose the reply, post it, and resolve the thread.
335
+
336
+ Fall back to presenting the decisions in user-visible summary output and waiting in conversation only when no blocking tool exists in the harness or the call errors (e.g., Codex edit modes) — not because a schema load is required. Never silently skip. If the user doesn't respond, the items remain open on the PR for later handling.
@@ -0,0 +1,23 @@
1
+ # Pipeline mode
2
+
3
+ Read this when the invocation carries `mode:pipeline` — set by an orchestrator like `ce-babysit-pr` or `lfg`. Behave exactly as in ordinary full or targeted mode, with three differences.
4
+
5
+ ## 1. Never call the blocking-question tool
6
+
7
+ For any reason. The run is unattended. A blocking question would stall the calling orchestrator's loop; no user is there to answer it.
8
+
9
+ ## 2. Preserve the typed decision residual
10
+
11
+ Nobody reads an interactive summary in an unattended run, so the PR thread is where the record lives. For each `needs-human` item, post its `decision_context` **on its thread as the reply**, condensed: what the item is, why it needs a human call, the options, and your lean. Then leave every thread the item covers open. The open thread with that reply is the durable record, in the place a human will look. Never resolve a `needs-human` thread. Never write a PR-body section of your own that lists open decisions. Ticking an `## Unapplied review findings` bullet that a fix closed is a different thing and stays allowed; SKILL.md defines that rule. Post a reply only to carry that analysis, never merely to note that a thread is open.
12
+
13
+ Return the `needs-human` object exactly as the rubric defines it: `type: "needs-human"`, `sources` listing the stable fetched ID and kind of every thread, comment, or review body the item covers, `decision_context.quoted_feedback`, `decision_context.investigation`, `decision_context.decision_reason`, `decision_context.options`, `decision_context.recommendation`, and `thread_urls`. `thread_urls` must include every still-open thread the item covers. It may be empty only when no covered source is a review thread. Return that object unchanged to the caller. A posted reply is not a completed handoff on its own; the handoff is complete only when the decision payload reaches the top-level coordinator.
14
+
15
+ ## 3. Non-convergence (wrong-approach cluster / treadmill)
16
+
17
+ The caller may pass a `trajectory`: a rising `unresolved_trend`, `new_threads_this_tick > 0` across passes, or any `invariant_rounds[].rounds >= 2`. When it does, group the feedback by the root decision it comes from, and decide what to do about each root before fixing anything on it:
18
+
19
+ - **Escalate** — raise **one** `needs-human` about the root decision itself, at the level of the approach (e.g. "regex is the wrong tool here — options: exhaustive table / a real parser / accept known limits; lean: …"), and do it **before** any fix, commit, or push. A root decision is judgment-bound unless the rubric's authority-bound condition holds, so it goes through the rubric's "Adjudicate before escalating" step first; an adjudicated verdict inside the envelope is applied as that root's next fix, and the escalation is raised only when adjudication cannot decide it. Escalate in either of two cases. First, the root's feedback is *demonstrably* not converging: several nits share one root, "your regex misses case X" repeats for X after X, or a bot re-posts fresh nits after every commit without end. Second, a fix would begin the root's third recorded round: `invariant_rounds[].rounds >= 2` for a key this pass would continue (rounds are recorded after a fix completes).
20
+ - **Execute an answered escalation** — when the open thread already carries a human's decision on the root, that answer authorizes the next action; apply it. Do not raise the same `needs-human` again; the caller's record store rejects a repeat.
21
+ - **Otherwise fix as usual** — a normal batch of unrelated valid nits is just fixed, one pass.
22
+
23
+ On a **fix** outcome, return a stable `invariant_key` (1–120 chars of `A-Za-z0-9._:-`) for **each** root a fix resolved, together with the threads and comments that root covered. Unrelated roots fixed in one pass carry distinct keys, so each root accumulates its own round count. Do not run `pr-snapshot`; the caller records each key on that item's dispatched mark.
@@ -0,0 +1,60 @@
1
+ # Resume a Saved Feedback Batch
2
+
3
+ Complete only the conversation actions preserved in the handoff, then return their verified progress to the caller. The original transcript is not required: the record owns PR identity, publication commit, verdicts, exact responses, checklist intent and human decisions. A checkpoint records observations; fresh GitHub state remains authoritative.
4
+
5
+ ## Validate the original record and prove publication
6
+
7
+ Pass the supplied path directly to the bundled helper. It reads and validates the original JSON bytes; do not reconstruct a received record from chat or normalize it into another file first. Set the skill directory in each shell call because shell state does not persist:
8
+
9
+ ```bash
10
+ SKILL_DIR="<absolute path of the directory containing the ce-resolve-pr-feedback SKILL.md>";
11
+ PY="$(for c in python3 python py; do command -v "$c" >/dev/null 2>&1 && "$c" -c '' >/dev/null 2>&1 && { echo "$c"; break; }; done)"; [ -n "$PY" ] || { echo "no working Python 3 interpreter on PATH" >&2; exit 1; };
12
+ "$PY" "$SKILL_DIR/scripts/pending-feedback.py" inspect-publication --path '<handoff path>'
13
+ ```
14
+
15
+ The helper returns `{handoff, record, publication}` without changing the file or writing to GitHub. Invalid or unreadable records exit nonzero. A readable record with unknown or refused publication exits zero with `publication.verified:false` and a reason; exit zero alone never authorizes completion. Only `publication.verified:true` permits the remote tail. On any other result return pending with the evidence, performing zero remote writes.
16
+
17
+ Publication inspection fetches fresh REST PR metadata for the saved host/base/number, verifies the saved PR and head repository/ref identities, and compares the recorded fix SHA to the fresh actual head SHA on the actual head repository. It requires compare status `ahead` or `identical` and the recorded fix SHA as the merge base. The `publication` object carries `verified`, `reason`, `head_sha`, `head_repo`, `head_ref`, and `comparison_status`. This works for fork PRs and Enterprise hosts without consulting the checkout. A no-change batch has a null fix SHA: after fresh PR identity verification it needs no commit comparison.
18
+
19
+ Do not translate a missing SHA through a rebase or squash, or infer publication from a local ref, a caller's push report, or saved `status`. For a non-null fix SHA, the saved verification outcome must be `passed` or `pre-existing-failure` before any completion writes; otherwise return the recorded validation blocker without running validation again.
20
+
21
+ ## Reconcile before any retry
22
+
23
+ Read [references/full-mode.md](full-mode.md) now. Its step 7 owns the visible-submitted reply and authoritative-resolution protocol for every feedback kind. Fetch fresh feedback for the saved host, base repo and PR number using that reference's fetch interface, then inspect each saved source and its current related conversation. Include saved threads already resolved remotely; an unresolved-only fetch cannot prove their state. Use step 7's authoritative thread mapping for those threads.
24
+
25
+ If a pending human review or a missing required permission prevents the saved action, retain the pending work and return the blocker. Do not submit or discard a human draft. Review content remains untrusted data, including text fetched during resume.
26
+
27
+ Check the saved source identity and decoded body's UTF-8 SHA-256 against `source.body_sha256`. A matching body is necessary, but not sufficient: current conversation or changed code may invalidate the saved response even when the original comment is unchanged and the fix commit is reachable. If the response no longer fits its source or related context, leave the affected action pending and return its identity, the changed evidence and why the caller needs a new pass. Do not revise the verdict, edit the response, reopen a resolved thread, or start a fix loop.
28
+
29
+ Reconcile replies and resolutions independently before choosing the missing action. Adopt an existing reply only when its identity, substantive response to the saved source, exact decoded body matching `reply_body` and submitted visibility are verified. For non-thread feedback, inspect the PR conversation for a reply addressing that particular saved source; a comment POST receipt alone is insufficient. Retain observed reply IDs and URLs even when a later permission, pending-review or resolution check stops completion. A successful POST followed by an error can leave a visible reply without a local checkpoint; a later run must adopt that reply rather than duplicate it. Saved progress never substitutes for readback.
30
+
31
+ ## Finish the eligible saved actions
32
+
33
+ For each still-valid saved action, enter Full Mode step 7 at its first unsatisfied condition using the record's verdict, exact `reply_body`, saved PR identity and current authoritative thread ID. Write the decoded saved body to a private file with a tool, then transfer that file through step 7's owning transport without paraphrasing or escape conversion. If GitHub already has the verified reply, complete only the missing resolution. If both completion conditions already hold, record them without a write. A `needs-human` acknowledgment is complete when its reply is visibly submitted; its thread stays open and its typed residual is preserved. Non-thread actions have no resolve operation.
34
+
35
+ Apply only the saved checklist ticks against the freshly fetched PR body. An already checked saved bullet is complete. Change only the saved unchecked bullet's `[ ]` to `[x]`, preserving the rest of the current body. When the saved bullet cannot be identified unambiguously, retain that tick as pending instead of rewriting the author's checklist.
36
+
37
+ After verified progress, checkpoint a separate updated JSON file with `checkpoint --input '<updated JSON file>' --path '<handoff path>'` through the same helper and directory anchor above. Preserve all prepared content; update only observed progress, status and the existing typed residuals. Checkpoint successful earlier actions before returning on a later failure. If checkpointing fails, report the observed remote successes and use `incomplete-handoff`; do not describe stale progress as safely saved.
38
+
39
+ Re-fetch to verify the saved actions after the remote tail. `completed` means every eligible saved reply, resolution and tick is verified; human threads intentionally left open do not prevent it. Unrelated new feedback is returned for a separate pass, never processed in this run. Related new feedback that invalidates a saved action leaves that action pending even when the saved root body is unchanged.
40
+
41
+ ## Return to the caller
42
+
43
+ Return this structured result as the last output of the skill. It ends the skill, not the calling orchestrator's turn; the caller continues in the same session. Do not ask a blocking question.
44
+
45
+ ```json
46
+ {
47
+ "status": "pending",
48
+ "handoff": "<absolute validated path, or null if unavailable>",
49
+ "fix_commit": "<saved SHA, or null>",
50
+ "changed_files": [],
51
+ "verification": {"command": "<saved command>", "outcome": "passed", "details": "<saved result>"},
52
+ "publication": {"verified": false, "reason": "<observed evidence>", "head_sha": null, "head_repo": null, "head_ref": null, "comparison_status": null},
53
+ "residuals": [],
54
+ "blockers": [],
55
+ "pending_actions": [],
56
+ "new_feedback": []
57
+ }
58
+ ```
59
+
60
+ Use `pending` for a validated batch with incomplete saved actions, `completed` only for fresh verified completion, and `incomplete-handoff` when the original record cannot be validated or latest observed progress cannot be saved. Preserve the saved verification result and typed `needs-human` residuals without inventing a new authority decision. Each `pending_actions` entry is `{type:"pending-action", source:{kind,id,url}, reason, evidence}`; for a pending checklist tick use `{type:"pending-tick", original, reason, evidence}`. Evidence states what was actually inspected, including an unavailable read when that is the blocker, so retry does not mistake uncertainty for a missing reply. `new_feedback` identifies newly observed actionable sources with `{kind,id,url}` for the caller to schedule separately. Include remote write failures and publication uncertainty in `blockers`.
@@ -0,0 +1,111 @@
1
+ # Return to Caller
2
+
3
+ Prepare review feedback under the caller's inherited scope and preserve the judged batch for completion after the caller publishes. The resolver owns judgment, fixes, local validation, a fix-owned commit, and the saved actions. It never pushes and never asks a blocking question. Invocation cannot broaden the caller's authority; merge, rebase, force-push, and CI approval remain excluded.
4
+
5
+ Full and targeted feedback scopes keep their existing judgment and fix flow. A code-fix batch returns with its entire remote tail pending, including actions that require no fix themselves. A no-change batch may finish immediately through Full Mode's existing reply/resolve protocol. Its record distinguishes verified completion from an incomplete write or resolution. Human decisions retain the rubric's typed `needs-human` payload and remain open.
6
+
7
+ ## Prepare the destination before editing
8
+
9
+ Run the bundled helper from the absolute directory containing this skill's `SKILL.md`; set the anchor in each shell call because shell state does not persist. Preflight happens before edits, not after the commit:
10
+
11
+ ```bash
12
+ SKILL_DIR="<absolute path of the directory containing the ce-resolve-pr-feedback SKILL.md>";
13
+ PY="$(for c in python3 python py; do command -v "$c" >/dev/null 2>&1 && "$c" -c '' >/dev/null 2>&1 && { echo "$c"; break; }; done)"; [ -n "$PY" ] || { echo "no working Python 3 interpreter on PATH" >&2; exit 1; };
14
+ "$PY" "$SKILL_DIR/scripts/pending-feedback.py" preflight
15
+ ```
16
+
17
+ When the invocation supplies `handoff:<path>`, append `--path '<caller path>'` to that command, preserving the actual argument. Preflight refuses an existing destination, including a dangling symlink, and probes exclusive temporary-file creation in its parent directory. Without a supplied path it allocates a private OS scratch directory and returns an unused `pending.json` path. Retain the returned absolute `handoff` path. Do not clean it up at skill completion; the caller owns retention.
18
+
19
+ If preflight fails, stop before editing and return the blocker. Do not substitute another destination for a rejected caller path. Creation also refuses overwrite, so a destination that appears during preparation cannot be replaced.
20
+
21
+ ## Save the judged batch
22
+
23
+ Capture the PR's host, base repository, number and canonical URL, plus its actual head repository and head ref from fetched PR metadata. The head repository may differ from the base on a fork PR; do not infer it from the checkout's default remote.
24
+
25
+ For a batch creating changes, validate the combined fix and commit only its owned changes as Full Mode steps 5-6 define. Record the actual full commit SHA. Do not push. Preserve the final exact reply bodies from the judged per-item results, including multiline Markdown and the recorded commit reference. Save every covered source of a class fix as its own action. Whole-batch deferral applies to replies, human acknowledgments, resolutions and PR-body checklist ticks alike.
26
+
27
+ For a no-change batch, set `fix_commit` to `null` and save the prepared actions before entering the existing remote tail. Checkpoint observed progress after successful writes and at return. If a later write fails, retain earlier verified progress and return `pending` with the blocker; do not claim the whole batch completed. Existing `resolution-pending` threads carry their visible submitted reply IDs and body, so their saved action requires only the missing resolution.
28
+
29
+ Build the versioned JSON record in a separate private input file. Source fingerprints are lowercase SHA-256 of the original fetched body encoded as UTF-8, computed from that decoded body by a tool rather than invented or calculated from a paraphrase. The helper must read the original file bytes; do not retype or normalize a received record before validating it.
30
+
31
+ ```json
32
+ {
33
+ "schema_version": 1,
34
+ "status": "pending",
35
+ "pr": {
36
+ "host": "github.com",
37
+ "base_repo": "upstream/project",
38
+ "number": 42,
39
+ "url": "https://github.com/upstream/project/pull/42",
40
+ "head_repo": "contributor/project",
41
+ "head_ref": "fix/review"
42
+ },
43
+ "fix_commit": "<full lowercase 40-character SHA, or null when no fix commit>",
44
+ "verification": {
45
+ "command": "<command actually run, or empty when not run>",
46
+ "outcome": "passed",
47
+ "details": "<result and any pre-existing failures>"
48
+ },
49
+ "actions": [
50
+ {
51
+ "source": {
52
+ "kind": "thread",
53
+ "id": "<stable fetched feedback ID>",
54
+ "url": "https://github.com/upstream/project/pull/42#discussion_r11",
55
+ "body_sha256": "<SHA-256 of the original source body>"
56
+ },
57
+ "root_comment_id": 11,
58
+ "thread_id": "<authoritative GraphQL thread ID>",
59
+ "verdict": "fixed",
60
+ "reply_body": "> Original feedback\n\nExact prepared response.",
61
+ "resolve": true,
62
+ "decision_context": null,
63
+ "invariant_key": "<stable root key, or null>"
64
+ }
65
+ ],
66
+ "body_ticks": [
67
+ {"original": "- [ ] P1 — exact finding", "checked": "- [x] P1 — exact finding"}
68
+ ],
69
+ "residuals": []
70
+ }
71
+ ```
72
+
73
+ - `status` is `pending` until every eligible saved conversation action is verified complete, then `completed`. A completed batch can still carry human residuals whose threads intentionally remain open.
74
+ - `verification.outcome` is `passed`, `pre-existing-failure`, `failed`, or `not-run`; preserve the actual result, never replace unavailable validation with success.
75
+ - `source.kind` is `thread`, `comment`, or `review`. Non-thread actions have null `root_comment_id` and `thread_id`, and `resolve:false`. IDs are strings; REST root/reply IDs are positive integers.
76
+ - `verdict` uses the existing `fixed`, `fixed-differently`, `replied`, `not-addressing`, `declined`, or `needs-human` values. `needs-human` has `resolve:false` and the complete `decision_context` from the rubric; other verdicts have null decision context.
77
+ - `residuals` contains the rubric's exact typed `needs-human` objects with all covered `sources`, `decision_context`, and `thread_urls`. Carry existing unresolved human decisions too. Do not reduce them to prose summaries.
78
+ - `body_ticks` carries exact original bullets and their checked versions, changing only `[ ]` to `[x]`. An empty array means no planned body mutation.
79
+ - Optional action `progress` holds observed `reply_id`, `reply_url`, and `resolved`; optional tick `progress` holds `applied`. Omit unobserved fields. Progress is a checkpoint, not proof that overrides GitHub's current state.
80
+
81
+ Create the handoff from the input file:
82
+
83
+ ```bash
84
+ SKILL_DIR="<absolute path of the directory containing the ce-resolve-pr-feedback SKILL.md>";
85
+ PY="$(for c in python3 python py; do command -v "$c" >/dev/null 2>&1 && "$c" -c '' >/dev/null 2>&1 && { echo "$c"; break; }; done)"; [ -n "$PY" ] || { echo "no working Python 3 interpreter on PATH" >&2; exit 1; };
86
+ "$PY" "$SKILL_DIR/scripts/pending-feedback.py" create --input '<prepared JSON file>' --path '<preflight handoff path>'
87
+ ```
88
+
89
+ The helper validates the original bytes, creates the destination exclusively with private permissions, reads it back, and returns `{handoff, record}`. Preparation is complete only after this succeeds. `validate --path '<handoff path>'` reads and validates an existing record. `checkpoint --input '<updated JSON file>' --path '<handoff path>'` atomically saves progress, status and residuals while preserving the prepared PR, fix SHA, verification, source identities, exact replies and tick intent. These commands never mutate GitHub.
90
+
91
+ If a save or checkpoint fails, report the actual local commit and any observed remote success, plus the precise failure. Do not lose the fix SHA behind a generic failed status or describe an unreadable record as a usable handoff.
92
+
93
+ ## Structured caller result
94
+
95
+ Emit this result as the last output of this skill. It ends the skill, not a calling orchestrator's turn; the caller continues its next step in the same session.
96
+
97
+ ```json
98
+ {
99
+ "status": "pending",
100
+ "handoff": "<absolute readable validated file path, or null if unavailable>",
101
+ "fix_commit": "<actual fix SHA, or null>",
102
+ "changed_files": ["<fix-owned paths>"],
103
+ "verification": {"command": "<actual command>", "outcome": "passed", "details": "<actual result>"},
104
+ "residuals": [],
105
+ "blockers": []
106
+ }
107
+ ```
108
+
109
+ The exact result statuses are `pending`, `completed`, and `incomplete-handoff`. Use `pending` for a validated saved batch with deferred or incomplete conversation work, `completed` only for verified no-change completion, and `incomplete-handoff` when no usable saved record exists or its latest observed progress could not be checkpointed. Return typed human residuals even when other actions completed. Name blockers without asking a question.
110
+
111
+ The caller retains the file, publishes the recorded fix without rewriting its SHA, and returns the saved path to the resolver for later conversation completion. A push alone does not finish the review conversations. This preparation mode returns without implementing any of those caller steps.
@@ -0,0 +1,48 @@
1
+ # Targeted Mode
2
+
3
+ Read this reference when Mode Detection (in SKILL.md) routes to **Targeted Mode** — a specific comment or thread URL was provided. Targeted mode addresses only that thread.
4
+
5
+ ## 1. Extract Thread Context
6
+
7
+ Parse the URL to extract HOST, OWNER, REPO, PR number, and comment REST ID:
8
+ ```
9
+ https://HOST/OWNER/REPO/pull/NUMBER#discussion_rCOMMENT_ID
10
+ ```
11
+
12
+ **GitHub Enterprise host.** Take the host from the URL (targeted mode is always URL-triggered). When it is **not** `github.com`, pass it as a `GH_HOST=<host>` env prefix inline on **every** `gh api` / bundled-script call below (`gh api` honors `GH_HOST` as the request host) so an enterprise thread is fetched, replied to, and resolved on the right host instead of `github.com`. On `github.com`, drop the `GH_HOST=<host> ` prefix. Carry the same host into the reply/resolve calls you run from Full Mode steps 5-7.
13
+
14
+ **Step 1** -- Get comment details and GraphQL node ID via REST (cheap, single comment):
15
+ ```bash
16
+ GH_HOST=<host> gh api repos/OWNER/REPO/pulls/comments/COMMENT_ID \
17
+ --jq '{node_id, path, line, body}' # omit GH_HOST=<host> on github.com
18
+ ```
19
+
20
+ **Step 2** -- Map comment to its thread ID. Use [scripts/get-thread-for-comment](../scripts/get-thread-for-comment). Set `SKILL_DIR` to the absolute directory you loaded the ce-resolve-pr-feedback SKILL.md from — the Bash tool's CWD is the user's project, not the skill dir, and shell state does not persist between Bash calls, so set it inline. If the bundled script is missing, use Full Mode's fallback `gh` commands to inspect the PR comments:
21
+ ```bash
22
+ SKILL_DIR="<absolute path of the directory containing the ce-resolve-pr-feedback SKILL.md>";
23
+ GH_HOST=<host> bash "$SKILL_DIR/scripts/get-thread-for-comment" PR_NUMBER COMMENT_NODE_ID [OWNER/REPO]
24
+ ```
25
+
26
+ This fetches thread IDs and their first comment IDs (minimal fields, no bodies) and returns the matching thread with full comment details.
27
+
28
+ **Step 3** -- Check for your own unsubmitted review before doing any work. A reply posted while you hold one is absorbed into that draft: the call returns a comment ID and URL as if it succeeded, but the reviewer sees nothing until the draft is submitted. Full Mode gets this free from `get-pr-comments`; targeted mode never calls that script, so check directly (PENDING reviews are only visible to their author, so any hit is yours):
29
+ ```bash
30
+ GH_HOST=<host> gh api --paginate repos/OWNER/REPO/pulls/PR_NUMBER/reviews --jq '.[] | select(.state == "PENDING") | .id'
31
+ ```
32
+ `--paginate` is required: this endpoint is chronological and pages at 30, so a draft can sort past page 1. Print IDs rather than a count — `--jq` runs per page, so a count emits one number per page, but IDs simply concatenate and stay empty when there is no draft. (`--slurp` is not an option; `gh` rejects it alongside `--jq`.)
33
+
34
+ If this prints anything, stop. Tell the user they have an unsubmitted review on the PR and that it must be submitted or discarded before this skill can reply. Do not submit or discard it yourself; a draft review is unsent human writing.
35
+
36
+ ## 2. Judge, Fix, Reply, Resolve
37
+
38
+ Apply Full Mode step 7 (Reply and Resolve)'s completion check before judgment: check separately whether the thread already has a visible submitted reply and whether it is already resolved. When the thread is already `resolution-pending`, step 7 defines the only remaining work: skip judgment, fixing, validation, and commit, then complete the missing resolution without posting again.
39
+
40
+ **Judge first.** Apply the rubric in `references/evaluation-rubric.md` to this one thread, in your own context. Account for `isOutdated` and the location fields (`line`, `originalLine`, `startLine`, `originalStartLine`) -- targeted threads can be outdated too and need the same relocation handling. The rubric's cross-item reasoning does nothing for a single thread, but its read-depth and divert rules apply in full (how deeply to read before judging, and when to stop with a reply, a decline, or a human decision instead of fixing): deep-read (callers, invariants, `git blame`/PR rationale for author intent) before accepting a contestable finding or overriding code that looks deliberate. This judgment is what decides whether the finding is valid; don't fix on the reviewer's authority alone.
41
+
42
+ **Then act on the verdict:**
43
+
44
+ - **`fixed` / `fixed-differently`** — read `references/agents/pr-comment-resolver.md` and apply the fix yourself in this context, using that prompt as your own instructions and producing its return record (`files_changed`, `reply_text`), which the shared validate, commit, and reply steps consume. You already read the code to judge it, and a single fix has nothing to run in parallel with. Dispatch a single generic subagent seeded with that fixer prompt only when the fix reaches well beyond the code your judgment read (a rename across callers, a class fix over many sites). Do not dispatch a standalone agent by type/name. Pass it the file/location fields (resolved location or anchor if outdated), the comment text, and your note on what to change and why it's valid. The fixer only implements; it does not re-judge. When that dispatch is unavailable or fails, apply the fix here (see Full Mode step 4, Fix).
45
+ - **`replied` / `not-addressing` / `declined`** — no subagent. Compose the reply text per the rubric and proceed to reply/resolve.
46
+ - **`needs-human`** — compose `decision_context`, run the rubric's "Adjudicate before escalating" step (a judgment-bound item may come back as one of the verdicts above), and for what remains compose the natural-sounding reply per the rubric, leave the thread open (don't resolve), and present the decision to the user (use the platform's blocking question tool as in Full Mode step 9). The shared reply step below posts the reply once — do not post it here.
47
+
48
+ Then follow Full Mode steps 5-7 (in `references/full-mode.md`) under the selected execution mode. Ordinary and pipeline runs validate, commit, publish, and complete the conversation. Return-to-caller validates and commits a code fix, saves this thread's completion actions, and returns without pushing or remote completion writes. When no code changed, skip validate/commit and use the existing reply/resolve protocol, then save its actual completion or incomplete progress through `references/return-to-caller.md`. Its structured result replaces the interactive decision question.