@boyingliu01/xp-gate 0.8.8 → 0.8.9
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 +18 -0
- package/hooks/pre-commit +565 -120
- package/lib/arch.js +49 -0
- package/lib/check.js +50 -0
- package/lib/principles.js +48 -0
- package/package.json +1 -1
- package/plugins/claude-code/.claude-plugin/plugin.json +2 -2
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +83 -36
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/opencode/README.md +23 -7
- package/plugins/opencode/index.ts +36 -21
- package/plugins/opencode/package.json +1 -1
- package/plugins/opencode/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +83 -36
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/qoder/plugin.json +20 -0
- package/plugins/qoder/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +83 -36
- package/plugins/qoder/skills/test-driven-development/SKILL.md +371 -0
- package/plugins/qoder/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +3 -3
- package/skills/delphi-review/AGENTS.md +3 -3
- package/skills/sprint-flow/AGENTS.md +83 -36
- package/skills/test-specification-alignment/AGENTS.md +3 -3
|
@@ -1,68 +1,115 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-
|
|
4
|
-
**
|
|
3
|
+
**Generated:** 2026-06-11
|
|
4
|
+
**Commit:** c18f82b
|
|
5
|
+
**Branch:** main
|
|
6
|
+
**Version:** 0.8.9.0
|
|
5
7
|
|
|
6
8
|
## OVERVIEW
|
|
7
|
-
|
|
9
|
+
**11-phase** development pipeline: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW → USER ACCEPTANCE → FEEDBACK → SHIP → LAND → CLEANUP. Phase 2 default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE in Phase 1: design must pass Delphi review (≥91% consensus) before any coding.
|
|
10
|
+
|
|
11
|
+
> **Doc drift**: README/CAPABILITIES still describe a "7-phase" pipeline. The canonical 11-phase model lives in `SKILL.md` and is what actually executes. See root `AGENTS.md` → "Known Drift" #4.
|
|
8
12
|
|
|
9
13
|
## STRUCTURE
|
|
10
14
|
```
|
|
11
15
|
skills/sprint-flow/
|
|
12
|
-
├── SKILL.md #
|
|
16
|
+
├── SKILL.md # 11-phase pipeline definition (canonical)
|
|
17
|
+
├── AGENTS.md # This file (mirrored to 7 other locations — DO NOT edit mirrors)
|
|
13
18
|
├── evals/ # Evaluation test cases
|
|
14
|
-
├── evolution-history.json
|
|
15
|
-
├── evolution-log.md
|
|
16
|
-
├── references/
|
|
17
|
-
│ ├── phase-0-
|
|
18
|
-
│
|
|
19
|
-
|
|
19
|
+
├── evolution-history.json
|
|
20
|
+
├── evolution-log.md
|
|
21
|
+
├── references/
|
|
22
|
+
│ ├── phase-minus-0-5-auto-estimate.md # Phase -0.5: AUTO-ESTIMATE
|
|
23
|
+
│ ├── phase-0-think.md # Phase 0: brainstorming → CONTEXT.md + ADR
|
|
24
|
+
│ ├── phase-1-plan.md # Phase 1: autoplan + delphi-review (HARD-GATE)
|
|
25
|
+
│ ├── phase-2-build.md # Phase 2: ralph-loop default + TDD + test-align
|
|
26
|
+
│ ├── phase-3-review.md # Phase 3: code-walkthrough + QA + benchmark
|
|
27
|
+
│ ├── phase-4-uat.md # Phase 4: USER ACCEPTANCE
|
|
28
|
+
│ ├── phase-5-feedback.md # Phase 5: retro + debugging + learn
|
|
29
|
+
│ ├── phase-6-ship.md # Phase 6: finishing-dev-branch + PR
|
|
30
|
+
│ ├── phase-7-land.md # Phase 7: land + deploy
|
|
31
|
+
│ ├── phase-8-cleanup.md # Phase 8: sprint branch cleanup
|
|
32
|
+
│ ├── force-levels.md # Phase forcing rules
|
|
33
|
+
│ └── components/ # Reusable phase building blocks
|
|
34
|
+
└── templates/
|
|
35
|
+
├── auto-estimate-output-template.md
|
|
36
|
+
├── auto-estimate-learning-log.md
|
|
37
|
+
├── pain-document-template.md
|
|
38
|
+
├── sprint-progress-template.md
|
|
39
|
+
├── sprint-summary-template.md
|
|
40
|
+
└── emergent-issues-template.md
|
|
20
41
|
```
|
|
21
42
|
|
|
22
43
|
## WHERE TO LOOK
|
|
23
44
|
| Task | Location | Notes |
|
|
24
45
|
|------|----------|-------|
|
|
25
|
-
| Pipeline
|
|
46
|
+
| Pipeline definition | SKILL.md | 11 phases with HARD-GATE between Phase 1 and Phase 2 |
|
|
47
|
+
| Auto-estimate phase | references/phase-minus-0-5-auto-estimate.md | Sizing pass before THINK |
|
|
26
48
|
| THINK phase | references/phase-0-think.md | brainstorming → CONTEXT.md + ADR |
|
|
27
|
-
|
|
|
49
|
+
| PLAN phase + HARD-GATE | references/phase-1-plan.md | autoplan → delphi-review → specification.yaml |
|
|
50
|
+
| BUILD phase | references/phase-2-build.md | ralph-loop (default) vs parallel |
|
|
51
|
+
| Force-level rules | references/force-levels.md | Defines when each phase becomes mandatory |
|
|
52
|
+
| Templates | templates/ | Auto-estimate, sprint progress/summary, pain doc, emergent issues |
|
|
53
|
+
|
|
54
|
+
## THE 11 PHASES
|
|
28
55
|
|
|
29
|
-
## 7 PHASES
|
|
30
56
|
| Phase | Name | Key Action | Hard Gate |
|
|
31
57
|
|-------|------|-----------|-----------|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
58
|
+
| -1 | ISOLATE | Isolate working tree / worktree creation | — |
|
|
59
|
+
| -0.5 | AUTO-ESTIMATE | Sizing pass; emits estimate template | — |
|
|
60
|
+
| 0 | THINK | brainstorming → CONTEXT.md + ADR | — |
|
|
61
|
+
| 1 | PLAN | autoplan → delphi-review → specification.yaml | **HARD-GATE**: design must reach ≥91% Delphi consensus |
|
|
62
|
+
| 2 | BUILD | ralph-loop (REQ-level, default) + TDD + test-spec-alignment | — |
|
|
35
63
|
| 3 | REVIEW | code-walkthrough + QA + benchmark | — |
|
|
36
|
-
| 4 | USER
|
|
37
|
-
| 5 | FEEDBACK |
|
|
38
|
-
| 6 | SHIP | finishing-
|
|
64
|
+
| 4 | USER ACCEPTANCE | Manual verification | — |
|
|
65
|
+
| 5 | FEEDBACK | retro + debugging + `learn` (Sprint-level) | — |
|
|
66
|
+
| 6 | SHIP | finishing-a-development-branch → PR | — |
|
|
67
|
+
| 7 | LAND | land + deploy + canary | — |
|
|
68
|
+
| 8 | CLEANUP | Sprint branch cleanup (per `docs/plans/2026-06-06-sprint-branch-cleanup-design.md`) | — |
|
|
39
69
|
|
|
40
70
|
## CONVENTIONS
|
|
41
|
-
- ralph-loop is Phase 2
|
|
42
|
-
- delphi-review HARD-GATE in Phase 1
|
|
43
|
-
-
|
|
44
|
-
-
|
|
71
|
+
- **ralph-loop is Phase 2 default**. Each REQ runs in a clean context (no linear accumulation), saving 40-67% tokens vs parallel mode.
|
|
72
|
+
- **delphi-review HARD-GATE in Phase 1**: design must reach ≥91% consensus across ≥2 model providers, domestic models only. Unapproved → BLOCK coding.
|
|
73
|
+
- **`learn` is called twice**: once per REQ in Phase 2 (ralph-loop internal, `progress.log` permanent/contextual classification) and once in Phase 5 (Sprint-level retro).
|
|
74
|
+
- **Phase isolation**: each phase has explicit entry/exit criteria documented in its `references/phase-*.md` file.
|
|
75
|
+
- **Emergent Requirements** discovered in Phase 4 (USER ACCEPTANCE) are explicitly captured via `templates/emergent-issues-template.md` — never silently merged.
|
|
76
|
+
- **Auto-detection**: Phase 0 uses `src/npm-package/lib/ui-detector.ts` to pick the right tech-stack templates.
|
|
45
77
|
|
|
46
78
|
## 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
|
|
50
|
-
-
|
|
79
|
+
- Do NOT skip `delphi-review` in Phase 1 — HARD-GATE blocks implementation.
|
|
80
|
+
- Do NOT use parallel build mode unless explicitly requested. Ralph-loop is the default for a reason.
|
|
81
|
+
- Do NOT enter Phase 1 (PLAN) without completing Phase 0 (THINK).
|
|
82
|
+
- Do NOT implement before design is APPROVED — Phase 1 must reach Delphi consensus first.
|
|
83
|
+
- Do NOT merge an Emergent Requirement into the original Sprint silently — capture it via the template.
|
|
84
|
+
- Do NOT terminate Delphi review before ≥91% consensus or 5 rounds, whichever first.
|
|
51
85
|
|
|
52
86
|
## UNIQUE STYLES
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
87
|
+
- **11 phases** including negative-numbered pre-phases (-1, -0.5) — intentional, captures the work that happens before "real" coding starts.
|
|
88
|
+
- **HARD-GATE** between PLAN and BUILD is enforced both in the SKILL.md instructions and in the Claude Code plugin's PreToolUse hook (`plugins/claude-code/bin/delphi-review-guard.sh`).
|
|
89
|
+
- **Per-REQ clean context in ralph-loop** = the core efficiency mechanism. Sprint-flow specifically chooses this over parallel mode.
|
|
90
|
+
- **Tech-stack auto-detection** via `--type` and `--lang` flags or `ui-detector.ts`.
|
|
57
91
|
|
|
58
92
|
## COMMANDS
|
|
59
93
|
```bash
|
|
94
|
+
/sprint-flow "开发用户登录" # Full 11-phase pipeline
|
|
95
|
+
/sprint-flow "开发用户登录" --type web-nextjs --lang typescript # Pin tech stack
|
|
96
|
+
/sprint-flow "开发用户登录" --phase build-only # Skip planning (advanced)
|
|
97
|
+
/sprint-flow "开发用户登录" --mode parallel # Legacy all-at-once (NOT default)
|
|
60
98
|
/delphi-review "开发用户登录" --type web-nextjs --lang typescript
|
|
61
|
-
/sprint-flow "开发用户登录" --phase build-only
|
|
62
|
-
/sprint-flow "开发用户登录" --mode parallel # Legacy all-at-once
|
|
63
99
|
```
|
|
64
100
|
|
|
65
101
|
## NOTES
|
|
66
|
-
- Integrates brainstorming, autoplan, delphi-review, TDD, test-specification-alignment
|
|
67
|
-
- ralph-loop internal learnings via progress.log (permanent
|
|
68
|
-
- Phase 5 calls gstack/learn for Sprint-level retrospective
|
|
102
|
+
- Integrates: brainstorming, autoplan, delphi-review, TDD, test-specification-alignment, qa, design-review, benchmark, systematic-debugging, retro, learn, finishing-a-development-branch.
|
|
103
|
+
- ralph-loop's internal learnings are persisted via `progress.log` (permanent vs contextual classification).
|
|
104
|
+
- Phase 5 calls `gstack/learn` for Sprint-level retrospective.
|
|
105
|
+
- Phase 8 cleanup behavior is governed by `docs/plans/2026-06-06-sprint-branch-cleanup-design.md`.
|
|
106
|
+
- This `AGENTS.md` is the canonical version. **7 byte-identical mirrors** exist at:
|
|
107
|
+
- `plugins/claude-code/skills/sprint-flow/AGENTS.md`
|
|
108
|
+
- `plugins/opencode/skills/sprint-flow/AGENTS.md`
|
|
109
|
+
- `plugins/qoder/skills/sprint-flow/AGENTS.md`
|
|
110
|
+
- `src/npm-package/skills/sprint-flow/AGENTS.md`
|
|
111
|
+
- `src/npm-package/plugins/claude-code/skills/sprint-flow/AGENTS.md`
|
|
112
|
+
- `src/npm-package/plugins/opencode/skills/sprint-flow/AGENTS.md`
|
|
113
|
+
- `src/npm-package/plugins/qoder/skills/sprint-flow/AGENTS.md`
|
|
114
|
+
Mirrors are updated by `scripts/copy-skills.sh`. Do NOT edit them by hand.
|
|
115
|
+
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-06-11
|
|
4
|
+
**Commit:** c18f82b
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:**
|
|
6
|
+
**Version:** 0.8.9.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|