@boyingliu01/xp-gate 0.6.0 → 0.7.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 +9 -4
- package/lib/__tests__/detect-deps.test.js +34 -0
- package/lib/__tests__/install-skill.test.js +45 -0
- package/lib/detect-deps.js +19 -6
- package/lib/install-skill.js +26 -15
- package/package.json +1 -1
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/qoder/AGENTS.md +93 -0
- package/plugins/qoder/README.md +87 -0
- package/plugins/qoder/widgets/quality-report.html +163 -0
- package/plugins/qoder/widgets/sprint-dashboard.html +172 -0
- package/skills/delphi-review/SKILL.md +48 -0
- package/skills/delphi-review/references/qoder-multi-model.md +191 -0
- package/skills/ralph-loop/SKILL.md +40 -0
- package/skills/sprint-flow/SKILL.md +68 -0
- package/skills/sprint-flow/references/qoder-adaptation.md +173 -0
- package/skills/test-specification-alignment/SKILL.md +23 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Qoder Platform Adaptation Guide for Sprint Flow
|
|
2
|
+
|
|
3
|
+
**Version:** v0.6.0
|
|
4
|
+
**Platform:** Qoder IDE
|
|
5
|
+
**Status:** Active
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Platform Differences
|
|
10
|
+
|
|
11
|
+
### 1.1 No File-System Event Hooks
|
|
12
|
+
|
|
13
|
+
| Capability | Claude Code | OpenCode | Qoder |
|
|
14
|
+
|-----------|------------|----------|-------|
|
|
15
|
+
| PreToolUse Hook | ✅ `delphi-review-guard.sh` | ❌ | ❌ |
|
|
16
|
+
| PostToolUse Hook | ✅ `xp-gate-check` | ❌ | ❌ |
|
|
17
|
+
| Custom Tools | ❌ | ✅ `tool()` | ❌ (MCP instead) |
|
|
18
|
+
|
|
19
|
+
**Adaptation**: Gates embedded in SKILL.md as `<MANDATORY>` instructions. Orchestrator MUST execute checks before each file edit.
|
|
20
|
+
|
|
21
|
+
### 1.2 No `task()` Subagent API
|
|
22
|
+
|
|
23
|
+
| Capability | OpenCode | Qoder |
|
|
24
|
+
|-----------|----------|-------|
|
|
25
|
+
| Subagent dispatch | `task(category, load_skills)` | Agent tool (Browser/CodeReview/plan-agent) |
|
|
26
|
+
| Multi-model | Agent config with different models | Qoder multi-model capability |
|
|
27
|
+
| Context isolation | Automatic per-task | Automatic per-Agent |
|
|
28
|
+
|
|
29
|
+
**Adaptation**: Phase→Agent mapping table in sprint-flow SKILL.md.
|
|
30
|
+
|
|
31
|
+
### 1.3 No superpowers/gstack Ecosystem
|
|
32
|
+
|
|
33
|
+
Qoder does not have access to the superpowers or gstack skill ecosystems. All external skill calls are replaced by:
|
|
34
|
+
- **Orchestrator inline execution** (for simple tasks)
|
|
35
|
+
- **Qoder native capabilities** (Memory, CodeReview, browser-use)
|
|
36
|
+
- **Agent subagents** (for complex analysis/planning)
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 2. External Skill Replacement Matrix
|
|
41
|
+
|
|
42
|
+
### 2.1 brainstorming (superpowers) → Orchestrator Inline
|
|
43
|
+
|
|
44
|
+
**Original**: `task(category="deep", load_skills=["brainstorming"])`
|
|
45
|
+
|
|
46
|
+
**Qoder Replacement**: Orchestrator conducts an interactive requirements exploration dialogue:
|
|
47
|
+
1. Ask clarifying questions about the feature
|
|
48
|
+
2. Analyze existing codebase for relevant modules
|
|
49
|
+
3. Generate a structured design document
|
|
50
|
+
4. Present to user for approval (HARD-GATE)
|
|
51
|
+
|
|
52
|
+
### 2.2 autoplan (gstack) → plan-agent Subagent
|
|
53
|
+
|
|
54
|
+
**Original**: `task(category="deep", load_skills=["autoplan"])`
|
|
55
|
+
|
|
56
|
+
**Qoder Replacement**: Dispatch `plan-agent` subagent with:
|
|
57
|
+
- Design document as input
|
|
58
|
+
- Codebase structure analysis
|
|
59
|
+
- Generate implementation plan with REQ/AC structure
|
|
60
|
+
- Output: specification.yaml draft
|
|
61
|
+
|
|
62
|
+
### 2.3 freeze/unfreeze (gstack) → Pre-Edit Gate
|
|
63
|
+
|
|
64
|
+
**Original**: `freeze` locks test directories, `unfreeze` unlocks
|
|
65
|
+
|
|
66
|
+
**Qoder Replacement**: Pre-Edit Gate in sprint-flow SKILL.md:
|
|
67
|
+
- During Phase 2 freeze state, orchestrator MUST check target file path
|
|
68
|
+
- If file is in test directory → BLOCK with message
|
|
69
|
+
- This is a behavioral constraint, not a physical lock
|
|
70
|
+
|
|
71
|
+
### 2.4 requesting-code-review (superpowers) → CodeReview Subagent
|
|
72
|
+
|
|
73
|
+
**Original**: `task(category="unspecified-high", load_skills=["requesting-code-review"])`
|
|
74
|
+
|
|
75
|
+
**Qoder Replacement**: Dispatch `CodeReview` subagent:
|
|
76
|
+
- Input: changed files since last REQ commit
|
|
77
|
+
- Blind review (no access to business intent, only code)
|
|
78
|
+
- Output: review findings
|
|
79
|
+
|
|
80
|
+
### 2.5 verification-before-completion (superpowers) → Orchestrator Inline
|
|
81
|
+
|
|
82
|
+
**Original**: `task(load_skills=["verification-before-completion"])`
|
|
83
|
+
|
|
84
|
+
**Qoder Replacement**: Orchestrator executes sequentially:
|
|
85
|
+
1. `npm test` / `pytest` / `go test` (test runner)
|
|
86
|
+
2. `npx eslint` / `ruff check` / `golangci-lint` (linter)
|
|
87
|
+
3. `npx tsx src/principles/index.ts` (principles check)
|
|
88
|
+
4. Coverage report check (≥80%)
|
|
89
|
+
|
|
90
|
+
### 2.6 learn/retro (gstack) → Qoder Memory System
|
|
91
|
+
|
|
92
|
+
**Original**: `task(load_skills=["learn", "retro"])`
|
|
93
|
+
|
|
94
|
+
**Qoder Replacement**:
|
|
95
|
+
- **learn**: `UpdateMemory` with appropriate category
|
|
96
|
+
- Architecture decisions → `expert_experience`
|
|
97
|
+
- Coding patterns → `development_practice_specification`
|
|
98
|
+
- Project structure → `project_introduction`
|
|
99
|
+
- **retro**: `plan-agent` subagent analyzes git log + code quality trends
|
|
100
|
+
- Output stored via `UpdateMemory` as `task_summary_experience`
|
|
101
|
+
|
|
102
|
+
### 2.7 browse (gstack) → browser-use MCP
|
|
103
|
+
|
|
104
|
+
**Original**: `browse` navigates to localhost, interacts with UI
|
|
105
|
+
|
|
106
|
+
**Qoder Replacement**: Use `browser-use` MCP tools:
|
|
107
|
+
- `navigate_page` → navigate to localhost:3000
|
|
108
|
+
- `click` / `fill` → interact with UI elements
|
|
109
|
+
- `take_screenshot` → capture visual verification
|
|
110
|
+
- `take_snapshot` → get accessibility tree for validation
|
|
111
|
+
|
|
112
|
+
### 2.8 ship/finishing-branch → Orchestrator Git/GH CLI
|
|
113
|
+
|
|
114
|
+
**Original**: External skill calls
|
|
115
|
+
|
|
116
|
+
**Qoder Replacement**: Orchestrator executes:
|
|
117
|
+
- `git add` + `git commit` + `git push`
|
|
118
|
+
- `gh pr create` + `gh pr merge`
|
|
119
|
+
- Standard git workflow (platform-independent)
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## 3. genui Widget Integration
|
|
124
|
+
|
|
125
|
+
### 3.1 Quality Report Widget
|
|
126
|
+
|
|
127
|
+
**Trigger**: After Phase 3 REVIEW completes
|
|
128
|
+
|
|
129
|
+
**Execution**:
|
|
130
|
+
```
|
|
131
|
+
show_widget(widget_path="plugins/qoder/widgets/quality-report.html", data={...quality-report.json contents...})
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 3.2 Sprint Dashboard Widget
|
|
135
|
+
|
|
136
|
+
**Trigger**: User requests `/sprint-status` or Phase transition
|
|
137
|
+
|
|
138
|
+
**Execution**:
|
|
139
|
+
```
|
|
140
|
+
show_widget(widget_path="plugins/qoder/widgets/sprint-dashboard.html", data={...sprint-state.json contents...})
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## 4. Memory System Integration
|
|
146
|
+
|
|
147
|
+
### 4.1 Learnings Categories
|
|
148
|
+
|
|
149
|
+
| ralph-loop Category | Qoder Memory Category | Scope |
|
|
150
|
+
|--------------------|-----------------------|-------|
|
|
151
|
+
| permanent (architecture) | `expert_experience` | workspace |
|
|
152
|
+
| permanent (convention) | `development_practice_specification` | workspace |
|
|
153
|
+
| permanent (structure) | `project_introduction` | workspace |
|
|
154
|
+
| contextual | Not persisted | session only |
|
|
155
|
+
| sprint retro | `task_summary_experience` | workspace |
|
|
156
|
+
|
|
157
|
+
### 4.2 Memory Lifecycle
|
|
158
|
+
|
|
159
|
+
1. **REQ complete** → `UpdateMemory` for permanent learnings
|
|
160
|
+
2. **Sprint Phase 5** → `UpdateMemory` for sprint-level retro
|
|
161
|
+
3. **Next sprint** → `SearchMemory` to recall relevant learnings
|
|
162
|
+
4. **Stale learnings** → User can request memory cleanup
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## 5. Known Limitations
|
|
167
|
+
|
|
168
|
+
| Limitation | Impact | Mitigation |
|
|
169
|
+
|-----------|--------|-----------|
|
|
170
|
+
| Skill-embedded gates less reliable than hooks | Agent may ignore constraints | `<MANDATORY>` tags + Terminal State Checklist |
|
|
171
|
+
| No physical file-system lock for freeze | Test files could be modified | Pre-Edit Gate + Terminal State verification |
|
|
172
|
+
| Single model for all experts (degraded mode) | Loses cross-provider anonymity | Clearly label degraded reviews |
|
|
173
|
+
| No `k6`/`locust` integration | Load testing limited | Future: MCP server for load testing |
|
|
@@ -569,6 +569,29 @@ legacy_mode:
|
|
|
569
569
|
|
|
570
570
|
---
|
|
571
571
|
|
|
572
|
+
## Qoder 平台适配
|
|
573
|
+
|
|
574
|
+
### freeze 机制替代(替代 gstack/freeze skill)
|
|
575
|
+
|
|
576
|
+
在 Qoder 环境中,freeze/unfreeze 通过 sprint-flow 的 **Pre-Edit Gate** 替代:
|
|
577
|
+
- Phase 2 执行期间,orchestrator 禁止修改测试目录下的文件
|
|
578
|
+
- 此约束通过 SKILL.md 指令强制执行(非物理阻断)
|
|
579
|
+
- orchestrator 在每次文件编辑前检查:如果目标文件位于测试目录且当前处于 Phase 2 freeze 状态,则 **BLOCK**
|
|
580
|
+
|
|
581
|
+
### Agent 配置适配
|
|
582
|
+
|
|
583
|
+
| 原配置 | Qoder 替代 | 说明 |
|
|
584
|
+
|---------|------------|------|
|
|
585
|
+
| Phase 1 Agent (Qwen3.5-Plus) | **orchestrator 直接执行** | YAML 解析 + AST 解析由 orchestrator 内联完成 |
|
|
586
|
+
| Phase 2 Agent (GLM-5) | **orchestrator 直接执行** | 测试执行由 orchestrator 通过 Bash 工具完成 |
|
|
587
|
+
|
|
588
|
+
### Qoder 集成点
|
|
589
|
+
|
|
590
|
+
- Phase 3 REVIEW 完成后,使用 genui `show_widget` 展示对齐报告摘要
|
|
591
|
+
- 对齐分数记录通过 `UpdateMemory` 持久化(development_test_specification 类型)
|
|
592
|
+
|
|
593
|
+
---
|
|
594
|
+
|
|
572
595
|
## Anti-Patterns
|
|
573
596
|
|
|
574
597
|
| 错误 | 正确 |
|