@boyingliu01/xp-gate 0.14.1 → 0.14.2
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/mock-policy/AGENTS.md +3 -3
- package/mutation/AGENTS.md +3 -3
- package/package.json +1 -1
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/opencode/README.md +13 -4
- package/plugins/opencode/index.ts +98 -0
- 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 +3 -3
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/qoder/plugin.json +1 -1
- package/plugins/qoder/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +3 -3
- package/principles/AGENTS.md +3 -3
- package/skills/delphi-review/AGENTS.md +3 -3
- package/skills/sprint-flow/AGENTS.md +3 -3
- package/skills/test-specification-alignment/AGENTS.md +3 -3
package/mock-policy/AGENTS.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SRC/MOCK-POLICY KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-07-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-07-09
|
|
4
|
+
**Commit:** 744def0
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.14.
|
|
6
|
+
**Version:** 0.14.2.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Mock layering policy enforcement — Gate M3 of pre-push hook. Ensures integration tests use real implementations for internal dependencies, mock external dependencies, and annotate pending mocks with removal plans. Combines project scope scanning, mock decision engine, and per-file validation into a single pipeline.
|
package/mutation/AGENTS.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SRC/MUTATION KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-07-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-07-09
|
|
4
|
+
**Commit:** 744def0
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.14.
|
|
6
|
+
**Version:** 0.14.2.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
**Gate M** (incremental mutation testing) + **Gate M2** helpers (test-layer detection used by `src/mock-policy/`). Pre-push quality gate. TypeScript-only; uses Stryker.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xp-gate",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"displayName": "XP-Gate",
|
|
5
5
|
"description": "Extreme Programming quality gates + AI workflow skills for Claude Code. Includes 10 quality gates (Gate 0-9), Sprint Flow (11 phases), and Delphi multi-expert review (>=90% consensus).",
|
|
6
6
|
"author": {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-07-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-07-09
|
|
4
|
+
**Commit:** 744def0
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.14.
|
|
6
|
+
**Version:** 0.14.2.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, 3 experts from ≥2 providers, domestic models only). Supports design + code-walkthrough modes.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-07-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-07-09
|
|
4
|
+
**Commit:** 744def0
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.14.
|
|
6
|
+
**Version:** 0.14.2.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
**6-phase** development pipeline (v2.0 compact redesign, Issue #290): PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE. Phase 3/6 BUILD default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-07-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-07-09
|
|
4
|
+
**Commit:** 744def0
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.14.
|
|
6
|
+
**Version:** 0.14.2.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|
|
@@ -4,16 +4,25 @@ OpenCode plugin exposing xp-gate quality gates and AI workflow skills.
|
|
|
4
4
|
|
|
5
5
|
## Tools
|
|
6
6
|
|
|
7
|
-
These three tools are **dual-surface**: callable both as OpenCode tools (from
|
|
8
|
-
inside an OpenCode session) and as `xp-gate` CLI subcommands (from any shell).
|
|
9
|
-
Both paths produce identical output. See repo README for the matching CLI table.
|
|
10
|
-
|
|
11
7
|
- **gate-check** ⇄ `xp-gate check <path>`: Run user-invokable quality gates
|
|
12
8
|
(Gate 4 Principles + Gate 6 Architecture) on a file or directory.
|
|
13
9
|
- **gate-principles** ⇄ `xp-gate principles <path>`: Run Clean Code + SOLID
|
|
14
10
|
principles checker (Gate 4 standalone).
|
|
15
11
|
- **gate-arch** ⇄ `xp-gate arch`: Run architecture validation (Gate 6
|
|
16
12
|
standalone, layer boundary checks).
|
|
13
|
+
- **session-rename**: Rename an OpenCode session. When called without a
|
|
14
|
+
`newTitle`, analyzes the session's recent user messages and auto-generates a
|
|
15
|
+
descriptive title. Works by directly updating the OpenCode SQLite database
|
|
16
|
+
(`~/.local/share/opencode/opencode.db`).
|
|
17
|
+
|
|
18
|
+
Usage:
|
|
19
|
+
```typescript
|
|
20
|
+
// Rename current session with auto-generated title
|
|
21
|
+
session-rename()
|
|
22
|
+
|
|
23
|
+
// Rename a specific session with a custom title
|
|
24
|
+
session-rename({ sessionId: "ses_xxx", newTitle: "Fix auth middleware bug" })
|
|
25
|
+
```
|
|
17
26
|
|
|
18
27
|
> Earlier docs said "all 6 quality gates" — that was inaccurate. `gate-check`
|
|
19
28
|
> intentionally runs only the two user-invokable gates (Principles + Arch); the
|
|
@@ -257,6 +257,65 @@ async function getUpgradeSuggestion(cwd: string): Promise<string> {
|
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
+
// ── Session title auto-generation ──
|
|
261
|
+
|
|
262
|
+
function generateSessionTitle(dbPath: string, sessionId: string): string {
|
|
263
|
+
try {
|
|
264
|
+
const escapedId = sessionId.replace(/'/g, "''")
|
|
265
|
+
const sql = `
|
|
266
|
+
SELECT json_extract(p.data, '$.text') as text
|
|
267
|
+
FROM part p
|
|
268
|
+
JOIN message m ON p.message_id = m.id
|
|
269
|
+
WHERE m.session_id = '${escapedId}'
|
|
270
|
+
AND json_extract(m.data, '$.role') = 'user'
|
|
271
|
+
AND json_extract(p.data, '$.type') = 'text'
|
|
272
|
+
ORDER BY m.time_created DESC
|
|
273
|
+
LIMIT 10
|
|
274
|
+
`
|
|
275
|
+
const raw = execSync(`sqlite3 "${dbPath}" "${sql}"`, {
|
|
276
|
+
encoding: "utf8",
|
|
277
|
+
timeout: 5000,
|
|
278
|
+
})
|
|
279
|
+
|
|
280
|
+
if (!raw.trim()) return ""
|
|
281
|
+
|
|
282
|
+
const userMessages = raw
|
|
283
|
+
.split("\n")
|
|
284
|
+
.map((line) => line.trim())
|
|
285
|
+
.filter((line) => line.length > 0)
|
|
286
|
+
|
|
287
|
+
const combined = userMessages.join(" ")
|
|
288
|
+
return extractTitleFromText(combined)
|
|
289
|
+
} catch {
|
|
290
|
+
return ""
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
function extractTitleFromText(text: string): string {
|
|
295
|
+
const taskMarkers = [
|
|
296
|
+
/(?:implement|add|create|build|develop|fix|refactor|optimize|update|remove|merge|deploy|release|publish|design|review)\s+[^.?!\n]{5,80}/gi,
|
|
297
|
+
]
|
|
298
|
+
|
|
299
|
+
const matches: string[] = []
|
|
300
|
+
for (const marker of taskMarkers) {
|
|
301
|
+
const hits = text.matchAll(marker)
|
|
302
|
+
for (const hit of hits) {
|
|
303
|
+
matches.push(hit[0].trim())
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
if (matches.length > 0) {
|
|
308
|
+
return matches[0].substring(0, 120)
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
const firstSentence = text.split(/[.?!]\s+/).filter(s => s.length > 10)[0]
|
|
312
|
+
if (firstSentence && firstSentence.length > 5) {
|
|
313
|
+
return firstSentence.substring(0, 120).trim()
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
return ""
|
|
317
|
+
}
|
|
318
|
+
|
|
260
319
|
// ── Plugin definition ──
|
|
261
320
|
|
|
262
321
|
export const XpGatePlugin = async (input: OpenCodePluginInput) => {
|
|
@@ -317,6 +376,45 @@ export const XpGatePlugin = async (input: OpenCodePluginInput) => {
|
|
|
317
376
|
return runCmd(cmd, cwd)
|
|
318
377
|
},
|
|
319
378
|
}),
|
|
379
|
+
"session-rename": tool({
|
|
380
|
+
description: "Rename an OpenCode session. When called without newTitle, analyzes the session's recent conversation and auto-generates a descriptive title based on the work done.",
|
|
381
|
+
args: {
|
|
382
|
+
sessionId: z.string().optional().describe("Session ID to rename (defaults to current session)"),
|
|
383
|
+
newTitle: z.string().optional().describe("New session title. If omitted, auto-generates from conversation content."),
|
|
384
|
+
},
|
|
385
|
+
async execute(args, ctx) {
|
|
386
|
+
const sessionId = args.sessionId || ctx.sessionID
|
|
387
|
+
const dbPath = join(homedir(), ".local", "share", "opencode", "opencode.db")
|
|
388
|
+
|
|
389
|
+
if (!existsSync(dbPath)) {
|
|
390
|
+
return "Session rename failed: OpenCode database not found at " + dbPath
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
let title: string
|
|
394
|
+
if (args.newTitle) {
|
|
395
|
+
title = args.newTitle
|
|
396
|
+
} else {
|
|
397
|
+
title = generateSessionTitle(dbPath, sessionId)
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
if (!title || title.trim().length === 0) {
|
|
401
|
+
return "Session rename failed: could not generate a title (no user messages found)"
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
title = title.trim().substring(0, 120)
|
|
405
|
+
|
|
406
|
+
const escapedTitle = title.replace(/'/g, "''")
|
|
407
|
+
const escapedId = sessionId.replace(/'/g, "''")
|
|
408
|
+
const sql = `UPDATE session SET title = '${escapedTitle}', time_updated = ${Date.now()} WHERE id = '${escapedId}'`
|
|
409
|
+
try {
|
|
410
|
+
execSync(`sqlite3 "${dbPath}" "${sql}"`, { timeout: 5000 })
|
|
411
|
+
return `Session renamed to: "${title}"`
|
|
412
|
+
} catch (err) {
|
|
413
|
+
const msg = err instanceof Error ? err.message : String(err)
|
|
414
|
+
return `Session rename failed: ${msg}`
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
}),
|
|
320
418
|
},
|
|
321
419
|
"chat.message": async (_input: { message: string }) => {
|
|
322
420
|
if (!checked) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-07-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-07-09
|
|
4
|
+
**Commit:** 744def0
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.14.
|
|
6
|
+
**Version:** 0.14.2.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, 3 experts from ≥2 providers, domestic models only). Supports design + code-walkthrough modes.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-07-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-07-09
|
|
4
|
+
**Commit:** 744def0
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.14.
|
|
6
|
+
**Version:** 0.14.2.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
**6-phase** development pipeline (v2.0 compact redesign, Issue #290): PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE. Phase 3/6 BUILD default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-07-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-07-09
|
|
4
|
+
**Commit:** 744def0
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.14.
|
|
6
|
+
**Version:** 0.14.2.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xp-gate",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"displayName": "XP-Gate",
|
|
5
5
|
"description": "Extreme Programming quality gates + AI workflow skills for Qoder. Includes 10 quality gates (Gate 0-9), Sprint Flow (11 phases), and Delphi multi-expert review (>=90% consensus).",
|
|
6
6
|
"author": {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-07-09
|
|
4
|
-
**Commit:**
|
|
5
|
-
**Branch:**
|
|
6
|
-
**Version:** 0.14.
|
|
4
|
+
**Commit:** 744def0
|
|
5
|
+
**Branch:** main
|
|
6
|
+
**Version:** 0.14.2.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, 3 experts from ≥2 providers, domestic models only). Supports design + code-walkthrough modes.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-07-09
|
|
4
|
-
**Commit:**
|
|
5
|
-
**Branch:**
|
|
6
|
-
**Version:** 0.14.
|
|
4
|
+
**Commit:** 744def0
|
|
5
|
+
**Branch:** main
|
|
6
|
+
**Version:** 0.14.2.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
**6-phase** development pipeline (v2.0 compact redesign, Issue #290): PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE. Phase 3/6 BUILD default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-07-09
|
|
4
|
-
**Commit:**
|
|
5
|
-
**Branch:**
|
|
6
|
-
**Version:** 0.14.
|
|
4
|
+
**Commit:** 744def0
|
|
5
|
+
**Branch:** main
|
|
6
|
+
**Version:** 0.14.2.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|
package/principles/AGENTS.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# PRINCIPLES CHECKER MODULE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-07-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-07-09
|
|
4
|
+
**Commit:** 744def0
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.14.
|
|
6
|
+
**Version:** 0.14.2.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Clean Code & SOLID principles checker — **Gate 4** of pre-commit. 14 rules × 9 language adapters, SARIF 2.1.0 output. Houses the **Boy Scout Rule** enforcement engine (Gate 6) and warning-baseline storage.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-07-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-07-09
|
|
4
|
+
**Commit:** 744def0
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.14.
|
|
6
|
+
**Version:** 0.14.2.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, 3 experts from ≥2 providers, domestic models only). Supports design + code-walkthrough modes.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-07-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-07-09
|
|
4
|
+
**Commit:** 744def0
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.14.
|
|
6
|
+
**Version:** 0.14.2.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
**6-phase** development pipeline (v2.0 compact redesign, Issue #290): PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE. Phase 3/6 BUILD default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-07-
|
|
4
|
-
**Commit:**
|
|
3
|
+
**Generated:** 2026-07-09
|
|
4
|
+
**Commit:** 744def0
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.14.
|
|
6
|
+
**Version:** 0.14.2.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|