@boyingliu01/xp-gate 0.15.4 → 0.18.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 +29 -1
- package/hooks/lib/now-ms.sh +33 -0
- package/hooks/pre-commit +63 -47
- package/hooks/sprint-gate.sh +291 -0
- package/lib/__tests__/check-version.test.js +122 -0
- package/lib/__tests__/doctor.test.js +13 -15
- package/lib/__tests__/gate-audit.test.ts +38 -0
- package/lib/__tests__/phase-transition.test.js +241 -1
- package/lib/__tests__/retro.test.js +131 -0
- package/lib/__tests__/sprint-status-rework.test.js +184 -0
- package/lib/check-version.js +9 -0
- package/lib/doctor-tui.js +79 -9
- package/lib/doctor.js +15 -3
- package/lib/gate-audit.ts +18 -7
- package/lib/gate-runner.js +77 -30
- package/lib/init.js +10 -0
- package/lib/mattpocock-license-verdict.json +7 -0
- package/lib/phase-transition.js +251 -1
- package/lib/retro.js +222 -0
- package/lib/shared-utils.js +7 -0
- package/lib/sprint-init.js +207 -0
- package/lib/sprint-state-migrator.js +1 -0
- package/lib/sprint-status.js +111 -0
- package/mock-policy/AGENTS.md +3 -3
- package/mutation/AGENTS.md +3 -3
- package/package.json +3 -2
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/skills/batch-grill-me/SKILL.md +15 -0
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/claude-code/skills/delphi-review/SKILL.md +59 -4
- package/plugins/claude-code/skills/delphi-review/references/requirements.md +390 -0
- package/plugins/claude-code/skills/delphi-review/references/round-templates.md +67 -0
- package/plugins/claude-code/skills/domain-modeling/ADR-FORMAT.md +64 -0
- package/plugins/claude-code/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/plugins/claude-code/skills/domain-modeling/SKILL.md +74 -0
- package/plugins/claude-code/skills/grill-with-docs/SKILL.md +7 -0
- package/plugins/claude-code/skills/grilling/SKILL.md +12 -0
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/claude-code/skills/sprint-flow/SKILL.md +168 -43
- package/plugins/claude-code/skills/sprint-flow/references/components/memory.md +1 -1
- package/plugins/claude-code/skills/sprint-flow/references/components/middleware.md +1 -1
- package/plugins/claude-code/skills/sprint-flow/references/components/skill-invocations.md +21 -20
- package/plugins/claude-code/skills/sprint-flow/references/components/tool-descriptions.md +22 -23
- package/plugins/claude-code/skills/sprint-flow/references/orchestration-rules.md +14 -12
- package/plugins/claude-code/skills/sprint-flow/references/phase-2-design.md +145 -133
- package/plugins/claude-code/skills/sprint-flow/references/phase-3-build.md +69 -2
- package/plugins/claude-code/skills/sprint-flow/references/phase-4-verify.md +93 -31
- package/plugins/claude-code/skills/sprint-flow/references/phase-5-ship.md +99 -14
- package/plugins/claude-code/skills/sprint-flow/references/phase-6-close.md +37 -5
- package/plugins/claude-code/skills/sprint-flow/references/phase-overview.md +58 -53
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/claude-code/skills/test-specification-alignment/SKILL.md +8 -3
- package/plugins/claude-code/skills/to-issues/SKILL.md +1 -1
- package/plugins/opencode/index.ts +1 -0
- package/plugins/opencode/package.json +1 -1
- package/plugins/opencode/skills/batch-grill-me/SKILL.md +15 -0
- package/plugins/opencode/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/opencode/skills/delphi-review/SKILL.md +59 -4
- package/plugins/opencode/skills/delphi-review/references/requirements.md +390 -0
- package/plugins/opencode/skills/delphi-review/references/round-templates.md +67 -0
- package/plugins/opencode/skills/domain-modeling/ADR-FORMAT.md +64 -0
- package/plugins/opencode/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/plugins/opencode/skills/domain-modeling/SKILL.md +74 -0
- package/plugins/opencode/skills/grill-with-docs/SKILL.md +7 -0
- package/plugins/opencode/skills/grilling/SKILL.md +12 -0
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/opencode/skills/sprint-flow/SKILL.md +168 -43
- package/plugins/opencode/skills/sprint-flow/references/components/memory.md +1 -1
- package/plugins/opencode/skills/sprint-flow/references/components/middleware.md +1 -1
- package/plugins/opencode/skills/sprint-flow/references/components/skill-invocations.md +21 -20
- package/plugins/opencode/skills/sprint-flow/references/components/tool-descriptions.md +22 -23
- package/plugins/opencode/skills/sprint-flow/references/orchestration-rules.md +14 -12
- package/plugins/opencode/skills/sprint-flow/references/phase-2-design.md +145 -133
- package/plugins/opencode/skills/sprint-flow/references/phase-3-build.md +69 -2
- package/plugins/opencode/skills/sprint-flow/references/phase-4-verify.md +93 -31
- package/plugins/opencode/skills/sprint-flow/references/phase-5-ship.md +99 -14
- package/plugins/opencode/skills/sprint-flow/references/phase-6-close.md +37 -5
- package/plugins/opencode/skills/sprint-flow/references/phase-overview.md +58 -53
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/opencode/skills/test-specification-alignment/SKILL.md +8 -3
- package/plugins/opencode/skills/to-issues/SKILL.md +1 -1
- package/plugins/qoder/plugin.json +1 -1
- package/plugins/qoder/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +3 -3
- package/principles/AGENTS.md +3 -3
- package/scripts/__tests__/check-mattpocock-license.test.js +229 -0
- package/scripts/__tests__/sync-package-content.test.js +50 -0
- package/scripts/check-mattpocock-license.cjs +302 -0
- package/scripts/migrate-audit-anomalies.mjs +78 -0
- package/scripts/sync-package-content.js +52 -5
- package/skills/batch-grill-me/SKILL.md +15 -0
- package/skills/delphi-review/AGENTS.md +3 -3
- package/skills/delphi-review/SKILL.md +59 -4
- package/skills/delphi-review/references/requirements.md +390 -0
- package/skills/delphi-review/references/round-templates.md +67 -0
- package/skills/domain-modeling/ADR-FORMAT.md +64 -0
- package/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/skills/domain-modeling/SKILL.md +74 -0
- package/skills/grill-with-docs/SKILL.md +7 -0
- package/skills/grilling/SKILL.md +12 -0
- package/skills/sprint-flow/AGENTS.md +3 -3
- package/skills/sprint-flow/SKILL.md +168 -43
- package/skills/sprint-flow/references/components/memory.md +1 -1
- package/skills/sprint-flow/references/components/middleware.md +1 -1
- package/skills/sprint-flow/references/components/skill-invocations.md +21 -20
- package/skills/sprint-flow/references/components/tool-descriptions.md +22 -23
- package/skills/sprint-flow/references/orchestration-rules.md +14 -12
- package/skills/sprint-flow/references/phase-2-design.md +145 -133
- package/skills/sprint-flow/references/phase-3-build.md +69 -2
- package/skills/sprint-flow/references/phase-4-verify.md +93 -31
- package/skills/sprint-flow/references/phase-5-ship.md +99 -14
- package/skills/sprint-flow/references/phase-6-close.md +37 -5
- package/skills/sprint-flow/references/phase-overview.md +58 -53
- package/skills/test-specification-alignment/AGENTS.md +3 -3
- package/skills/test-specification-alignment/SKILL.md +8 -3
- package/skills/to-issues/SKILL.md +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# CONTEXT.md Format
|
|
2
|
+
|
|
3
|
+
## Structure
|
|
4
|
+
|
|
5
|
+
```md
|
|
6
|
+
# {Context Name}
|
|
7
|
+
|
|
8
|
+
{One or two sentence description of what this context is and why it exists.}
|
|
9
|
+
|
|
10
|
+
## Language
|
|
11
|
+
|
|
12
|
+
**Order**:
|
|
13
|
+
{A one or two sentence description of the term}
|
|
14
|
+
_Avoid_: Purchase, transaction
|
|
15
|
+
|
|
16
|
+
**Invoice**:
|
|
17
|
+
A request for payment sent to a customer after delivery.
|
|
18
|
+
_Avoid_: Bill, payment request
|
|
19
|
+
|
|
20
|
+
**Customer**:
|
|
21
|
+
A person or organization that places orders.
|
|
22
|
+
_Avoid_: Client, buyer, account
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others under `_Avoid_`.
|
|
28
|
+
- **Keep definitions tight.** One or two sentences max. Define what it IS, not what it does.
|
|
29
|
+
- **Only include terms specific to this project's context.** General programming concepts (timeouts, error types, utility patterns) don't belong even if the project uses them extensively. Before adding a term, ask: is this a concept unique to this context, or a general programming concept? Only the former belongs.
|
|
30
|
+
- **Group terms under subheadings** when natural clusters emerge. If all terms belong to a single cohesive area, a flat list is fine.
|
|
31
|
+
|
|
32
|
+
## Single vs multi-context repos
|
|
33
|
+
|
|
34
|
+
**Single context (most repos):** One `CONTEXT.md` at the repo root.
|
|
35
|
+
|
|
36
|
+
**Multiple contexts:** A `CONTEXT-MAP.md` at the repo root lists the contexts, where they live, and how they relate to each other:
|
|
37
|
+
|
|
38
|
+
```md
|
|
39
|
+
# Context Map
|
|
40
|
+
|
|
41
|
+
## Contexts
|
|
42
|
+
|
|
43
|
+
- [Ordering](./src/ordering/CONTEXT.md) — receives and tracks customer orders
|
|
44
|
+
- [Billing](./src/billing/CONTEXT.md) — generates invoices and processes payments
|
|
45
|
+
- [Fulfillment](./src/fulfillment/CONTEXT.md) — manages warehouse picking and shipping
|
|
46
|
+
|
|
47
|
+
## Relationships
|
|
48
|
+
|
|
49
|
+
- **Ordering → Fulfillment**: Ordering emits `OrderPlaced` events; Fulfillment consumes them to start picking
|
|
50
|
+
- **Fulfillment → Billing**: Fulfillment emits `ShipmentDispatched` events; Billing consumes them to generate invoices
|
|
51
|
+
- **Ordering ↔ Billing**: Shared types for `CustomerId` and `Money`
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The skill infers which structure applies:
|
|
55
|
+
|
|
56
|
+
- If `CONTEXT-MAP.md` exists, read it to find contexts
|
|
57
|
+
- If only a root `CONTEXT.md` exists, single context
|
|
58
|
+
- If neither exists, create a root `CONTEXT.md` lazily when the first term is resolved
|
|
59
|
+
|
|
60
|
+
When multiple contexts exist, infer which one the current topic relates to. If unclear, ask.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: domain-modeling
|
|
3
|
+
description: Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Domain Modeling
|
|
7
|
+
|
|
8
|
+
Actively build and sharpen the project's domain model as you design. This is the *active* discipline — challenging terms, inventing edge-case scenarios, and writing the glossary and decisions down the moment they crystallise. (Merely *reading* `CONTEXT.md` for vocabulary is not this skill — that's a one-line habit any skill can do. This skill is for when you're changing the model, not just consuming it.)
|
|
9
|
+
|
|
10
|
+
## File structure
|
|
11
|
+
|
|
12
|
+
Most repos have a single context:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
/
|
|
16
|
+
├── CONTEXT.md
|
|
17
|
+
├── docs/
|
|
18
|
+
│ └── adr/
|
|
19
|
+
│ ├── 0001-event-sourced-orders.md
|
|
20
|
+
│ └── 0002-postgres-for-write-model.md
|
|
21
|
+
└── src/
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If a `CONTEXT-MAP.md` exists at the root, the repo has multiple contexts. The map points to where each one lives:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
/
|
|
28
|
+
├── CONTEXT-MAP.md
|
|
29
|
+
├── docs/
|
|
30
|
+
│ └── adr/ ← system-wide decisions
|
|
31
|
+
├── src/
|
|
32
|
+
│ ├── ordering/
|
|
33
|
+
│ │ ├── CONTEXT.md
|
|
34
|
+
│ │ └── docs/adr/ ← context-specific decisions
|
|
35
|
+
│ └── billing/
|
|
36
|
+
│ ├── CONTEXT.md
|
|
37
|
+
│ └── docs/adr/
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Create files lazily — only when you have something to write. If no `CONTEXT.md` exists, create one when the first term is resolved. If no `docs/adr/` exists, create it when the first ADR is needed.
|
|
41
|
+
|
|
42
|
+
## During the session
|
|
43
|
+
|
|
44
|
+
### Challenge against the glossary
|
|
45
|
+
|
|
46
|
+
When the user uses a term that conflicts with the existing language in `CONTEXT.md`, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y — which is it?"
|
|
47
|
+
|
|
48
|
+
### Sharpen fuzzy language
|
|
49
|
+
|
|
50
|
+
When the user uses vague or overloaded terms, propose a precise canonical term. "You're saying 'account' — do you mean the Customer or the User? Those are different things."
|
|
51
|
+
|
|
52
|
+
### Discuss concrete scenarios
|
|
53
|
+
|
|
54
|
+
When domain relationships are being discussed, stress-test them with specific scenarios. Invent scenarios that probe edge cases and force the user to be precise about the boundaries between concepts.
|
|
55
|
+
|
|
56
|
+
### Cross-reference with code
|
|
57
|
+
|
|
58
|
+
When the user states how something works, check whether the code agrees. If you find a contradiction, surface it: "Your code cancels entire Orders, but you just said partial cancellation is possible — which is right?"
|
|
59
|
+
|
|
60
|
+
### Update CONTEXT.md inline
|
|
61
|
+
|
|
62
|
+
When a term is resolved, update `CONTEXT.md` right there. Don't batch these up — capture them as they happen. Use the format in [CONTEXT-FORMAT.md](./CONTEXT-FORMAT.md).
|
|
63
|
+
|
|
64
|
+
`CONTEXT.md` should be totally devoid of implementation details. Do not treat `CONTEXT.md` as a spec, a scratch pad, or a repository for implementation decisions. It is a glossary and nothing else.
|
|
65
|
+
|
|
66
|
+
### Offer ADRs sparingly
|
|
67
|
+
|
|
68
|
+
Only offer to create an ADR when all three are true:
|
|
69
|
+
|
|
70
|
+
1. **Hard to reverse** — the cost of changing your mind later is meaningful
|
|
71
|
+
2. **Surprising without context** — a future reader will wonder "why did they do it this way?"
|
|
72
|
+
3. **The result of a real trade-off** — there were genuine alternatives and you picked one for specific reasons
|
|
73
|
+
|
|
74
|
+
If any of the three is missing, skip the ADR. Use the format in [ADR-FORMAT.md](./ADR-FORMAT.md).
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grilling
|
|
3
|
+
description: Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Interview me relentlessly about every aspect of this until we reach a shared understanding. Walk down each branch of the decision tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
|
|
7
|
+
|
|
8
|
+
Ask the questions one at a time, waiting for feedback on each question before continuing. Asking multiple questions at once is bewildering.
|
|
9
|
+
|
|
10
|
+
If a *fact* can be found by exploring the environment (filesystem, tools, etc.), look it up rather than asking me. The *decisions*, though, are mine — put each one to me and wait for my answer.
|
|
11
|
+
|
|
12
|
+
Do not act on it until I confirm we have reached a shared understanding.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-07-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-07-25
|
|
4
|
+
**Commit:** 3150b22
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.18.0.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.
|
|
@@ -3,7 +3,7 @@ name: sprint-flow
|
|
|
3
3
|
version: 2.1.0
|
|
4
4
|
description: >
|
|
5
5
|
Orchestrates a 6-phase end-to-end feature development pipeline (PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE).
|
|
6
|
-
Integrates
|
|
6
|
+
Integrates grill-with-docs, batch-grill-me, delphi-review (R1 requirements + R2 design), TDD, ralph-loop, code-walkthrough, and native ship/land steps.
|
|
7
7
|
Pauses at key gates for user decisions. Acknowledges emergent requirements with mandatory manual UAT in CLOSE phase.
|
|
8
8
|
|
|
9
9
|
WHAT: Automates the full development lifecycle from worktree isolation to production deployment.
|
|
@@ -87,12 +87,10 @@ workflow_steps:
|
|
|
87
87
|
- "Phase 6/6: CLOSE → Output: ## Phase 6/6: CLOSE (收尾)"
|
|
88
88
|
hooks:
|
|
89
89
|
security:
|
|
90
|
-
- "
|
|
91
|
-
- "
|
|
92
|
-
- "/guard": "Full safety mode combining careful + freeze for maximum protection"
|
|
90
|
+
- "tools_denied": "Destructive commands blocked via tools_denied (rm -rf, git push --force, DROP TABLE)"
|
|
91
|
+
- "Security Notes": "See Security Notes section for safety guarantees"
|
|
93
92
|
operational:
|
|
94
|
-
- "
|
|
95
|
-
- "/context-restore": "Restore sprint context on resume"
|
|
93
|
+
- "sprint-state.json": "Native sprint state persistence + --resume-from for context restore"
|
|
96
94
|
tools_allowed:
|
|
97
95
|
- "Bash(git, gh, npm, node)" # git worktree/branch/commit, gh PR/release, npm/node CLI
|
|
98
96
|
- "Read" # read project files, configs, docs
|
|
@@ -101,7 +99,7 @@ tools_allowed:
|
|
|
101
99
|
- "Glob" # find project files by pattern
|
|
102
100
|
- "Grep" # search file contents
|
|
103
101
|
- "Task" # delegate to subagents (quick, deep, unspecified-high)
|
|
104
|
-
- "Skill" # invoke integrated skills (
|
|
102
|
+
- "Skill" # invoke integrated skills (grill-with-docs, batch-grill-me, delphi-review, to-issues, etc.)
|
|
105
103
|
- "TodoWrite" # track sprint progress
|
|
106
104
|
- "Question" # ask user at decision gates
|
|
107
105
|
tools_denied:
|
|
@@ -167,15 +165,15 @@ PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE
|
|
|
167
165
|
| Phase | Name | Key Actions | Output |
|
|
168
166
|
|-------|------|-------------|--------|
|
|
169
167
|
| 1/6 | PREP | Detect protected branch → Create git worktree → AUTO-ESTIMATE sizing → Classify (lightweight/standard/complex) | Worktree path + impact assessment |
|
|
170
|
-
| 2/6 | DESIGN | CONTEXT.md 预检 (#322) →
|
|
171
|
-
| 3/6 | BUILD | GITHOOKS-GATE → DELPHI-GATE → ralph-loop (default) or parallel → TDD →
|
|
172
|
-
| 4/6 | VERIFY | delphi-review --mode code-walkthrough → test-specification-alignment →
|
|
173
|
-
| 5/6 | SHIP | VERSION-GATE →
|
|
174
|
-
| 6/6 | CLOSE | SHIP→CLOSE GATE (merge verified) → Backup sprint-state → USER ACCEPTANCE (⚠️ mandatory manual) → Capture emergent issues → Cleanup worktree + branch | Emergent issues list + cleanup report |
|
|
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 |
|
|
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
|
+
| 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
|
+
| 5/6 | SHIP | VERSION-GATE → 分支完成决策 (4选项) → native ship (create PR) → native land (merge + CI + canary) | PR URL + deploy status + merge confirmation |
|
|
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 |
|
|
175
173
|
|
|
176
174
|
**Hard Gates**:
|
|
177
|
-
- **DESIGN → BUILD**:
|
|
178
|
-
- **VERIFY → SHIP**: feedback-log.md must exist (HARD-GATE)
|
|
175
|
+
- **DESIGN → BUILD**: R1 需求评审 APPROVED + 设计文档用户 APPROVED + R2 delphi-review APPROVED (≥90% consensus) + GITHOOKS-GATE + DELPHI-GATE + BUILD-ENTRY-CONTRACT (manifest schema + slice↔REQ)
|
|
176
|
+
- **VERIFY → SHIP**: feedback-log.md must exist + test-alignment-report.json PASS (#367 程序化 HARD-GATE)
|
|
179
177
|
- **SHIP → CLOSE**: PR must be merged to main + release completed (HARD-GATE)
|
|
180
178
|
|
|
181
179
|
---
|
|
@@ -199,11 +197,28 @@ Every phase MUST output its header as the first line of that phase's output. For
|
|
|
199
197
|
3. NEVER merge phase output — each phase gets its own header
|
|
200
198
|
4. On `/sprint-flow` trigger, first line MUST output: `Sprint Flow: PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE`
|
|
201
199
|
5. Each phase completion MUST write Phase Summary to `.sprint-state/phase-outputs/phase-{N}-summary.md`
|
|
202
|
-
6. Each phase completion MUST call `xp-gate phase-transition <N> <status> --render` — this programmatically updates `sprint-state.json` AND renders the ASCII dashboard in one command (resolves #338, #146)
|
|
203
200
|
|
|
204
|
-
### Phase Transition
|
|
201
|
+
### Phase Transition — TodoWrite Embedded (MANDATORY, resolves #366)
|
|
205
202
|
|
|
206
|
-
|
|
203
|
+
6. **Sprint initialization**: Phase 1 PREP MUST begin with `npx xp-gate sprint-init "<task_description>"` — this is the single entry point for sprint creation. NEVER manually write sprint-state.json.
|
|
204
|
+
|
|
205
|
+
7. **Phase transitions are embedded in TodoWrite items**, not as separate post-actions. Each phase's TodoWrite item MUST include the phase-transition call as part of the same atomic step:
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
TodoWrite item format:
|
|
209
|
+
- "Phase N: <main task> + phase-transition N completed → N+1 in_progress --render"
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Example TodoWrite items for a sprint:
|
|
213
|
+
```
|
|
214
|
+
- Phase 1: PREP — estimate + sprint-init + phase-transition 1 completed --render
|
|
215
|
+
- Phase 2: DESIGN — delphi review + phase-transition 2 completed --render
|
|
216
|
+
- Phase 3: BUILD — implementation + phase-transition 3 completed --render
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**Rationale**: TodoWrite items are the LLM's most consistently executed operations. Embedding phase-transition elevates it from "post-action meta-info" (priority 4, ignored) to "main task step" (priority 2, executed).
|
|
220
|
+
|
|
221
|
+
8. **NEVER** manually write to `sprint-state.json` or manually render the dashboard. ALWAYS use:
|
|
207
222
|
```
|
|
208
223
|
npx xp-gate phase-transition <phase> <status> --render [--outputs '<json>']
|
|
209
224
|
```
|
|
@@ -211,14 +226,8 @@ Every phase MUST output its header as the first line of that phase's output. For
|
|
|
211
226
|
- `<status>`: `in_progress` | `completed` | `skipped` | `failed` | `paused`
|
|
212
227
|
- `--render`: Auto-renders ASCII progress dashboard after state update
|
|
213
228
|
- `--outputs '<json>'`: Optional JSON of phase outputs to record
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
```
|
|
217
|
-
npx xp-gate phase-transition 1 completed --render --outputs '{"estimate":"3 story points"}'
|
|
218
|
-
npx xp-gate phase-transition 2 in_progress --render
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
This is a **HARD GATE** — the orchestrator MUST invoke this CLI command. Text-level instructions to "update state" or "render dashboard" are DEPRECATED; the CLI is the single source of truth for state transitions and dashboard rendering.
|
|
229
|
+
|
|
230
|
+
This is a **HARD GATE** — the CLI is the single source of truth for state transitions and dashboard rendering.
|
|
222
231
|
|
|
223
232
|
### Phase Output Status Schema (MANDATORY per phase)
|
|
224
233
|
|
|
@@ -233,25 +242,75 @@ next_phase_context: [key info for next phase]
|
|
|
233
242
|
|
|
234
243
|
---
|
|
235
244
|
|
|
236
|
-
##
|
|
245
|
+
## Phase 1/6: PREP (准备工作)
|
|
246
|
+
|
|
247
|
+
**触发条件**:用户输入匹配 Triggers 表中任一短语,或显式调用 `/sprint-flow`。
|
|
248
|
+
|
|
249
|
+
**输入**:
|
|
250
|
+
| 输入 | 来源 | 必需 |
|
|
251
|
+
|------|------|------|
|
|
252
|
+
| 功能描述 | 用户命令参数 | 是 |
|
|
253
|
+
| 当前分支 | `git branch --show-current` | 自动检测 |
|
|
254
|
+
| 项目语言 | `--lang` 参数或自动检测 | 否 |
|
|
255
|
+
|
|
256
|
+
**步骤**:
|
|
257
|
+
1. 输出首行:`Sprint Flow: PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE`
|
|
258
|
+
2. 检测当前分支是否为保护分支(main/master/develop)
|
|
259
|
+
3. 创建 git worktree 隔离(除非 `--no-isolate`):
|
|
260
|
+
```bash
|
|
261
|
+
git worktree add .worktrees/sprint-$(date +%Y%m%d-%H%M%S) -b sprint/YYYY-MM-DD-NN
|
|
262
|
+
```
|
|
263
|
+
4. AUTO-ESTIMATE 规模评估(分析功能描述复杂度)
|
|
264
|
+
5. 分类:lightweight / standard / complex
|
|
265
|
+
6. 执行 `npx xp-gate sprint-init "<task_description>"` 初始化状态
|
|
266
|
+
7. 执行 `npx xp-gate phase-transition 1 completed --render`
|
|
267
|
+
|
|
268
|
+
**输出**:
|
|
269
|
+
| 输出物 | 路径 | 格式 |
|
|
270
|
+
|--------|------|------|
|
|
271
|
+
| Worktree 路径 | `.worktrees/sprint-*` | 目录 |
|
|
272
|
+
| Sprint 状态 | `.sprint-state/sprint-state.json` | JSON |
|
|
273
|
+
| Phase Summary | `.sprint-state/phase-outputs/phase-1-summary.md` | Markdown |
|
|
274
|
+
|
|
275
|
+
**详细参考**:`@references/phase-1-prep.md`
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## 门禁条件表 (Gate Conditions)
|
|
237
280
|
|
|
238
|
-
|
|
281
|
+
| 门禁 | 位置 | 条件 | 失败处理 |
|
|
282
|
+
|------|------|------|----------|
|
|
283
|
+
| BUILD-ENTRY-CONTRACT | Phase 2→3 | slices-manifest.json schema 合法 + slice↔REQ 一致 | BLOCK,返回 Phase 2 修复 |
|
|
284
|
+
| GITHOOKS-GATE | Phase 2→3 | hooks 已安装且可执行 | 自动修复 (`xp-gate doctor --fix`),失败则 BLOCK |
|
|
285
|
+
| DELPHI-GATE | Phase 2→3 | R2 delphi-review APPROVED (≥90%) | 重新设计或用户覆盖(记录原因) |
|
|
286
|
+
| VERSION-GATE | Phase 4→5 | VERSION 文件与 package.json 一致 | 执行 `node scripts/sync-version.cjs` |
|
|
287
|
+
| #367 EVIDENCE-GATE | Phase 4→5 | test-alignment-report.json PASS + head_commit + spec_hash | BLOCK(--skip-evidence 需 --reason,≤2 次/sprint) |
|
|
288
|
+
| SHIP→CLOSE GATE | Phase 5→6 | PR 已合并 + release 完成 | BLOCK,等待合并确认 |
|
|
289
|
+
| feedback-log GATE | Phase 4→5 | feedback-log.md 存在 | BLOCK,必须完成 VERIFY |
|
|
239
290
|
|
|
240
|
-
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## Phase 2–6 详细指令
|
|
294
|
+
|
|
295
|
+
> Phase 2–6 的完整步骤、输入/输出契约、模板和 Skill 集成详情见 `references/` 目录。本节提供路由摘要。
|
|
241
296
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
| `@references/phase-
|
|
246
|
-
| `@references/phase-
|
|
247
|
-
| `@references/phase-
|
|
248
|
-
| `@references/phase-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
|
254
|
-
|
|
297
|
+
| Phase | 参考文件 | 核心 Skill 链 |
|
|
298
|
+
|-------|----------|---------------|
|
|
299
|
+
| 2/6 DESIGN | `@references/phase-2-design.md` | CONTEXT.md 预检 → grill-with-docs → R1 需求评审 → 设计文档+APPROVAL → batch-grill-me → R2 delphi-review → to-issues |
|
|
300
|
+
| 3/6 BUILD | `@references/phase-3-build.md` | BUILD-ENTRY-CONTRACT → GITHOOKS-GATE → DELPHI-GATE → ralph-loop (TDD) → blind-review (read-only subagent) |
|
|
301
|
+
| 4/6 VERIFY | `@references/phase-4-verify.md` | delphi code-walkthrough → test-spec-alignment (#367) → xp-gate check --all → browser (Layer 4) → learnings + retro |
|
|
302
|
+
| 5/6 SHIP | `@references/phase-5-ship.md` | VERSION-GATE → 分支完成决策 (4选项) → native ship (PR) → native land (merge+CI+canary) |
|
|
303
|
+
| 6/6 CLOSE | `@references/phase-6-close.md` | SHIP→CLOSE GATE → backup → #369 返工指标 → USER ACCEPTANCE → emergent → cleanup |
|
|
304
|
+
|
|
305
|
+
**路径约定**:`@references/` 和 `@templates/` 相对于 skill 目录(`skills/sprint-flow/`)解析。
|
|
306
|
+
|
|
307
|
+
**完整参考文件索引**:
|
|
308
|
+
| 文件 | 内容 |
|
|
309
|
+
|------|------|
|
|
310
|
+
| `@references/phase-overview.md` | 全阶段详情、Skill 集成、参数、输出契约 |
|
|
311
|
+
| `@references/orchestration-rules.md` | Agent 调度、上下文继承、转换门禁 |
|
|
312
|
+
| `@references/force-levels.md` | 阶段强制执行规则 |
|
|
313
|
+
| `@templates/` | Pain doc、emergent issues、sprint summary、progress 模板 |
|
|
255
314
|
|
|
256
315
|
---
|
|
257
316
|
|
|
@@ -262,7 +321,7 @@ next_phase_context: [key info for next phase]
|
|
|
262
321
|
| Route Q&A, explanation, or code-search requests to sprint-flow | Only trigger for explicit feature development/implementation requests |
|
|
263
322
|
| Skip Phase 1/6 PREP isolation, edit directly on main/master/develop | Default: create worktree; only bypass with `--no-isolate` or `--force` + user confirmation |
|
|
264
323
|
| Skip AUTO-ESTIMATE and apply full heavy pipeline blindly | Evaluate lightweight/standard/complex first, follow recommended or user-confirmed flow |
|
|
265
|
-
| Skip Delphi review in DESIGN, go straight to BUILD | All requirement levels (lightweight/standard/complex) must pass
|
|
324
|
+
| Skip Delphi review in DESIGN, go straight to BUILD | All requirement levels (lightweight/standard/complex) must pass R1 需求评审 + R2 delphi-review; APPROVED before coding |
|
|
266
325
|
| Skip TDD, implement code directly | Phase 3/6 BUILD must follow RED → GREEN → REFACTOR; tests and implementation delivered together |
|
|
267
326
|
| Skip user acceptance, go straight to Ship | Phase 6/6 CLOSE USER ACCEPTANCE must be manual; never automate, skip, or fake |
|
|
268
327
|
| Enter CLOSE without SHIP completing merge to main | Phase 5/6 SHIP must complete merge to main + release before entering Phase 6/6 CLOSE; otherwise worktree cleanup leaves residue + UAT reviews unmerged code |
|
|
@@ -273,6 +332,72 @@ next_phase_context: [key info for next phase]
|
|
|
273
332
|
|
|
274
333
|
---
|
|
275
334
|
|
|
335
|
+
## 状态机 (State Machine)
|
|
336
|
+
|
|
337
|
+
```mermaid
|
|
338
|
+
stateDiagram-v2
|
|
339
|
+
[*] --> PREP : trigger matched
|
|
340
|
+
PREP --> DESIGN : worktree ready
|
|
341
|
+
DESIGN --> BUILD : APPROVED ≥90%
|
|
342
|
+
DESIGN --> DESIGN : REQUEST_CHANGES (max 3 rounds)
|
|
343
|
+
BUILD --> VERIFY : tests pass
|
|
344
|
+
BUILD --> BUILD : fix cycle (max 3)
|
|
345
|
+
VERIFY --> SHIP : feedback-log exists
|
|
346
|
+
VERIFY --> BUILD : critical issues found
|
|
347
|
+
SHIP --> CLOSE : PR merged
|
|
348
|
+
SHIP --> SHIP : CI failed (retry)
|
|
349
|
+
CLOSE --> [*] : UAT confirmed
|
|
350
|
+
BUILD --> BLOCKED : 3 fix cycles exhausted
|
|
351
|
+
DESIGN --> BLOCKED : 3 redesign rounds exhausted
|
|
352
|
+
BLOCKED --> [*] : user decision
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## 决策记录模板 (Decision Record)
|
|
358
|
+
|
|
359
|
+
每个用户决策点必须记录到 `.sprint-state/decisions.md`:
|
|
360
|
+
|
|
361
|
+
```markdown
|
|
362
|
+
## Decision DR-{NNN}
|
|
363
|
+
- **Phase**: {phase_number}/6 {PHASE_NAME}
|
|
364
|
+
- **Question**: {what was asked}
|
|
365
|
+
- **Options**: {options presented}
|
|
366
|
+
- **Choice**: {user's selection}
|
|
367
|
+
- **Rationale**: {why this choice}
|
|
368
|
+
- **Timestamp**: {ISO 8601}
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
**强制决策点**:
|
|
372
|
+
| 决策点 | 阶段 | 触发条件 |
|
|
373
|
+
|--------|------|----------|
|
|
374
|
+
| 规模确认 | PREP | AUTO-ESTIMATE 结果与用户预期不符 |
|
|
375
|
+
| 设计审批 | DESIGN | delphi-review 返回 REQUEST_CHANGES |
|
|
376
|
+
| 修复策略 | BUILD | 修复循环达到 3 次上限 |
|
|
377
|
+
| 发布确认 | SHIP | PR 创建后等待用户确认合并 |
|
|
378
|
+
| UAT 结果 | CLOSE | 用户手动验收(必须手动,禁止自动化) |
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
## 失败处理 (Failure Handling)
|
|
383
|
+
|
|
384
|
+
| 失败场景 | 处理策略 | 升级条件 |
|
|
385
|
+
|----------|----------|----------|
|
|
386
|
+
| Worktree 创建失败 | 重试 1 次,失败则提示用户手动处理 | 磁盘空间不足或权限问题 |
|
|
387
|
+
| delphi-review 连续 REQUEST_CHANGES | 最多 3 轮重设计,超过则 BLOCK | 3 轮后仍未 APPROVED |
|
|
388
|
+
| BUILD 修复循环超限 | 最多 3 次 fix cycle,超过则 BLOCK + 用户决策 | 测试持续失败 |
|
|
389
|
+
| CI 失败 | 分析失败原因,尝试 1 次自动修复 | 非 flaky 失败 |
|
|
390
|
+
| PR 合并冲突 | 提示用户手动解决 | 始终(禁止自动 force) |
|
|
391
|
+
| 工具缺失 | SKIP(不 BLOCK),记录到 phase summary | 始终不阻断 |
|
|
392
|
+
|
|
393
|
+
**BLOCK 状态处理**:
|
|
394
|
+
1. 写入 `.sprint-state/sprint-state.json` 状态为 `blocked`
|
|
395
|
+
2. 输出阻塞原因 + 已完成工作 + 建议操作
|
|
396
|
+
3. 等待用户决策(继续/放弃/降级)
|
|
397
|
+
4. 记录决策到 `decisions.md`
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
276
401
|
## 使用示例
|
|
277
402
|
|
|
278
403
|
| 场景 | 命令 | 说明 |
|
|
@@ -283,4 +408,4 @@ next_phase_context: [key info for next phase]
|
|
|
283
408
|
|
|
284
409
|
## 底层 Skills 保持独立
|
|
285
410
|
|
|
286
|
-
所有被调用的 Skills 独立可用:`delphi-review` (单独评审), `test-driven-development` (TDD),sprint-flow 仅自动串联
|
|
411
|
+
所有被调用的 Skills 独立可用:`delphi-review` (单独评审), `test-driven-development` (TDD), `grill-with-docs` (需求访谈), `batch-grill-me` (批量决策), `to-issues` (切片拆分),sprint-flow 仅自动串联
|
|
@@ -73,7 +73,7 @@ ralph-loop 内部分类:
|
|
|
73
73
|
- `permanent`: 跨 REQ 持久化(通用约束、模式)
|
|
74
74
|
- `contextual`: 当前 REQ 生命周期内有效
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
learnings.md 写入分类: permanent / contextual 通过 `.sprint-history/learnings.md` 持久化(原生,替代原 gstack/learn)。
|
|
77
77
|
|
|
78
78
|
---
|
|
79
79
|
|
|
@@ -61,7 +61,7 @@ Phase 6: SHIP → finishing-a-development-branch → canary → Sprint Summary
|
|
|
61
61
|
| `CIRCUIT_BREAKER_TRIGGERED` | sprint-flow 编排层监控成本,超阈值 BLOCK + 用户决策 |
|
|
62
62
|
| `ROLLBACK_TO_ROUND1` | verification-before-completion 失败 → 修复 max 3 次 → 仍失败 BLOCK |
|
|
63
63
|
| `GATE1_FAILED`/`GATE1_COMPLETE` | verification-before-completion 内置此区分 |
|
|
64
|
-
| `GATE2_RUNNING` | `
|
|
64
|
+
| `GATE2_RUNNING` | `xp-gate check --all`(Gate 7/8/9)— Phase 1-6 安全审计 |
|
|
65
65
|
|
|
66
66
|
---
|
|
67
67
|
|
|
@@ -15,15 +15,17 @@
|
|
|
15
15
|
|
|
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 需求评审(轻量 2 专家 1 轮) | requirements-reviewed.json |
|
|
20
|
+
| 原生设计文档生成 | sprint-flow 编排层 | R1 APPROVED 后 | docs/plans/YYYY-MM-DD-<topic>-design.md |
|
|
19
21
|
| **硬闸门** | — | 设计未批准 → 停止 | 禁止进入 Plan |
|
|
20
22
|
|
|
21
23
|
### Phase 1: PLAN
|
|
22
24
|
|
|
23
25
|
| Skill | 来源 | 触发条件 | 条件分支 |
|
|
24
26
|
|-------|------|---------|---------|
|
|
25
|
-
| `
|
|
26
|
-
| `delphi-review` | xp-gate |
|
|
27
|
+
| `batch-grill-me` | Matt Pocock (内置) | 标准路径(change_type != "修改已存在代码") | 批量前置决策 |
|
|
28
|
+
| `delphi-review` | xp-gate | R2 设计评审;lightweight 路径使用 2 专家 1 轮 | 必须产生 `.sprint-state/delphi-reviewed.json` 且 verdict=APPROVED |
|
|
27
29
|
| `to-issues` | xp-gate | delphi-review APPROVED 后 | 拆解为垂直切片 → slices-manifest.json |
|
|
28
30
|
|
|
29
31
|
### Phase 2: BUILD
|
|
@@ -31,22 +33,22 @@
|
|
|
31
33
|
| 步骤 | Skill | 来源 | 参数注入 |
|
|
32
34
|
|------|-------|------|---------|
|
|
33
35
|
| -1 | `hooks-install` | githooks | 无 |
|
|
34
|
-
| 0 |
|
|
35
|
-
| 1 | `test-driven-development` |
|
|
36
|
-
| 2 |
|
|
37
|
-
| 3 |
|
|
38
|
-
| 4 |
|
|
39
|
-
| 5 |
|
|
40
|
-
| 6 |
|
|
41
|
-
| 7 | 成本监控 | sprint-flow 编排层 | token 阈值 |
|
|
36
|
+
| 0 | BUILD-ENTRY-CONTRACT | xp-gate CLI | slices-manifest.json schema + slice↔REQ 校验 |
|
|
37
|
+
| 1 | `test-driven-development` | xp-gate (内置) | `--lang` 注入对应 TDD skill |
|
|
38
|
+
| 2 | ralph-loop / parallel dispatch | sprint-flow 编排层 | 隔离 session,review checkpoint |
|
|
39
|
+
| 3 | blind-review (read-only subagent) | sprint-flow 编排层 | tools: [Read, Grep, Glob] |
|
|
40
|
+
| 4 | verification-before-completion | sprint-flow 编排层 | 运行测试 + lint |
|
|
41
|
+
| 5 | 成本监控 | sprint-flow 编排层 | token 阈值 |
|
|
42
|
+
| 6 | learnings.md 写入 | sprint-flow 编排层 | 原生文件写入 |
|
|
42
43
|
|
|
43
44
|
### Phase 3: REVIEW
|
|
44
45
|
|
|
45
46
|
| Skill | 模式 | 触发条件 |
|
|
46
47
|
|-------|------|---------|
|
|
47
48
|
| `delphi-review` | `--mode code-walkthrough` | 强制调用 |
|
|
48
|
-
| `test-specification-alignment` | 默认 |
|
|
49
|
-
| `
|
|
49
|
+
| `test-specification-alignment` | 默认 | 强制调用(#367 程序化 HARD-GATE) |
|
|
50
|
+
| `xp-gate check --all` | 全量门禁 | 强制调用 |
|
|
51
|
+
| 浏览器验证 | Layer 4 可选链 | gstack browse > browser-use MCP > SKIP |
|
|
50
52
|
| `k6`/`locust`/`gatling` | 性能测试 | `--with-performance` 或 `--type backend-*` |
|
|
51
53
|
|
|
52
54
|
### Phase 4: USER ACCEPTANCE
|
|
@@ -59,18 +61,17 @@
|
|
|
59
61
|
|
|
60
62
|
| Skill | 来源 | 说明 |
|
|
61
63
|
|-------|------|------|
|
|
62
|
-
|
|
|
63
|
-
| `retro` |
|
|
64
|
-
|
|
|
64
|
+
| learnings.md 写入 | 原生 | 模式记录(替代原 gstack learn) |
|
|
65
|
+
| `xp-gate retro` | 原生 CLI | 工程回顾(含 #369 返工率区块) |
|
|
66
|
+
| systematic-debugging | Layer 4 可选 | 根因调试(如已安装;否则"无根因不修复"文本纪律) |
|
|
65
67
|
|
|
66
68
|
### Phase 6: SHIP
|
|
67
69
|
|
|
68
70
|
| Skill | 说明 |
|
|
69
71
|
|-------|------|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
| `canary` | 监控告警 |
|
|
72
|
+
| 分支完成决策(原生 4 选项) | merge / PR / keep / discard |
|
|
73
|
+
| native ship 步骤 | test → VERSION-GATE → commit → push → gh pr create |
|
|
74
|
+
| native land 步骤 | merge 确认 → wait CI → canary → fail git revert |
|
|
74
75
|
|
|
75
76
|
---
|
|
76
77
|
|
|
@@ -16,14 +16,13 @@
|
|
|
16
16
|
| 步骤 | Skill | 来源 | 说明 |
|
|
17
17
|
|------|-------|------|------|
|
|
18
18
|
| -1 | `hooks-install` | githooks | `githooks/verify.sh` → 缺失则 `githooks/install.sh` |
|
|
19
|
-
| 0 |
|
|
20
|
-
| 1 | `test-driven-development` |
|
|
21
|
-
| 2 |
|
|
22
|
-
| 3 |
|
|
23
|
-
| 4 |
|
|
24
|
-
| 5 |
|
|
25
|
-
| 6 |
|
|
26
|
-
| 7 | 成本监控 | sprint-flow 编排层 | 超阈值 BLOCK |
|
|
19
|
+
| 0 | BUILD-ENTRY-CONTRACT | xp-gate CLI | slices-manifest.json schema + slice↔REQ 校验 |
|
|
20
|
+
| 1 | `test-driven-development` | xp-gate (内置) | RED → GREEN → REFACTOR |
|
|
21
|
+
| 2 | ralph-loop / parallel dispatch | sprint-flow 编排层 | 隔离 session,review checkpoint |
|
|
22
|
+
| 3 | blind-review (read-only subagent) | sprint-flow 编排层 | tools: [Read, Grep, Glob],只读盲评 |
|
|
23
|
+
| 4 | verification-before-completion | sprint-flow 编排层 | 测试 + lint |
|
|
24
|
+
| 5 | 成本监控 | sprint-flow 编排层 | 超阈值 BLOCK |
|
|
25
|
+
| 6 | learnings.md 写入 | sprint-flow 编排层 | 原生模式记录 |
|
|
27
26
|
|
|
28
27
|
### GITHOOKS-GATE (Phase 1→2 闸门)
|
|
29
28
|
|
|
@@ -46,8 +45,9 @@
|
|
|
46
45
|
| Skill | 模式 | 说明 |
|
|
47
46
|
|-------|------|------|
|
|
48
47
|
| `delphi-review` | `--mode code-walkthrough` | 多专家匿名代码走查 |
|
|
49
|
-
| `test-specification-alignment` | 默认 | 测试与 Spec
|
|
50
|
-
| `
|
|
48
|
+
| `test-specification-alignment` | 默认 | 测试与 Spec 对齐验证(#367 程序化 HARD-GATE) |
|
|
49
|
+
| `xp-gate check --all` | 全量门禁 | Gate 0–9 含安全审计 |
|
|
50
|
+
| 浏览器验证 | Layer 4 可选链 | gstack browse > browser-use MCP > SKIP |
|
|
51
51
|
| `k6` / `locust` / `gatling` | 可选 | 后端负载测试 |
|
|
52
52
|
|
|
53
53
|
---
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
|
|
57
57
|
| Skill | 说明 |
|
|
58
58
|
|-------|------|
|
|
59
|
-
|
|
|
60
|
-
| `retro` |
|
|
61
|
-
|
|
|
59
|
+
| learnings.md 写入 | 原生模式记录(替代原 gstack learn) |
|
|
60
|
+
| `xp-gate retro` | 原生工程回顾(含 #369 返工率区块) |
|
|
61
|
+
| systematic-debugging | Layer 4 可选,根因调试(如已安装) |
|
|
62
62
|
|
|
63
63
|
---
|
|
64
64
|
|
|
@@ -66,10 +66,9 @@
|
|
|
66
66
|
|
|
67
67
|
| Skill | 说明 |
|
|
68
68
|
|-------|------|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
| `canary` | 监控告警 |
|
|
69
|
+
| 分支完成决策(原生 4 选项) | merge / PR / keep / discard |
|
|
70
|
+
| native ship 步骤 | test → VERSION-GATE → commit → push → gh pr create |
|
|
71
|
+
| native land 步骤 | merge 确认 → wait CI → canary → fail git revert |
|
|
73
72
|
|
|
74
73
|
---
|
|
75
74
|
|
|
@@ -77,12 +76,12 @@
|
|
|
77
76
|
|
|
78
77
|
| Phase | Backend (default) | Web Frontend | Mobile |
|
|
79
78
|
|-------|------------------|-------------|--------|
|
|
80
|
-
| Phase 0 (THINK) | `
|
|
81
|
-
| Phase 1 (PLAN) | `
|
|
82
|
-
| Phase 2 (BUILD) | TDD + blind-review | (同 backend) | + `vercel-react-native-skills` / `flutter-review` |
|
|
83
|
-
| Phase 3 (REVIEW) | `delphi-review --mode code-walkthrough`
|
|
84
|
-
| Phase 5 (FEEDBACK) |
|
|
85
|
-
| Phase 6 (SHIP) |
|
|
79
|
+
| Phase 0 (THINK) | `grill-with-docs` + R1 `delphi-review --mode requirements` | (同) | (同) |
|
|
80
|
+
| Phase 1 (PLAN) | `batch-grill-me` + R2 `delphi-review` | + OPTIONAL `design-shotgun` | (同 web) |
|
|
81
|
+
| Phase 2 (BUILD) | TDD + blind-review (read-only subagent) | (同 backend) | + `vercel-react-native-skills` / `flutter-review` |
|
|
82
|
+
| Phase 3 (REVIEW) | `delphi-review --mode code-walkthrough` + `xp-gate check --all` | + `xp-gate ui-review` + OPTIONAL qa/design-review/benchmark | `flutter-test` / `detox E2E` |
|
|
83
|
+
| Phase 5 (FEEDBACK) | learnings.md + `xp-gate retro` | (同) | (同) |
|
|
84
|
+
| Phase 6 (SHIP) | 原生 4 选项 + native ship + native land | (同) | + platform deploy |
|
|
86
85
|
|
|
87
86
|
---
|
|
88
87
|
|