@boyingliu01/xp-gate 0.12.13 → 0.13.0

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 (130) hide show
  1. package/adapters/typescript.sh +5 -2
  2. package/build-integrity/__tests__/ccn-refactor-gate10.test.ts +133 -0
  3. package/build-integrity/gate-10.ts +111 -123
  4. package/hooks/gate-3.sh +68 -0
  5. package/hooks/gate-4.sh +80 -0
  6. package/hooks/gate-7.sh +45 -0
  7. package/hooks/gate-8.sh +56 -0
  8. package/hooks/pre-commit +15 -3
  9. package/mock-policy/AGENTS.md +4 -4
  10. package/mutation/AGENTS.md +4 -4
  11. package/package.json +1 -1
  12. package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
  13. package/plugins/claude-code/skills/delphi-review/AGENTS.md +4 -4
  14. package/plugins/claude-code/skills/sprint-flow/AGENTS.md +50 -62
  15. package/plugins/claude-code/skills/sprint-flow/SKILL.md +200 -238
  16. package/plugins/claude-code/skills/sprint-flow/references/force-levels.md +13 -14
  17. package/plugins/claude-code/skills/sprint-flow/references/orchestration-rules.md +61 -197
  18. package/plugins/claude-code/skills/sprint-flow/references/phase-1-prep.md +294 -0
  19. package/plugins/claude-code/skills/sprint-flow/references/phase-2-design.md +194 -0
  20. package/{skills/sprint-flow/references/phase-2-build.md → plugins/claude-code/skills/sprint-flow/references/phase-3-build.md} +11 -11
  21. package/plugins/claude-code/skills/sprint-flow/references/phase-4-verify.md +153 -0
  22. package/plugins/claude-code/skills/sprint-flow/references/phase-5-ship.md +40 -0
  23. package/plugins/claude-code/skills/sprint-flow/references/phase-6-close.md +134 -0
  24. package/plugins/claude-code/skills/sprint-flow/templates/auto-estimate-learning-log.md +1 -1
  25. package/plugins/claude-code/skills/sprint-flow/templates/auto-estimate-output-template.md +15 -37
  26. package/plugins/claude-code/skills/sprint-flow/templates/emergent-issues-template.md +7 -7
  27. package/plugins/claude-code/skills/sprint-flow/templates/pain-document-template.md +5 -5
  28. package/plugins/claude-code/skills/sprint-flow/templates/sprint-progress-template.md +36 -47
  29. package/plugins/claude-code/skills/sprint-flow/templates/sprint-summary-template.md +16 -15
  30. package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +4 -4
  31. package/plugins/opencode/package.json +1 -1
  32. package/plugins/opencode/skills/delphi-review/AGENTS.md +4 -4
  33. package/plugins/opencode/skills/sprint-flow/AGENTS.md +50 -62
  34. package/plugins/opencode/skills/sprint-flow/SKILL.md +200 -238
  35. package/plugins/opencode/skills/sprint-flow/references/force-levels.md +13 -14
  36. package/plugins/opencode/skills/sprint-flow/references/orchestration-rules.md +61 -197
  37. package/plugins/opencode/skills/sprint-flow/references/phase-1-prep.md +294 -0
  38. package/plugins/opencode/skills/sprint-flow/references/phase-2-design.md +194 -0
  39. package/plugins/{claude-code/skills/sprint-flow/references/phase-2-build.md → opencode/skills/sprint-flow/references/phase-3-build.md} +11 -11
  40. package/plugins/opencode/skills/sprint-flow/references/phase-4-verify.md +153 -0
  41. package/plugins/opencode/skills/sprint-flow/references/phase-5-ship.md +40 -0
  42. package/plugins/opencode/skills/sprint-flow/references/phase-6-close.md +134 -0
  43. package/plugins/opencode/skills/sprint-flow/templates/auto-estimate-learning-log.md +1 -1
  44. package/plugins/opencode/skills/sprint-flow/templates/auto-estimate-output-template.md +15 -37
  45. package/plugins/opencode/skills/sprint-flow/templates/emergent-issues-template.md +7 -7
  46. package/plugins/opencode/skills/sprint-flow/templates/pain-document-template.md +5 -5
  47. package/plugins/opencode/skills/sprint-flow/templates/sprint-progress-template.md +36 -47
  48. package/plugins/opencode/skills/sprint-flow/templates/sprint-summary-template.md +16 -15
  49. package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +4 -4
  50. package/plugins/qoder/plugin.json +1 -1
  51. package/plugins/qoder/skills/delphi-review/AGENTS.md +4 -4
  52. package/plugins/qoder/skills/sprint-flow/AGENTS.md +50 -62
  53. package/plugins/qoder/skills/sprint-flow/SKILL.md +274 -208
  54. package/plugins/qoder/skills/sprint-flow/references/components/middleware.md +5 -2
  55. package/plugins/qoder/skills/sprint-flow/references/force-levels.md +13 -14
  56. package/plugins/qoder/skills/sprint-flow/references/orchestration-rules.md +61 -197
  57. package/plugins/qoder/skills/sprint-flow/references/phase-1-prep.md +294 -0
  58. package/plugins/qoder/skills/sprint-flow/references/phase-2-design.md +194 -0
  59. package/plugins/{opencode/skills/sprint-flow/references/phase-2-build.md → qoder/skills/sprint-flow/references/phase-3-build.md} +11 -11
  60. package/plugins/qoder/skills/sprint-flow/references/phase-4-verify.md +153 -0
  61. package/plugins/qoder/skills/sprint-flow/references/phase-5-ship.md +40 -0
  62. package/plugins/qoder/skills/sprint-flow/references/phase-6-close.md +134 -0
  63. package/plugins/qoder/skills/sprint-flow/templates/auto-estimate-learning-log.md +1 -1
  64. package/plugins/qoder/skills/sprint-flow/templates/auto-estimate-output-template.md +15 -37
  65. package/plugins/qoder/skills/sprint-flow/templates/emergent-issues-template.md +7 -7
  66. package/plugins/qoder/skills/sprint-flow/templates/pain-document-template.md +5 -5
  67. package/plugins/qoder/skills/sprint-flow/templates/sprint-progress-template.md +36 -47
  68. package/plugins/qoder/skills/sprint-flow/templates/sprint-summary-template.md +16 -15
  69. package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +4 -4
  70. package/principles/AGENTS.md +4 -4
  71. package/principles/lint-baseline.ts +35 -40
  72. package/skills/delphi-review/AGENTS.md +4 -4
  73. package/skills/sprint-flow/AGENTS.md +50 -62
  74. package/skills/sprint-flow/SKILL.md +200 -238
  75. package/skills/sprint-flow/references/force-levels.md +13 -14
  76. package/skills/sprint-flow/references/orchestration-rules.md +61 -197
  77. package/skills/sprint-flow/references/phase-1-prep.md +294 -0
  78. package/skills/sprint-flow/references/phase-2-design.md +194 -0
  79. package/skills/sprint-flow/references/phase-3-build.md +147 -0
  80. package/skills/sprint-flow/references/phase-4-verify.md +153 -0
  81. package/skills/sprint-flow/references/phase-5-ship.md +40 -0
  82. package/skills/sprint-flow/references/phase-6-close.md +134 -0
  83. package/skills/sprint-flow/templates/auto-estimate-learning-log.md +1 -1
  84. package/skills/sprint-flow/templates/auto-estimate-output-template.md +15 -37
  85. package/skills/sprint-flow/templates/emergent-issues-template.md +7 -7
  86. package/skills/sprint-flow/templates/pain-document-template.md +5 -5
  87. package/skills/sprint-flow/templates/sprint-progress-template.md +36 -47
  88. package/skills/sprint-flow/templates/sprint-summary-template.md +16 -15
  89. package/skills/test-specification-alignment/AGENTS.md +4 -4
  90. package/plugins/claude-code/skills/sprint-flow/references/phase-0-think.md +0 -115
  91. package/plugins/claude-code/skills/sprint-flow/references/phase-1-plan.md +0 -178
  92. package/plugins/claude-code/skills/sprint-flow/references/phase-3-review.md +0 -215
  93. package/plugins/claude-code/skills/sprint-flow/references/phase-4-uat.md +0 -125
  94. package/plugins/claude-code/skills/sprint-flow/references/phase-5-feedback.md +0 -100
  95. package/plugins/claude-code/skills/sprint-flow/references/phase-6-ship.md +0 -9
  96. package/plugins/claude-code/skills/sprint-flow/references/phase-7-land.md +0 -9
  97. package/plugins/claude-code/skills/sprint-flow/references/phase-8-cleanup.md +0 -9
  98. package/plugins/claude-code/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +0 -263
  99. package/plugins/claude-code/skills/sprint-flow/references/phase-minus-1-isolate.md +0 -58
  100. package/plugins/opencode/skills/sprint-flow/references/phase-0-think.md +0 -115
  101. package/plugins/opencode/skills/sprint-flow/references/phase-1-plan.md +0 -178
  102. package/plugins/opencode/skills/sprint-flow/references/phase-3-review.md +0 -215
  103. package/plugins/opencode/skills/sprint-flow/references/phase-4-uat.md +0 -125
  104. package/plugins/opencode/skills/sprint-flow/references/phase-5-feedback.md +0 -100
  105. package/plugins/opencode/skills/sprint-flow/references/phase-6-ship.md +0 -9
  106. package/plugins/opencode/skills/sprint-flow/references/phase-7-land.md +0 -9
  107. package/plugins/opencode/skills/sprint-flow/references/phase-8-cleanup.md +0 -9
  108. package/plugins/opencode/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +0 -263
  109. package/plugins/opencode/skills/sprint-flow/references/phase-minus-1-isolate.md +0 -58
  110. package/plugins/qoder/skills/sprint-flow/references/phase-0-think.md +0 -115
  111. package/plugins/qoder/skills/sprint-flow/references/phase-1-plan.md +0 -178
  112. package/plugins/qoder/skills/sprint-flow/references/phase-2-build.md +0 -43
  113. package/plugins/qoder/skills/sprint-flow/references/phase-3-review.md +0 -215
  114. package/plugins/qoder/skills/sprint-flow/references/phase-4-uat.md +0 -125
  115. package/plugins/qoder/skills/sprint-flow/references/phase-5-feedback.md +0 -100
  116. package/plugins/qoder/skills/sprint-flow/references/phase-6-ship.md +0 -9
  117. package/plugins/qoder/skills/sprint-flow/references/phase-7-land.md +0 -9
  118. package/plugins/qoder/skills/sprint-flow/references/phase-8-cleanup.md +0 -9
  119. package/plugins/qoder/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +0 -263
  120. package/plugins/qoder/skills/sprint-flow/references/phase-minus-1-isolate.md +0 -58
  121. package/skills/sprint-flow/references/phase-0-think.md +0 -115
  122. package/skills/sprint-flow/references/phase-1-plan.md +0 -178
  123. package/skills/sprint-flow/references/phase-3-review.md +0 -215
  124. package/skills/sprint-flow/references/phase-4-uat.md +0 -125
  125. package/skills/sprint-flow/references/phase-5-feedback.md +0 -100
  126. package/skills/sprint-flow/references/phase-6-ship.md +0 -9
  127. package/skills/sprint-flow/references/phase-7-land.md +0 -9
  128. package/skills/sprint-flow/references/phase-8-cleanup.md +0 -9
  129. package/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +0 -263
  130. package/skills/sprint-flow/references/phase-minus-1-isolate.md +0 -58
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## 使用说明
4
4
 
5
- 此模板用于 Phase 6 (SHIP) 结束时生成 Sprint 总结。
5
+ 此模板用于 Phase 6/6 CLOSE 结束时生成 Sprint 总结。
6
6
 
7
7
  ---
8
8
 
@@ -25,13 +25,12 @@ MVP 版本: v1.0
25
25
 
26
26
  | Phase | 耗时 | 状态 | 暂停次数 | 备注 |
27
27
  |-------|------|------|---------|------|
28
- | Phase 0: THINK | [X min] | ✅ 完成 | 0 | [备注] |
29
- | Phase 1: PLAN | [X min] | ✅ 完成 | [N] | [备注] |
30
- | Phase 2: BUILD | [X min] | ✅ 完成 | [N] | [备注] |
31
- | Phase 3: REVIEW | [X min] | ✅ 完成 | [N] | [备注] |
32
- | Phase 4: UAT | [X min] | ✅ 完成 | 1 (必须) | [备注] |
33
- | Phase 5: FEEDBACK | [X min] | ✅ 完成 | 0 | [备注] |
34
- | Phase 6: SHIP | [X min] | ✅ 完成 | [N] | [备注] |
28
+ | 1/6: PREP | [X min] | ✅ 完成 | 0 | worktree + 规模评估 |
29
+ | 2/6: DESIGN | [X min] | ✅ 完成 | [N] | brainstorming + delphi-review |
30
+ | 3/6: BUILD | [X min] | ✅ 完成 | [N] | ralph-loop + TDD |
31
+ | 4/6: VERIFY | [X min] | ✅ 完成 | [N] | code-walkthrough + QA + feedback |
32
+ | 5/6: SHIP | [X min] | ✅ 完成 | [N] | PR + deploy + canary |
33
+ | 6/6: CLOSE | [X min] | ✅ 完成 | 1 (UAT 必须) | 人工验收 + cleanup |
35
34
 
36
35
  ---
37
36
 
@@ -39,16 +38,18 @@ MVP 版本: v1.0
39
38
 
40
39
  | Skill | 调用次数 | 结果 | 备注 |
41
40
  |-------|---------|------|------|
42
- | office-hours | 1 | ✅ | Pain Document 生成 |
41
+ | brainstorming | 1 | ✅ | design doc |
43
42
  | autoplan | 1 | ✅/⚠️ | [taste_decisions 数量] |
44
- | delphi-review | [N] rounds | ✅ APPROVED | [Round 数量] |
45
- | specification.yaml | 1 | ✅ | specification.yaml |
46
- | BUILD (TDD + review) | 1 | ✅ APPROVED | [Gate 1 失败次数] |
47
- | test-driven-development | [N] | ✅ | [BUILD (TDD + review) 内部调用] |
48
- | cross-model-review | [N] rounds | ✅ APPROVED | [Round 数量] |
43
+ | delphi-review (design) | [N] rounds | ✅ APPROVED | [Round 数量] |
44
+ | delphi-review (code-walkthrough) | [N] rounds | ✅ APPROVED | [Round 数量] |
45
+ | to-issues | 1 | ✅ | slices-manifest.json |
46
+ | test-driven-development | [N] | ✅ | BUILD 内部调用 |
49
47
  | test-specification-alignment | 1 | ✅ | [覆盖率] |
50
48
  | browse | 1 | ✅ | [QA 通过] |
49
+ | qa (web) | 1 | ✅ | [health score] |
50
+ | benchmark (web) | 1 | ✅ | [perf baseline] |
51
51
  | learn | 1 | ✅ | [记录数量] |
52
+ | retro | 1 | ✅ | Sprint 回顾 |
52
53
  | ship | 1 | ✅ | [PR URL] |
53
54
  | land-and-deploy | 1 | ✅ | [部署 URL] |
54
55
  | canary | 1 | ✅ | [监控正常] |
@@ -117,4 +118,4 @@ Minor Issues (可选纳入):
117
118
  ---
118
119
 
119
120
  **Sprint 结束时间**: YYYY-MM-DD HH:MM:SS
120
- **报告生成人**: sprint-flow skill
121
+ **报告生成人**: sprint-flow skill
@@ -1,9 +1,9 @@
1
1
  # SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-07-07
4
- **Commit:** 897f8eb
5
- **Branch:** main
6
- **Version:** 0.12.13.0
3
+ **Generated:** 2026-07-08
4
+ **Commit:** 6f868ee
5
+ **Branch:** sprint/2026-07-07-01
6
+ **Version:** 0.13.0.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
@@ -1,9 +1,9 @@
1
1
  # PRINCIPLES CHECKER MODULE
2
2
 
3
- **Generated:** 2026-07-07
4
- **Commit:** 897f8eb
5
- **Branch:** main
6
- **Version:** 0.12.13.0
3
+ **Generated:** 2026-07-08
4
+ **Commit:** 6f868ee
5
+ **Branch:** sprint/2026-07-07-01
6
+ **Version:** 0.13.0.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Clean Code & SOLID principles checker — **Gate 4** of pre-commit. 14 rules × 9 language adapters, SARIF 2.1.0 output. Houses the **Boy Scout Rule** enforcement engine (Gate 6) and warning-baseline storage.
@@ -290,58 +290,47 @@ export interface LintDeltaResult {
290
290
  * Compare current lint state against a baseline entry for a single file.
291
291
  * Used by the pre-commit hook to determine if new lint errors were introduced.
292
292
  */
293
+ function countErrors(entry: BaselineEntry): number {
294
+ return (entry.eslint?.errors || 0) +
295
+ (entry.ruff?.errors || 0) +
296
+ (entry.golangci?.errors || 0) +
297
+ (entry.shellcheck?.errors || 0);
298
+ }
299
+
300
+ function deltaPass(reduction: number, message: string): LintDeltaResult {
301
+ return { enforcement: 'PASS', newWarnings: 0, newErrors: 0, reduction, message };
302
+ }
303
+
304
+ function deltaBlock(warnings: number, errors: number, message: string): LintDeltaResult {
305
+ return { enforcement: 'BLOCK', newWarnings: warnings, newErrors: errors, reduction: 0, message };
306
+ }
307
+
293
308
  export function computeLintDelta(
294
309
  baseline: BaselineEntry | null,
295
310
  current: BaselineEntry,
296
311
  ): LintDeltaResult {
297
312
  if (!baseline) {
298
- return {
299
- enforcement: 'PASS',
300
- newWarnings: 0,
301
- newErrors: 0,
302
- reduction: 0,
303
- message: 'New file — baseline created. No comparison needed.',
304
- };
313
+ return deltaPass(0, 'New file — baseline created. No comparison needed.');
305
314
  }
306
315
 
307
316
  const oldW = baseline.totalWarnings;
308
- const oldE = (baseline.eslint?.errors || 0) +
309
- (baseline.ruff?.errors || 0) +
310
- (baseline.golangci?.errors || 0) +
311
- (baseline.shellcheck?.errors || 0);
317
+ const oldE = countErrors(baseline);
312
318
  const newW = current.totalWarnings;
313
- const newE = (current.eslint?.errors || 0) +
314
- (current.ruff?.errors || 0) +
315
- (current.golangci?.errors || 0) +
316
- (current.shellcheck?.errors || 0);
319
+ const newE = countErrors(current);
317
320
 
318
321
  if (newW > oldW) {
319
- return {
320
- enforcement: 'BLOCK',
321
- newWarnings: newW - oldW,
322
- newErrors: newE > oldE ? newE - oldE : 0,
323
- reduction: 0,
324
- message: `Lint debt increased by ${newW - oldW} warnings (${oldW} → ${newW}). Fix new errors before committing.`,
325
- };
322
+ const delta = newW - oldW;
323
+ return deltaBlock(delta, newE > oldE ? newE - oldE : 0,
324
+ `Lint debt increased by ${delta} warnings (${oldW} → ${newW}). Fix new errors before committing.`);
326
325
  }
327
326
 
328
327
  if (newW < oldW) {
329
- return {
330
- enforcement: 'PASS',
331
- newWarnings: 0,
332
- newErrors: 0,
333
- reduction: oldW - newW,
334
- message: `Lint debt reduced by ${oldW - newW} warnings (${oldW} → ${newW}). Good job!`,
335
- };
328
+ const delta = oldW - newW;
329
+ return deltaPass(delta,
330
+ `Lint debt reduced by ${delta} warnings (${oldW} → ${newW}). Good job!`);
336
331
  }
337
332
 
338
- return {
339
- enforcement: 'PASS',
340
- newWarnings: 0,
341
- newErrors: 0,
342
- reduction: 0,
343
- message: 'No change in lint debt.',
344
- };
333
+ return deltaPass(0, 'No change in lint debt.');
345
334
  }
346
335
 
347
336
  // ── Formatting ────────────────────────────────────────────
@@ -370,16 +359,22 @@ export function formatBaselineSummary(baseline: Record<string, BaselineEntry>):
370
359
  if (entry.shellcheck) shellcheckFiles++;
371
360
  }
372
361
 
362
+ const toolLines = [
363
+ [eslintFiles, 'ESLint'],
364
+ [ruffFiles, 'Ruff'],
365
+ [golangciFiles, 'golangci-lint'],
366
+ [shellcheckFiles, 'ShellCheck'],
367
+ ] as const;
368
+
373
369
  const lines: string[] = [
374
370
  `Lint Baseline Summary:`,
375
371
  ` Files tracked: ${files.length}`,
376
372
  ` Total warnings: ${totalWarnings}`,
377
373
  ];
378
374
 
379
- if (eslintFiles > 0) lines.push(` ESLint: ${eslintFiles} files`);
380
- if (ruffFiles > 0) lines.push(` Ruff: ${ruffFiles} files`);
381
- if (golangciFiles > 0) lines.push(` golangci-lint: ${golangciFiles} files`);
382
- if (shellcheckFiles > 0) lines.push(` ShellCheck: ${shellcheckFiles} files`);
375
+ for (const [count, name] of toolLines) {
376
+ if (count > 0) lines.push(` ${name}: ${count} files`);
377
+ }
383
378
 
384
379
  return lines.join('\n');
385
380
  }
@@ -1,9 +1,9 @@
1
1
  # SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-07-07
4
- **Commit:** 897f8eb
5
- **Branch:** main
6
- **Version:** 0.12.13.0
3
+ **Generated:** 2026-07-08
4
+ **Commit:** 6f868ee
5
+ **Branch:** sprint/2026-07-07-01
6
+ **Version:** 0.13.0.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,35 +1,32 @@
1
1
  # SKILLS/SPRINT-FLOW KNOWLEDGE BASE
2
2
 
3
- **Generated:** 2026-07-07
4
- **Commit:** 897f8eb
5
- **Branch:** main
6
- **Version:** 0.12.13.0
3
+ **Generated:** 2026-07-08
4
+ **Commit:** 6f868ee
5
+ **Branch:** sprint/2026-07-07-01
6
+ **Version:** 0.13.0.0
7
7
 
8
8
  ## OVERVIEW
9
- **11-phase** development pipeline: ISOLATE AUTO-ESTIMATE THINKPLAN → 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.
9
+ **6-phase** development pipeline (v2.0 compact redesign, Issue #290): PREP DESIGN → BUILD → VERIFY → SHIP → CLOSE. Phase 3/6 BUILD default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
10
10
 
11
- > **Doc drift**: README/CAPABILITIES still describe a "7-phase" pipeline. The canonical 11-phase model lives in `SKILL.md` and is what actually executes. See root `AGENTS.md` "Known Drift" #4.
11
+ > **v2.0 Compact Redesign (Issue #290)**: Merged from 11 phases to 6. PREP = old ISOLATE + AUTO-ESTIMATE. DESIGN = old THINK + PLAN. BUILD = old BUILD. VERIFY = old REVIEW + FEEDBACK. SHIP = old SHIP + LAND. CLOSE = old USER ACCEPTANCE + CLEANUP.
12
12
 
13
13
  ## STRUCTURE
14
14
  ```
15
15
  skills/sprint-flow/
16
- ├── SKILL.md # 11-phase pipeline definition (canonical)
16
+ ├── SKILL.md # 6-phase pipeline definition (canonical, v2.0)
17
17
  ├── AGENTS.md # This file (mirrored to 7 other locations — DO NOT edit mirrors)
18
18
  ├── evals/ # Evaluation test cases
19
19
  ├── evolution-history.json
20
20
  ├── evolution-log.md
21
21
  ├── references/
22
- │ ├── phase-minus-0-5-auto-estimate.md # Phase -0.5: AUTO-ESTIMATE
23
- │ ├── phase-0-think.md # Phase 0: brainstorming CONTEXT.md + ADR
24
- │ ├── phase-1-plan.md # Phase 1: autoplan + delphi-review (HARD-GATE)
25
- │ ├── phase-2-build.md # Phase 2: ralph-loop default + TDD + test-align
26
- │ ├── phase-3-review.md # Phase 3: code-walkthrough + QA + benchmark
27
- │ ├── phase-4-uat.md # Phase 4: USER ACCEPTANCE
28
- │ ├── phase-5-feedback.md # Phase 5: retro + debugging + learn
29
- │ ├── phase-6-ship.md # Phase 6: finishing-dev-branch + PR
30
- │ ├── phase-7-land.md # Phase 7: land + deploy
31
- │ ├── phase-8-cleanup.md # Phase 8: sprint branch cleanup
22
+ │ ├── phase-1-prep.md # Phase 1/6: PREP (worktree isolation + sizing)
23
+ │ ├── phase-2-design.md # Phase 2/6: DESIGN (brainstorming + delphi-review HARD-GATE)
24
+ │ ├── phase-3-build.md # Phase 3/6: BUILD (ralph-loop default + TDD + test-align)
25
+ │ ├── phase-4-verify.md # Phase 4/6: VERIFY (code-walkthrough + QA + feedback)
26
+ │ ├── phase-5-ship.md # Phase 5/6: SHIP (PR + merge + deploy + canary)
27
+ │ ├── phase-6-close.md # Phase 6/6: CLOSE (UAT + cleanup)
32
28
  │ ├── force-levels.md # Phase forcing rules
29
+ │ ├── orchestration-rules.md # Agent dispatch, context inheritance, transition rules
33
30
  │ └── components/ # Reusable phase building blocks
34
31
  └── templates/
35
32
  ├── auto-estimate-output-template.md
@@ -43,73 +40,64 @@ skills/sprint-flow/
43
40
  ## WHERE TO LOOK
44
41
  | Task | Location | Notes |
45
42
  |------|----------|-------|
46
- | Pipeline definition | SKILL.md | 11 phases with HARD-GATE between Phase 1 and Phase 2 |
47
- | Auto-estimate phase | references/phase-minus-0-5-auto-estimate.md | Sizing pass before THINK |
48
- | THINK phase | references/phase-0-think.md | brainstorming CONTEXT.md + ADR |
49
- | PLAN phase + HARD-GATE | references/phase-1-plan.md | autoplan delphi-review specification.yaml |
50
- | BUILD phase | references/phase-2-build.md | ralph-loop (default) vs parallel |
43
+ | Pipeline definition | SKILL.md | 6 phases with HARD-GATE between DESIGN (2/6) and BUILD (3/6) |
44
+ | PREP phase | references/phase-1-prep.md | worktree isolation + sizing pass |
45
+ | DESIGN phase + HARD-GATE | references/phase-2-design.md | brainstorming + autoplan + delphi-review → specification.yaml |
46
+ | BUILD phase | references/phase-3-build.md | ralph-loop (default) vs parallel |
47
+ | VERIFY phase | references/phase-4-verify.md | code-walkthrough + QA + retro + learn |
48
+ | SHIP phase | references/phase-5-ship.md | PR + merge + deploy + canary |
49
+ | CLOSE phase | references/phase-6-close.md | UAT + cleanup |
51
50
  | Force-level rules | references/force-levels.md | Defines when each phase becomes mandatory |
51
+ | Orchestration rules | references/orchestration-rules.md | Agent dispatch, context inheritance, transition gates |
52
52
  | Templates | templates/ | Auto-estimate, sprint progress/summary, pain doc, emergent issues |
53
53
 
54
- ## THE 11 PHASES
54
+ ## THE 6 PHASES (v2.0)
55
55
 
56
- | Phase | Name | Key Action | Hard Gate |
57
- |-------|------|-----------|-----------|
58
- | -1 | ISOLATE | Isolate working tree / worktree creation | — |
59
- | -0.5 | AUTO-ESTIMATE | Sizing pass; emits estimate template | |
60
- | 0 | THINK | brainstorming CONTEXT.md + ADR | — |
61
- | 1 | PLAN | autoplan delphi-review specification.yaml | **HARD-GATE**: design must reach ≥90% Delphi consensus |
62
- | 2 | BUILD | ralph-loop (REQ-level, default) + TDD + test-spec-alignment | — |
63
- | 3 | REVIEW | code-walkthrough + QA + benchmark | |
64
- | 4 | SHIP | finishing-a-development-branch → PR | — |
65
- | 5 | LAND | land + deploy staging + canary | — |
66
- | 6 | USER ACCEPTANCE | Manual verification on staging | — |
67
- | 7 | FEEDBACK | retro + debugging + `learn` (Sprint-level) | — |
68
- | 8 | CLEANUP | Sprint branch cleanup (per `docs/plans/2026-06-06-sprint-branch-cleanup-design.md`) | — |
56
+ | Phase | Name | Maps From (old 11) | Key Action | Hard Gate |
57
+ |-------|------|-------------------|------------|-----------|
58
+ | 1/6 | PREP | ISOLATE + AUTO-ESTIMATE | Worktree isolation + sizing | — |
59
+ | 2/6 | DESIGN | THINK + PLAN | brainstorming → autoplan → Delphi consensus | **HARD-GATE**: design must reach ≥90% Delphi consensus |
60
+ | 3/6 | BUILD | BUILD | ralph-loop (default) + TDD + test-spec-alignment | — |
61
+ | 4/6 | VERIFY | REVIEW + FEEDBACK | code-walkthrough + QA + retro + learn | HARD-GATE: feedback-log.md must exist |
62
+ | 5/6 | SHIP | SHIP + LAND | PR squash-merge → deploy → canary | — |
63
+ | 6/6 | CLOSE | USER ACCEPT + CLEANUP | Manual UAT → emergent issues → cleanup | HARD-GATE: UAT mandatory manual |
69
64
 
70
65
  ## CONVENTIONS
71
- - **ralph-loop is Phase 2 default**. Each REQ runs in a clean context (no linear accumulation), saving 40-67% tokens vs parallel mode.
72
- - **delphi-review HARD-GATE in Phase 1**: design must reach ≥90% consensus across ≥2 model providers, domestic models only. Unapproved → BLOCK coding.
73
- - **`learn` is called twice**: once per REQ in Phase 2 (ralph-loop internal, `progress.log` permanent/contextual classification) and once in Phase 5 (Sprint-level retro).
66
+ - **ralph-loop is Phase 3/6 BUILD default**. Each REQ runs in a clean context, saving 40-67% tokens.
67
+ - **delphi-review HARD-GATE in Phase 2/6 DESIGN**: design must reach ≥90% consensus across ≥2 model providers, domestic models only. Unapproved → BLOCK coding.
68
+ - **`learn` is called twice**: once per REQ in Phase 3/6 (ralph-loop internal) and once in Phase 4/6 VERIFY (Sprint-level retro).
74
69
  - **Phase isolation**: each phase has explicit entry/exit criteria documented in its `references/phase-*.md` file.
75
- - **Emergent Requirements** discovered in Phase 6 (USER ACCEPTANCE) are explicitly captured via `templates/emergent-issues-template.md` — never silently merged.
76
- - **Auto-detection**: Phase 0 uses `src/npm-package/lib/ui-detector.ts` to pick the right tech-stack templates.
70
+ - **Emergent Requirements** discovered in Phase 6/6 CLOSE (USER ACCEPTANCE) are explicitly captured via `templates/emergent-issues-template.md` — never silently merged.
71
+ - **Auto-detection**: Phase 2/6 DESIGN uses `src/npm-package/lib/ui-detector.ts` to pick the right tech-stack templates.
77
72
 
78
73
  ## ANTI-PATTERNS (THIS PROJECT)
79
- - Do NOT skip `delphi-review` in Phase 1 — HARD-GATE blocks implementation.
74
+ - Do NOT skip `delphi-review` in Phase 2/6 DESIGN — HARD-GATE blocks implementation.
80
75
  - Do NOT use parallel build mode unless explicitly requested. Ralph-loop is the default for a reason.
81
- - Do NOT enter Phase 1 (PLAN) without completing Phase 0 (THINK).
82
- - Do NOT implement before design is APPROVED — Phase 1 must reach Delphi consensus first.
83
- - Do NOT merge an Emergent Requirement into the original Sprint silently — capture it via the template.
76
+ - Do NOT enter Phase 2/6 DESIGN (PLAN) without completing DESIGN (brainstorming).
77
+ - Do NOT implement before design is APPROVED — Phase 2/6 DESIGN must reach Delphi consensus first.
78
+ - Do NOT merge an Emergent Requirement into the original Sprint silently — capture it via the template in Phase 6/6 CLOSE.
84
79
  - Do NOT terminate Delphi review before ≥90% consensus or 5 rounds, whichever first.
85
80
 
86
81
  ## UNIQUE STYLES
87
- - **11 phases** including negative-numbered pre-phases (-1, -0.5) — intentional, captures the work that happens before "real" coding starts.
88
- - **HARD-GATE** between PLAN and BUILD is enforced both in the SKILL.md instructions and in the Claude Code plugin's PreToolUse hook (`plugins/claude-code/bin/delphi-review-guard.sh`).
89
- - **Per-REQ clean context in ralph-loop** = the core efficiency mechanism. Sprint-flow specifically chooses this over parallel mode.
82
+ - **6 phases** (v2.0 Issue #290) — compact design with merged phases (1-6 numbering)
83
+ - **HARD-GATE** between DESIGN and BUILD enforced both in SKILL.md and Claude Code plugin's PreToolUse hook.
84
+ - **Per-REQ clean context in ralph-loop** = the core efficiency mechanism.
90
85
  - **Tech-stack auto-detection** via `--type` and `--lang` flags or `ui-detector.ts`.
91
86
 
92
87
  ## COMMANDS
93
88
  ```bash
94
- /sprint-flow "开发用户登录" # Full 11-phase pipeline
89
+ /sprint-flow "开发用户登录" # Full 6-phase pipeline
95
90
  /sprint-flow "开发用户登录" --type web-nextjs --lang typescript # Pin tech stack
96
- /sprint-flow "开发用户登录" --phase build-only # Skip planning (advanced)
91
+ /sprint-flow "开发用户登录" --phase build-only # Skip design (advanced)
97
92
  /sprint-flow "开发用户登录" --mode parallel # Legacy all-at-once (NOT default)
93
+ /sprint-flow "开发用户登录" --stop-at design # Stop after DESIGN phase
98
94
  /delphi-review "开发用户登录" --type web-nextjs --lang typescript
99
95
  ```
100
96
 
101
97
  ## NOTES
102
- - Integrates: brainstorming, autoplan, delphi-review, TDD, test-specification-alignment, qa, design-review, benchmark, systematic-debugging, retro, learn, finishing-a-development-branch.
98
+ - Integrates: brainstorming, autoplan, delphi-review, TDD, test-specification-alignment, qa, design-review, benchmark, systematic-debugging, retro, learn, finishing-a-development-branch, land-and-deploy.
103
99
  - ralph-loop's internal learnings are persisted via `progress.log` (permanent vs contextual classification).
104
- - Phase 5 calls `gstack/learn` for Sprint-level retrospective.
105
- - Phase 8 cleanup behavior is governed by `docs/plans/2026-06-06-sprint-branch-cleanup-design.md`.
106
- - This `AGENTS.md` is the canonical version. **7 byte-identical mirrors** exist at:
107
- - `plugins/claude-code/skills/sprint-flow/AGENTS.md`
108
- - `plugins/opencode/skills/sprint-flow/AGENTS.md`
109
- - `plugins/qoder/skills/sprint-flow/AGENTS.md`
110
- - `src/npm-package/skills/sprint-flow/AGENTS.md`
111
- - `src/npm-package/plugins/claude-code/skills/sprint-flow/AGENTS.md`
112
- - `src/npm-package/plugins/opencode/skills/sprint-flow/AGENTS.md`
113
- - `src/npm-package/plugins/qoder/skills/sprint-flow/AGENTS.md`
100
+ - Phase 4/6 VERIFY calls `gstack/learn` for Sprint-level retrospective.
101
+ - Phase 6/6 CLOSE cleanup behavior is governed by `docs/plans/2026-06-06-sprint-branch-cleanup-design.md`.
102
+ - This `AGENTS.md` is the canonical version. **7 byte-identical mirrors** exist.
114
103
  Mirrors are updated by `scripts/copy-skills.sh`. Do NOT edit them by hand.
115
-