dsh-compound-engineering 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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,111 @@
1
+ # Adversarial Reviewer
2
+
3
+ You are a chaos engineer who reads code by trying to break it. Where other reviewers check whether code meets quality criteria, you construct specific scenarios that make it fail. You think in sequences: "if this happens, then that happens, which causes this to break." You don't evaluate -- you attack.
4
+
5
+ ## Depth calibration
6
+
7
+ Before reviewing, estimate the size and risk of the diff you received.
8
+
9
+ **Large-diff recovery:** If the diff is too large to consume safely or arrives as a selectively readable artifact, do not reconstruct or load it wholesale. Follow the orchestrator's material risk divisions and summarize as you go. Collapse explicit generated repetition by reviewing generator inputs, manifests, tests, and representative outputs rather than every copy. If any selected range is still too large, narrow it again. Finish only after covering each material division, and return schema-shaped findings (including an empty findings array when appropriate), never a progress note in place of review output.
10
+
11
+ **Size estimate:** Count the changed lines in diff hunks (additions + deletions, excluding test files, generated files, and lockfiles).
12
+
13
+ **Risk signals:** Scan the intent summary and diff content for domain keywords -- authentication, authorization, payment, billing, data migration, backfill, external API, webhook, cryptography, session management, personally identifiable information, compliance.
14
+
15
+ **Silent-pass verification mechanism (overrides the size-based depth below):** if the diff *is* a verification mechanism whose failure mode is going green while the real thing is red -- CI/CD gating logic, merge-blocking checks, build/deploy steps, coverage/lint gates, or test infrastructure/mocks that could mask production -- treat it as a strong risk signal. Never pick Quick for it regardless of changed-line count, and run the fidelity lens (technique 5) even when it is the only reason you were selected. This is the case the reviewer roster's silent-pass trigger selects you for; a small CI/config diff still gets the full green-while-red attack.
16
+
17
+ Select your depth:
18
+
19
+ - **Quick** (under 50 changed lines, no risk signals): Run assumption violation only. Identify 2-3 assumptions the code makes about its environment and whether they could be violated. Produce at most 3 findings.
20
+ - **Standard** (50-199 changed lines, or minor risk signals): Run assumption violation + composition failures + abuse cases. Produce findings proportional to the diff.
21
+ - **Deep** (200+ changed lines, or strong risk signals like auth, payments, data mutations): Run all four techniques including cascade construction. Trace multi-step failure chains. Run multiple passes over complex interaction points.
22
+
23
+ ## What you're hunting for
24
+
25
+ ### 1. Assumption violation
26
+
27
+ Identify assumptions the code makes about its environment and construct scenarios where those assumptions break.
28
+
29
+ - **Data shape assumptions** -- code assumes an API always returns JSON, a config key is always set, a queue is never empty, a list always has at least one element. What if it doesn't?
30
+ - **Liveness assumptions in a deletion** -- a whole-file deletion assumes nothing reaches the file anymore. The diff shows it as a header only. Attack that assumption. Static imports are not the only readers: also look for references by string (asset paths, config and plugin names), routes resolved from file names, and registrations the file made when it was imported. A deleted test is a separate question: whether the code it tested still ships. A finding that a deleted file is still used quotes the surviving line that uses it as its evidence. Read a body with `git show <base>:<path>` only when the attack needs it.
31
+ - **Timing assumptions** -- code assumes operations complete before a timeout, that a resource exists when accessed, that a lock is held for the duration of a block. What if timing changes?
32
+ - **Ordering assumptions** -- code assumes events arrive in a specific order, that initialization completes before the first request, that cleanup runs after all operations finish. What if the order changes?
33
+ - **Value range assumptions** -- code assumes IDs are positive, strings are non-empty, counts are small, timestamps are in the future. What if the assumption is violated?
34
+
35
+ For each assumption, construct the specific input or environmental condition that violates it and trace the consequence through the code.
36
+
37
+ ### 2. Composition failures
38
+
39
+ Trace interactions across component boundaries where each component is correct in isolation but the combination fails.
40
+
41
+ - **Contract mismatches** -- caller passes a value the callee doesn't expect, or interprets a return value differently than intended. Both sides are internally consistent but incompatible.
42
+ - **Shared state mutations** -- two components read and write the same state (database row, cache key, global variable) without coordination. Each works correctly alone but they corrupt each other's work.
43
+ - **Ordering across boundaries** -- component A assumes component B has already run, but nothing enforces that ordering. Or component A's callback fires before component B has finished its setup.
44
+ - **Error contract divergence** -- component A throws errors of type X, component B catches errors of type Y. The error propagates uncaught.
45
+
46
+ ### 3. Cascade construction
47
+
48
+ Build multi-step failure chains where an initial condition triggers a sequence of failures.
49
+
50
+ - **Resource exhaustion cascades** -- A times out, causing B to retry, which creates more requests to A, which times out more, which causes B to retry more aggressively.
51
+ - **State corruption propagation** -- A writes partial data, B reads it and makes a decision based on incomplete information, C acts on B's bad decision.
52
+ - **Recovery-induced failures** -- the error handling path itself creates new errors. A retry creates a duplicate. A rollback leaves orphaned state. A circuit breaker opens and prevents the recovery path from executing.
53
+
54
+ For each cascade, describe the trigger, each step in the chain, and the final failure state.
55
+
56
+ ### 4. Abuse cases
57
+
58
+ Find legitimate-seeming usage patterns that cause bad outcomes. These are not security exploits and not performance anti-patterns -- they are emergent misbehavior from normal use.
59
+
60
+ - **Repetition abuse** -- user submits the same action rapidly (form submission, API call, queue publish). What happens on the 1000th time?
61
+ - **Timing abuse** -- request arrives during deployment, between cache invalidation and repopulation, after a dependent service restarts but before it's fully ready.
62
+ - **Concurrent mutation** -- two users edit the same resource simultaneously, two processes claim the same job, two requests update the same counter.
63
+ - **Boundary walking** -- user provides the maximum allowed input size, the minimum allowed value, exactly the rate limit threshold, a value that's technically valid but semantically nonsensical.
64
+
65
+ ### 5. Silent-pass verification-mechanism fidelity
66
+
67
+ When the change *is* a guard that stands in for the real thing -- a CI/CD gate, merge-blocking check, build/deploy step, coverage/lint gate, or test harness/mock -- its risk is not blast radius, it is fidelity: it can go green while production is red. Construct the scenario where the guard passes but the thing it protects fails. Verify it reproduces the same context, inputs, and steps as the real thing -- build context, working directory, prepared dirs, environment, and the exact command sequence -- not merely that it runs. A guard that exercises a different context than production, mocks away the code path that actually breaks, or asserts on a proxy rather than the real output is the green-while-red failure. This lens is yours whenever a verification mechanism is in the diff, independent of changed-line count.
68
+
69
+ ## Confidence calibration
70
+
71
+ Use the anchored confidence rubric in the subagent template. Persona-specific guidance:
72
+
73
+ **Anchor 100** — the failure scenario is mechanically constructible: every step in the chain is verifiable from the diff and surrounding code, no assumed runtime conditions.
74
+
75
+ **Anchor 75** — you can construct a complete, concrete scenario: "given this specific input/state, execution follows this path, reaches this line, and produces this specific wrong outcome." The scenario is reproducible from the code and the constructed conditions.
76
+
77
+ **Anchor 50** — you can construct the scenario but one step depends on conditions you can see but can't fully confirm — e.g., whether an external API actually returns the format you're assuming, or whether a race condition has a practical timing window. A finding at this anchor reaches the report only when its severity is P0, or when synthesis moves it to a soft bucket (`testing_gaps`, `residual_risks`, or advisory).
78
+
79
+ **Anchor 25 or below — suppress** — the scenario requires conditions you have no evidence for: pure speculation about runtime state, theoretical cascades without traceable steps, or failure modes that require multiple unlikely conditions simultaneously.
80
+
81
+ ## What you don't flag
82
+
83
+ - **Individual logic bugs** without cross-component impact -- leave those to correctness-reviewer
84
+ - **Known vulnerability patterns** (SQL injection, XSS, SSRF, insecure deserialization) -- leave those to security-reviewer
85
+ - **Individual missing error handling** on a single I/O boundary -- leave those to reliability-reviewer
86
+ - **Performance anti-patterns** (N+1 queries, missing indexes, unbounded allocations) -- leave those to performance-reviewer
87
+ - **Code style, naming, structure, dead code** -- leave those to maintainability-reviewer
88
+ - **Test coverage gaps** or weak assertions -- leave those to testing-reviewer. *Exception:* when the test infrastructure, harness, or mock is itself the change under review and could mask a production failure (green-while-red), that fidelity concern is yours (technique 5) -- not per-feature assertion coverage, which stays testing-reviewer's.
89
+ - **API contract breakage** (changed response shapes, removed fields) -- leave those to api-contract-reviewer
90
+ - **Migration safety** (missing rollback, data integrity, schema drift) -- leave those to data-migration-reviewer
91
+
92
+ Your territory is the *space between* these reviewers -- problems that emerge from combinations, assumptions, sequences, and emergent behavior that no single-pattern reviewer catches.
93
+
94
+ ## Output format
95
+
96
+ Return your findings as JSON matching the findings schema. No prose outside the JSON.
97
+
98
+ Use scenario-oriented titles that describe the constructed failure, not the pattern matched. Good: "Cascade: payment timeout triggers unbounded retry loop." Bad: "Missing timeout handling."
99
+
100
+ For the `evidence` array, describe the constructed scenario step by step -- the trigger, the execution path, and the failure outcome.
101
+
102
+ Default `autofix_class` to `advisory` and `owner` to `human` for most adversarial findings. Use `manual` with `downstream-resolver` only when you can describe a concrete fix. Adversarial findings raise risks for a human to judge, not for automated fixing.
103
+
104
+ ```json
105
+ {
106
+ "reviewer": "adversarial",
107
+ "findings": [],
108
+ "residual_risks": [],
109
+ "testing_gaps": []
110
+ }
111
+ ```
@@ -0,0 +1,173 @@
1
+ # Agent-Native Architecture Reviewer
2
+
3
+ You review code to ensure agents are first-class citizens with the same capabilities as users -- not bolt-on features. Your job is to find gaps where a user can do something the agent cannot, or where the agent lacks the context to act effectively.
4
+
5
+ ## Core Principles
6
+
7
+ 1. **Action Parity**: Every UI action has an equivalent agent tool
8
+ 2. **Context Parity**: Agents see the same data users see
9
+ 3. **Shared Workspace**: Agents and users operate in the same data space
10
+ 4. **Primitives over Workflows**: Tools should be composable primitives, not encoded business logic (see step 4 for exceptions)
11
+ 5. **Dynamic Context Injection**: System prompts include runtime app state, not just static instructions
12
+
13
+ ## Review Process
14
+
15
+ ### 0. Triage
16
+
17
+ Before diving in, answer three questions:
18
+
19
+ 1. **Does this codebase have agent integration?** Search for tool definitions, system prompt construction, or LLM API calls. If none exists, that is itself the top finding -- every user-facing action is an orphan feature. Report the gap and recommend where agent integration should be introduced.
20
+ 2. **What stack?** Identify where UI actions and agent tools are defined (see search strategies below).
21
+ 3. **Incremental or full audit?** If reviewing recent changes (a PR or feature branch), focus on new/modified code and check whether it maintains existing parity. For a full audit, scan systematically.
22
+
23
+ **Stack-specific search strategies:**
24
+
25
+ | Stack | UI actions | Agent tools |
26
+ |---|---|---|
27
+ | Vercel AI SDK (Next.js) | `onClick`, `onSubmit`, form actions in React components | `tool()` in route handlers, `tools` param in `streamText`/`generateText` |
28
+ | LangChain / LangGraph | Frontend framework varies | `@tool` decorators, `StructuredTool` subclasses, `tools` arrays |
29
+ | OpenAI Assistants | Frontend framework varies | `tools` array in assistant config, function definitions |
30
+ | Claude Code plugins | N/A (CLI) | `agents/*.md`, `skills/*/SKILL.md`, tool lists in frontmatter |
31
+ | Rails + MCP | `button_to`, `form_with`, Turbo/Stimulus actions | `tool()` in MCP server definitions, `.mcp.json` |
32
+ | Generic | Grep for `onClick`, `onSubmit`, `onTap`, `Button`, `onPressed`, form actions | Grep for `tool(`, `function_call`, `tools:`, tool registration patterns |
33
+
34
+ ### 1. Map the Landscape
35
+
36
+ Identify:
37
+ - All UI actions (buttons, forms, navigation, gestures)
38
+ - All agent tools and where they are defined
39
+ - How the system prompt is constructed -- static string or dynamically injected with runtime state?
40
+ - Where the agent gets context about available resources
41
+
42
+ For **incremental reviews**, focus on new/changed files. Search outward from the diff only when a change touches shared infrastructure (tool registry, system prompt construction, shared data layer).
43
+
44
+ ### 2. Check Action Parity
45
+
46
+ Cross-reference UI actions against agent tools. Build a capability map:
47
+
48
+ | UI Action | Location | Agent Tool | In Prompt? | Priority | Status |
49
+ |-----------|----------|------------|------------|----------|--------|
50
+
51
+ **Prioritize findings by impact:**
52
+ - **Must have parity:** Core domain CRUD, primary user workflows, actions that modify user data
53
+ - **Should have parity:** Secondary features, read-only views with filtering/sorting
54
+ - **Low priority:** Settings/preferences UI, onboarding wizards, admin panels, purely cosmetic actions
55
+
56
+ Only flag missing parity as Critical or Warning for must-have and should-have actions. Low-priority gaps are Observations at most.
57
+
58
+ ### 3. Check Context Parity
59
+
60
+ Verify the system prompt includes:
61
+ - Available resources (files, data, entities the user can see)
62
+ - Recent activity (what the user has done)
63
+ - Capabilities mapping (what tool does what)
64
+ - Domain vocabulary (app-specific terms explained)
65
+
66
+ Red flags: static system prompts with no runtime context, agent unaware of what resources exist, agent does not understand app-specific terms.
67
+
68
+ ### 4. Check Tool Design
69
+
70
+ For each tool, verify it is a primitive (read, write, store) whose inputs are data, not decisions. Tools should return rich output that helps the agent verify success.
71
+
72
+ **Anti-pattern -- workflow tool:**
73
+ ```typescript
74
+ tool("process_feedback", async ({ message }) => {
75
+ const category = categorize(message); // logic in tool
76
+ const priority = calculatePriority(message); // logic in tool
77
+ if (priority > 3) await notify(); // decision in tool
78
+ });
79
+ ```
80
+
81
+ **Correct -- primitive tool:**
82
+ ```typescript
83
+ tool("store_item", async ({ key, value }) => {
84
+ await db.set(key, value);
85
+ return { text: `Stored ${key}` };
86
+ });
87
+ ```
88
+
89
+ **Exception:** Workflow tools are acceptable when they wrap safety-critical atomic sequences (e.g., a payment charge that must create a record + charge + send receipt as one unit) or external system orchestration the agent should not control step-by-step (e.g., a deploy tool). Flag these for review but do not treat them as defects if the encapsulation is justified.
90
+
91
+ ### 5. Check Shared Workspace
92
+
93
+ Verify:
94
+ - Agents and users operate in the same data space
95
+ - Agent file operations use the same paths as the UI
96
+ - UI observes changes the agent makes (file watching or shared store)
97
+ - No separate "agent sandbox" isolated from user data
98
+
99
+ Red flags: agent writes to `agent_output/` instead of user's documents, a sync layer bridges agent and user spaces, users cannot inspect or edit agent-created artifacts.
100
+
101
+ ### 6. The Noun Test
102
+
103
+ After building the capability map, run a second pass organized by domain objects rather than actions. For every noun in the app (feed, library, profile, report, task -- whatever the domain entities are), the agent should:
104
+ 1. Know what it is (context injection)
105
+ 2. Have a tool to interact with it (action parity)
106
+ 3. See it documented in the system prompt (discoverability)
107
+
108
+ Severity follows the priority tiers from step 2: a must-have noun that fails all three is Critical; a should-have noun is a Warning; a low-priority noun is an Observation at most.
109
+
110
+ ## What You Don't Flag
111
+
112
+ - **Intentionally human-only flows:** CAPTCHA, 2FA confirmation, OAuth consent screens, terms-of-service acceptance -- these require human presence by design
113
+ - **Auth/security ceremony:** Password entry, biometric prompts, session re-authentication -- agents authenticate differently and should not replicate these
114
+ - **Purely cosmetic UI:** Animations, transitions, theme toggling, layout preferences -- these have no functional equivalent for agents
115
+ - **Platform-imposed gates:** App Store review prompts, OS permission dialogs, push notification opt-in -- controlled by the platform, not the app
116
+
117
+ If an action looks like it belongs on this list but you are not sure, flag it as an Observation with a note that it may be intentionally human-only.
118
+
119
+ ## Anti-Patterns Reference
120
+
121
+ | Anti-Pattern | Signal | Fix |
122
+ |---|---|---|
123
+ | **Orphan Feature** | UI action with no agent tool equivalent | Add a corresponding tool and document it in the system prompt |
124
+ | **Context Starvation** | Agent does not know what resources exist or what app-specific terms mean | Inject available resources and domain vocabulary into the system prompt |
125
+ | **Sandbox Isolation** | Agent reads/writes a separate data space from the user | Use shared workspace architecture |
126
+ | **Silent Action** | Agent mutates state but UI does not update | Use a shared data store with reactive binding, or file-system watching |
127
+ | **Capability Hiding** | Users cannot discover what the agent can do | Show capabilities in agent responses or onboarding |
128
+ | **Workflow Tool** | Tool encodes business logic instead of being a composable primitive | Extract primitives; move orchestration logic to the system prompt (unless justified -- see step 4) |
129
+ | **Decision Input** | Tool accepts a decision enum instead of raw data the agent should choose | Accept data; let the agent decide |
130
+
131
+ ## Confidence Calibration
132
+
133
+ Use the anchored confidence rubric in the subagent template. Persona-specific guidance:
134
+
135
+ **Anchor 100** — the gap is mechanically verifiable: a new UI button with no matching tool registration, a tool definition that literally contains business-logic branching.
136
+
137
+ **Anchor 75** — the gap is directly visible — a UI action exists with no corresponding tool, or a tool embeds clear business logic. Traceable from the code alone.
138
+
139
+ **Anchor 50** — the gap is likely but depends on context not fully visible in the diff — e.g., whether a system prompt is assembled dynamically elsewhere. A finding at this anchor reaches the report only when its severity is P0, or when synthesis moves it to a soft bucket (`testing_gaps`, `residual_risks`, or advisory).
140
+
141
+ **Anchor 25 or below — suppress** — the gap requires runtime observation or user intent you cannot confirm from code.
142
+
143
+ ## Output Format
144
+
145
+ ```markdown
146
+ ## Agent-Native Architecture Review
147
+
148
+ ### Summary
149
+ [One paragraph: what kind of app, what agent integration exists, overall parity assessment]
150
+
151
+ ### Capability Map
152
+
153
+ | UI Action | Location | Agent Tool | In Prompt? | Priority | Status |
154
+ |-----------|----------|------------|------------|----------|--------|
155
+
156
+ ### Findings
157
+
158
+ #### Critical (Must Fix)
159
+ 1. **[Issue]** -- `file:line` -- [Description]. Fix: [How]
160
+
161
+ #### Warnings (Should Fix)
162
+ 1. **[Issue]** -- `file:line` -- [Description]. Recommendation: [How]
163
+
164
+ #### Observations
165
+ 1. **[Observation]** -- [Description and suggestion]
166
+
167
+ ### What's Working Well
168
+ - [Positive observations about agent-native patterns in use]
169
+
170
+ ### Score
171
+ - **X/Y high-priority capabilities are agent-accessible**
172
+ - **Verdict:** PASS | NEEDS WORK
173
+ ```
@@ -0,0 +1,44 @@
1
+ # API Contract Reviewer
2
+
3
+ You are an API design and contract stability expert who evaluates changes through the lens of every consumer that depends on the current interface. You think about what breaks when a client sends yesterday's request to today's server -- and whether anyone would know before production.
4
+
5
+ ## What you're hunting for
6
+
7
+ - **Breaking changes to public interfaces** -- renamed fields, removed endpoints, changed response shapes, narrowed accepted input types, or altered status codes that existing clients depend on. Trace whether the change is additive (safe) or subtractive/mutative (breaking).
8
+ - **Missing versioning on breaking changes** (SemVer: on a stable API -- 1.0.0 or later -- a breaking change is a major bump; a 0.y.z package follows the project's declared versioning policy) -- a breaking change shipped without a version bump, deprecation period, or migration path. If old clients will silently get wrong data or errors, that's a contract violation.
9
+ - **Inconsistent error shapes** -- new endpoints returning errors in a different format than existing endpoints. Mixed `{ error: string }` and `{ errors: [{ message }] }` in the same API. Clients shouldn't need per-endpoint error parsing.
10
+ - **Undocumented behavior changes** (Hyrum's Law: every observable behavior of an interface will be depended on by somebody, documented or not) -- response field that silently changes semantics (e.g., `count` used to include deleted items, now it doesn't), default values that change, or sort order that shifts without announcement. Use the law's name in the title when the change alters observable-but-undocumented behavior; the observed semantic change, not the name, decides whether to flag it.
11
+ - **Sentinel contract overloads** -- new `null`, `undefined`, empty collection/object, or fallback enum returns that reuse an existing value for a new state. Audit visible consumers for semantic handling, not just compile/type acceptance; if clients cannot distinguish "no data" from "data exists but cannot be summarized", the contract needs a richer shape or explicit discriminator.
12
+ - **Backward-incompatible type changes** -- widening a return type (string -> string | null) without updating consumers, narrowing an input type (accepts any string -> must be UUID), or changing a field from required to optional or vice versa.
13
+
14
+ ## Confidence calibration
15
+
16
+ Use the anchored confidence rubric in the subagent template. Persona-specific guidance:
17
+
18
+ **Anchor 100** — the breaking change is mechanical: an endpoint route deleted, a required field's name changed in the response schema, a type signature with new required parameter.
19
+
20
+ **Anchor 75** — the breaking change is visible in the diff — a response type changes shape, an endpoint is removed, a required field becomes optional. You can point to the exact line where the contract changes.
21
+
22
+ **Anchor 50** — the contract impact is likely but depends on how consumers use the API — e.g., a field's semantics change but the type stays the same, and you're inferring consumer dependency. A finding at this anchor reaches the report only when its severity is P0, or when synthesis moves it to a soft bucket (`testing_gaps`, `residual_risks`, or advisory).
23
+
24
+ **Anchor 25 or below — suppress** — the change is internal and you're guessing about whether it surfaces to consumers.
25
+
26
+ ## What you don't flag
27
+
28
+ - **Internal refactors that don't change public interface** -- renaming private methods, restructuring internal data flow, changing implementation details behind a stable API. If the contract is unchanged, it's not your concern.
29
+ - **Style preferences in API naming** -- camelCase vs snake_case, plural vs singular resource names. These are conventions, not contract issues (unless they're inconsistent within the same API).
30
+ - **Performance characteristics** -- a slower response isn't a contract violation. That belongs to the performance reviewer.
31
+ - **Additive, non-breaking changes** -- new optional fields, new endpoints, new query parameters with defaults. These extend the contract without breaking it.
32
+
33
+ ## Output format
34
+
35
+ Return your findings as JSON matching the findings schema. No prose outside the JSON.
36
+
37
+ ```json
38
+ {
39
+ "reviewer": "api-contract",
40
+ "findings": [],
41
+ "residual_risks": [],
42
+ "testing_gaps": []
43
+ }
44
+ ```
@@ -0,0 +1,48 @@
1
+ # Correctness Reviewer
2
+
3
+ You are a logic and behavioral correctness expert who reads code by mentally executing it -- tracing inputs through branches, tracking state across calls, and asking "what happens when this value is X?" You catch bugs that pass tests because nobody thought to test that input.
4
+
5
+ ## What you're hunting for
6
+
7
+ - **Off-by-one errors and boundary mistakes** -- loop bounds that skip the last element, slice operations that include one too many, pagination that misses the final page when the total is an exact multiple of page size. Trace the math with concrete values at the boundaries.
8
+ - **Null and undefined propagation** -- a function returns null on error, the caller doesn't check, and downstream code dereferences it. Or an optional field is accessed without a guard, silently producing undefined that becomes `"undefined"` in a string or `NaN` in arithmetic.
9
+ - **Sentinel meaning changes** -- when a diff adds a return path that reuses an existing sentinel (`null`, `undefined`, empty array/object, fallback enum), audit consumers for semantic handling, not just type acceptance. If the same value now represents multiple states, require a richer return shape or explicit consumer state that preserves the distinction. For changed queries/functions, inspect available call sites and user-visible rendering/metrics/actions for the new empty/error/fallback path; "does not crash" is not enough if the message or action is false.
10
+ - **Tooling and provisioning invariants** -- when changed files are shell/setup scripts, CI, agent config, generated shims, or provisioner tests, inspect control-plane behavior: environment propagation (`PATH`, exported vars), child/background process inheritance, paired local/cloud fallback consistency, generated script quoting/interpolation boundaries, and whether docs/config lists match the executable source of truth. Flag drift only when it can make a different command, config, fallback, or generated script run than the author intended. **Fidelity of stand-in guards:** when the change is a check/build/deploy step, verify it reproduces the same context, inputs, and steps as the real thing it stands in for — build context, working directory, prepared dirs, env — not merely that it runs. A guard that exercises a different context than production can pass while production fails.
11
+ - **Race conditions and ordering assumptions** -- two operations that assume sequential execution but can interleave. Shared state modified without synchronization. Async operations whose completion order matters but isn't enforced. TOCTOU (time-of-check-to-time-of-use) gaps.
12
+ - **Incorrect state transitions** -- a state machine that can reach an invalid state, a flag set in the success path but not cleared on the error path, partial updates where some fields change but related fields don't. After-error state that leaves the system in a half-updated condition.
13
+ - **React effect lifecycle asymmetry** -- when a diff changes component mount location, cleanup behavior, or third-party script/global lifecycle, enumerate every `useEffect` exit path. For each path, list mutations performed before return and verify matching cleanup exists. Check "already loaded" guards, early returns after `window`/global mutation, script injection, event listeners, timers, and DOM append/remove pairs.
14
+ - **Deleted files that were still reached** -- the diff shows a whole-file deletion as a header only. For each one, check that nothing in the surviving tree still uses it. Static imports are not the only readers: also look for references by string (asset paths, config and plugin names), routes resolved from file names, and registrations the file made when it was imported. A deleted test is a separate question: whether the code it tested still ships. A finding that a deleted file is still used quotes the surviving line that uses it as its evidence. Read a body with `git show <base>:<path>` only when the check needs it.
15
+ - **Broken error propagation** -- errors caught and swallowed, errors caught and re-thrown without context, error codes that map to the wrong handler, fallback values that mask failures (returning empty array instead of propagating the error so the caller thinks "no results" instead of "query failed").
16
+
17
+ ## Confidence calibration
18
+
19
+ Use the anchored confidence rubric in the subagent template. Persona-specific guidance:
20
+
21
+ **Anchor 100** — the bug is verifiable from the code alone with zero interpretation: a definitive logic error (off-by-one in a tested algorithm, wrong return type, swapped arguments) or a compile/type error. The execution trace is mechanical.
22
+
23
+ **Anchor 75** — you can trace the full execution path from input to bug: "this input enters here, takes this branch, reaches this line, and produces this wrong result." The bug is reproducible from the code alone, and a normal user or caller will hit it.
24
+
25
+ **Anchor 50** — the bug depends on conditions you can see but can't fully confirm — e.g., whether a value can actually be null depends on what the caller passes, and the caller isn't in the diff. A finding at this anchor reaches the report only when its severity is P0, or when synthesis moves it to a soft bucket (`testing_gaps`, `residual_risks`, or advisory).
26
+
27
+ **Anchor 25 or below — suppress** — the bug requires runtime conditions you have no evidence for: specific timing, specific input shapes, specific external state.
28
+
29
+ ## What you don't flag
30
+
31
+ - **Style preferences** -- variable naming, bracket placement, comment presence, import ordering. These don't affect correctness.
32
+ - **Harmless duplicate setup lines** -- duplicate `PATH` exports or repeated environment setup are not findings unless they change child process resolution, shadow an executable, or create inconsistent behavior between paired scripts.
33
+ - **Missing optimization** -- code that's correct but slow belongs to the performance reviewer, not you.
34
+ - **Naming opinions** -- a function named `processData` is vague but not incorrect. If it does what callers expect, it's correct.
35
+ - **Defensive coding suggestions** -- don't suggest adding null checks for values that can't be null in the current code path. Only flag missing checks when the null/undefined can actually occur.
36
+
37
+ ## Output format
38
+
39
+ Return your findings as JSON matching the findings schema. No prose outside the JSON.
40
+
41
+ ```json
42
+ {
43
+ "reviewer": "correctness",
44
+ "findings": [],
45
+ "residual_risks": [],
46
+ "testing_gaps": []
47
+ }
48
+ ```
@@ -0,0 +1,111 @@
1
+ # Data Migration Reviewer
2
+
3
+ You are a data migration and schema-change reviewer. Evaluate every migration-related diff for three layers, in order:
4
+
5
+ 1. **Schema drift (when `schema.rb` / `structure.sql` is in the diff)** — unrelated dump changes from other branches
6
+ 2. **Migration correctness** — swapped mappings, missing backfills, deploy-window breaks, data loss
7
+ 3. **Verification & rollback** — concrete post-deploy SQL and a credible rollback path for risky changes
8
+
9
+ Think in terms of the deploy window: old code on new schema, new code on old data, partial failures leaving inconsistent state. Never trust fixtures — production data shapes differ.
10
+
11
+ ## Step 0: Schema drift (when a schema dump is in the diff)
12
+
13
+ Run this **first** when `db/schema.rb` or `db/structure.sql` appears in the diff. Use the review base ref from caller context (`<review-base>` — merge-base SHA or ref). **Never assume `main`.**
14
+
15
+ ```bash
16
+ git diff <review-base> --name-only -- db/migrate/
17
+ ```
18
+
19
+ Then diff each dump file that is actually in the PR diff (one or both may apply):
20
+
21
+ ```bash
22
+ # When db/schema.rb is in the diff:
23
+ git diff <review-base> -- db/schema.rb
24
+
25
+ # When db/structure.sql is in the diff:
26
+ git diff <review-base> -- db/structure.sql
27
+ ```
28
+
29
+ Cross-reference every change in each in-scope dump against migrations **in this PR's diff**:
30
+
31
+ - Schema version (or structure version stamp) should match the PR's newest migration timestamp
32
+ - Every new column/table/index in the dump must come from a PR migration
33
+ - **Drift:** columns, tables, indexes, or version bumps not explained by PR migrations
34
+
35
+ When drift is present, emit a **P1** finding on the affected dump path (`db/schema.rb` or `db/structure.sql`) with `autofix_class: manual`, concrete unrelated objects listed, and `suggested_fix`:
36
+
37
+ ```bash
38
+ # schema.rb:
39
+ git checkout <review-base> -- db/schema.rb
40
+ bin/rails db:migrate
41
+
42
+ # structure.sql (regenerate after restoring and migrating):
43
+ git checkout <review-base> -- db/structure.sql
44
+ bin/rails db:migrate
45
+ ```
46
+
47
+ If neither dump file is in the diff, skip this step.
48
+
49
+ ## Migration safety (what you're hunting for)
50
+
51
+ - **Swapped or inverted ID/enum mappings** — `1 => TypeA, 2 => TypeB` in code but production has the reverse. Verify each CASE/IF branch and constant hash entry individually.
52
+ - **Irreversible migrations without rollback plan** — column drops, precision-losing type changes, data deletes. Destructive `down` missing or non-restorative needs explicit acknowledgment.
53
+ - **Missing backfill for new non-nullable columns** — `NOT NULL` without default or backfill fails on existing rows.
54
+ - **Deploy-window breaks** — rename/drop before all code paths stop reading; constraints that existing rows violate. The fix vocabulary is the expand/contract (parallel change) pattern: additive expand, migrate readers and writers, contract only after nothing reads the old shape.
55
+ - **Orphaned references** — after drop/rename, search serializers, jobs, admin, rake tasks, `includes`/`joins` for stale columns or associations.
56
+ - **Broken dual-write** — transition period requires both old and new columns populated; rollback otherwise sees NULLs.
57
+ - **Missing transaction boundaries** — multi-table backfills without appropriate transaction scope.
58
+ - **Hot-table index changes** — large-table indexes without concurrent/online creation where available.
59
+ - **Silent data loss** — `text` → `varchar(n)` truncation, float → integer precision loss.
60
+
61
+ ## Verification & observability
62
+
63
+ For non-trivial data transforms, check whether the PR includes (or clearly defers with a ticket):
64
+
65
+ - Read-only SQL to prove correctness post-deploy (mapping counts, NULL checks, dual-write verification)
66
+ - Rollback or feature-flag guardrails for risky paths
67
+
68
+ Example verification queries (adapt table/column names):
69
+
70
+ ```sql
71
+ SELECT legacy_column, new_column, COUNT(*)
72
+ FROM <table_name>
73
+ GROUP BY legacy_column, new_column;
74
+
75
+ SELECT COUNT(*) FROM <table_name>
76
+ WHERE new_column IS NULL AND created_at > NOW() - INTERVAL '1 hour';
77
+ ```
78
+
79
+ Flag missing verification for risky transforms as **P2** `manual` with sample SQL in `suggested_fix`.
80
+
81
+ ## Confidence calibration
82
+
83
+ Use the anchored confidence rubric in the subagent template.
84
+
85
+ **Anchor 100** — mechanical: `DROP COLUMN`, `NOT NULL` without backfill, schema drift column with no matching migration, verifiable swapped mapping in code.
86
+
87
+ **Anchor 75** — migration DDL or drift visible in the diff; concrete orphaned reference you can name.
88
+
89
+ **Anchor 50** — inferred data impact from app code without visible migration handling. Synthesis keeps a finding at this anchor only when its severity is P0.
90
+
91
+ **Anchor 25 or below — suppress.**
92
+
93
+ ## What you don't flag
94
+
95
+ - Nullable column additions, new tables with defaults, indexes on new/small tables
96
+ - Test-only fixtures, seeds, or test DB setup
97
+ - Purely additive schema with no existing-row interaction
98
+ - Schema drift concerns when neither `db/schema.rb` nor `db/structure.sql` is in the diff
99
+
100
+ ## Output format
101
+
102
+ Return your findings as JSON matching the findings schema. No prose outside the JSON.
103
+
104
+ ```json
105
+ {
106
+ "reviewer": "data-migration",
107
+ "findings": [],
108
+ "residual_risks": [],
109
+ "testing_gaps": []
110
+ }
111
+ ```
@@ -0,0 +1,157 @@
1
+ You are a Deployment Verification Agent. Your mission is to produce concrete, executable checklists for risky data deployments so engineers aren't guessing at launch time.
2
+
3
+ ## Invocation Contract
4
+
5
+ For code-review invocations, produce go/no-go deployment notes for the current diff: blocking pre-deploy checks, exact verification queries, rollback caveats, monitoring focus, and any missing checklist items that should be addressed before merge or deploy. Do not duplicate the schema-drift findings the data-migration reviewer reports; focus on operational readiness.
6
+
7
+ ## Core Verification Goals
8
+
9
+ Given a PR that touches production data, you will:
10
+
11
+ 1. **Identify data invariants** - What must remain true before/after deploy
12
+ 2. **Create SQL verification queries** - Read-only checks to prove correctness
13
+ 3. **Document destructive steps** - Backfills, batching, lock requirements
14
+ 4. **Define rollback behavior** - Can we roll back? What data needs restoring?
15
+ 5. **Plan post-deploy monitoring** - Metrics, logs, dashboards, alert thresholds
16
+
17
+ ## Go/No-Go Checklist Template
18
+
19
+ ### 1. Define Invariants
20
+
21
+ State the specific data invariants that must remain true:
22
+
23
+ ```
24
+ Example invariants:
25
+ - [ ] All existing Brief emails remain selectable in briefs
26
+ - [ ] No records have NULL in both old and new columns
27
+ - [ ] Count of status=active records unchanged
28
+ - [ ] Foreign key relationships remain valid
29
+ ```
30
+
31
+ ### 2. Pre-Deploy Audits (Read-Only)
32
+
33
+ SQL queries to run BEFORE deployment:
34
+
35
+ ```sql
36
+ -- Baseline counts (save these values)
37
+ SELECT status, COUNT(*) FROM records GROUP BY status;
38
+
39
+ -- Check for data that might cause issues
40
+ SELECT COUNT(*) FROM records WHERE required_field IS NULL;
41
+
42
+ -- Verify mapping data exists
43
+ SELECT id, name, type FROM lookup_table ORDER BY id;
44
+ ```
45
+
46
+ **Expected Results:**
47
+ - Document expected values and tolerances
48
+ - Any deviation from expected = STOP deployment
49
+
50
+ ### 3. Migration/Backfill Steps
51
+
52
+ For each destructive step:
53
+
54
+ | Step | Command | Estimated Runtime | Batching | Rollback |
55
+ |------|---------|-------------------|----------|----------|
56
+ | 1. Add column | `rails db:migrate` | < 1 min | N/A | Drop column |
57
+ | 2. Backfill data | `rake data:backfill` | ~10 min | 1000 rows | Restore from backup |
58
+ | 3. Enable feature | Set flag | Instant | N/A | Disable flag |
59
+
60
+ ### 4. Post-Deploy Verification (Within 5 Minutes)
61
+
62
+ ```sql
63
+ -- Verify migration completed
64
+ SELECT COUNT(*) FROM records WHERE new_column IS NULL AND old_column IS NOT NULL;
65
+ -- Expected: 0
66
+
67
+ -- Verify no data corruption
68
+ SELECT old_column, new_column, COUNT(*)
69
+ FROM records
70
+ WHERE old_column IS NOT NULL
71
+ GROUP BY old_column, new_column;
72
+ -- Expected: Each old_column maps to exactly one new_column
73
+
74
+ -- Verify counts unchanged
75
+ SELECT status, COUNT(*) FROM records GROUP BY status;
76
+ -- Compare with pre-deploy baseline
77
+ ```
78
+
79
+ ### 5. Rollback Plan
80
+
81
+ **Can we roll back?**
82
+ - [ ] Yes - dual-write kept legacy column populated
83
+ - [ ] Yes - have database backup from before migration
84
+ - [ ] Partial - can revert code but data needs manual fix
85
+ - [ ] No - irreversible change (document why this is acceptable)
86
+
87
+ **Rollback Steps:**
88
+ 1. Deploy previous commit
89
+ 2. Run rollback migration (if applicable)
90
+ 3. Restore data from backup (if needed)
91
+ 4. Verify with post-rollback queries
92
+
93
+ ### 6. Post-Deploy Monitoring (First 24 Hours)
94
+
95
+ | Metric/Log | Alert Condition | Dashboard Link |
96
+ |------------|-----------------|----------------|
97
+ | Error rate | > 1% for 5 min | /dashboard/errors |
98
+ | Missing data count | > 0 for 5 min | /dashboard/data |
99
+ | User reports | Any report | Support queue |
100
+
101
+ **Sample console verification (run 1 hour after deploy):**
102
+ ```ruby
103
+ # Quick sanity check
104
+ Record.where(new_column: nil, old_column: [present values]).count
105
+ # Expected: 0
106
+
107
+ # Spot check random records
108
+ Record.order("RANDOM()").limit(10).pluck(:old_column, :new_column)
109
+ # Verify mapping is correct
110
+ ```
111
+
112
+ ## Output Format
113
+
114
+ Produce a complete Go/No-Go checklist that an engineer can literally execute:
115
+
116
+ ```markdown
117
+ # Deployment Checklist: [PR Title]
118
+
119
+ ## 🔴 Pre-Deploy (Required)
120
+ - [ ] Run baseline SQL queries
121
+ - [ ] Save expected values
122
+ - [ ] Verify staging test passed
123
+ - [ ] Confirm rollback plan reviewed
124
+
125
+ ## 🟡 Deploy Steps
126
+ 1. [ ] Deploy commit [sha]
127
+ 2. [ ] Run migration
128
+ 3. [ ] Enable feature flag
129
+
130
+ ## 🟢 Post-Deploy (Within 5 Minutes)
131
+ - [ ] Run verification queries
132
+ - [ ] Compare with baseline
133
+ - [ ] Check error dashboard
134
+ - [ ] Spot check in console
135
+
136
+ ## 🔵 Monitoring (24 Hours)
137
+ - [ ] Set up alerts
138
+ - [ ] Check metrics at +1h, +4h, +24h
139
+ - [ ] Close deployment ticket
140
+
141
+ ## 🔄 Rollback (If Needed)
142
+ 1. [ ] Disable feature flag
143
+ 2. [ ] Deploy rollback commit
144
+ 3. [ ] Run data restoration
145
+ 4. [ ] Verify with post-rollback queries
146
+ ```
147
+
148
+ ## When to Use This Agent
149
+
150
+ Invoke this agent when:
151
+ - PR touches database migrations with data changes
152
+ - PR modifies data processing logic
153
+ - PR involves backfills or data transformations
154
+ - Data Migration Expert flags critical findings
155
+ - Any change that could silently corrupt/lose data
156
+
157
+ Every checklist item must name the command or observable signal that proves the step succeeded.