@boyingliu01/xp-gate 0.18.5 → 0.19.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/adapter-common.sh +27 -0
- package/adapters/gate-3.sh +0 -0
- package/adapters/gate-4.sh +0 -0
- package/adapters/gate-7.sh +0 -0
- package/adapters/gate-8.sh +0 -0
- package/adapters/gate-9.sh +0 -0
- package/adapters/powershell.sh +114 -35
- package/adapters/typescript.sh +8 -8
- package/build-integrity/__tests__/import-resolver.test.ts +22 -0
- package/build-integrity/__tests__/orchestrator.test.ts +1 -2
- package/build-integrity/gate-10.ts +7 -0
- package/gate-12-file-hygiene.sh +230 -0
- package/hooks/adapter-common.sh +27 -0
- package/hooks/gate-10.sh +105 -0
- package/hooks/gate-12-file-hygiene.sh +0 -0
- package/hooks/lib/validate-code-walkthrough.cjs +125 -0
- package/hooks/pre-commit +130 -33
- package/hooks/pre-push +15 -91
- package/lib/__tests__/check-version.test.js +67 -46
- package/lib/__tests__/doctor.test.js +7 -6
- package/lib/__tests__/gate-runner.test.js +267 -0
- package/lib/__tests__/init.test.js +32 -0
- package/lib/__tests__/npm-package.test.js +13 -0
- package/lib/__tests__/phase-transition.test.js +604 -12
- package/lib/__tests__/sprint-discovery.test.ts +0 -1
- package/lib/__tests__/sprint-status-rework.test.js +100 -1
- package/lib/__tests__/update-hooks.test.js +143 -10
- package/lib/__tests__/upgrade-exec.test.js +73 -45
- package/lib/__tests__/upgrade-skill-sync.test.js +1 -1
- package/lib/__tests__/upgrade.test.js +12 -11
- package/lib/doctor.js +2 -1
- package/lib/gate-runner.js +68 -23
- package/lib/init.js +34 -5
- package/lib/install-skill.js +1 -0
- package/lib/mattpocock-license-verdict.json +1 -1
- package/lib/phase-transition.js +203 -23
- package/lib/shared-paths.js +2 -0
- package/lib/sprint-status.js +15 -4
- package/lib/test-alignment.ts +3 -13
- package/lib/update-hooks.js +129 -15
- package/mock-policy/AGENTS.md +4 -4
- package/mock-policy/__tests__/gate-m3.test.ts +0 -5
- package/mock-policy/__tests__/scope-scanner.test.ts +8 -2
- package/mutation/AGENTS.md +3 -3
- package/mutation/__tests__/mutmut-runner.test.ts +443 -2
- package/mutation/__tests__/update-baseline.test.ts +0 -2
- package/mutation/runners/mutmut-runner.ts +67 -17
- package/package.json +9 -3
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/skills/clipboard-vision/SKILL.md +47 -0
- package/plugins/claude-code/skills/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
- package/plugins/claude-code/skills/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
- package/plugins/claude-code/skills/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
- package/plugins/claude-code/skills/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
- package/plugins/claude-code/skills/clipboard-vision/describe-clipboard.ps1 +115 -0
- package/plugins/claude-code/skills/clipboard-vision/describe-clipboard.sh +161 -0
- package/plugins/claude-code/skills/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
- package/plugins/claude-code/skills/clipboard-vision/scripts/clipboard-vision.sh +137 -0
- package/plugins/claude-code/skills/delphi-review/.delphi-config.json.example +24 -27
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +12 -11
- package/plugins/claude-code/skills/delphi-review/INSTALL.md +15 -17
- package/plugins/claude-code/skills/delphi-review/SKILL.md +30 -29
- package/plugins/claude-code/skills/delphi-review/opencode.json.delphi.example +6 -10
- package/plugins/claude-code/skills/delphi-review/references/code-walkthrough.md +33 -49
- package/plugins/claude-code/skills/delphi-review/references/requirements.md +66 -54
- package/plugins/claude-code/skills/delphi-review/references/round-templates.md +7 -7
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +4 -4
- package/plugins/claude-code/skills/sprint-flow/SKILL.md +4 -4
- package/plugins/claude-code/skills/sprint-flow/references/components/skill-invocations.md +2 -2
- package/plugins/claude-code/skills/sprint-flow/references/force-levels.md +37 -35
- package/plugins/claude-code/skills/sprint-flow/references/orchestration-rules.md +1 -1
- package/plugins/claude-code/skills/sprint-flow/references/phase-1-prep.md +1 -1
- package/plugins/claude-code/skills/sprint-flow/references/phase-2-design.md +24 -14
- package/plugins/claude-code/skills/sprint-flow/references/phase-4-verify.md +6 -6
- package/plugins/claude-code/skills/sprint-flow/references/phase-overview.md +2 -2
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/dsh/README.md +25 -0
- package/plugins/dsh/cordis.patch.yml +7 -0
- package/plugins/dsh/package.json +70 -0
- package/plugins/dsh/scripts/prepack.cjs +82 -0
- package/plugins/dsh/skills/admin-template-guidelines/SKILL.md +113 -0
- package/plugins/dsh/skills/admin-template-guidelines/references/rule-1.md +91 -0
- package/plugins/dsh/skills/admin-template-guidelines/references/rule-2.md +155 -0
- package/plugins/dsh/skills/admin-template-guidelines/references/rule-3.md +70 -0
- package/plugins/dsh/skills/admin-template-guidelines/references/rule-4.md +154 -0
- package/plugins/dsh/skills/admin-template-guidelines/references/rule-5.md +126 -0
- package/plugins/dsh/skills/admin-template-guidelines/references/rule-6.md +180 -0
- package/plugins/dsh/skills/batch-grill-me/SKILL.md +15 -0
- package/plugins/dsh/skills/clipboard-vision/SKILL.md +47 -0
- package/plugins/dsh/skills/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
- package/plugins/dsh/skills/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
- package/plugins/dsh/skills/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
- package/plugins/dsh/skills/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
- package/plugins/dsh/skills/clipboard-vision/describe-clipboard.ps1 +115 -0
- package/plugins/dsh/skills/clipboard-vision/describe-clipboard.sh +161 -0
- package/plugins/dsh/skills/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
- package/plugins/dsh/skills/clipboard-vision/scripts/clipboard-vision.sh +137 -0
- package/plugins/dsh/skills/delphi-review/.delphi-config.json.example +70 -0
- package/plugins/dsh/skills/delphi-review/AGENTS.md +67 -0
- package/plugins/dsh/skills/delphi-review/INSTALL.md +150 -0
- package/plugins/dsh/skills/delphi-review/SKILL.md +559 -0
- package/plugins/dsh/skills/delphi-review/hooks.md +19 -0
- package/plugins/dsh/skills/delphi-review/opencode.json.delphi.example +52 -0
- package/plugins/dsh/skills/delphi-review/references/code-walkthrough.md +470 -0
- package/plugins/dsh/skills/delphi-review/references/orchestrator-dispatch.md +64 -0
- package/plugins/dsh/skills/delphi-review/references/requirements.md +402 -0
- package/plugins/dsh/skills/delphi-review/references/round-templates.md +134 -0
- package/plugins/dsh/skills/delphi-review/scripts/verify-consensus.sh +43 -0
- package/plugins/dsh/skills/delphi-review/tools.md +29 -0
- package/plugins/dsh/skills/domain-modeling/ADR-FORMAT.md +64 -0
- package/plugins/dsh/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/plugins/dsh/skills/domain-modeling/SKILL.md +74 -0
- package/plugins/dsh/skills/grill-with-docs/SKILL.md +7 -0
- package/plugins/dsh/skills/grilling/SKILL.md +12 -0
- package/plugins/dsh/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/plugins/dsh/skills/ralph-loop/SKILL.md +198 -0
- package/plugins/dsh/skills/ralph-loop/references/components.md +113 -0
- package/plugins/dsh/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
- package/plugins/dsh/skills/ralph-loop/references/workflow-details.md +99 -0
- package/plugins/dsh/skills/ralph-loop/templates/progress-log.md +36 -0
- package/plugins/dsh/skills/sprint-flow/AGENTS.md +103 -0
- package/plugins/dsh/skills/sprint-flow/SKILL.md +411 -0
- package/plugins/dsh/skills/sprint-flow/__tests__/sprint-flow.test.cjs +457 -0
- package/plugins/dsh/skills/sprint-flow/hooks.md +18 -0
- package/plugins/dsh/skills/sprint-flow/references/components/memory.md +87 -0
- package/plugins/dsh/skills/sprint-flow/references/components/middleware.md +75 -0
- package/plugins/dsh/skills/sprint-flow/references/components/skill-invocations.md +105 -0
- package/plugins/dsh/skills/sprint-flow/references/components/system-prompt.md +27 -0
- package/plugins/dsh/skills/sprint-flow/references/components/tool-descriptions.md +95 -0
- package/plugins/dsh/skills/sprint-flow/references/force-levels.md +204 -0
- package/plugins/dsh/skills/sprint-flow/references/orchestration-rules.md +236 -0
- package/plugins/dsh/skills/sprint-flow/references/phase-1-prep.md +294 -0
- package/plugins/dsh/skills/sprint-flow/references/phase-2-design.md +273 -0
- package/plugins/dsh/skills/sprint-flow/references/phase-3-build.md +348 -0
- package/plugins/dsh/skills/sprint-flow/references/phase-4-verify.md +225 -0
- package/plugins/dsh/skills/sprint-flow/references/phase-5-ship.md +222 -0
- package/plugins/dsh/skills/sprint-flow/references/phase-6-close.md +266 -0
- package/plugins/dsh/skills/sprint-flow/references/phase-overview.md +486 -0
- package/plugins/dsh/skills/sprint-flow/scripts/verify-sprint-state.sh +38 -0
- package/plugins/dsh/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
- package/plugins/dsh/skills/sprint-flow/templates/auto-estimate-output-template.md +110 -0
- package/plugins/dsh/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
- package/plugins/dsh/skills/sprint-flow/templates/pain-document-template.md +115 -0
- package/plugins/dsh/skills/sprint-flow/templates/sprint-progress-template.md +140 -0
- package/plugins/dsh/skills/sprint-flow/templates/sprint-summary-template.md +121 -0
- package/plugins/dsh/skills/sprint-flow/tools.md +29 -0
- package/plugins/dsh/skills/test-driven-development/SKILL.md +371 -0
- package/plugins/dsh/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/plugins/dsh/skills/test-specification-alignment/AGENTS.md +56 -0
- package/plugins/dsh/skills/test-specification-alignment/SKILL.md +205 -0
- package/plugins/dsh/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
- package/plugins/dsh/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
- package/plugins/dsh/skills/test-specification-alignment/references/specification-format.md +348 -0
- package/plugins/dsh/skills/to-issues/SKILL.md +277 -0
- package/plugins/dsh/src/command.test.ts +102 -0
- package/plugins/dsh/src/command.ts +75 -0
- package/plugins/dsh/src/contract.test.ts +62 -0
- package/plugins/dsh/src/gate-runner.test.ts +100 -0
- package/plugins/dsh/src/gate-runner.ts +58 -0
- package/plugins/dsh/src/index.test.ts +97 -0
- package/plugins/dsh/src/index.ts +94 -0
- package/plugins/dsh/src/skills.test.ts +58 -0
- package/plugins/dsh/tsconfig.build.json +13 -0
- package/plugins/dsh/tsconfig.json +19 -0
- package/plugins/dsh/vitest.config.ts +8 -0
- package/plugins/opencode/package.json +1 -1
- package/plugins/opencode/scripts/prepack.cjs +1 -0
- package/plugins/opencode/skills/clipboard-vision/SKILL.md +47 -0
- package/plugins/opencode/skills/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
- package/plugins/opencode/skills/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
- package/plugins/opencode/skills/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
- package/plugins/opencode/skills/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
- package/plugins/opencode/skills/clipboard-vision/describe-clipboard.ps1 +115 -0
- package/plugins/opencode/skills/clipboard-vision/describe-clipboard.sh +161 -0
- package/plugins/opencode/skills/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
- package/plugins/opencode/skills/clipboard-vision/scripts/clipboard-vision.sh +137 -0
- package/plugins/opencode/skills/delphi-review/.delphi-config.json.example +24 -27
- package/plugins/opencode/skills/delphi-review/AGENTS.md +12 -11
- package/plugins/opencode/skills/delphi-review/INSTALL.md +15 -17
- package/plugins/opencode/skills/delphi-review/SKILL.md +30 -29
- package/plugins/opencode/skills/delphi-review/opencode.json.delphi.example +6 -10
- package/plugins/opencode/skills/delphi-review/references/code-walkthrough.md +33 -49
- package/plugins/opencode/skills/delphi-review/references/requirements.md +66 -54
- package/plugins/opencode/skills/delphi-review/references/round-templates.md +7 -7
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +4 -4
- package/plugins/opencode/skills/sprint-flow/SKILL.md +4 -4
- package/plugins/opencode/skills/sprint-flow/references/components/skill-invocations.md +2 -2
- package/plugins/opencode/skills/sprint-flow/references/force-levels.md +37 -35
- package/plugins/opencode/skills/sprint-flow/references/orchestration-rules.md +1 -1
- package/plugins/opencode/skills/sprint-flow/references/phase-1-prep.md +1 -1
- package/plugins/opencode/skills/sprint-flow/references/phase-2-design.md +24 -14
- package/plugins/opencode/skills/sprint-flow/references/phase-4-verify.md +6 -6
- package/plugins/opencode/skills/sprint-flow/references/phase-overview.md +2 -2
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/qoder/plugin.json +1 -1
- package/plugins/qoder/skills/clipboard-vision/SKILL.md +47 -0
- package/plugins/qoder/skills/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
- package/plugins/qoder/skills/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
- package/plugins/qoder/skills/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
- package/plugins/qoder/skills/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
- package/plugins/qoder/skills/clipboard-vision/clipboard-vision/SKILL.md +47 -0
- package/plugins/qoder/skills/clipboard-vision/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
- package/plugins/qoder/skills/clipboard-vision/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
- package/plugins/qoder/skills/clipboard-vision/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
- package/plugins/qoder/skills/clipboard-vision/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
- package/plugins/qoder/skills/clipboard-vision/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
- package/plugins/qoder/skills/clipboard-vision/clipboard-vision/scripts/clipboard-vision.sh +137 -0
- package/plugins/qoder/skills/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
- package/plugins/qoder/skills/clipboard-vision/scripts/clipboard-vision.sh +137 -0
- package/plugins/qoder/skills/delphi-review/.delphi-config.json.example +3 -11
- package/plugins/qoder/skills/delphi-review/AGENTS.md +14 -16
- package/plugins/qoder/skills/delphi-review/INSTALL.md +12 -12
- package/plugins/qoder/skills/delphi-review/SKILL.md +58 -25
- package/plugins/qoder/skills/delphi-review/opencode.json.delphi.example +1 -1
- package/plugins/qoder/skills/delphi-review/references/code-walkthrough.md +33 -49
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +4 -4
- package/plugins/qoder/skills/sprint-flow/SKILL.md +2 -2
- package/plugins/qoder/skills/sprint-flow/references/force-levels.md +38 -35
- package/plugins/qoder/skills/sprint-flow/references/phase-1-prep.md +1 -1
- package/plugins/qoder/skills/sprint-flow/references/phase-2-design.md +48 -6
- package/plugins/qoder/skills/sprint-flow/references/phase-4-verify.md +5 -6
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +3 -3
- package/principles/AGENTS.md +3 -3
- package/scripts/__tests__/sync-package-content.test.js +30 -0
- package/scripts/delphi-external-review.cjs +194 -63
- package/scripts/sync-package-content.js +9 -2
- package/skills/clipboard-vision/SKILL.md +47 -0
- package/skills/clipboard-vision/__tests__/clipboard-vision-distribution.test.cjs +65 -0
- package/skills/clipboard-vision/__tests__/clipboard-vision-security.test.cjs +185 -0
- package/skills/clipboard-vision/__tests__/clipboard-vision.Tests.ps1 +138 -0
- package/skills/clipboard-vision/__tests__/clipboard-vision.test.cjs +273 -0
- package/skills/clipboard-vision/describe-clipboard.ps1 +115 -0
- package/skills/clipboard-vision/describe-clipboard.sh +161 -0
- package/skills/clipboard-vision/scripts/clipboard-vision.ps1 +86 -0
- package/skills/clipboard-vision/scripts/clipboard-vision.sh +137 -0
- package/skills/delphi-review/.delphi-config.json.example +24 -27
- package/skills/delphi-review/AGENTS.md +12 -11
- package/skills/delphi-review/INSTALL.md +15 -17
- package/skills/delphi-review/SKILL.md +30 -29
- package/skills/delphi-review/opencode.json.delphi.example +6 -10
- package/skills/delphi-review/references/code-walkthrough.md +33 -49
- package/skills/delphi-review/references/requirements.md +66 -54
- package/skills/delphi-review/references/round-templates.md +7 -7
- package/skills/sprint-flow/AGENTS.md +4 -4
- package/skills/sprint-flow/SKILL.md +4 -4
- package/skills/sprint-flow/references/components/skill-invocations.md +2 -2
- package/skills/sprint-flow/references/force-levels.md +37 -35
- package/skills/sprint-flow/references/orchestration-rules.md +1 -1
- package/skills/sprint-flow/references/phase-1-prep.md +1 -1
- package/skills/sprint-flow/references/phase-2-design.md +24 -14
- package/skills/sprint-flow/references/phase-4-verify.md +6 -6
- package/skills/sprint-flow/references/phase-overview.md +2 -2
- package/skills/test-specification-alignment/AGENTS.md +3 -3
- package/sprint-gate.sh +291 -0
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
**设计背景**: Issue #368 识别出原始意图中"需求评审一次 + 设计评审一次"的第一次评审被完全丢弃。本模式恢复该评审点,在需求探索(grill-with-docs)与设计文档生成之间插入一道轻量质量门禁。
|
|
14
14
|
|
|
15
15
|
**定位**:
|
|
16
|
-
-
|
|
16
|
+
- **固定三专家**: architecture + technical + feasibility,最多 5 轮
|
|
17
17
|
- **需求焦点**: 评审对象是需求陈述 + CONTEXT.md,不是设计文档或代码
|
|
18
18
|
- **程序化阻塞**: 输出 `requirements-reviewed.json`,由 `phase-transition 2 completed` 校验
|
|
19
19
|
- **防陈旧绑定**: `requirements_hash`(SHA-256)绑定需求内容,防止旧证据复用
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
|
|
23
23
|
## Five Core Properties
|
|
24
24
|
|
|
25
|
-
1. **匿名性** — Expert A/B 互不知道对方意见(Round 1)
|
|
26
|
-
2. **迭代共识** — GAPS_FOUND 时回到 grill-with-docs 补充,最多
|
|
25
|
+
1. **匿名性** — Expert A/B/C 互不知道对方意见(Round 1)
|
|
26
|
+
2. **迭代共识** — GAPS_FOUND 时回到 grill-with-docs 补充,最多 5 轮循环
|
|
27
27
|
3. **关键缺口零容忍** — Critical requirement gaps 必须在进入设计前解决
|
|
28
28
|
4. **防陈旧绑定** — requirements_hash 绑定需求内容 + CONTEXT.md,旧证据不可复用
|
|
29
|
-
5.
|
|
29
|
+
5. **执行可验证** — 三个专家都必须成功返回结构化结果,且 requested_model 三个 distinct
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
@@ -53,7 +53,7 @@ sprint-flow Phase 2 THINK:
|
|
|
53
53
|
Step 4: HARD-GATE(用户审批设计文档)
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
所有 Sprint 路径都执行 R1。Force level 只调整上下文深度和后续迭代预算,不跳过需求评审,也不减少三位专家执行。
|
|
57
57
|
|
|
58
58
|
---
|
|
59
59
|
|
|
@@ -70,19 +70,21 @@ delphi-review --mode requirements
|
|
|
70
70
|
├─→ Expert A (architecture) anonymous review — focus: requirements completeness,
|
|
71
71
|
│ requirement→AC coverage, scenario coverage
|
|
72
72
|
│
|
|
73
|
-
|
|
73
|
+
├─→ Expert B (technical) anonymous review — focus: technical clarity and edge cases
|
|
74
|
+
│
|
|
75
|
+
├─→ Expert C (feasibility) anonymous review — focus: testability of acceptance criteria,
|
|
74
76
|
│ user persona clarity, scope boundaries
|
|
75
77
|
│
|
|
76
78
|
├─→ Consensus check
|
|
77
79
|
│ │
|
|
78
|
-
│ ├─→
|
|
80
|
+
│ ├─→ All three APPROVED → write requirements-reviewed.json verdict=APPROVED
|
|
79
81
|
│ │
|
|
80
|
-
│ └─→
|
|
82
|
+
│ └─→ Any GAPS_FOUND → record gaps, set verdict=GAPS_FOUND
|
|
81
83
|
│
|
|
82
84
|
└─→ Return to sprint-flow orchestrator
|
|
83
85
|
│
|
|
84
86
|
├─→ APPROVED → proceed to design doc generation
|
|
85
|
-
└─→ GAPS_FOUND → loop back to grill-with-docs (
|
|
87
|
+
└─→ GAPS_FOUND → loop back to grill-with-docs (up to 5 total rounds)
|
|
86
88
|
```
|
|
87
89
|
|
|
88
90
|
---
|
|
@@ -92,16 +94,15 @@ delphi-review --mode requirements
|
|
|
92
94
|
| 专家 | 视角 | 配置 |
|
|
93
95
|
|------|------|------|
|
|
94
96
|
| Expert A (architecture) | 需求完整性 + 需求→AC 映射 + 场景覆盖 | `.delphi-config.json` → `experts.architecture` |
|
|
95
|
-
| Expert B (
|
|
97
|
+
| Expert B (technical) | 技术清晰度 + 边界条件 + 实现约束 | `.delphi-config.json` → `experts.technical` |
|
|
98
|
+
| Expert C (feasibility) | AC 可测试性 + 用户画像 + 范围边界 | `.delphi-config.json` → `experts.feasibility` |
|
|
96
99
|
|
|
97
|
-
>
|
|
100
|
+
> 三个角色必须使用三个 distinct trimmed executable model IDs。Provider、vendor、gateway 和模型国籍均不受限制;一个 provider 和 token plan 可以服务全部三个角色。
|
|
98
101
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
**专家选择理由**(设计决策 §16.4 C3):
|
|
102
|
+
**专家选择理由**:
|
|
102
103
|
- **architecture 专家**: 天然映射范围/覆盖到需求层面——需求完整性、需求→AC 映射、场景覆盖、领域术语一致性
|
|
103
104
|
- **feasibility 专家**: 天然映射可测试性/假设到验收标准——AC 可测试性、用户画像清晰度、范围边界、隐含假设
|
|
104
|
-
- **technical 专家**:
|
|
105
|
+
- **technical 专家**: 检查需求中的技术清晰度、边界条件和实现约束
|
|
105
106
|
|
|
106
107
|
---
|
|
107
108
|
|
|
@@ -117,7 +118,7 @@ delphi-review --mode requirements
|
|
|
117
118
|
| **领域术语一致性** | 需求陈述中的术语是否与 CONTEXT.md 领域模型一致(交叉引用) |
|
|
118
119
|
| **AC 精确度** | 验收标准是否具体、可度量、无歧义 |
|
|
119
120
|
|
|
120
|
-
### Expert
|
|
121
|
+
### Expert C (feasibility) — 需求模式焦点
|
|
121
122
|
|
|
122
123
|
| 维度 | 检查内容 |
|
|
123
124
|
|------|---------|
|
|
@@ -133,13 +134,13 @@ delphi-review --mode requirements
|
|
|
133
134
|
|
|
134
135
|
| 条件 | 结果 |
|
|
135
136
|
|------|------|
|
|
136
|
-
|
|
|
137
|
-
|
|
|
138
|
-
|
|
|
139
|
-
|
|
|
137
|
+
| 3/3 successful APPROVED + 无 Critical gaps | ✅ verdict=APPROVED,进入设计文档生成 |
|
|
138
|
+
| 3/3 successful APPROVED + 有 Minor gaps | ✅ verdict=APPROVED(记录 gaps 供参考) |
|
|
139
|
+
| 任一专家失败或缺失 | ❌ BLOCK,不能聚合或降级 |
|
|
140
|
+
| 任一专家 GAPS_FOUND | ❌ verdict=GAPS_FOUND,记录 gaps |
|
|
140
141
|
| 有 Critical requirement gaps | ❌ verdict=GAPS_FOUND |
|
|
141
142
|
|
|
142
|
-
**共识要求**:
|
|
143
|
+
**共识要求**: 三个成功结果全部参与聚合,达到 >=90% 且最终 APPROVED。单个专家结果不能代表全局批准。
|
|
143
144
|
|
|
144
145
|
---
|
|
145
146
|
|
|
@@ -167,8 +168,8 @@ Round 2: delphi-review --mode requirements(带 Round 1 gaps 上下文)
|
|
|
167
168
|
```
|
|
168
169
|
|
|
169
170
|
**硬性限制**:
|
|
170
|
-
- **最多
|
|
171
|
-
- **禁止无界循环** — Round
|
|
171
|
+
- **最多 5 轮**(Round 1 + 可选后续轮次)
|
|
172
|
+
- **禁止无界循环** — Round 5 后仍 GAPS_FOUND 必须升级
|
|
172
173
|
- **Round 2 上下文**: 专家看到 Round 1 的 gaps 列表,评估是否已修复
|
|
173
174
|
- **升级语义**: `escalation_needed: true` 写入 requirements-reviewed.json,sprint-flow 负责 UX
|
|
174
175
|
|
|
@@ -183,14 +184,16 @@ Round 2: delphi-review --mode requirements(带 Round 1 gaps 上下文)
|
|
|
183
184
|
"mode": "requirements",
|
|
184
185
|
"verdict": "APPROVED",
|
|
185
186
|
"timestamp": "2026-07-25T10:30:00Z",
|
|
186
|
-
"
|
|
187
|
+
"consensus_ratio": 1.0,
|
|
188
|
+
"requirements_hash": "7f650ddf715ebe75ca0317efa1e8618ae39d2c0bafea7a6f85aacfdbf3735a5f",
|
|
187
189
|
"head_commit": "abc123def456789...",
|
|
188
|
-
"context_file_used":
|
|
190
|
+
"context_file_used": null,
|
|
189
191
|
"round": 1,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
"expert_verdicts": [
|
|
193
|
+
{ "role": "architecture", "verdict": "APPROVED", "confidence": 9, "result_type": "delphi_expert_result", "requested_model": "bailian-tp/qwen-plus" },
|
|
194
|
+
{ "role": "technical", "verdict": "APPROVED", "confidence": 8, "result_type": "delphi_expert_result", "requested_model": "bailian-tp/deepseek-v3" },
|
|
195
|
+
{ "role": "feasibility", "verdict": "APPROVED", "confidence": 8, "result_type": "delphi_expert_result", "requested_model": "bailian-tp/glm-4.5" }
|
|
196
|
+
],
|
|
194
197
|
"requirements_statement": "实现用户注册流程,支持邮箱验证和密码重置",
|
|
195
198
|
"gaps_found": [],
|
|
196
199
|
"rounds_used": 1,
|
|
@@ -205,13 +208,15 @@ Round 2: delphi-review --mode requirements(带 Round 1 gaps 上下文)
|
|
|
205
208
|
"mode": "requirements",
|
|
206
209
|
"verdict": "GAPS_FOUND",
|
|
207
210
|
"timestamp": "2026-07-25T10:30:00Z",
|
|
208
|
-
"
|
|
211
|
+
"consensus_ratio": 0.67,
|
|
212
|
+
"requirements_hash": "7f650ddf715ebe75ca0317efa1e8618ae39d2c0bafea7a6f85aacfdbf3735a5f",
|
|
209
213
|
"head_commit": "abc123def456789...",
|
|
210
|
-
"context_file_used":
|
|
214
|
+
"context_file_used": null,
|
|
211
215
|
"round": 1,
|
|
212
216
|
"expert_verdicts": [
|
|
213
|
-
{ "role": "architecture", "verdict": "APPROVED", "confidence": 8 },
|
|
214
|
-
{ "role": "
|
|
217
|
+
{ "role": "architecture", "verdict": "APPROVED", "confidence": 8, "result_type": "delphi_expert_result", "requested_model": "provider/model-a" },
|
|
218
|
+
{ "role": "technical", "verdict": "GAPS_FOUND", "confidence": 7, "result_type": "delphi_expert_result", "requested_model": "provider/model-b" },
|
|
219
|
+
{ "role": "feasibility", "verdict": "APPROVED", "confidence": 8, "result_type": "delphi_expert_result", "requested_model": "provider/model-c" }
|
|
215
220
|
],
|
|
216
221
|
"requirements_statement": "实现用户注册流程,支持邮箱验证和密码重置",
|
|
217
222
|
"gaps_found": [
|
|
@@ -231,15 +236,16 @@ Round 2: delphi-review --mode requirements(带 Round 1 gaps 上下文)
|
|
|
231
236
|
| `mode` | string | 固定值 `"requirements"` |
|
|
232
237
|
| `verdict` | string | `APPROVED` 或 `GAPS_FOUND` |
|
|
233
238
|
| `timestamp` | string | 评审完成时间 (ISO 8601 UTC) |
|
|
239
|
+
| `consensus_ratio` | number | 三位专家的共识比例;APPROVED 必须为 `0.90` 至 `1.0` |
|
|
234
240
|
| `requirements_hash` | string | SHA-256 hex digest(防陈旧绑定,见下文) |
|
|
235
241
|
| `head_commit` | string | 当前 `git rev-parse HEAD` |
|
|
236
|
-
| `context_file_used` | string |
|
|
237
|
-
| `round` | number | 当前轮次(1
|
|
238
|
-
| `expert_verdicts` | array |
|
|
242
|
+
| `context_file_used` | string \| null | 项目根目录内引用的 context 文件相对路径;未使用时为 `null` 或空字符串 |
|
|
243
|
+
| `round` | number | 当前轮次(1 至 5) |
|
|
244
|
+
| `expert_verdicts` | array | 三位专家的成功结构化结果,包含 `result_type` 和 `requested_model` |
|
|
239
245
|
| `requirements_statement` | string | 被评审需求的简短摘要 |
|
|
240
246
|
| `gaps_found` | array | GAPS_FOUND 时的缺口列表(APPROVED 时为空数组) |
|
|
241
247
|
| `rounds_used` | number | 实际使用的轮次数 |
|
|
242
|
-
| `escalation_needed` | boolean | Round
|
|
248
|
+
| `escalation_needed` | boolean | Round 5 后仍 GAPS_FOUND 时为 `true` |
|
|
243
249
|
|
|
244
250
|
### 状态文件: `.sprint-state/delphi-reviewed.json`
|
|
245
251
|
|
|
@@ -267,23 +273,28 @@ requirements_statement + CONTEXT.md content + ISO timestamp prefix (YYYY-MM-DD)
|
|
|
267
273
|
```
|
|
268
274
|
|
|
269
275
|
**计算规则**:
|
|
270
|
-
1.
|
|
271
|
-
2.
|
|
272
|
-
3.
|
|
276
|
+
1. 从 evidence `timestamp` 解析严格有效的 ISO 8601 UTC 时间,并取其 `YYYY-MM-DD` 前缀
|
|
277
|
+
2. 若 `context_file_used` 非空,只允许项目根目录内的相对路径;拒绝绝对路径、`..` 穿越、缺失/非普通文件,以及 realpath 逃出项目根目录的符号链接
|
|
278
|
+
3. 按 UTF-8 原样读取 context 文件,不添加分隔符或换行;拼接精确字符串 `requirements_statement + context content + YYYY-MM-DD`
|
|
279
|
+
4. 对拼接结果计算 SHA-256;生成值使用 64 位小写 hex,校验时大小写不敏感
|
|
280
|
+
5. 未使用 context 时,精确拼接 `requirements_statement + YYYY-MM-DD`
|
|
273
281
|
|
|
274
282
|
**目的**: 防止旧证据复用。`phase-transition 2 completed` 校验时:
|
|
275
283
|
- 文件必须存在
|
|
276
284
|
- `verdict` 必须为 `APPROVED`
|
|
277
|
-
- `requirements_hash`
|
|
285
|
+
- `requirements_hash` 必须为 64 位 hex,并与运行时重新计算值匹配
|
|
278
286
|
- 若 hash 与当前需求内容不匹配 → BLOCK(防陈旧绑定)
|
|
279
287
|
|
|
280
|
-
**与 phase-transition.js
|
|
288
|
+
**与 phase-transition.js 的集成**:
|
|
281
289
|
|
|
282
290
|
```javascript
|
|
283
291
|
// EVIDENCE_FILES[2] — 已存在于 phase-transition.js
|
|
284
292
|
{
|
|
285
293
|
path: '.sprint-state/phase-outputs/requirements-reviewed.json',
|
|
286
|
-
requiredFields: [
|
|
294
|
+
requiredFields: [
|
|
295
|
+
'verdict', 'requirements_statement', 'timestamp', 'consensus_ratio',
|
|
296
|
+
'expert_verdicts', 'head_commit', 'requirements_hash'
|
|
297
|
+
],
|
|
287
298
|
blockingCheck: (data) => data.verdict === 'APPROVED',
|
|
288
299
|
blockingMessage: 'Requirements review verdict is not APPROVED',
|
|
289
300
|
}
|
|
@@ -306,15 +317,15 @@ requirements_statement + CONTEXT.md content + ISO timestamp prefix (YYYY-MM-DD)
|
|
|
306
317
|
|
|
307
318
|
| ❌ Don't | ✅ Do | Why |
|
|
308
319
|
|----------|------|-----|
|
|
309
|
-
|
|
|
310
|
-
| 无界循环评审 | 最多
|
|
320
|
+
| 使用少于 3 个专家 | 必须使用 architecture + technical + feasibility | 三个角色共同构成全局证据 |
|
|
321
|
+
| 无界循环评审 | 最多 5 轮,之后升级 | 防止无限循环 |
|
|
311
322
|
| 跳过 CONTEXT.md 交叉引用 | 始终交叉引用领域术语 | 需求应使用 CONTEXT.md 中的规范术语 |
|
|
312
323
|
| 输出泛化批准 | 输出 hash 绑定的需求陈述 | 防陈旧绑定(§8.4,Round 1 设计反馈 #14) |
|
|
313
|
-
|
|
|
324
|
+
| 接受单个专家批准 | 要求三份成功结果参与聚合,并达到 >=90% 共识 | 单个结果不能代表全局批准 |
|
|
314
325
|
| Round 2 中复用 Round 1 gaps 作为新发现 | Round 2 专家获得 Round 1 gaps 上下文 | 迭代改进,避免重复劳动 |
|
|
315
326
|
| 评审设计文档或代码 | 仅评审需求陈述 + CONTEXT.md | 设计/代码评审是 design / code-walkthrough 模式的职责 |
|
|
316
327
|
| GAPS_FOUND 时写入 delphi-reviewed.json | 仅 APPROVED 时写入状态文件 | GAPS_FOUND 表示评审未完成 |
|
|
317
|
-
| 在 lightweight sprint
|
|
328
|
+
| 在 lightweight sprint 中减少或跳过 R1 | 所有路径都执行三专家 R1,仅缩短上下文 | Force level 不改变专家数或批准证据 |
|
|
318
329
|
|
|
319
330
|
---
|
|
320
331
|
|
|
@@ -323,7 +334,7 @@ requirements_statement + CONTEXT.md content + ISO timestamp prefix (YYYY-MM-DD)
|
|
|
323
334
|
- **只读评审**: requirements 模式不修改任何源文件,仅写入证据文件到 `.sprint-state/`
|
|
324
335
|
- **Hash 完整性**: `requirements_hash` 使用 SHA-256,防止需求内容被篡改后复用旧证据
|
|
325
336
|
- **Commit 绑定**: `head_commit` 记录评审时的 git HEAD,提供时间线追溯
|
|
326
|
-
-
|
|
337
|
+
- **调用边界**: 评审内容只传递给用户配置的 callable provider;provider、vendor、gateway 和模型国籍不作额外限制
|
|
327
338
|
- **证据不可伪造**: phase-transition.js 程序化校验证据文件,LLM 无法绕过
|
|
328
339
|
|
|
329
340
|
---
|
|
@@ -350,11 +361,12 @@ requirements_statement + CONTEXT.md content + ISO timestamp prefix (YYYY-MM-DD)
|
|
|
350
361
|
**Pre-requisites (MANDATORY - BLOCK if missing):**
|
|
351
362
|
- [ ] grill-with-docs 已完成(或 CONTEXT.md 快速路径)
|
|
352
363
|
- [ ] 需求陈述可用(非空)
|
|
353
|
-
- [ ] Expert A (architecture)
|
|
354
|
-
- [ ]
|
|
364
|
+
- [ ] Expert A (architecture)、Expert B (technical)、Expert C (feasibility) 均成功执行
|
|
365
|
+
- [ ] 三个 `requested_model` trimmed 后 distinct
|
|
366
|
+
- [ ] 三份结果均为 `result_type=delphi_expert_result`
|
|
355
367
|
|
|
356
368
|
**CRITICAL - 共识验证 (requirements):**
|
|
357
|
-
- [ ]
|
|
369
|
+
- [ ] 聚合共识 >=90%,且所有 Critical gaps 已处理
|
|
358
370
|
- [ ] 无 Critical requirement gaps 未解决
|
|
359
371
|
- [ ] requirements_hash 已计算并写入
|
|
360
372
|
|
|
@@ -364,7 +376,7 @@ requirements_statement + CONTEXT.md content + ISO timestamp prefix (YYYY-MM-DD)
|
|
|
364
376
|
- [ ] verdict 为 APPROVED 或 GAPS_FOUND
|
|
365
377
|
- [ ] IF APPROVED: `.sprint-state/delphi-reviewed.json` 已写入(mode=requirements)
|
|
366
378
|
- [ ] IF GAPS_FOUND: gaps_found 数组非空,escalation_needed 正确设置
|
|
367
|
-
- [ ] IF Round
|
|
379
|
+
- [ ] IF Round 5 后仍 GAPS_FOUND: escalation_needed = true
|
|
368
380
|
|
|
369
381
|
**IF 任何 Pre-requisite 缺失:**
|
|
370
382
|
- **CANNOT 完成评审**
|
|
@@ -374,7 +386,7 @@ requirements_statement + CONTEXT.md content + ISO timestamp prefix (YYYY-MM-DD)
|
|
|
374
386
|
- 返回 sprint-flow → grill-with-docs 补充
|
|
375
387
|
- 重新执行 requirements 评审(Round 2)
|
|
376
388
|
|
|
377
|
-
**IF GAPS_FOUND (Round
|
|
389
|
+
**IF GAPS_FOUND (Round 5):**
|
|
378
390
|
- **escalation_needed = true**
|
|
379
391
|
- **MUST 升级给用户决策**
|
|
380
392
|
- **CANNOT 自动继续**
|
|
@@ -386,5 +398,5 @@ IF mode == `requirements` AND 最终裁决是 APPROVED,评审完成后必须
|
|
|
386
398
|
1. 写入 `.sprint-state/phase-outputs/requirements-reviewed.json`
|
|
387
399
|
2. 写入 `.sprint-state/delphi-reviewed.json`(状态文件)
|
|
388
400
|
3. 验证 JSON 格式有效
|
|
389
|
-
4. 验证 requirements_hash
|
|
401
|
+
4. 验证 requirements_hash 为 64 位 hex 且运行时重新计算匹配
|
|
390
402
|
5. 验证 head_commit 匹配当前 HEAD
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
|
|
48
48
|
## Round 3: 最终立场(如需要)
|
|
49
49
|
|
|
50
|
-
触发条件:Round 2
|
|
50
|
+
触发条件:Round 2 后仍无共识。所有专家提交最终绑定立场。必须基于三份成功结果聚合达到 ≥90% 共识,不能以多数票或单个专家结果替代全局批准。
|
|
51
51
|
|
|
52
52
|
### 输出格式
|
|
53
53
|
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
|
|
73
73
|
### 执行方式
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
architecture、technical、feasibility 三位专家分别独立收到:需求陈述 + CONTEXT.md + grill session 摘要 + "独立评审需求完整性,不知道其他专家意见"。三次执行必须全部成功,且每份结果都记录 `result_type=delphi_expert_result` 和实际请求的 `requested_model`;模型 ID、provider、vendor、gateway 和国籍不受限制。
|
|
76
76
|
|
|
77
77
|
### 输出格式
|
|
78
78
|
|
|
79
79
|
```markdown
|
|
80
|
-
## Requirements Review - Expert [A(architecture)/B(feasibility)]
|
|
80
|
+
## Requirements Review - Expert [A(architecture)/B(technical)/C(feasibility)]
|
|
81
81
|
|
|
82
82
|
### 需求摘要
|
|
83
83
|
[被评审需求的简短概括]
|
|
@@ -106,16 +106,16 @@
|
|
|
106
106
|
|
|
107
107
|
### 触发条件
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
前一轮裁决为 GAPS_FOUND,grill-with-docs 补充访谈后重新评审。最多执行 5 轮。
|
|
110
110
|
|
|
111
111
|
### 执行方式
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
三位专家分别收到:更新后的需求陈述 + CONTEXT.md + **前一轮 gaps 列表** + "评估已有缺口是否已修复,是否有新缺口"。每轮仍需三份成功、可验证的独立结果,不得减少专家数。
|
|
114
114
|
|
|
115
115
|
### 输出格式
|
|
116
116
|
|
|
117
117
|
```markdown
|
|
118
|
-
## Requirements Review Round 2 - Expert [A(architecture)/B(feasibility)]
|
|
118
|
+
## Requirements Review Round [2-5] - Expert [A(architecture)/B(technical)/C(feasibility)]
|
|
119
119
|
|
|
120
120
|
### Round 1 缺口修复验证
|
|
121
121
|
| Round 1 Gap | 状态 | 说明 |
|
|
@@ -131,4 +131,4 @@ Round 1 裁决为 GAPS_FOUND,grill-with-docs 补充访谈后重新评审。
|
|
|
131
131
|
[与 Round 1 相比的立场变化]
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
> ⚠️ Round
|
|
134
|
+
> ⚠️ Round 5 后仍 GAPS_FOUND → `escalation_needed: true`,升级给用户决策。任何较早轮次都不能以两位专家、多数票或单个结果产生 APPROVED 证据。
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-08-30
|
|
4
|
+
**Commit:** 0848858
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.19.1.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
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.
|
|
@@ -64,7 +64,7 @@ skills/sprint-flow/
|
|
|
64
64
|
|
|
65
65
|
## CONVENTIONS
|
|
66
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**:
|
|
67
|
+
- **delphi-review HARD-GATE in Phase 2/6 DESIGN**: all three expert roles must execute with three distinct requested model IDs, then aggregate ≥90% consensus within 5 rounds. Unapproved or unverifiable → BLOCK coding.
|
|
68
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).
|
|
69
69
|
- **Phase isolation**: each phase has explicit entry/exit criteria documented in its `references/phase-*.md` file.
|
|
70
70
|
- **Emergent Requirements** discovered in Phase 6/6 CLOSE (USER ACCEPTANCE) are explicitly captured via `templates/emergent-issues-template.md` — never silently merged.
|
|
@@ -165,14 +165,14 @@ PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE
|
|
|
165
165
|
| Phase | Name | Key Actions | Output |
|
|
166
166
|
|-------|------|-------------|--------|
|
|
167
167
|
| 1/6 | PREP | Detect protected branch → Create git worktree → AUTO-ESTIMATE sizing → Classify (lightweight/standard/complex) | Worktree path + impact assessment |
|
|
168
|
-
| 2/6 | DESIGN | CONTEXT.md 预检 (#322) → grill-with-docs → R1 需求评审 → 设计文档+APPROVAL (HARD-GATE) → batch-grill-me → R2 delphi-review (≥90% consensus) → to-issues → specification.yaml | specification.yaml + slices-manifest.json + requirements-reviewed.json |
|
|
168
|
+
| 2/6 | DESIGN | CONTEXT.md 预检 (#322) → grill-with-docs → R1 需求评审 → 设计文档+APPROVAL (HARD-GATE) → batch-grill-me → R2 delphi-review (3 distinct models, ≥90% consensus, max 5 rounds) → to-issues → specification.yaml | specification.yaml + slices-manifest.json + requirements-reviewed.json |
|
|
169
169
|
| 3/6 | BUILD | BUILD-ENTRY-CONTRACT → GITHOOKS-GATE → DELPHI-GATE → ralph-loop (default) or parallel → TDD → blind-review (read-only subagent) → verification | MVP code |
|
|
170
170
|
| 4/6 | VERIFY | delphi-review --mode code-walkthrough → test-specification-alignment (#367 HARD-GATE) → xp-gate check --all → browser (Layer 4) → learnings + xp-gate retro | Review report + feedback-log.md + test-alignment-report.json |
|
|
171
171
|
| 5/6 | SHIP | VERSION-GATE → 分支完成决策 (4选项) → native ship (create PR) → native land (merge + CI + canary) | PR URL + deploy status + merge confirmation |
|
|
172
172
|
| 6/6 | CLOSE | SHIP→CLOSE GATE (merge verified) → Backup sprint-state → #369 返工指标 → USER ACCEPTANCE (⚠️ mandatory manual) → Capture emergent issues → Cleanup worktree + branch | Emergent issues list + cleanup report + metrics |
|
|
173
173
|
|
|
174
174
|
**Hard Gates**:
|
|
175
|
-
- **DESIGN → BUILD**: R1
|
|
175
|
+
- **DESIGN → BUILD**: R1 and R2 invoke all three expert roles independently, verify successful results with three distinct requested models, then aggregate APPROVED consensus ≥90% within 5 rounds, plus GITHOOKS-GATE + DELPHI-GATE + BUILD-ENTRY-CONTRACT (manifest schema + slice↔REQ)
|
|
176
176
|
- **VERIFY → SHIP**: feedback-log.md must exist + test-alignment-report.json PASS (#367 程序化 HARD-GATE)
|
|
177
177
|
- **SHIP → CLOSE**: PR must be merged to main + release completed (HARD-GATE)
|
|
178
178
|
|
|
@@ -339,7 +339,7 @@ stateDiagram-v2
|
|
|
339
339
|
[*] --> PREP : trigger matched
|
|
340
340
|
PREP --> DESIGN : worktree ready
|
|
341
341
|
DESIGN --> BUILD : APPROVED ≥90%
|
|
342
|
-
DESIGN --> DESIGN : REQUEST_CHANGES (max
|
|
342
|
+
DESIGN --> DESIGN : REQUEST_CHANGES (max 5 Delphi rounds)
|
|
343
343
|
BUILD --> VERIFY : tests pass
|
|
344
344
|
BUILD --> BUILD : fix cycle (max 3)
|
|
345
345
|
VERIFY --> SHIP : feedback-log exists
|
|
@@ -348,7 +348,7 @@ stateDiagram-v2
|
|
|
348
348
|
SHIP --> SHIP : CI failed (retry)
|
|
349
349
|
CLOSE --> [*] : UAT confirmed
|
|
350
350
|
BUILD --> BLOCKED : 3 fix cycles exhausted
|
|
351
|
-
DESIGN --> BLOCKED :
|
|
351
|
+
DESIGN --> BLOCKED : 5 Delphi rounds exhausted
|
|
352
352
|
BLOCKED --> [*] : user decision
|
|
353
353
|
```
|
|
354
354
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
| Skill | 来源 | 触发条件 | 输出 |
|
|
17
17
|
|-------|------|---------|------|
|
|
18
18
|
| `grill-with-docs` | Matt Pocock (内置) | CONTEXT.md 不存在时(首个 Skill) | 访谈记录 + CONTEXT.md + ADR |
|
|
19
|
-
| `delphi-review --mode requirements` | xp-gate | R1
|
|
19
|
+
| `delphi-review --mode requirements` | xp-gate | R1 三专家独立评审,验证 distinct model IDs 后聚合 ≥90% | requirements-reviewed.json |
|
|
20
20
|
| 原生设计文档生成 | sprint-flow 编排层 | R1 APPROVED 后 | docs/plans/YYYY-MM-DD-<topic>-design.md |
|
|
21
21
|
| **硬闸门** | — | 设计未批准 → 停止 | 禁止进入 Plan |
|
|
22
22
|
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
| Skill | 来源 | 触发条件 | 条件分支 |
|
|
26
26
|
|-------|------|---------|---------|
|
|
27
27
|
| `batch-grill-me` | Matt Pocock (内置) | 标准路径(change_type != "修改已存在代码") | 批量前置决策 |
|
|
28
|
-
| `delphi-review` | xp-gate | R2
|
|
28
|
+
| `delphi-review` | xp-gate | R2 三专家独立评审,最多 5 轮 | 必须产生 `.sprint-state/delphi-reviewed.json` 且 verdict=APPROVED |
|
|
29
29
|
| `to-issues` | xp-gate | delphi-review APPROVED 后 | 拆解为垂直切片 → slices-manifest.json |
|
|
30
30
|
|
|
31
31
|
### Phase 2: BUILD
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
**执行时机**: Phase 2/6 DESIGN 之前,PREP AUTO-ESTIMATE 完成后。
|
|
4
4
|
|
|
5
|
-
**目的**:
|
|
5
|
+
**目的**: 根据需求规模调整上下文深度与迭代预算,平衡质量保障与效率。Force level 永远不改变专家数量或批准语义。
|
|
6
6
|
|
|
7
7
|
**核心原则**:
|
|
8
8
|
- 所有级别**必须经过 Delphi 评审**,不可跳过
|
|
9
|
-
-
|
|
10
|
-
-
|
|
9
|
+
- 所有级别都采用 architecture、technical、feasibility 三专家 Delphi;Round 1 独立执行并验证三份成功结果
|
|
10
|
+
- 模型 ID、provider、vendor、gateway 和国籍不受限制;`requested_model` trimmed 后必须 distinct
|
|
11
|
+
- 评审达到 ≥90% 共识,最多 5 轮;失败或无法验证时阻断
|
|
11
12
|
- 自动升级机制:当出现风险信号时强制升级级别
|
|
12
13
|
|
|
13
14
|
---
|
|
@@ -16,9 +17,9 @@
|
|
|
16
17
|
|
|
17
18
|
| 级别 | 适用场景 | 专家数 | 最多轮数 | 通过条件 | 预计耗时 |
|
|
18
19
|
|------|---------|--------|---------|----------|---------|
|
|
19
|
-
| **轻量** | 小改动、局部修改、删除代码 |
|
|
20
|
-
| **标准** | 常规功能开发、模块重构 |
|
|
21
|
-
| **复杂** | 核心模块、跨模块变更、新增架构 | 3 |
|
|
20
|
+
| **轻量** | 小改动、局部修改、删除代码 | 3 | 1-5 | ≥90% 聚合共识 | 10-20 分钟 |
|
|
21
|
+
| **标准** | 常规功能开发、模块重构 | 3 | 1-5 | ≥90% 聚合共识 | 30-60 分钟 |
|
|
22
|
+
| **复杂** | 核心模块、跨模块变更、新增架构 | 3 | 1-5 | ≥90% 聚合共识 | 1-2 小时 |
|
|
22
23
|
|
|
23
24
|
---
|
|
24
25
|
|
|
@@ -26,9 +27,9 @@
|
|
|
26
27
|
|
|
27
28
|
| 级别 | delphi-review 调用 | 预计 Token 消耗 | 成本说明 |
|
|
28
29
|
|------|-------------------|--------------|---------|
|
|
29
|
-
| **轻量** | 1 次(
|
|
30
|
-
| **标准** | 1-2 次(
|
|
31
|
-
| **复杂** | 1-3 次(3
|
|
30
|
+
| **轻量** | 1 次(3 专家、最多 5 轮) | ~8,000 | 简化上下文,仍需完整执行 |
|
|
31
|
+
| **标准** | 1-2 次(3 专家、最多 5 轮) | ~15,000-25,000 | 可能需要反馈轮次 |
|
|
32
|
+
| **复杂** | 1-3 次(3 专家、最多 5 轮) | ~30,000-60,000 | 多轮深度评审 |
|
|
32
33
|
|
|
33
34
|
> **成本计算依据**: 基于实际 Sprint 历史数据,假设每次 delphi-review 调用平均消耗 8,000-10,000 Token(含 3 位专家的输入输出)。
|
|
34
35
|
|
|
@@ -56,7 +57,7 @@
|
|
|
56
57
|
| 触发条件 | 原级别 | 升级至 | 说明 |
|
|
57
58
|
|---------|--------|--------|------|
|
|
58
59
|
| Delphi 评审出现 REQUEST_CHANGES | 轻量 | 标准 | 需要第二轮评审 |
|
|
59
|
-
|
|
|
60
|
+
| 专家意见分歧 | 轻量/标准 | 复杂 | 增加上下文深度与后续轮次预算,不增加或替换专家 |
|
|
60
61
|
| 涉及公共 API 变更 | 轻量 | 标准 | 影响外部调用方 |
|
|
61
62
|
| 修改文件数 > 5 或 LOC > 200 | 轻量 | 标准 | 改动规模超出轻量范围 |
|
|
62
63
|
| 存在循环依赖 | 轻量/标准 | 复杂 | 架构风险高 |
|
|
@@ -81,10 +82,10 @@ AUTO-ESTIMATE 输出 → Force Levels 执行 → 自动升级机制(如触发
|
|
|
81
82
|
|
|
82
83
|
| AUTO-ESTIMATE 指标 | 建议级别 | Force Levels 执行 |
|
|
83
84
|
|-------------------|---------|------------------|
|
|
84
|
-
| 引用计数 ≤ 3 + 跨模块 ≤ 1 | 轻量 |
|
|
85
|
-
| 引用计数 4-10 或 跨模块 2 | 标准 |
|
|
86
|
-
| 引用计数 > 10 或 跨模块 ≥ 3 | 复杂 | 3 专家、最多
|
|
87
|
-
| 存在循环依赖 | 强制复杂 | 3 专家、最多
|
|
85
|
+
| 引用计数 ≤ 3 + 跨模块 ≤ 1 | 轻量 | 3 专家、最多 5 轮 Delphi |
|
|
86
|
+
| 引用计数 4-10 或 跨模块 2 | 标准 | 3 专家、最多 5 轮 Delphi |
|
|
87
|
+
| 引用计数 > 10 或 跨模块 ≥ 3 | 复杂 | 3 专家、最多 5 轮 Delphi |
|
|
88
|
+
| 存在循环依赖 | 强制复杂 | 3 专家、最多 5 轮 + 架构评审 |
|
|
88
89
|
|
|
89
90
|
**关键区别**:
|
|
90
91
|
- AUTO-ESTIMATE: **客观指标分析**(代码结构、引用计数)
|
|
@@ -100,15 +101,15 @@ AUTO-ESTIMATE 输出 → Force Levels 执行 → 自动升级机制(如触发
|
|
|
100
101
|
|------|------------|-------------|
|
|
101
102
|
| Phase 2/6 DESIGN 设计评审 | 3 专家、≥90% 共识、生成 specification.yaml | 不适用(设计阶段) |
|
|
102
103
|
| Phase 3/6 BUILD 入口 | **必须检查** `.sprint-state/delphi-reviewed.json` 中 `verdict=APPROVED` | 轻量/标准/复杂:通过对应强度的 delphi-review 生成该门禁文件 |
|
|
103
|
-
| 轻量级评审 | 生成 `delphi-reviewed.json`(
|
|
104
|
-
| 标准级评审 | 生成 `delphi-reviewed.json`(
|
|
105
|
-
| 复杂级评审 | 生成 `delphi-reviewed.json`(3 专家、最多
|
|
104
|
+
| 轻量级评审 | 生成 `delphi-reviewed.json`(3 专家、最多 5 轮、≥90% 聚合共识) | 3 专家、最多 5 轮、写入门禁文件 |
|
|
105
|
+
| 标准级评审 | 生成 `delphi-reviewed.json`(3 专家、最多 5 轮、≥90% 聚合共识) | 3 专家、最多 5 轮、写入门禁文件 |
|
|
106
|
+
| 复杂级评审 | 生成 `delphi-reviewed.json`(3 专家、最多 5 轮、≥90% 聚合共识) | 3 专家、最多 5 轮、写入门禁文件 |
|
|
106
107
|
| Phase 4/6 VERIFY 代码走查 | 再次检查 `delphi-reviewed.json` 或重新评审 | 复用 Force Levels 规则 |
|
|
107
108
|
|
|
108
109
|
**关键规则**:
|
|
109
110
|
- **DELPHI-GATE 永不跳过**:Phase 3/6 BUILD 入口必须检查 `.sprint-state/delphi-reviewed.json` 中 `verdict=APPROVED`
|
|
110
|
-
- **Force Levels
|
|
111
|
-
-
|
|
111
|
+
- **Force Levels 定义上下文强度**:所有级别都用三专家、distinct model IDs 和最多 5 轮来**产生**门禁文件
|
|
112
|
+
- **轻量级不是跳过评审**:只缩短上下文,不减少专家或共识验证
|
|
112
113
|
- **LIGHTWEIGHT ≠ ONE-EXPERT**: 1 专家违反 Delphi 核心原则,禁止
|
|
113
114
|
|
|
114
115
|
---
|
|
@@ -122,9 +123,9 @@ AUTO-ESTIMATE 输出 → Force Levels 执行 → 自动升级机制(如触发
|
|
|
122
123
|
- 无循环依赖
|
|
123
124
|
|
|
124
125
|
**执行流程**:
|
|
125
|
-
1.
|
|
126
|
-
2.
|
|
127
|
-
3.
|
|
126
|
+
1. 三位专家独立评审并验证 distinct requested_model
|
|
127
|
+
2. 最多 5 轮迭代,直到达到 ≥90% 聚合共识
|
|
128
|
+
3. 三份成功结果且 APPROVED 才通过
|
|
128
129
|
4. 评审通过后写入 `.sprint-state/delphi-reviewed.json`
|
|
129
130
|
|
|
130
131
|
**输出文件** (`.sprint-state/delphi-reviewed.json`):
|
|
@@ -133,13 +134,14 @@ AUTO-ESTIMATE 输出 → Force Levels 执行 → 自动升级机制(如触发
|
|
|
133
134
|
"sprint_id": "sprint-2026-06-05-01",
|
|
134
135
|
"level": "轻量",
|
|
135
136
|
"delphi_review": {
|
|
136
|
-
"experts": ["
|
|
137
|
+
"experts": ["architecture-model", "technical-model", "feasibility-model"],
|
|
137
138
|
"rounds": 1,
|
|
138
139
|
"votes": {
|
|
139
140
|
"expert_a": "APPROVED",
|
|
140
|
-
"expert_b": "APPROVED"
|
|
141
|
+
"expert_b": "APPROVED",
|
|
142
|
+
"expert_c": "APPROVED"
|
|
141
143
|
},
|
|
142
|
-
"consensus": "
|
|
144
|
+
"consensus": ">=90% APPROVED",
|
|
143
145
|
"timestamp": "2026-06-05T10:30:00Z"
|
|
144
146
|
},
|
|
145
147
|
"status": "passed"
|
|
@@ -161,13 +163,13 @@ AUTO-ESTIMATE 输出 → Force Levels 执行 → 自动升级机制(如触发
|
|
|
161
163
|
- 中等规模改动(5-15 个文件、200-500 行改动)
|
|
162
164
|
|
|
163
165
|
**执行流程**:
|
|
164
|
-
1.
|
|
165
|
-
2. 如有 REQUEST_CHANGES
|
|
166
|
-
3.
|
|
166
|
+
1. 三位专家独立评审(Round 1)
|
|
167
|
+
2. 如有 REQUEST_CHANGES,继续后续轮次(最多 5 轮)
|
|
168
|
+
3. 三份成功结果聚合达到 ≥90% 才通过
|
|
167
169
|
4. 评审通过后写入 `.sprint-state/delphi-reviewed.json`
|
|
168
170
|
|
|
169
171
|
**升级至复杂级条件**:
|
|
170
|
-
- Round
|
|
172
|
+
- Round 5 仍未达到共识 → BLOCK,不能以仲裁或多数票绕过
|
|
171
173
|
- 涉及核心模块(core/handlers)→ 升级至复杂级
|
|
172
174
|
- 存在循环依赖 → 升级至复杂级
|
|
173
175
|
|
|
@@ -182,14 +184,14 @@ AUTO-ESTIMATE 输出 → Force Levels 执行 → 自动升级机制(如触发
|
|
|
182
184
|
- 公共 API 重大变更
|
|
183
185
|
|
|
184
186
|
**执行流程**:
|
|
185
|
-
1.
|
|
186
|
-
2. 最多
|
|
187
|
-
3.
|
|
187
|
+
1. architecture、technical、feasibility 三位专家使用用户配置的任意可执行模型独立评审
|
|
188
|
+
2. 最多 5 轮评审
|
|
189
|
+
3. 三份成功结果聚合达到 ≥90% 且全部 APPROVED 才通过
|
|
188
190
|
4. 评审通过后写入 `.sprint-state/delphi-reviewed.json`
|
|
189
191
|
|
|
190
|
-
|
|
191
|
-
-
|
|
192
|
-
- Round
|
|
192
|
+
**分歧处理**:
|
|
193
|
+
- 每轮都保持同一组 architecture、technical、feasibility 三个角色,不新增仲裁者,也不减少执行
|
|
194
|
+
- Round 5 仍未达到批准共识时 BLOCK 进入 Phase 3/6 BUILD
|
|
193
195
|
|
|
194
196
|
---
|
|
195
197
|
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
**Phase 2/6 DESIGN 执行模式(全部 orchestrator 直接执行)**:
|
|
52
52
|
1. **Orchestrator 直接执行 grill-with-docs**:`skill(name="grill-with-docs")` → 访谈 + CONTEXT.md/ADR
|
|
53
|
-
2. **Orchestrator
|
|
53
|
+
2. **Orchestrator 调用 R1 Agent skill**:`/delphi-review --mode requirements`,分别执行 architecture、technical、feasibility 三个 per-expert runner → requirements-reviewed.json
|
|
54
54
|
3. **Orchestrator 生成设计文档** → 等待用户 APPROVED
|
|
55
55
|
4. **Orchestrator 直接执行 batch-grill-me**:`skill(name="batch-grill-me")` → 批量决策确认
|
|
56
56
|
5. **Orchestrator 直接执行 R2 delphi-review**:`skill(name="delphi-review")` → 等待 APPROVED
|
|
@@ -216,7 +216,7 @@ find . -name "*{target}*.test.*" -o -name "*{target}*.spec.*" | grep -v node_mod
|
|
|
216
216
|
|
|
217
217
|
**DELPHI-GATE invariant**: 所有流程级别(轻量/标准/复杂)的 Phase 3/6 BUILD 启动前,**必须**检查 `.sprint-state/delphi-reviewed.json` 的 verdict 为 `APPROVED`。未通过 delphi-review 直接路由到 BUILD 属于严重违规。
|
|
218
218
|
|
|
219
|
-
**轻量级的正确理解**: 轻量级意味着 reduced-intensity 的 delphi-review(**
|
|
219
|
+
**轻量级的正确理解**: 轻量级意味着 reduced-intensity 的 delphi-review(**3 专家、最多 5 轮、≥90% 聚合共识、较短上下文**),**不是**跳过 delphi-review,**不是**减少专家或模型执行。见 references/force-levels.md 的轻量级流程定义。
|
|
220
220
|
|
|
221
221
|
**自动 escalation 规则**(检测到以下情况时,自动提升流程级别):
|
|
222
222
|
|