@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.
Files changed (197) hide show
  1. package/bin/xp-gate.js +4 -9
  2. package/lib/__tests__/audit-log.test.ts +107 -0
  3. package/lib/__tests__/detect-deps.test.js +212 -42
  4. package/lib/__tests__/doctor.test.js +1 -0
  5. package/lib/__tests__/gate-audit.test.ts +59 -0
  6. package/lib/__tests__/init.test.js +47 -1
  7. package/lib/__tests__/install-skill.test.js +1 -45
  8. package/lib/__tests__/ui-detector.test.ts +186 -26
  9. package/lib/__tests__/ui-review.test.ts +119 -0
  10. package/lib/__tests__/uninstall.test.js +1 -0
  11. package/lib/detect-deps.js +180 -37
  12. package/lib/doctor.js +7 -9
  13. package/lib/gate-audit.ts +26 -42
  14. package/lib/init.js +42 -13
  15. package/lib/install-skill.js +20 -48
  16. package/lib/rollback.js +1 -16
  17. package/lib/shared-paths.js +30 -0
  18. package/lib/shared-utils.js +25 -0
  19. package/lib/ui-detector.ts +20 -14
  20. package/lib/ui-review.ts +58 -53
  21. package/lib/uninstall.js +8 -9
  22. package/package.json +1 -1
  23. package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
  24. package/plugins/claude-code/skills/admin-template-guidelines/SKILL.md +904 -0
  25. package/plugins/claude-code/skills/delphi-review/.delphi-config.json.example +45 -0
  26. package/plugins/claude-code/skills/delphi-review/AGENTS.md +66 -0
  27. package/plugins/claude-code/skills/delphi-review/INSTALL.md +152 -0
  28. package/plugins/claude-code/skills/delphi-review/SKILL.md +454 -0
  29. package/plugins/claude-code/skills/delphi-review/opencode.json.delphi.example +56 -0
  30. package/plugins/claude-code/skills/delphi-review/references/code-walkthrough.md +486 -0
  31. package/plugins/claude-code/skills/improve-codebase-architecture/SKILL.md +156 -0
  32. package/plugins/claude-code/skills/ralph-loop/SKILL.md +501 -0
  33. package/plugins/claude-code/skills/ralph-loop/references/components/memory.md +55 -0
  34. package/plugins/claude-code/skills/ralph-loop/references/components/middleware.md +54 -0
  35. package/plugins/claude-code/skills/ralph-loop/references/components/skill-invocations.md +39 -0
  36. package/plugins/claude-code/skills/ralph-loop/references/components/system-prompt.md +24 -0
  37. package/plugins/claude-code/skills/ralph-loop/references/components/tool-descriptions.md +32 -0
  38. package/plugins/claude-code/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
  39. package/plugins/claude-code/skills/ralph-loop/templates/progress-log.md +36 -0
  40. package/plugins/claude-code/skills/sprint-flow/AGENTS.md +68 -0
  41. package/plugins/claude-code/skills/sprint-flow/SKILL.md +1248 -0
  42. package/plugins/claude-code/skills/sprint-flow/references/components/memory.md +87 -0
  43. package/plugins/claude-code/skills/sprint-flow/references/components/middleware.md +72 -0
  44. package/plugins/claude-code/skills/sprint-flow/references/components/skill-invocations.md +104 -0
  45. package/plugins/claude-code/skills/sprint-flow/references/components/system-prompt.md +27 -0
  46. package/plugins/claude-code/skills/sprint-flow/references/components/tool-descriptions.md +96 -0
  47. package/plugins/claude-code/skills/sprint-flow/references/force-levels.md +203 -0
  48. package/plugins/claude-code/skills/sprint-flow/references/phase-0-think.md +115 -0
  49. package/plugins/claude-code/skills/sprint-flow/references/phase-1-plan.md +178 -0
  50. package/plugins/claude-code/skills/sprint-flow/references/phase-2-build.md +198 -0
  51. package/plugins/claude-code/skills/sprint-flow/references/phase-3-review.md +213 -0
  52. package/plugins/claude-code/skills/sprint-flow/references/phase-4-uat.md +125 -0
  53. package/plugins/claude-code/skills/sprint-flow/references/phase-5-feedback.md +100 -0
  54. package/plugins/claude-code/skills/sprint-flow/references/phase-6-ship.md +193 -0
  55. package/plugins/claude-code/skills/sprint-flow/references/phase-7-land.md +140 -0
  56. package/plugins/claude-code/skills/sprint-flow/references/phase-8-cleanup.md +192 -0
  57. package/plugins/claude-code/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +257 -0
  58. package/plugins/claude-code/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
  59. package/plugins/claude-code/skills/sprint-flow/templates/auto-estimate-output-template.md +132 -0
  60. package/plugins/claude-code/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
  61. package/plugins/claude-code/skills/sprint-flow/templates/pain-document-template.md +115 -0
  62. package/plugins/claude-code/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
  63. package/plugins/claude-code/skills/sprint-flow/templates/sprint-summary-template.md +120 -0
  64. package/plugins/claude-code/skills/test-driven-development/SKILL.md +71 -0
  65. package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +56 -0
  66. package/plugins/claude-code/skills/test-specification-alignment/SKILL.md +702 -0
  67. package/plugins/claude-code/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
  68. package/plugins/claude-code/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
  69. package/plugins/claude-code/skills/test-specification-alignment/references/specification-format.md +348 -0
  70. package/plugins/claude-code/skills/to-issues/SKILL.md +277 -0
  71. package/plugins/opencode/README.md +38 -0
  72. package/plugins/opencode/index.ts +85 -0
  73. package/plugins/opencode/package.json +18 -0
  74. package/plugins/opencode/skills/admin-template-guidelines/SKILL.md +904 -0
  75. package/plugins/opencode/skills/delphi-review/.delphi-config.json.example +45 -0
  76. package/plugins/opencode/skills/delphi-review/AGENTS.md +66 -0
  77. package/plugins/opencode/skills/delphi-review/INSTALL.md +152 -0
  78. package/plugins/opencode/skills/delphi-review/SKILL.md +454 -0
  79. package/plugins/opencode/skills/delphi-review/opencode.json.delphi.example +56 -0
  80. package/plugins/opencode/skills/delphi-review/references/code-walkthrough.md +486 -0
  81. package/plugins/opencode/skills/improve-codebase-architecture/SKILL.md +156 -0
  82. package/plugins/opencode/skills/ralph-loop/SKILL.md +501 -0
  83. package/plugins/opencode/skills/ralph-loop/references/components/memory.md +55 -0
  84. package/plugins/opencode/skills/ralph-loop/references/components/middleware.md +54 -0
  85. package/plugins/opencode/skills/ralph-loop/references/components/skill-invocations.md +39 -0
  86. package/plugins/opencode/skills/ralph-loop/references/components/system-prompt.md +24 -0
  87. package/plugins/opencode/skills/ralph-loop/references/components/tool-descriptions.md +32 -0
  88. package/plugins/opencode/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
  89. package/plugins/opencode/skills/ralph-loop/templates/progress-log.md +36 -0
  90. package/plugins/opencode/skills/sprint-flow/AGENTS.md +68 -0
  91. package/plugins/opencode/skills/sprint-flow/SKILL.md +1248 -0
  92. package/plugins/opencode/skills/sprint-flow/references/components/memory.md +87 -0
  93. package/plugins/opencode/skills/sprint-flow/references/components/middleware.md +72 -0
  94. package/plugins/opencode/skills/sprint-flow/references/components/skill-invocations.md +104 -0
  95. package/plugins/opencode/skills/sprint-flow/references/components/system-prompt.md +27 -0
  96. package/plugins/opencode/skills/sprint-flow/references/components/tool-descriptions.md +96 -0
  97. package/plugins/opencode/skills/sprint-flow/references/force-levels.md +203 -0
  98. package/plugins/opencode/skills/sprint-flow/references/phase-0-think.md +115 -0
  99. package/plugins/opencode/skills/sprint-flow/references/phase-1-plan.md +178 -0
  100. package/plugins/opencode/skills/sprint-flow/references/phase-2-build.md +198 -0
  101. package/plugins/opencode/skills/sprint-flow/references/phase-3-review.md +213 -0
  102. package/plugins/opencode/skills/sprint-flow/references/phase-4-uat.md +125 -0
  103. package/plugins/opencode/skills/sprint-flow/references/phase-5-feedback.md +100 -0
  104. package/plugins/opencode/skills/sprint-flow/references/phase-6-ship.md +193 -0
  105. package/plugins/opencode/skills/sprint-flow/references/phase-7-land.md +140 -0
  106. package/plugins/opencode/skills/sprint-flow/references/phase-8-cleanup.md +192 -0
  107. package/plugins/opencode/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +257 -0
  108. package/plugins/opencode/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
  109. package/plugins/opencode/skills/sprint-flow/templates/auto-estimate-output-template.md +132 -0
  110. package/plugins/opencode/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
  111. package/plugins/opencode/skills/sprint-flow/templates/pain-document-template.md +115 -0
  112. package/plugins/opencode/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
  113. package/plugins/opencode/skills/sprint-flow/templates/sprint-summary-template.md +120 -0
  114. package/plugins/opencode/skills/test-driven-development/SKILL.md +71 -0
  115. package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +56 -0
  116. package/plugins/opencode/skills/test-specification-alignment/SKILL.md +702 -0
  117. package/plugins/opencode/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
  118. package/plugins/opencode/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
  119. package/plugins/opencode/skills/test-specification-alignment/references/specification-format.md +348 -0
  120. package/plugins/opencode/skills/to-issues/SKILL.md +277 -0
  121. package/plugins/opencode/tsconfig.json +15 -0
  122. package/plugins/qoder/skills/admin-template-guidelines/SKILL.md +904 -0
  123. package/plugins/qoder/skills/delphi-review/.delphi-config.json.example +45 -0
  124. package/plugins/qoder/skills/delphi-review/AGENTS.md +66 -0
  125. package/plugins/qoder/skills/delphi-review/INSTALL.md +152 -0
  126. package/plugins/qoder/skills/delphi-review/SKILL.md +454 -0
  127. package/plugins/qoder/skills/delphi-review/opencode.json.delphi.example +56 -0
  128. package/plugins/qoder/skills/delphi-review/references/code-walkthrough.md +486 -0
  129. package/plugins/qoder/skills/improve-codebase-architecture/SKILL.md +156 -0
  130. package/plugins/qoder/skills/ralph-loop/SKILL.md +501 -0
  131. package/plugins/qoder/skills/ralph-loop/references/components/memory.md +55 -0
  132. package/plugins/qoder/skills/ralph-loop/references/components/middleware.md +54 -0
  133. package/plugins/qoder/skills/ralph-loop/references/components/skill-invocations.md +39 -0
  134. package/plugins/qoder/skills/ralph-loop/references/components/system-prompt.md +24 -0
  135. package/plugins/qoder/skills/ralph-loop/references/components/tool-descriptions.md +32 -0
  136. package/plugins/qoder/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
  137. package/plugins/qoder/skills/ralph-loop/templates/progress-log.md +36 -0
  138. package/plugins/qoder/skills/sprint-flow/AGENTS.md +68 -0
  139. package/plugins/qoder/skills/sprint-flow/SKILL.md +1248 -0
  140. package/plugins/qoder/skills/sprint-flow/references/components/memory.md +87 -0
  141. package/plugins/qoder/skills/sprint-flow/references/components/middleware.md +72 -0
  142. package/plugins/qoder/skills/sprint-flow/references/components/skill-invocations.md +104 -0
  143. package/plugins/qoder/skills/sprint-flow/references/components/system-prompt.md +27 -0
  144. package/plugins/qoder/skills/sprint-flow/references/components/tool-descriptions.md +96 -0
  145. package/plugins/qoder/skills/sprint-flow/references/force-levels.md +203 -0
  146. package/plugins/qoder/skills/sprint-flow/references/phase-0-think.md +115 -0
  147. package/plugins/qoder/skills/sprint-flow/references/phase-1-plan.md +178 -0
  148. package/plugins/qoder/skills/sprint-flow/references/phase-2-build.md +198 -0
  149. package/plugins/qoder/skills/sprint-flow/references/phase-3-review.md +213 -0
  150. package/plugins/qoder/skills/sprint-flow/references/phase-4-uat.md +125 -0
  151. package/plugins/qoder/skills/sprint-flow/references/phase-5-feedback.md +100 -0
  152. package/plugins/qoder/skills/sprint-flow/references/phase-6-ship.md +193 -0
  153. package/plugins/qoder/skills/sprint-flow/references/phase-7-land.md +140 -0
  154. package/plugins/qoder/skills/sprint-flow/references/phase-8-cleanup.md +192 -0
  155. package/plugins/qoder/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +257 -0
  156. package/plugins/qoder/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
  157. package/plugins/qoder/skills/sprint-flow/templates/auto-estimate-output-template.md +132 -0
  158. package/plugins/qoder/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
  159. package/plugins/qoder/skills/sprint-flow/templates/pain-document-template.md +115 -0
  160. package/plugins/qoder/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
  161. package/plugins/qoder/skills/sprint-flow/templates/sprint-summary-template.md +120 -0
  162. package/plugins/qoder/skills/test-driven-development/SKILL.md +71 -0
  163. package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +56 -0
  164. package/plugins/qoder/skills/test-specification-alignment/SKILL.md +702 -0
  165. package/plugins/qoder/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
  166. package/plugins/qoder/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
  167. package/plugins/qoder/skills/test-specification-alignment/references/specification-format.md +348 -0
  168. package/plugins/qoder/skills/to-issues/SKILL.md +277 -0
  169. package/skills/admin-template-guidelines/SKILL.md +904 -0
  170. package/skills/delphi-review/SKILL.md +112 -77
  171. package/skills/improve-codebase-architecture/SKILL.md +156 -0
  172. package/skills/ralph-loop/SKILL.md +165 -34
  173. package/skills/sprint-flow/SKILL.md +448 -107
  174. package/skills/sprint-flow/references/components/skill-invocations.md +1 -1
  175. package/skills/sprint-flow/references/components/tool-descriptions.md +1 -1
  176. package/skills/sprint-flow/references/force-levels.md +203 -0
  177. package/skills/sprint-flow/references/phase-1-plan.md +4 -4
  178. package/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +20 -1
  179. package/skills/sprint-flow/templates/auto-estimate-output-template.md +7 -5
  180. package/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
  181. package/skills/test-driven-development/SKILL.md +71 -0
  182. package/skills/test-specification-alignment/SKILL.md +98 -24
  183. package/skills/to-issues/SKILL.md +277 -0
  184. package/plugins/qoder/AGENTS.md +0 -93
  185. package/plugins/qoder/README.md +0 -87
  186. package/plugins/qoder/widgets/quality-report.html +0 -163
  187. package/plugins/qoder/widgets/sprint-dashboard.html +0 -172
  188. package/skills/delphi-review/evals/evals.json +0 -82
  189. package/skills/delphi-review/references/qoder-multi-model.md +0 -191
  190. package/skills/ralph-loop/evals/evals.json +0 -311
  191. package/skills/ralph-loop/evolution-history.json +0 -59
  192. package/skills/ralph-loop/evolution-log.md +0 -16
  193. package/skills/sprint-flow/evals/evals.json +0 -130
  194. package/skills/sprint-flow/evolution-history.json +0 -39
  195. package/skills/sprint-flow/evolution-log.md +0 -23
  196. package/skills/sprint-flow/references/qoder-adaptation.md +0 -173
  197. package/skills/test-specification-alignment/evals/evals.json +0 -75
@@ -0,0 +1,32 @@
1
+ # tool-descriptions.md — Ralph Loop 各步骤工具链(AHE 组件分解)
2
+
3
+ > **本文是 `skills/ralph-loop/SKILL.md` 中构建步骤的 AHE 对齐展开。**
4
+
5
+ ## 组件职责
6
+
7
+ 描述 Ralph Loop 中每个 REQ 执行的具体工具链:TDD 流、回归测试、成本监控。
8
+
9
+ ## 构建步骤
10
+
11
+ | 步骤 | 动作 | 说明 |
12
+ |------|------|------|
13
+ | 1 | 加载当前 REQ | 从 specification.yaml 获取下一个 READY REQ |
14
+ | 2 | 加载 learnings | 从 progress.log 加载 permanent + contextual learnings |
15
+ | 3 | 测试基础设施检查 | 检查 test-utils.ts 是否存在且导出 createTestApp()、withTestDb()。不存在 → dispatch test-infra subagent,retry max 2,失败 → BLOCK/fallback |
16
+ | 4 | TDD (RED→GREEN→REFACTOR) | test-driven-development skill(含 TDD 铁律 + Mock 边界注入)|
17
+ | 5 | 全量回归测试 | 运行全部现有测试 |
18
+ | 6 | 测试先行比率检查 (L1b) | 新增测试行数 / (新增测试 + 新增实现) ≥ 40% |
19
+ | 7 | 记录 progress.log | 将 learnings 分类存储 (permanent/contextual) |
20
+ | 8 | 成本检查 | token 使用量是否超阈值 |
21
+ | 9 | 完成/继续 | 所有 REQ 完成 → 结束;否则 → 下一个 REQ |
22
+
23
+ ## 语言特定
24
+
25
+ 通过 `--lang` 注入对应 TDD skill: `springboot-tdd`, `django-tdd`, `golang-testing`
26
+
27
+ ## AHE 分类
28
+
29
+ | 字段 | 值 |
30
+ |------|---|
31
+ | 组件类型 | Tool Description |
32
+ | 修改频率预期 | 高 |
@@ -0,0 +1,89 @@
1
+ # Ralph Loop — Phase 2 BUILD 默认模式
2
+
3
+ > ralph-loop 是 Sprint-Flow Phase 2 BUILD 的默认执行模式。token-constraint 优先:每次只处理一个 REQ,干净上下文,全量回归。
4
+
5
+ ## 模式切换
6
+
7
+ ### 默认行为
8
+
9
+ ```bash
10
+ /sprint-flow "需求描述"
11
+ # → Phase 2 自动使用 ralph-loop 模式
12
+ ```
13
+
14
+ ### 可选并行模式
15
+
16
+ ```bash
17
+ /sprint-flow "需求描述" --mode parallel
18
+ # → 旧有行为:一次性并行 dispatch 所有需求
19
+ ```
20
+
21
+ ## 核心差异
22
+
23
+ | 维度 | ralph-loop (默认) | --mode parallel (可选) |
24
+ |------|-------------------|----------------------|
25
+ | 需求源 | specification.yaml | specification.yaml |
26
+ | 执行方式 | 逐 REQ 串行迭代 | 一次性并行 dispatch |
27
+ | 上下文 | 每个 REQ 独立 dispatch,干净上下文 | 共享 session,线性增长 |
28
+ | 验证范围 | **全量测试**(含跨 REQ 回归) | 关联测试 |
29
+ | AGENTS.md 更新 | **orchestrator 统一写** | subagent 写 |
30
+ | 依赖排序 | 拓扑排序 + 同层 priority | 无 |
31
+
32
+ ## 流程
33
+
34
+ ```
35
+ 默认模式: ralph-loop 模式:
36
+ ┌──────────────────────┐ ┌──────────────────────────┐
37
+ │ dispatching-parallel │ │ 读取 specification.yaml │
38
+ │ -agents │ │ 构建依赖图 │
39
+ │ │ │ 拓扑排序 (Kahn's algo) │
40
+ │ 一次性 dispatch 所有 │ └──────────┬───────────────┘
41
+ │ 共享同一 session │ ▼
42
+ └──────────┬───────────┘ ┌──────────────────────────┐
43
+ │ │ 迭代循环: │
44
+ ▼ │ 取 next READY REQ │
45
+ ┌──────────────────────┐ │ dispatch 独立 subagent │
46
+ │ verification + │ │ (clean context) │
47
+ │ commit │ │ L1: typecheck+lint │
48
+ └──────────────────────┘ │ L2: 全量测试 ← 回归检测 │
49
+ │ L3: coverage ≥ 80% │
50
+ │ PASS → commit + learn │
51
+ │ FAIL → retry max 3 │
52
+ └──────────┬───────────────┘
53
+
54
+ Phase 3 REVIEW
55
+ ```
56
+
57
+ ## 与 Sprint-Flow 参数交互
58
+
59
+ | 参数 | 行为 (默认=ralph-loop) |
60
+ |------|----------------------|
61
+ | `--stop-at build` | 执行完 ralph-loop 后停止 |
62
+ | `--resume-from build` | 从 checkpoint 恢复,跳过已 done REQs |
63
+ | `--phase build-only` | 只执行 ralph-loop |
64
+ | `--mode parallel` | 切换回旧有并行模式 |
65
+
66
+ ## Token 对比
67
+
68
+ | REQ 数量 | 默认模式 | ralph-loop | 节约 |
69
+ |---------|---------|-----------|------|
70
+ | 3 | ~15k | ~9k | 40% |
71
+ | 5 | ~50k | ~25k | 50% |
72
+ | 10 | ~150k | ~50k | 67% |
73
+
74
+ ## 集成检查点
75
+
76
+ Ralph Loop 完成后返回:
77
+
78
+ ```json
79
+ {
80
+ "mode": "ralph-loop",
81
+ "specification_source": "specification.yaml",
82
+ "topology_order": ["REQ-001", "REQ-002", "REQ-003"],
83
+ "requirements": { "total": 6, "done": 6, "pending": 0, "blocked": 0 },
84
+ "learnings": { "permanent": ["..."], "contextual": ["..."] },
85
+ "status": "completed"
86
+ }
87
+ ```
88
+
89
+ Phase 3 REVIEW 正常执行(delphi code-walkthrough + test-specification-alignment)。PARTIAL 状态时仅检查 done REQs。
@@ -0,0 +1,36 @@
1
+ # Ralph Loop — Progress Log
2
+
3
+ Feature: [feature name]
4
+ Started: [ISO 8601]
5
+ Source: specification.yaml
6
+ Topology Order: [REQ-001, REQ-002, ...]
7
+
8
+ ---
9
+
10
+ ## REQ-001 — [title]
11
+
12
+ **Status**: PASS / FAIL / TIMEOUT / BLOCKED
13
+ **Retry count**: 0
14
+ **Test infra**: generated / existing / skipped
15
+ **Files changed**: [file1, file2, ...]
16
+ **Learnings**:
17
+ - `[permanent]` migration files must be in src/migrations/
18
+ - `[contextual]` off-by-one at line 42 in utils.ts
19
+ **Timestamp**: [ISO 8601]
20
+
21
+ ---
22
+
23
+ ## REQ-002 — [title]
24
+
25
+ **Status**: PASS
26
+ **Retry count**: 1
27
+ **Failure injected**: Linter: unused-var at line 42
28
+ **Test infra**: existing (createTestApp, withTestDb)
29
+ **Files changed**: [file1, file2, ...]
30
+ **Learnings**:
31
+ - `[permanent]` Auth middleware must run before validation
32
+ **Timestamp**: [ISO 8601]
33
+
34
+ ---
35
+
36
+ <!-- Append new REQs below. Tag: permanent / contextual -->
@@ -0,0 +1,68 @@
1
+ # SKILLS/SPRINT-FLOW KNOWLEDGE BASE
2
+
3
+ **Generated:** 2026-05-30
4
+ **Version:** v0.5.1
5
+
6
+ ## OVERVIEW
7
+ 7-phase development pipeline: THINK→PLAN→BUILD→REVIEW→USER ACCEPT→FEEDBACK→SHIP, with ralph-loop default build mode.
8
+
9
+ ## STRUCTURE
10
+ ```
11
+ skills/sprint-flow/
12
+ ├── SKILL.md # 7-phase pipeline definition
13
+ ├── evals/ # Evaluation test cases
14
+ ├── evolution-history.json # Skill evolution tracking
15
+ ├── evolution-log.md # Change history
16
+ ├── references/ # Phase reference docs
17
+ │ ├── phase-0-think.md # THINK phase guidelines
18
+ │ └── ... # Other phase docs
19
+ └── templates/ # Sprint templates
20
+ ```
21
+
22
+ ## WHERE TO LOOK
23
+ | Task | Location | Notes |
24
+ |------|----------|-------|
25
+ | Pipeline def | SKILL.md | 7 phases with hard gates |
26
+ | THINK phase | references/phase-0-think.md | brainstorming → CONTEXT.md + ADR |
27
+ | Build mode | SKILL.md | ralph-loop (default) vs parallel |
28
+
29
+ ## 7 PHASES
30
+ | Phase | Name | Key Action | Hard Gate |
31
+ |-------|------|-----------|-----------|
32
+ | 0 | THINK | brainstorming, CONTEXT.md, ADR | — |
33
+ | 1 | PLAN | autoplan → delphi-review → specification.yaml | HARD-GATE: design must pass |
34
+ | 2 | BUILD | ralph-loop (REQ-level iteration) + TDD + test-align | — |
35
+ | 3 | REVIEW | code-walkthrough + QA + benchmark | — |
36
+ | 4 | USER ACCEPT | Manual verification | — |
37
+ | 5 | FEEDBACK | Retro + debugging + learn | — |
38
+ | 6 | SHIP | finishing-dev-branch + PR/merge | — |
39
+
40
+ ## CONVENTIONS
41
+ - ralph-loop is Phase 2 **default** mode (saves 40-67% tokens vs parallel)
42
+ - delphi-review HARD-GATE in Phase 1: design unapproved → BLOCK coding
43
+ - Each REQ in ralph-loop gets clean context (no linear accumulation)
44
+ - `learn` called at Phase 5 + each REQ completion
45
+
46
+ ## ANTI-PATTERNS (THIS PROJECT)
47
+ - Do NOT skip delphi-review in Phase 1 — HARD-GATE blocks implementation
48
+ - Do NOT use parallel build mode unless explicitly requested
49
+ - Do NOT enter Phase 1 (PLAN) without completing THINK phase
50
+ - DO NOT implement before design approval
51
+
52
+ ## UNIQUE STYLES
53
+ - Auto-detects UI framework (ui-detector.ts in npm-package/lib/)
54
+ - Supports --type and --lang flags for tech stack selection
55
+ - Phase isolation: each phase has specific entry/exit criteria
56
+ - Emergent Requirements acknowledged: user acceptance phase built in
57
+
58
+ ## COMMANDS
59
+ ```bash
60
+ /delphi-review "开发用户登录" --type web-nextjs --lang typescript
61
+ /sprint-flow "开发用户登录" --phase build-only
62
+ /sprint-flow "开发用户登录" --mode parallel # Legacy all-at-once
63
+ ```
64
+
65
+ ## NOTES
66
+ - Integrates brainstorming, autoplan, delphi-review, TDD, test-specification-alignment
67
+ - ralph-loop internal learnings via progress.log (permanent/contextual classification)
68
+ - Phase 5 calls gstack/learn for Sprint-level retrospective