@mrciphersmith/keryx 0.2.9

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 (297) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +351 -0
  3. package/dist/cli.js +48427 -0
  4. package/dist/proxy-worker.js +381 -0
  5. package/package.json +63 -0
  6. package/src/gdgraph/affected.test.ts +100 -0
  7. package/src/gdgraph/affected.ts +135 -0
  8. package/src/gdgraph/build-integrity.test.ts +193 -0
  9. package/src/gdgraph/build-lang.test.ts +399 -0
  10. package/src/gdgraph/build.test.ts +120 -0
  11. package/src/gdgraph/build.ts +804 -0
  12. package/src/gdgraph/config.test.ts +47 -0
  13. package/src/gdgraph/config.ts +113 -0
  14. package/src/gdgraph/core-sources.test.ts +99 -0
  15. package/src/gdgraph/core-sources.ts +20 -0
  16. package/src/gdgraph/enrich.ts +79 -0
  17. package/src/gdgraph/fallback.test.ts +153 -0
  18. package/src/gdgraph/find.test.ts +78 -0
  19. package/src/gdgraph/find.ts +107 -0
  20. package/src/gdgraph/pagerank.ts +129 -0
  21. package/src/gdgraph/path.test.ts +56 -0
  22. package/src/gdgraph/path.ts +112 -0
  23. package/src/gdgraph/query.ts +133 -0
  24. package/src/gdgraph/repomap.test.ts +110 -0
  25. package/src/gdgraph/repomap.ts +193 -0
  26. package/src/gdgraph/service.test.ts +59 -0
  27. package/src/gdgraph/service.ts +51 -0
  28. package/src/gdgraph/staleness.ts +20 -0
  29. package/src/gdgraph/symbol.test.ts +89 -0
  30. package/src/gdgraph/symbol.ts +123 -0
  31. package/src/gdgraph/symbols-capability.test.ts +41 -0
  32. package/src/gdgraph/symbols-capability.ts +49 -0
  33. package/src/gdgraph/target.ts +56 -0
  34. package/src/gdgraph/treesitter/adapter.test.ts +249 -0
  35. package/src/gdgraph/treesitter/adapter.ts +213 -0
  36. package/src/gdgraph/treesitter/extract.test.ts +278 -0
  37. package/src/gdgraph/treesitter/extract.ts +389 -0
  38. package/src/gdgraph/treesitter/grammars.ts +110 -0
  39. package/src/gdgraph/treesitter/no-treesitter-import.test.ts +51 -0
  40. package/src/gdgraph/treesitter/resolve-calls.test.ts +38 -0
  41. package/src/gdgraph/types.ts +63 -0
  42. package/src/gdskills/bundled/rules/core/api-contracts.mdc +148 -0
  43. package/src/gdskills/bundled/rules/core/async-patterns.mdc +185 -0
  44. package/src/gdskills/bundled/rules/core/clean-architecture.mdc +163 -0
  45. package/src/gdskills/bundled/rules/core/code-review-ai-assistant.mdc +49 -0
  46. package/src/gdskills/bundled/rules/core/code-review-b091-profile.mdc +48 -0
  47. package/src/gdskills/bundled/rules/core/code-style-patterns.mdc +54 -0
  48. package/src/gdskills/bundled/rules/core/commit-message-formatting.mdc +25 -0
  49. package/src/gdskills/bundled/rules/core/database-patterns.mdc +162 -0
  50. package/src/gdskills/bundled/rules/core/documentation-management.mdc +106 -0
  51. package/src/gdskills/bundled/rules/core/error-handling.mdc +163 -0
  52. package/src/gdskills/bundled/rules/core/execution-metrics.md +99 -0
  53. package/src/gdskills/bundled/rules/core/frontend-assistant.mdc +40 -0
  54. package/src/gdskills/bundled/rules/core/git-rules.mdc +37 -0
  55. package/src/gdskills/bundled/rules/core/gproject-contracts.mdc +198 -0
  56. package/src/gdskills/bundled/rules/core/implementation-doc-mandate.mdc +149 -0
  57. package/src/gdskills/bundled/rules/core/implementation-plans.mdc +58 -0
  58. package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +221 -0
  59. package/src/gdskills/bundled/rules/core/mobx-store-template.mdc +561 -0
  60. package/src/gdskills/bundled/rules/core/model-selection.mdc +53 -0
  61. package/src/gdskills/bundled/rules/core/nestjs-dto.mdc +50 -0
  62. package/src/gdskills/bundled/rules/core/playwright-testing.mdc +321 -0
  63. package/src/gdskills/bundled/rules/core/requirements-management.mdc +35 -0
  64. package/src/gdskills/bundled/rules/core/requirements-package-standard.mdc +103 -0
  65. package/src/gdskills/bundled/rules/core/review-agent-profile.mdc +49 -0
  66. package/src/gdskills/bundled/rules/core/review-strict-profile.mdc +44 -0
  67. package/src/gdskills/bundled/rules/core/rule-management-workflow.mdc +62 -0
  68. package/src/gdskills/bundled/rules/core/security-baseline.mdc +155 -0
  69. package/src/gdskills/bundled/rules/core/shared-definitions.mdc +79 -0
  70. package/src/gdskills/bundled/rules/core/skill-lifecycle.mdc +55 -0
  71. package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +88 -0
  72. package/src/gdskills/bundled/rules/core/solid-principles.mdc +149 -0
  73. package/src/gdskills/bundled/rules/core/storybook-guidelines.mdc +36 -0
  74. package/src/gdskills/bundled/rules/core/subagent-context-construction.md +107 -0
  75. package/src/gdskills/bundled/rules/core/subagent-status-protocol.md +169 -0
  76. package/src/gdskills/bundled/rules/core/tdd-workflow.mdc +96 -0
  77. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.codex.md +47 -0
  78. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.cursor.md +55 -0
  79. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.md +352 -0
  80. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.opencode.md +39 -0
  81. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.zed.md +29 -0
  82. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.codex.md +567 -0
  83. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.cursor.md +567 -0
  84. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +655 -0
  85. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.opencode.md +567 -0
  86. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.zed.md +567 -0
  87. package/src/gdskills/bundled/skills/orchestration/context-collector/input-contract.schema.json +134 -0
  88. package/src/gdskills/bundled/skills/orchestration/context-collector/orchestrator-prompt.md +183 -0
  89. package/src/gdskills/bundled/skills/orchestration/context-collector/output-contract.schema.json +208 -0
  90. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.codex.md +1412 -0
  91. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.cursor.md +1412 -0
  92. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.detail.md +735 -0
  93. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +468 -0
  94. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.opencode.md +1412 -0
  95. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.zed.md +1412 -0
  96. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/analysis-request.md +62 -0
  97. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/analysis-request.template.md +79 -0
  98. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/input-contract.schema.json +247 -0
  99. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/orchestrator-prompt.md +362 -0
  100. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/output-contract.schema.json +87 -0
  101. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.codex.md +105 -0
  102. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.cursor.md +105 -0
  103. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +165 -0
  104. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +379 -0
  105. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/input-contract.schema.json +33 -0
  106. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/output-contract.schema.json +41 -0
  107. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.codex.md +307 -0
  108. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.cursor.md +307 -0
  109. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.md +373 -0
  110. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.opencode.md +307 -0
  111. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.zed.md +307 -0
  112. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/input-contract.schema.json +130 -0
  113. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/issue-request.template.md +50 -0
  114. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/orchestrator-prompt.md +155 -0
  115. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/output-contract.schema.json +61 -0
  116. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.codex.md +365 -0
  117. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.cursor.md +365 -0
  118. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +373 -0
  119. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.opencode.md +365 -0
  120. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.zed.md +365 -0
  121. package/src/gdskills/bundled/skills/orchestration/job-documenter/input-contract.schema.json +55 -0
  122. package/src/gdskills/bundled/skills/orchestration/job-documenter/output-contract.schema.json +58 -0
  123. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.codex.md +1701 -0
  124. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.cursor.md +1701 -0
  125. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +1734 -0
  126. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.opencode.md +1701 -0
  127. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.zed.md +1701 -0
  128. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/input-contract.schema.json +188 -0
  129. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/orchestrator-prompt.md +179 -0
  130. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/output-contract.schema.json +103 -0
  131. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/state.schema.json +164 -0
  132. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.codex.md +395 -0
  133. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.cursor.md +395 -0
  134. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +556 -0
  135. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.opencode.md +395 -0
  136. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.zed.md +395 -0
  137. package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +204 -0
  138. package/src/gdskills/bundled/skills/orchestration/task-implementer/orchestrator-prompt.md +206 -0
  139. package/src/gdskills/bundled/skills/orchestration/task-implementer/output-contract.schema.json +51 -0
  140. package/src/gdskills/bundled/skills/orchestration/task-implementer/task-request.template.md +111 -0
  141. package/src/gdskills/bundled/skills/planning/autodoc-analyst/SKILL.md +163 -0
  142. package/src/gdskills/bundled/skills/planning/autodoc-architect/SKILL.md +161 -0
  143. package/src/gdskills/bundled/skills/planning/autodoc-assembler/SKILL.md +128 -0
  144. package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +321 -0
  145. package/src/gdskills/bundled/skills/planning/autodoc-scanner/SKILL.md +166 -0
  146. package/src/gdskills/bundled/skills/planning/autodoc-writer/SKILL.md +253 -0
  147. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.claude.md +46 -0
  148. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.codex.md +90 -0
  149. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.cursor.md +90 -0
  150. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.md +90 -0
  151. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +33 -0
  152. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +33 -0
  153. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +190 -0
  154. package/src/gdskills/bundled/skills/planning/docpack-orchestrator/SKILL.md +142 -0
  155. package/src/gdskills/bundled/skills/planning/docpack-orchestrator/input-contract.schema.json +31 -0
  156. package/src/gdskills/bundled/skills/planning/docpack-orchestrator/output-contract.schema.json +31 -0
  157. package/src/gdskills/bundled/skills/planning/docpack-review/SKILL.md +80 -0
  158. package/src/gdskills/bundled/skills/planning/docpack-review/input-contract.schema.json +20 -0
  159. package/src/gdskills/bundled/skills/planning/docpack-review/output-contract.schema.json +36 -0
  160. package/src/gdskills/bundled/skills/planning/interview/SKILL.codex.md +181 -0
  161. package/src/gdskills/bundled/skills/planning/interview/SKILL.cursor.md +181 -0
  162. package/src/gdskills/bundled/skills/planning/interview/SKILL.md +187 -0
  163. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.claude.md +94 -0
  164. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.codex.md +99 -0
  165. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.cursor.md +99 -0
  166. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.md +105 -0
  167. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +33 -0
  168. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +33 -0
  169. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +237 -0
  170. package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +33 -0
  171. package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +33 -0
  172. package/src/gdskills/bundled/skills/planning/planner/SKILL.md +190 -0
  173. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.codex.md +193 -0
  174. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.cursor.md +193 -0
  175. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.md +193 -0
  176. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.opencode.md +193 -0
  177. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.zed.md +193 -0
  178. package/src/gdskills/bundled/skills/planning/prd-creator/input-contract.schema.json +63 -0
  179. package/src/gdskills/bundled/skills/planning/prd-creator/output-contract.schema.json +175 -0
  180. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +31 -0
  181. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +31 -0
  182. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +153 -0
  183. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +32 -0
  184. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +32 -0
  185. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +166 -0
  186. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +44 -0
  187. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +44 -0
  188. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +243 -0
  189. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +43 -0
  190. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +43 -0
  191. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +193 -0
  192. package/src/gdskills/bundled/skills/platform/agent-entrypoint-distiller/SKILL.md +47 -0
  193. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.codex.md +87 -0
  194. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.cursor.md +87 -0
  195. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.md +87 -0
  196. package/src/gdskills/bundled/skills/platform/hookify/SKILL.codex.md +100 -0
  197. package/src/gdskills/bundled/skills/platform/hookify/SKILL.cursor.md +100 -0
  198. package/src/gdskills/bundled/skills/platform/hookify/SKILL.md +100 -0
  199. package/src/gdskills/bundled/skills/quality/changelog/SKILL.claude.md +45 -0
  200. package/src/gdskills/bundled/skills/quality/changelog/SKILL.codex.md +84 -0
  201. package/src/gdskills/bundled/skills/quality/changelog/SKILL.cursor.md +84 -0
  202. package/src/gdskills/bundled/skills/quality/changelog/SKILL.md +84 -0
  203. package/src/gdskills/bundled/skills/quality/commit/SKILL.codex.md +66 -0
  204. package/src/gdskills/bundled/skills/quality/commit/SKILL.cursor.md +66 -0
  205. package/src/gdskills/bundled/skills/quality/commit/SKILL.md +66 -0
  206. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.claude.md +40 -0
  207. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.codex.md +66 -0
  208. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.cursor.md +66 -0
  209. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.md +66 -0
  210. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.claude.md +45 -0
  211. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.codex.md +81 -0
  212. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.cursor.md +81 -0
  213. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.md +81 -0
  214. package/src/gdskills/bundled/skills/quality/deploy/SKILL.claude.md +42 -0
  215. package/src/gdskills/bundled/skills/quality/deploy/SKILL.codex.md +70 -0
  216. package/src/gdskills/bundled/skills/quality/deploy/SKILL.cursor.md +70 -0
  217. package/src/gdskills/bundled/skills/quality/deploy/SKILL.md +70 -0
  218. package/src/gdskills/bundled/skills/quality/metaproject-security/SKILL.md +103 -0
  219. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.claude.md +48 -0
  220. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.codex.md +83 -0
  221. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.cursor.md +83 -0
  222. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.md +83 -0
  223. package/src/gdskills/bundled/skills/quality/pr/SKILL.codex.md +75 -0
  224. package/src/gdskills/bundled/skills/quality/pr/SKILL.cursor.md +75 -0
  225. package/src/gdskills/bundled/skills/quality/pr/SKILL.md +75 -0
  226. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.codex.md +364 -0
  227. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.cursor.md +295 -0
  228. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.md +378 -0
  229. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.opencode.md +364 -0
  230. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.zed.md +38 -0
  231. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/input-contract.schema.json +53 -0
  232. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/output-contract.schema.json +46 -0
  233. package/src/gdskills/bundled/skills/quality/push/SKILL.codex.md +52 -0
  234. package/src/gdskills/bundled/skills/quality/push/SKILL.cursor.md +52 -0
  235. package/src/gdskills/bundled/skills/quality/push/SKILL.md +52 -0
  236. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.claude.md +40 -0
  237. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.codex.md +61 -0
  238. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.cursor.md +61 -0
  239. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.md +61 -0
  240. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.claude.md +30 -0
  241. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.codex.md +75 -0
  242. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.cursor.md +75 -0
  243. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.md +75 -0
  244. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.codex.md +64 -0
  245. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.cursor.md +74 -0
  246. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.md +339 -0
  247. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.opencode.md +48 -0
  248. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.zed.md +44 -0
  249. package/src/gdskills/bundled/skills/quality/tests-creator/input-contract.schema.json +121 -0
  250. package/src/gdskills/bundled/skills/quality/tests-creator/output-contract.schema.json +127 -0
  251. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.codex.md +204 -0
  252. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.cursor.md +204 -0
  253. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +203 -0
  254. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.opencode.md +204 -0
  255. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.zed.md +204 -0
  256. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.codex.md +209 -0
  257. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.cursor.md +209 -0
  258. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.md +208 -0
  259. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.opencode.md +209 -0
  260. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.zed.md +209 -0
  261. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.codex.md +263 -0
  262. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.cursor.md +263 -0
  263. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +258 -0
  264. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.opencode.md +263 -0
  265. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.zed.md +263 -0
  266. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.codex.md +175 -0
  267. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.cursor.md +175 -0
  268. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +168 -0
  269. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.opencode.md +175 -0
  270. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.zed.md +175 -0
  271. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +360 -0
  272. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +337 -0
  273. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +477 -0
  274. package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +93 -0
  275. package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +119 -0
  276. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +595 -0
  277. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +144 -0
  278. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +519 -0
  279. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +323 -0
  280. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +927 -0
  281. package/src/gdskills/bundled/skills/review/review-orchestrator/input-contract.schema.json +153 -0
  282. package/src/gdskills/bundled/skills/review/review-orchestrator/output-contract.schema.json +77 -0
  283. package/src/gdskills/bundled/skills/review/review-orchestrator/review-context.schema.json +389 -0
  284. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-finding.schema.json +189 -0
  285. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +241 -0
  286. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +344 -0
  287. package/src/gdskills/bundled/skills/review/review-pr-feedback/SKILL.md +327 -0
  288. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +348 -0
  289. package/src/gdskills/bundled/skills/review/review-strict/SKILL.md +328 -0
  290. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +343 -0
  291. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +134 -0
  292. package/src/gdskills/bundled/skills/shared/git-merge-base.md +33 -0
  293. package/src/gdskills/contracts/agent-event.schema.json +32 -0
  294. package/src/gdskills/contracts/orchestrator-state.schema.json +58 -0
  295. package/src/gdskills/contracts/review-finding.schema.json +59 -0
  296. package/src/gdskills/contracts/subagent-dispatch.schema.json +123 -0
  297. package/src/gdskills/contracts/subagent-result.schema.json +136 -0
@@ -0,0 +1,344 @@
1
+ ---
2
+ name: review-performance
3
+ description: "Use when a performance review is requested, checking for N+1 queries, unnecessary re-renders, memory leaks, missing indexes, large bundle imports, and synchronous blocking in changed code. NOT for security, logic correctness, style, or architecture."
4
+ triggers:
5
+ - "review performance"
6
+ - "performance review"
7
+ - "check for perf issues"
8
+ - "perf review"
9
+ - "check N+1"
10
+ - dispatched by review-orchestrator
11
+ metadata:
12
+ author: "MrCipherSmith"
13
+ version: "1.0.0"
14
+ category: "review"
15
+ license: "MIT"
16
+ compatibility: "cursor,codex,zed,opencode,claude"
17
+ ---
18
+
19
+ # Review: Performance (Code-Level Bottlenecks)
20
+
21
+ ## Purpose
22
+
23
+ Finds real, code-level performance problems introduced in the changed code of the current branch. Covers N+1 database queries, unnecessary React re-renders, missing memoization in hot paths, memory leaks, large bundle imports, synchronous blocking in async contexts, missing pagination, and redundant API calls.
24
+
25
+ This skill focuses on **measurable or high-likelihood bottlenecks** only. Premature optimization, hypothetical slowness, and style preferences are out of scope.
26
+
27
+ ---
28
+
29
+ ## Input Contract
30
+
31
+ | Field | Required | Description |
32
+ |-------|----------|-------------|
33
+ | Branch / diff range | No | Defaults to merge-base..HEAD + uncommitted changes |
34
+ | Explicit commit hash/range | No | Review only that range when provided |
35
+ | `JOB_NAME` | No | Job name when dispatched by orchestrator |
36
+ | `CONTEXT_PATH` | No | Path to context doc when dispatched by orchestrator |
37
+
38
+ ---
39
+
40
+ ## Scope Boundaries
41
+
42
+ | Concern | This skill | Use instead |
43
+ |---------|-----------|-------------|
44
+ | N+1 database queries, missing eager loading | YES | — |
45
+ | Unnecessary React re-renders, missing memo/useCallback/useMemo | YES | — |
46
+ | Expensive computations in hot paths (render loops, tight loops) | YES | — |
47
+ | Missing database indexes (detectable from query patterns) | YES | — |
48
+ | Memory leaks: unbounded collections, missing cleanup, forgotten subscriptions | YES | — |
49
+ | Large bundle imports vs. named imports | YES | — |
50
+ | Synchronous blocking in async contexts | YES | — |
51
+ | Missing pagination on large datasets | YES | — |
52
+ | Redundant API calls (same data fetched multiple times) | YES | — |
53
+ | MobX: manual derived state in renders instead of @computed | YES | — |
54
+ | Security vulnerabilities | NO | `review-security-code` |
55
+ | Logic correctness, race conditions | NO | `review-logic` |
56
+ | Architecture decisions | NO | `review-architecture` |
57
+ | Code style, naming | NO | `code-style-review` |
58
+ | npm/bun dependency vulnerabilities, bundle analysis tooling | NO | `security-audit` / `perf-check` |
59
+
60
+ ---
61
+
62
+ ## Scope Detection
63
+
64
+ See shared script: `skills/shared/git-merge-base.md`
65
+
66
+ Run the script from that file to determine `MERGE_BASE` (`BASE_SHA`) and `SCOPE` before proceeding.
67
+
68
+ ### Commands to collect the review slice
69
+
70
+ ```bash
71
+ git status
72
+ git log --oneline "${BASE_SHA}..HEAD"
73
+ git diff --stat --name-status "${BASE_SHA}..HEAD"
74
+ git diff "${BASE_SHA}..HEAD"
75
+
76
+ # Include uncommitted changes (default mode):
77
+ git diff --stat --name-status "${BASE_SHA}"
78
+ git diff "${BASE_SHA}"
79
+ git ls-files --others --exclude-standard
80
+ ```
81
+
82
+ For explicit hash/range mode:
83
+
84
+ ```bash
85
+ git diff --stat --name-status <FROM_SHA>..<TO_SHA>
86
+ git diff <FROM_SHA>..<TO_SHA>
87
+ ```
88
+
89
+ ---
90
+
91
+ ## Review Checklist
92
+
93
+ Work through every category below for each changed file. Tie every finding to a concrete line in the diff. For each finding, state **the hot path or execution frequency** that makes it a real problem — without that, it is INFO only.
94
+
95
+ ### 1. N+1 Database Queries
96
+
97
+ **Detection patterns:**
98
+ - [ ] Loop or `.map()` containing a DB query, repository call, or Prisma/TypeORM find
99
+ - [ ] `for (const item of items) { await repo.findOne(...) }` — classic N+1
100
+ - [ ] ORM relation accessed without eager loading inside iteration: `order.items` where `items` is a lazy relation loaded inside a loop
101
+ - [ ] GraphQL resolver loading a child relation per parent without a DataLoader
102
+
103
+ **Correct patterns to confirm:**
104
+ - Prisma: `include` / `select` on the parent query to fetch relations in one round trip
105
+ - TypeORM: `createQueryBuilder().leftJoinAndSelect()` or `findOptions.relations`
106
+ - MikroORM: `populate` option
107
+ - Raw SQL: `JOIN` rather than a secondary query per row
108
+
109
+ **Hot path requirement:** State whether this runs per HTTP request, per list item render, per job iteration, etc.
110
+
111
+ ### 2. Unnecessary React Re-renders
112
+
113
+ **Detection patterns:**
114
+ - [ ] Object or array literal created inline in JSX: `<Component options={{ key: val }} />` — new reference every render
115
+ - [ ] Arrow function created inline as prop: `<Button onClick={() => store.doX()} />` — new reference every render
116
+ - [ ] Large expensive computation performed directly in render body (not in useMemo)
117
+ - [ ] Context value object created inline without useMemo: `<MyContext.Provider value={{ a, b }}>` — every parent render triggers all consumers
118
+ - [ ] Component receiving a new object/array reference from props despite same data (parent not memoizing)
119
+
120
+ **When memo IS justified (flag absence):**
121
+ - [ ] Pure child component receiving stable props but not wrapped in `React.memo` — only flag if the parent re-renders frequently (e.g., on keypress, scroll, animation frame)
122
+ - [ ] `useCallback` absent for a callback passed to a `React.memo` child — only flag if the child is expensive
123
+
124
+ **MobX note:** With MobX + observer, `useCallback`/`useMemo` are rarely needed. Do NOT flag their absence unless there is concrete evidence of re-render cost. Flag only missing `observer()` (see `review-frontend` for full MobX checklist).
125
+
126
+ ### 3. Expensive Computations in Hot Paths
127
+
128
+ - [ ] Sorting, filtering, or reducing a large array inside a render function without `useMemo`
129
+ - [ ] Deep clone (`JSON.parse(JSON.stringify(...))`) inside a loop or on every render
130
+ - [ ] Regex compilation inside a loop — should be compiled once outside: `const RE = /pattern/`
131
+ - [ ] `Object.keys().reduce()` or similar aggregation recalculated on every render instead of being derived in store or memoized
132
+ - [ ] Recursive computation without memoization called in a loop
133
+
134
+ **Hot path requirement:** An expensive computation is only a `major` finding if it runs at render time or in a tight loop. A one-time computation at load time is `info` at most.
135
+
136
+ ### 4. Missing Database Indexes
137
+
138
+ Detectable from query patterns in changed code (not from DB schema directly):
139
+
140
+ - [ ] New query filtering on a column that is not a primary key and not obviously indexed: `WHERE email = ?` without a unique constraint visible in the schema or migration
141
+ - [ ] `ORDER BY created_at DESC` on a table with potentially large row counts — `created_at` index not evident
142
+ - [ ] `LIKE '%term%'` — prefix wildcard prevents index use; flag as info with suggestion to use full-text search
143
+ - [ ] Foreign key column used in JOIN without an index (common ORM footgun)
144
+
145
+ **Evidence requirement:** Cannot confirm an index is missing without seeing the migration or schema. If schema is not in the diff, downgrade to `minor` and note that the reviewer should check the schema.
146
+
147
+ ### 5. Memory Leaks
148
+
149
+ **Event listeners and subscriptions:**
150
+ - [ ] `addEventListener` without matching `removeEventListener` in cleanup
151
+ - [ ] `setInterval` / `setTimeout` (recurring) without `clearInterval` / `clearTimeout` in cleanup
152
+ - [ ] RxJS `subscribe()` without `unsubscribe()` stored in a disposable or returned from useEffect cleanup
153
+ - [ ] MobX `autorun` / `reaction` / `when` without disposer called in `dispose()` (see `review-frontend` for full checklist)
154
+ - [ ] WebSocket or SSE connection opened without close in cleanup
155
+
156
+ **React useEffect:**
157
+ - [ ] `useEffect` that creates a subscription, timer, or async operation but returns no cleanup function
158
+
159
+ **Unbounded collections:**
160
+ - [ ] Map, Set, or array that grows on every event/request with no eviction, max size, or TTL
161
+ - [ ] Cache object that accumulates entries indefinitely: `const cache = {}; cache[key] = value`
162
+ - [ ] Growing error log array or history buffer without a max length
163
+
164
+ **Node.js / Server:**
165
+ - [ ] `EventEmitter` with `on()` inside a request handler — new listener per request, no removal
166
+ - [ ] `process.on('uncaughtException', ...)` registered multiple times (inside a function called per request)
167
+
168
+ ### 6. Large Bundle Imports
169
+
170
+ - [ ] Default import of a large library when only one function is needed: `import _ from 'lodash'` instead of `import debounce from 'lodash/debounce'`
171
+ - [ ] `import * as Icons from '@mui/icons-material'` — imports entire icon tree
172
+ - [ ] `import { something } from 'date-fns'` — this is correct (tree-shakeable); flag `import dateFns from 'date-fns'`
173
+ - [ ] Side-effect imports pulling in large polyfills unnecessarily
174
+ - [ ] Dynamic `import()` inside a render function or tight loop (re-creates module promise)
175
+
176
+ **Evidence requirement:** Only flag if the library is known to be large (lodash, moment, antd, @mui). For unfamiliar libraries, flag as `info`.
177
+
178
+ ### 7. Synchronous Blocking in Async Contexts
179
+
180
+ - [ ] `fs.readFileSync` / `fs.writeFileSync` inside a request handler or async function
181
+ - [ ] `child_process.execSync` in a Node.js server handler
182
+ - [ ] CPU-intensive synchronous computation (sorting large arrays, JSON.parse of large payloads) in an Express/NestJS handler without offloading to a worker
183
+ - [ ] `new Promise(resolve => setTimeout(resolve, N))` — artificial sleep in a server handler
184
+ - [ ] Synchronous DB client used in an async context (e.g., `better-sqlite3` in an Express handler serving concurrent requests)
185
+
186
+ ### 8. Missing Pagination
187
+
188
+ - [ ] Repository query with no `take`/`limit` on a collection that could grow (user-generated content, logs, history)
189
+ - [ ] `findAll()` / `find({})` with no limit on a table mentioned as potentially large in context
190
+ - [ ] API endpoint returning an array without `page`/`cursor`/`limit` parameters when the underlying data is unbounded
191
+
192
+ **Evidence requirement:** Only flag as `major` if the dataset is described as large or clearly unbounded. For small controlled datasets, flag as `minor`.
193
+
194
+ ### 9. Redundant API Calls
195
+
196
+ - [ ] Same endpoint fetched multiple times in the same render cycle or component tree without caching
197
+ - [ ] Two sibling components each fetching the same data independently instead of sharing state / lifting to parent store
198
+ - [ ] `useEffect` with a dependency array that triggers refetch on every render due to non-primitive dependency (object identity)
199
+ - [ ] Polling without deduplication when multiple component instances are mounted
200
+
201
+ ### 10. MobX: Derived State Computed in Renders
202
+
203
+ - [ ] Value derived from observables computed inline in a component: `const total = store.items.reduce(...)` — should be `@computed get total()` in the store
204
+ - [ ] Filtered list recalculated in render: `store.items.filter(x => x.active)` — should be a `@computed`
205
+ - [ ] Conditional format derived from observable in render instead of a computed getter
206
+
207
+ ---
208
+
209
+ ## Iron Laws
210
+
211
+ 1. **Only flag real performance issues, not premature optimization.** A pattern "that could be slow" without a concrete hot path or execution frequency is `info` only.
212
+ 2. **Every `blocker` or `major` finding MUST cite the specific hot path or frequency that makes it a real problem.** "Runs on every keystroke", "called per list item (N=potentially thousands)", "executes on every render of a high-frequency parent" — be specific.
213
+ 3. **"Might be slow" without evidence = INFO only, never blocker.** If you cannot articulate the execution frequency and expected data scale, do not escalate.
214
+ 4. **Do not flag patterns outside the diff.** Review only changed code. Legacy issues outside the diff are `info` at most, with a note to track separately.
215
+
216
+ ---
217
+
218
+ ## Output Contract
219
+
220
+ ### Class scope — required for `blocker` and `major`
221
+
222
+ Every `blocker` and `major` finding must carry `class_scope`: **every** site that
223
+ holds the shape you found, and **how you enumerated them** — the grep or query
224
+ you ran, or the guard that derives the set.
225
+
226
+ A finding anchored to one `file:line` is a claim about one site. The recorded
227
+ history of this repository is that a fix then repairs that site and leaves its
228
+ siblings: one writer of five, one operator instruction of four, six readers of
229
+ eight. Each was found by the *next* review round, which is why reviews here have
230
+ run to seven and four rounds instead of one.
231
+
232
+ ```yaml
233
+ class_scope:
234
+ sites: ["src/lib/shell-config.ts:60", "src/session/store.ts:133"]
235
+ enumeration_method: "grep for the config-path resolvers; 7 writers, 2 unguarded"
236
+ ```
237
+
238
+ "I checked the others" is not an enumeration method. A single-entry `sites` list
239
+ is a claim that the class has exactly one member — make it deliberately, because
240
+ `review-finding.schema.json` accepts it and the next round tests it.
241
+
242
+ `minor` and `info` may omit it: enumerating the class for every low-severity
243
+ observation is theatre, not rigour.
244
+
245
+ ### Status line (first line of response)
246
+
247
+ ```
248
+ STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
249
+ ```
250
+
251
+ - `DONE` — review complete, findings (if any) are below
252
+ - `DONE_WITH_CONCERNS` — one or more `blocker` or `major` findings found
253
+ - `NEEDS_CONTEXT` — cannot assess severity without additional context (e.g., expected dataset size, render frequency not determinable from diff alone)
254
+ - `BLOCKED` — cannot run git commands or access the repo
255
+
256
+ ### Report structure
257
+
258
+ ```markdown
259
+ STATUS: DONE_WITH_CONCERNS
260
+
261
+ ## Performance Review
262
+
263
+ ### Scope
264
+ - Branch: `<BRANCH>`
265
+ - Parent ref: `<PARENT>`
266
+ - Merge-base: `<BASE_SHA>`
267
+ - Scope mode: default-with-uncommitted | explicit-hash-range
268
+ - Changed files reviewed: <N>
269
+
270
+ ### Summary
271
+ - Blockers: <N>
272
+ - Major: <N>
273
+ - Minor: <N>
274
+ - Info: <N>
275
+
276
+ ### Findings
277
+
278
+ ### [F-001] Title
279
+ - **Severity**: blocker | major | minor | info
280
+ - **File**: path/to/file.ts:line
281
+ - **Hot path**: where/how often this code executes (render, per-request, per-item in N-length loop, etc.)
282
+ - **Problem**: what is wrong in the code
283
+ - **Why it matters**: concrete impact (latency spike, memory growth, render thrash, etc.)
284
+ - **Fix**: concrete suggestion
285
+ - **Patch** (optional):
286
+ ```diff
287
+ - slow line
288
+ + optimized line
289
+ ```
290
+
291
+ ### Clean Areas
292
+ [List categories with no findings, confirming they were checked]
293
+ ```
294
+
295
+ ### Severity definitions
296
+
297
+ | Severity | Meaning |
298
+ |----------|---------|
299
+ | `blocker` | Demonstrable performance regression on a critical path; will noticeably degrade UX or server capacity under expected load |
300
+ | `major` | High-likelihood bottleneck on a frequently executed path; strongly recommended before merge |
301
+ | `minor` | Inefficiency worth fixing but not on a hot path; can ship, should be tracked |
302
+ | `info` | Pattern worth noting; no clear hot path or measurable impact in current code |
303
+
304
+ ---
305
+
306
+ ## Red Flags Table
307
+
308
+ Stop and re-read these rules if you are thinking:
309
+
310
+ | Rationalization | Why it's wrong |
311
+ |---|---|
312
+ | "This loop iterates over user data, so N+1 is obviously a problem" | State the expected N and query cost; "user data" is not self-evidently large |
313
+ | "I'll flag this as major because it looks slow" | Looking slow is not a hot path; cite the execution context |
314
+ | "Missing useMemo here is a performance issue" | useMemo has overhead; only flag when the computation is measurably expensive or the component re-renders at high frequency |
315
+ | "I'll add a minor finding for every lodash default import" | Correct — but only flag if the library is large and the import is demonstrably not tree-shaken |
316
+ | "The dataset could grow large, so I'll call it a blocker" | "Could grow" = minor or info; known to be large = major or blocker |
317
+ | "Skipping the hot-path citation to keep the finding concise" | Iron Law 2: hot path is mandatory for blocker/major; omitting it means downgrading to info |
318
+
319
+ ---
320
+
321
+ ## Job Context Awareness
322
+
323
+ When dispatched by `job-orchestrator` or `review-orchestrator` as part of a job pipeline, the prompt MAY include:
324
+
325
+ ```
326
+ JOB_NAME: <job-name>
327
+ CONTEXT_PATH: <JOBS_ROOT>/<job-name>/ai/context.md
328
+ ```
329
+
330
+ If provided and the file exists, read the context document before starting the review. Use it to:
331
+ - Understand expected dataset sizes and traffic patterns documented for the project
332
+ - Identify ORM and caching strategies already in place (avoid flagging already-cached paths)
333
+ - Understand which MobX patterns and React memo conventions the project follows
334
+ - Avoid flagging intentional trade-offs (e.g., a known small dataset where pagination is explicitly deferred)
335
+
336
+ If the file does not exist or is not provided, proceed normally — context is optional and non-blocking.
337
+
338
+
339
+ ## Orchestrated Review Contract
340
+
341
+ When dispatched by `review-orchestrator`, follow the provided `reviewer-input.schema.json` payload. Return a `REVIEW_RESULT` object compatible with `skills/review-orchestrator/reviewer-finding.schema.json`, then a concise markdown summary. Keep findings evidence-based, include concrete `suggested_fix` for every blocker/major, and return `NEEDS_CONTEXT` instead of guessing when required context is missing.
342
+
343
+ ---
344
+
@@ -0,0 +1,327 @@
1
+ ---
2
+ name: review-pr-feedback
3
+ description: |
4
+ Use when: a developer has received PR review comments and wants to understand them,
5
+ act on them, or extract patterns from them. Covers "analyze PR comments",
6
+ "review PR feedback", "what did reviewers say", "parse PR #N", "explain PR comments",
7
+ or dispatched by review-orchestrator when a PR URL is provided.
8
+ NOT for: reviewing code directly — this skill reads human or bot PR feedback and
9
+ makes it actionable. To review code, use the domain review skills.
10
+ version: "1.0.0"
11
+ triggers:
12
+ - "analyze PR comments"
13
+ - "review PR feedback"
14
+ - "what did reviewers say"
15
+ - "parse PR #N"
16
+ - "explain PR comments"
17
+ - "PR feedback"
18
+ metadata:
19
+ author: "MrCipherSmith"
20
+ version: "1.0.0"
21
+ category: "review"
22
+ license: "MIT"
23
+ compatibility: "cursor,codex,zed,opencode,claude"
24
+ ---
25
+
26
+ # Review — PR Feedback Analyzer
27
+
28
+ Analyzes existing GitHub PR review comments from human reviewers or bots. Parses,
29
+ explains, and prioritizes reviewer feedback so developers know exactly what to address
30
+ and in what order. This skill does **not** review code itself — it interprets what others said.
31
+
32
+ ---
33
+
34
+ ## Workflow
35
+
36
+ ```
37
+ review-pr-feedback Progress:
38
+ - [ ] Step 1: Read Job Context (if CONTEXT_PATH provided)
39
+ - [ ] Step 2: Parse PR URL or identifier
40
+ - [ ] Step 3: Fetch review comments, general comments, and review verdicts via GitHub
41
+ - [ ] Step 4: Group comments by author
42
+ - [ ] Step 5: Classify comment types (blocker intent / suggestion / question / nitpick)
43
+ - [ ] Step 6: Explain each comment + suggest concrete fix with code example
44
+ - [ ] Step 7: Detect senior/boss reviewer comments — offer pattern extraction (with user consent)
45
+ - [ ] Step 8: Emit structured report with action items checklist
46
+ ```
47
+
48
+ ---
49
+
50
+ ## Input Contract
51
+
52
+ | Field | Type | Required | Description |
53
+ |-------|------|----------|-------------|
54
+ | `pr_url` | string | YES | GitHub PR URL or shorthand identifier |
55
+ | `context_doc` | string | no | Path to job context document (e.g., `<JOBS_ROOT>/<job>/ai/context.md`). |
56
+
57
+ ---
58
+
59
+ ## Step 1: Job Context
60
+
61
+ If `context_doc` is provided and the file exists, read it before fetching PR comments.
62
+
63
+ Context path convention: `<JOBS_ROOT>/<JOB_NAME>/ai/context.md`
64
+
65
+ Use the context to:
66
+ - Understand the codebase's conventions and chosen libraries
67
+ - Interpret reviewer comments more accurately (e.g., "use the store" means the MobX pattern)
68
+ - Identify whether a reviewer's concern is already addressed by project convention
69
+
70
+ If absent, proceed without context — it is optional and non-blocking.
71
+
72
+ ---
73
+
74
+ ## Step 2: Parse PR URL
75
+
76
+ Extract `owner`, `repo`, and `pullNumber` from the provided identifier.
77
+
78
+ Accepted formats:
79
+ - `https://github.com/owner/repo/pull/123` → owner=`owner`, repo=`repo`, pullNumber=`123`
80
+ - `https://github.com/owner/repo/issues/123` → treat as PR if context confirms it
81
+ - `owner/repo#123` → owner=`owner`, repo=`repo`, pullNumber=`123`
82
+ - `#123` (when repository context is known from git remote) → resolve owner/repo from `git remote get-url origin`
83
+
84
+ If the URL cannot be parsed, respond with `STATUS: BLOCKED` and state the parsing failure.
85
+
86
+ ---
87
+
88
+ ## Step 3: Fetch Comments via GitHub
89
+
90
+ Use GitHub MCP tools or `gh` CLI. Prefer MCP when available.
91
+
92
+ **Line-specific review comments:**
93
+ ```bash
94
+ gh api repos/{owner}/{repo}/pulls/{pullNumber}/comments
95
+ ```
96
+
97
+ **General PR / issue-level comments:**
98
+ ```bash
99
+ gh api repos/{owner}/{repo}/issues/{pullNumber}/comments
100
+ ```
101
+
102
+ **Review verdicts (APPROVE / REQUEST_CHANGES / COMMENT):**
103
+ ```bash
104
+ gh api repos/{owner}/{repo}/pulls/{pullNumber}/reviews
105
+ ```
106
+
107
+ Collect all three. If any fetch fails, note it in the output and continue with what was retrieved.
108
+
109
+ For each comment, extract:
110
+ - `author.login`
111
+ - `body` (comment text)
112
+ - `path` (file path, if line-specific)
113
+ - `line` or `original_line` (line number, if line-specific)
114
+ - `created_at`
115
+ - `diff_hunk` (surrounding code context, if available)
116
+
117
+ ---
118
+
119
+ ## Step 4: Group by Author
120
+
121
+ Organize all comments under each author, distinguishing line-specific from general comments:
122
+
123
+ ```markdown
124
+ ## Author: <login> (N line comments, M general comments) — Verdict: APPROVE | REQUEST_CHANGES | COMMENT
125
+
126
+ ### Line-specific
127
+ - `path/to/file.ts:42` — "comment text"
128
+ - `path/to/file.ts:78` — "comment text"
129
+
130
+ ### General
131
+ - "general comment text"
132
+ ```
133
+
134
+ ---
135
+
136
+ ## Step 5: Classify Comment Intent
137
+
138
+ For each comment, classify intent before explaining:
139
+
140
+ | Intent class | Description | Default severity mapping |
141
+ |---|---|---|
142
+ | `blocker` | Reviewer explicitly blocks or says "must fix", "won't approve until..." | blocker |
143
+ | `concern` | Reviewer raises a correctness, safety, or design issue without explicitly blocking | major |
144
+ | `suggestion` | Reviewer offers an improvement without implying it must be done | minor |
145
+ | `nitpick` | Reviewer flags style, wording, naming — usually low stakes | info |
146
+ | `question` | Reviewer asks for clarification; may hide a concern | classify after reading carefully |
147
+ | `praise` | Positive comment — no action required | — |
148
+
149
+ If a `question` contains an implied concern ("why did you use X here?" where X is suboptimal), treat it as `concern`.
150
+
151
+ ---
152
+
153
+ ## Step 6: Explain and Suggest Fix
154
+
155
+ For each comment:
156
+
157
+ ```markdown
158
+ ### [C-001] <Short title summarizing the comment>
159
+
160
+ - **Author**: <login>
161
+ - **Severity**: blocker | major | minor | info
162
+ - **File**: path/to/file.ts:line (or "General")
163
+ - **Reviewer said**: > verbatim quote of the comment
164
+ - **Explanation**: What the reviewer means, the underlying concern, the type of issue
165
+ (e.g., architecture / type safety / naming / missing test / performance / style)
166
+ - **Suggested fix**:
167
+ ```typescript
168
+ // Corrected code example
169
+ ```
170
+ - **Confidence**: High | Medium | Low
171
+ - High: reviewer's intent is clear and the fix is straightforward
172
+ - Medium: intent is clear but fix requires understanding more context
173
+ - Low: comment is ambiguous; two or more reasonable interpretations
174
+ ```
175
+
176
+ If confidence is Low, state both interpretations and ask the user which one applies.
177
+
178
+ ---
179
+
180
+ ## Step 7: Senior / Boss Reviewer Handling
181
+
182
+ **Detection**: if an author is identified as a senior or boss reviewer (by username, or by
183
+ review authority markers such as "REQUEST_CHANGES from `boss`"), trigger this flow:
184
+
185
+ 1. Notify the user: "This PR has comments from a senior reviewer (`<login>`)."
186
+ 2. **NEVER update rules, CLAUDE.md, or any configuration without explicit user consent.**
187
+ 3. Ask: "Should I analyze `<login>`'s comments for patterns and suggest updates to review rules?"
188
+ 4. If the user agrees:
189
+ - Identify recurring patterns in that reviewer's feedback (not one-off edge cases)
190
+ - Propose specific additions to `.metaproject/rules/core/code-review-boss-profile.mdc` or the relevant rule file
191
+ - Present the proposed changes to the user for approval before writing anything
192
+ - After approval, update the rule file and note it in the output
193
+ 5. Extract generalizable patterns only — not personal phrasing or one-off opinions
194
+
195
+ ---
196
+
197
+ ## Step 8: Action Items
198
+
199
+ At the end of the report, produce a prioritized checklist:
200
+
201
+ ```markdown
202
+ ## Action Items
203
+
204
+ ### Must address (blockers and concerns)
205
+ - [ ] [C-001] Fix DTO validation missing on `/users/update` endpoint — `src/users/users.controller.ts:42`
206
+ - [ ] [C-003] Add error handling to async `createOrder` method — `src/orders/orders.service.ts:87`
207
+
208
+ ### Consider (suggestions)
209
+ - [ ] [C-005] Extract magic number `3600` to named constant — `src/auth/auth.service.ts:15`
210
+
211
+ ### Optional / nitpicks
212
+ - [ ] [C-007] Rename `x` to `userId` for clarity — `src/users/users.service.ts:33`
213
+
214
+ ### Clarifications needed (ambiguous comments)
215
+ - [ ] [C-009] Unclear: reviewer asked "why not use the cache here?" — two interpretations, see finding
216
+ ```
217
+
218
+ ---
219
+
220
+ ## Output Contract
221
+
222
+ ```yaml
223
+ STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
224
+ summary: "N comments from N reviewers. Verdict: APPROVE | REQUEST_CHANGES | COMMENT. N blockers, N concerns."
225
+ action_items:
226
+ - "fix X in path/to/file.ts:42"
227
+ - "address question in path/to/file.ts:78"
228
+ rule_suggestions:
229
+ - "pattern: always validate DTOs at controller boundary" # only when senior reviewer patterns found
230
+ ```
231
+
232
+ Full markdown report structure:
233
+
234
+ ```markdown
235
+ # PR Feedback Analysis — <owner>/<repo>#<pullNumber>
236
+
237
+ ## Overview
238
+ - **PR**: `<title>`
239
+ - **Reviewers**: <comma-separated list>
240
+ - **Verdict**: APPROVE | REQUEST_CHANGES | COMMENT
241
+ - **Total comments**: N (line-specific: N, general: N)
242
+
243
+ ## Stats
244
+ - blocker: N
245
+ - major (concern): N
246
+ - minor (suggestion): N
247
+ - info (nitpick): N
248
+ - praise: N
249
+
250
+ ## By Author
251
+
252
+ ### <reviewer-login> (N comments — REQUEST_CHANGES)
253
+ <grouped findings for this author in C-NNN format>
254
+
255
+ ### <reviewer-login-2> (N comments — COMMENT)
256
+ <grouped findings>
257
+
258
+ ## Action Items
259
+
260
+ ### Must address
261
+ - [ ] [C-NNN] ...
262
+
263
+ ### Consider
264
+ - [ ] [C-NNN] ...
265
+
266
+ ### Optional
267
+ - [ ] [C-NNN] ...
268
+
269
+ ### Clarifications needed
270
+ - [ ] [C-NNN] ...
271
+
272
+ ## Rule Suggestions (if senior reviewer patterns found)
273
+ <only present if user agreed to pattern extraction>
274
+ - Pattern: ...
275
+ - Proposed rule update: ...
276
+ ```
277
+
278
+ ---
279
+
280
+ ## Scope Boundaries
281
+
282
+ | Concern | This skill | Use instead |
283
+ |---------|------------|-------------|
284
+ | Parsing and explaining existing PR comments | YES | — |
285
+ | Suggesting fixes for reviewer feedback | YES | — |
286
+ | Extracting reviewer patterns into rules (with consent) | YES | — |
287
+ | Reviewing the code in the PR directly | NO | `review-logic`, `review-backend`, `review-frontend`, etc. |
288
+ | Creating PR descriptions | NO | `pr-issue-documenter` |
289
+ | Opening or updating the PR | NO | `pr` |
290
+
291
+ ---
292
+
293
+ ## Job Context Awareness
294
+
295
+ When dispatched by `job-orchestrator` or called with an explicit context path, the prompt MAY include:
296
+
297
+ ```
298
+ JOB_NAME: <job-name>
299
+ CONTEXT_PATH: <JOBS_ROOT>/<job-name>/ai/context.md
300
+ ```
301
+
302
+ Context path resolution order:
303
+ 1. Value passed explicitly in the dispatch prompt
304
+ 2. `GDMETAPRO_JOBS_ROOT` environment variable + `/<JOB_NAME>/ai/context.md`
305
+ 3. `<PROJECT_DIR>/.metaproject/jobs/<JOB_NAME>/ai/context.md`
306
+
307
+ If provided and the file exists, read it before fetching PR comments. If absent, proceed normally.
308
+
309
+ ---
310
+
311
+ ## Red Flags
312
+
313
+ | Rationalization | Why it is wrong |
314
+ |----------------|-----------------|
315
+ | "I'll update the rule file based on the boss's comments without asking" | NEVER auto-update rules; always ask first — rules affect all future reviews |
316
+ | "The reviewer's question is just curiosity, not a real concern" | Questions often hide concerns; classify carefully |
317
+ | "I'll skip the 'praise' comments — they're not actionable" | Positive patterns help developers understand what to repeat |
318
+ | "Confidence High for an ambiguous comment" | Low confidence is honest; false confidence leads to wrong fixes |
319
+ | "The diff_hunk gives enough context — I don't need to read the context doc" | Context doc explains intentional patterns that look wrong in isolation |
320
+
321
+
322
+ ## Orchestrated Review Contract
323
+
324
+ When dispatched by `review-orchestrator`, follow the provided `reviewer-input.schema.json` payload. Return a `REVIEW_RESULT` object compatible with `skills/review-orchestrator/reviewer-finding.schema.json`, then a concise markdown summary. Keep findings evidence-based, include concrete `suggested_fix` for every blocker/major, and return `NEEDS_CONTEXT` instead of guessing when required context is missing.
325
+
326
+ ---
327
+