@boyingliu01/xp-gate 0.7.0 → 0.7.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 +4 -9
- package/lib/__tests__/audit-log.test.ts +107 -0
- package/lib/__tests__/detect-deps.test.js +179 -42
- package/lib/__tests__/doctor.test.js +1 -0
- package/lib/__tests__/gate-audit.test.ts +59 -0
- package/lib/__tests__/init.test.js +15 -0
- package/lib/__tests__/install-skill.test.js +1 -45
- package/lib/__tests__/ui-detector.test.ts +122 -8
- package/lib/__tests__/ui-review.test.ts +119 -0
- package/lib/__tests__/uninstall.test.js +1 -0
- package/lib/detect-deps.js +178 -37
- package/lib/doctor.js +7 -9
- package/lib/gate-audit.ts +26 -42
- package/lib/init.js +42 -13
- package/lib/install-skill.js +20 -48
- package/lib/rollback.js +1 -16
- package/lib/shared-paths.js +30 -0
- package/lib/shared-utils.js +25 -0
- package/lib/ui-detector.ts +3 -3
- package/lib/ui-review.ts +58 -53
- package/lib/uninstall.js +8 -9
- package/package.json +1 -1
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/skills/delphi-review/SKILL.md +112 -77
- package/skills/ralph-loop/SKILL.md +165 -34
- package/skills/sprint-flow/SKILL.md +428 -105
- package/skills/sprint-flow/references/components/skill-invocations.md +1 -1
- package/skills/sprint-flow/references/components/tool-descriptions.md +1 -1
- package/skills/sprint-flow/references/force-levels.md +203 -0
- package/skills/sprint-flow/references/phase-1-plan.md +4 -4
- package/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +20 -1
- package/skills/sprint-flow/templates/auto-estimate-output-template.md +7 -5
- package/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
- package/skills/test-specification-alignment/SKILL.md +98 -24
- package/plugins/qoder/AGENTS.md +0 -93
- package/plugins/qoder/README.md +0 -87
- package/plugins/qoder/widgets/quality-report.html +0 -163
- package/plugins/qoder/widgets/sprint-dashboard.html +0 -172
- package/skills/delphi-review/references/qoder-multi-model.md +0 -191
- package/skills/sprint-flow/references/qoder-adaptation.md +0 -173
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
# Qoder Multi-Model Review Guide for Delphi Review
|
|
2
|
-
|
|
3
|
-
**Version:** v0.6.0
|
|
4
|
-
**Platform:** Qoder IDE
|
|
5
|
-
**Status:** Active
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 1. Overview
|
|
10
|
-
|
|
11
|
-
Delphi Review requires multi-expert anonymous consensus review using at least 2 different LLM providers. In Qoder, this is achieved through Agent subagent dispatch, leveraging Qoder's built-in multi-model capability.
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## 2. Expert Configuration
|
|
16
|
-
|
|
17
|
-
### 2.1 Configuration File
|
|
18
|
-
|
|
19
|
-
Create `.qoder/delphi-config.json` in project root:
|
|
20
|
-
|
|
21
|
-
```json
|
|
22
|
-
{
|
|
23
|
-
"experts": {
|
|
24
|
-
"A": {
|
|
25
|
-
"role": "architecture",
|
|
26
|
-
"focus": "System design, scalability, maintainability, SOLID principles",
|
|
27
|
-
"model_hint": "deepseek-v4-pro"
|
|
28
|
-
},
|
|
29
|
-
"B": {
|
|
30
|
-
"role": "implementation",
|
|
31
|
-
"focus": "Code quality, testing strategy, error handling, performance",
|
|
32
|
-
"model_hint": "kimi-k2.6"
|
|
33
|
-
},
|
|
34
|
-
"C": {
|
|
35
|
-
"role": "feasibility",
|
|
36
|
-
"focus": "Practical constraints, timeline, team capability, risk assessment",
|
|
37
|
-
"model_hint": "qwen3.6-plus"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
"consensus_threshold": 0.95,
|
|
41
|
-
"max_rounds": 5,
|
|
42
|
-
"providers_required": 2
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### 2.2 Model Selection Rules
|
|
47
|
-
|
|
48
|
-
- Experts MUST come from **at least 2 different providers**
|
|
49
|
-
- **Forbidden**: Anthropic, OpenAI, Google (foreign models)
|
|
50
|
-
- **Recommended domestic providers**: DeepSeek, Qwen (Alibaba), Kimi (Moonshot), GLM (Zhipu), MiniMax
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## 3. Execution Flow in Qoder
|
|
55
|
-
|
|
56
|
-
### 3.1 Round 1: Independent Anonymous Review
|
|
57
|
-
|
|
58
|
-
For each expert, dispatch an Agent subagent with the expert's specific prompt:
|
|
59
|
-
|
|
60
|
-
**Expert A (Architecture) — plan-agent**:
|
|
61
|
-
```
|
|
62
|
-
Agent(subagent_type="plan-agent", prompt="""
|
|
63
|
-
You are Expert A in a Delphi consensus review. Your role: Architecture Reviewer.
|
|
64
|
-
Focus: System design, scalability, maintainability, SOLID principles.
|
|
65
|
-
|
|
66
|
-
Review the following design/code and provide your assessment:
|
|
67
|
-
[REVIEW MATERIAL]
|
|
68
|
-
|
|
69
|
-
Output format:
|
|
70
|
-
{
|
|
71
|
-
"expert_id": "A",
|
|
72
|
-
"verdict": "APPROVED|REQUEST_CHANGES|REJECTED",
|
|
73
|
-
"issues": [...],
|
|
74
|
-
"strengths": [...],
|
|
75
|
-
"suggestions": [...]
|
|
76
|
-
}
|
|
77
|
-
""")
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
**Expert B (Implementation) — CodeReview subagent**:
|
|
81
|
-
```
|
|
82
|
-
Agent(subagent_type="CodeReview", prompt="""
|
|
83
|
-
You are Expert B in a Delphi consensus review. Your role: Implementation Reviewer.
|
|
84
|
-
Focus: Code quality, testing strategy, error handling, performance.
|
|
85
|
-
|
|
86
|
-
Review the following code changes:
|
|
87
|
-
[CHANGED FILES]
|
|
88
|
-
""")
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
**Expert C (Feasibility) — plan-agent**:
|
|
92
|
-
```
|
|
93
|
-
Agent(subagent_type="plan-agent", prompt="""
|
|
94
|
-
You are Expert C in a Delphi consensus review. Your role: Feasibility Arbiter.
|
|
95
|
-
Focus: Practical constraints, timeline, team capability, risk assessment.
|
|
96
|
-
|
|
97
|
-
Review the following design/code and provide your assessment:
|
|
98
|
-
[REVIEW MATERIAL]
|
|
99
|
-
|
|
100
|
-
Output format:
|
|
101
|
-
{
|
|
102
|
-
"expert_id": "C",
|
|
103
|
-
"verdict": "APPROVED|REQUEST_CHANGES|REJECTED",
|
|
104
|
-
...
|
|
105
|
-
}
|
|
106
|
-
""")
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### 3.2 Consensus Aggregation
|
|
110
|
-
|
|
111
|
-
After all experts respond:
|
|
112
|
-
1. Parse each expert's JSON output
|
|
113
|
-
2. Compare verdicts:
|
|
114
|
-
- All APPROVED → **Consensus: APPROVED**
|
|
115
|
-
- All REQUEST_CHANGES → Merge issues, present to user
|
|
116
|
-
- Mixed verdicts → **No consensus**, proceed to Round 2
|
|
117
|
-
3. Calculate issue consensus ratio: issues agreed by ≥95% of experts → resolved
|
|
118
|
-
|
|
119
|
-
### 3.3 Round 2+: Controlled Feedback
|
|
120
|
-
|
|
121
|
-
In subsequent rounds, each expert receives other experts' anonymized opinions:
|
|
122
|
-
```
|
|
123
|
-
Agent(subagent_type="plan-agent", prompt="""
|
|
124
|
-
You are Expert A. In Round 1, your verdict was: REQUEST_CHANGES.
|
|
125
|
-
Other experts' anonymized feedback:
|
|
126
|
-
- Expert X: APPROVED, noted [strengths]
|
|
127
|
-
- Expert Y: REQUEST_CHANGES, noted [issues]
|
|
128
|
-
|
|
129
|
-
Review your assessment in light of others' feedback. Maintain your independence.
|
|
130
|
-
[REVIEW MATERIAL]
|
|
131
|
-
""")
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### 3.4 Terminal States
|
|
135
|
-
|
|
136
|
-
| Condition | Action |
|
|
137
|
-
|-----------|--------|
|
|
138
|
-
| All experts APPROVED + ≥95% issue consensus | **APPROVED** — write `.sprint-state/delphi-reviewed.json` |
|
|
139
|
-
| Max rounds reached without consensus | **REJECTED** — present disagreement summary |
|
|
140
|
-
| Any expert REJECTED with critical issues | **REQUEST_CHANGES** — user must fix and re-review |
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## 4. Degraded Mode
|
|
145
|
-
|
|
146
|
-
When multi-model subagent dispatch is unavailable:
|
|
147
|
-
|
|
148
|
-
### 4.1 Single-Model Multi-Role Mode
|
|
149
|
-
|
|
150
|
-
The orchestrator plays all expert roles sequentially with different prompts:
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
⚠️ [DEGRADED] 单模型多角色模式
|
|
154
|
-
失去跨 provider 匿名性保护,但保留多视角评审结构。
|
|
155
|
-
建议:在条件允许时恢复多模型模式重新评审。
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### 4.2 Degraded Output Format
|
|
159
|
-
|
|
160
|
-
```json
|
|
161
|
-
{
|
|
162
|
-
"mode": "design",
|
|
163
|
-
"verdict": "APPROVED",
|
|
164
|
-
"degraded": true,
|
|
165
|
-
"degradation_reason": "Multi-model subagent unavailable",
|
|
166
|
-
"experts": ["A", "B", "C"],
|
|
167
|
-
"model": "single"
|
|
168
|
-
}
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
## 5. Integration with Sprint Flow
|
|
174
|
-
|
|
175
|
-
### 5.1 Phase 1 (Design Review)
|
|
176
|
-
|
|
177
|
-
- Default: 2 experts (A + B)
|
|
178
|
-
- Complex designs: 3 experts (A + B + C)
|
|
179
|
-
- Output: `.sprint-state/delphi-reviewed.json` + `specification.yaml`
|
|
180
|
-
|
|
181
|
-
### 5.2 Phase 3 (Code Walkthrough)
|
|
182
|
-
|
|
183
|
-
- Default: 2 experts (A + B)
|
|
184
|
-
- Use `CodeReview` subagent for Expert B
|
|
185
|
-
- Output: `.code-walkthrough-result.json`
|
|
186
|
-
|
|
187
|
-
### 5.3 HARD-GATE Enforcement
|
|
188
|
-
|
|
189
|
-
- Phase 2 BUILD cannot start until delphi-review verdict is APPROVED
|
|
190
|
-
- In Qoder: Pre-Edit Gate checks `.sprint-state/delphi-reviewed.json`
|
|
191
|
-
- See sprint-flow SKILL.md for Pre-Edit Gate details
|
|
@@ -1,173 +0,0 @@
|
|
|
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 |
|