@boyingliu01/xp-gate 0.7.0 → 0.8.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 +4 -9
- package/lib/__tests__/audit-log.test.ts +107 -0
- package/lib/__tests__/detect-deps.test.js +212 -42
- package/lib/__tests__/doctor.test.js +1 -0
- package/lib/__tests__/gate-audit.test.ts +59 -0
- package/lib/__tests__/init.test.js +47 -1
- package/lib/__tests__/install-skill.test.js +1 -45
- package/lib/__tests__/ui-detector.test.ts +186 -26
- package/lib/__tests__/ui-review.test.ts +119 -0
- package/lib/__tests__/uninstall.test.js +1 -0
- package/lib/detect-deps.js +180 -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 +20 -14
- 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/plugins/claude-code/skills/admin-template-guidelines/SKILL.md +904 -0
- package/plugins/claude-code/skills/delphi-review/.delphi-config.json.example +45 -0
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +66 -0
- package/plugins/claude-code/skills/delphi-review/INSTALL.md +152 -0
- package/plugins/claude-code/skills/delphi-review/SKILL.md +454 -0
- package/plugins/claude-code/skills/delphi-review/opencode.json.delphi.example +56 -0
- package/plugins/claude-code/skills/delphi-review/references/code-walkthrough.md +486 -0
- package/plugins/claude-code/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/plugins/claude-code/skills/ralph-loop/SKILL.md +501 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/memory.md +55 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/middleware.md +54 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/skill-invocations.md +39 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/system-prompt.md +24 -0
- package/plugins/claude-code/skills/ralph-loop/references/components/tool-descriptions.md +32 -0
- package/plugins/claude-code/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
- package/plugins/claude-code/skills/ralph-loop/templates/progress-log.md +36 -0
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +68 -0
- package/plugins/claude-code/skills/sprint-flow/SKILL.md +1248 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/memory.md +87 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/middleware.md +72 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/skill-invocations.md +104 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/system-prompt.md +27 -0
- package/plugins/claude-code/skills/sprint-flow/references/components/tool-descriptions.md +96 -0
- package/plugins/claude-code/skills/sprint-flow/references/force-levels.md +203 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-0-think.md +115 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-1-plan.md +178 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-2-build.md +198 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-3-review.md +213 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-4-uat.md +125 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-5-feedback.md +100 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-6-ship.md +193 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-7-land.md +140 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-8-cleanup.md +192 -0
- package/plugins/claude-code/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +257 -0
- package/plugins/claude-code/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
- package/plugins/claude-code/skills/sprint-flow/templates/auto-estimate-output-template.md +132 -0
- package/plugins/claude-code/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
- package/plugins/claude-code/skills/sprint-flow/templates/pain-document-template.md +115 -0
- package/plugins/claude-code/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
- package/plugins/claude-code/skills/sprint-flow/templates/sprint-summary-template.md +120 -0
- package/plugins/claude-code/skills/test-driven-development/SKILL.md +71 -0
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +56 -0
- package/plugins/claude-code/skills/test-specification-alignment/SKILL.md +702 -0
- package/plugins/claude-code/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
- package/plugins/claude-code/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
- package/plugins/claude-code/skills/test-specification-alignment/references/specification-format.md +348 -0
- package/plugins/claude-code/skills/to-issues/SKILL.md +277 -0
- package/plugins/opencode/README.md +38 -0
- package/plugins/opencode/index.ts +85 -0
- package/plugins/opencode/package.json +18 -0
- package/plugins/opencode/skills/admin-template-guidelines/SKILL.md +904 -0
- package/plugins/opencode/skills/delphi-review/.delphi-config.json.example +45 -0
- package/plugins/opencode/skills/delphi-review/AGENTS.md +66 -0
- package/plugins/opencode/skills/delphi-review/INSTALL.md +152 -0
- package/plugins/opencode/skills/delphi-review/SKILL.md +454 -0
- package/plugins/opencode/skills/delphi-review/opencode.json.delphi.example +56 -0
- package/plugins/opencode/skills/delphi-review/references/code-walkthrough.md +486 -0
- package/plugins/opencode/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/plugins/opencode/skills/ralph-loop/SKILL.md +501 -0
- package/plugins/opencode/skills/ralph-loop/references/components/memory.md +55 -0
- package/plugins/opencode/skills/ralph-loop/references/components/middleware.md +54 -0
- package/plugins/opencode/skills/ralph-loop/references/components/skill-invocations.md +39 -0
- package/plugins/opencode/skills/ralph-loop/references/components/system-prompt.md +24 -0
- package/plugins/opencode/skills/ralph-loop/references/components/tool-descriptions.md +32 -0
- package/plugins/opencode/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
- package/plugins/opencode/skills/ralph-loop/templates/progress-log.md +36 -0
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +68 -0
- package/plugins/opencode/skills/sprint-flow/SKILL.md +1248 -0
- package/plugins/opencode/skills/sprint-flow/references/components/memory.md +87 -0
- package/plugins/opencode/skills/sprint-flow/references/components/middleware.md +72 -0
- package/plugins/opencode/skills/sprint-flow/references/components/skill-invocations.md +104 -0
- package/plugins/opencode/skills/sprint-flow/references/components/system-prompt.md +27 -0
- package/plugins/opencode/skills/sprint-flow/references/components/tool-descriptions.md +96 -0
- package/plugins/opencode/skills/sprint-flow/references/force-levels.md +203 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-0-think.md +115 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-1-plan.md +178 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-2-build.md +198 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-3-review.md +213 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-4-uat.md +125 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-5-feedback.md +100 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-6-ship.md +193 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-7-land.md +140 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-8-cleanup.md +192 -0
- package/plugins/opencode/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +257 -0
- package/plugins/opencode/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
- package/plugins/opencode/skills/sprint-flow/templates/auto-estimate-output-template.md +132 -0
- package/plugins/opencode/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
- package/plugins/opencode/skills/sprint-flow/templates/pain-document-template.md +115 -0
- package/plugins/opencode/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
- package/plugins/opencode/skills/sprint-flow/templates/sprint-summary-template.md +120 -0
- package/plugins/opencode/skills/test-driven-development/SKILL.md +71 -0
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +56 -0
- package/plugins/opencode/skills/test-specification-alignment/SKILL.md +702 -0
- package/plugins/opencode/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
- package/plugins/opencode/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
- package/plugins/opencode/skills/test-specification-alignment/references/specification-format.md +348 -0
- package/plugins/opencode/skills/to-issues/SKILL.md +277 -0
- package/plugins/opencode/tsconfig.json +15 -0
- package/plugins/qoder/skills/admin-template-guidelines/SKILL.md +904 -0
- package/plugins/qoder/skills/delphi-review/.delphi-config.json.example +45 -0
- package/plugins/qoder/skills/delphi-review/AGENTS.md +66 -0
- package/plugins/qoder/skills/delphi-review/INSTALL.md +152 -0
- package/plugins/qoder/skills/delphi-review/SKILL.md +454 -0
- package/plugins/qoder/skills/delphi-review/opencode.json.delphi.example +56 -0
- package/plugins/qoder/skills/delphi-review/references/code-walkthrough.md +486 -0
- package/plugins/qoder/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/plugins/qoder/skills/ralph-loop/SKILL.md +501 -0
- package/plugins/qoder/skills/ralph-loop/references/components/memory.md +55 -0
- package/plugins/qoder/skills/ralph-loop/references/components/middleware.md +54 -0
- package/plugins/qoder/skills/ralph-loop/references/components/skill-invocations.md +39 -0
- package/plugins/qoder/skills/ralph-loop/references/components/system-prompt.md +24 -0
- package/plugins/qoder/skills/ralph-loop/references/components/tool-descriptions.md +32 -0
- package/plugins/qoder/skills/ralph-loop/references/phase-2-build-ralph.md +89 -0
- package/plugins/qoder/skills/ralph-loop/templates/progress-log.md +36 -0
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +68 -0
- package/plugins/qoder/skills/sprint-flow/SKILL.md +1248 -0
- package/plugins/qoder/skills/sprint-flow/references/components/memory.md +87 -0
- package/plugins/qoder/skills/sprint-flow/references/components/middleware.md +72 -0
- package/plugins/qoder/skills/sprint-flow/references/components/skill-invocations.md +104 -0
- package/plugins/qoder/skills/sprint-flow/references/components/system-prompt.md +27 -0
- package/plugins/qoder/skills/sprint-flow/references/components/tool-descriptions.md +96 -0
- package/plugins/qoder/skills/sprint-flow/references/force-levels.md +203 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-0-think.md +115 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-1-plan.md +178 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-2-build.md +198 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-3-review.md +213 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-4-uat.md +125 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-5-feedback.md +100 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-6-ship.md +193 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-7-land.md +140 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-8-cleanup.md +192 -0
- package/plugins/qoder/skills/sprint-flow/references/phase-minus-0-5-auto-estimate.md +257 -0
- package/plugins/qoder/skills/sprint-flow/templates/auto-estimate-learning-log.md +136 -0
- package/plugins/qoder/skills/sprint-flow/templates/auto-estimate-output-template.md +132 -0
- package/plugins/qoder/skills/sprint-flow/templates/emergent-issues-template.md +120 -0
- package/plugins/qoder/skills/sprint-flow/templates/pain-document-template.md +115 -0
- package/plugins/qoder/skills/sprint-flow/templates/sprint-progress-template.md +151 -0
- package/plugins/qoder/skills/sprint-flow/templates/sprint-summary-template.md +120 -0
- package/plugins/qoder/skills/test-driven-development/SKILL.md +71 -0
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +56 -0
- package/plugins/qoder/skills/test-specification-alignment/SKILL.md +702 -0
- package/plugins/qoder/skills/test-specification-alignment/references/alignment-verification-algorithm.md +493 -0
- package/plugins/qoder/skills/test-specification-alignment/references/phase2-constraint-enforcement.md +431 -0
- package/plugins/qoder/skills/test-specification-alignment/references/specification-format.md +348 -0
- package/plugins/qoder/skills/to-issues/SKILL.md +277 -0
- package/skills/admin-template-guidelines/SKILL.md +904 -0
- package/skills/delphi-review/SKILL.md +112 -77
- package/skills/improve-codebase-architecture/SKILL.md +156 -0
- package/skills/ralph-loop/SKILL.md +165 -34
- package/skills/sprint-flow/SKILL.md +448 -107
- 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-driven-development/SKILL.md +71 -0
- package/skills/test-specification-alignment/SKILL.md +98 -24
- package/skills/to-issues/SKILL.md +277 -0
- 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/evals/evals.json +0 -82
- package/skills/delphi-review/references/qoder-multi-model.md +0 -191
- package/skills/ralph-loop/evals/evals.json +0 -311
- package/skills/ralph-loop/evolution-history.json +0 -59
- package/skills/ralph-loop/evolution-log.md +0 -16
- package/skills/sprint-flow/evals/evals.json +0 -130
- package/skills/sprint-flow/evolution-history.json +0 -39
- package/skills/sprint-flow/evolution-log.md +0 -23
- package/skills/sprint-flow/references/qoder-adaptation.md +0 -173
- package/skills/test-specification-alignment/evals/evals.json +0 -75
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: test-specification-alignment
|
|
3
|
-
description: "
|
|
3
|
+
description: "Use when asked to run tests, verify tests, align tests with specification.yaml, before BUILD verification, or before release/ship."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Test-Specification Alignment Engine
|
|
7
7
|
|
|
8
|
+
## Workflow Steps
|
|
9
|
+
|
|
10
|
+
1. **Load Phase 0** — Verify `specification.yaml` and `tests/` directory exist; BLOCK if missing with clear guidance to complete brainstorming → delphi-review → specification-generator flow first
|
|
11
|
+
2. **Phase 1 Alignment (Modify Allowed)** — Parse specification.yaml (YAML) + test files (AST); validate alignment rules; generate alignment report; optionally fix tests to align with requirements; require score ≥80% to proceed
|
|
12
|
+
3. **Coverage Mapping** — Map each REQ-* to at least one test case with `@test` annotation; map each AC-* to at least one assertion; verify test intent declarations (`@test`, `@intent`, `@covers` tags)
|
|
13
|
+
4. **Pre-Phase 2 Freeze** — Invoke `/freeze` skill to lock test directories (`tests/`, `test/`, `__tests__/`, `*.test.ts`, `*.spec.ts`, `*_test.py`, etc.); return confirmation before proceeding
|
|
14
|
+
5. **Phase 2 Execution (Frozen)** — Run all tests; Agent is BLOCKED from modifying/deleting/skipping tests; analyze failures into 4 categories: BUSINESS_CODE_ERROR, TEST_DATA_ERROR, SPECIFICATION_ERROR, ENVIRONMENT_ERROR; SPECIFICATION_ERROR requires ESCALATE_TO_HUMAN
|
|
15
|
+
6. **Failure Classification** — For each failing test, output classification in mandatory format with Type, Test, Root Cause, Action fields; if SPECIFICATION_ERROR detected, offer user options (A: fix spec → re-Phase 1, B: confirm spec → modify code, C: clarify ambiguity)
|
|
16
|
+
7. **JSON Report Output** — Generate alignment report as valid JSON with fields: `alignment_status` (PASS|FAIL|BLOCKED), `phase` (1|2), `score`, `misaligned_tests[]`, `anti_pattern_detected`, `errors[]`; Terminal State: ✅ ALL_TESTS_PASS
|
|
17
|
+
|
|
8
18
|
## 核心原则
|
|
9
19
|
|
|
10
20
|
**测试是系统的防护网,也是系统的使用手册。测试必须准确反映原始需求和设计方案。**
|
|
@@ -37,6 +47,89 @@ Alignment report MUST be output as valid JSON:
|
|
|
37
47
|
|
|
38
48
|
---
|
|
39
49
|
|
|
50
|
+
## Triggers
|
|
51
|
+
|
|
52
|
+
### Automatic Triggers
|
|
53
|
+
- BUILD (TDD + review) Round 1 after Driver outputs tests
|
|
54
|
+
- Gate 1 verification before proceeding
|
|
55
|
+
- gstack-ship release before deployment
|
|
56
|
+
|
|
57
|
+
### Manual Triggers
|
|
58
|
+
- `/test-specification-alignment` command
|
|
59
|
+
- `/verify-tests` command
|
|
60
|
+
- "run tests" phrase
|
|
61
|
+
- "verify tests" phrase
|
|
62
|
+
- before gstack-ship
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Scope
|
|
67
|
+
|
|
68
|
+
### IN Scope
|
|
69
|
+
- Validation of test alignment against `specification.yaml` (Requirements, User Stories, Acceptance Criteria)
|
|
70
|
+
- Phase 1: Test modification to improve alignment (add missing tests, fix annotations, correct intent)
|
|
71
|
+
- Phase 2: Test execution with frozen test files (no modifications allowed)
|
|
72
|
+
- Failure classification into BUSINESS_CODE_ERROR, TEST_DATA_ERROR, SPECIFICATION_ERROR, ENVIRONMENT_ERROR
|
|
73
|
+
- JSON report generation with alignment status, score, misaligned tests, and errors
|
|
74
|
+
|
|
75
|
+
### OUT Scope
|
|
76
|
+
- Modifying `specification.yaml` during Phase 2 (requires ESCALATE_TO_HUMAN)
|
|
77
|
+
- Skipping or deleting tests to make tests pass
|
|
78
|
+
- Modifying test assertions to force tests to pass
|
|
79
|
+
- Business logic implementation (handled by BUILD phase)
|
|
80
|
+
- Environment configuration issues (handled separately)
|
|
81
|
+
|
|
82
|
+
### Boundaries
|
|
83
|
+
- **Start**: After BUILD (TDD + review) Round 1 outputs tests
|
|
84
|
+
- **End**: Terminal State ✅ ALL_TESTS_PASS or ESCALATE_TO_HUMAN for specification issues
|
|
85
|
+
- **Inputs**: `specification.yaml`, `tests/` directory
|
|
86
|
+
- **Outputs**: Alignment report (JSON), test execution report, failure classification
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Examples
|
|
91
|
+
|
|
92
|
+
### Example 1: Normal Trigger (Should Execute)
|
|
93
|
+
**User Input**: "run tests for login feature" or `/test-specification-alignment`
|
|
94
|
+
|
|
95
|
+
**Expected Flow**:
|
|
96
|
+
1. Load Phase 0: Check `specification.yaml` exists → ✅ Found
|
|
97
|
+
2. Check `tests/` directory exists → ✅ Found
|
|
98
|
+
3. Phase 1: Parse spec and tests → Alignment score 85% → ✅ Pass threshold
|
|
99
|
+
4. Pre-Phase 2: Call `/freeze tests/` → ✅ Locked
|
|
100
|
+
5. Phase 2: Run tests → 12 passed, 0 failed → ✅ ALL_TESTS_PASS
|
|
101
|
+
6. Output JSON report with `alignment_status: "PASS"`, `phase: "2"`, `score: 85`
|
|
102
|
+
7. Call `/unfreeze tests/` → ✅ Unlocked
|
|
103
|
+
8. Terminal State: ✅ Test-specification-alignment complete
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
### Example 2: Should NOT Trigger (Missing Specification)
|
|
108
|
+
**User Input**: "run tests" in a project without `specification.yaml`
|
|
109
|
+
|
|
110
|
+
**Expected Flow**:
|
|
111
|
+
1. Load Phase 0: Check `specification.yaml` exists → ❌ Not Found
|
|
112
|
+
2. BLOCK with message:
|
|
113
|
+
```
|
|
114
|
+
❌ BLOCKED: specification.yaml 不存在
|
|
115
|
+
|
|
116
|
+
要生成 specification.yaml,请先完成需求流程:
|
|
117
|
+
|
|
118
|
+
流程步骤:
|
|
119
|
+
1. brainstorming → 需求探索,生成设计文档
|
|
120
|
+
2. delphi-review → 需求评审 (多轮直到 APPROVED)
|
|
121
|
+
3. spec 自动生成 (从 APPROVED 设计文档提取 specification.yaml)
|
|
122
|
+
|
|
123
|
+
为什么必须这样?
|
|
124
|
+
- 在 delphi-review APPROVED 后生成,避免设计文档修改时 spec 也需重新生成
|
|
125
|
+
- 遵循"问题发现越早修复成本越低"原则
|
|
126
|
+
|
|
127
|
+
请先完成上述流程,然后再运行 test-specification-alignment。
|
|
128
|
+
```
|
|
129
|
+
3. Terminal State: ❌ BLOCKED_MISSING_SPECIFICATION
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
40
133
|
## 触发条件
|
|
41
134
|
|
|
42
135
|
### 自动触发
|
|
@@ -569,29 +662,6 @@ legacy_mode:
|
|
|
569
662
|
|
|
570
663
|
---
|
|
571
664
|
|
|
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
|
-
|
|
595
665
|
## Anti-Patterns
|
|
596
666
|
|
|
597
667
|
| 错误 | 正确 |
|
|
@@ -611,6 +681,10 @@ legacy_mode:
|
|
|
611
681
|
|------|------|------|
|
|
612
682
|
| V1.0 | 2026-04-06 | 初始设计 |
|
|
613
683
|
| V2.0 | 2026-04-06 | Delphi Review 共识版本 |
|
|
684
|
+
| V2.1 | 2026-06-02 | Added parser-friendly sections: Workflow Steps (7 steps), Triggers (5+ phrases), Scope (IN/OUT/Boundaries), Examples (2 scenarios) |
|
|
685
|
+
|
|
686
|
+
---
|
|
687
|
+
|
|
614
688
|
## Output Format (MANDATORY)
|
|
615
689
|
Alignment report MUST be output as valid JSON:
|
|
616
690
|
```json
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: to-issues
|
|
3
|
+
description: Break a plan, spec, or PRD into independently-grabbable issues using tracer-bullet vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, or break down work into vertical slices. Integrates with XP-Gate sprint-flow Phase 1.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# To Issues — Vertical Slice Breakdown
|
|
7
|
+
|
|
8
|
+
将 PRD / specification.yaml / 设计文档拆解为 **独立的垂直切片 Issue**,每个切片是贯穿所有层的 **tracer bullet**,而非水平分层切片。
|
|
9
|
+
|
|
10
|
+
核心理念:每个 Issue 交付一条**狭窄但完整**的端到端路径(schema → API → UI → tests),完成后即可独立演示并通过质量门禁。
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 术语(强制一致使用)
|
|
15
|
+
|
|
16
|
+
| 术语 | 定义 |
|
|
17
|
+
|------|------|
|
|
18
|
+
| **Vertical Slice** | 贯穿所有层(数据、API、UI、测试)的薄路径,交付端到端行为 |
|
|
19
|
+
| **Tracer Bullet** | 第一条完整的垂直切片,优先拆解以快速暴露 unknown unknowns |
|
|
20
|
+
| **HITL** | Human-In-The-Loop — 需要人工决策(架构选择、设计评审)才能继续 |
|
|
21
|
+
| **AFK** | Away-From-Keyboard — 可完全由 agent 自主实现并合并 |
|
|
22
|
+
| **Blocking** | 依赖关系:此切片必须在哪些切片完成后才能开始 |
|
|
23
|
+
| **Deep Module** | 封装大量功能于简单接口背后的模块(XP-Gate Principles 概念) |
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 输入
|
|
28
|
+
|
|
29
|
+
- PRD 文件路径,或
|
|
30
|
+
- `specification.yaml`,或
|
|
31
|
+
- 最近对话中的设计文档(项目配置的 spec 路径,默认 `docs/superpowers/specs/*.md`)
|
|
32
|
+
|
|
33
|
+
## 输出(Machine-Readable)
|
|
34
|
+
|
|
35
|
+
### 1. 文本输出
|
|
36
|
+
|
|
37
|
+
- 一组垂直切片 Issue(GitHub Issue / 本地 `.issues/*.md` / 用户指定的 issue tracker 格式)
|
|
38
|
+
- 依赖关系图(拓扑排序后的执行顺序)
|
|
39
|
+
|
|
40
|
+
### 2. JSON Output Contract(供 ralph-loop / sprint-flow 下游消费)
|
|
41
|
+
|
|
42
|
+
写入 `.sprint-state/slices-manifest.json`:
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"version": 1,
|
|
47
|
+
"source": "specification.yaml 或 spec 文件路径",
|
|
48
|
+
"slices": [
|
|
49
|
+
{
|
|
50
|
+
"id": "slice-N",
|
|
51
|
+
"title": "一句话描述端到端行为",
|
|
52
|
+
"type": "HITL | AFK",
|
|
53
|
+
"blocked_by": ["slice-M"] | [],
|
|
54
|
+
"parent_story": "User Story 编号",
|
|
55
|
+
"what_it_delivers": "端到端行为描述",
|
|
56
|
+
"acceptance_criteria": ["标准1", "标准2", "标准3"],
|
|
57
|
+
"effort": "S | M | L",
|
|
58
|
+
"loc_budget": 200,
|
|
59
|
+
"file_budget": 20,
|
|
60
|
+
"status": "pending"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"execution_order": ["slice-1", "slice-2", "slice-3"],
|
|
64
|
+
"dependency_graph": {
|
|
65
|
+
"slice-1": [],
|
|
66
|
+
"slice-2": ["slice-1"],
|
|
67
|
+
"slice-3": ["slice-1"]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## 流程
|
|
75
|
+
|
|
76
|
+
### 1. 收集上下文
|
|
77
|
+
|
|
78
|
+
从当前对话或输入的 PRD/spec 中提取:
|
|
79
|
+
- 需求列表 / User Stories
|
|
80
|
+
- 系统模块 / 架构设计
|
|
81
|
+
- 技术约束(语言、框架、数据库)
|
|
82
|
+
|
|
83
|
+
如果输入中包含 CONTEXT.md 或 ADRs,读取并尊重其中的领域术语和架构决策。
|
|
84
|
+
|
|
85
|
+
**PRD 完整性检查(降级规则)**:
|
|
86
|
+
```
|
|
87
|
+
IF PRD 缺少关键内容:
|
|
88
|
+
- 缺少数据模型 / schema 定义 → 标注所有数据相关切片为 HITL
|
|
89
|
+
- 缺少 API 契约 → 标注所有 API 相关切片为 HITL
|
|
90
|
+
- 缺少 UI 设计 / 交互说明 → 标注所有 UI 相关切片为 HITL
|
|
91
|
+
- 缺少验收标准 → 标注整体验证切片为 HITL
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 2. 探索代码库
|
|
95
|
+
|
|
96
|
+
**Brownfield 项目(已存在代码)— 必须执行**:
|
|
97
|
+
- 读取 AGENTS.md CODE MAP + 目录结构
|
|
98
|
+
- 检查已有模块边界、路由定义、DB 模式
|
|
99
|
+
- 确认测试覆盖现状
|
|
100
|
+
|
|
101
|
+
**Greenfield 项目(新项目)— 可选**:
|
|
102
|
+
- 若为全新项目,跳过此步骤
|
|
103
|
+
- 建议采用 schema-first 切片顺序(先 DB schema → 再 API → 再 UI)
|
|
104
|
+
|
|
105
|
+
### 3. 起草垂直切片
|
|
106
|
+
|
|
107
|
+
将需求拆解为 **tracer bullet** 切片。规则:
|
|
108
|
+
|
|
109
|
+
- 每个切片交付**一条狭窄但完整**的端到端路径
|
|
110
|
+
- **优先 unknown unknowns**:优先拆解能快速暴露不确定因素的切片
|
|
111
|
+
- **切片必须可独立演示并完整通过 6 道质量门禁**(Code Quality + Dup Code + Complexity + Principles + Tests + Architecture)
|
|
112
|
+
- **标注依赖**:明确哪些切片阻塞哪些切片
|
|
113
|
+
- **识别 Deep Module 机会**:拆解时主动提出可封装为 deep module 的模块边界
|
|
114
|
+
|
|
115
|
+
**范围控制(硬上限)**:
|
|
116
|
+
| 约束 | 阈值 | 超限处理 |
|
|
117
|
+
|------|------|---------|
|
|
118
|
+
| 切片总数 | ≤15 / 功能模块 | 超过 → 按 epic 分组,组内拓扑排序 |
|
|
119
|
+
| 单切片变更量 | ≤200 LOC 或 ≤20 文件 | 超过 → 拆分为子切片 |
|
|
120
|
+
| 单切片工作量 | ≤4h 开发时间 | 超过 → 拆分为子切片 |
|
|
121
|
+
|
|
122
|
+
### 4. HITL / AFK 分类
|
|
123
|
+
|
|
124
|
+
**判定规则**(满足任一条件即为对应类型):
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
HITL 条件:
|
|
128
|
+
- 涉及架构决策(数据库选型、API 风格、auth 方案)
|
|
129
|
+
- 涉及 UI/UX 设计选择(布局、交互、品牌色)
|
|
130
|
+
- 涉及第三方服务集成选型(支付、短信、OAuth provider)
|
|
131
|
+
- PRD 降级规则触发(见步骤 1)
|
|
132
|
+
|
|
133
|
+
AFK 条件(必须同时满足全部):
|
|
134
|
+
- 纯实现、遵循项目中已有模式(如已有 adapter 的 CRUD)
|
|
135
|
+
- 接口契约已在 spec/PRD 中明确定义
|
|
136
|
+
- 无新增外部依赖(第三方 API、新库引入)
|
|
137
|
+
- 测试策略可复用已有测试适配器
|
|
138
|
+
|
|
139
|
+
否则 → HITL(保守默认)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**HITL → AFK 状态机**:
|
|
143
|
+
```
|
|
144
|
+
HITL (创建) → 人工确认 (ADRs / 设计决策产出) → 标记为 AFK-ready → AFK (agent 执行)
|
|
145
|
+
↓
|
|
146
|
+
AFK 执行遇到未预见依赖 → 回退 HITL → BLOCKED
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### 5. 依赖验证
|
|
150
|
+
|
|
151
|
+
在发布前执行以下检查:
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
1. 构建依赖图 (DAG)
|
|
155
|
+
2. 检测循环依赖 (A→B→C→A) → 报错并要求重新拆分
|
|
156
|
+
3. 拓扑排序 → 生成 execution_order
|
|
157
|
+
4. 检查每个切片的 blocked_by 引用是否存在
|
|
158
|
+
5. 验证第一个切片(tracer bullet)无阻塞
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**跨切面关注点处理**:
|
|
162
|
+
Auth、logging、error handling、i18n 等贯穿所有切层的关注点:
|
|
163
|
+
- **首选**:在第一条 tracer bullet(通常是 slice-1)中内置这些横切关注点的基础设施
|
|
164
|
+
- **次选**:作为独立的前置 AFK 切片(如 "slice-0: 基础设施骨架")
|
|
165
|
+
- 不要将这些关注点分散到每个切片中 — 会导致重复实现和不一致
|
|
166
|
+
|
|
167
|
+
### 6. 向用户确认
|
|
168
|
+
|
|
169
|
+
以编号列表呈现拆解结果。每个切片包含:
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
### Slice N: [简短标题]
|
|
173
|
+
- **Type**: HITL / AFK
|
|
174
|
+
- **Effort**: S(~1h) / M(~2h) / L(~4h)
|
|
175
|
+
- **Blocked by**: Slice M / None
|
|
176
|
+
- **Parent Story**: User Story 编号
|
|
177
|
+
- **LOC Budget**: ~N 行
|
|
178
|
+
- **What it delivers**: 一句话描述端到端行为
|
|
179
|
+
- **Acceptance Criteria**: 1-3 条可验证行为
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
询问用户:
|
|
183
|
+
1. 粒度是否合适?(太粗 / 太细 / 正好)
|
|
184
|
+
2. 依赖关系是否正确?
|
|
185
|
+
3. 是否有切片应该合并或拆分?
|
|
186
|
+
4. HITL/AFK 标注是否准确?
|
|
187
|
+
|
|
188
|
+
**最多 2 轮迭代**。超过 2 轮未决则强制收敛:
|
|
189
|
+
- 第一轮:完整列表展示
|
|
190
|
+
- 后续轮次:仅展示变更部分(Diff 视图:新增 / 合并 / 拆分项对比)
|
|
191
|
+
|
|
192
|
+
### 7. 发布切片
|
|
193
|
+
|
|
194
|
+
用户批准后,生成切片 Issue 并写入 `slices-manifest.json`。
|
|
195
|
+
|
|
196
|
+
**GitHub Issue 格式**:
|
|
197
|
+
```markdown
|
|
198
|
+
## Parent
|
|
199
|
+
[父 issue 编号或 PRD 链接]
|
|
200
|
+
|
|
201
|
+
## Slice ID
|
|
202
|
+
slice-N
|
|
203
|
+
|
|
204
|
+
## What to build
|
|
205
|
+
[端到端行为描述,非逐层实现描述]
|
|
206
|
+
|
|
207
|
+
## Acceptance criteria
|
|
208
|
+
- [ ] 标准 1(端到端行为可验证)
|
|
209
|
+
- [ ] 标准 2
|
|
210
|
+
- [ ] 标准 3
|
|
211
|
+
|
|
212
|
+
## Technical Notes
|
|
213
|
+
[可选:接口设计、schema 变更、架构决策]
|
|
214
|
+
|
|
215
|
+
## Blocked by
|
|
216
|
+
[#N - 阻塞 issue 编号 / None — 可以立即开始]
|
|
217
|
+
|
|
218
|
+
## Type / Effort
|
|
219
|
+
[HITL | AFK] / [S | M | L]
|
|
220
|
+
|
|
221
|
+
## Gate-Compliant DoD ⚠️
|
|
222
|
+
此切片完成后必须通过全部 6 道质量门禁:
|
|
223
|
+
- [ ] Gate 1: Code Quality (lint 无错误)
|
|
224
|
+
- [ ] Gate 2: Dup Code (≤5% 相似度)
|
|
225
|
+
- [ ] Gate 3: Complexity (≤5 警告)
|
|
226
|
+
- [ ] Gate 4: Principles (Clean Code + SOLID 零错误)
|
|
227
|
+
- [ ] Gate 5: Tests (全部通过 + ≥80% 覆盖率)
|
|
228
|
+
- [ ] Gate 6: Architecture (无新增警告 + 童子军规则)
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**按拓扑排序顺序发布**:先发布无阻塞的切片,再发布被阻塞的切片。
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## 与 XP-Gate Sprint Flow 集成
|
|
236
|
+
|
|
237
|
+
完整 7 阶段流程中 to-issues 的位置及切片在各阶段的生命周期:
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
Phase 0: THINK → brainstorming → 设计文档 → APPROVED
|
|
241
|
+
Phase 1: PLAN → autoplan → delphi-review → specification.yaml
|
|
242
|
+
→ **/to-issues** → slices-manifest.json + Issue 列表
|
|
243
|
+
Phase 2: BUILD → 按 execution_order 逐个切片执行
|
|
244
|
+
→ 每个切片 = 一个 REQ(ralph-loop 模式)
|
|
245
|
+
→ 或通过 dispatching-parallel-agents 并行(无依赖的 AFK 切片)
|
|
246
|
+
Phase 3: REVIEW → **整体 review**(全部切片完成后统一 code-walkthrough)
|
|
247
|
+
→ browse / QA 验证端到端行为
|
|
248
|
+
Phase 4: USER ACC → 人工验收(全部切片集成后的完整功能)
|
|
249
|
+
Phase 5: FEEDBACK → learn + retro(按切片统计通过率/返工率)
|
|
250
|
+
Phase 6: SHIP → 全部切片合并后一次性 merge(或按 epic 分批 merge)
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**切片与 REQ 的映射**(ralph-loop 模式):
|
|
254
|
+
```
|
|
255
|
+
每个切片 → 生成一个 REQ 实例:
|
|
256
|
+
REQ-N:
|
|
257
|
+
- source_slice: slice-N
|
|
258
|
+
- input: slices-manifest.json 中对应切片的 acceptance_criteria
|
|
259
|
+
- constraints: LOC_budget, file_budget, type (HITL/AFK)
|
|
260
|
+
- output: 通过 6 gates 的增量 diff
|
|
261
|
+
- verification: test-specification-alignment + gate verification
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## Anti-Patterns
|
|
267
|
+
|
|
268
|
+
| ❌ 错误 | ✅ 正确 |
|
|
269
|
+
|---------|---------|
|
|
270
|
+
| 按技术层拆分("先做 DB"、"再做 API"、"最后做 UI") | 按端到端行为拆分("用户可以通过邮箱注册") |
|
|
271
|
+
| 伪装成垂直切片的水平拆分(标题是用户故事,执行时仍分层) | 每个切片的 acceptance criteria 必须包含全层验证 |
|
|
272
|
+
| 切片完成后无法独立演示 | 每个切片必须可验证 + 通过 6 道质量门禁 |
|
|
273
|
+
| 一个切片包含过多用户故事(>2 个) | 一个切片聚焦 1-2 个用户故事 |
|
|
274
|
+
| 忽略或随意标注依赖关系 | 拓扑排序验证 + 循环检测 |
|
|
275
|
+
| HITL 切片被当作 AFK 执行 | 人工输出 ADR/决策后 → 标记 AFK-ready → 执行 |
|
|
276
|
+
| 切片标题模糊("实现功能X") | 切片标题描述行为("用户可通过邮箱注册账号") |
|
|
277
|
+
| 切片超出 200 LOC / 20 文件 / 4h 预算 | 拆分为子切片 |
|
package/plugins/qoder/AGENTS.md
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
# QODER PLUGIN KNOWLEDGE BASE
|
|
2
|
-
|
|
3
|
-
**Generated:** 2026-06-03
|
|
4
|
-
**Version:** v0.6.0
|
|
5
|
-
|
|
6
|
-
## OVERVIEW
|
|
7
|
-
Cross-platform plugin for Qoder IDE — shared skills, Qoder-specific enhancements (genui widgets, Canvas, Memory, CodeReview subagent, browser-use MCP). No hooks.json (Qoder uses skill-embedded gates instead of file-system event hooks).
|
|
8
|
-
|
|
9
|
-
## STRUCTURE
|
|
10
|
-
```
|
|
11
|
-
plugins/qoder/
|
|
12
|
-
├── README.md # Installation and usage guide
|
|
13
|
-
├── AGENTS.md # This knowledge base
|
|
14
|
-
├── skills/ # Auto-populated by build-plugin.sh (8 skills)
|
|
15
|
-
│ ├── sprint-flow/SKILL.md # 7-phase pipeline + Qoder Pre-Edit Gate + Agent mapping
|
|
16
|
-
│ ├── delphi-review/SKILL.md # Multi-expert consensus + Qoder multi-model adaptation
|
|
17
|
-
│ ├── test-specification-alignment/SKILL.md # 2-phase test-spec verification
|
|
18
|
-
│ ├── ralph-loop/SKILL.md # REQ-level iterative build + Memory integration
|
|
19
|
-
│ ├── test-driven-development/SKILL.md # TDD enforcement (zero modification)
|
|
20
|
-
│ ├── improve-codebase-architecture/SKILL.md # Architecture health + Canvas output
|
|
21
|
-
│ ├── to-issues/SKILL.md # Vertical slice issue splitting (zero modification)
|
|
22
|
-
│ └── admin-template-guidelines/SKILL.md # 6 maintainability rules (zero modification)
|
|
23
|
-
├── widgets/ # genui show_widget templates
|
|
24
|
-
│ ├── quality-report.html # Quality gate report dashboard
|
|
25
|
-
│ └── sprint-dashboard.html # Sprint status board
|
|
26
|
-
└── references/
|
|
27
|
-
└── qoder-adaptation.md # Platform differences and adaptation rules
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## WHERE TO LOOK
|
|
31
|
-
| Task | Location | Notes |
|
|
32
|
-
|------|----------|-------|
|
|
33
|
-
| Installation | README.md | User-level (~/.qoder/skills/) and project-level (.qoder/skills/) |
|
|
34
|
-
| Skill adaptations | skills/*/SKILL.md | Qoder-specific paragraphs marked with "Qoder" header |
|
|
35
|
-
| Pre-Edit Gate | skills/sprint-flow/SKILL.md | Replaces Claude Code's delphi-review-guard.sh hook |
|
|
36
|
-
| Multi-model review | skills/delphi-review/references/qoder-multi-model.md | Expert→model mapping via Qoder Agent subagents |
|
|
37
|
-
| Agent dispatch | skills/sprint-flow/SKILL.md | Phase→Qoder Agent mapping table |
|
|
38
|
-
| External skill fallback | skills/sprint-flow/references/qoder-adaptation.md | superpowers/gstack replacements |
|
|
39
|
-
| Quality widget | widgets/quality-report.html | genui show_widget template for Phase 3 results |
|
|
40
|
-
| Sprint widget | widgets/sprint-dashboard.html | genui show_widget template for sprint status |
|
|
41
|
-
| Memory integration | skills/ralph-loop/SKILL.md | UpdateMemory for permanent/contextual learnings |
|
|
42
|
-
| CodeReview | skills/sprint-flow/SKILL.md | Phase 2 step 4 + Phase 3 code walkthrough |
|
|
43
|
-
| Browser MCP | skills/sprint-flow/references/qoder-adaptation.md | browser-use replaces gstack/browse |
|
|
44
|
-
|
|
45
|
-
## CONVENTIONS
|
|
46
|
-
- Plugin skills auto-populated by build-plugin.sh --platform qoder — never edit plugins/qoder/skills/ directly
|
|
47
|
-
- Qoder-specific skill modifications live in source skills/ directory (marked with "## Qoder" sections)
|
|
48
|
-
- No hooks.json — Qoder lacks file-system event hooks; gates embedded in skill instructions
|
|
49
|
-
- genui widgets use show_widget MCP tool with widget_path template mode
|
|
50
|
-
- Memory system replaces gstack/learn for learnings persistence
|
|
51
|
-
- CodeReview subagent replaces superpowers/requesting-code-review
|
|
52
|
-
- browser-use MCP replaces gstack/browse for Phase 3 browser testing
|
|
53
|
-
- External skills (superpowers/gstack) replaced by orchestrator inline execution or Qoder native capabilities
|
|
54
|
-
|
|
55
|
-
## ANTI-PATTERNS (THIS PLUGIN)
|
|
56
|
-
- Do NOT edit plugins/qoder/skills/ directly — rebuild from source via build-plugin.sh
|
|
57
|
-
- Do NOT assume xp-gate CLI is installed — skills must degrade gracefully
|
|
58
|
-
- Do NOT create hooks.json for Qoder — platform does not support file-system event hooks
|
|
59
|
-
- Do NOT use curl for API calls — curl is in Qoder's command deny list; use PowerShell Invoke-RestMethod or Qoder's built-in multi-model capability
|
|
60
|
-
- Do NOT reference OpenCode task() API in Qoder skills — use Agent tool (Browser/CodeReview/plan-agent) instead
|
|
61
|
-
|
|
62
|
-
## UNIQUE STYLES
|
|
63
|
-
- Qoder: SKILL.md + genui widgets + Canvas + Memory + CodeReview subagent + browser-use MCP
|
|
64
|
-
- Pre-Edit Gate: skill-embedded mandatory check replaces Claude Code's physical hook blocking
|
|
65
|
-
- Multi-model review: Qoder Agent subagent dispatch (plan-agent/CodeReview) replaces OpenCode task() API
|
|
66
|
-
- Graceful degradation: skills work even without xp-gate CLI installed
|
|
67
|
-
- Shared skill source: one SKILL.md → copied to Claude Code, OpenCode, and Qoder platforms
|
|
68
|
-
|
|
69
|
-
## COMMANDS
|
|
70
|
-
```bash
|
|
71
|
-
# Build Qoder plugin
|
|
72
|
-
npm run build:qoder-plugin # Build Qoder plugin with all 8 skills
|
|
73
|
-
bash scripts/build-plugin.sh --platform qoder # Same, via script
|
|
74
|
-
|
|
75
|
-
# Install skills
|
|
76
|
-
bash scripts/install-qoder-skills.sh --global # User-level: ~/.qoder/skills/
|
|
77
|
-
bash scripts/install-qoder-skills.sh --local # Project-level: .qoder/skills/
|
|
78
|
-
|
|
79
|
-
# Test plugin
|
|
80
|
-
bash scripts/test-plugins.sh # Includes Qoder platform tests
|
|
81
|
-
|
|
82
|
-
# CLI skill install
|
|
83
|
-
xp-gate install-skill sprint-flow --platform qoder --global
|
|
84
|
-
xp-gate install-skill delphi-review --platform qoder --local
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## NOTES
|
|
88
|
-
- v0.6.0+: Qoder plugin support introduced
|
|
89
|
-
- Qoder plugin: 8 skills (all source skills, including admin-template-guidelines)
|
|
90
|
-
- Claude Code plugin: 7 skills (no admin-template-guidelines)
|
|
91
|
-
- OpenCode plugin: 7 skills + 3 custom tools (gate-check, gate-principles, gate-arch)
|
|
92
|
-
- build-plugin.sh validates 8 expected skills for Qoder platform
|
|
93
|
-
- test-plugins.sh: includes Qoder-specific test cases (widgets, no hooks.json)
|
package/plugins/qoder/README.md
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
# XP-Gate Qoder Plugin
|
|
2
|
-
|
|
3
|
-
Qoder IDE plugin exposing xp-gate quality gates, AI workflow skills, and visual dashboards.
|
|
4
|
-
|
|
5
|
-
## Skills (8 AI Workflow Skills)
|
|
6
|
-
|
|
7
|
-
| Skill | Trigger | Description |
|
|
8
|
-
|-------|---------|-------------|
|
|
9
|
-
| sprint-flow | `/sprint-flow "需求"` | 7-phase pipeline: THINK→PLAN→BUILD→REVIEW→ACCEPT→FEEDBACK→SHIP |
|
|
10
|
-
| delphi-review | `/delphi-review` | Multi-expert anonymous consensus review (design + code-walkthrough) |
|
|
11
|
-
| test-specification-alignment | `/test-specification-alignment` | 2-phase test-spec verification |
|
|
12
|
-
| ralph-loop | Via sprint-flow Phase 2 | REQ-level iterative build (saves 40-67% tokens) |
|
|
13
|
-
| test-driven-development | `/test-driven-development` | TDD enforcement (RED→GREEN→REFACTOR) |
|
|
14
|
-
| improve-codebase-architecture | `/improve-codebase-architecture` | Architecture health checks |
|
|
15
|
-
| to-issues | `/to-issues` | Vertical slice issue splitting |
|
|
16
|
-
| admin-template-guidelines | Via sprint-flow BUILD | 6 maintainability rules for admin templates |
|
|
17
|
-
|
|
18
|
-
## Qoder-Specific Enhancements
|
|
19
|
-
|
|
20
|
-
- **genui Widgets**: Quality report dashboard and Sprint status board (via `show_widget`)
|
|
21
|
-
- **CodeReview Subagent**: Deep integration for Phase 2 blind review and Phase 3 code walkthrough
|
|
22
|
-
- **browser-use MCP**: Phase 3 browser automation testing (replaces gstack/browse)
|
|
23
|
-
- **Memory System**: Learnings persistence via Qoder's built-in memory (replaces gstack/learn)
|
|
24
|
-
- **Canvas Output**: Architecture relationship diagrams (via `.canvas.tsx`)
|
|
25
|
-
|
|
26
|
-
## Installation
|
|
27
|
-
|
|
28
|
-
### Option 1: User-Level (Global, All Projects)
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
# Via xp-gate CLI
|
|
32
|
-
xp-gate install-skill sprint-flow --platform qoder --global
|
|
33
|
-
xp-gate install-skill delphi-review --platform qoder --global
|
|
34
|
-
|
|
35
|
-
# Or via install script (all 8 skills)
|
|
36
|
-
bash scripts/install-qoder-skills.sh --global
|
|
37
|
-
# Installs to: ~/.qoder/skills/
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Option 2: Project-Level (Current Project Only)
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
# Via install script
|
|
44
|
-
bash scripts/install-qoder-skills.sh --local
|
|
45
|
-
# Installs to: .qoder/skills/
|
|
46
|
-
|
|
47
|
-
# Or via build script
|
|
48
|
-
bash scripts/build-plugin.sh --platform qoder
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Option 3: Build from Source
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
npm run build:qoder-plugin
|
|
55
|
-
# Produces plugins/qoder/ with all skills + widgets
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Requirements
|
|
59
|
-
|
|
60
|
-
- Qoder IDE
|
|
61
|
-
- xp-gate npm package installed globally (for git hooks: `npm install -g @boyingliu01/xp-gate && xp-gate init`)
|
|
62
|
-
- Node.js ≥ 18 (for principles checker)
|
|
63
|
-
|
|
64
|
-
## Pre-Edit Gate (Replaces Claude Code Hooks)
|
|
65
|
-
|
|
66
|
-
Qoder does not have file-system event hooks like Claude Code's `PreToolUse`/`PostToolUse`. Instead, xp-gate skills embed **mandatory pre-edit checks** in their SKILL.md instructions:
|
|
67
|
-
|
|
68
|
-
- **Delphi Gate**: Before any code edit in Phase 2+, skill verifies `.sprint-state/delphi-reviewed.json` verdict is `APPROVED`
|
|
69
|
-
- **Principles Check**: After each REQ completion, skill runs principles checker via terminal
|
|
70
|
-
|
|
71
|
-
## Graceful Degradation
|
|
72
|
-
|
|
73
|
-
If xp-gate CLI is unavailable, skills provide helpful install instructions instead of failing. Quality gates still run via git hooks (pre-commit) at commit time.
|
|
74
|
-
|
|
75
|
-
## Comparison with Other Platforms
|
|
76
|
-
|
|
77
|
-
| Feature | Claude Code | OpenCode | Qoder |
|
|
78
|
-
|---------|:-----------:|:--------:|:-----:|
|
|
79
|
-
| AI Skills (8) | ✅ | ✅ | ✅ |
|
|
80
|
-
| Git Hooks | ❌ (separate npm) | ❌ (separate npm) | ❌ (separate npm) |
|
|
81
|
-
| Event Hooks | ✅ PreToolUse/PostToolUse | ✅ tool() | ❌ (skill-embedded) |
|
|
82
|
-
| Custom Tools | ❌ | ✅ 3 tools | ❌ (MCP instead) |
|
|
83
|
-
| Widget UI | ❌ | ❌ | ✅ genui |
|
|
84
|
-
| Canvas Output | ❌ | ❌ | ✅ .canvas.tsx |
|
|
85
|
-
| Memory System | ❌ | ❌ | ✅ UpdateMemory |
|
|
86
|
-
| CodeReview Agent | ❌ | ❌ | ✅ subagent |
|
|
87
|
-
| Browser MCP | ❌ | ❌ | ✅ browser-use |
|