@boyingliu01/xp-gate 0.7.0 → 0.8.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.
- package/bin/xp-gate.js +4 -9
- package/lib/__tests__/audit-log.test.ts +107 -0
- package/lib/__tests__/detect-deps.test.js +212 -42
- package/lib/__tests__/doctor.test.js +1 -0
- package/lib/__tests__/gate-audit.test.ts +59 -0
- package/lib/__tests__/init.test.js +47 -1
- package/lib/__tests__/install-skill.test.js +1 -45
- package/lib/__tests__/ui-detector.test.ts +186 -26
- package/lib/__tests__/ui-review.test.ts +119 -0
- package/lib/__tests__/uninstall.test.js +1 -0
- package/lib/detect-deps.js +180 -37
- package/lib/doctor.js +7 -9
- package/lib/gate-audit.ts +26 -42
- package/lib/init.js +42 -13
- package/lib/install-skill.js +20 -48
- package/lib/rollback.js +1 -16
- package/lib/shared-paths.js +30 -0
- package/lib/shared-utils.js +25 -0
- package/lib/ui-detector.ts +20 -14
- package/lib/ui-review.ts +58 -53
- package/lib/uninstall.js +8 -9
- package/package.json +1 -1
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/skills/admin-template-guidelines/SKILL.md +904 -0
- package/plugins/claude-code/skills/delphi-review/.delphi-config.json.example +45 -0
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +66 -0
- package/plugins/claude-code/skills/delphi-review/INSTALL.md +152 -0
- package/plugins/claude-code/skills/delphi-review/SKILL.md +454 -0
- package/plugins/claude-code/skills/delphi-review/opencode.json.delphi.example +56 -0
- package/plugins/claude-code/skills/delphi-review/references/code-walkthrough.md +486 -0
- package/plugins/claude-code/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/plugins/claude-code/skills/ralph-loop/SKILL.md +501 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/memory.md +55 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/middleware.md +54 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/skill-invocations.md +39 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/system-prompt.md +24 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/tool-descriptions.md +32 -0
- package/plugins/claude-code/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
- package/plugins/claude-code/skills/ralph-loop/templates/progress-log.md +36 -0
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +68 -0
- package/plugins/claude-code/skills/sprint-flow/SKILL.md +1248 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/memory.md +87 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/middleware.md +72 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/skill-invocations.md +104 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/system-prompt.md +27 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/tool-descriptions.md +96 -0
- package/plugins/claude-code/skills/sprint-flow/references/force-levels.md +203 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-0-think.md +115 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-1-plan.md +178 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-2-build.md +198 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-3-review.md +213 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-4-uat.md +125 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-5-feedback.md +100 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-6-ship.md +193 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-7-land.md +140 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-8-cleanup.md +192 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +257 -0
- package/plugins/claude-code/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
- package/plugins/claude-code/skills/sprint-flow/templates/auto-estimate-output-template.md +132 -0
- package/plugins/claude-code/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
- package/plugins/claude-code/skills/sprint-flow/templates/pain-document-template.md +115 -0
- package/plugins/claude-code/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
- package/plugins/claude-code/skills/sprint-flow/templates/sprint-summary-template.md +120 -0
- package/plugins/claude-code/skills/test-driven-development/SKILL.md +71 -0
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +56 -0
- package/plugins/claude-code/skills/test-specification-alignment/SKILL.md +702 -0
- package/plugins/claude-code/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
- package/plugins/claude-code/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
- package/plugins/claude-code/skills/test-specification-alignment/references/specification-format.md +348 -0
- package/plugins/claude-code/skills/to-issues/SKILL.md +277 -0
- package/plugins/opencode/README.md +38 -0
- package/plugins/opencode/index.ts +85 -0
- package/plugins/opencode/package.json +18 -0
- package/plugins/opencode/skills/admin-template-guidelines/SKILL.md +904 -0
- package/plugins/opencode/skills/delphi-review/.delphi-config.json.example +45 -0
- package/plugins/opencode/skills/delphi-review/AGENTS.md +66 -0
- package/plugins/opencode/skills/delphi-review/INSTALL.md +152 -0
- package/plugins/opencode/skills/delphi-review/SKILL.md +454 -0
- package/plugins/opencode/skills/delphi-review/opencode.json.delphi.example +56 -0
- package/plugins/opencode/skills/delphi-review/references/code-walkthrough.md +486 -0
- package/plugins/opencode/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/plugins/opencode/skills/ralph-loop/SKILL.md +501 -0
- package/plugins/opencode/skills/ralph-loop/references/components/memory.md +55 -0
- package/plugins/opencode/skills/ralph-loop/references/components/middleware.md +54 -0
- package/plugins/opencode/skills/ralph-loop/references/components/skill-invocations.md +39 -0
- package/plugins/opencode/skills/ralph-loop/references/components/system-prompt.md +24 -0
- package/plugins/opencode/skills/ralph-loop/references/components/tool-descriptions.md +32 -0
- package/plugins/opencode/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
- package/plugins/opencode/skills/ralph-loop/templates/progress-log.md +36 -0
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +68 -0
- package/plugins/opencode/skills/sprint-flow/SKILL.md +1248 -0
- package/plugins/opencode/skills/sprint-flow/references/components/memory.md +87 -0
- package/plugins/opencode/skills/sprint-flow/references/components/middleware.md +72 -0
- package/plugins/opencode/skills/sprint-flow/references/components/skill-invocations.md +104 -0
- package/plugins/opencode/skills/sprint-flow/references/components/system-prompt.md +27 -0
- package/plugins/opencode/skills/sprint-flow/references/components/tool-descriptions.md +96 -0
- package/plugins/opencode/skills/sprint-flow/references/force-levels.md +203 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-0-think.md +115 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-1-plan.md +178 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-2-build.md +198 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-3-review.md +213 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-4-uat.md +125 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-5-feedback.md +100 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-6-ship.md +193 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-7-land.md +140 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-8-cleanup.md +192 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +257 -0
- package/plugins/opencode/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
- package/plugins/opencode/skills/sprint-flow/templates/auto-estimate-output-template.md +132 -0
- package/plugins/opencode/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
- package/plugins/opencode/skills/sprint-flow/templates/pain-document-template.md +115 -0
- package/plugins/opencode/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
- package/plugins/opencode/skills/sprint-flow/templates/sprint-summary-template.md +120 -0
- package/plugins/opencode/skills/test-driven-development/SKILL.md +71 -0
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +56 -0
- package/plugins/opencode/skills/test-specification-alignment/SKILL.md +702 -0
- package/plugins/opencode/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
- package/plugins/opencode/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
- package/plugins/opencode/skills/test-specification-alignment/references/specification-format.md +348 -0
- package/plugins/opencode/skills/to-issues/SKILL.md +277 -0
- package/plugins/opencode/tsconfig.json +15 -0
- package/plugins/qoder/skills/admin-template-guidelines/SKILL.md +904 -0
- package/plugins/qoder/skills/delphi-review/.delphi-config.json.example +45 -0
- package/plugins/qoder/skills/delphi-review/AGENTS.md +66 -0
- package/plugins/qoder/skills/delphi-review/INSTALL.md +152 -0
- package/plugins/qoder/skills/delphi-review/SKILL.md +454 -0
- package/plugins/qoder/skills/delphi-review/opencode.json.delphi.example +56 -0
- package/plugins/qoder/skills/delphi-review/references/code-walkthrough.md +486 -0
- package/plugins/qoder/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/plugins/qoder/skills/ralph-loop/SKILL.md +501 -0
- package/plugins/qoder/skills/ralph-loop/references/components/memory.md +55 -0
- package/plugins/qoder/skills/ralph-loop/references/components/middleware.md +54 -0
- package/plugins/qoder/skills/ralph-loop/references/components/skill-invocations.md +39 -0
- package/plugins/qoder/skills/ralph-loop/references/components/system-prompt.md +24 -0
- package/plugins/qoder/skills/ralph-loop/references/components/tool-descriptions.md +32 -0
- package/plugins/qoder/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
- package/plugins/qoder/skills/ralph-loop/templates/progress-log.md +36 -0
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +68 -0
- package/plugins/qoder/skills/sprint-flow/SKILL.md +1248 -0
- package/plugins/qoder/skills/sprint-flow/references/components/memory.md +87 -0
- package/plugins/qoder/skills/sprint-flow/references/components/middleware.md +72 -0
- package/plugins/qoder/skills/sprint-flow/references/components/skill-invocations.md +104 -0
- package/plugins/qoder/skills/sprint-flow/references/components/system-prompt.md +27 -0
- package/plugins/qoder/skills/sprint-flow/references/components/tool-descriptions.md +96 -0
- package/plugins/qoder/skills/sprint-flow/references/force-levels.md +203 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-0-think.md +115 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-1-plan.md +178 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-2-build.md +198 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-3-review.md +213 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-4-uat.md +125 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-5-feedback.md +100 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-6-ship.md +193 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-7-land.md +140 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-8-cleanup.md +192 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +257 -0
- package/plugins/qoder/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
- package/plugins/qoder/skills/sprint-flow/templates/auto-estimate-output-template.md +132 -0
- package/plugins/qoder/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
- package/plugins/qoder/skills/sprint-flow/templates/pain-document-template.md +115 -0
- package/plugins/qoder/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
- package/plugins/qoder/skills/sprint-flow/templates/sprint-summary-template.md +120 -0
- package/plugins/qoder/skills/test-driven-development/SKILL.md +71 -0
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +56 -0
- package/plugins/qoder/skills/test-specification-alignment/SKILL.md +702 -0
- package/plugins/qoder/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
- package/plugins/qoder/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
- package/plugins/qoder/skills/test-specification-alignment/references/specification-format.md +348 -0
- package/plugins/qoder/skills/to-issues/SKILL.md +277 -0
- package/skills/admin-template-guidelines/SKILL.md +904 -0
- package/skills/delphi-review/SKILL.md +112 -77
- package/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/skills/ralph-loop/SKILL.md +165 -34
- package/skills/sprint-flow/SKILL.md +448 -107
- package/skills/sprint-flow/references/components/skill-invocations.md +1 -1
- package/skills/sprint-flow/references/components/tool-descriptions.md +1 -1
- package/skills/sprint-flow/references/force-levels.md +203 -0
- package/skills/sprint-flow/references/phase-1-plan.md +4 -4
- package/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +20 -1
- package/skills/sprint-flow/templates/auto-estimate-output-template.md +7 -5
- package/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
- package/skills/test-driven-development/SKILL.md +71 -0
- package/skills/test-specification-alignment/SKILL.md +98 -24
- package/skills/to-issues/SKILL.md +277 -0
- package/plugins/qoder/AGENTS.md +0 -93
- package/plugins/qoder/README.md +0 -87
- package/plugins/qoder/widgets/quality-report.html +0 -163
- package/plugins/qoder/widgets/sprint-dashboard.html +0 -172
- package/skills/delphi-review/evals/evals.json +0 -82
- package/skills/delphi-review/references/qoder-multi-model.md +0 -191
- package/skills/ralph-loop/evals/evals.json +0 -311
- package/skills/ralph-loop/evolution-history.json +0 -59
- package/skills/ralph-loop/evolution-log.md +0 -16
- package/skills/sprint-flow/evals/evals.json +0 -130
- package/skills/sprint-flow/evolution-history.json +0 -39
- package/skills/sprint-flow/evolution-log.md +0 -23
- package/skills/sprint-flow/references/qoder-adaptation.md +0 -173
- package/skills/test-specification-alignment/evals/evals.json +0 -75
|
@@ -12,10 +12,8 @@ description: >
|
|
|
12
12
|
- "start sprint"
|
|
13
13
|
- "一键开发"
|
|
14
14
|
- "/sprint-flow"
|
|
15
|
-
|
|
16
15
|
用法: /sprint-flow "[需求描述]"
|
|
17
16
|
示例: /sprint-flow "开发访谈机器人,支持多轮对话"
|
|
18
|
-
|
|
19
17
|
可选参数:
|
|
20
18
|
--no-isolate: 跳过自动 worktree 隔离(⚠️ 在保护分支上有污染风险)
|
|
21
19
|
--branch-name <name>: 自定义分支名(默认自动生成 sprint/YYYY-MM-DD-NN)
|
|
@@ -28,12 +26,117 @@ description: >
|
|
|
28
26
|
--spec <file>: 使用已有的 specification.yaml 文件
|
|
29
27
|
--with-performance: 启用负载/压力测试(后端项目)
|
|
30
28
|
--mode <build_mode>: 指定 Phase 2 构建模式。默认 = ralph-loop(逐 REQ 迭代,token 节约)。parallel = 旧有并行模式(一次性 dispatch 所有需求)
|
|
31
|
-
|
|
29
|
+
--status: 查看当前 Sprint 进度看板(不执行任何阶段,仅读取 sprint-state.json 并渲染进度)
|
|
30
|
+
Use when asked to "开发新功能", "实现 X", "start sprint", "一键开发", or "/sprint-flow" for end-to-end feature development.
|
|
32
31
|
maturity: beta
|
|
33
32
|
---
|
|
34
33
|
|
|
34
|
+
## Triggers
|
|
35
|
+
|
|
36
|
+
| Trigger Type | Phrases |
|
|
37
|
+
|--------------|---------|
|
|
38
|
+
| **中文** | "开发新功能", "实现 X", "start sprint", "一键开发", "/sprint-flow", "开发用户登录", "创建 XXX 模块" |
|
|
39
|
+
| **English** | "implement feature", "build X", "start sprint", "one-shot development", "create XXX", "develop new functionality" |
|
|
40
|
+
|
|
41
|
+
**Usage**: `/sprint-flow "[需求描述]"`
|
|
42
|
+
|
|
43
|
+
**Examples**:
|
|
44
|
+
- `/sprint-flow "开发访谈机器人,支持多轮对话"`
|
|
45
|
+
- `/sprint-flow "实现用户认证模块,支持 OAuth2"`
|
|
46
|
+
- `/sprint-flow "开发 REST API 端点"`
|
|
47
|
+
|
|
48
|
+
**Optional Parameters**:
|
|
49
|
+
- `--no-isolate`: Skip auto worktree isolation (⚠️ risk of polluting protected branches)
|
|
50
|
+
- `--branch-name <name>`: Custom branch name (default: `sprint/YYYY-MM-DD-NN`)
|
|
51
|
+
- `--force`: Force continue on current branch even if protected (⚠️ requires explicit confirmation)
|
|
52
|
+
- `--stop-at <phase>`: Stop after specified phase (isolate/think/plan/build/review/ship/land/cleanup)
|
|
53
|
+
- `--resume-from <phase>`: Resume from specified phase, skipping earlier phases
|
|
54
|
+
- `--phase <phase>`: Execute only single phase (isolate-only/think-only/plan-only/build-only/review-only/ship-only/land-only/cleanup-only)
|
|
55
|
+
- `--lang <language>`: Specify project language (springboot/django/golang)
|
|
56
|
+
- `--type <project_type>`: Specify project type (web-nextjs/web-react/web-vue/mobile-flutter/mobile-react-native/backend-django/backend-go/backend-springboot)
|
|
57
|
+
- `--spec <file>`: Use existing specification.yaml file
|
|
58
|
+
- `--with-performance`: Enable load/stress testing (backend projects)
|
|
59
|
+
- `--mode <build_mode>`: Phase 2 build mode. Default = ralph-loop (REQ-level iteration, token-efficient). parallel = legacy all-at-once mode
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Scope
|
|
64
|
+
|
|
65
|
+
**What this skill does**:
|
|
66
|
+
- Automates the full 7-phase development pipeline from requirement to production
|
|
67
|
+
- Integrates existing skills (brainstorming, autoplan, delphi-review, TDD, ship, etc.)
|
|
68
|
+
- Enforces quality gates and hard transitions between phases
|
|
69
|
+
- Captures emergent requirements and feedback for continuous improvement
|
|
70
|
+
|
|
71
|
+
**What this skill does NOT do**:
|
|
72
|
+
- Replace individual skills — users can still call `delphi-review`, `test-driven-development`, etc. directly
|
|
73
|
+
- Bypass quality gates or user confirmations at critical checkpoints
|
|
74
|
+
- Automatically merge to main without explicit user approval (Phase 6/7)
|
|
75
|
+
- Handle non-development tasks (bug reports, code review requests without implementation, questions)
|
|
76
|
+
|
|
77
|
+
**Applicable scenarios**:
|
|
78
|
+
- New feature development
|
|
79
|
+
- Module creation
|
|
80
|
+
- End-to-end implementation of user stories
|
|
81
|
+
- Sprint-level planning and execution
|
|
82
|
+
|
|
83
|
+
**Not applicable**:
|
|
84
|
+
- Single bug fixes (use `/investigate` or direct TDD)
|
|
85
|
+
- Code review requests (use `/review` or `delphi-review --mode code-walkthrough`)
|
|
86
|
+
- Architecture questions (use `/plan-eng-review`)
|
|
87
|
+
- Simple explanations or documentation requests
|
|
88
|
+
|
|
89
|
+
## Examples
|
|
90
|
+
|
|
91
|
+
### Example 1: Full feature sprint
|
|
92
|
+
User: `/sprint-flow "开发用户认证模块,支持登录、登出、权限检查"`
|
|
93
|
+
Expected behavior: create/verify isolated worktree, run estimate, produce design/spec, build with TDD, review, wait for manual acceptance, then prepare ship path.
|
|
94
|
+
Expected output: phase summaries, `specification.yaml`, verification evidence, and PR URL if the user chooses PR shipping.
|
|
95
|
+
|
|
96
|
+
### Example 2: Stop after planning
|
|
97
|
+
User: `/sprint-flow "开发 REST API" --stop-at plan`
|
|
98
|
+
Expected behavior: complete isolate/estimate/think/plan, produce specification and slices, then stop without implementation.
|
|
99
|
+
Expected output: phase-1 summary and clear next command to resume from build.
|
|
100
|
+
|
|
101
|
+
### Example 3: Should not trigger
|
|
102
|
+
User: "解释一下这个函数为什么报错"
|
|
103
|
+
Expected behavior: do not run sprint-flow; route to investigation/explanation instead.
|
|
104
|
+
|
|
35
105
|
# Sprint Flow Skill
|
|
36
106
|
|
|
107
|
+
## Scope
|
|
108
|
+
|
|
109
|
+
**In Scope:**
|
|
110
|
+
- Sprint 全流程编排(Phase -1 ISOLATE 到 Phase 8 CLEANUP)
|
|
111
|
+
- Git worktree 隔离与环境准备
|
|
112
|
+
- 自动规模评估与流程路由(轻量/标准/复杂)
|
|
113
|
+
- 多 Skill 串联调用(brainstorming, autoplan, delphi-review, TDD, ralph-loop 等)
|
|
114
|
+
- 关键节点暂停与用户决策
|
|
115
|
+
- 状态持久化(sprint-state.json)
|
|
116
|
+
- 多平台适配(Claude Code, OpenCode, Qoder)
|
|
117
|
+
|
|
118
|
+
**Out of Scope:**
|
|
119
|
+
- Does NOT handle internal Skill implementation (each Skill remains independent)
|
|
120
|
+
- Does NOT write business code
|
|
121
|
+
- Does NOT configure CI/CD pipelines (project's own responsibility)
|
|
122
|
+
- Does NOT deploy to production (only up to PR creation + merge)
|
|
123
|
+
|
|
124
|
+
## Security Notes
|
|
125
|
+
|
|
126
|
+
- sprint-flow **不执行任何破坏性命令**(no `rm -rf`, `git push --force`, `DROP TABLE` 等)
|
|
127
|
+
- `git worktree remove` 仅删除 sprint 创建的临时 worktree 目录,不影响主仓库
|
|
128
|
+
- Phase 6 SHIP 仅创建 PR(`gh pr create`),不自动 merge(除非用户显式确认)
|
|
129
|
+
- Phase 7 LAND 使用 `gh pr merge --squash`(非 force push),merge 前等待 CI 通过
|
|
130
|
+
- 文档中 `+ platform deploy` 等描述仅表示可选的部署步骤映射,**不是可执行命令**
|
|
131
|
+
- sprint-flow 不下载、安装或执行任何外部二进制文件
|
|
132
|
+
|
|
133
|
+
## Permissions
|
|
134
|
+
|
|
135
|
+
- `git`: read/write (worktree, branch, commit)
|
|
136
|
+
- `gh` (GitHub CLI): read/write (PR create, merge, CI query)
|
|
137
|
+
- `filesystem`: read/write (project dir + `.worktrees/` only)
|
|
138
|
+
- `network`: read-only (CI status, canary health)
|
|
139
|
+
|
|
37
140
|
## 核心原则
|
|
38
141
|
|
|
39
142
|
| 原则 | 说明 |
|
|
@@ -54,7 +157,7 @@ maturity: beta
|
|
|
54
157
|
Phase -1: ISOLATE → ⚠️ 检测保护分支(main/master/develop/trunk/mainline) → 强制创建 git worktree
|
|
55
158
|
→ 已在 worktree 中 → 跳过 → 项目 setup → .gitignore 校验 → sprint-state isolation 记录
|
|
56
159
|
Phase -0.5: AUTO-ESTIMATE → 自动评估需求规模 → ⚠️ 展示评估结果,用户确认
|
|
57
|
-
→
|
|
160
|
+
→ 轻量:Phase 0-3 以 reduced intensity 执行 THINK/PLAN/review(不跳过 delphi-review)
|
|
58
161
|
→ 标准:正常流程 Phase 0-4
|
|
59
162
|
→ 复杂:完整流程 Phase 0-8 + 风险警告
|
|
60
163
|
Phase 0: THINK → brainstorming → ⚠️ HARD-GATE: 设计未批准 → 不可进入实现 → Design Document (AI编辑行为约束: 原则3 Surgical Changes, 验证循环要求: 原则4 Goal-Driven Execution - 见 AGENTS.md "## AI CODING DISCIPLINE (Karpathy Principles)")
|
|
@@ -75,7 +178,7 @@ Phase 6: SHIP → finishing-a-development-branch (4 选项) → ship (PR 路径)
|
|
|
75
178
|
→ PR 创建完成
|
|
76
179
|
Phase 7: ⚠️ LAND → land-and-deploy → merge PR + wait CI + canary health check
|
|
77
180
|
→ deploy verification + auto-rollback on failure
|
|
78
|
-
Phase 8: CLEANUP → git worktree remove + sprint-state.json update → status: merged
|
|
181
|
+
Phase 8: CLEANUP → git worktree remove + branch delete + sprint-state.json update → status: merged
|
|
79
182
|
→ Sprint Summary → IF emergent issues → Sprint 2
|
|
80
183
|
```
|
|
81
184
|
|
|
@@ -102,6 +205,35 @@ Phase 8: CLEANUP → git worktree remove + sprint-state.json update → status:
|
|
|
102
205
|
|
|
103
206
|
---
|
|
104
207
|
|
|
208
|
+
## Workflow Steps
|
|
209
|
+
|
|
210
|
+
| Step | Phase | Name | Key Actions | Output |
|
|
211
|
+
|------|-------|------|-------------|--------|
|
|
212
|
+
| 1 | **-1** | **ISOLATE** | Detect protected branch → Create git worktree → Setup project → Validate .gitignore → Record sprint state | Worktree path |
|
|
213
|
+
| 2 | **-0.5** | **AUTO-ESTIMATE** | Analyze code structure → Count references → Assess cross-module impact → Classify (lightweight/standard/complex) | Impact assessment + flow recommendation |
|
|
214
|
+
| 3 | **0** | **THINK** | brainstorming → Generate design doc + CONTEXT.md + ADR | Design document |
|
|
215
|
+
| 4 | **1** | **PLAN** | autoplan → delphi-review (mandatory; lightweight allowed) → Generate specification.yaml + slices-manifest.json | specification.yaml |
|
|
216
|
+
| 5 | **2** | **BUILD** | GITHOOKS-GATE → ralph-loop (default) or parallel → TDD → freeze → blind review → verification | MVP code |
|
|
217
|
+
| 6 | **3** | **REVIEW** | delphi-review --mode code-walkthrough → test-specification-alignment → browse QA → benchmark (optional) | Review report |
|
|
218
|
+
| 7 | **4** | **USER ACCEPT** | **Manual verification** → Capture emergent issues | Emergent issues list |
|
|
219
|
+
| 8 | **5** | **FEEDBACK** | learn → retro → systematic-debugging | feedback-log.md |
|
|
220
|
+
| 9 | **6** | **SHIP** | finishing-a-development-branch → ship (create PR) | PR URL |
|
|
221
|
+
| 10 | **7** | **LAND** | land-and-deploy → merge PR → wait CI → canary health check → rollback on failure | Deploy status |
|
|
222
|
+
| 11 | **8** | **CLEANUP** | Safe worktree removal → Update sprint state → Sprint summary | Cleanup report |
|
|
223
|
+
|
|
224
|
+
**Phase Flow**:
|
|
225
|
+
```
|
|
226
|
+
ISOLATE → AUTO-ESTIMATE → THINK → PLAN → [GITHOOKS-GATE] → BUILD → REVIEW → USER ACCEPT → FEEDBACK → SHIP → LAND → CLEANUP
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**Hard Gates**:
|
|
230
|
+
- **Phase 0→1**: Design must be APPROVED by delphi-review (≥91% consensus)
|
|
231
|
+
- **Phase 1→2**: GITHOOKS-GATE (hooks must be installed) + DELPHI-GATE (spec must be APPROVED)
|
|
232
|
+
- **Phase 4→5**: User acceptance must be completed (mandatory manual step)
|
|
233
|
+
- **Phase 5→6**: feedback-log.md must exist (HARD-GATE)
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
105
237
|
## 各 Phase 调用的 Skills
|
|
106
238
|
|
|
107
239
|
### Phase -1: ISOLATE(git worktree 隔离)
|
|
@@ -182,7 +314,7 @@ Phase 8: CLEANUP → git worktree remove + sprint-state.json update → status:
|
|
|
182
314
|
|
|
183
315
|
| 评估结果 | 路由 | 说明 |
|
|
184
316
|
|---------|------|------|
|
|
185
|
-
| **轻量** (引用 ≤3, 同模块,无循环依赖) |
|
|
317
|
+
| **轻量** (引用 ≤3, 同模块,无循环依赖) | Phase 0-3 以 reduced intensity 执行(THINK/PLAN/review 强度降低,不跳过 delphi-review) | 轻量仍需要评审,但强度可调整 |
|
|
186
318
|
| **标准** (引用 4-10, 跨 1-2 模块) | 正常流程 Phase 0-4 | 标准 sprint |
|
|
187
319
|
| **复杂** (引用 >10 或 循环依赖 或 跨 3+ 模块) | 完整 Phase 0-8 + 风险警告 | 高风险需求 |
|
|
188
320
|
|
|
@@ -218,8 +350,8 @@ Phase 8: CLEANUP → git worktree remove + sprint-state.json update → status:
|
|
|
218
350
|
- **取消**: 停止本次 sprint
|
|
219
351
|
|
|
220
352
|
**⚠️ 轻量路由的特殊处理**:
|
|
221
|
-
-
|
|
222
|
-
-
|
|
353
|
+
- 轻量路由 Phase 0-3 以 reduced intensity 执行(THINK/PLAN/review 强度降低)
|
|
354
|
+
- **所有路由必须产生** `.sprint-state/delphi-reviewed.json` 且 `verdict = "APPROVED"` 才能进入 BUILD
|
|
223
355
|
- Phase 2 BUILD 仍然执行完整 TDD + 盲评 + 验证
|
|
224
356
|
|
|
225
357
|
### Phase 0: THINK(需求探索与设计)
|
|
@@ -234,9 +366,9 @@ Phase 8: CLEANUP → git worktree remove + sprint-state.json update → status:
|
|
|
234
366
|
- 输出: `specification.yaml`(含 user_stories[])+ `slices-manifest.json`
|
|
235
367
|
|
|
236
368
|
**条件分支逻辑**:
|
|
237
|
-
- IF autoplan AUTO_APPROVED + 无 taste_decisions →
|
|
238
|
-
- IF autoplan NEEDS_REVIEW OR taste_decisions > 0 →
|
|
239
|
-
- delphi-review APPROVED → 生成 specification.yaml(含 user_stories[]) → **调用 /to-issues** 拆解为垂直切片 → slices-manifest.json → Phase 2 按 execution_order 执行
|
|
369
|
+
- IF autoplan AUTO_APPROVED + 无 taste_decisions → 可执行 **lightweight delphi-review**(2 专家、1 轮、2/2 APPROVED,参考 `references/force-levels.md`)
|
|
370
|
+
- IF autoplan NEEDS_REVIEW OR taste_decisions > 0 → 调用标准 delphi-review(3 专家)
|
|
371
|
+
- **delphi-review 必须产生** `.sprint-state/delphi-reviewed.json` 且 `verdict = "APPROVED"` → 生成 specification.yaml(含 user_stories[]) → **调用 /to-issues** 拆解为垂直切片 → slices-manifest.json → Phase 2 按 execution_order 执行
|
|
240
372
|
|
|
241
373
|
### Phase 1→2: GITHOOKS-GATE(质量门禁安装检查)
|
|
242
374
|
|
|
@@ -245,7 +377,7 @@ Phase 8: CLEANUP → git worktree remove + sprint-state.json update → status:
|
|
|
245
377
|
**必须执行**: 运行 `githooks/verify.sh` 检查当前项目的 hooks 是否安装。
|
|
246
378
|
|
|
247
379
|
**检查结果处理**:
|
|
248
|
-
- ✅ 全部存在 →
|
|
380
|
+
- ✅ 全部存在 → 进入 Phase 2 BUILD 入口(仍必须先执行 DELPHI-GATE)
|
|
249
381
|
- ❌ 部分/全部缺失 → 运行 `githooks/install.sh` 安装(包括 `.git/hooks/pre-commit`、`.git/hooks/pre-push`、`githooks/adapter-common.sh`、`githooks/adapters/`)
|
|
250
382
|
- 如果 githooks/ 目录不存在于项目根目录(即当前项目不是 xp-gate) → 从 xp-gate 仓库拉取 `githooks/` 目录结构
|
|
251
383
|
- 安装完成后再次 `verify.sh` 确认
|
|
@@ -263,25 +395,6 @@ Phase 2 第一步必须执行 DELPHI-GATE 检查。没有 delphi-review APPROVED
|
|
|
263
395
|
3. 验证 `verdict` 字段 == `"APPROVED"` → 不等于 → 同上 BLOCK
|
|
264
396
|
4. ✅ 通过 → 进入 BUILD 编码
|
|
265
397
|
|
|
266
|
-
**⚠️ Qoder Pre-Edit Gate(MANDATORY — 替代 Claude Code 的 delphi-review-guard.sh Hook)**:
|
|
267
|
-
|
|
268
|
-
在 Qoder 环境中,由于没有 PreToolUse/PostToolUse 文件系统钩子,orchestrator **MUST** 在每次文件编辑/写入操作之前执行以下检查:
|
|
269
|
-
|
|
270
|
-
1. 检查 `.sprint-state/` 目录是否存在 → 不存在 → 跳过检查(非 sprint 项目)
|
|
271
|
-
2. 读取 `.sprint-state/delphi-reviewed.json` → 文件不存在 → **BLOCK**: 输出 `[DELPHI-GATE] delphi-review not APPROVED. 请先运行 /delphi-review`
|
|
272
|
-
3. `verdict` != `"APPROVED"` → **BLOCK**
|
|
273
|
-
4. `verdict` == `"APPROVED"` → 允许编辑
|
|
274
|
-
|
|
275
|
-
此检查在 Phase 2 至 Phase 6 期间持续生效。orchestrator 不可绕过此检查。
|
|
276
|
-
|
|
277
|
-
**Post-REQ Principles Check(替代 Claude Code 的 PostToolUse xp-gate-check Hook)**:
|
|
278
|
-
|
|
279
|
-
每个 REQ 完成后(ralph-loop 三层验证 Gate 之后),orchestrator **MUST** 运行:
|
|
280
|
-
```bash
|
|
281
|
-
npx -y tsx src/principles/index.ts --files "<changed_files>" --format console
|
|
282
|
-
```
|
|
283
|
-
如果 src/principles/ 不存在(非 xp-gate 项目),则跳过此步骤。
|
|
284
|
-
|
|
285
398
|
**输入**: `slices-manifest.json`(由 Phase 1 `/to-issues` 生成),按 `execution_order` 逐个执行。
|
|
286
399
|
|
|
287
400
|
**默认模式**: `ralph-loop` — 逐 REQ/切片 迭代构建。每个切片(REQ)dispatch 独立 subagent,干净上下文,全量回归测试。Token 节约 40-67%。参见 `skills/ralph-loop/SKILL.md`。
|
|
@@ -349,9 +462,12 @@ npx -y tsx src/principles/index.ts --files "<changed_files>" --format console
|
|
|
349
462
|
- 输入: phase-4-summary.md(验收结果)+ emergent-issues.md(如有)
|
|
350
463
|
- 输出: `feedback-log.md`
|
|
351
464
|
- **HARD-GATE**: Phase 5 不可跳过。Phase 4 完成后 → 必须进入 Phase 5 → 完成后才能进入 Phase 6。
|
|
352
|
-
- **`learn` (gstack)** — Sprint
|
|
465
|
+
- **`learn` (gstack)** — Sprint 级复盘(**Phase 5 必须自动调用,不依赖手动触发**)
|
|
466
|
+
- **默认提炼模板**(无需用户额外输入):
|
|
467
|
+
> 提炼总结并保存可复用的经验教训,把大模型不知道、并且犯错后无法立即发现和纠正的知识保存下来。如果是对其他项目也有价值的,就保存成全局记忆,否则保存为项目记忆。
|
|
353
468
|
- ralph-loop 已在 BUILD Phase 内部实现 per-REQ learn(permanent/contextual 分类)
|
|
354
469
|
- Phase 5 额外进行 Sprint 级复盘,总结全 Phase 经验
|
|
470
|
+
- **learnings 自动注入**:`/learn export` 时自动 append 到 CLAUDE.md / AGENTS.md 末尾形成 `## Project Learnings` 章节
|
|
355
471
|
- **`retro` (gstack)** — 工程回顾:提交历史、工作模式、代码质量趋势
|
|
356
472
|
- **`systematic-debugging` (superpowers)** — 根因调试
|
|
357
473
|
|
|
@@ -362,6 +478,13 @@ npx -y tsx src/principles/index.ts --files "<changed_files>" --format console
|
|
|
362
478
|
- **HARD-GATE**: Phase 5 未完成 → 不可进入 Phase 6。验证 `.sprint-state/phase-outputs/feedback-log.md` 存在。
|
|
363
479
|
- **⚠️ GITHOOKS-GATE**: 再次验证 hooks 完整性(Phase 2 的 TDD 编码已触发提交,SHIP 阶段还会再次提交)
|
|
364
480
|
- 运行 `githooks/verify.sh` → 缺失 → `githooks/install.sh` → 阻断直至修复
|
|
481
|
+
- **⚠️ VERSION-GATE**: Phase 6 提交前必须 bump VERSION 文件(与变更类型无关)
|
|
482
|
+
- 默认 bump PATCH 位(如 `0.6.0.0` → `0.6.1.0`,MICRO 重置为 0)
|
|
483
|
+
- 重大新功能 bump MINOR 位(如 `0.6.0.0` → `0.7.0.0`),Breaking change bump MAJOR 位
|
|
484
|
+
- 运行 `bash scripts/sync-version.sh` 同步到所有 package.json(root、npm-package、claude-plugin、opencode)
|
|
485
|
+
- 更新 `CHANGELOG.md` 添加本次变更记录(含变更类型说明:skill-only / code / mixed)
|
|
486
|
+
- 验证:`git diff VERSION` 确认版本号已变更,未变更 → 阻断
|
|
487
|
+
- **此规则与变更类型无关** — 纯 skill 变更(仅 .md 文件)也必须 bump PATCH,确保每次 sprint 都触发 npm 发布
|
|
365
488
|
- **`finishing-a-development-branch`** (superpowers) — 结构化完成流:4 选项(merge / PR / discard / keep)
|
|
366
489
|
- `ship` (gstack) — 创建 PR(PR 路径时使用)
|
|
367
490
|
- Phase 6 输出:PR URL(用于 Phase 7 输入)
|
|
@@ -384,21 +507,46 @@ npx -y tsx src/principles/index.ts --files "<changed_files>" --format console
|
|
|
384
507
|
- 条件跳过:无部署配置时,仅执行 merge + CI checks,跳过 deploy/canary
|
|
385
508
|
- 输出:部署状态 + Canary 报告(成功/失败/跳过)
|
|
386
509
|
|
|
387
|
-
### Phase 8: CLEANUP
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
-
|
|
400
|
-
-
|
|
401
|
-
-
|
|
510
|
+
### Phase 8: CLEANUP(安全清理 + 总结)
|
|
511
|
+
|
|
512
|
+
**执行时机**: Phase 7 LAND 成功后(或 Phase 6 Option 1 本地 Merge 后)
|
|
513
|
+
|
|
514
|
+
**动作**:
|
|
515
|
+
0. **保存分支信息**(必须在 worktree remove 之前执行):
|
|
516
|
+
- `sprint_branch=$(git branch --show-current)`
|
|
517
|
+
- 如果 sprint_branch 为空或与 `isolation.branch` 不匹配: 使用 `isolation.branch`
|
|
518
|
+
1. **检测 worktree 是否存在**: `[ -d <worktree_path> ]`
|
|
519
|
+
2. **安全清理**:
|
|
520
|
+
- **⚠️ 禁止使用通配符或递归 shell 删除命令** — 必须先列出 `isolation.worktree_path` 并确认只清理本 sprint worktree
|
|
521
|
+
- 首选 git worktree 管理命令清理该精确路径;失败时重试最多 3 次,间隔 1s
|
|
522
|
+
- 如果仍失败:输出 `[WARN] Worktree cleanup failed; list the target path and ask the user to clean it manually`
|
|
523
|
+
- ** NEVER delete arbitrary directories** — 只删除本 sprint 创建的 `isolation.worktree_path`
|
|
524
|
+
3. **残留检测**: `[ -d <worktree_path> ]` → 如果仍有残留,输出警告 `[WARN] 检测到残留目录,请手动检查:<worktree_path>`
|
|
525
|
+
4. **删除本地和远程分支**(⚠️ 必须在步骤 2 worktree remove 成功后执行):
|
|
526
|
+
- 切回主分支: `cd <repo_root> && git checkout main && git pull origin main`
|
|
527
|
+
- 删除本地分支: `git branch -D <sprint_branch>`
|
|
528
|
+
- 使用 `-D` 因为 squash merge 后 git 不认为已合并
|
|
529
|
+
- 如果分支不存在(已被其他流程删除): 静默跳过
|
|
530
|
+
- 删除远程分支: `git push origin --delete <sprint_branch>`
|
|
531
|
+
- 如果远程分支删除失败: 输出 `[WARN] Remote branch cleanup failed, please manually run: git push origin --delete <sprint_branch>`
|
|
532
|
+
5. **关闭遗留 OPEN PR**:
|
|
533
|
+
- `gh pr list --head <sprint_branch> --state open`
|
|
534
|
+
- 如果存在 OPEN PR: 关闭并评论说明该 sprint 已通过其他 PR 完成
|
|
535
|
+
6. **更新 `.sprint-state/sprint-state.json`**:
|
|
536
|
+
- `phase: 8`
|
|
537
|
+
- `status: "merged"` 或 `"completed"`
|
|
538
|
+
7. **输出 Cleanup Report + Sprint Summary**
|
|
539
|
+
|
|
540
|
+
**执行顺序依赖**:
|
|
541
|
+
```
|
|
542
|
+
步骤 0 (保存分支名) → 步骤 2 (worktree remove 解除分支文件占用) → 步骤 4 (branch -D 删分支引用 → push --delete 删远程)
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
**条件跳过**: `--no-isolate` 路径(无 worktree/分支可清理)
|
|
546
|
+
|
|
547
|
+
**输出**: `[CLEANUP] Worktree removed + Branch deleted:` + 残留检测(✅ clean / ⚠️ residual)
|
|
548
|
+
|
|
549
|
+
**IF emergent issues → Sprint 2**
|
|
402
550
|
|
|
403
551
|
---
|
|
404
552
|
|
|
@@ -444,55 +592,6 @@ npx -y tsx src/principles/index.ts --files "<changed_files>" --format console
|
|
|
444
592
|
| 7 | LAND | ✅ | `deep` | `["land-and-deploy"]` | subagent |
|
|
445
593
|
| 8 | CLEANUP | ❌ | Bash(直接执行) | 无 | orchestrator |
|
|
446
594
|
|
|
447
|
-
### Qoder Agent Dispatch Mapping(Qoder 平台替代方案)
|
|
448
|
-
|
|
449
|
-
在 Qoder 环境中,OpenCode 的 `task()` API 和 superpowers/gstack 外部 skill 不可用。以下映射表说明每个 Phase 在 Qoder 中的执行方式:
|
|
450
|
-
|
|
451
|
-
| Phase | 原 task()/skill 调用 | Qoder 替代方案 | 说明 |
|
|
452
|
-
|-------|----------------------|--------------|------|
|
|
453
|
-
| -1 ISOLATE | Bash 直接执行 | **Bash 直接执行**(无变化) | git worktree 操作平台无关 |
|
|
454
|
-
| -0.5 AUTO-ESTIMATE | Bash 直接执行 | **Bash 直接执行**(无变化) | grep -rn 平台无关 |
|
|
455
|
-
| 0 THINK | `task(deep, brainstorming)` | **plan-agent subagent** | 需求探索与设计适合 plan-agent |
|
|
456
|
-
| 1 PLAN | `task(deep, autoplan+delphi+to-issues)` | **plan-agent subagent** | 规划类任务 |
|
|
457
|
-
| 2 BUILD | `ralph-loop` + 外部 skill | **orchestrator 直接执行** | ralph-loop 逐 REQ 迭代,不需要独立 subagent |
|
|
458
|
-
| 2 步骤 4 | `requesting-code-review` | **CodeReview subagent** | 代码盲评天然适合 CodeReview agent |
|
|
459
|
-
| 2 步骤 6 | `verification-before-completion` | **orchestrator 内联** | 运行测试 + lint + coverage + principles |
|
|
460
|
-
| 3 REVIEW | `task(deep, delphi+test-spec)` | **CodeReview subagent** + **browser-use MCP** | 代码走查 + 浏览器自动化 |
|
|
461
|
-
| 4 ACCEPT | 强制人工 | **强制人工**(无变化) | 必须人工验收 |
|
|
462
|
-
| 5 FEEDBACK | `task(quick, learn+retro+debug)` | **plan-agent** + **Memory 系统** | 回顾分析 + UpdateMemory 持久化 |
|
|
463
|
-
| 6 SHIP | `task(quick, finishing-branch+ship)` | **orchestrator 直接执行** | git + gh CLI 操作平台无关 |
|
|
464
|
-
| 7 LAND | `task(deep, land-and-deploy)` | **orchestrator 直接执行** | gh pr merge + CI polling |
|
|
465
|
-
| 8 CLEANUP | Bash 直接执行 | **Bash 直接执行**(无变化) | git worktree remove 平台无关 |
|
|
466
|
-
|
|
467
|
-
**Qoder 外部 Skill 降级表**(替代 superpowers/gstack 依赖):
|
|
468
|
-
|
|
469
|
-
| 外部 Skill | 来源 | Qoder 替代方案 |
|
|
470
|
-
|-----------|------|----------------|
|
|
471
|
-
| brainstorming | superpowers | orchestrator 内联需求探索对话 |
|
|
472
|
-
| autoplan | gstack | plan-agent 分析代码库生成计划 |
|
|
473
|
-
| freeze / unfreeze | gstack | Qoder Pre-Edit Gate 替代(见上方) |
|
|
474
|
-
| requesting-code-review | superpowers | **CodeReview subagent** |
|
|
475
|
-
| verification-before-completion | superpowers | orchestrator 运行测试+lint+coverage+principles |
|
|
476
|
-
| learn / retro | gstack | Qoder **Memory 系统**(UpdateMemory / SearchMemory) |
|
|
477
|
-
| browse | gstack | **browser-use MCP** 工具(navigate_page, click, fill, take_screenshot) |
|
|
478
|
-
| ship / finishing-a-development-branch | superpowers/gstack | orchestrator 执行 git + gh CLI |
|
|
479
|
-
| systematic-debugging | superpowers | orchestrator 内联分析错误日志 |
|
|
480
|
-
| land-and-deploy / canary | gstack | orchestrator 执行 gh + curl/Invoke-RestMethod |
|
|
481
|
-
| dispatching-parallel-agents | superpowers | orchestrator 按 dependency_graph 顺序执行 |
|
|
482
|
-
| executing-plans | superpowers | orchestrator 直接执行 |
|
|
483
|
-
|
|
484
|
-
**Qoder genui Widget 集成**:
|
|
485
|
-
|
|
486
|
-
Phase 3 REVIEW 完成后,orchestrator **SHOULD** 使用 genui `show_widget` MCP 工具展示质量报告:
|
|
487
|
-
- Widget 模板:`plugins/qoder/widgets/quality-report.html`
|
|
488
|
-
- 数据源:读取项目根目录的 `quality-report.json`
|
|
489
|
-
|
|
490
|
-
Sprint 执行过程中,用户可通过 `/sprint-status` 触发 genui `show_widget` 展示 Sprint 仪表板:
|
|
491
|
-
- Widget 模板:`plugins/qoder/widgets/sprint-dashboard.html`
|
|
492
|
-
- 数据源:`.sprint-state/sprint-state.json`
|
|
493
|
-
|
|
494
|
-
详细适配规则参见 `references/qoder-adaptation.md`。
|
|
495
|
-
|
|
496
595
|
**上下文隔离原则**:
|
|
497
596
|
- 每个 Subagent 在**独立 session** 中启动,不继承 orchestrator 的对话历史
|
|
498
597
|
- orchestrator session 仅接收 subagent 的最终结果摘要(~13,000 tokens/sprint)
|
|
@@ -535,9 +634,22 @@ Sprint 执行过程中,用户可通过 `/sprint-status` 触发 genui `show_wid
|
|
|
535
634
|
2. **更新 sprint-state.json**:
|
|
536
635
|
- `phase`: 当前阶段编号
|
|
537
636
|
- `outputs`: 新增当前阶段输出文件路径
|
|
637
|
+
- `phase_history`: 追加或更新当前阶段的记录
|
|
638
|
+
- Phase 开始时:追加 `{ "phase": N, "phase_name": "NAME", "status": "running", "started_at": "<ISO 8601>", "completed_at": null, "duration_seconds": null }`
|
|
639
|
+
- Phase 完成时:更新对应条目,填充 `completed_at`(ISO 8601)和 `duration_seconds`(`completed_at - started_at` 的秒数)
|
|
640
|
+
- Phase 跳过时(如轻量路由跳过 Phase 0 brainstorming):设置 `status: "skipped"`
|
|
538
641
|
|
|
539
642
|
3. **等待用户确认 checkpoint**(如适用)
|
|
540
643
|
|
|
644
|
+
4. **展示进度看板**:执行 `node scripts/render-sprint-progress.cjs` 渲染进度看板
|
|
645
|
+
- 脚本自动读取 `.sprint-state/sprint-state.json` 并输出 ASCII 进度看板
|
|
646
|
+
- 渲染规则:已完成阶段显示 ✅ + 耗时,当前阶段 🔄,待做 ⬜,跳过 ⏭️,失败 ❌
|
|
647
|
+
- 进度条:`[████▓░░░░░░] {pct}%`(已完成数/总阶段数 11)
|
|
648
|
+
- 下一步行动:根据当前阶段 + 状态,自动查找对应提示
|
|
649
|
+
- 输出物路径:列出 `outputs` 中已有的文件路径
|
|
650
|
+
- 时机:每个 Phase 完成后的 transition 阶段自动展示,用户无需请求
|
|
651
|
+
- 向后兼容:旧版 `sprint-state.json` 缺少 `phase_history` 时,从 `phase` 字段推断状态
|
|
652
|
+
|
|
541
653
|
### Phase Summary 格式(YAML Frontmatter Schema)
|
|
542
654
|
|
|
543
655
|
每个 `phase-N-summary.md` 必须包含以下 YAML frontmatter:
|
|
@@ -598,8 +710,10 @@ Sprint state is persisted as JSON in `.sprint-state/sprint-state.json`:
|
|
|
598
710
|
```json
|
|
599
711
|
{
|
|
600
712
|
"id": "sprint-2026-04-26-01",
|
|
713
|
+
"task_description": "开发访谈机器人,支持多轮对话",
|
|
601
714
|
"phase": -1,
|
|
602
715
|
"status": "running|paused|completed",
|
|
716
|
+
"started_at": "2026-04-26T10:00:00Z",
|
|
603
717
|
"isolation": {
|
|
604
718
|
"worktree_path": ".worktrees/sprint/sprint-2026-04-26-01",
|
|
605
719
|
"branch": "sprint/2026-04-26-01",
|
|
@@ -617,11 +731,21 @@ Sprint state is persisted as JSON in `.sprint-state/sprint-state.json`:
|
|
|
617
731
|
"test_file_count": 4
|
|
618
732
|
},
|
|
619
733
|
"estimated_level": "轻量|标准|复杂",
|
|
620
|
-
"recommended_flow": "轻量流程 (Phase
|
|
734
|
+
"recommended_flow": "轻量流程 (Phase 0-3, reduced-intensity Delphi)|标准流程 (Phase 0-4)|完整 Sprint Flow (Phase 0-8)",
|
|
621
735
|
"risk_warnings": ["循环依赖: user ↔ plane"],
|
|
622
736
|
"user_decision": "accepted|overridden|cancelled",
|
|
623
737
|
"override_reason": null
|
|
624
738
|
},
|
|
739
|
+
"phase_history": [
|
|
740
|
+
{
|
|
741
|
+
"phase": -1,
|
|
742
|
+
"phase_name": "ISOLATE",
|
|
743
|
+
"status": "completed",
|
|
744
|
+
"started_at": "2026-04-26T10:00:00Z",
|
|
745
|
+
"completed_at": "2026-04-26T10:03:00Z",
|
|
746
|
+
"duration_seconds": 180
|
|
747
|
+
}
|
|
748
|
+
],
|
|
625
749
|
"outputs": {
|
|
626
750
|
"pain_document": "docs/pain-document.md",
|
|
627
751
|
"specification": "specification.yaml",
|
|
@@ -635,7 +759,19 @@ Sprint state is persisted as JSON in `.sprint-state/sprint-state.json`:
|
|
|
635
759
|
}
|
|
636
760
|
}
|
|
637
761
|
```
|
|
638
|
-
|
|
762
|
+
|
|
763
|
+
**新增字段说明**:
|
|
764
|
+
- `task_description`: Sprint 需求描述(Phase -1 启动时写入)
|
|
765
|
+
- `started_at`: Sprint 启动时间戳(Phase -1 启动时写入,ISO 8601 格式)
|
|
766
|
+
- `phase_history`: 阶段历史数组,每个元素记录阶段的执行信息:
|
|
767
|
+
- `phase`: 阶段编号
|
|
768
|
+
- `phase_name`: 阶段名称
|
|
769
|
+
- `status`: completed / running / failed / skipped
|
|
770
|
+
- `started_at`: 阶段开始时间(ISO 8601)
|
|
771
|
+
- `completed_at`: 阶段完成时间(null 表示未完成)
|
|
772
|
+
- `duration_seconds`: 耗时秒数(null 表示未完成)
|
|
773
|
+
|
|
774
|
+
**Eval assertions check for:** `phase`, `status`, `isolation.branch`, `outputs.specification`, `metrics.coverage_pct`, `phase_history`, `task_description`.
|
|
639
775
|
|
|
640
776
|
---
|
|
641
777
|
|
|
@@ -662,8 +798,8 @@ Sprint state is persisted as JSON in `.sprint-state/sprint-state.json`:
|
|
|
662
798
|
|
|
663
799
|
```bash
|
|
664
800
|
/sprint-flow "继续 Sprint" --resume-from build --spec specification.yaml
|
|
665
|
-
# →
|
|
666
|
-
#
|
|
801
|
+
# → 从 Build 恢复,但必须已有 specification.yaml + .sprint-state/delphi-reviewed.json (verdict: APPROVED)
|
|
802
|
+
# 适用场景:中断恢复,使用已通过 delphi-review 的 specification.yaml
|
|
667
803
|
```
|
|
668
804
|
|
|
669
805
|
### --phase(只执行单个阶段)
|
|
@@ -674,6 +810,23 @@ Sprint state is persisted as JSON in `.sprint-state/sprint-state.json`:
|
|
|
674
810
|
# 适用场景:单独验证某个阶段
|
|
675
811
|
```
|
|
676
812
|
|
|
813
|
+
### --status(查看 Sprint 进度)
|
|
814
|
+
|
|
815
|
+
```bash
|
|
816
|
+
/sprint-flow --status
|
|
817
|
+
# → 执行 node scripts/render-sprint-progress.cjs
|
|
818
|
+
# → 读取 .sprint-state/sprint-state.json 并渲染 ASCII 进度看板
|
|
819
|
+
# → 不执行任何 Phase,仅展示当前状态
|
|
820
|
+
# 适用场景:碎片时间恢复时快速查看进度、中断后确认当前阶段和下一步操作
|
|
821
|
+
```
|
|
822
|
+
|
|
823
|
+
**行为规则**:
|
|
824
|
+
- 执行 `node scripts/render-sprint-progress.cjs`(脚本自动处理所有渲染逻辑)
|
|
825
|
+
- 如果 `sprint-state.json` 不存在 → 脚本输出 `[INFO] 未找到活跃的 Sprint。请先运行 /sprint-flow "[需求描述]" 启动新 Sprint。`
|
|
826
|
+
- 如果 `status == "completed"` → 脚本输出完整看板 + `[INFO] Sprint 已完成。`
|
|
827
|
+
- `--status` 可与其他参数组合:`--status --resume-from build` → 先展示状态,再提示 "将从 Phase 2 BUILD 继续"
|
|
828
|
+
- 向后兼容:旧版 `sprint-state.json` 缺少 `phase_history`/`task_description` 时,按模板"向后兼容"规则渲染
|
|
829
|
+
|
|
677
830
|
### --lang(指定项目语言)
|
|
678
831
|
|
|
679
832
|
```bash
|
|
@@ -720,7 +873,7 @@ Sprint state is persisted as JSON in `.sprint-state/sprint-state.json`:
|
|
|
720
873
|
| Phase 5 (FEEDBACK) | `learn` + `retro` | (同) | (同) | (同) |
|
|
721
874
|
| Phase 6 (SHIP) | `finishing-a-development-branch` + `ship` | (同) | + platform deploy (可选) | (同) |
|
|
722
875
|
| Phase 7 (LAND) | `land-and-deploy` + canary | (同) | (同) | (同) |
|
|
723
|
-
| Phase 8 (CLEANUP) | worktree remove + state update | (同) | (同) | (同) |
|
|
876
|
+
| Phase 8 (CLEANUP) | worktree remove + branch delete + state update | (同) | (同) | (同) |
|
|
724
877
|
| Browse | `localhost:3000` | 部署 URL + 表单/交互 | Flutter Web / RN Web 测试 | (专用负载测试) |
|
|
725
878
|
|
|
726
879
|
**Mobile 专属工具链**:
|
|
@@ -801,7 +954,7 @@ Sprint 结束时 (Phase 6 完成):
|
|
|
801
954
|
|
|
802
955
|
# 第二次:三天后继续
|
|
803
956
|
/sprint-flow "继续开发" --resume-from build --spec docs/specification.yaml
|
|
804
|
-
# →
|
|
957
|
+
# → 从 Build 入口恢复,但必须已有 specification.yaml + .sprint-state/delphi-reviewed.json (verdict: APPROVED)
|
|
805
958
|
```
|
|
806
959
|
|
|
807
960
|
### 示例 3:语言特定
|
|
@@ -839,7 +992,7 @@ Sprint 结束时 (Phase 6 完成):
|
|
|
839
992
|
# → mkdir -p .worktrees/sprint
|
|
840
993
|
# → 检测已有 NN 编号(.worktrees/sprint/ | grep -oE '[0-9]{2}$' | sort -n | tail -1)
|
|
841
994
|
# → git worktree add .worktrees/sprint/sprint-2026-05-24-01 -b sprint/2026-05-24-01
|
|
842
|
-
# → 在 worktree
|
|
995
|
+
# → 在 worktree 目录下:npm install → 基线测试 → .sprint-state/ 记录
|
|
843
996
|
# → 进入 Phase 0 THINK...
|
|
844
997
|
|
|
845
998
|
# 跳过隔离(⚠️ 有污染风险)
|
|
@@ -853,11 +1006,13 @@ Sprint 结束时 (Phase 6 完成):
|
|
|
853
1006
|
|
|
854
1007
|
# 自定义分支名
|
|
855
1008
|
/sprint-flow "开发用户登录" --branch-name feat/user-login
|
|
856
|
-
# →
|
|
857
|
-
# → worktree
|
|
1009
|
+
# → 分支名:feat/user-login(保留 /)
|
|
1010
|
+
# → worktree 路径:.worktrees/sprint/feat-user-login(/ 替换为 -)
|
|
858
1011
|
|
|
859
|
-
#
|
|
860
|
-
|
|
1012
|
+
# Sprint 完成后安全清理:先列出本 sprint 的 isolation.worktree_path
|
|
1013
|
+
# 仅清理 sprint-state 中记录的精确 worktree 路径
|
|
1014
|
+
# 禁止使用通配符或递归 shell 删除命令
|
|
1015
|
+
# 如果自动清理失败,输出目标路径并要求用户手动处理
|
|
861
1016
|
```
|
|
862
1017
|
|
|
863
1018
|
---
|
|
@@ -871,6 +1026,87 @@ git worktree remove .worktrees/sprint/sprint-2026-05-24-01
|
|
|
871
1026
|
|
|
872
1027
|
---
|
|
873
1028
|
|
|
1029
|
+
## Anti-Patterns
|
|
1030
|
+
|
|
1031
|
+
| 错误 | 正确 |
|
|
1032
|
+
|------|------|
|
|
1033
|
+
| 把普通问答、解释、代码检索请求路由到 sprint-flow | 仅在用户明确要求开发/实现/一键开发完整需求时触发 sprint-flow |
|
|
1034
|
+
| 跳过 Phase -1 隔离,直接在 main/master/develop 上改代码 | 默认创建 worktree;除非用户显式使用 `--no-isolate` 或 `--force` 并确认风险 |
|
|
1035
|
+
| 未完成 Phase -0.5 AUTO-ESTIMATE 就套用完整重流程 | 先评估轻量/标准/复杂,再按推荐流程或用户确认后的流程执行 |
|
|
1036
|
+
| Plan 阶段跳过 Delphi 评审直接 Build | 所有需求级别(轻量/标准/复杂)必须经过 autoplan + delphi-review;未 APPROVED 禁止编码 |
|
|
1037
|
+
| 跳过 TDD 直接实现代码 | Phase 2 必须遵循 RED → GREEN → REFACTOR,测试与实现一起交付 |
|
|
1038
|
+
| 跳过用户验收直接 Ship | Phase 4 USER ACCEPTANCE 必须人工完成;不得自动化、跳过或伪造 |
|
|
1039
|
+
| 验证失败后继续追加随机修改 | 最多 3 次修复循环;仍失败则 BLOCK 并请求用户决策 |
|
|
1040
|
+
| 未生成 Phase Summary 就进入下一阶段 | 每个 Phase 必须写入 `.sprint-state/phase-outputs/phase-{N}-summary.md` 并通过 transition gate |
|
|
1041
|
+
|
|
1042
|
+
## Output Format
|
|
1043
|
+
|
|
1044
|
+
See [Output Contract](#output-contract) below for the canonical machine-readable output schema.
|
|
1045
|
+
|
|
1046
|
+
### Eval Assertions
|
|
1047
|
+
- `phase`, `phase_name`, `status`, `outputs`, `decisions`, `next_phase_context`
|
|
1048
|
+
- `id`, `isolation.worktree_path`, `isolation.branch`, `metrics.coverage_pct`
|
|
1049
|
+
|
|
1050
|
+
## Output Contract
|
|
1051
|
+
|
|
1052
|
+
### Machine-Readable Outputs
|
|
1053
|
+
|
|
1054
|
+
**Phase Summary** (all automated Phases must output):
|
|
1055
|
+
```markdown
|
|
1056
|
+
---
|
|
1057
|
+
phase: <N>
|
|
1058
|
+
phase_name: <NAME>
|
|
1059
|
+
status: completed|paused|failed
|
|
1060
|
+
outputs:
|
|
1061
|
+
- path: "path/to/output"
|
|
1062
|
+
type: file|directory
|
|
1063
|
+
decisions:
|
|
1064
|
+
- title: "Decision title"
|
|
1065
|
+
rationale: "Rationale for decision"
|
|
1066
|
+
unresolved_issues: []
|
|
1067
|
+
next_phase_context: "Context needed by next phase"
|
|
1068
|
+
---
|
|
1069
|
+
|
|
1070
|
+
## Phase Summary
|
|
1071
|
+
Concise summary, <= 50 lines.
|
|
1072
|
+
```
|
|
1073
|
+
|
|
1074
|
+
**Sprint State JSON** (all Phases must maintain):
|
|
1075
|
+
```json
|
|
1076
|
+
{
|
|
1077
|
+
"id": "sprint-YYYY-MM-DD-NN",
|
|
1078
|
+
"phase": <N>,
|
|
1079
|
+
"status": "running|paused|completed|failed",
|
|
1080
|
+
"isolation": {
|
|
1081
|
+
"worktree_path": ".worktrees/sprint/sprint-YYYY-MM-DD-NN",
|
|
1082
|
+
"branch": "sprint/YYYY-MM-DD-NN"
|
|
1083
|
+
},
|
|
1084
|
+
"outputs": {},
|
|
1085
|
+
"metrics": {}
|
|
1086
|
+
}
|
|
1087
|
+
```
|
|
1088
|
+
|
|
1089
|
+
### Final User-Facing Output
|
|
1090
|
+
|
|
1091
|
+
When ending or pausing, output:
|
|
1092
|
+
- Current Phase and status
|
|
1093
|
+
- Generated file paths
|
|
1094
|
+
- Passed/failed validation commands
|
|
1095
|
+
- Next user decision required (if applicable)
|
|
1096
|
+
- PR URL (Phase 6 success) or cleanup report (Phase 8 success)
|
|
1097
|
+
|
|
1098
|
+
## Security Notes
|
|
1099
|
+
|
|
1100
|
+
- Sprint Flow 会执行 git 操作(worktree、branch、commit、PR、merge),在受保护分支上默认必须隔离。
|
|
1101
|
+
- 不得使用 `--no-verify` 绕过 quality gates;hook 失败必须修复根因。
|
|
1102
|
+
- 不得自动推送、创建 PR、merge 或 deploy,除非用户请求的流程明确进入 Ship/Land 阶段并已通过前置 gate。
|
|
1103
|
+
- 不得修改、打印或提交 `.delphi-config.json`、API keys、tokens、cookies、SSH keys 等敏感信息。
|
|
1104
|
+
- Phase 7 deploy/canary 失败时必须报告失败并按配置回滚;不可静默忽略部署失败。
|
|
1105
|
+
- Phase 4 用户验收不可由模型代替;人工验收是发布安全边界。
|
|
1106
|
+
- worktree 清理只允许删除本 sprint 创建的 `isolation.worktree_path`,不得删除任意用户目录。
|
|
1107
|
+
|
|
1108
|
+
---
|
|
1109
|
+
|
|
874
1110
|
## References
|
|
875
1111
|
|
|
876
1112
|
详细指令文件位于 `@references/`:
|
|
@@ -891,6 +1127,111 @@ git worktree remove .worktrees/sprint/sprint-2026-05-24-01
|
|
|
891
1127
|
- `@templates/pain-document-template.md` — Pain Document 模板
|
|
892
1128
|
- `@templates/emergent-issues-template.md` — Emergent Issues 检查清单
|
|
893
1129
|
- `@templates/sprint-summary-template.md` — Sprint Summary 模板
|
|
1130
|
+
- `@templates/sprint-progress-template.md` — Sprint 进度看板(每个 Phase 完成后 + `--status` 查询时渲染)
|
|
1131
|
+
|
|
1132
|
+
---
|
|
1133
|
+
|
|
1134
|
+
## Anti-Patterns
|
|
1135
|
+
|
|
1136
|
+
| ❌ 错误 | ✅ 正确 |
|
|
1137
|
+
|---|---|
|
|
1138
|
+
| 在保护分支 (main/master) 上直接执行 sprint | Phase -1 自动创建 worktree 隔离 |
|
|
1139
|
+
| 跳过 Phase 4 用户验收("赶时间") | Phase 4 是 HARD-GATE,必须人工验收 |
|
|
1140
|
+
| Phase 2 不安装 Git Hooks 就开始编码 | GITHOOKS-GATE 检查必须先于 BUILD |
|
|
1141
|
+
| 单个 subagent 处理所有 REQ | ralph-loop 逐 REQ 迭代,每个 REQ 独立上下文 |
|
|
1142
|
+
| 验证失败仍 commit | 验证不通过的代码不 commit |
|
|
1143
|
+
| 跳过 Phase 5 FEEDBACK 直接 SHIP | Phase 5 是 HARD-GATE,不可跳过 |
|
|
1144
|
+
| --force 在生产分支上运行不确认 | --force 必须等待用户显式确认风险 |
|
|
1145
|
+
| Phase 6 SHIP 后不清理 worktree/分支 | Phase 8 CLEANUP 必须执行 worktree remove + branch delete |
|
|
1146
|
+
|
|
1147
|
+
---
|
|
1148
|
+
|
|
1149
|
+
## Output Format (MANDATORY)
|
|
1150
|
+
|
|
1151
|
+
Sprint-flow orchestrator MUST output phase transition status as valid JSON:
|
|
1152
|
+
|
|
1153
|
+
```json
|
|
1154
|
+
{
|
|
1155
|
+
"skill_name": "sprint-flow",
|
|
1156
|
+
"sprint_id": "sprint-YYYY-MM-DD-NN",
|
|
1157
|
+
"current_phase": 2,
|
|
1158
|
+
"phase_name": "BUILD",
|
|
1159
|
+
"status": "running|paused|completed|failed",
|
|
1160
|
+
"isolation": {
|
|
1161
|
+
"worktree_path": ".worktrees/sprint/sprint-YYYY-MM-DD-NN",
|
|
1162
|
+
"branch": "sprint/YYYY-MM-DD-NN"
|
|
1163
|
+
},
|
|
1164
|
+
"progress": {
|
|
1165
|
+
"total_phases": 11,
|
|
1166
|
+
"completed_phases": 4,
|
|
1167
|
+
"percentage": 36,
|
|
1168
|
+
"phase_history": [
|
|
1169
|
+
{ "phase": -1, "phase_name": "ISOLATE", "status": "completed", "started_at": "2026-06-02T14:30:00Z", "completed_at": "2026-06-02T14:33:00Z", "duration_seconds": 180 },
|
|
1170
|
+
{ "phase": -0.5, "phase_name": "AUTO-ESTIMATE", "status": "completed", "started_at": "2026-06-02T14:33:00Z", "completed_at": "2026-06-02T14:34:00Z", "duration_seconds": 60 },
|
|
1171
|
+
{ "phase": 0, "phase_name": "THINK", "status": "completed", "started_at": "2026-06-02T14:34:00Z", "completed_at": "2026-06-02T14:59:00Z", "duration_seconds": 1500 },
|
|
1172
|
+
{ "phase": 1, "phase_name": "PLAN", "status": "completed", "started_at": "2026-06-02T14:59:00Z", "completed_at": "2026-06-02T15:17:00Z", "duration_seconds": 1080 },
|
|
1173
|
+
{ "phase": 2, "phase_name": "BUILD", "status": "running", "started_at": "2026-06-02T15:17:00Z", "completed_at": null, "duration_seconds": null }
|
|
1174
|
+
]
|
|
1175
|
+
},
|
|
1176
|
+
"outputs": {
|
|
1177
|
+
"specification": "specification.yaml",
|
|
1178
|
+
"mvp": "mvp-v1/"
|
|
1179
|
+
},
|
|
1180
|
+
"metrics": {
|
|
1181
|
+
"tests_passed": 15,
|
|
1182
|
+
"tests_failed": 0,
|
|
1183
|
+
"coverage_pct": 85
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
```
|
|
1187
|
+
|
|
1188
|
+
**Eval assertions check for:** `phase`, `status`, `isolation.branch`, `outputs.specification`, `metrics.coverage_pct`, `progress.phase_history`.
|
|
1189
|
+
|
|
1190
|
+
---
|
|
1191
|
+
|
|
1192
|
+
## Anti-Patterns
|
|
1193
|
+
|
|
1194
|
+
| ❌ 错误 | ✅ 正确 |
|
|
1195
|
+
|---|---|
|
|
1196
|
+
| 在保护分支 (main/master) 上直接执行 sprint | Phase -1 自动创建 worktree 隔离 |
|
|
1197
|
+
| 跳过 Phase 4 用户验收("赶时间") | Phase 4 是 HARD-GATE,必须人工验收 |
|
|
1198
|
+
| Phase 2 不安装 Git Hooks 就开始编码 | GITHOOKS-GATE 检查必须先于 BUILD |
|
|
1199
|
+
| 单个 subagent 处理所有 REQ | ralph-loop 逐 REQ 迭代,每个 REQ 独立上下文 |
|
|
1200
|
+
| 验证失败仍 commit | 验证不通过的代码不 commit |
|
|
1201
|
+
| 跳过 Phase 5 FEEDBACK 直接 SHIP | Phase 5 是 HARD-GATE,不可跳过 |
|
|
1202
|
+
| --force 在生产分支上运行不确认 | --force 必须等待用户显式确认风险 |
|
|
1203
|
+
| Phase 6 SHIP 后不清理 worktree/分支 | Phase 8 CLEANUP 必须执行 worktree remove + branch delete |
|
|
1204
|
+
|
|
1205
|
+
---
|
|
1206
|
+
|
|
1207
|
+
## Output Format (MANDATORY)
|
|
1208
|
+
|
|
1209
|
+
Sprint-flow orchestrator MUST output phase transition status as valid JSON:
|
|
1210
|
+
|
|
1211
|
+
```json
|
|
1212
|
+
{
|
|
1213
|
+
"skill_name": "sprint-flow",
|
|
1214
|
+
"sprint_id": "sprint-YYYY-MM-DD-NN",
|
|
1215
|
+
"current_phase": 2,
|
|
1216
|
+
"phase_name": "BUILD",
|
|
1217
|
+
"status": "running|paused|completed|failed",
|
|
1218
|
+
"isolation": {
|
|
1219
|
+
"worktree_path": ".worktrees/sprint/sprint-YYYY-MM-DD-NN",
|
|
1220
|
+
"branch": "sprint/YYYY-MM-DD-NN"
|
|
1221
|
+
},
|
|
1222
|
+
"outputs": {
|
|
1223
|
+
"specification": "specification.yaml",
|
|
1224
|
+
"mvp": "mvp-v1/"
|
|
1225
|
+
},
|
|
1226
|
+
"metrics": {
|
|
1227
|
+
"tests_passed": 15,
|
|
1228
|
+
"tests_failed": 0,
|
|
1229
|
+
"coverage_pct": 85
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
```
|
|
1233
|
+
|
|
1234
|
+
**Eval assertions check for:** `phase`, `status`, `isolation.branch`, `outputs.specification`, `metrics.coverage_pct`.
|
|
894
1235
|
|
|
895
1236
|
---
|
|
896
1237
|
|