@boyingliu01/xp-gate 0.35.21 → 0.35.23
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/adapters/kotlin.sh +53 -8
- package/bin/xp-gate.js +12 -0
- package/gate-13-compiler-strictness.sh +15 -1
- package/hooks/gate-13-compiler-strictness.sh +15 -1
- package/hooks/pre-commit +137 -9
- package/lib/__tests__/agent-runtime-journal.test.js +302 -0
- package/lib/__tests__/mirror-sync.test.js +277 -0
- package/lib/__tests__/runtime-journal.test.js +164 -0
- package/lib/agent-runtime-journal.js +347 -0
- package/lib/mattpocock-license-verdict.json +1 -1
- package/lib/mirror-sync.js +335 -0
- package/lib/runtime-journal.js +156 -0
- package/mock-policy/AGENTS.md +2 -2
- package/mutation/AGENTS.md +2 -2
- package/package.json +1 -1
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +2 -2
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +2 -2
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +2 -2
- package/plugins/dsh/package.json +1 -1
- package/plugins/dsh/skills/delphi-review/AGENTS.md +2 -2
- package/plugins/dsh/skills/sprint-flow/AGENTS.md +2 -2
- package/plugins/dsh/skills/test-specification-alignment/AGENTS.md +2 -2
- package/plugins/opencode/package.json +1 -1
- package/plugins/opencode/skills/delphi-review/AGENTS.md +2 -2
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +2 -2
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +2 -2
- package/plugins/qoder/plugin.json +1 -1
- package/plugins/qoder/skills/delphi-review/AGENTS.md +2 -2
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +2 -2
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +2 -2
- package/principles/AGENTS.md +2 -2
- package/scripts/delphi-external-review.cjs +68 -1
- package/skills/delphi-review/AGENTS.md +2 -2
- package/skills/sprint-flow/AGENTS.md +2 -2
- package/skills/test-specification-alignment/AGENTS.md +2 -2
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `xp-gate runtime-journal` — CLI for the AGENTS.md runtime-efficiency rules.
|
|
3
|
+
*
|
|
4
|
+
* Implements the same "measure don't restate" stance as `gate-rules`: the three
|
|
5
|
+
* rules in AGENTS.md §AGENT RUNTIME DISCIPLINE were written on 2026-10-30, but
|
|
6
|
+
* by 2026-11-02 only rule 1 had taken effect (pure-read shell: 32.7% -> 0.2%)
|
|
7
|
+
* while rule 2 stayed at 1.02 calls/step and rule 3 was violated 103 times with
|
|
8
|
+
* an explicit `wait: true`. A rule nobody measures is a rule nobody follows, so
|
|
9
|
+
* this surfaces the cost as numbers.
|
|
10
|
+
*
|
|
11
|
+
* Advisory by design — it reports share-of-time and never blocks a commit.
|
|
12
|
+
* The behaviour it measures (how the agent waits) is not something a git hook
|
|
13
|
+
* can decide.
|
|
14
|
+
*
|
|
15
|
+
* @module runtime-journal
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
'use strict';
|
|
19
|
+
|
|
20
|
+
const path = require('path');
|
|
21
|
+
const os = require('os');
|
|
22
|
+
|
|
23
|
+
const {
|
|
24
|
+
analyseSessions,
|
|
25
|
+
discoverSessionDirs,
|
|
26
|
+
summariseForSlot,
|
|
27
|
+
} = require('./agent-runtime-journal');
|
|
28
|
+
|
|
29
|
+
/** Default lookback for the report, in days. */
|
|
30
|
+
const DEFAULT_DAYS = 3;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Candidate roots that hold DSH session journals, most specific first.
|
|
34
|
+
*
|
|
35
|
+
* `DSH_SESSIONS_DIR` wins so a CI job or a different machine can point at the
|
|
36
|
+
* store without code changes.
|
|
37
|
+
*
|
|
38
|
+
* The DSH store names each project root `--<slug>--`, where the slug is the
|
|
39
|
+
* absolute cwd with every path separator replaced by a dash — e.g.
|
|
40
|
+
* `D:\projects\xp-gate` becomes `--D-projects-xp-gate--`. Deriving it from the
|
|
41
|
+
* full path matters: a basename-only guess (`--xp-gate--`) names a directory
|
|
42
|
+
* that does not exist.
|
|
43
|
+
*
|
|
44
|
+
* @param {string} [cwd] project directory; defaults to `process.cwd()`
|
|
45
|
+
* @returns {string[]}
|
|
46
|
+
*/
|
|
47
|
+
function sessionRootCandidates(cwd = process.cwd()) {
|
|
48
|
+
const home = os.homedir();
|
|
49
|
+
const dirs = [];
|
|
50
|
+
if (process.env.DSH_SESSIONS_DIR) dirs.push(process.env.DSH_SESSIONS_DIR);
|
|
51
|
+
const base = path.join(home, '.dsh', 'sessions');
|
|
52
|
+
// Each separator becomes one dash, then the store wraps the slug in an extra
|
|
53
|
+
// dash on both sides: `D:\projects\xp-gate` -> `D-projects-xp-gate` ->
|
|
54
|
+
// `--D-projects-xp-gate--`. The wrapping pair is not redundant; without it
|
|
55
|
+
// the path names a directory that does not exist.
|
|
56
|
+
const slug = String(cwd).replace(/[\\/:]+/g, '-');
|
|
57
|
+
if (slug) dirs.push(path.join(base, `--${slug}--`));
|
|
58
|
+
dirs.push(base);
|
|
59
|
+
return dirs;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Find the session root that actually exists and contains journals.
|
|
64
|
+
* @param {string[]} candidates
|
|
65
|
+
* @returns {string|null}
|
|
66
|
+
*/
|
|
67
|
+
function pickSessionRoot(candidates) {
|
|
68
|
+
for (const candidate of candidates) {
|
|
69
|
+
if (discoverSessionDirs(candidate).length > 0) return candidate;
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Parse `--days N` from argv.
|
|
76
|
+
* @param {string[]} argv
|
|
77
|
+
* @param {number} fallback
|
|
78
|
+
* @returns {number}
|
|
79
|
+
*/
|
|
80
|
+
function parseDays(argv, fallback) {
|
|
81
|
+
const idx = argv.indexOf('--days');
|
|
82
|
+
if (idx === -1) return fallback;
|
|
83
|
+
const raw = argv[idx + 1];
|
|
84
|
+
const n = Number(raw);
|
|
85
|
+
return Number.isFinite(n) && n > 0 ? n : fallback;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Run the `runtime-journal` subcommand.
|
|
90
|
+
*
|
|
91
|
+
* Always exits 0: this is a diagnostic. Callers that want a gate can read the
|
|
92
|
+
* JSON and apply their own threshold, which keeps the measurement honest
|
|
93
|
+
* (a tool that fails on bad news gets suppressed, not fixed).
|
|
94
|
+
*
|
|
95
|
+
* @param {string[]} argv
|
|
96
|
+
* @returns {number} exit code (always 0)
|
|
97
|
+
*/
|
|
98
|
+
function handleRuntimeJournal(argv) {
|
|
99
|
+
const args = argv || [];
|
|
100
|
+
const json = args.includes('--json');
|
|
101
|
+
const days = parseDays(args, DEFAULT_DAYS);
|
|
102
|
+
const now = Date.now();
|
|
103
|
+
const sinceMs = now - days * 24 * 60 * 60 * 1000;
|
|
104
|
+
|
|
105
|
+
const explicitDir = (() => {
|
|
106
|
+
const idx = args.indexOf('--sessions-dir');
|
|
107
|
+
return idx === -1 ? null : args[idx + 1];
|
|
108
|
+
})();
|
|
109
|
+
|
|
110
|
+
const root = explicitDir
|
|
111
|
+
? (discoverSessionDirs(explicitDir).length ? explicitDir : null)
|
|
112
|
+
: pickSessionRoot(sessionRootCandidates(process.cwd()));
|
|
113
|
+
|
|
114
|
+
if (!root) {
|
|
115
|
+
// NOT MEASURABLE rather than a zero report: a zero that means "no data"
|
|
116
|
+
// reads as "no problem", the false-green that #636 set out to remove.
|
|
117
|
+
if (json) {
|
|
118
|
+
process.stdout.write(`${JSON.stringify({ measurable: false, reason: 'no session journals found', days }, null, 2)}\n`);
|
|
119
|
+
} else {
|
|
120
|
+
process.stdout.write('Runtime efficiency: NOT MEASURABLE (no session journals found)\n');
|
|
121
|
+
process.stdout.write('Hint: set DSH_SESSIONS_DIR, or pass --sessions-dir <path>.\n');
|
|
122
|
+
}
|
|
123
|
+
return 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const report = analyseSessions(discoverSessionDirs(root), { sinceMs, untilMs: now });
|
|
127
|
+
|
|
128
|
+
if (json) {
|
|
129
|
+
const payload = {
|
|
130
|
+
measurable: report.toolCalls > 0,
|
|
131
|
+
days,
|
|
132
|
+
window: { from: new Date(sinceMs).toISOString(), to: new Date(now).toISOString() },
|
|
133
|
+
sessionsDir: root,
|
|
134
|
+
...report,
|
|
135
|
+
};
|
|
136
|
+
process.stdout.write(`${JSON.stringify(payload, null, 2)}\n`);
|
|
137
|
+
return 0;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
process.stdout.write(`Runtime efficiency — last ${days} day(s)\n`);
|
|
141
|
+
process.stdout.write(`Sessions: ${root}\n`);
|
|
142
|
+
const slots = summariseForSlot(report);
|
|
143
|
+
for (const line of slots) process.stdout.write(` ${line}\n`);
|
|
144
|
+
if (report.toolCalls > 0) {
|
|
145
|
+
process.stdout.write(` measured ${report.toolCalls} tool call(s), median ${report.toolMedianMs} ms\n`);
|
|
146
|
+
}
|
|
147
|
+
return 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
module.exports = {
|
|
151
|
+
DEFAULT_DAYS,
|
|
152
|
+
handleRuntimeJournal,
|
|
153
|
+
sessionRootCandidates,
|
|
154
|
+
pickSessionRoot,
|
|
155
|
+
parseDays,
|
|
156
|
+
};
|
package/mock-policy/AGENTS.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SRC/MOCK-POLICY KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.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
3
|
**Generated:** 2026-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.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.35.
|
|
3
|
+
"version": "0.35.23",
|
|
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": {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.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.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.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-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.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.35.
|
|
3
|
+
"version": "0.35.23",
|
|
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",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.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.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.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-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.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.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.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-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.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.35.
|
|
3
|
+
"version": "0.35.23",
|
|
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": {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.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.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.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-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.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
3
|
**Generated:** 2026-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.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.
|
|
@@ -199,6 +199,28 @@ function readConfig(configPath, profileOverride) {
|
|
|
199
199
|
process.exit(1);
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
+
|
|
203
|
+
// (#707) base_url supports ${VAR} for the same reason api_key does: writing a
|
|
204
|
+
// gateway address as a placeholder is the natural way to keep an internal
|
|
205
|
+
// endpoint out of version control. Without expansion the placeholder is a
|
|
206
|
+
// perfectly valid non-empty string, so validation passed and the literal text
|
|
207
|
+
// `${PG_GATEWAY}/v1/chat/completions` went out as a URL — failing at the
|
|
208
|
+
// NETWORK layer with a DNS/connection error while the config looked correct.
|
|
209
|
+
// A caller (whale-sql-audit) had to hardcode its gateway into a distributed
|
|
210
|
+
// repo because of this.
|
|
211
|
+
//
|
|
212
|
+
// Failing here, at config load, names the variable; falling back to the
|
|
213
|
+
// literal is exactly what caused the original misdiagnosis, so it does not.
|
|
214
|
+
if (typeof prov.base_url === 'string'
|
|
215
|
+
&& prov.base_url.startsWith('${') && prov.base_url.endsWith('}')) {
|
|
216
|
+
const envName = prov.base_url.slice(2, -1);
|
|
217
|
+
const envVal = process.env[envName];
|
|
218
|
+
if (!envVal) {
|
|
219
|
+
console.error(`[delphi-review] ERROR: Environment variable ${envName} is not set (profiles.${profileName}.providers.${name}.base_url). Export it or point that provider at a literal URL.`);
|
|
220
|
+
process.exit(1);
|
|
221
|
+
}
|
|
222
|
+
prov.base_url = envVal;
|
|
223
|
+
}
|
|
202
224
|
}
|
|
203
225
|
|
|
204
226
|
const experts = Object.fromEntries(Object.entries(profile.experts || {}).map(([role, expert]) => [
|
|
@@ -701,7 +723,52 @@ async function callModelAPI(providerConfig, model, systemPrompt, userPrompt, opt
|
|
|
701
723
|
}
|
|
702
724
|
|
|
703
725
|
if (response.status >= 500) {
|
|
704
|
-
|
|
726
|
+
// (#705) Read the provider's structured error body, the same way the 429
|
|
727
|
+
// branch above does, instead of discarding it.
|
|
728
|
+
//
|
|
729
|
+
// Measured on the whalecloud gateway: a prompt containing
|
|
730
|
+
// `new ProcessBuilder(args).start()` makes the gateway fail in its
|
|
731
|
+
// response-processing stage and return 500 with
|
|
732
|
+
// {"error":{"type":"response_processing_error",
|
|
733
|
+
// "param":"non_stream_chat_response","code":"500"}}
|
|
734
|
+
// The old code threw that away and reported "Server error (500).", which
|
|
735
|
+
// reads as a transient outage. `type`/`param` are what tell an operator
|
|
736
|
+
// apart gateway flapping vs. upstream timeout vs. content-triggered
|
|
737
|
+
// processing failure — three problems with three different responses.
|
|
738
|
+
//
|
|
739
|
+
// Retryability is the other half: a content-dependent failure cannot clear
|
|
740
|
+
// by retrying (the content did not change), so marking it retryable burns
|
|
741
|
+
// the orchestrator's retry budget on a guaranteed repeat. Only an
|
|
742
|
+
// explicitly recognised response_processing_error is demoted; every other
|
|
743
|
+
// 5xx keeps the previous retryable=true, and an unparseable body keeps the
|
|
744
|
+
// previous behaviour entirely — reading the body must not change the
|
|
745
|
+
// verdict on its own.
|
|
746
|
+
let detail = '';
|
|
747
|
+
let processingError = false;
|
|
748
|
+
try {
|
|
749
|
+
const body = await response.json();
|
|
750
|
+
if (body && body.error && typeof body.error === 'object') {
|
|
751
|
+
const type = typeof body.error.type === 'string' ? body.error.type : '';
|
|
752
|
+
const param = typeof body.error.param === 'string' ? body.error.param : '';
|
|
753
|
+
if (type === 'response_processing_error') {
|
|
754
|
+
processingError = true;
|
|
755
|
+
}
|
|
756
|
+
const parts = [type, param].filter(Boolean);
|
|
757
|
+
if (parts.length > 0) {
|
|
758
|
+
detail = ` Provider reported: ${parts.join('/')}.`;
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
} catch {
|
|
762
|
+
// body is not JSON; keep the previous behaviour untouched
|
|
763
|
+
}
|
|
764
|
+
if (processingError) {
|
|
765
|
+
return {
|
|
766
|
+
error: true,
|
|
767
|
+
retryable: false,
|
|
768
|
+
message: `Server error (${response.status}).${detail} This is a content-dependent upstream processing failure, so retrying the same prompt will fail the same way.`,
|
|
769
|
+
};
|
|
770
|
+
}
|
|
771
|
+
return { error: true, retryable: true, message: `Server error (${response.status}).${detail}` };
|
|
705
772
|
}
|
|
706
773
|
|
|
707
774
|
if (!response.ok) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.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.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.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-11-02
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** 8a968080
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.23.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|