@boyingliu01/xp-gate 0.20.0 → 0.20.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/adapters/gate-8.sh +115 -73
- package/adapters/java.sh +373 -27
- package/adapters/powershell.sh +60 -5
- package/adapters/python.sh +38 -4
- package/build-integrity/__tests__/import-resolver.test.ts +59 -0
- package/build-integrity/gate-10.ts +17 -2
- package/gate-3.sh +51 -3
- package/gate-4.sh +32 -1
- package/gate-8.sh +115 -73
- package/hooks/gate-3.sh +51 -3
- package/hooks/gate-4.sh +32 -1
- package/hooks/gate-8.sh +115 -73
- package/hooks/pre-commit +404 -62
- package/lib/__tests__/doctor-spawn-capability.test.js +116 -0
- package/lib/__tests__/doctor-tui-skill-freshness.test.js +49 -10
- package/lib/doctor-tui.js +21 -3
- package/lib/doctor.js +111 -8
- package/lib/gate-audit.ts +3 -0
- package/lib/mattpocock-license-verdict.json +1 -1
- package/mock-policy/AGENTS.md +4 -4
- package/mutation/AGENTS.md +4 -4
- package/package.json +2 -2
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/skills/admin-template-guidelines/SKILL.md +1 -0
- package/plugins/claude-code/skills/batch-grill-me/SKILL.md +1 -0
- package/plugins/claude-code/skills/clipboard-vision/SKILL.md +1 -0
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +4 -4
- package/plugins/claude-code/skills/domain-modeling/SKILL.md +1 -0
- package/plugins/claude-code/skills/grill-with-docs/SKILL.md +1 -0
- package/plugins/claude-code/skills/grilling/SKILL.md +1 -0
- package/plugins/claude-code/skills/improve-codebase-architecture/SKILL.md +1 -0
- package/plugins/claude-code/skills/ralph-loop/SKILL.md +1 -0
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +4 -4
- package/plugins/claude-code/skills/test-driven-development/SKILL.md +1 -0
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +4 -4
- package/plugins/claude-code/skills/test-specification-alignment/SKILL.md +1 -0
- package/plugins/claude-code/skills/to-issues/SKILL.md +1 -0
- package/plugins/dsh/package.json +1 -1
- package/plugins/dsh/skills/admin-template-guidelines/SKILL.md +1 -0
- package/plugins/dsh/skills/batch-grill-me/SKILL.md +1 -0
- package/plugins/dsh/skills/clipboard-vision/SKILL.md +1 -0
- package/plugins/dsh/skills/delphi-review/AGENTS.md +4 -4
- package/plugins/dsh/skills/domain-modeling/SKILL.md +1 -0
- package/plugins/dsh/skills/grill-with-docs/SKILL.md +1 -0
- package/plugins/dsh/skills/grilling/SKILL.md +1 -0
- package/plugins/dsh/skills/improve-codebase-architecture/SKILL.md +1 -0
- package/plugins/dsh/skills/ralph-loop/SKILL.md +1 -0
- package/plugins/dsh/skills/sprint-flow/AGENTS.md +4 -4
- package/plugins/dsh/skills/test-driven-development/SKILL.md +1 -0
- package/plugins/dsh/skills/test-specification-alignment/AGENTS.md +4 -4
- package/plugins/dsh/skills/test-specification-alignment/SKILL.md +1 -0
- package/plugins/dsh/skills/to-issues/SKILL.md +1 -0
- package/plugins/opencode/package.json +1 -1
- package/plugins/opencode/skills/admin-template-guidelines/SKILL.md +1 -0
- package/plugins/opencode/skills/batch-grill-me/SKILL.md +1 -0
- package/plugins/opencode/skills/clipboard-vision/SKILL.md +1 -0
- package/plugins/opencode/skills/delphi-review/AGENTS.md +4 -4
- package/plugins/opencode/skills/domain-modeling/SKILL.md +1 -0
- package/plugins/opencode/skills/grill-with-docs/SKILL.md +1 -0
- package/plugins/opencode/skills/grilling/SKILL.md +1 -0
- package/plugins/opencode/skills/improve-codebase-architecture/SKILL.md +1 -0
- package/plugins/opencode/skills/ralph-loop/SKILL.md +1 -0
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +4 -4
- package/plugins/opencode/skills/test-driven-development/SKILL.md +1 -0
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +4 -4
- package/plugins/opencode/skills/test-specification-alignment/SKILL.md +1 -0
- package/plugins/opencode/skills/to-issues/SKILL.md +1 -0
- package/plugins/qoder/plugin.json +1 -1
- package/plugins/qoder/skills/delphi-review/AGENTS.md +4 -4
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +4 -4
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +4 -4
- package/principles/AGENTS.md +4 -4
- package/principles/adapters/__tests__/java.test.ts +317 -0
- package/principles/adapters/java.ts +325 -13
- package/principles/boy-scout.ts +36 -6
- package/scripts/sync-package-content.js +13 -6
- package/skills/admin-template-guidelines/SKILL.md +1 -0
- package/skills/batch-grill-me/SKILL.md +1 -0
- package/skills/clipboard-vision/SKILL.md +1 -0
- package/skills/delphi-review/AGENTS.md +4 -4
- package/skills/domain-modeling/SKILL.md +1 -0
- package/skills/grill-with-docs/SKILL.md +1 -0
- package/skills/grilling/SKILL.md +1 -0
- package/skills/improve-codebase-architecture/SKILL.md +1 -0
- package/skills/ralph-loop/SKILL.md +1 -0
- package/skills/sprint-flow/AGENTS.md +4 -4
- package/skills/test-driven-development/SKILL.md +1 -0
- package/skills/test-specification-alignment/AGENTS.md +4 -4
- package/skills/test-specification-alignment/SKILL.md +1 -0
- package/skills/to-issues/SKILL.md +1 -0
package/principles/boy-scout.ts
CHANGED
|
@@ -785,12 +785,44 @@ function reportBaselineUpdate(
|
|
|
785
785
|
console.log(` preserved:${preserved.length > 0 ? ` ${list(preserved)}` : ' (none)'}`);
|
|
786
786
|
}
|
|
787
787
|
|
|
788
|
+
/**
|
|
789
|
+
* Record budget entries for files the gate meets for the first time, then save
|
|
790
|
+
* and report the write. Split out of `runEnforcement` to keep both under the
|
|
791
|
+
* long-function threshold; also carries the #452 REQ-2 visibility contract:
|
|
792
|
+
* the report distinguishes "created" from "updated" and names every entry the
|
|
793
|
+
* auto-init introduced, never just a count.
|
|
794
|
+
*/
|
|
795
|
+
async function autoInitMissingEntries(
|
|
796
|
+
baseline: Record<string, BaselineEntry>,
|
|
797
|
+
missingBaselineEntries: string[],
|
|
798
|
+
currentWarnings: Record<string, number>,
|
|
799
|
+
baselinePath: string,
|
|
800
|
+
baselineExisted: boolean,
|
|
801
|
+
): Promise<void> {
|
|
802
|
+
recordAutoInitializedEntries(baseline, missingBaselineEntries, currentWarnings);
|
|
803
|
+
await saveBaseline(baselinePath, baseline);
|
|
804
|
+
const action = baselineExisted ? 'updated' : 'created';
|
|
805
|
+
const noun = missingBaselineEntries.length === 1 ? 'entry' : 'entries';
|
|
806
|
+
console.log(`ℹ️ Baseline ${action}: ${baselinePath}`);
|
|
807
|
+
console.log(` auto-initialized ${noun}: ${missingBaselineEntries.join(', ')}`);
|
|
808
|
+
}
|
|
809
|
+
|
|
788
810
|
async function runEnforcement(newFiles: string[], modifiedFiles: string[], baselinePath: string): Promise<EnforcementResult> {
|
|
789
811
|
const allFiles = [...newFiles.filter(f => f.trim()), ...modifiedFiles.filter(f => f.trim())];
|
|
790
812
|
const currentWarnings = await analyzeWarningsForFiles(allFiles);
|
|
791
|
-
|
|
813
|
+
|
|
814
|
+
// Distinguishing "created" from "updated" is part of the auto-init contract
|
|
815
|
+
// (#452 REQ-2): a silently rewritten baseline is how unrelated entries used
|
|
816
|
+
// to vanish without anyone noticing.
|
|
817
|
+
let baselineExisted = false;
|
|
818
|
+
try {
|
|
819
|
+
await fs.access(baselinePath);
|
|
820
|
+
baselineExisted = true;
|
|
821
|
+
} catch {
|
|
822
|
+
baselineExisted = false;
|
|
823
|
+
}
|
|
792
824
|
const baseline = await loadBaseline(baselinePath);
|
|
793
|
-
|
|
825
|
+
|
|
794
826
|
// Check for missing baseline entries for modified files
|
|
795
827
|
const missingBaselineEntries: string[] = [];
|
|
796
828
|
for (const file of modifiedFiles) {
|
|
@@ -798,13 +830,11 @@ async function runEnforcement(newFiles: string[], modifiedFiles: string[], basel
|
|
|
798
830
|
missingBaselineEntries.push(file);
|
|
799
831
|
}
|
|
800
832
|
}
|
|
801
|
-
|
|
833
|
+
|
|
802
834
|
// Files being modified for the first time get their current count recorded, so
|
|
803
835
|
// the next modification is compared against a real budget instead of nothing.
|
|
804
836
|
if (missingBaselineEntries.length > 0) {
|
|
805
|
-
|
|
806
|
-
await saveBaseline(baselinePath, baseline);
|
|
807
|
-
console.log(`ℹ️ Auto-initialized baseline for ${missingBaselineEntries.length} files`);
|
|
837
|
+
await autoInitMissingEntries(baseline, missingBaselineEntries, currentWarnings, baselinePath, baselineExisted);
|
|
808
838
|
}
|
|
809
839
|
|
|
810
840
|
const deltaResults: DeltaResult[] = [];
|
|
@@ -419,7 +419,7 @@ function checkAdapterDrift(srcRootPath, mirrorRootPath) {
|
|
|
419
419
|
if (mismatched.length > 0) {
|
|
420
420
|
console.error(`[drift-check] ERROR: ${mismatched.length} adapter file(s) have drifted (SHA-256 mismatch):`);
|
|
421
421
|
for (const f of mismatched) console.error(` - ${f}`);
|
|
422
|
-
console.error('[drift-check] Fix: Run `node src/npm-package/scripts/sync-package-content.js` (
|
|
422
|
+
console.error('[drift-check] Fix: Run `node src/npm-package/scripts/sync-package-content.js --fix` to resync (plain invocation is a check-only gate for CI).');
|
|
423
423
|
}
|
|
424
424
|
|
|
425
425
|
if (srcOnly.length > 0 || mirrorOnly.length > 0 || mismatched.length > 0) {
|
|
@@ -449,11 +449,18 @@ function checkDocsDrift(preCommitPath, prePushPath, readmePath, agentsPath) {
|
|
|
449
449
|
function main() {
|
|
450
450
|
console.error(`[sync] repo root: ${REPO_ROOT}`);
|
|
451
451
|
console.error(`[sync] package root: ${PKG_ROOT}`);
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
452
|
+
// Drift gates run BEFORE the sync on purpose: CI's Mirror Parity job relies
|
|
453
|
+
// on a drifted commit failing here rather than being silently healed by the
|
|
454
|
+
// copy loop. Local repair therefore needs the explicit `--fix` escape hatch
|
|
455
|
+
// (the pre-sync "Fix: Run …" advice used to deadlock against this gate).
|
|
456
|
+
const fixMode = process.argv.includes('--fix');
|
|
457
|
+
if (!fixMode) {
|
|
458
|
+
if (checkDocsDrift() === false) {
|
|
459
|
+
process.exit(1);
|
|
460
|
+
}
|
|
461
|
+
if (checkAdapterDrift() === false) {
|
|
462
|
+
process.exit(1);
|
|
463
|
+
}
|
|
457
464
|
}
|
|
458
465
|
const skills = syncSkills();
|
|
459
466
|
const plugins = syncPlugins();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: admin-template-guidelines
|
|
3
|
+
version: 1.0.0
|
|
3
4
|
description: "6 maintainability rules for AI-generated admin interfaces (Fastify + Nunjucks + HTMX + Alpine.js). Prevents route bloat, test inconsistency, Nunjucks traps, repeated data logic, auth blind spots, and HTMX/Alpine confusion."
|
|
4
5
|
maturity: alpha
|
|
5
6
|
---
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-10-
|
|
4
|
-
**Commit:**
|
|
5
|
-
**Branch:**
|
|
6
|
-
**Version:** 0.20.
|
|
3
|
+
**Generated:** 2026-10-12
|
|
4
|
+
**Commit:** unknown
|
|
5
|
+
**Branch:** unknown
|
|
6
|
+
**Version:** 0.20.2.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,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: domain-modeling
|
|
3
|
+
version: 1.0.0
|
|
3
4
|
description: Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.
|
|
4
5
|
---
|
|
5
6
|
|
package/skills/grilling/SKILL.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: improve-codebase-architecture
|
|
3
|
+
version: 1.0.0
|
|
3
4
|
description: Find deepening opportunities in a codebase, informed by domain language in CONTEXT.md and decisions in ADRs. Use when user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more AI-navigable. Run periodically (weekly or after surges of development).
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
|
-
**Generated:** 2026-10-
|
|
4
|
-
**Commit:**
|
|
5
|
-
**Branch:**
|
|
6
|
-
**Version:** 0.20.
|
|
3
|
+
**Generated:** 2026-10-12
|
|
4
|
+
**Commit:** unknown
|
|
5
|
+
**Branch:** unknown
|
|
6
|
+
**Version:** 0.20.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-10-
|
|
4
|
-
**Commit:**
|
|
5
|
-
**Branch:**
|
|
6
|
-
**Version:** 0.20.
|
|
3
|
+
**Generated:** 2026-10-12
|
|
4
|
+
**Commit:** unknown
|
|
5
|
+
**Branch:** unknown
|
|
6
|
+
**Version:** 0.20.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,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: to-issues
|
|
3
|
+
version: 1.0.0
|
|
3
4
|
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
|
---
|
|
5
6
|
|