@humanbased/crosscheck 1.2.0-beta.81 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +375 -182
  3. package/README.zh.md +1 -1
  4. package/crosscheck.config.example.yml +9 -101
  5. package/dist/__tests__/board.test.js +0 -11
  6. package/dist/__tests__/board.test.js.map +1 -1
  7. package/dist/__tests__/codex.test.js +27 -14
  8. package/dist/__tests__/codex.test.js.map +1 -1
  9. package/dist/__tests__/comment-bodies.test.js +1 -49
  10. package/dist/__tests__/comment-bodies.test.js.map +1 -1
  11. package/dist/__tests__/conflict-resolve.test.js +1 -44
  12. package/dist/__tests__/conflict-resolve.test.js.map +1 -1
  13. package/dist/__tests__/fix.test.js +0 -33
  14. package/dist/__tests__/fix.test.js.map +1 -1
  15. package/dist/__tests__/onboard-preservation.test.js +3 -59
  16. package/dist/__tests__/onboard-preservation.test.js.map +1 -1
  17. package/dist/__tests__/optimize.test.js +0 -2
  18. package/dist/__tests__/optimize.test.js.map +1 -1
  19. package/dist/__tests__/repo-picker.test.js +1 -7
  20. package/dist/__tests__/repo-picker.test.js.map +1 -1
  21. package/dist/__tests__/review-comment-body.test.js +0 -35
  22. package/dist/__tests__/review-comment-body.test.js.map +1 -1
  23. package/dist/__tests__/review-models.test.js +3 -19
  24. package/dist/__tests__/review-models.test.js.map +1 -1
  25. package/dist/__tests__/runner.test.js +1 -29
  26. package/dist/__tests__/runner.test.js.map +1 -1
  27. package/dist/cli.js +0 -29
  28. package/dist/cli.js.map +1 -1
  29. package/dist/commands/onboard.d.ts +3 -36
  30. package/dist/commands/onboard.d.ts.map +1 -1
  31. package/dist/commands/onboard.js +42 -233
  32. package/dist/commands/onboard.js.map +1 -1
  33. package/dist/commands/review.d.ts.map +1 -1
  34. package/dist/commands/review.js +6 -65
  35. package/dist/commands/review.js.map +1 -1
  36. package/dist/commands/run.d.ts.map +1 -1
  37. package/dist/commands/run.js +7 -45
  38. package/dist/commands/run.js.map +1 -1
  39. package/dist/commands/status.d.ts.map +1 -1
  40. package/dist/commands/status.js +1 -53
  41. package/dist/commands/status.js.map +1 -1
  42. package/dist/commands/watch.d.ts.map +1 -1
  43. package/dist/commands/watch.js +12 -90
  44. package/dist/commands/watch.js.map +1 -1
  45. package/dist/config/loader.d.ts +1 -3
  46. package/dist/config/loader.d.ts.map +1 -1
  47. package/dist/config/loader.js +0 -13
  48. package/dist/config/loader.js.map +1 -1
  49. package/dist/config/review-model-tiers.json +3 -3
  50. package/dist/config/schema.d.ts +15 -261
  51. package/dist/config/schema.d.ts.map +1 -1
  52. package/dist/config/schema.js +8 -90
  53. package/dist/config/schema.js.map +1 -1
  54. package/dist/github/client.d.ts +1 -21
  55. package/dist/github/client.d.ts.map +1 -1
  56. package/dist/github/client.js +7 -46
  57. package/dist/github/client.js.map +1 -1
  58. package/dist/github/webhook.d.ts +0 -4
  59. package/dist/github/webhook.d.ts.map +1 -1
  60. package/dist/github/webhook.js.map +1 -1
  61. package/dist/issues/ticket-ref.d.ts.map +1 -1
  62. package/dist/issues/ticket-ref.js +5 -6
  63. package/dist/issues/ticket-ref.js.map +1 -1
  64. package/dist/lib/annotation.d.ts +0 -7
  65. package/dist/lib/annotation.d.ts.map +1 -1
  66. package/dist/lib/annotation.js +1 -11
  67. package/dist/lib/annotation.js.map +1 -1
  68. package/dist/lib/board.d.ts +0 -3
  69. package/dist/lib/board.d.ts.map +1 -1
  70. package/dist/lib/board.js +2 -4
  71. package/dist/lib/board.js.map +1 -1
  72. package/dist/lib/clone.d.ts +0 -1
  73. package/dist/lib/clone.d.ts.map +1 -1
  74. package/dist/lib/clone.js +10 -32
  75. package/dist/lib/clone.js.map +1 -1
  76. package/dist/lib/comment-bodies.d.ts +0 -37
  77. package/dist/lib/comment-bodies.d.ts.map +1 -1
  78. package/dist/lib/comment-bodies.js +9 -47
  79. package/dist/lib/comment-bodies.js.map +1 -1
  80. package/dist/lib/repo-picker.d.ts +0 -3
  81. package/dist/lib/repo-picker.d.ts.map +1 -1
  82. package/dist/lib/repo-picker.js +9 -45
  83. package/dist/lib/repo-picker.js.map +1 -1
  84. package/dist/lib/review-models.d.ts +2 -15
  85. package/dist/lib/review-models.d.ts.map +1 -1
  86. package/dist/lib/review-models.js +6 -26
  87. package/dist/lib/review-models.js.map +1 -1
  88. package/dist/lib/runner.d.ts +0 -92
  89. package/dist/lib/runner.d.ts.map +1 -1
  90. package/dist/lib/runner.js +54 -470
  91. package/dist/lib/runner.js.map +1 -1
  92. package/dist/lib/workflow.d.ts +0 -9
  93. package/dist/lib/workflow.d.ts.map +1 -1
  94. package/dist/lib/workflow.js +0 -20
  95. package/dist/lib/workflow.js.map +1 -1
  96. package/dist/reviewers/claude.d.ts +1 -4
  97. package/dist/reviewers/claude.d.ts.map +1 -1
  98. package/dist/reviewers/claude.js +7 -39
  99. package/dist/reviewers/claude.js.map +1 -1
  100. package/dist/reviewers/codex.d.ts +1 -3
  101. package/dist/reviewers/codex.d.ts.map +1 -1
  102. package/dist/reviewers/codex.js +70 -76
  103. package/dist/reviewers/codex.js.map +1 -1
  104. package/dist/reviewers/conflict-resolve.d.ts +1 -3
  105. package/dist/reviewers/conflict-resolve.d.ts.map +1 -1
  106. package/dist/reviewers/conflict-resolve.js +6 -21
  107. package/dist/reviewers/conflict-resolve.js.map +1 -1
  108. package/dist/reviewers/fix.d.ts +2 -5
  109. package/dist/reviewers/fix.d.ts.map +1 -1
  110. package/dist/reviewers/fix.js +10 -26
  111. package/dist/reviewers/fix.js.map +1 -1
  112. package/get-started.md +11 -207
  113. package/package.json +3 -4
  114. package/assets/icon-256.png +0 -0
  115. package/assets/linear-comment.svg +0 -18
  116. package/assets/linear-onboard.svg +0 -30
  117. package/assets/linear-status.svg +0 -23
  118. package/assets/linear-test.svg +0 -34
  119. package/assets/skills/code-review/.crosscheck-skill.json +0 -9
  120. package/assets/skills/code-review/LICENSE +0 -21
  121. package/assets/skills/code-review/SKILL.md +0 -89
  122. package/assets/skills/code-review/agents/openai.yaml +0 -3
  123. package/assets/skills/code-review-skill/.crosscheck-skill.json +0 -9
  124. package/assets/skills/code-review-skill/LICENSE +0 -21
  125. package/assets/skills/code-review-skill/SKILL.md +0 -231
  126. package/assets/skills/code-review-skill/assets/pr-review-template.md +0 -137
  127. package/assets/skills/code-review-skill/assets/review-checklist.md +0 -123
  128. package/assets/skills/code-review-skill/reference/angular.md +0 -768
  129. package/assets/skills/code-review-skill/reference/architecture-review-guide.md +0 -472
  130. package/assets/skills/code-review-skill/reference/c.md +0 -890
  131. package/assets/skills/code-review-skill/reference/code-quality-universal.md +0 -488
  132. package/assets/skills/code-review-skill/reference/code-review-best-practices.md +0 -136
  133. package/assets/skills/code-review-skill/reference/common-bugs-checklist.md +0 -286
  134. package/assets/skills/code-review-skill/reference/cpp.md +0 -893
  135. package/assets/skills/code-review-skill/reference/cross-cutting/async-concurrency-patterns.md +0 -515
  136. package/assets/skills/code-review-skill/reference/cross-cutting/error-handling-principles.md +0 -492
  137. package/assets/skills/code-review-skill/reference/cross-cutting/n-plus-one-queries.md +0 -309
  138. package/assets/skills/code-review-skill/reference/cross-cutting/sql-injection-prevention.md +0 -308
  139. package/assets/skills/code-review-skill/reference/cross-cutting/xss-prevention.md +0 -264
  140. package/assets/skills/code-review-skill/reference/csharp.md +0 -525
  141. package/assets/skills/code-review-skill/reference/css-less-sass.md +0 -661
  142. package/assets/skills/code-review-skill/reference/django.md +0 -985
  143. package/assets/skills/code-review-skill/reference/fastapi.md +0 -580
  144. package/assets/skills/code-review-skill/reference/go.md +0 -993
  145. package/assets/skills/code-review-skill/reference/java.md +0 -409
  146. package/assets/skills/code-review-skill/reference/java8.md +0 -586
  147. package/assets/skills/code-review-skill/reference/kotlin.md +0 -1018
  148. package/assets/skills/code-review-skill/reference/nestjs.md +0 -593
  149. package/assets/skills/code-review-skill/reference/performance-review-guide.md +0 -816
  150. package/assets/skills/code-review-skill/reference/php.md +0 -684
  151. package/assets/skills/code-review-skill/reference/python.md +0 -1073
  152. package/assets/skills/code-review-skill/reference/qt.md +0 -757
  153. package/assets/skills/code-review-skill/reference/react.md +0 -871
  154. package/assets/skills/code-review-skill/reference/ruby.md +0 -964
  155. package/assets/skills/code-review-skill/reference/rust.md +0 -846
  156. package/assets/skills/code-review-skill/reference/security-review-guide.md +0 -494
  157. package/assets/skills/code-review-skill/reference/svelte.md +0 -1064
  158. package/assets/skills/code-review-skill/reference/swift.md +0 -936
  159. package/assets/skills/code-review-skill/reference/typescript.md +0 -1016
  160. package/assets/skills/code-review-skill/reference/vue.md +0 -924
  161. package/assets/skills/code-review-skill/reference/zig.md +0 -440
  162. package/assets/skills/code-review-skill/scripts/pr-analyzer.py +0 -435
  163. package/assets/skills/code-review-skill/scripts/test_pr_analyzer.py +0 -380
  164. package/assets/skills/codebase-design/.crosscheck-skill.json +0 -9
  165. package/assets/skills/codebase-design/DEEPENING.md +0 -37
  166. package/assets/skills/codebase-design/DESIGN-IT-TWICE.md +0 -44
  167. package/assets/skills/codebase-design/LICENSE +0 -21
  168. package/assets/skills/codebase-design/SKILL.md +0 -114
  169. package/assets/skills/codebase-design/agents/openai.yaml +0 -3
  170. package/assets/skills/diagnosing-bugs/.crosscheck-skill.json +0 -9
  171. package/assets/skills/diagnosing-bugs/LICENSE +0 -21
  172. package/assets/skills/diagnosing-bugs/SKILL.md +0 -134
  173. package/assets/skills/diagnosing-bugs/agents/openai.yaml +0 -3
  174. package/assets/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +0 -41
  175. package/dist/__tests__/can-write-verdict.test.d.ts +0 -2
  176. package/dist/__tests__/can-write-verdict.test.d.ts.map +0 -1
  177. package/dist/__tests__/can-write-verdict.test.js +0 -31
  178. package/dist/__tests__/can-write-verdict.test.js.map +0 -1
  179. package/dist/__tests__/linear-branding.test.d.ts +0 -2
  180. package/dist/__tests__/linear-branding.test.d.ts.map +0 -1
  181. package/dist/__tests__/linear-branding.test.js +0 -156
  182. package/dist/__tests__/linear-branding.test.js.map +0 -1
  183. package/dist/__tests__/linear-client.test.d.ts +0 -2
  184. package/dist/__tests__/linear-client.test.d.ts.map +0 -1
  185. package/dist/__tests__/linear-client.test.js +0 -120
  186. package/dist/__tests__/linear-client.test.js.map +0 -1
  187. package/dist/__tests__/linear-comment.test.d.ts +0 -2
  188. package/dist/__tests__/linear-comment.test.d.ts.map +0 -1
  189. package/dist/__tests__/linear-comment.test.js +0 -151
  190. package/dist/__tests__/linear-comment.test.js.map +0 -1
  191. package/dist/__tests__/linear-identity.test.d.ts +0 -2
  192. package/dist/__tests__/linear-identity.test.d.ts.map +0 -1
  193. package/dist/__tests__/linear-identity.test.js +0 -253
  194. package/dist/__tests__/linear-identity.test.js.map +0 -1
  195. package/dist/__tests__/linear-notify.test.d.ts +0 -2
  196. package/dist/__tests__/linear-notify.test.d.ts.map +0 -1
  197. package/dist/__tests__/linear-notify.test.js +0 -144
  198. package/dist/__tests__/linear-notify.test.js.map +0 -1
  199. package/dist/__tests__/linear-ref.test.d.ts +0 -2
  200. package/dist/__tests__/linear-ref.test.d.ts.map +0 -1
  201. package/dist/__tests__/linear-ref.test.js +0 -261
  202. package/dist/__tests__/linear-ref.test.js.map +0 -1
  203. package/dist/__tests__/linear-test-ref.test.d.ts +0 -2
  204. package/dist/__tests__/linear-test-ref.test.d.ts.map +0 -1
  205. package/dist/__tests__/linear-test-ref.test.js +0 -81
  206. package/dist/__tests__/linear-test-ref.test.js.map +0 -1
  207. package/dist/__tests__/linear-verify.test.d.ts +0 -2
  208. package/dist/__tests__/linear-verify.test.d.ts.map +0 -1
  209. package/dist/__tests__/linear-verify.test.js +0 -132
  210. package/dist/__tests__/linear-verify.test.js.map +0 -1
  211. package/dist/__tests__/linear-worker.test.d.ts +0 -2
  212. package/dist/__tests__/linear-worker.test.d.ts.map +0 -1
  213. package/dist/__tests__/linear-worker.test.js +0 -83
  214. package/dist/__tests__/linear-worker.test.js.map +0 -1
  215. package/dist/__tests__/linear-write-possible.test.d.ts +0 -2
  216. package/dist/__tests__/linear-write-possible.test.d.ts.map +0 -1
  217. package/dist/__tests__/linear-write-possible.test.js +0 -30
  218. package/dist/__tests__/linear-write-possible.test.js.map +0 -1
  219. package/dist/__tests__/repository-guidance.test.d.ts +0 -2
  220. package/dist/__tests__/repository-guidance.test.d.ts.map +0 -1
  221. package/dist/__tests__/repository-guidance.test.js +0 -107
  222. package/dist/__tests__/repository-guidance.test.js.map +0 -1
  223. package/dist/__tests__/review-strategy.test.d.ts +0 -2
  224. package/dist/__tests__/review-strategy.test.d.ts.map +0 -1
  225. package/dist/__tests__/review-strategy.test.js +0 -397
  226. package/dist/__tests__/review-strategy.test.js.map +0 -1
  227. package/dist/__tests__/skill-attribution.test.d.ts +0 -2
  228. package/dist/__tests__/skill-attribution.test.d.ts.map +0 -1
  229. package/dist/__tests__/skill-attribution.test.js +0 -53
  230. package/dist/__tests__/skill-attribution.test.js.map +0 -1
  231. package/dist/__tests__/skill-broker.test.d.ts +0 -2
  232. package/dist/__tests__/skill-broker.test.d.ts.map +0 -1
  233. package/dist/__tests__/skill-broker.test.js +0 -144
  234. package/dist/__tests__/skill-broker.test.js.map +0 -1
  235. package/dist/__tests__/skill-catalog.test.d.ts +0 -2
  236. package/dist/__tests__/skill-catalog.test.d.ts.map +0 -1
  237. package/dist/__tests__/skill-catalog.test.js +0 -40
  238. package/dist/__tests__/skill-catalog.test.js.map +0 -1
  239. package/dist/__tests__/skill-installer.test.d.ts +0 -2
  240. package/dist/__tests__/skill-installer.test.d.ts.map +0 -1
  241. package/dist/__tests__/skill-installer.test.js +0 -96
  242. package/dist/__tests__/skill-installer.test.js.map +0 -1
  243. package/dist/__tests__/skills-config.test.d.ts +0 -2
  244. package/dist/__tests__/skills-config.test.d.ts.map +0 -1
  245. package/dist/__tests__/skills-config.test.js +0 -12
  246. package/dist/__tests__/skills-config.test.js.map +0 -1
  247. package/dist/commands/linear-test.d.ts +0 -18
  248. package/dist/commands/linear-test.d.ts.map +0 -1
  249. package/dist/commands/linear-test.js +0 -130
  250. package/dist/commands/linear-test.js.map +0 -1
  251. package/dist/commands/skill.d.ts +0 -2
  252. package/dist/commands/skill.d.ts.map +0 -1
  253. package/dist/commands/skill.js +0 -16
  254. package/dist/commands/skill.js.map +0 -1
  255. package/dist/config/review-strategy.json +0 -204
  256. package/dist/lib/repository-guidance.d.ts +0 -2
  257. package/dist/lib/repository-guidance.d.ts.map +0 -1
  258. package/dist/lib/repository-guidance.js +0 -55
  259. package/dist/lib/repository-guidance.js.map +0 -1
  260. package/dist/lib/review-strategy.d.ts +0 -92
  261. package/dist/lib/review-strategy.d.ts.map +0 -1
  262. package/dist/lib/review-strategy.js +0 -282
  263. package/dist/lib/review-strategy.js.map +0 -1
  264. package/dist/linear/client.d.ts +0 -18
  265. package/dist/linear/client.d.ts.map +0 -1
  266. package/dist/linear/client.js +0 -67
  267. package/dist/linear/client.js.map +0 -1
  268. package/dist/linear/comment.d.ts +0 -20
  269. package/dist/linear/comment.d.ts.map +0 -1
  270. package/dist/linear/comment.js +0 -57
  271. package/dist/linear/comment.js.map +0 -1
  272. package/dist/linear/identity.d.ts +0 -59
  273. package/dist/linear/identity.d.ts.map +0 -1
  274. package/dist/linear/identity.js +0 -187
  275. package/dist/linear/identity.js.map +0 -1
  276. package/dist/linear/notify.d.ts +0 -35
  277. package/dist/linear/notify.d.ts.map +0 -1
  278. package/dist/linear/notify.js +0 -76
  279. package/dist/linear/notify.js.map +0 -1
  280. package/dist/linear/ref.d.ts +0 -13
  281. package/dist/linear/ref.d.ts.map +0 -1
  282. package/dist/linear/ref.js +0 -90
  283. package/dist/linear/ref.js.map +0 -1
  284. package/dist/linear/verify.d.ts +0 -26
  285. package/dist/linear/verify.d.ts.map +0 -1
  286. package/dist/linear/verify.js +0 -67
  287. package/dist/linear/verify.js.map +0 -1
  288. package/dist/skills/attribution.d.ts +0 -4
  289. package/dist/skills/attribution.d.ts.map +0 -1
  290. package/dist/skills/attribution.js +0 -14
  291. package/dist/skills/attribution.js.map +0 -1
  292. package/dist/skills/broker-server.d.ts +0 -2
  293. package/dist/skills/broker-server.d.ts.map +0 -1
  294. package/dist/skills/broker-server.js +0 -17
  295. package/dist/skills/broker-server.js.map +0 -1
  296. package/dist/skills/broker.d.ts +0 -42
  297. package/dist/skills/broker.d.ts.map +0 -1
  298. package/dist/skills/broker.js +0 -285
  299. package/dist/skills/broker.js.map +0 -1
  300. package/dist/skills/catalog.d.ts +0 -28
  301. package/dist/skills/catalog.d.ts.map +0 -1
  302. package/dist/skills/catalog.js +0 -104
  303. package/dist/skills/catalog.js.map +0 -1
  304. package/dist/skills/installer.d.ts +0 -10
  305. package/dist/skills/installer.d.ts.map +0 -1
  306. package/dist/skills/installer.js +0 -138
  307. package/dist/skills/installer.js.map +0 -1
  308. package/dist/skills/integrity.d.ts +0 -4
  309. package/dist/skills/integrity.d.ts.map +0 -1
  310. package/dist/skills/integrity.js +0 -36
  311. package/dist/skills/integrity.js.map +0 -1
  312. package/docs/dynamic-thoroughness.md +0 -738
  313. package/docs/linear-identity-contract.md +0 -139
  314. package/docs/linear-identity.md +0 -293
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 awesome-skills
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,231 +0,0 @@
1
- ---
2
- name: code-review-skill
3
- description: |
4
- Provides comprehensive code review guidance for React 19, Vue 3, Angular 17+, Svelte 5,
5
- Rust, TypeScript, Java, Java 8, PHP, Ruby, Rails, Python, Django, FastAPI, Go, C#/.NET, Kotlin, Swift,
6
- NestJS, C/C++, Zig, CSS/Less/Sass, Qt, and more.
7
- Covers architecture review, performance review, security audit, code quality anti-patterns,
8
- and common bugs across all ecosystems.
9
- Use when: reviewing pull requests, conducting PR reviews, code review, reviewing code changes,
10
- establishing review standards, mentoring developers, architecture reviews, security audits,
11
- performance reviews, checking code quality, finding bugs, giving feedback on code.
12
- allowed-tools:
13
- - Read
14
- - Grep
15
- - Glob
16
- - Bash # 运行 lint/test/build 命令验证代码质量
17
- - WebFetch # 查阅最新文档和最佳实践
18
- ---
19
-
20
- # Code Review Skill
21
-
22
- Transform code reviews from gatekeeping to knowledge sharing through constructive feedback, systematic analysis, and collaborative improvement.
23
-
24
- ## When to Use This Skill
25
-
26
- - Reviewing pull requests and code changes
27
- - Establishing code review standards for teams
28
- - Mentoring junior developers through reviews
29
- - Conducting architecture reviews
30
- - Creating review checklists and guidelines
31
- - Improving team collaboration
32
- - Reducing code review cycle time
33
- - Maintaining code quality standards
34
-
35
- ## Core Principles
36
-
37
- ### 1. The Review Mindset
38
-
39
- **Goals of Code Review:**
40
- - Catch bugs and edge cases
41
- - Ensure code maintainability
42
- - Share knowledge across team
43
- - Enforce coding standards
44
- - Improve design and architecture
45
- - Build team culture
46
-
47
- **Not the Goals:**
48
- - Show off knowledge
49
- - Nitpick formatting (use linters)
50
- - Block progress unnecessarily
51
- - Rewrite to your preference
52
-
53
- ### 2. Effective Feedback
54
-
55
- **Good Feedback is:**
56
- - Specific and actionable
57
- - Educational, not judgmental
58
- - Focused on the code, not the person
59
- - Balanced (praise good work too)
60
- - Prioritized (critical vs nice-to-have)
61
-
62
- ```markdown
63
- ❌ Bad: "This is wrong."
64
- ✅ Good: "This could cause a race condition when multiple users
65
- access simultaneously. Consider using a mutex here."
66
-
67
- ❌ Bad: "Why didn't you use X pattern?"
68
- ✅ Good: "Have you considered the Repository pattern? It would
69
- make this easier to test. Here's an example: [link]"
70
-
71
- ❌ Bad: "Rename this variable."
72
- ✅ Good: "[nit] Consider `userCount` instead of `uc` for
73
- clarity. Not blocking if you prefer to keep it."
74
- ```
75
-
76
- ### 3. Review Scope
77
-
78
- **What to Review:**
79
- - Logic correctness and edge cases
80
- - Security vulnerabilities
81
- - Performance implications
82
- - Test coverage and quality
83
- - Error handling
84
- - Documentation and comments
85
- - API design and naming
86
- - Architectural fit
87
-
88
- **What Not to Review Manually:**
89
- - Code formatting (use Prettier, Black, etc.)
90
- - Import organization
91
- - Linting violations
92
- - Simple typos
93
-
94
- ## Review Process
95
-
96
- ### Phase 1: Context Gathering (2-3 minutes)
97
-
98
- Before diving into code, understand:
99
- 1. Read PR description and linked issue
100
- 2. Check PR size (>400 lines? Ask to split)
101
- 3. Review CI/CD status (tests passing?)
102
- 4. Understand the business requirement
103
- 5. Note any relevant architectural decisions
104
-
105
- > For large diffs, pipe the diff through [`scripts/pr-analyzer.py`](scripts/pr-analyzer.py) (`git diff main...HEAD | python scripts/pr-analyzer.py`) to triage complexity and get a suggested review approach before reading.
106
-
107
- ### Phase 2: High-Level Review (5-10 minutes)
108
-
109
- 1. **Architecture & Design** - Does the solution fit the problem?
110
- - For significant changes, consult [Architecture Review Guide](reference/architecture-review-guide.md)
111
- - Check: SOLID principles, coupling/cohesion, anti-patterns
112
- 2. **Performance Assessment** - Are there performance concerns?
113
- - For performance-critical code, consult [Performance Review Guide](reference/performance-review-guide.md)
114
- - Check: Algorithm complexity, N+1 queries, memory usage
115
- 3. **File Organization** - Are new files in the right places?
116
- 4. **Testing Strategy** - Are there tests covering edge cases?
117
-
118
- ### Phase 3: Line-by-Line Review (10-20 minutes)
119
-
120
- For each file, check:
121
- - **Logic & Correctness** - Edge cases, off-by-one, null checks, race conditions
122
- - **Security** - Input validation, injection risks, XSS, sensitive data
123
- - **Performance** - N+1 queries, unnecessary loops, memory leaks
124
- - **Maintainability** - Clear names, single responsibility, comments
125
- - **Reuse** - Before accepting new code, search for existing utilities/helpers that could replace it. Check adjacent files and shared modules for similar patterns. See [Universal Quality Guide](reference/code-quality-universal.md) for anti-patterns like parameter sprawl, leaky abstractions, nested conditionals, stringly-typed code, TOCTOU, and no-op updates.
126
-
127
- ### Phase 4: Summary & Decision (2-3 minutes)
128
-
129
- 1. Summarize key concerns
130
- 2. Highlight what you liked
131
- 3. Make clear decision:
132
- - ✅ Approve
133
- - 💬 Comment (minor suggestions)
134
- - 🔄 Request Changes (must address)
135
- 4. Offer to pair if complex
136
-
137
- ## Review Techniques
138
-
139
- ### Technique 1: The Checklist Method
140
-
141
- Use checklists for consistent reviews. See [Security Review Guide](reference/security-review-guide.md) for comprehensive security checklist.
142
-
143
- ### Technique 2: The Question Approach
144
-
145
- Instead of stating problems, ask questions:
146
-
147
- ```markdown
148
- ❌ "This will fail if the list is empty."
149
- ✅ "What happens if `items` is an empty array?"
150
-
151
- ❌ "You need error handling here."
152
- ✅ "How should this behave if the API call fails?"
153
- ```
154
-
155
- ### Technique 3: Suggest, Don't Command
156
-
157
- Use collaborative language:
158
-
159
- ```markdown
160
- ❌ "You must change this to use async/await"
161
- ✅ "Suggestion: async/await might make this more readable. What do you think?"
162
-
163
- ❌ "Extract this into a function"
164
- ✅ "This logic appears in 3 places. Would it make sense to extract it?"
165
- ```
166
-
167
- ### Technique 4: Differentiate Severity
168
-
169
- Use labels to indicate priority:
170
-
171
- - 🔴 `[blocking]` - Must fix before merge
172
- - 🟡 `[important]` - Should fix, discuss if disagree
173
- - 🟢 `[nit]` - Nice to have, not blocking
174
- - 💡 `[suggestion]` - Alternative approach to consider
175
- - 📚 `[learning]` - Educational comment, no action needed
176
- - 🎉 `[praise]` - Good work, keep it up!
177
-
178
- **Severity levels:** 🔴 / 🟡 / 🟢 are the three severity tiers used as the standard across all guides in this skill — 🔴 blocks the merge, 🟡 should be addressed, 🟢 is optional. The remaining markers (💡 / 📚 / 🎉) are non-blocking annotations.
179
-
180
- ## Language-Specific Guides
181
-
182
- 根据审查的代码语言,查阅对应的详细指南:
183
-
184
- | Language/Framework | Reference File | Key Topics |
185
- |-------------------|----------------|------------|
186
- | **React** | [React Guide](reference/react.md) | Hooks, useEffect, React 19 Actions, RSC, Suspense, TanStack Query v5 |
187
- | **Vue 3** | [Vue Guide](reference/vue.md) | Composition API, 响应性系统, Props/Emits, Watchers, Composables |
188
- | **Angular 17+** | [Angular Guide](reference/angular.md) | Signals, Standalone, RxJS, Zoneless, 模板优化, 测试, 路由守卫, HttpInterceptor |
189
- | **Rust** | [Rust Guide](reference/rust.md) | 所有权/借用, Unsafe 审查, 异步代码, 取消安全性, 错误处理 |
190
- | **TypeScript** | [TypeScript Guide](reference/typescript.md) | 类型安全, async/await, 不可变性, 测试, 模块解析, TS 5.x |
191
- | **Python** | [Python Guide](reference/python.md) | 可变默认参数, 异常处理, 类属性 |
192
- | **Django / DRF** | [Django Guide](reference/django.md) | 安全审查, N+1 查询, Serializer 反模式, ViewSet, 异步视图 |
193
- | **FastAPI** | [FastAPI Guide](reference/fastapi.md) | Depends, Pydantic v2 validation, async correctness, sessions/N+1, auth vs authorization, test-driven verification |
194
- | **Java** | [Java Guide](reference/java.md) | Java 17/21 新特性, Spring Boot 3, 虚拟线程, Stream/Optional |
195
- | **Java 8 / Legacy** | [Java 8 Guide](reference/java8.md) | Java 8, Spring Boot 2, javax.*, Stream/Optional, java.time, CompletableFuture |
196
- | **PHP** | [PHP Guide](reference/php.md) | PHP 8.x type system, PDO, security review, Composer, PHPUnit/PHPStan |
197
- | **Ruby / Rails** | [Ruby Guide](reference/ruby.md) | Ruby semantics, Rails 8, Active Record, Active Job, security, testing |
198
- | **C# / .NET** | [C# Guide](reference/csharp.md) | C# 12 特性, 异步编程, EF Core 性能, ASP.NET Core, LINQ |
199
- | **Go** | [Go Guide](reference/go.md) | 错误处理, goroutine/channel, context, 接口设计 |
200
- | **Kotlin / Android** | [Kotlin Guide](reference/kotlin.md) | 协程, Flow, Jetpack Compose, 空安全, 内存泄漏, 架构模式 |
201
- | **Swift / SwiftUI** | [Swift Guide](reference/swift.md) | Optionals, Swift Concurrency, Sendable/actors, SwiftUI property wrappers, value vs reference types, API design |
202
- | **NestJS** | [NestJS Guide](reference/nestjs.md) | 依赖注入, 分层架构, DTO 验证, Guard/Interceptor, 循环依赖 |
203
- | **Svelte / SvelteKit** | [Svelte Guide](reference/svelte.md) | Runes, Load 函数, Form Actions, Store 迁移, SSR/CSR 边界 |
204
- | **C** | [C Guide](reference/c.md) | 指针/缓冲区, 内存安全, UB, 安全编码, 可移植性, 测试 |
205
- | **C++** | [C++ Guide](reference/cpp.md) | RAII, 智能指针, C++20/23, constexpr, 测试 |
206
- | **Zig** | [Zig Guide](reference/zig.md) | Allocators, error unions, defer/errdefer, comptime, C interop |
207
- | **CSS/Less/Sass** | [CSS Guide](reference/css-less-sass.md) | 变量规范, !important, 性能优化, 响应式, 兼容性 |
208
- | **Qt** | [Qt Guide](reference/qt.md) | 对象模型, 信号/槽, Model/View, QML, Qt6 迁移, 测试 |
209
-
210
- ## Cross-Cutting Guides
211
-
212
- Language-agnostic patterns applicable to all code reviews:
213
-
214
- | Topic | Reference File | Key Topics |
215
- |-------|----------------|------------|
216
- | **Architecture Review** | [Architecture Review Guide](reference/architecture-review-guide.md) | SOLID, anti-patterns, coupling/cohesion, dependency direction |
217
- | **Performance Review** | [Performance Review Guide](reference/performance-review-guide.md) | Web Vitals, N+1, algorithm complexity, memory leaks, caching |
218
- | **Security Review** | [Security Review Guide](reference/security-review-guide.md) | SQLi, XSS, CSRF, SSRF, IDOR, 命令注入, 跨语言示例 |
219
- | **Universal Quality** | [Universal Quality Guide](reference/code-quality-universal.md) | Reuse audit, parameter sprawl, leaky abstractions, nested conditionals, stringly-typed code, TOCTOU, no-op updates, redundant state |
220
- | **Common Bugs** | [Common Bugs Checklist](reference/common-bugs-checklist.md) | Language-specific bug patterns, common pitfalls |
221
- | **SQL Injection Prevention** | [SQL Injection Guide](reference/cross-cutting/sql-injection-prevention.md) | Parameterized queries, ORM safety, 6 languages, dynamic identifiers, detection |
222
- | **XSS Prevention** | [XSS Prevention Guide](reference/cross-cutting/xss-prevention.md) | Output encoding, CSP, 5 frameworks, input validation vs encoding, detection |
223
- | **N+1 Queries** | [N+1 Queries Guide](reference/cross-cutting/n-plus-one-queries.md) | Eager loading, batch fetching, DataLoader, 5 languages, detection |
224
- | **Error Handling** | [Error Handling Guide](reference/cross-cutting/error-handling-principles.md) | Fail fast, error hierarchy, 7 languages, anti-patterns, logging |
225
- | **Async & Concurrency** | [Concurrency Guide](reference/cross-cutting/async-concurrency-patterns.md) | Goroutines, async/await, actors, structured concurrency, 7 languages |
226
- | **Review Best Practices** | [Code Review Best Practices](reference/code-review-best-practices.md) | Communication, reviewer mindset, giving feedback, severity labels |
227
-
228
- ## Additional Resources
229
-
230
- - [PR Review Template](assets/pr-review-template.md) - PR 审查评论模板
231
- - [Review Checklist](assets/review-checklist.md) - 快速参考清单
@@ -1,137 +0,0 @@
1
- # PR Review Template
2
-
3
- Copy and use this template for your code reviews.
4
-
5
- ---
6
-
7
- ## Summary
8
-
9
- [Brief overview of what was reviewed - 1-2 sentences]
10
-
11
- **PR Size:** [Small/Medium/Large] (~X lines)
12
- **Review Time:** [X minutes]
13
-
14
- ## Strengths
15
-
16
- - [What was done well]
17
- - [Good patterns or approaches used]
18
- - [Improvements from previous code]
19
-
20
- ## Architecture & Performance
21
-
22
- **Architecture Assessment**
23
- - [ ] Separation of concerns — are responsibilities clearly divided?
24
- - [ ] Module responsibilities — does each module have a single purpose?
25
- - [ ] Dependency direction — do dependencies flow toward stability?
26
- - [ ] Consistent with existing patterns and conventions
27
-
28
- > See [Architecture Review Guide](../reference/architecture-review-guide.md) for detailed SOLID, anti-pattern, and coupling analysis.
29
-
30
- **Performance Assessment**
31
- - [ ] Algorithm complexity — any O(n²) or worse on large inputs?
32
- - [ ] Memory impact — large allocations, leaks, unbounded growth?
33
- - [ ] I/O impact — excessive API calls, unbatched writes, missing caching?
34
- - [ ] Database queries — N+1 risks, missing indexes, unoptimized joins?
35
-
36
- > See [Performance Review Guide](../reference/performance-review-guide.md) for comprehensive Web Vitals, N+1, and caching guidance.
37
-
38
- ## Required Changes
39
-
40
- 🔴 **[blocking]** [Issue description]
41
- > [Code location or example]
42
- > [Suggested fix or explanation]
43
-
44
- 🔴 **[blocking]** [Issue description]
45
- > [Details]
46
-
47
- ## Important Suggestions
48
-
49
- 🟡 **[important]** [Issue description]
50
- > [Why this matters]
51
- > [Suggested approach]
52
-
53
- ## Minor Suggestions
54
-
55
- 🟢 **[nit]** [Minor improvement suggestion]
56
-
57
- 💡 **[suggestion]** [Alternative approach to consider]
58
-
59
- ## Learning Notes
60
-
61
- 📚 [Educational context worth sharing about X]
62
-
63
- 📚 [Background behind design decision Y]
64
-
65
- ## Security Considerations
66
-
67
- - [ ] No hardcoded secrets
68
- - [ ] Input validation present
69
- - [ ] Authorization checks in place
70
- - [ ] No SQL/XSS injection risks
71
- - [ ] CSRF protection for state-changing operations
72
- - [ ] Sensitive data not leaked in logs/errors
73
- - [ ] Dependency vulnerabilities checked (npm audit / pip audit / cargo audit)
74
-
75
- > See [Security Review Guide](../reference/security-review-guide.md) for comprehensive injection, XSS, CSRF, secrets, and auth checklist.
76
-
77
- ## Test Coverage
78
-
79
- - [ ] Unit tests added/updated
80
- - [ ] Edge cases covered
81
- - [ ] Error cases tested
82
-
83
- ## Verdict
84
-
85
- **[ ] ✅ Approve** - Ready to merge
86
- **[ ] 💬 Comment** - Minor suggestions, can merge
87
- **[ ] 🔄 Request Changes** - Must address blocking issues
88
-
89
- ---
90
-
91
- ## Quick Copy Templates
92
-
93
- ### Blocking Issue
94
- ```
95
- 🔴 **[blocking]** [Title]
96
-
97
- [Description of the issue]
98
-
99
- **Location:** `file.ts:123`
100
-
101
- **Suggested fix:**
102
- \`\`\`typescript
103
- // Your suggested code
104
- \`\`\`
105
- ```
106
-
107
- ### Important Suggestion
108
- ```
109
- 🟡 **[important]** [Title]
110
-
111
- [Why this is important]
112
-
113
- **Consider:**
114
- - Option A: [description]
115
- - Option B: [description]
116
- ```
117
-
118
- ### Minor Suggestion
119
- ```
120
- 🟢 **[nit]** [Suggestion]
121
-
122
- Not blocking, but consider [improvement].
123
- ```
124
-
125
- ### Praise
126
- ```
127
- 🎉 **[praise]** Great work on [specific thing]!
128
-
129
- [Why this is good]
130
- ```
131
-
132
- ### Learning
133
- ```
134
- 📚 **[learning]** [Educational note]
135
-
136
- For context, [X] works this way because [Y]. No action needed — just sharing.
137
- ```
@@ -1,123 +0,0 @@
1
- # Code Review Quick Checklist
2
-
3
- Quick reference checklist for code reviews.
4
-
5
- ## Pre-Review (2 min)
6
-
7
- - [ ] Read PR description and linked issue
8
- - [ ] Check PR size (<400 lines ideal)
9
- - [ ] Verify CI/CD status (tests passing?)
10
- - [ ] Understand the business requirement
11
-
12
- ## Architecture & Design (5 min)
13
-
14
- - [ ] Solution fits the problem
15
- - [ ] Consistent with existing patterns
16
- - [ ] No simpler approach exists
17
- - [ ] Will it scale?
18
- - [ ] Changes in right location
19
-
20
- ## Logic & Correctness (10 min)
21
-
22
- - [ ] Edge cases handled
23
- - [ ] Null/undefined checks present
24
- - [ ] Off-by-one errors checked
25
- - [ ] Race conditions considered
26
- - [ ] Error handling complete
27
- - [ ] Correct data types used
28
-
29
- ## Security (5 min)
30
-
31
- - [ ] No hardcoded secrets
32
- - [ ] Input validated/sanitized
33
- - [ ] SQL injection prevented
34
- - [ ] XSS prevented
35
- - [ ] Authorization checks present
36
- - [ ] Sensitive data protected
37
-
38
- ## Performance (3 min)
39
-
40
- - [ ] No N+1 queries
41
- - [ ] Expensive operations optimized
42
- - [ ] Large lists paginated
43
- - [ ] No memory leaks
44
- - [ ] Caching considered where appropriate
45
-
46
- ## Testing (5 min)
47
-
48
- - [ ] Tests exist for new code
49
- - [ ] Edge cases tested
50
- - [ ] Error cases tested
51
- - [ ] Tests are readable
52
- - [ ] Tests are deterministic
53
-
54
- ## Code Quality (3 min)
55
-
56
- - [ ] Clear variable/function names
57
- - [ ] No code duplication
58
- - [ ] Functions do one thing
59
- - [ ] Complex code commented
60
- - [ ] No magic numbers
61
-
62
- ## Documentation (2 min)
63
-
64
- - [ ] Public APIs documented
65
- - [ ] README updated if needed
66
- - [ ] Breaking changes noted
67
- - [ ] Complex logic explained
68
-
69
- ---
70
-
71
- ## Severity Labels
72
-
73
- | Label | Meaning | Action |
74
- |-------|---------|--------|
75
- | 🔴 `[blocking]` | Must fix | Block merge |
76
- | 🟡 `[important]` | Should fix | Discuss if disagree |
77
- | 🟢 `[nit]` | Nice to have | Non-blocking |
78
- | 💡 `[suggestion]` | Alternative | Consider |
79
- | 📚 `[learning]` | Educational comment | No action needed |
80
- | 🎉 `[praise]` | Good work | Celebrate! |
81
-
82
- ---
83
-
84
- ## Decision Matrix
85
-
86
- | Situation | Decision |
87
- |-----------|----------|
88
- | Critical security issue | 🔴 Block, fix immediately |
89
- | Breaking change without migration | 🔴 Block |
90
- | Missing error handling | 🟡 Should fix |
91
- | No tests for new code | 🟡 Should fix |
92
- | Style preference | 🟢 Non-blocking |
93
- | Minor naming improvement | 🟢 Non-blocking |
94
- | Clever but working code | 💡 Suggest simpler |
95
-
96
- ---
97
-
98
- ## Time Budget
99
-
100
- This checklist is designed for a **lightweight quick review**. For comprehensive reviews covering architecture and performance analysis, use the full four-phase process in [SKILL.md](../SKILL.md) (19–36 minutes). Smaller PRs trend toward the lower end of each phase; larger PRs toward the upper end.
101
-
102
- | PR Size | Quick Review | Full Review (4-phase) |
103
- |---------|-------------|----------------------|
104
- | < 100 lines | 10–15 min | ~19–28 min |
105
- | 100–400 lines | 20–40 min | ~28–36 min |
106
- | > 400 lines | Ask to split | Ask to split |
107
-
108
- ---
109
-
110
- ## Red Flags
111
-
112
- Watch for these patterns:
113
-
114
- - `// TODO` in production code
115
- - `console.log` left in code
116
- - Commented out code
117
- - `any` type in TypeScript
118
- - Empty catch blocks
119
- - `unwrap()` in Rust production code
120
- - Magic numbers/strings
121
- - Copy-pasted code blocks
122
- - Missing null checks
123
- - Hardcoded URLs/credentials