@boyingliu01/xp-gate 0.40.1 → 0.41.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 +26 -0
- package/hooks/gate-entries/gate-13-entry.sh +2 -1
- package/lib/gate-audit.ts +68 -0
- package/package.json +1 -1
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +1 -1
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +1 -1
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +1 -1
- package/plugins/dsh/package.json +1 -1
- package/plugins/dsh/skills/delphi-review/AGENTS.md +1 -1
- package/plugins/dsh/skills/sprint-flow/AGENTS.md +1 -1
- package/plugins/dsh/skills/test-specification-alignment/AGENTS.md +1 -1
- package/plugins/opencode/package.json +1 -1
- package/plugins/opencode/skills/delphi-review/AGENTS.md +1 -1
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +1 -1
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +1 -1
- package/plugins/qoder/plugin.json +1 -1
- package/plugins/qoder/skills/delphi-review/AGENTS.md +1 -1
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +1 -1
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +1 -1
- package/skills/delphi-review/AGENTS.md +1 -1
- package/skills/sprint-flow/AGENTS.md +1 -1
- package/skills/test-specification-alignment/AGENTS.md +1 -1
package/bin/xp-gate.js
CHANGED
|
@@ -683,12 +683,38 @@ function handleAuditStats(auditPath) {
|
|
|
683
683
|
printStatsTable(stats);
|
|
684
684
|
printAnomalies(evalGateAuditModule('m.computeAnomalies()'));
|
|
685
685
|
printSkipReasons(evalGateAuditModule('m.computeSkipReasons()'));
|
|
686
|
+
printSkipPassedViolations(evalGateAuditModule('m.replaySkipPassedViolations()'));
|
|
686
687
|
} catch (err) {
|
|
687
688
|
console.error('Error computing stats:', err.message);
|
|
688
689
|
process.exit(1);
|
|
689
690
|
}
|
|
690
691
|
}
|
|
691
692
|
|
|
693
|
+
/**
|
|
694
|
+
* Print rows that recorded "SKIP" and "passed" together (#866).
|
|
695
|
+
*
|
|
696
|
+
* The three tables above answer "how often did each gate run" and "why did it
|
|
697
|
+
* skip". Neither can show that a row CONTRADICTS ITSELF, because `passed` counts a
|
|
698
|
+
* skip as a pass by design -- the retry streak reads it. So the contradiction had
|
|
699
|
+
* no place to surface, and 4529 of them sat in this repository's journal.
|
|
700
|
+
*
|
|
701
|
+
* Reported as a count per gate, not per row: the useful question is which gates
|
|
702
|
+
* produce them, and a 4529-line listing buries that.
|
|
703
|
+
*/
|
|
704
|
+
function printSkipPassedViolations(result) {
|
|
705
|
+
const found = result && Array.isArray(result.violations) ? result.violations.length : 0;
|
|
706
|
+
console.log('\nSelf-contradictory rows (gate_status=SKIP with passed=true):');
|
|
707
|
+
if (found === 0) {
|
|
708
|
+
console.log(' none — every SKIP row that recorded a verdict recorded it as not-passed.');
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
console.log(` ${found} of ${result.total} row(s). These say "nothing was checked" and`);
|
|
712
|
+
console.log(' "this passed" at once; `passed` counts both, so no pass rate shows it.');
|
|
713
|
+
for (const g of result.byGate) {
|
|
714
|
+
console.log(` ${String(g.count).padStart(6)} ${g.gate_id}`);
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
|
|
692
718
|
/**
|
|
693
719
|
* Print WHY gates skipped, grouped by reason.
|
|
694
720
|
*
|
|
@@ -555,7 +555,8 @@ generate_quality_report() {
|
|
|
555
555
|
"gate12_file_hygiene": {
|
|
556
556
|
"name": "File Hygiene Check",
|
|
557
557
|
"status": "${GATE_12_STATUS:-WARN}",
|
|
558
|
-
"tool": "gate-12-file-hygiene.sh"
|
|
558
|
+
"tool": "gate-12-file-hygiene.sh",
|
|
559
|
+
"reason": "${GATE_12_DETAIL:-}"
|
|
559
560
|
},
|
|
560
561
|
"gate12b_mirror_parity": {
|
|
561
562
|
"name": "Mirror Parity",
|
package/lib/gate-audit.ts
CHANGED
|
@@ -261,6 +261,47 @@ interface GateBucket {
|
|
|
261
261
|
verified: number;
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
+
/** One row whose verdict contradicts itself, with the position that names it. */
|
|
265
|
+
export interface SkipPassedViolation {
|
|
266
|
+
/** Zero-based position in the input, so a replay can name the journal line. */
|
|
267
|
+
index: number;
|
|
268
|
+
gate_id: string;
|
|
269
|
+
gate_status: string;
|
|
270
|
+
passed: boolean;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Rows that say "nothing was checked" and "this passed" at the same time (#866).
|
|
275
|
+
*
|
|
276
|
+
* `aggregateByGate` keeps counting a SKIP row as `passed` on purpose: `passed`
|
|
277
|
+
* answers "did this gate block?", which the retry streak reads, and redefining it
|
|
278
|
+
* would move every number ever recorded. What was missing is a check that the pair
|
|
279
|
+
* is even coherent -- so this reports the contradiction instead of quietly
|
|
280
|
+
* averaging it into a pass rate.
|
|
281
|
+
*
|
|
282
|
+
* A row with NO `gate_status` is not accused. The field postdates the journal, and
|
|
283
|
+
* a legacy row cannot be judged by it; counting those would turn the check into
|
|
284
|
+
* noise and get it switched off, which is how the defect it guards against would
|
|
285
|
+
* come back.
|
|
286
|
+
*
|
|
287
|
+
* @param entries parsed audit rows, in file order
|
|
288
|
+
* @returns every violating row, in input order (empty when the journal is clean)
|
|
289
|
+
*/
|
|
290
|
+
export function findSkipPassedViolations(entries: GateAuditEntry[]): SkipPassedViolation[] {
|
|
291
|
+
const out: SkipPassedViolation[] = [];
|
|
292
|
+
entries.forEach((e, index) => {
|
|
293
|
+
if (e.gate_status !== 'SKIP') return;
|
|
294
|
+
if (e.passed !== true) return;
|
|
295
|
+
out.push({
|
|
296
|
+
index,
|
|
297
|
+
gate_id: typeof e.gate_id === 'string' && e.gate_id ? e.gate_id : 'unknown',
|
|
298
|
+
gate_status: e.gate_status,
|
|
299
|
+
passed: true,
|
|
300
|
+
});
|
|
301
|
+
});
|
|
302
|
+
return out;
|
|
303
|
+
}
|
|
304
|
+
|
|
264
305
|
export function aggregateByGate(entries: GateAuditEntry[]): Map<string, GateBucket> {
|
|
265
306
|
const buckets = new Map<string, GateBucket>();
|
|
266
307
|
|
|
@@ -320,6 +361,33 @@ export function aggregateByGate(entries: GateAuditEntry[]): Map<string, GateBuck
|
|
|
320
361
|
return buckets;
|
|
321
362
|
}
|
|
322
363
|
|
|
364
|
+
/**
|
|
365
|
+
* Replay the recorded journal and report every self-contradictory SKIP row (#866).
|
|
366
|
+
*
|
|
367
|
+
* This exists because the constraint was missing, not the data: 4529 rows in this
|
|
368
|
+
* repository's own journal already said "SKIP" and "passed" together, and nothing
|
|
369
|
+
* ever went red for them. `passed` is still reported exactly as before -- this is
|
|
370
|
+
* a diagnostic, and it must not move a historical number.
|
|
371
|
+
*
|
|
372
|
+
* @param repoRoot project root holding `.xp-gate/audit.jsonl`
|
|
373
|
+
* @returns the violations, and the journal size they were drawn from
|
|
374
|
+
*/
|
|
375
|
+
export function replaySkipPassedViolations(repoRoot: string = process.cwd()): {
|
|
376
|
+
total: number;
|
|
377
|
+
violations: SkipPassedViolation[];
|
|
378
|
+
byGate: Array<{ gate_id: string; count: number }>;
|
|
379
|
+
} {
|
|
380
|
+
const logPath = join(repoRoot, AUDIT_DIR, AUDIT_FILE);
|
|
381
|
+
const entries = parseAuditEntries(logPath);
|
|
382
|
+
const violations = findSkipPassedViolations(entries);
|
|
383
|
+
const counts = new Map<string, number>();
|
|
384
|
+
for (const v of violations) counts.set(v.gate_id, (counts.get(v.gate_id) ?? 0) + 1);
|
|
385
|
+
const byGate = Array.from(counts.entries())
|
|
386
|
+
.map(([gate_id, count]) => ({ gate_id, count }))
|
|
387
|
+
.sort((a, b) => b.count - a.count || a.gate_id.localeCompare(b.gate_id));
|
|
388
|
+
return { total: entries.length, violations, byGate };
|
|
389
|
+
}
|
|
390
|
+
|
|
323
391
|
/**
|
|
324
392
|
* Compute per-gate aggregate statistics.
|
|
325
393
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boyingliu01/xp-gate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.1",
|
|
4
4
|
"description": "Deterministic quality gates for AI-generated code: 15 gates, Delphi review, sprint flow. Works with Claude Code, OpenCode, Qoder.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"xp-gate": "bin/xp-gate.js"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xp-gate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.1",
|
|
4
4
|
"displayName": "XP-Gate",
|
|
5
5
|
"description": "Extreme Programming quality gates + AI workflow skills for Claude Code. Includes 12 pre-commit gates (Gate 0-11), 8 pre-push gates, Sprint Flow (6 phases), and Delphi multi-expert review (>=90% consensus).",
|
|
6
6
|
"author": {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Generated:** 2026-11-04
|
|
4
4
|
**Commit:** eb2097b0
|
|
5
5
|
**Branch:** sprint/2026-11-03-02
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.41.1.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, exactly 3 experts with distinct executable model IDs). Supports design, requirements, and code-walkthrough modes.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Generated:** 2026-11-04
|
|
4
4
|
**Commit:** eb2097b0
|
|
5
5
|
**Branch:** sprint/2026-11-03-02
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.41.1.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; each REQ starts from a clean context instead of accumulating one across REQs). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Generated:** 2026-11-04
|
|
4
4
|
**Commit:** eb2097b0
|
|
5
5
|
**Branch:** sprint/2026-11-03-02
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.41.1.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|
package/plugins/dsh/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boyingliu01/dsh-plugin-xp-gate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.1",
|
|
4
4
|
"description": "XP-Gate deterministic quality gates + AI workflow skills as a DeepSeek Harness (DSH) native plugin: gate-check / gate-principles / gate-arch tools + 12 SKILL.md skills",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Generated:** 2026-11-04
|
|
4
4
|
**Commit:** eb2097b0
|
|
5
5
|
**Branch:** sprint/2026-11-03-02
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.41.1.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, exactly 3 experts with distinct executable model IDs). Supports design, requirements, and code-walkthrough modes.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Generated:** 2026-11-04
|
|
4
4
|
**Commit:** eb2097b0
|
|
5
5
|
**Branch:** sprint/2026-11-03-02
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.41.1.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; each REQ starts from a clean context instead of accumulating one across REQs). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Generated:** 2026-11-04
|
|
4
4
|
**Commit:** eb2097b0
|
|
5
5
|
**Branch:** sprint/2026-11-03-02
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.41.1.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Generated:** 2026-11-04
|
|
4
4
|
**Commit:** eb2097b0
|
|
5
5
|
**Branch:** sprint/2026-11-03-02
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.41.1.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, exactly 3 experts with distinct executable model IDs). Supports design, requirements, and code-walkthrough modes.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Generated:** 2026-11-04
|
|
4
4
|
**Commit:** eb2097b0
|
|
5
5
|
**Branch:** sprint/2026-11-03-02
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.41.1.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; each REQ starts from a clean context instead of accumulating one across REQs). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Generated:** 2026-11-04
|
|
4
4
|
**Commit:** eb2097b0
|
|
5
5
|
**Branch:** sprint/2026-11-03-02
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.41.1.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.
|
|
3
|
+
"version": "0.41.1",
|
|
4
4
|
"displayName": "XP-Gate",
|
|
5
5
|
"description": "Extreme Programming quality gates + AI workflow skills for Qoder. Includes 12 pre-commit gates (Gate 0-11), 8 pre-push gates, Sprint Flow (6 phases), and Delphi multi-expert review (>=90% consensus).",
|
|
6
6
|
"author": {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Generated:** 2026-11-04
|
|
4
4
|
**Commit:** eb2097b0
|
|
5
5
|
**Branch:** sprint/2026-11-03-02
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.41.1.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, exactly 3 experts with distinct executable model IDs). Supports design, requirements, and code-walkthrough modes.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Generated:** 2026-11-04
|
|
4
4
|
**Commit:** eb2097b0
|
|
5
5
|
**Branch:** sprint/2026-11-03-02
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.41.1.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; each REQ starts from a clean context instead of accumulating one across REQs). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Generated:** 2026-11-04
|
|
4
4
|
**Commit:** eb2097b0
|
|
5
5
|
**Branch:** sprint/2026-11-03-02
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.41.1.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Generated:** 2026-11-04
|
|
4
4
|
**Commit:** eb2097b0
|
|
5
5
|
**Branch:** sprint/2026-11-03-02
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.41.1.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, exactly 3 experts with distinct executable model IDs). Supports design, requirements, and code-walkthrough modes.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Generated:** 2026-11-04
|
|
4
4
|
**Commit:** eb2097b0
|
|
5
5
|
**Branch:** sprint/2026-11-03-02
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.41.1.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; each REQ starts from a clean context instead of accumulating one across REQs). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Generated:** 2026-11-04
|
|
4
4
|
**Commit:** eb2097b0
|
|
5
5
|
**Branch:** sprint/2026-11-03-02
|
|
6
|
-
**Version:** 0.
|
|
6
|
+
**Version:** 0.41.1.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|