@boyingliu01/xp-gate 0.9.3 → 0.9.5

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 (38) hide show
  1. package/lib/__tests__/baseline.test.js +89 -0
  2. package/lib/__tests__/doctor-helpers.test.js +139 -0
  3. package/lib/__tests__/upgrade-exec.test.js +42 -33
  4. package/lib/baseline.js +75 -48
  5. package/lib/doctor.js +199 -96
  6. package/lib/install-skill.js +81 -62
  7. package/lib/shared-phase-constants.d.ts +17 -0
  8. package/lib/shared-phase-constants.js +77 -0
  9. package/lib/shared-utils.js +14 -3
  10. package/lib/sprint-status.js +75 -83
  11. package/lib/upgrade.js +128 -85
  12. package/mock-policy/AGENTS.md +3 -3
  13. package/mutation/AGENTS.md +3 -3
  14. package/package.json +1 -1
  15. package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
  16. package/plugins/claude-code/skills/delphi-review/AGENTS.md +3 -3
  17. package/plugins/claude-code/skills/delphi-review/SKILL.md +34 -0
  18. package/plugins/claude-code/skills/sprint-flow/AGENTS.md +3 -3
  19. package/plugins/claude-code/skills/sprint-flow/SKILL.md +53 -1
  20. package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +3 -3
  21. package/plugins/opencode/__tests__/xp-gate-update.test.ts +123 -4
  22. package/plugins/opencode/index.ts +27 -3
  23. package/plugins/opencode/package.json +1 -1
  24. package/plugins/opencode/skills/delphi-review/AGENTS.md +3 -3
  25. package/plugins/opencode/skills/delphi-review/SKILL.md +34 -0
  26. package/plugins/opencode/skills/sprint-flow/AGENTS.md +3 -3
  27. package/plugins/opencode/skills/sprint-flow/SKILL.md +53 -1
  28. package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +3 -3
  29. package/plugins/opencode/tui-plugin.ts +49 -76
  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/test-specification-alignment/AGENTS.md +3 -3
  33. package/principles/AGENTS.md +3 -3
  34. package/skills/delphi-review/AGENTS.md +3 -3
  35. package/skills/delphi-review/SKILL.md +34 -0
  36. package/skills/sprint-flow/AGENTS.md +3 -3
  37. package/skills/sprint-flow/SKILL.md +53 -1
  38. package/skills/test-specification-alignment/AGENTS.md +3 -3
@@ -1,9 +1,9 @@
1
1
  # SKILLS/SPRINT-FLOW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-18
4
- **Commit:** b67fc85
3
+ **Generated:** 2026-06-21
4
+ **Commit:** 1050a30
5
5
  **Branch:** main
6
- **Version:** 0.9.3.0
6
+ **Version:** 0.9.5.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.
@@ -408,6 +408,58 @@ Sprint Flow: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW
408
408
 
409
409
  ---
410
410
 
411
+ ### ⭐ Phase State Persistence(阶段状态持久化 — MANDATORY)
412
+
413
+ **编排器必须在每个 Phase 完成后更新 `.sprint-state/sprint-state.json`**:
414
+
415
+ 1. **Phase 完成后立即更新**(每个 Phase 结束前):
416
+ - `phase`: 更新为当前 Phase 编号(如 `0`, `1`, `2`...)
417
+ - `status`: 更新为 `"completed"`(已完成 Phase)
418
+ - `phase_history`: 追加新条目
419
+
420
+ 2. **`phase_history` 数组条目 schema**:
421
+ ```json
422
+ {
423
+ "phase": 0,
424
+ "phase_name": "THINK",
425
+ "status": "completed",
426
+ "timestamp": "2026-06-20T10:30:00Z"
427
+ }
428
+ ```
429
+
430
+ 3. **检查点**:
431
+ - `--status` 参数读取 `sprint-state.json` 并渲染进度看板
432
+ - TUI panel 显示当前 Phase 和历史
433
+ - `--resume-from` 校验 `phase_history` 中的最后完成 Phase
434
+
435
+ 4. **完整 sprint-state.json 示例**:
436
+ ```json
437
+ {
438
+ "id": "sprint-2026-06-20-01",
439
+ "phase": 2,
440
+ "status": "in_progress",
441
+ "phase_history": [
442
+ {"phase": -1, "phase_name": "ISOLATE", "status": "completed", "timestamp": "2026-06-20T10:00:00Z"},
443
+ {"phase": -0.5, "phase_name": "AUTO-ESTIMATE", "status": "completed", "timestamp": "2026-06-20T10:05:00Z"},
444
+ {"phase": 0, "phase_name": "THINK", "status": "completed", "timestamp": "2026-06-20T10:15:00Z"},
445
+ {"phase": 1, "phase_name": "PLAN", "status": "completed", "timestamp": "2026-06-20T10:30:00Z"}
446
+ ],
447
+ "isolation": {
448
+ "worktree_path": "/home/boyingliu01/projects/xp-gate/.worktrees/sprint/sprint-2026-06-20-01",
449
+ "branch": "sprint/2026-06-20-01"
450
+ },
451
+ "outputs": {
452
+ "pain_document": "phase-outputs/phase-0-summary.md",
453
+ "specification": "phase-outputs/specification.yaml"
454
+ },
455
+ "metrics": {
456
+ "coverage_pct": 85.5
457
+ }
458
+ }
459
+ ```
460
+
461
+ ---
462
+
411
463
  ## 使用示例
412
464
 
413
465
  | 场景 | 命令 | 说明 |
@@ -447,7 +499,7 @@ See [Output Contract](#output-contract) below for the canonical machine-readable
447
499
 
448
500
  **Phase Summary** (每个 Phase 必须输出 YAML frontmatter): `phase/N`, `phase_name`, `status`, `outputs[]`, `decisions[]`, `next_phase_context` + markdown body (≤50 lines)
449
501
 
450
- **Sprint State JSON**: `{id, phase, status, isolation {worktree_path, branch}, outputs, metrics}` — 存储于 `.sprint-state/sprint-state.json`
502
+ **Sprint State JSON**: `{id, phase, status, phase_history[], isolation {worktree_path, branch}, outputs, metrics}` — 存储于 `.sprint-state/sprint-state.json`
451
503
 
452
504
  **Final User-Facing Output**: Phase/status, file paths, validation results, next user decision, PR URL or cleanup report
453
505
 
@@ -1,9 +1,9 @@
1
1
  # SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-06-18
4
- **Commit:** b67fc85
3
+ **Generated:** 2026-06-21
4
+ **Commit:** 1050a30
5
5
  **Branch:** main
6
- **Version:** 0.9.3.0
6
+ **Version:** 0.9.5.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.