@boyingliu01/xp-gate 0.18.5 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/adapter-common.sh +27 -0
  2. package/adapters/gate-3.sh +0 -0
  3. package/adapters/gate-4.sh +0 -0
  4. package/adapters/gate-7.sh +0 -0
  5. package/adapters/gate-8.sh +0 -0
  6. package/adapters/gate-9.sh +0 -0
  7. package/adapters/powershell.sh +114 -35
  8. package/adapters/typescript.sh +8 -8
  9. package/build-integrity/__tests__/import-resolver.test.ts +22 -0
  10. package/build-integrity/__tests__/orchestrator.test.ts +1 -2
  11. package/build-integrity/gate-10.ts +7 -0
  12. package/gate-12-file-hygiene.sh +230 -0
  13. package/hooks/adapter-common.sh +27 -0
  14. package/hooks/gate-10.sh +105 -0
  15. package/hooks/gate-12-file-hygiene.sh +0 -0
  16. package/hooks/lib/validate-code-walkthrough.cjs +125 -0
  17. package/hooks/pre-commit +130 -33
  18. package/hooks/pre-push +15 -91
  19. package/lib/__tests__/check-version.test.js +67 -46
  20. package/lib/__tests__/doctor.test.js +7 -6
  21. package/lib/__tests__/gate-runner.test.js +267 -0
  22. package/lib/__tests__/init.test.js +32 -0
  23. package/lib/__tests__/npm-package.test.js +13 -0
  24. package/lib/__tests__/phase-transition.test.js +604 -12
  25. package/lib/__tests__/sprint-discovery.test.ts +0 -1
  26. package/lib/__tests__/sprint-status-rework.test.js +100 -1
  27. package/lib/__tests__/update-hooks.test.js +143 -10
  28. package/lib/__tests__/upgrade-exec.test.js +73 -45
  29. package/lib/__tests__/upgrade-skill-sync.test.js +1 -1
  30. package/lib/__tests__/upgrade.test.js +12 -11
  31. package/lib/doctor.js +2 -1
  32. package/lib/gate-runner.js +68 -23
  33. package/lib/init.js +34 -5
  34. package/lib/install-skill.js +1 -0
  35. package/lib/mattpocock-license-verdict.json +1 -1
  36. package/lib/phase-transition.js +203 -23
  37. package/lib/shared-paths.js +2 -0
  38. package/lib/sprint-status.js +15 -4
  39. package/lib/test-alignment.ts +3 -13
  40. package/lib/update-hooks.js +129 -15
  41. package/mock-policy/AGENTS.md +4 -4
  42. package/mock-policy/__tests__/gate-m3.test.ts +0 -5
  43. package/mock-policy/__tests__/scope-scanner.test.ts +8 -2
  44. package/mutation/AGENTS.md +3 -3
  45. package/mutation/__tests__/mutmut-runner.test.ts +443 -2
  46. package/mutation/__tests__/update-baseline.test.ts +0 -2
  47. package/mutation/runners/mutmut-runner.ts +67 -17
  48. package/package.json +9 -3
  49. package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
  50. package/plugins/claude-code/skills/clipboard-vision/SKILL.md +47 -0
  51. package/plugins/claude-code/skills/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
  52. package/plugins/claude-code/skills/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
  53. package/plugins/claude-code/skills/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
  54. package/plugins/claude-code/skills/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
  55. package/plugins/claude-code/skills/clipboard-vision/describe-clipboard.ps1 +115 -0
  56. package/plugins/claude-code/skills/clipboard-vision/describe-clipboard.sh +161 -0
  57. package/plugins/claude-code/skills/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
  58. package/plugins/claude-code/skills/clipboard-vision/scripts/clipboard-vision.sh +137 -0
  59. package/plugins/claude-code/skills/delphi-review/.delphi-config.json.example +24 -27
  60. package/plugins/claude-code/skills/delphi-review/AGENTS.md +12 -11
  61. package/plugins/claude-code/skills/delphi-review/INSTALL.md +15 -17
  62. package/plugins/claude-code/skills/delphi-review/SKILL.md +30 -29
  63. package/plugins/claude-code/skills/delphi-review/opencode.json.delphi.example +6 -10
  64. package/plugins/claude-code/skills/delphi-review/references/code-walkthrough.md +33 -49
  65. package/plugins/claude-code/skills/delphi-review/references/requirements.md +66 -54
  66. package/plugins/claude-code/skills/delphi-review/references/round-templates.md +7 -7
  67. package/plugins/claude-code/skills/sprint-flow/AGENTS.md +4 -4
  68. package/plugins/claude-code/skills/sprint-flow/SKILL.md +4 -4
  69. package/plugins/claude-code/skills/sprint-flow/references/components/skill-invocations.md +2 -2
  70. package/plugins/claude-code/skills/sprint-flow/references/force-levels.md +37 -35
  71. package/plugins/claude-code/skills/sprint-flow/references/orchestration-rules.md +1 -1
  72. package/plugins/claude-code/skills/sprint-flow/references/phase-1-prep.md +1 -1
  73. package/plugins/claude-code/skills/sprint-flow/references/phase-2-design.md +24 -14
  74. package/plugins/claude-code/skills/sprint-flow/references/phase-4-verify.md +6 -6
  75. package/plugins/claude-code/skills/sprint-flow/references/phase-overview.md +2 -2
  76. package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +3 -3
  77. package/plugins/dsh/README.md +25 -0
  78. package/plugins/dsh/cordis.patch.yml +7 -0
  79. package/plugins/dsh/package.json +70 -0
  80. package/plugins/dsh/scripts/prepack.cjs +82 -0
  81. package/plugins/dsh/skills/admin-template-guidelines/SKILL.md +113 -0
  82. package/plugins/dsh/skills/admin-template-guidelines/references/rule-1.md +91 -0
  83. package/plugins/dsh/skills/admin-template-guidelines/references/rule-2.md +155 -0
  84. package/plugins/dsh/skills/admin-template-guidelines/references/rule-3.md +70 -0
  85. package/plugins/dsh/skills/admin-template-guidelines/references/rule-4.md +154 -0
  86. package/plugins/dsh/skills/admin-template-guidelines/references/rule-5.md +126 -0
  87. package/plugins/dsh/skills/admin-template-guidelines/references/rule-6.md +180 -0
  88. package/plugins/dsh/skills/batch-grill-me/SKILL.md +15 -0
  89. package/plugins/dsh/skills/clipboard-vision/SKILL.md +47 -0
  90. package/plugins/dsh/skills/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
  91. package/plugins/dsh/skills/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
  92. package/plugins/dsh/skills/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
  93. package/plugins/dsh/skills/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
  94. package/plugins/dsh/skills/clipboard-vision/describe-clipboard.ps1 +115 -0
  95. package/plugins/dsh/skills/clipboard-vision/describe-clipboard.sh +161 -0
  96. package/plugins/dsh/skills/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
  97. package/plugins/dsh/skills/clipboard-vision/scripts/clipboard-vision.sh +137 -0
  98. package/plugins/dsh/skills/delphi-review/.delphi-config.json.example +70 -0
  99. package/plugins/dsh/skills/delphi-review/AGENTS.md +67 -0
  100. package/plugins/dsh/skills/delphi-review/INSTALL.md +150 -0
  101. package/plugins/dsh/skills/delphi-review/SKILL.md +559 -0
  102. package/plugins/dsh/skills/delphi-review/hooks.md +19 -0
  103. package/plugins/dsh/skills/delphi-review/opencode.json.delphi.example +52 -0
  104. package/plugins/dsh/skills/delphi-review/references/code-walkthrough.md +470 -0
  105. package/plugins/dsh/skills/delphi-review/references/orchestrator-dispatch.md +64 -0
  106. package/plugins/dsh/skills/delphi-review/references/requirements.md +402 -0
  107. package/plugins/dsh/skills/delphi-review/references/round-templates.md +134 -0
  108. package/plugins/dsh/skills/delphi-review/scripts/verify-consensus.sh +43 -0
  109. package/plugins/dsh/skills/delphi-review/tools.md +29 -0
  110. package/plugins/dsh/skills/domain-modeling/ADR-FORMAT.md +64 -0
  111. package/plugins/dsh/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
  112. package/plugins/dsh/skills/domain-modeling/SKILL.md +74 -0
  113. package/plugins/dsh/skills/grill-with-docs/SKILL.md +7 -0
  114. package/plugins/dsh/skills/grilling/SKILL.md +12 -0
  115. package/plugins/dsh/skills/improve-codebase-architecture/SKILL.md +156 -0
  116. package/plugins/dsh/skills/ralph-loop/SKILL.md +198 -0
  117. package/plugins/dsh/skills/ralph-loop/references/components.md +113 -0
  118. package/plugins/dsh/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
  119. package/plugins/dsh/skills/ralph-loop/references/workflow-details.md +99 -0
  120. package/plugins/dsh/skills/ralph-loop/templates/progress-log.md +36 -0
  121. package/plugins/dsh/skills/sprint-flow/AGENTS.md +103 -0
  122. package/plugins/dsh/skills/sprint-flow/SKILL.md +411 -0
  123. package/plugins/dsh/skills/sprint-flow/__tests__/sprint-flow.test.cjs +457 -0
  124. package/plugins/dsh/skills/sprint-flow/hooks.md +18 -0
  125. package/plugins/dsh/skills/sprint-flow/references/components/memory.md +87 -0
  126. package/plugins/dsh/skills/sprint-flow/references/components/middleware.md +75 -0
  127. package/plugins/dsh/skills/sprint-flow/references/components/skill-invocations.md +105 -0
  128. package/plugins/dsh/skills/sprint-flow/references/components/system-prompt.md +27 -0
  129. package/plugins/dsh/skills/sprint-flow/references/components/tool-descriptions.md +95 -0
  130. package/plugins/dsh/skills/sprint-flow/references/force-levels.md +204 -0
  131. package/plugins/dsh/skills/sprint-flow/references/orchestration-rules.md +236 -0
  132. package/plugins/dsh/skills/sprint-flow/references/phase-1-prep.md +294 -0
  133. package/plugins/dsh/skills/sprint-flow/references/phase-2-design.md +273 -0
  134. package/plugins/dsh/skills/sprint-flow/references/phase-3-build.md +348 -0
  135. package/plugins/dsh/skills/sprint-flow/references/phase-4-verify.md +225 -0
  136. package/plugins/dsh/skills/sprint-flow/references/phase-5-ship.md +222 -0
  137. package/plugins/dsh/skills/sprint-flow/references/phase-6-close.md +266 -0
  138. package/plugins/dsh/skills/sprint-flow/references/phase-overview.md +486 -0
  139. package/plugins/dsh/skills/sprint-flow/scripts/verify-sprint-state.sh +38 -0
  140. package/plugins/dsh/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
  141. package/plugins/dsh/skills/sprint-flow/templates/auto-estimate-output-template.md +110 -0
  142. package/plugins/dsh/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
  143. package/plugins/dsh/skills/sprint-flow/templates/pain-document-template.md +115 -0
  144. package/plugins/dsh/skills/sprint-flow/templates/sprint-progress-template.md +140 -0
  145. package/plugins/dsh/skills/sprint-flow/templates/sprint-summary-template.md +121 -0
  146. package/plugins/dsh/skills/sprint-flow/tools.md +29 -0
  147. package/plugins/dsh/skills/test-driven-development/SKILL.md +371 -0
  148. package/plugins/dsh/skills/test-driven-development/testing-anti-patterns.md +299 -0
  149. package/plugins/dsh/skills/test-specification-alignment/AGENTS.md +56 -0
  150. package/plugins/dsh/skills/test-specification-alignment/SKILL.md +205 -0
  151. package/plugins/dsh/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
  152. package/plugins/dsh/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
  153. package/plugins/dsh/skills/test-specification-alignment/references/specification-format.md +348 -0
  154. package/plugins/dsh/skills/to-issues/SKILL.md +277 -0
  155. package/plugins/dsh/src/command.test.ts +102 -0
  156. package/plugins/dsh/src/command.ts +75 -0
  157. package/plugins/dsh/src/contract.test.ts +62 -0
  158. package/plugins/dsh/src/gate-runner.test.ts +100 -0
  159. package/plugins/dsh/src/gate-runner.ts +58 -0
  160. package/plugins/dsh/src/index.test.ts +97 -0
  161. package/plugins/dsh/src/index.ts +94 -0
  162. package/plugins/dsh/src/skills.test.ts +58 -0
  163. package/plugins/dsh/tsconfig.build.json +13 -0
  164. package/plugins/dsh/tsconfig.json +19 -0
  165. package/plugins/dsh/vitest.config.ts +8 -0
  166. package/plugins/opencode/package.json +1 -1
  167. package/plugins/opencode/scripts/prepack.cjs +1 -0
  168. package/plugins/opencode/skills/clipboard-vision/SKILL.md +47 -0
  169. package/plugins/opencode/skills/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
  170. package/plugins/opencode/skills/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
  171. package/plugins/opencode/skills/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
  172. package/plugins/opencode/skills/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
  173. package/plugins/opencode/skills/clipboard-vision/describe-clipboard.ps1 +115 -0
  174. package/plugins/opencode/skills/clipboard-vision/describe-clipboard.sh +161 -0
  175. package/plugins/opencode/skills/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
  176. package/plugins/opencode/skills/clipboard-vision/scripts/clipboard-vision.sh +137 -0
  177. package/plugins/opencode/skills/delphi-review/.delphi-config.json.example +24 -27
  178. package/plugins/opencode/skills/delphi-review/AGENTS.md +12 -11
  179. package/plugins/opencode/skills/delphi-review/INSTALL.md +15 -17
  180. package/plugins/opencode/skills/delphi-review/SKILL.md +30 -29
  181. package/plugins/opencode/skills/delphi-review/opencode.json.delphi.example +6 -10
  182. package/plugins/opencode/skills/delphi-review/references/code-walkthrough.md +33 -49
  183. package/plugins/opencode/skills/delphi-review/references/requirements.md +66 -54
  184. package/plugins/opencode/skills/delphi-review/references/round-templates.md +7 -7
  185. package/plugins/opencode/skills/sprint-flow/AGENTS.md +4 -4
  186. package/plugins/opencode/skills/sprint-flow/SKILL.md +4 -4
  187. package/plugins/opencode/skills/sprint-flow/references/components/skill-invocations.md +2 -2
  188. package/plugins/opencode/skills/sprint-flow/references/force-levels.md +37 -35
  189. package/plugins/opencode/skills/sprint-flow/references/orchestration-rules.md +1 -1
  190. package/plugins/opencode/skills/sprint-flow/references/phase-1-prep.md +1 -1
  191. package/plugins/opencode/skills/sprint-flow/references/phase-2-design.md +24 -14
  192. package/plugins/opencode/skills/sprint-flow/references/phase-4-verify.md +6 -6
  193. package/plugins/opencode/skills/sprint-flow/references/phase-overview.md +2 -2
  194. package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +3 -3
  195. package/plugins/qoder/plugin.json +1 -1
  196. package/plugins/qoder/skills/clipboard-vision/SKILL.md +47 -0
  197. package/plugins/qoder/skills/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
  198. package/plugins/qoder/skills/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
  199. package/plugins/qoder/skills/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
  200. package/plugins/qoder/skills/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
  201. package/plugins/qoder/skills/clipboard-vision/clipboard-vision/SKILL.md +47 -0
  202. package/plugins/qoder/skills/clipboard-vision/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
  203. package/plugins/qoder/skills/clipboard-vision/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
  204. package/plugins/qoder/skills/clipboard-vision/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
  205. package/plugins/qoder/skills/clipboard-vision/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
  206. package/plugins/qoder/skills/clipboard-vision/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
  207. package/plugins/qoder/skills/clipboard-vision/clipboard-vision/scripts/clipboard-vision.sh +137 -0
  208. package/plugins/qoder/skills/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
  209. package/plugins/qoder/skills/clipboard-vision/scripts/clipboard-vision.sh +137 -0
  210. package/plugins/qoder/skills/delphi-review/.delphi-config.json.example +3 -11
  211. package/plugins/qoder/skills/delphi-review/AGENTS.md +14 -16
  212. package/plugins/qoder/skills/delphi-review/INSTALL.md +12 -12
  213. package/plugins/qoder/skills/delphi-review/SKILL.md +58 -25
  214. package/plugins/qoder/skills/delphi-review/opencode.json.delphi.example +1 -1
  215. package/plugins/qoder/skills/delphi-review/references/code-walkthrough.md +33 -49
  216. package/plugins/qoder/skills/sprint-flow/AGENTS.md +4 -4
  217. package/plugins/qoder/skills/sprint-flow/SKILL.md +2 -2
  218. package/plugins/qoder/skills/sprint-flow/references/force-levels.md +38 -35
  219. package/plugins/qoder/skills/sprint-flow/references/phase-1-prep.md +1 -1
  220. package/plugins/qoder/skills/sprint-flow/references/phase-2-design.md +48 -6
  221. package/plugins/qoder/skills/sprint-flow/references/phase-4-verify.md +5 -6
  222. package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +3 -3
  223. package/principles/AGENTS.md +3 -3
  224. package/scripts/__tests__/sync-package-content.test.js +30 -0
  225. package/scripts/delphi-external-review.cjs +194 -63
  226. package/scripts/sync-package-content.js +9 -2
  227. package/skills/clipboard-vision/SKILL.md +47 -0
  228. package/skills/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
  229. package/skills/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
  230. package/skills/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
  231. package/skills/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
  232. package/skills/clipboard-vision/describe-clipboard.ps1 +115 -0
  233. package/skills/clipboard-vision/describe-clipboard.sh +161 -0
  234. package/skills/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
  235. package/skills/clipboard-vision/scripts/clipboard-vision.sh +137 -0
  236. package/skills/delphi-review/.delphi-config.json.example +24 -27
  237. package/skills/delphi-review/AGENTS.md +12 -11
  238. package/skills/delphi-review/INSTALL.md +15 -17
  239. package/skills/delphi-review/SKILL.md +30 -29
  240. package/skills/delphi-review/opencode.json.delphi.example +6 -10
  241. package/skills/delphi-review/references/code-walkthrough.md +33 -49
  242. package/skills/delphi-review/references/requirements.md +66 -54
  243. package/skills/delphi-review/references/round-templates.md +7 -7
  244. package/skills/sprint-flow/AGENTS.md +4 -4
  245. package/skills/sprint-flow/SKILL.md +4 -4
  246. package/skills/sprint-flow/references/components/skill-invocations.md +2 -2
  247. package/skills/sprint-flow/references/force-levels.md +37 -35
  248. package/skills/sprint-flow/references/orchestration-rules.md +1 -1
  249. package/skills/sprint-flow/references/phase-1-prep.md +1 -1
  250. package/skills/sprint-flow/references/phase-2-design.md +24 -14
  251. package/skills/sprint-flow/references/phase-4-verify.md +6 -6
  252. package/skills/sprint-flow/references/phase-overview.md +2 -2
  253. package/skills/test-specification-alignment/AGENTS.md +3 -3
  254. package/sprint-gate.sh +291 -0
@@ -0,0 +1,559 @@
1
+ ---
2
+ name: delphi-review
3
+ version: 1.1.0
4
+ description: >
5
+ Performs multi-round anonymous expert consensus review using the Delphi method. Supports
6
+ design review (default), code-walkthrough (--mode code-walkthrough), and requirements
7
+ (lightweight, --mode requirements) modes. Uses exactly three experts with distinct executable
8
+ model IDs and a >=90% statistical consensus threshold.
9
+ Outputs structured verdict (APPROVED/PASS_WITH_CAVEATS/REQUEST_CHANGES/BLOCKED).
10
+
11
+ WHAT: Anonymous multi-expert review with iterative consensus building for designs, plans,
12
+ architecture, code changes, and PRs. NOT a single-reviewer pass, NOT a linter, NOT a test runner.
13
+ WHEN: User explicitly requests a review, design validation, multi-expert consensus, code walkthrough
14
+ before push, architecture evaluation, or "/delphi-review".
15
+ NOT WHEN: Asking HOW to review something (educational), mentioning "review" in passing without intent,
16
+ requesting a simple code check or lint, asking about the Delphi process itself, or mentioning
17
+ "review" as part of a different workflow (e.g., "code review" without multi-expert intent),
18
+ asking for review guidelines/checklists/formats, individual peer review, or casual review requests.
19
+
20
+ TRIGGERS: "/delphi-review", "review this design", "评审这个需求", "评审这个设计", "design review",
21
+ "多专家评审", "consensus review", "code walkthrough", "push review", "architecture review",
22
+ "delphi review", "run delphi", "start delphi", "评审这个架构", "review this architecture",
23
+ "评审PR", "review this PR with delphi", "delphi评审", "delphi 评审", "run delphi review",
24
+ "执行delphi", "启动delphi评审", "review the requirements", "评审需求", "requirements review",
25
+ "/requirements-review".
26
+ NEGATIVE TRIGGERS: "how does delphi work", "what is delphi review", "code review checklist",
27
+ "review my code quickly", "can you review this", "peer review", "I need a review",
28
+ "explain the review process", "review guidelines", "how to review a design",
29
+ "code review template", "review format", "PR review", "帮我review一下",
30
+ "just review this", "quick review", "review steps", "review my requirements document".
31
+ maturity: beta
32
+ auto_continue: true
33
+ triggers:
34
+ - "/delphi-review"
35
+ - "review this design"
36
+ - "评审这个需求"
37
+ - "评审这个设计"
38
+ - "design review"
39
+ - "多专家评审"
40
+ - "consensus review"
41
+ - "code walkthrough"
42
+ - "push review"
43
+ - "architecture review"
44
+ - "delphi review"
45
+ - "run delphi"
46
+ - "start delphi"
47
+ - "评审这个架构"
48
+ - "review this architecture"
49
+ - "评审PR"
50
+ - "review this PR with delphi"
51
+ - "delphi评审"
52
+ - "delphi 评审"
53
+ - "run delphi review"
54
+ - "执行delphi"
55
+ - "启动delphi评审"
56
+ - "review the requirements"
57
+ - "评审需求"
58
+ - "requirements review"
59
+ - "/requirements-review"
60
+ triggers_negative_examples:
61
+ - "how does delphi work" # educational question about the process
62
+ - "what is delphi review" # asking for explanation, not execution
63
+ - "code review checklist" # asking for a checklist, not running review
64
+ - "review my code quickly" # single-pass quick review, not Delphi multi-round
65
+ - "can you review this" # ambiguous — could be casual peer review
66
+ - "peer review" # different process from Delphi
67
+ - "I need a review" # too vague, casual request
68
+ - "explain the review process" # educational, not executional
69
+ - "review guidelines" # asking about guidelines, not executing
70
+ - "how to review a design" # educational
71
+ - "PR review" # single-reviewer PR check, not multi-expert Delphi
72
+ - "review my PR" # informal PR review request, not Delphi
73
+ - "帮我review一下" # casual Chinese review request, no multi-expert intent
74
+ - "just review this" # casual, single-pass review request
75
+ - "quick review" # explicitly contradicts multi-round Delphi process
76
+ - "review steps" # asking for review instructions, not running review
77
+ - "code review template" # asking for a template, not executing review
78
+ - "review format" # asking about format, not executing
79
+ - "show me how to review" # educational request about reviewing
80
+ - "review checklist example" # asking for examples, not running review
81
+ - "review my requirements document" # educational discussion about requirements, not executing review
82
+ triggers_negative_test_cases:
83
+ - input: "how does delphi work"
84
+ expect: "NOT triggered"
85
+ - input: "code review checklist"
86
+ expect: "NOT triggered"
87
+ - input: "review my code quickly"
88
+ expect: "NOT triggered"
89
+ - input: "can you review this"
90
+ expect: "NOT triggered"
91
+ - input: "peer review"
92
+ expect: "NOT triggered"
93
+ - input: "I need a review"
94
+ expect: "NOT triggered"
95
+ - input: "explain the review process"
96
+ expect: "NOT triggered"
97
+ - input: "review guidelines"
98
+ expect: "NOT triggered"
99
+ - input: "/delphi-review"
100
+ expect: "triggered"
101
+ - input: "review this design"
102
+ expect: "triggered"
103
+ - input: "评审这个需求"
104
+ expect: "triggered"
105
+ - input: "评审这个设计"
106
+ expect: "triggered"
107
+ - input: "design review"
108
+ expect: "triggered"
109
+ - input: "多专家评审"
110
+ expect: "triggered"
111
+ - input: "consensus review"
112
+ expect: "triggered"
113
+ - input: "code walkthrough"
114
+ expect: "triggered"
115
+ - input: "architecture review"
116
+ expect: "triggered"
117
+ - input: "delphi review"
118
+ expect: "triggered"
119
+ - input: "评审这个架构"
120
+ expect: "triggered"
121
+ - input: "delphi 评审"
122
+ expect: "triggered"
123
+ - input: "run delphi review"
124
+ expect: "triggered"
125
+ - input: "review my PR"
126
+ expect: "NOT triggered"
127
+ - input: "帮我review一下"
128
+ expect: "NOT triggered"
129
+ - input: "just review this"
130
+ expect: "NOT triggered"
131
+ - input: "quick review"
132
+ expect: "NOT triggered"
133
+ - input: "review steps"
134
+ expect: "NOT triggered"
135
+ - input: "code review template"
136
+ expect: "NOT triggered"
137
+ - input: "run delphi"
138
+ expect: "triggered"
139
+ - input: "review the requirements"
140
+ expect: "triggered"
141
+ - input: "评审需求"
142
+ expect: "triggered"
143
+ - input: "requirements review"
144
+ expect: "triggered"
145
+ - input: "/requirements-review"
146
+ expect: "triggered"
147
+ - input: "review my requirements document"
148
+ expect: "NOT triggered"
149
+ workflow_steps:
150
+ - "Step 0: Input Validation → Output: [DelphiReview] or [DelphiReview:BLOCKED]"
151
+ - "Round 1: Anonymous Independent Review → Output: [DelphiReview Round 1] expert JSON verdicts"
152
+ - "Consensus Check → Output: consensus_ratio, verdict summary"
153
+ - "Round 2: Exchange Opinions (if needed) → Output: [DelphiReview Round 2] revised verdicts"
154
+ - "Round 3: Final Positions (if needed) → Output: [DelphiReview Round 3] final verdicts"
155
+ - "Fix & Re-Review (if REQUEST_CHANGES) → restart from Round 2"
156
+ - "Generate Output: consensus report + specification.yaml (design) or .code-walkthrough-result.json (walkthrough)"
157
+ hooks:
158
+ security:
159
+ - "/careful": "Safety guardrails for destructive commands — ensure review is read-only"
160
+ - "/freeze": "Restrict edits to review scope — prevent accidental changes during review"
161
+ - "/guard": "Full safety mode combining careful + freeze for maximum protection"
162
+ operational:
163
+ - "/context-save": "Save review context before pause or handoff"
164
+ - "/context-restore": "Restore review context on resume"
165
+ tools_allowed:
166
+ - "Read" # read design docs, code, configs, specification.yaml
167
+ - "Glob" # find files by pattern
168
+ - "Grep" # search code content
169
+ - "Bash" # read-only: git diff, git log, file stats
170
+ - "Task(subagent_type=oracle)" # dispatch oracle for deep analysis
171
+ - "Task(subagent_type=delphi-reviewer-architecture)" # dispatch architecture expert
172
+ - "Task(subagent_type=delphi-reviewer-technical)" # dispatch technical expert
173
+ - "Task(subagent_type=delphi-reviewer-feasibility)" # dispatch feasibility expert
174
+ - "Write(specification.yaml, .code-walkthrough-result.json, delphi-reviewed.json)" # write output artifacts only
175
+ - "Skill" # invoke related skills for context
176
+ - "Question" # ask user at decision points
177
+ tools_denied:
178
+ - "Edit(source code)" # NEVER edit implementation code during review
179
+ - "Write(source code)" # NEVER write implementation code
180
+ - "Bash(git commit, git push)" # NEVER commit or push during review
181
+ - "Task(category=*, subagent_type=build)" # NEVER delegate build/implementation
182
+ ---
183
+
184
+ # Delphi Consensus Review
185
+
186
+ ## Scope
187
+
188
+ **In Scope:**
189
+ - Multi-round anonymous expert consensus review (design + code-walkthrough modes)
190
+ - Exactly three experts with distinct normalized executable model IDs and statistical consensus (>= 90%)
191
+ - Structured verdict: APPROVED / PASS_WITH_CAVEATS / REQUEST_CHANGES
192
+ - Model nationality, vendor, provider, and gateway are unrestricted.
193
+
194
+ **Out of Scope:**
195
+ - Does NOT implement code changes (review only, implementation is separate)
196
+ - Does NOT replace testing or CI/CD verification
197
+ - Does NOT handle deployment or release decisions
198
+
199
+ ## Triggers
200
+
201
+ - /delphi-review
202
+ - review this design
203
+ - 评审这个需求
204
+ - 评审这个设计
205
+ - design review
206
+ - 多专家评审
207
+ - consensus review
208
+ - code walkthrough
209
+ - push review
210
+ - architecture review
211
+ - delphi review
212
+ - run delphi
213
+ - start delphi
214
+ - 评审这个架构
215
+ - review this architecture
216
+ - 评审PR
217
+ - review this PR with delphi
218
+ - delphi评审
219
+ - delphi 评审
220
+ - run delphi review
221
+ - 执行delphi
222
+ - 启动delphi评审
223
+ - review the requirements
224
+ - 评审需求
225
+ - requirements review
226
+ - /requirements-review
227
+
228
+ **NOT triggered by:**
229
+ - "how does delphi work" (educational)
230
+ - "code review checklist" (asking for a list)
231
+ - "review my code quickly" (single-pass, not multi-expert)
232
+ - "can you review this" (ambiguous casual review)
233
+ - "peer review" (different process)
234
+ - "I need a review" (too vague)
235
+ - "explain the review process" (educational)
236
+ - "review guidelines" (asking about guidelines)
237
+ - "PR review" (single-reviewer PR check)
238
+ - "review my PR" (informal PR review)
239
+ - "帮我review一下" (casual Chinese request)
240
+ - "just review this" (casual single-pass)
241
+ - "quick review" (contradicts multi-round process)
242
+ - "review steps" (asking for instructions)
243
+ - "code review template" (asking for template)
244
+ - "review format" (asking about format)
245
+ - "show me how to review" (educational)
246
+ - "review my requirements document" (educational discussion, not execution)
247
+
248
+ ## Workflow
249
+
250
+ 1. **Step 0: Input Validation** — Check input contains reviewable content (design doc/code/spec/diff). Empty input → `[DelphiReview:BLOCKED]`.
251
+ 2. **Round 1: Anonymous Independent Review** — Invoke architecture, technical, and feasibility independently without exposing their opinions to one another. Every successful result must use `result_type=delphi_expert_result`.
252
+ 3. **Execution Verification** — Verify that all three results succeeded and that their `requested_model` values are three distinct trimmed IDs. A local fallback (`provider: local`) is not an executed expert and cannot satisfy this check; a local hosted endpoint configured as an ordinary callable provider can.
253
+ 4. **Consensus Check** — Aggregate all three successful expert results. Consensus >=90% AND all APPROVED → complete. One expert result is never global approval.
254
+ 5. **Rounds 2-5: Exchange and Final Positions** — If needed, expose prior aggregate evidence, re-evaluate, and stop at the first approved consensus or after five rounds.
255
+ 6. **Failure Handling** — Any expert failure, missing result, duplicate model ID, or unverifiable execution blocks the review. Do not substitute a local fallback or silently reduce the expert count.
256
+ 7. **Generate Output** — Write the consensus report and mode-specific evidence only after aggregation. For code walkthrough, bind the exact-HEAD result after aggregation.
257
+
258
+ ## Activation (MANDATORY for L1 Trigger Detection)
259
+
260
+ Every delphi-review response MUST begin with an activation marker as the first line:
261
+
262
+ | Marker | Meaning |
263
+ |--------|---------|
264
+ | `[DelphiReview]` | Standard entry — review proceeding |
265
+ | `[DelphiReview:BLOCKED]` | Step 0 input validation failure |
266
+ | `[DelphiReview:WARNING]` | Red flag detected (reserved) |
267
+
268
+ ## Round Markers (MANDATORY for L3 Step Adherence)
269
+
270
+ Each round MUST output a structured round marker:
271
+
272
+ ```
273
+ [DelphiReview Round 1] Anonymous Independent Review
274
+ [DelphiReview Round 2] Exchange Opinions
275
+ [DelphiReview Round 3] Final Positions
276
+ ```
277
+
278
+ **Rules**:
279
+ - Every round marker MUST appear as a separate, identifiable line
280
+ - Round numbering MUST be sequential (1 through at most 5)
281
+ - After each round, output consensus summary: `consensus_ratio=N/N`, `verdict_status: converging | stable | diverging`
282
+ - Final round MUST output verdict: `APPROVED | PASS_WITH_CAVEATS | REQUEST_CHANGES | PROCESS_BLOCK`
283
+
284
+ ## 核心原则
285
+
286
+ **Delphi 方法只有一个目的:得到所有专家一致认可的可行方案。**
287
+
288
+ | 特性 | 说明 |
289
+ |------|------|
290
+ | **匿名性** | Round 1 专家互不知道对方意见 |
291
+ | **迭代** | 多轮直到共识,不是固定轮数 |
292
+ | **受控反馈** | 每轮看到其他专家意见 |
293
+ | **统计共识** | >=90% 一致才算共识 |
294
+ | **Token 是投资** | 相比后期修复成本,评审消耗微不足道 |
295
+ | **零容忍** | Critical/Major 全部必须处理,不可跳过 |
296
+
297
+ ---
298
+
299
+ ## 评审模式
300
+
301
+ | 模式 | 触发 | 用途 | 输出 |
302
+ |------|------|------|------|
303
+ | `design`(默认) | `/delphi-review` | 需求/设计/架构/PR 评审 | 共识报告 + specification.yaml |
304
+ | `code-walkthrough` | `--mode code-walkthrough` | git push 前代码走查 | `.code-walkthrough-result.json` |
305
+ | `requirements` | `--mode requirements` | Phase 2 THINK 阶段需求评审 | `.sprint-state/phase-outputs/requirements-reviewed.json` |
306
+
307
+ **Code Walkthrough 模式**的完整规范 → 详见 `references/code-walkthrough.md`
308
+
309
+ **Requirements 模式**的完整规范 → 详见 `references/requirements.md`
310
+
311
+ ---
312
+
313
+ ## 参数配置
314
+
315
+ ### 专家配置
316
+
317
+ | 配置 | 专家 | 适用场景 |
318
+ |------|------|---------|
319
+ | 3 专家(固定) | A(架构) + B(实现) + C(可行性) | 所有评审模式 |
320
+
321
+ ### 模型选择策略(强制 — 平台适配)
322
+
323
+ **关键原则**:
324
+ - ✅ 必须配置 architecture、technical、feasibility 三个专家角色
325
+ - ✅ 三个角色必须使用三个不同的 trimmed、可执行模型 ID
326
+ - ✅ 模型国籍、厂商、provider 和 gateway 不受限制
327
+ - ✅ 三个角色可以共享一个 provider 和 token 计划
328
+ - ❌ `provider: local` 的特殊 fallback 不能计为一次成功执行
329
+
330
+ #### Qoder 平台(推荐 — Custom Agent 模式)
331
+
332
+ Qoder 环境下使用 **Custom Agent** 机制,每个专家是一个独立的 custom agent,配置不同的 Qoder 内置模型:
333
+
334
+ | 专家 | Agent 文件 | 模型 | Credits 费率 |
335
+ |------|-----------|------|-------------|
336
+ | Architecture (A) | `.qoder/agents/delphi-architecture.md` | Qwen3.7-Max | 0.5× |
337
+ | Technical (B) | `.qoder/agents/delphi-technical.md` | GLM-5.2 | 0.6× |
338
+ | Feasibility (C) | `.qoder/agents/delphi-feasibility.md` | DeepSeek-V4-Pro | 0.5× |
339
+
340
+ **执行方式**:通过 Agent tool 并行启动 3 个 subagent(type=GeneralPurpose),每个 agent 使用自己配置的模型独立评审,主 orchestrator 收集结果后计算共识。
341
+
342
+ **优势**:无需外部 API key,直接使用 Qoder Credits,模型由平台统一管理。
343
+
344
+ #### OpenCode 平台(External API 模式)
345
+
346
+ OpenCode 环境下通过 `opencode.json` 的 agent 配置 + `.delphi-config.json` 调用外部 API:
347
+ - **MUST 从 `opencode.json` 的 agent 配置中读取模型**
348
+ - 通过 `scripts/delphi-external-review.cjs` 调用各 provider 的兼容 API
349
+ - 需要用户自行配置 API key(环境变量注入)
350
+
351
+ ### 共识阈值
352
+
353
+ | 阈值 | 说明 |
354
+ |------|------|
355
+ | **>=90%** | 推荐默认 |
356
+ | 100% | 完全一致(更严格) |
357
+
358
+ ---
359
+
360
+ ## 评审执行过程
361
+
362
+ ```
363
+ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
364
+ │
365
+ ├─ 一致 + >=90% + APPROVED → ✅ 完成
366
+ │
367
+ └─ 不一致 或 <90% 或 REQUEST_CHANGES
368
+ │
369
+ ▼
370
+ Round 2: 交换意见 → 共识检查
371
+ │
372
+ ├─ 一致 + >=90% + APPROVED → ✅ 完成
373
+ │
374
+ └─ 仍分歧 或 REQUEST_CHANGES
375
+ │
376
+ ▼
377
+ Round 3: 最终立场 → 共识检查
378
+ │
379
+ ├─ APPROVED → ✅ 完成
380
+ │
381
+ └─ REQUEST_CHANGES → 修复方案 → 回到 Round 2 重新评审
382
+ ```
383
+
384
+ ### Step 0: Input Validation (MANDATORY — 必须在任何评审前执行)
385
+
386
+ 检查用户 prompt 中是否包含可评审内容(设计文档、代码、specification.yaml、PR diff):
387
+
388
+ 1. **有完整输入** → 直接进入 Phase 0(准备阶段),开始 Round 1
389
+ 2. **有部分输入**(占位符、描述性文本)→ 按输入内容执行评审,标注 `[INPUT: PARTIAL]`,但继续执行
390
+ 3. **无输入**(仅触发词,无文档/代码)→ 输出阻断响应
391
+
392
+ **Detection heuristics**:
393
+ - **Complete**: >=1 structural element (##, requirement, AC-, function, class, interface, YAML frontmatter, code block) AND >=50 non-whitespace chars.
394
+ - **Partial**: Descriptive text referencing a design/code artifact BUT lacks structure, OR contains placeholders.
395
+ - **None**: Only trigger words with zero additional content, OR questions about the review process itself.
396
+
397
+ **Partial input constraint**: Cap review to 1 round with `confidence=low` annotation.
398
+
399
+ ---
400
+
401
+ ## 修复与重新评审
402
+
403
+ 如果最终裁决是 REQUEST_CHANGES 或 REJECTED:
404
+ 1. 修复所有 Critical Issues + 处理所有 Major Concerns
405
+ 2. 重新评审(从 Round 2 起步,不是 Round 1)
406
+ 3. 迭代直到 APPROVED
407
+
408
+ ---
409
+
410
+ ## 终止条件
411
+
412
+ | 参数 | 默认值 | 说明 |
413
+ |------|--------|------|
414
+ | `max_review_rounds` | 5 | 超过后生成"未达成共识报告",交人决策 |
415
+ | `timeout` | 60min | 单次评审超时 |
416
+
417
+ ---
418
+
419
+ ## Output Format (MANDATORY for L3)
420
+
421
+ Every Delphi mode MUST use the full JSON schema below. Architecture, technical, and feasibility each output independently; the orchestrator verifies all three executions before aggregating `consensus_report`. There is no single-reviewer Delphi approval path.
422
+
423
+ ```json
424
+ {
425
+ "expert_id": "A|B|C",
426
+ "round": 1,
427
+ "mode": "design",
428
+ "verdict": "APPROVED|REQUEST_CHANGES|REJECTED",
429
+ "confidence": 9,
430
+ "critical_issues": ["..."],
431
+ "major_concerns": ["..."],
432
+ "minor_concerns": ["..."],
433
+ "consensus_report": {
434
+ "agreed_items": ["..."],
435
+ "disagreed_items": ["..."],
436
+ "final_verdict": "APPROVED|REQUEST_CHANGES",
437
+ "consensus_ratio": 0.95
438
+ }
439
+ }
440
+ ```
441
+
442
+ **For code-walkthrough mode**, output follows `.code-walkthrough-result.json` schema (see `references/code-walkthrough.md`).
443
+
444
+ **For requirements mode**, output follows `requirements-reviewed.json` schema (see `references/requirements.md`):
445
+
446
+ ```json
447
+ {
448
+ "mode": "requirements",
449
+ "verdict": "APPROVED|GAPS_FOUND",
450
+ "timestamp": "2026-07-25T10:30:00Z",
451
+ "consensus_ratio": 1.0,
452
+ "requirements_hash": "<SHA-256 hex digest>",
453
+ "head_commit": "<git rev-parse HEAD>",
454
+ "context_file_used": "CONTEXT.md",
455
+ "round": 1,
456
+ "expert_verdicts": [
457
+ { "role": "architecture", "verdict": "APPROVED", "confidence": 9, "result_type": "delphi_expert_result", "requested_model": "provider/model-a" },
458
+ { "role": "technical", "verdict": "APPROVED", "confidence": 8, "result_type": "delphi_expert_result", "requested_model": "provider/model-b" },
459
+ { "role": "feasibility", "verdict": "APPROVED", "confidence": 8, "result_type": "delphi_expert_result", "requested_model": "provider/model-c" }
460
+ ],
461
+ "requirements_statement": "<short summary of what was reviewed>",
462
+ "gaps_found": [],
463
+ "rounds_used": 1,
464
+ "escalation_needed": false
465
+ }
466
+ ```
467
+
468
+ Schema-v2 Phase 2 requires `requirements_statement`, `timestamp`, `consensus_ratio`, `expert_verdicts`, `head_commit`, and `requirements_hash`. The hash is SHA-256 of the exact concatenation `requirements_statement + project-relative context file UTF-8 content if used + timestamp YYYY-MM-DD`; context paths must remain inside the project after realpath resolution.
469
+
470
+ **Anti-patterns mapping:**
471
+ - `Round 1 → "评审完成"` → MUST NOT have `verdict: APPROVED` if `critical_issues` exist
472
+ - `只处理 Critical,忽略 Major` → MUST include `major_concerns` array
473
+ - `用户说"时间紧急"就跳过` → MUST include `round` field proving multi-round process
474
+
475
+ ---
476
+
477
+ ## Terminal State Checklist
478
+
479
+ - [ ] Phase 0 完成(文档验证 + 专家分配)
480
+ - [ ] 已完成所需轮次(最多 5 轮,每轮三位专家均执行)
481
+ - [ ] 问题共识比例 >=90%
482
+ - [ ] 所有 Critical Issues 已解决,Major Concerns 已处理
483
+ - [ ] 最终裁决是 **APPROVED** 或 **APPROVED_WITH_MINOR**
484
+ - [ ] 共识报告生成并保存
485
+ - [ ] IF REQUEST_CHANGES → 已修复 → 已重新评审 → APPROVED
486
+ - [ ] ⭐ **IF APPROVED (design mode): 生成 specification.yaml**
487
+ - [ ] ⭐ **状态文件**: 写入 `.sprint-state/delphi-reviewed.json`
488
+
489
+ **IF REQUEST_CHANGES/REJECTED → CANNOT claim complete**
490
+
491
+ ### 状态文件格式
492
+
493
+ **Design mode APPROVED** → `.sprint-state/delphi-reviewed.json`:
494
+ ```json
495
+ {"mode":"design","timestamp":"...","verdict":"APPROVED","consensus_ratio":1.0,"specification_path":".sprint-state/phase-outputs/specification.yaml"}
496
+ ```
497
+
498
+ **Code-walkthrough mode APPROVED** → `.sprint-state/delphi-reviewed.json`:
499
+ ```json
500
+ {"mode":"code-walkthrough","commit":"abc123...","timestamp":"...","verdict":"APPROVED","consensus_ratio":1.0}
501
+ ```
502
+
503
+ **Requirements mode APPROVED** → `.sprint-state/delphi-reviewed.json`:
504
+ ```json
505
+ {"mode":"requirements","timestamp":"...","verdict":"APPROVED","consensus_ratio":1.0}
506
+ ```
507
+
508
+ ---
509
+
510
+ ## Anti-Patterns
511
+
512
+ | ❌ 错误 | ✅ 正确 |
513
+ |---------|---------|
514
+ | Round 1 未 APPROVED 就"评审完成" | 迭代直到 APPROVED,修复后重新评审 |
515
+ | 只处理 Critical,忽略 Major | 零容忍:Critical/Major 全部必须处理 |
516
+ | 单专家自评 | 必须运行 architecture、technical、feasibility 三位专家,并聚合三份成功结果 |
517
+ | 用户说"时间紧急"就跳过 | 评审是投资不是开销 |
518
+ | "专家几乎一致"就通过 | "几乎" = 不一致,继续到 >=90% |
519
+ | 使用任何国籍或厂商的模型 | 模型国籍和厂商均不受限制,仍必须满足三个 distinct executable model IDs |
520
+ | 三个专家同一 provider | 允许共享 provider,只要三个 requested_model IDs distinct 且每个调用成功 |
521
+
522
+ **Code-walkthrough 专属 Anti-Patterns** → 详见 `references/code-walkthrough.md`
523
+
524
+ **Requirements 专属 Anti-Patterns** → 详见 `references/requirements.md`
525
+
526
+ ---
527
+
528
+ ## Red Flags
529
+
530
+ | 用户输入模式 | 触发词 | 响应动作 |
531
+ |-------------|--------|---------|
532
+ | 要求跳过评审 | "skip review", "不用评审", "跳过评审" | → 提醒评审是投资而非开销 |
533
+ | 时间压力 | "来不及", "时间紧", "emergency" | → 提醒时间紧迫正是需要评审的时刻 |
534
+ | 提前终止 | Round 1 后用户说 "可以了", "够了" | → BLOCK: 评审未达终止条件 |
535
+ | 单专家自评 | 用户仅指定 1 个专家 | → BLOCK:Delphi 必须执行 architecture、technical、feasibility 三位专家 |
536
+ | 无文档输入 | 仅触发词,无设计/代码内容 | → `[DelphiReview:BLOCKED]` |
537
+
538
+ ---
539
+
540
+ ## 成功标准
541
+
542
+ 1. ✅ 所有专家裁决 APPROVED
543
+ 2. ✅ 问题共识 >=90%
544
+ 3. ✅ 所有 Critical Issues 已修复验证 + Major Concerns 已处理
545
+ 4. ✅ 共识报告已生成,用户已确认
546
+ 5. ✅ 状态文件已写入
547
+
548
+ **缺少任何一项 = 未完成**
549
+
550
+ ## References
551
+
552
+ > **Path convention**: `@references/` resolves relative to the skill directory (`skills/delphi-review/`).
553
+
554
+ | File | Content |
555
+ |------|---------|
556
+ | `@references/code-walkthrough.md` | Code-walkthrough mode specification |
557
+ | `@references/requirements.md` | Requirements mode specification |
558
+ | `@references/orchestrator-dispatch.md` | Orchestrator auto-dispatch rules (#218 subagent multi-round loop) |
559
+ | `@references/round-templates.md` | Round templates (anonymous/exchange/final/fix report formats) |
@@ -0,0 +1,19 @@
1
+ # Hooks — Delphi Review
2
+
3
+ Delphi Review integrates with safety and operational hooks to ensure review integrity
4
+ and context preservation.
5
+
6
+ ## Security Hooks
7
+
8
+ | Hook | Purpose | Activation |
9
+ |------|---------|------------|
10
+ | `/careful` | Safety guardrails for destructive commands | Ensure review is read-only — block any destructive operations |
11
+ | `/freeze` | Restrict edits to review scope | Prevent accidental changes during review |
12
+ | `/guard` | Full safety mode (careful + freeze) | Maximum protection — read-only review with no accidental edits |
13
+
14
+ ## Operational Hooks
15
+
16
+ | Hook | Purpose | Activation |
17
+ |------|---------|------------|
18
+ | `/context-save` | Save review context before pause or handoff | Before pausing review or switching tasks |
19
+ | `/context-restore` | Restore review context on resume | When resuming review from pause or handoff |
@@ -0,0 +1,52 @@
1
+ {
2
+ "$comment": [
3
+ "Delphi Review Agent Configuration Template",
4
+ "===========================================",
5
+ "Copy the relevant 'agent' block below into your opencode.json.",
6
+ "Replace the example model IDs with three callable IDs available through your configured provider.",
7
+ "The three model fields must be different after trimming; providers may be shared."
8
+ ],
9
+
10
+ "$example_providers": {
11
+ "SharedProviderExample": "bailian-tp/qwen-plus"
12
+ },
13
+
14
+ "agent": {
15
+ "delphi-reviewer-architecture": {
16
+ "description": "Delphi expert reviewer for architecture perspective. Focuses on requirements alignment, system design, and high-level coherence.",
17
+ "mode": "subagent",
18
+ "model": "bailian-tp/qwen-plus",
19
+ "prompt": "You are a Delphi expert reviewer specializing in architecture and requirements alignment. Review the input for: 1) Alignment with stated goals 2) Architectural coherence 3) System-level implications 4) Trade-offs and alternatives. Output structured review with verdict (APPROVED/REQUEST_CHANGES/REJECTED) and confidence level.",
20
+ "tools": {
21
+ "read": true,
22
+ "bash": true,
23
+ "write": false,
24
+ "edit": false
25
+ }
26
+ },
27
+ "delphi-reviewer-technical": {
28
+ "description": "Delphi expert reviewer for technical depth. Focuses on implementation details, code correctness, and edge cases. Used in delphi-review.",
29
+ "mode": "subagent",
30
+ "model": "bailian-tp/deepseek-v3",
31
+ "prompt": "You are a Delphi expert reviewer specializing in technical implementation. Review the input for: 1) Implementation correctness 2) Code quality and patterns 3) Edge cases and error handling 4) Performance implications. Output structured review with verdict (APPROVED/REQUEST_CHANGES/REJECTED) and confidence level.",
32
+ "tools": {
33
+ "read": true,
34
+ "bash": true,
35
+ "write": false,
36
+ "edit": false
37
+ }
38
+ },
39
+ "delphi-reviewer-feasibility": {
40
+ "description": "Delphi expert reviewer for feasibility analysis. Focuses on practical constraints, risks, and execution viability. Used in delphi-review.",
41
+ "mode": "subagent",
42
+ "model": "bailian-tp/glm-4.5",
43
+ "prompt": "You are a Delphi expert reviewer specializing in feasibility and risk analysis. Review the input for: 1) Practical constraints (time, resources, dependencies) 2) Risk identification and mitigation 3) Execution complexity 4) Alternative approaches. Output structured review with verdict (APPROVED/REQUEST_CHANGES/REJECTED) and confidence level.",
44
+ "tools": {
45
+ "read": true,
46
+ "bash": true,
47
+ "write": false,
48
+ "edit": false
49
+ }
50
+ }
51
+ }
52
+ }