@boyingliu01/opencode-plugin 0.10.17 → 0.11.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/opencode-plugin",
3
- "version": "0.10.17",
3
+ "version": "0.11.1",
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
6
  "description": "XP-Gate quality gates + AI workflow skills + Sprint Flow TUI sidebar for OpenCode",
@@ -1,9 +1,9 @@
1
1
  # SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-26
4
- **Commit:** afab469
3
+ **Generated:** 2026-06-30
4
+ **Commit:** 9289349
5
5
  **Branch:** main
6
- **Version:** 0.10.17.0
6
+ **Version:** 0.11.1.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, 3 experts from ≥2 providers, domestic models only). Supports design + code-walkthrough modes.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: delphi-review
3
- description: "Use when asked to review a design, plan, or architecture; before implementation starts; or when multi-expert consensus is needed. Triggers: 'review this design', '评审这个需求', 'design review', '多专家评审', 'consensus review', 'code walkthrough', 'push review', 'architecture review', 'PR review', or any request for multi-expert evaluation of requirements, design docs, or PRs."
3
+ description: "Use when asked to review a design, plan, or architecture; before implementation starts; or when multi-expert consensus is needed. See ## Triggers for trigger phrases."
4
4
  auto_continue: true
5
5
  ---
6
6
 
@@ -19,6 +19,40 @@ auto_continue: true
19
19
  - Does NOT replace testing or CI/CD verification
20
20
  - Does NOT handle deployment or release decisions
21
21
 
22
+ ## Triggers
23
+
24
+ - /delphi-review
25
+ - review this design
26
+ - 评审这个需求
27
+ - 评审这个设计
28
+ - design review
29
+ - 多专家评审
30
+ - consensus review
31
+ - code walkthrough
32
+ - push review
33
+ - architecture review
34
+ - PR review
35
+
36
+ ## 工作流程
37
+
38
+ 1. Input Validation: 检查输入是否包含可评审内容(设计文档/代码/spec),空输入阻断
39
+ 2. Expert Assignment: 分配 2-3 位专家,至少来自 2 家不同厂商(国产模型)
40
+ 3. Round 1: 匿名独立评审 — 各专家互不知对方意见,独立输出 verdict JSON
41
+ 4. Consensus Check: 共识检查 — 共识 ≥90% 且全部 APPROVED 则完成
42
+ 5. Round 2: 交换意见 — 未达成共识时,专家查看他人意见后重新评审
43
+ 6. Round 3: 最终立场 — 仍未达成共识时,输出最终立场和分歧点
44
+ 7. Fix & Re-Review: REQUEST_CHANGES → 修复 Critical+Major → 从 Round 2 重新评审
45
+ 8. Generate Output: 生成共识报告 + specification.yaml + delphi-reviewed.json
46
+
47
+ ## Activation
48
+ **MANDATORY**: Every delphi-review response MUST begin with `[DelphiReview]` as the first line.
49
+ This marker is required for skill-cert L1 trigger detection.
50
+
51
+ Permitted variants (all satisfy L1 trigger):
52
+ - `[DelphiReview]` — standard entry
53
+ - `[DelphiReview:BLOCKED]` — Step 0 input validation failure
54
+ - `[DelphiReview:WARNING]` — red flag detected (reserved)
55
+
22
56
  ## 核心原则
23
57
 
24
58
  **Delphi 方法只有一个目的:得到所有专家一致认可的可行方案。**
@@ -104,6 +138,46 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
104
138
  └─ REQUEST_CHANGES → 修复方案 → 回到 Round 2 重新评审
105
139
  ```
106
140
 
141
+ ### Step 0: Input Validation (MANDATORY — 必须在任何评审前执行)
142
+
143
+ 检查用户 prompt 中是否包含可评审内容(设计文档、代码、specification.yaml、PR diff):
144
+
145
+ 1. **有完整输入** → 直接进入 Phase 0(准备阶段),开始 Round 1
146
+ 2. **有部分输入**(占位符、描述性文本)→ 按输入内容执行评审,标注 `[INPUT: PARTIAL]`,但继续执行
147
+ 3. **无输入**(仅触发词,无文档/代码)→ 输出以下阻断响应,记入步骤完成:
148
+
149
+ **Detection heuristics for Step 0**:
150
+ - **Complete**: Contains ≥1 structural element (e.g., `##`, `requirement`, `AC-`, `function`, `class`, `interface`, YAML frontmatter, code block with language tag) AND ≥50 non-whitespace characters of actual content (not placeholder brackets like `[...]`, `{...}`, `<insert here>`).
151
+ - **Partial**: Contains descriptive text referencing a design/code artifact BUT lacks substantive structure (e.g., "I need to review my login module" with no actual code/design attached), OR contains obvious placeholders like `[...]`, `(content)`, `<insert here>`, `TODO`.
152
+ - **None**: Only trigger words (`/delphi-review`, "review this") with zero additional content, OR content that is exclusively questions about the review process itself ("how does delphi work?").
153
+
154
+ **Partial input constraint**: When input is PARTIAL, cap review to 1 round with `confidence=low` annotation. Do NOT proceed with full multi-round review on insufficient input.
155
+
156
+ **File path validation**: If user provides a file path (e.g., `--spec specification.yaml`):
157
+ - Verify the file exists and is non-empty
158
+ - If path is invalid → output: `[DelphiReview:BLOCKED] File not found: [path]. Please verify the path.`
159
+ - If file is empty → output: `[DelphiReview:BLOCKED] File is empty: [path]. Please provide valid content.`
160
+
161
+ ```
162
+ [DelphiReview:BLOCKED] 需要设计文档或代码内容才能启动评审。
163
+
164
+ 请提供以下之一:
165
+ - 设计文档(design doc / specification)
166
+ - 代码变更(code diff / PR link)
167
+ - specification.yaml 文件路径
168
+ - 架构设计说明
169
+
170
+ 评审输入示例:
171
+ /delphi-review "Design Doc: [your content here]"
172
+ /delphi-review --spec specification.yaml
173
+ /delphi-review --mode code-walkthrough
174
+ REMAINING STEPS: N/A (input validation failed)
175
+ ```
176
+
177
+ 在此状态下,BLOCKED 视为步骤已完成(后续步骤标记为 N/A)。
178
+
179
+ **重要**: 内嵌在 prompt 中的文档内容(如 "Design Doc: [content]"或代码片段)应视为"有完整输入",直接进入评审。
180
+
107
181
  **Round 模板**(匿名评审/交换意见/最终立场/修复报告格式)→ 详见 `references/round-templates.md`
108
182
 
109
183
  **Orchestrator 自动调度规则**(#218 subagent 内部自动多轮循环)→ 详见 `references/orchestrator-dispatch.md`
@@ -165,6 +239,23 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
165
239
 
166
240
  ## Output Format (MANDATORY)
167
241
 
242
+ **Single 模式简化输出**: 当 single reviewer 模式(非 Multi-Expert)时,可使用简化输出格式:
243
+ - verdict + confidence + issues_list(合并 critical/major/minor)+ summary
244
+ - 完整 JSON 格式保留用于 multi-expert 多轮评审场景
245
+
246
+ **Single 模式简化模板**:
247
+ ```
248
+ [DelphiReview] verdict=APPROVED | REQUEST_CHANGES | BLOCKED
249
+ confidence=N/10
250
+ issues=[critical: N, major: N, minor: N]
251
+ summary: [1-2 sentence verdict summary]
252
+ ```
253
+
254
+ **⚠️ Single vs Multi-Expert Output**:
255
+ - **Multi-Expert Mode (default)**: MUST use the full JSON schema below. Each expert outputs independently; the orchestrator aggregates into `consensus_report`. DO NOT use the simplified template.
256
+ - **Single Reviewer Mode** (explicitly invoked with `--single`): MAY use the simplified text template above.
257
+ - **Never mix formats**. If you are one of multiple experts in the same round, output JSON only.
258
+
168
259
  ```json
169
260
  {
170
261
  "expert_id": "A|B|C",
@@ -243,10 +334,23 @@ Phase 0: 准备 → Round 1: 匿名独立评审 → 共识检查
243
334
 
244
335
  ## Red Flags
245
336
 
337
+ ### 检测触发器(模型可执行检测)
338
+
339
+ | 用户输入模式 | 触发词 | 响应动作 |
340
+ |-------------|--------|---------|
341
+ | 要求跳过评审 | "skip review", "不用评审", "跳过评审", "直接提交", "不评审" | → 提醒: `[DelphiReview] 评审是投资而非开销。Delphi 设计要求多轮共识(>=90%),不可快速跳过。` |
342
+ | 时间压力 | "来不及", "时间紧", "emergency", "赶时间", "deadline" | → 提醒: `[DelphiReview] 时间紧迫正是需要评审的时刻。跳过评审省 30 分钟,后期修复可能花 3 天。` |
343
+ | 提前终止 | Round 1 后用户说 "可以了", "够了", "enough" | → BLOCK: `[DelphiReview:BLOCKED] 评审未达终止条件。仍需 [共识>=90% + 所有 Critical/Major 已处理]。` |
344
+ | 单专家自评 | 用户仅指定 1 个专家 或 说 "我自己看了" | → 提醒: `[DelphiReview] 至少需要 2 位不同 provider 的专家参与评审。` |
345
+ | 无文档输入 | 仅触发词,无设计/代码内容 | → 输出 `[DelphiReview:BLOCKED]` 阻断响应(见 Step 0) |
346
+
347
+ ### 原则性声明
348
+
246
349
  | 借口 | 现实 |
247
350
  |------|------|
248
351
  | "这只是小变更" | 所有变更都需要评审 |
249
352
  | "Round 1 就够了" | 不够,必须多轮直到共识 |
353
+ | "生成报告就完成了" | APPROVED 才算完成 |
250
354
  | "2/3 同意就是共识" | 还要检查问题共识比例 >=90% |
251
355
 
252
356
  ---
@@ -1,9 +1,9 @@
1
1
  # SKILLS/SPRINT-FLOW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-26
4
- **Commit:** afab469
3
+ **Generated:** 2026-06-30
4
+ **Commit:** 9289349
5
5
  **Branch:** main
6
- **Version:** 0.10.17.0
6
+ **Version:** 0.11.1.0
7
7
 
8
8
  ## OVERVIEW
9
9
  **11-phase** development pipeline: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW → SHIP → LAND → USER ACCEPTANCE → FEEDBACK → CLEANUP. Phase 2 default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE in Phase 1: design must pass Delphi review (≥90% consensus) before any coding.
@@ -1,9 +1,9 @@
1
1
  # SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-26
4
- **Commit:** afab469
3
+ **Generated:** 2026-06-30
4
+ **Commit:** 9289349
5
5
  **Branch:** main
6
- **Version:** 0.10.17.0
6
+ **Version:** 0.11.1.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.