@boyingliu01/xp-gate 0.13.2 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/xp-gate.js +8 -0
- package/gate-9.sh +13 -13
- package/hooks/gate-9.sh +13 -13
- package/lib/__tests__/bootstrap.test.js +78 -0
- package/lib/__tests__/detect-deps.test.js +88 -0
- package/lib/__tests__/doctor.test.js +28 -0
- package/lib/__tests__/install-cmd.test.js +41 -0
- package/lib/__tests__/uninstall.test.js +53 -0
- package/lib/__tests__/update-hooks.test.js +4 -2
- package/lib/detect-deps.js +2 -0
- package/lib/doctor.js +13 -0
- package/lib/gate-tools.js +87 -0
- package/lib/init.js +1 -36
- package/lib/install-cmd.js +57 -0
- package/lib/shared-utils.js +35 -1
- package/lib/uninstall.js +54 -9
- package/mock-policy/AGENTS.md +2 -2
- package/mutation/AGENTS.md +2 -2
- package/package.json +1 -1
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +2 -2
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +2 -2
- package/plugins/claude-code/skills/sprint-flow/SKILL.md +14 -9
- package/plugins/claude-code/skills/sprint-flow/references/phase-2-design.md +33 -2
- package/plugins/claude-code/skills/sprint-flow/references/phase-3-build.md +63 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-5-ship.md +58 -3
- package/plugins/claude-code/skills/sprint-flow/references/phase-6-close.md +60 -1
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +2 -2
- package/plugins/opencode/package.json +1 -1
- package/plugins/opencode/skills/delphi-review/AGENTS.md +2 -2
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +2 -2
- package/plugins/opencode/skills/sprint-flow/SKILL.md +14 -9
- package/plugins/opencode/skills/sprint-flow/references/phase-2-design.md +33 -2
- package/plugins/opencode/skills/sprint-flow/references/phase-3-build.md +63 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-5-ship.md +58 -3
- package/plugins/opencode/skills/sprint-flow/references/phase-6-close.md +60 -1
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +2 -2
- package/plugins/qoder/plugin.json +1 -1
- package/plugins/qoder/skills/delphi-review/AGENTS.md +4 -4
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +4 -4
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +4 -4
- package/principles/AGENTS.md +2 -2
- package/skills/delphi-review/AGENTS.md +2 -2
- package/skills/sprint-flow/AGENTS.md +2 -2
- package/skills/sprint-flow/SKILL.md +14 -9
- package/skills/sprint-flow/references/phase-2-design.md +33 -2
- package/skills/sprint-flow/references/phase-3-build.md +63 -0
- package/skills/sprint-flow/references/phase-5-ship.md +58 -3
- package/skills/sprint-flow/references/phase-6-close.md +60 -1
- package/skills/test-specification-alignment/AGENTS.md +2 -2
|
@@ -13,15 +13,70 @@
|
|
|
13
13
|
|
|
14
14
|
**Orchestrator 直接执行**: `finishing-a-development-branch` 和 `ship` 均为交互式 skill(4 选项菜单 + PR 确认),**必须由 orchestrator 直接调用**。
|
|
15
15
|
|
|
16
|
-
**关键链**:
|
|
16
|
+
**关键链**: VERSION-GATE(MANDATORY) → finishing-a-development-branch(4选项) → push PR
|
|
17
17
|
|
|
18
18
|
**HARD-GATE**: Phase 4/6 VERIFY 未完成 → BLOCK。验证 `feedback-log.md` 存在。
|
|
19
19
|
|
|
20
20
|
**GITHOOKS-GATE**: 验证 hooks 完整性,缺失则 `githooks/install.sh`
|
|
21
21
|
|
|
22
|
-
**
|
|
22
|
+
**NETWORK-RESILIENCE**: GitHub API 在大中华区存在间歇性 TLS/超时问题。所有 `gh` CLI 调用应容忍偶尔失败:
|
|
23
|
+
- `gh` 命令失败时等待 2-5 秒后重试(最多 3 次)
|
|
24
|
+
- 优先使用 REST API (`gh api /repos/...`) 而非 GraphQL (`gh pr view --json ...`),REST 更轻量更可靠
|
|
25
|
+
- 验证 CI 状态时使用 `gh run list --branch ... --limit 1 --json status,conclusion` 代替 `gh pr view --json statusCheckRollup`
|
|
26
|
+
- 如果 `gh` 持续超时,fallback 到 `curl + token`:
|
|
27
|
+
```
|
|
28
|
+
curl -s -H "Authorization: token $(gh auth token)" \
|
|
29
|
+
"https://api.github.com/repos/OWNER/REPO/commits/HEAD/status"
|
|
30
|
+
```
|
|
23
31
|
|
|
24
|
-
|
|
32
|
+
### Step 0: VERSION-GATE(MANDATORY — 在 finishing-a-development-branch 之前执行)
|
|
33
|
+
|
|
34
|
+
**Purpose**: Ensure version bump, changelog update, and sync before creating PR. This MUST run BEFORE calling `finishing-a-development-branch` — the skill's "Create PR" option creates the PR immediately, so version changes must be committed first.
|
|
35
|
+
|
|
36
|
+
**Execution**:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
1. 根据变更类型决定 bump 级别:
|
|
40
|
+
- PATCH (0.14.0 → 0.14.1): bug fixes, docs, minor enhancements
|
|
41
|
+
- MINOR (0.14.0 → 0.15.0): new features, significant enhancements
|
|
42
|
+
- MAJOR (0.14.0 → 1.0.0): breaking changes
|
|
43
|
+
|
|
44
|
+
2. 更新 VERSION 文件 (MAJOR.MINOR.PATCH.MICRO 格式)
|
|
45
|
+
|
|
46
|
+
3. 更新 CHANGELOG.md:
|
|
47
|
+
- 添加新版本条目 (## [X.Y.Z.W] - YYYY-MM-DD)
|
|
48
|
+
- 按 ### Added / ### Fixed / ### Changed 分类
|
|
49
|
+
|
|
50
|
+
4. 运行 sync-version.sh:
|
|
51
|
+
bash scripts/sync-version.sh
|
|
52
|
+
|
|
53
|
+
5. 验证:
|
|
54
|
+
git diff VERSION # 确认版本号变更
|
|
55
|
+
git diff CHANGELOG.md # 确认 changelog 变更
|
|
56
|
+
git diff --stat # 确认 package.json 版本同步
|
|
57
|
+
|
|
58
|
+
6. 提交版本变更:
|
|
59
|
+
git add VERSION CHANGELOG.md && git commit -m "release: bump version to X.Y.Z.W"
|
|
60
|
+
|
|
61
|
+
7. 推送到远程分支:
|
|
62
|
+
git push
|
|
63
|
+
|
|
64
|
+
8. 验证 CI 流程触发:
|
|
65
|
+
gh pr view <PR_NUMBER> --json state # 确认 CI 已开始
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**GATE CHECK** (BEFORE proceeding to finishing-a-development-branch):
|
|
69
|
+
```
|
|
70
|
+
[VERSION-GATE] VERSION bump ✓ # VERSION 文件已更新
|
|
71
|
+
[VERSION-GATE] CHANGELOG ✓ # 新版本条目已添加
|
|
72
|
+
[VERSION-GATE] sync-version ✓ # 所有 package.json 已同步
|
|
73
|
+
[VERSION-GATE] committed ✓ # 版本变更已提交并推送
|
|
74
|
+
[VERSION-GATE] PR updated ✓ # PR 已包含版本变更 commit
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**⚠️ ANTI-PATTERN**: 先调用 finishing-a-development-branch 创建 PR,再 bump VERSION 会导致 PR 不含版本变更 → CI 不触发 release workflow → 无新版本发布。
|
|
78
|
+
|
|
79
|
+
**输出**: 版本变更 commit 包含在 PR 中
|
|
25
80
|
|
|
26
81
|
---
|
|
27
82
|
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
**执行时机**: Phase 5/6 SHIP 完成后。
|
|
4
4
|
**对应旧模型**: Phase 7 USER ACCEPTANCE + Phase 8 CLEANUP
|
|
5
5
|
|
|
6
|
+
**NETWORK-RESILIENCE**: 与 Phase 5/6 相同,GitHub API 在大中华区存在间歇性超时。CLEANUP 中的 `gh pr list` 和 `git push --delete` 需容忍重试。详见 `phase-5-ship.md` NETWORK-RESILIENCE 指南。
|
|
7
|
+
|
|
6
8
|
---
|
|
7
9
|
|
|
8
10
|
## Part A: USER ACCEPTANCE(⚠️ 人工验收)
|
|
@@ -100,7 +102,64 @@ Phase 6/6 CLOSE 完成时:
|
|
|
100
102
|
### 输出
|
|
101
103
|
|
|
102
104
|
- Emergent Issues List (`emergent-issues.md`)
|
|
103
|
-
- 进入 Part
|
|
105
|
+
- 进入 Part A.5 ARCHIVE 自动执行(如果用户确认验收)
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Part A.5: ARCHIVE(归档 — v0.14.0+ Issue #308)
|
|
110
|
+
|
|
111
|
+
**Purpose**: Preserve sprint decision records before cleanup. `.sprint-state/` is gitignored and deleted during CLEANUP; this step copies structured outputs to `.sprint-history/` which is tracked by git.
|
|
112
|
+
|
|
113
|
+
**Execution**: After USER ACCEPTANCE (Part A) confirms continuation, BEFORE CLEANUP (Part B).
|
|
114
|
+
|
|
115
|
+
### Step 1: Read Sprint ID
|
|
116
|
+
|
|
117
|
+
Read `sprint-state.json` → `id` field (e.g., `sprint-2026-07-09-01`).
|
|
118
|
+
|
|
119
|
+
### Step 2: Check for Conflicts
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
IF .sprint-history/<sprint-id>/ already exists:
|
|
123
|
+
→ Append timestamp suffix: <sprint-id>-20260709T120000
|
|
124
|
+
→ Log warning: "Sprint archive conflict, using timestamp suffix"
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Step 3: Archive Files
|
|
128
|
+
|
|
129
|
+
Copy from `.sprint-state/` to `.sprint-history/<sprint-id>/`:
|
|
130
|
+
|
|
131
|
+
**Included** (all `.yaml`, `.json`, `.md` files under `.sprint-state/`):
|
|
132
|
+
- `specification.yaml` (if in phase-outputs/)
|
|
133
|
+
- `delphi-reviewed.json`
|
|
134
|
+
- `sprint-state.json`
|
|
135
|
+
- `phase-outputs/*.yaml`, `phase-outputs/*.json`, `phase-outputs/*.md`
|
|
136
|
+
- `tdd-gate-log.json`, `uncommitted-gate-log.json`
|
|
137
|
+
|
|
138
|
+
**Excluded** (temporary/cache):
|
|
139
|
+
- `*.tmp`, `*.cache` files
|
|
140
|
+
- `sprint.lock` (session lock file)
|
|
141
|
+
|
|
142
|
+
### Step 4: Verify Git Tracking
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# .sprint-history/ is NOT in .gitignore (verified — no change needed)
|
|
146
|
+
# Verify files are trackable:
|
|
147
|
+
git status .sprint-history/
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**No `.gitignore` change needed**: `.sprint-history/` is NOT currently listed in `.gitignore`. The `.sprint-state/` ignore (line 59) only matches `.sprint-state/` exactly — it does NOT match `.sprint-history/`.
|
|
151
|
+
|
|
152
|
+
### Step 5: Commit Archive (Optional)
|
|
153
|
+
|
|
154
|
+
The orchestrator MAY commit the archive:
|
|
155
|
+
```
|
|
156
|
+
git add .sprint-history/<sprint-id>/ && git commit -m "archive: sprint <sprint-id>"
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Output
|
|
160
|
+
|
|
161
|
+
- `.sprint-history/<sprint-id>/` directory with archived sprint state
|
|
162
|
+
- Git-tracked sprint decision records for future retro/review
|
|
104
163
|
|
|
105
164
|
---
|
|
106
165
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-07-08
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 229cf7d
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.14.0.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|