@boyingliu01/xp-gate 0.10.11 → 0.10.13

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 (50) hide show
  1. package/lib/__tests__/check-version.test.js +19 -5
  2. package/lib/__tests__/doctor.test.js +155 -0
  3. package/lib/__tests__/install-skill.test.js +1 -1
  4. package/lib/doctor.js +126 -0
  5. package/lib/init.js +12 -0
  6. package/mock-policy/AGENTS.md +3 -3
  7. package/mutation/AGENTS.md +3 -3
  8. package/package.json +1 -1
  9. package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
  10. package/plugins/claude-code/skills/delphi-review/AGENTS.md +3 -3
  11. package/plugins/claude-code/skills/sprint-flow/AGENTS.md +3 -3
  12. package/plugins/claude-code/skills/sprint-flow/SKILL.md +6 -9
  13. package/plugins/claude-code/skills/sprint-flow/references/orchestration-rules.md +8 -6
  14. package/plugins/claude-code/skills/sprint-flow/references/phase-1-plan.md +2 -2
  15. package/plugins/claude-code/skills/sprint-flow/references/phase-3-review.md +3 -1
  16. package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +3 -3
  17. package/plugins/opencode/__tests__/tui-plugin.test.ts +121 -1
  18. package/plugins/opencode/__tests__/xp-gate-e2e-upgrade.test.ts +562 -0
  19. package/plugins/opencode/index.ts +2 -0
  20. package/plugins/opencode/package.json +1 -1
  21. package/plugins/opencode/skills/delphi-review/AGENTS.md +3 -3
  22. package/plugins/opencode/skills/sprint-flow/AGENTS.md +3 -3
  23. package/plugins/opencode/skills/sprint-flow/SKILL.md +6 -9
  24. package/plugins/opencode/skills/sprint-flow/references/orchestration-rules.md +8 -6
  25. package/plugins/opencode/skills/sprint-flow/references/phase-1-plan.md +2 -2
  26. package/plugins/opencode/skills/sprint-flow/references/phase-3-review.md +3 -1
  27. package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +3 -3
  28. package/plugins/opencode/tui-plugin.ts +24 -7
  29. package/plugins/qoder/plugin.json +1 -1
  30. package/plugins/qoder/skills/delphi-review/AGENTS.md +3 -3
  31. package/plugins/qoder/skills/sprint-flow/AGENTS.md +3 -3
  32. package/plugins/qoder/skills/sprint-flow/SKILL.md +191 -1088
  33. package/plugins/qoder/skills/sprint-flow/references/orchestration-rules.md +365 -0
  34. package/plugins/qoder/skills/sprint-flow/references/phase-1-plan.md +2 -2
  35. package/plugins/qoder/skills/sprint-flow/references/phase-2-build.md +25 -180
  36. package/plugins/qoder/skills/sprint-flow/references/phase-3-review.md +3 -1
  37. package/plugins/qoder/skills/sprint-flow/references/phase-6-ship.md +4 -188
  38. package/plugins/qoder/skills/sprint-flow/references/phase-7-land.md +4 -135
  39. package/plugins/qoder/skills/sprint-flow/references/phase-8-cleanup.md +4 -187
  40. package/plugins/qoder/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +6 -0
  41. package/plugins/qoder/skills/sprint-flow/references/phase-minus-1-isolate.md +58 -0
  42. package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +3 -3
  43. package/principles/AGENTS.md +3 -3
  44. package/skills/delphi-review/AGENTS.md +3 -3
  45. package/skills/sprint-flow/AGENTS.md +3 -3
  46. package/skills/sprint-flow/SKILL.md +6 -9
  47. package/skills/sprint-flow/references/orchestration-rules.md +8 -6
  48. package/skills/sprint-flow/references/phase-1-plan.md +2 -2
  49. package/skills/sprint-flow/references/phase-3-review.md +3 -1
  50. package/skills/test-specification-alignment/AGENTS.md +3 -3
@@ -322,6 +322,8 @@ export const XpGatePlugin = async (input: OpenCodePluginInput) => {
322
322
  if (!checked) {
323
323
  checked = true
324
324
  const msg = await runBackgroundUpdates(directory).catch(() => null)
325
+ // Primary notification: upgrade-notice.json → TUI sidebar banner
326
+ // Fallback: stderr for users without TUI panel registered
325
327
  if (msg) process.stderr.write(`${msg}\n`)
326
328
  }
327
329
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/opencode-plugin",
3
- "version": "0.10.11",
3
+ "version": "0.10.13",
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-23
4
- **Commit:** bac916f
3
+ **Generated:** 2026-06-24
4
+ **Commit:** 5019773
5
5
  **Branch:** main
6
- **Version:** 0.10.11.0
6
+ **Version:** 0.10.13.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,9 +1,9 @@
1
1
  # SKILLS/SPRINT-FLOW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-23
4
- **Commit:** bac916f
3
+ **Generated:** 2026-06-24
4
+ **Commit:** 5019773
5
5
  **Branch:** main
6
- **Version:** 0.10.11.0
6
+ **Version:** 0.10.13.0
7
7
 
8
8
  ## OVERVIEW
9
9
  **11-phase** development pipeline: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW → USER ACCEPTANCE → FEEDBACK → SHIP → LAND → 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.
@@ -237,11 +237,11 @@ Sprint Flow: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW
237
237
  - **HARD-GATE**: 设计未批准 → 不可进入实现
238
238
 
239
239
  ### Phase 1: PLAN(共识评审)
240
- - **注意**: `autoplan` 和 `to-issues` 是交互式 skill,**必须由 orchestrator 直接执行**(Issue #225, #248)
241
- - **执行模式(三阶段)**:
240
+ - **注意**: `autoplan`、`delphi-review` 和 `to-issues` 均为交互式 skill,**必须由 orchestrator 直接执行**(Issue #225, #248, #249
241
+ - **执行模式(三阶段,全部 orchestrator 直接执行)**:
242
242
  1. **Orchestrator 直接执行 autoplan**: `skill(name="autoplan")` → 用户确认 taste_decisions
243
- 2. **Orchestrator 直接执行 to-issues**: `skill(name="to-issues")` 用户确认 Issue 拆分方案
244
- 3. **Subagent 执行 delphi-review**: `task(category="deep", load_skills=["delphi-review"])` 非交互式,可自动运行至 APPROVED
243
+ 2. **Orchestrator 直接执行 delphi-review**: `skill(name="delphi-review")` 等待 APPROVED(非 APPROVED 时需等待用户确认/处理)
244
+ 3. **Orchestrator 直接执行 to-issues**: `skill(name="to-issues")` 用户确认 Issue 拆分方案
245
245
  - 输入: phase-0-summary.md + 设计文档
246
246
  - 输出: `specification.yaml`(含 user_stories[])+ `slices-manifest.json`
247
247
 
@@ -276,13 +276,10 @@ Sprint Flow: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW
276
276
  5. **Mock Minimization**: integration-first, mock 仅限 external services, 密度 > 30% 需 `@mock-justified`
277
277
 
278
278
  ### Phase 3: REVIEW + TEST(验证)
279
- - **Subagent dispatch**: orchestrator 通过 `task(category="deep", load_skills=["delphi-review", "test-specification-alignment"])` 启动独立 session
279
+ - **Orchestrator 直接执行**: delphi-review code-walkthrough 需要用户确认 verdict(Issue #249),**必须由 orchestrator 直接调用** `skill(name="delphi-review")`
280
+ - **Orchestrator 按序执行**: `delphi-review --mode code-walkthrough` → 等待 APPROVED → `test-specification-alignment` → `browse` (gstack) → 可选 `qa`/`design-review`/`benchmark` (gstack)
280
281
  - 输入: phase-2-summary.md + MVP 代码
281
282
  - 输出: 评审报告 + 测试对齐结果
282
- - `delphi-review --mode code-walkthrough` — 多专家匿名代码走查
283
- - `test-specification-alignment` — 测试与 Spec 对齐验证
284
- - `browse` (gstack) — 浏览器自动化测试
285
- - `k6` / `locust` / `gatling` — 负载/压力测试(可选,后端项目)
286
283
 
287
284
  ### 负载/压力测试(可选)
288
285
  - **适用项目**:主要用于后端服务的压力测试 (k6/Locust/Gatling),Web 前端已有 `benchmark` 技能覆盖 Core Web Vitals、加载时间和资源大小等性能指标
@@ -31,9 +31,9 @@
31
31
  | -1 | ISOLATE | ❌ | Bash(直接执行) | 无 | orchestrator |
32
32
  | -0.5 | AUTO-ESTIMATE | ❌ | Bash(直接执行) | 无 | orchestrator |
33
33
  | 0 | THINK | ❌ | orchestrator(直接执行) | `["brainstorming"]` | orchestrator |
34
- | 1 | PLAN | ⚠️ | orchestrator 执行 autoplan + to-issues(交互)→ subagent 执行 delphi-review | 见下方说明 | orchestrator + subagent |
34
+ | 1 | PLAN | | orchestrator(直接执行) | `["autoplan", "delphi-review", "to-issues"]` | orchestrator |
35
35
  | 2 | BUILD | ✅ | ralph-loop | `["test-driven-development"]` | subagent |
36
- | 3 | REVIEW | | `deep` | `["delphi-review", "test-specification-alignment"]` | subagent |
36
+ | 3 | REVIEW | | orchestrator(直接执行) | `["delphi-review", "test-specification-alignment"]` | orchestrator |
37
37
  | 4 | USER ACCEPT | ❌ | **强制人工** | 无 | 用户 |
38
38
  | 5 | FEEDBACK | ✅ | `quick` | `["learn", "retro", "systematic-debugging"]` | subagent |
39
39
  | 6 | SHIP | ❌ | orchestrator(直接执行) | `["finishing-a-development-branch", "ship"]` | orchestrator |
@@ -46,15 +46,17 @@
46
46
  |-------|-------|---------------------------|
47
47
  | 0 | `brainstorming` | 需要与用户对话确认需求、提出澄清问题。Subagent 是 fire-and-forget 模式,无法暂停等待用户输入(Issue #217) |
48
48
  | 1 | `autoplan` | taste_decisions 节点暂停等待用户确认。必须由 orchestrator 直接执行(Issue #225) |
49
+ | 1 | `delphi-review` | design 模式需等待 verdict APPROVED;非 APPROVED 时需用户确认是否接受分歧方案(Issue #249) |
49
50
  | 1 | `to-issues` | Step 6 "向用户确认" — 展示拆分结果,等待用户批准后才生成 slices-manifest.json |
51
+ | 3 | `delphi-review --mode code-walkthrough` | Code walkthrough 非 APPROVED 时需暂停等待用户处理 Critical Issues(Issue #249) |
50
52
  | 6 | `finishing-a-development-branch` | 4 选项菜单 (merge/PR/keep/discard) 需要用户选择;Option 4 (discard) 要求 typed confirmation |
51
53
  | 6 | `ship` | PR 创建前需要用户确认;包含 AskUserQuestion STOP 点 |
52
54
  | 7 | `land-and-deploy` | Merge 确认、rollback 决策 — 均为用户交互点 |
53
55
 
54
- **Phase 1 执行模式(两阶段)**:
56
+ **Phase 1 执行模式(全部 orchestrator 直接执行)**:
55
57
  1. **Orchestrator 直接执行 autoplan**:`skill(name="autoplan")` → 等待用户确认 taste_decisions
56
- 2. **Orchestrator 直接执行 to-issues**:`skill(name="to-issues")` → 等待用户确认 Issue 拆分
57
- 3. **Subagent 执行 delphi-review**:`task(category="deep", load_skills=["delphi-review"])` 非交互式,可自动运行至 APPROVED
58
+ 2. **Orchestrator 直接执行 delphi-review**:`skill(name="delphi-review")` → 等待 APPROVED(非 APPROVED 时暂停等待用户确认)
59
+ 3. **Orchestrator 直接执行 to-issues**:`skill(name="to-issues")` 等待用户确认 Issue 拆分
58
60
 
59
61
  **上下文隔离原则**:
60
62
  - 每个 Subagent 在**独立 session** 中启动,不继承 orchestrator 的对话历史
@@ -71,7 +73,7 @@
71
73
  | Phase 0 | phase--1-summary(仅路径) | 隔离环境信息(worktree 路径) |
72
74
  | Phase 1 | phase-0-summary.md + design-doc | 设计决策 + 结构化规格 |
73
75
  | Phase 2 | phase-1-summary.md + specification.yaml | 评审结论 + REQ 列表 |
74
- | Phase 3 | phase-2-summary.md + MVP 代码 | 构建结果 |
76
+ | Phase 3 | phase-2-summary.md + MVP 代码 | 构建结果(orchestrator 直接执行,无 subagent 上下文继承) |
75
77
  | Phase 4 | — | **人工验收**。Phase 4 不产生 subagent summary,但用户验收结果记录在 `.sprint-state/phase-outputs/emergent-issues.md`(如有 emergent issues)。Phase 5 加载此文件。 |
76
78
  | Phase 5 | phase-4-summary.md + emergent-issues.md | 验收结论 |
77
79
  | Phase 6 | phase-5-summary.md + feedback-log.md | 复盘结论 |
@@ -105,7 +105,7 @@ Decision 2: [决策描述]
105
105
 
106
106
  ---
107
107
 
108
- ### Step 2b: 调用 delphi-review(强制)
108
+ ### Step 2b: 调用 delphi-review(强制,orchestrator 直接执行)
109
109
 
110
110
  ```bash
111
111
  skill(name="delphi-review", user_message="[设计文档 + taste_decisions 确认结果]")
@@ -117,7 +117,7 @@ delphi-review 执行:
117
117
  - 输出: APPROVED / REQUEST_CHANGES
118
118
 
119
119
  **如果 REQUEST_CHANGES**:
120
- - ⚠️ 暂停等待用户修复
120
+ - ⚠️ 暂停等待用户处理(orchestrator 直接执行,可交互确认)
121
121
  - 修复后重新评审(从 Round 2 起步)
122
122
  - 直到 APPROVED
123
123
 
@@ -4,6 +4,8 @@
4
4
 
5
5
  多专家代码走查、测试对齐、浏览器测试。确保 MVP 符合 specification。
6
6
 
7
+ **执行者**: orchestrator 直接执行全部步骤(非 subagent dispatch)— Issue #249。
8
+
7
9
  Web 前端项目额外增加:系统化 QA、视觉审计、性能基线。
8
10
 
9
11
  ---
@@ -46,7 +48,7 @@ delphi code-walkthrough 执行:
46
48
  - ≥90% 共识 + APPROVED 才通过
47
49
 
48
50
  **如果 REQUEST_CHANGES**:
49
- - ⚠️ 暂停等待用户修复 Critical Issues + 处理 Major Concerns
51
+ - ⚠️ 暂停等待用户处理 Critical Issues + Major Concerns(orchestrator 直接执行,可交互)
50
52
  - 修复后回到 Round 2 重新评审
51
53
 
52
54
  **如果 APPROVED**:
@@ -1,9 +1,9 @@
1
1
  # SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-23
4
- **Commit:** bac916f
3
+ **Generated:** 2026-06-24
4
+ **Commit:** 5019773
5
5
  **Branch:** main
6
- **Version:** 0.10.11.0
6
+ **Version:** 0.10.13.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
@@ -329,11 +329,29 @@ function renderMultiSprintSidebar(sprints: DiscoveredSprint[]): string | null {
329
329
  return blocks.join("\n---\n");
330
330
  }
331
331
 
332
- function renderContent(sprints: DiscoveredSprint[], upgradeNotice: string | null): string | null {
332
+ function renderContent(sprints: DiscoveredSprint[], upgradeNotice: string | null, dir: string): string | null {
333
333
  const sprintContent = renderMultiSprintSidebar(sprints)
334
- if (upgradeNotice && sprintContent) return `${upgradeNotice}\n---\n${sprintContent}`
335
- if (upgradeNotice) return upgradeNotice
336
- return sprintContent
334
+
335
+ if (sprintContent) {
336
+ return [upgradeNotice, sprintContent].filter(Boolean).join("\n---\n")
337
+ }
338
+
339
+ // Early-phase placeholders: when no sprint data yet, check for directory hints
340
+ const hasStateDir = existsSync(join(dir, ".sprint-state"))
341
+ const gitRoot = findGitRoot(dir)
342
+ const hasWorktreesRoot = gitRoot ? existsSync(join(gitRoot, ".worktrees")) : false
343
+
344
+ if (hasStateDir) {
345
+ const placeholder = "SPRINT FLOW\n → 初始化中..."
346
+ return [upgradeNotice, placeholder].filter(Boolean).join("\n---\n")
347
+ }
348
+
349
+ if (hasWorktreesRoot) {
350
+ const placeholder = "SPRINT FLOW\n · 准备中..."
351
+ return [upgradeNotice, placeholder].filter(Boolean).join("\n---\n")
352
+ }
353
+
354
+ return upgradeNotice || null
337
355
  }
338
356
 
339
357
  // ── Upgrade notice ──
@@ -376,15 +394,14 @@ const tuiPlugin: TuiSlotPlugin = {
376
394
  const dir = process.env.XP_GATE_PROJECT_DIR || process.cwd();
377
395
  const now = Date.now();
378
396
 
379
- // Use cache if still valid for current directory
380
397
  if (_cache && _cache.dir === dir && now - _cache.ts < CACHE_TTL_MS) {
381
- return renderContent(_cache.data, _cache.upgradeNotice);
398
+ return renderContent(_cache.data, _cache.upgradeNotice, dir);
382
399
  }
383
400
 
384
401
  const sprints = discoverActiveSprints(dir);
385
402
  const upgradeNotice = renderUpgradeNotice()
386
403
  _cache = { data: sprints, ts: now, dir, upgradeNotice };
387
- return renderContent(sprints, upgradeNotice);
404
+ return renderContent(sprints, upgradeNotice, dir);
388
405
  },
389
406
  },
390
407
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xp-gate",
3
- "version": "0.10.11",
3
+ "version": "0.10.13",
4
4
  "displayName": "XP-Gate",
5
5
  "description": "Extreme Programming quality gates + AI workflow skills for Qoder. Includes 10 quality gates (Gate 0-9), Sprint Flow (11 phases), and Delphi multi-expert review (>=90% consensus).",
6
6
  "author": {
@@ -1,9 +1,9 @@
1
1
  # SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-23
4
- **Commit:** bac916f
3
+ **Generated:** 2026-06-24
4
+ **Commit:** 5019773
5
5
  **Branch:** main
6
- **Version:** 0.10.11.0
6
+ **Version:** 0.10.13.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,9 +1,9 @@
1
1
  # SKILLS/SPRINT-FLOW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-23
4
- **Commit:** bac916f
3
+ **Generated:** 2026-06-24
4
+ **Commit:** 5019773
5
5
  **Branch:** main
6
- **Version:** 0.10.11.0
6
+ **Version:** 0.10.13.0
7
7
 
8
8
  ## OVERVIEW
9
9
  **11-phase** development pipeline: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW → USER ACCEPTANCE → FEEDBACK → SHIP → LAND → 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.