@boyingliu01/xp-gate 0.38.32 → 0.38.33
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/gate-3.sh +39 -3
- package/adapters/gate-4.sh +1 -1
- package/adapters/php.sh +362 -0
- package/gate-3.sh +39 -3
- package/gate-4.sh +1 -1
- package/hooks/gate-3.sh +39 -3
- package/hooks/gate-4.sh +1 -1
- package/lib/__tests__/language-capability.test.js +291 -0
- package/lib/__tests__/language-tools-detect.test.js +82 -0
- package/lib/language-capability-surfaces.js +315 -0
- package/lib/language-capability.js +474 -0
- package/lib/language-tools.js +107 -0
- package/lib/mattpocock-license-verdict.json +1 -1
- 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/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/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/principles/adapters/php.ts +77 -0
- package/principles/analyzer.ts +6 -0
- 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
|
@@ -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.38.
|
|
6
|
+
**Version:** 0.38.33.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.38.
|
|
6
|
+
**Version:** 0.38.33.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.38.
|
|
6
|
+
**Version:** 0.38.33.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.38.
|
|
6
|
+
**Version:** 0.38.33.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.38.
|
|
6
|
+
**Version:** 0.38.33.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.38.
|
|
6
|
+
**Version:** 0.38.33.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { BaseAdapter } from './base';
|
|
2
|
+
import { Adapter } from '../types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* PHP adapter for the principles engine (Gate 4).
|
|
6
|
+
*
|
|
7
|
+
* Why this file exists: `analyzer.ts`'s `adapterMap` had no `.php` entry, so
|
|
8
|
+
* `getAdapterForFile('a.php')` returned null while `gate-4.sh` had already been
|
|
9
|
+
* widened to accept the extension. That is the #717 shape exactly -- a file is
|
|
10
|
+
* accepted by the filter and then silently inspected by nobody, which reads as
|
|
11
|
+
* "Gate 4 ran and found nothing".
|
|
12
|
+
*
|
|
13
|
+
* Regex-based on purpose, like the C/C++/Objective-C adapters: the engine has no
|
|
14
|
+
* PHP AST and inventing a shallow one would report confident findings it cannot
|
|
15
|
+
* verify. An under-reported file is the acceptable failure; a fabricated finding
|
|
16
|
+
* is not.
|
|
17
|
+
*
|
|
18
|
+
* PDF note: the two forms below cover the declaration shapes the rules act on.
|
|
19
|
+
* Deliberately NOT matched: closures assigned with `$f = function () {}` (the
|
|
20
|
+
* binding is a variable, so a "function" finding would be attributed to `$f`
|
|
21
|
+
* with no name a human recognises) and arrow functions `fn($x) => ...`, which
|
|
22
|
+
* have no brace body for the nesting rules to walk.
|
|
23
|
+
*/
|
|
24
|
+
export class PhpAdapter extends BaseAdapter implements Adapter {
|
|
25
|
+
detectLanguage(): string {
|
|
26
|
+
const lower = this.filePath.toLowerCase();
|
|
27
|
+
if (lower.endsWith('.php') || lower.endsWith('.phtml')) {
|
|
28
|
+
return 'php';
|
|
29
|
+
}
|
|
30
|
+
return super.detectLanguage();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
parseAST(): unknown {
|
|
34
|
+
return this.createParseResult('php');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
extractFunctions(): unknown[] {
|
|
38
|
+
const functionMatches = [];
|
|
39
|
+
// `function name(` with optional leading modifiers/`&` (by-reference return)
|
|
40
|
+
// and an optional return type after the closing paren. The `$` lookahead the
|
|
41
|
+
// closure form would need is intentionally absent -- see the class comment.
|
|
42
|
+
const fnRegex = /(?:^|[\s;{}])(?:(?:public|protected|private|static|final|abstract)\s+)*function\s+&?\s*(\w+)\s*\(/g;
|
|
43
|
+
let match;
|
|
44
|
+
|
|
45
|
+
while ((match = fnRegex.exec(this.fileContent)) !== null) {
|
|
46
|
+
// A method whose name collides with a PHP keyword is not a declaration.
|
|
47
|
+
if (match[1] === '__construct') {
|
|
48
|
+
functionMatches.push(this.createCodeMatch(match[1], 'constructor', match.index));
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
functionMatches.push(this.createCodeMatch(match[1], 'function', match.index));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return functionMatches;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
extractClasses(): unknown[] {
|
|
58
|
+
const classMatches = [];
|
|
59
|
+
const classRegex = /(?:^|[\s;{}])class\s+(\w+)(?:\s+extends\s+([\w\\]+))?/g;
|
|
60
|
+
let match;
|
|
61
|
+
|
|
62
|
+
while ((match = classRegex.exec(this.fileContent)) !== null) {
|
|
63
|
+
classMatches.push(this.createCodeMatch(match[1], 'class', match.index));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Interfaces and traits are separate PHP type declarations. Recorded with
|
|
67
|
+
// their own type rather than folded into `class`: an `interface` reported as
|
|
68
|
+
// a class would be counted by the SOLID rules that reason about concrete
|
|
69
|
+
// implementations.
|
|
70
|
+
const otherRegex = /(?:^|[\s;{}])(interface|trait|enum)\s+(\w+)/g;
|
|
71
|
+
while ((match = otherRegex.exec(this.fileContent)) !== null) {
|
|
72
|
+
classMatches.push(this.createCodeMatch(match[2], match[1], match.index));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return classMatches;
|
|
76
|
+
}
|
|
77
|
+
}
|
package/principles/analyzer.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { GoAdapter } from './adapters/go';
|
|
|
6
6
|
import { JavaAdapter } from './adapters/java';
|
|
7
7
|
import { KotlinAdapter } from './adapters/kotlin';
|
|
8
8
|
import { DartAdapter } from './adapters/dart';
|
|
9
|
+
import { PhpAdapter } from './adapters/php';
|
|
9
10
|
import { SwiftAdapter } from './adapters/swift';
|
|
10
11
|
import { ObjectiveCAdapter } from './adapters/objectivec';
|
|
11
12
|
import { CppAdapter } from './adapters/cpp';
|
|
@@ -61,6 +62,11 @@ export function getAdapterForFile(filePath: string): Adapter | null {
|
|
|
61
62
|
'.kt': KotlinAdapter,
|
|
62
63
|
'.kts': KotlinAdapter,
|
|
63
64
|
'.dart': DartAdapter,
|
|
65
|
+
// #731: the same #717 shape, caught by the capability test rather than by a
|
|
66
|
+
// review -- widening gate-4.sh's filter to accept .php without this entry
|
|
67
|
+
// would have produced "Gate 4 ran and inspected nothing".
|
|
68
|
+
'.php': PhpAdapter,
|
|
69
|
+
'.phtml': PhpAdapter,
|
|
64
70
|
'.swift': SwiftAdapter,
|
|
65
71
|
'.m': ObjectiveCAdapter,
|
|
66
72
|
'.mm': ObjectiveCAdapter,
|
|
@@ -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.38.
|
|
6
|
+
**Version:** 0.38.33.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.38.
|
|
6
|
+
**Version:** 0.38.33.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.38.
|
|
6
|
+
**Version:** 0.38.33.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|