@boyingliu01/xp-gate 0.14.23 → 0.14.24

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/bin/xp-gate.js +8 -0
  2. package/lib/__tests__/init.test.js +77 -0
  3. package/lib/__tests__/phase-transition.test.js +174 -0
  4. package/lib/init.js +48 -0
  5. package/lib/phase-transition.js +211 -0
  6. package/mock-policy/AGENTS.md +3 -3
  7. package/mutation/AGENTS.md +3 -3
  8. package/package.json +2 -2
  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/delphi-review/SKILL.md +24 -4
  12. package/plugins/claude-code/skills/sprint-flow/AGENTS.md +3 -3
  13. package/plugins/claude-code/skills/sprint-flow/SKILL.md +20 -5
  14. package/plugins/claude-code/skills/sprint-flow/references/orchestration-rules.md +11 -16
  15. package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +3 -3
  16. package/plugins/opencode/package.json +1 -1
  17. package/plugins/opencode/skills/delphi-review/AGENTS.md +3 -3
  18. package/plugins/opencode/skills/delphi-review/SKILL.md +24 -4
  19. package/plugins/opencode/skills/sprint-flow/AGENTS.md +3 -3
  20. package/plugins/opencode/skills/sprint-flow/SKILL.md +20 -5
  21. package/plugins/opencode/skills/sprint-flow/references/orchestration-rules.md +11 -16
  22. package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +3 -3
  23. package/plugins/qoder/agents/delphi-architecture.md +48 -0
  24. package/plugins/qoder/agents/delphi-feasibility.md +48 -0
  25. package/plugins/qoder/agents/delphi-technical.md +48 -0
  26. package/plugins/qoder/plugin.json +1 -1
  27. package/plugins/qoder/skills/delphi-review/AGENTS.md +3 -3
  28. package/plugins/qoder/skills/delphi-review/SKILL.md +276 -167
  29. package/plugins/qoder/skills/sprint-flow/AGENTS.md +3 -3
  30. package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +3 -3
  31. package/principles/AGENTS.md +3 -3
  32. package/scripts/delphi-external-review.cjs +15 -1
  33. package/skills/delphi-review/AGENTS.md +3 -3
  34. package/skills/delphi-review/SKILL.md +24 -4
  35. package/skills/sprint-flow/AGENTS.md +3 -3
  36. package/skills/sprint-flow/SKILL.md +20 -5
  37. package/skills/sprint-flow/references/orchestration-rules.md +11 -16
  38. package/skills/test-specification-alignment/AGENTS.md +3 -3
@@ -199,11 +199,26 @@ Every phase MUST output its header as the first line of that phase's output. For
199
199
  3. NEVER merge phase output — each phase gets its own header
200
200
  4. On `/sprint-flow` trigger, first line MUST output: `Sprint Flow: PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE`
201
201
  5. Each phase completion MUST write Phase Summary to `.sprint-state/phase-outputs/phase-{N}-summary.md`
202
- 6. Each phase completion MUST update `.sprint-state/sprint-state.json`
203
-
204
- ### Required Rendering (MANDATORY per phase)
205
-
206
- 7. Each phase completion MUST render the ASCII progress dashboard using `templates/sprint-progress-template.md` — the orchestrator reads `sprint-state.json` and outputs the dashboard after every phase's status block, so the user always sees current global progress without needing to ask
202
+ 6. Each phase completion MUST call `xp-gate phase-transition <N> <status> --render` — this programmatically updates `sprint-state.json` AND renders the ASCII dashboard in one command (resolves #338, #146)
203
+
204
+ ### Phase Transition CLI (MANDATORY — replaces manual state updates)
205
+
206
+ 7. **NEVER** manually write to `sprint-state.json` or manually render the dashboard from template. ALWAYS use:
207
+ ```
208
+ npx xp-gate phase-transition <phase> <status> --render [--outputs '<json>']
209
+ ```
210
+ - `<phase>`: 1-6
211
+ - `<status>`: `in_progress` | `completed` | `skipped` | `failed` | `paused`
212
+ - `--render`: Auto-renders ASCII progress dashboard after state update
213
+ - `--outputs '<json>'`: Optional JSON of phase outputs to record
214
+
215
+ Example (end of each phase):
216
+ ```
217
+ npx xp-gate phase-transition 1 completed --render --outputs '{"estimate":"3 story points"}'
218
+ npx xp-gate phase-transition 2 in_progress --render
219
+ ```
220
+
221
+ This is a **HARD GATE** — the orchestrator MUST invoke this CLI command. Text-level instructions to "update state" or "render dashboard" are DEPRECATED; the CLI is the single source of truth for state transitions and dashboard rendering.
207
222
 
208
223
  ### Phase Output Status Schema (MANDATORY per phase)
209
224
 
@@ -89,25 +89,20 @@
89
89
  - 格式:YAML frontmatter + Markdown body(body ≤ 50 行)
90
90
  - 大小限制:≤ 40,000 字符(≈ 10,000 tokens)
91
91
 
92
- 2. **更新 sprint-state.json**:
93
- - `phase`: 当前阶段编号 (1-6)
94
- - `outputs`: 新增当前阶段输出文件路径
95
- - `phase_history`: 追加或更新当前阶段的记录
96
- - Phase 开始时:追加 `{ "phase": N, "phase_name": "NAME", "status": "running", "started_at": "<ISO 8601>", "completed_at": null, "duration_seconds": null }`
97
- - Phase 完成时:更新对应条目,填充 `completed_at`(ISO 8601)和 `duration_seconds`
98
- - Phase 跳过时:设置 `status: "skipped"`
92
+ 2. **调用 phase-transition CLI**(替代手动更新 sprint-state.json + 手动渲染看板):
93
+ ```
94
+ npx xp-gate phase-transition <phase> <status> --render [--outputs '<json>']
95
+ ```
96
+ - Phase 开始时:`npx xp-gate phase-transition <N> in_progress --render`
97
+ - Phase 完成时:`npx xp-gate phase-transition <N> completed --render --outputs '{"key":"value"}'`
98
+ - Phase 跳过时:`npx xp-gate phase-transition <N> skipped --render`
99
+ - CLI 自动完成:更新 `sprint-state.json`(phase, phase_history, outputs)+ 渲染 ASCII 看板
100
+ - 看板规则:已完成 ✅ + 耗时,当前 🔄,待做 ⬜,跳过 ⏭️,失败 ❌
101
+ - 进度条:`[████▓░░░░░░] {pct}%`
102
+ - **禁止**手动写入 `sprint-state.json` 或手动调用 `render-sprint-progress.cjs`(已废弃)
99
103
 
100
104
  3. **等待用户确认 checkpoint**(如适用)
101
105
 
102
- 4. **展示进度看板**:执行 `node scripts/render-sprint-progress.cjs` 渲染进度看板
103
- - 脚本自动读取 `.sprint-state/sprint-state.json` 并输出 ASCII 进度看板
104
- - 渲染规则:已完成阶段显示 ✅ + 耗时,当前阶段 🔄,待做 ⬜,跳过 ⏭️,失败 ❌
105
- - 进度条:`[████▓░░░░░░] {pct}%`(已完成数/总阶段数 6)
106
- - 下一步行动:根据当前阶段 + 状态,自动查找对应提示
107
- - 输出物路径:列出 `outputs` 中已有的文件路径
108
- - 时机:每个 Phase 完成后的 transition 阶段自动展示
109
- - 向后兼容:旧版 `sprint-state.json` 缺少 `phase_history` 时,从 `phase` 字段推断状态
110
-
111
106
  ### Background Task Resume Protocol (MANDATORY — Issue #248)
112
107
 
113
108
  After dispatching background agents with `run_in_background=true`:
@@ -1,9 +1,9 @@
1
1
  # SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-07-21
4
- **Commit:** 03e9223
3
+ **Generated:** 2026-07-22
4
+ **Commit:** e331f2c
5
5
  **Branch:** main
6
- **Version:** 0.14.23.0
6
+ **Version:** 0.14.24.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.