xtrm-tools 2.1.6 → 2.1.8
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/cli/dist/index.cjs +107 -22
- package/cli/dist/index.cjs.map +1 -1
- package/cli/package.json +4 -1
- package/config/hooks.json +5 -0
- package/hooks/README.md +19 -0
- package/hooks/beads-stop-gate.mjs +1 -0
- package/hooks/main-guard-post-push.mjs +71 -0
- package/package.json +11 -4
- package/project-skills/{py-quality-gate → quality-gates}/.claude/settings.json +10 -0
- package/project-skills/quality-gates/.claude/skills/using-quality-gates/SKILL.md +254 -0
- package/project-skills/quality-gates/README.md +109 -0
- package/project-skills/quality-gates/evals/evals.json +181 -0
- package/project-skills/quality-gates/workspace/iteration-1/FINAL-EVAL-SUMMARY.md +75 -0
- package/project-skills/quality-gates/workspace/iteration-1/edge-case-auto-fix-verification/with_skill/outputs/response.md +59 -0
- package/project-skills/quality-gates/workspace/iteration-1/edge-case-mixed-language-project/with_skill/outputs/response.md +60 -0
- package/project-skills/quality-gates/workspace/iteration-1/eval-summary.md +105 -0
- package/project-skills/quality-gates/workspace/iteration-1/partial-install-python-only/with_skill/outputs/response.md +93 -0
- package/project-skills/quality-gates/workspace/iteration-1/python-refactor-request/with_skill/outputs/response.md +104 -0
- package/project-skills/quality-gates/workspace/iteration-1/quality-gate-error-fix/with_skill/outputs/response.md +74 -0
- package/project-skills/quality-gates/workspace/iteration-1/should-not-trigger-general-chat/with_skill/outputs/response.md +18 -0
- package/project-skills/quality-gates/workspace/iteration-1/should-not-trigger-math-question/with_skill/outputs/response.md +18 -0
- package/project-skills/quality-gates/workspace/iteration-1/should-not-trigger-unrelated-coding/with_skill/outputs/response.md +56 -0
- package/project-skills/quality-gates/workspace/iteration-1/tdd-guard-blocking-confusion/with_skill/outputs/response.md +67 -0
- package/project-skills/quality-gates/workspace/iteration-1/typescript-feature-with-tests/with_skill/outputs/response.md +97 -0
- package/project-skills/tdd-guard/.claude/hooks/tdd-guard-pretool-bridge.cjs +0 -1
- package/hooks/__pycache__/agent_context.cpython-314.pyc +0 -0
- package/project-skills/py-quality-gate/.claude/skills/using-py-quality-gate/SKILL.md +0 -112
- package/project-skills/py-quality-gate/README.md +0 -147
- package/project-skills/service-skills-set/.claude/git-hooks/__pycache__/doc_reminder.cpython-314.pyc +0 -0
- package/project-skills/service-skills-set/.claude/git-hooks/__pycache__/skill_staleness.cpython-314.pyc +0 -0
- package/project-skills/service-skills-set/.claude/skills/creating-service-skills/scripts/__pycache__/bootstrap.cpython-314.pyc +0 -0
- package/project-skills/service-skills-set/.claude/skills/updating-service-skills/scripts/__pycache__/drift_detector.cpython-314.pyc +0 -0
- package/project-skills/service-skills-set/.claude/skills/using-service-skills/scripts/__pycache__/cataloger.cpython-314.pyc +0 -0
- package/project-skills/service-skills-set/.claude/skills/using-service-skills/scripts/__pycache__/skill_activator.cpython-314.pyc +0 -0
- package/project-skills/service-skills-set/.claude/skills/using-service-skills/scripts/__pycache__/test_skill_activator.cpython-314-pytest-9.0.2.pyc +0 -0
- package/project-skills/service-skills-set/.claude/skills/using-service-skills/scripts/test_skill_activator.py +0 -58
- package/project-skills/service-skills-set/__pycache__/install-service-skills.cpython-314.pyc +0 -0
- package/project-skills/ts-quality-gate/.claude/settings.json +0 -16
- package/project-skills/ts-quality-gate/.claude/skills/using-ts-quality-gate/SKILL.md +0 -81
- package/project-skills/ts-quality-gate/README.md +0 -115
- package/skills/documenting/scripts/__pycache__/drift_detector.cpython-314.pyc +0 -0
- package/skills/documenting/scripts/__pycache__/orchestrator.cpython-314.pyc +0 -0
- package/skills/documenting/scripts/__pycache__/validate_metadata.cpython-314.pyc +0 -0
- package/skills/documenting/scripts/changelog/__pycache__/__init__.cpython-314.pyc +0 -0
- package/skills/documenting/scripts/changelog/__pycache__/add_entry.cpython-314.pyc +0 -0
- package/skills/documenting/scripts/changelog/__pycache__/bump_release.cpython-314.pyc +0 -0
- package/skills/documenting/scripts/changelog/__pycache__/validate_changelog.cpython-314.pyc +0 -0
- package/skills/documenting/tests/__pycache__/test_changelog.cpython-314-pytest-9.0.2.pyc +0 -0
- package/skills/documenting/tests/__pycache__/test_drift_detector.cpython-314-pytest-9.0.2.pyc +0 -0
- package/skills/documenting/tests/__pycache__/test_orchestrator.cpython-314-pytest-9.0.2.pyc +0 -0
- package/skills/documenting/tests/__pycache__/test_validate_metadata.cpython-314-pytest-9.0.2.pyc +0 -0
- package/skills/documenting/tests/integration_test.sh +0 -70
- package/skills/documenting/tests/test_changelog.py +0 -201
- package/skills/documenting/tests/test_drift_detector.py +0 -80
- package/skills/documenting/tests/test_orchestrator.py +0 -52
- package/skills/documenting/tests/test_validate_metadata.py +0 -64
- /package/project-skills/{ts-quality-gate → quality-gates}/.claude/hooks/hook-config.json +0 -0
- /package/project-skills/{ts-quality-gate → quality-gates}/.claude/hooks/quality-check.cjs +0 -0
- /package/project-skills/{py-quality-gate → quality-gates}/.claude/hooks/quality-check.py +0 -0
package/cli/dist/index.cjs
CHANGED
|
@@ -41089,8 +41089,28 @@ async function installProjectSkill(toolName, projectRootOverride) {
|
|
|
41089
41089
|
console.log(kleur_default.white(` Please read: ${kleur_default.cyan(".claude/docs/" + toolName + "-readme.md")}
|
|
41090
41090
|
`));
|
|
41091
41091
|
if (toolName === "tdd-guard") {
|
|
41092
|
-
|
|
41093
|
-
|
|
41092
|
+
const tddGuardCheck = (0, import_child_process3.spawnSync)("tdd-guard", ["--version"], { stdio: "pipe" });
|
|
41093
|
+
if (tddGuardCheck.status !== 0) {
|
|
41094
|
+
console.log(kleur_default.red(" \u2717 tdd-guard CLI not found globally!\n"));
|
|
41095
|
+
console.log(kleur_default.white(" Install the global CLI:"));
|
|
41096
|
+
console.log(kleur_default.cyan(" npm install -g tdd-guard\n"));
|
|
41097
|
+
} else {
|
|
41098
|
+
console.log(kleur_default.green(" \u2713 tdd-guard CLI found globally"));
|
|
41099
|
+
}
|
|
41100
|
+
console.log(kleur_default.white("\n Install a test reporter (choose one):"));
|
|
41101
|
+
console.log(kleur_default.dim(" npm install --save-dev tdd-guard-vitest # Vitest"));
|
|
41102
|
+
console.log(kleur_default.dim(" npm install --save-dev tdd-guard-jest # Jest"));
|
|
41103
|
+
console.log(kleur_default.dim(" pip install tdd-guard-pytest # pytest\n"));
|
|
41104
|
+
}
|
|
41105
|
+
if (toolName === "quality-gates") {
|
|
41106
|
+
console.log(kleur_default.white(" Install language dependencies:\n"));
|
|
41107
|
+
console.log(kleur_default.white(" TypeScript:"));
|
|
41108
|
+
console.log(kleur_default.dim(" npm install --save-dev typescript eslint prettier"));
|
|
41109
|
+
console.log(kleur_default.white("\n Python:"));
|
|
41110
|
+
console.log(kleur_default.dim(" pip install ruff mypy"));
|
|
41111
|
+
console.log(kleur_default.white("\n For TDD (test-first) enforcement, install separately:"));
|
|
41112
|
+
console.log(kleur_default.dim(" npm install -g tdd-guard"));
|
|
41113
|
+
console.log(kleur_default.dim(" xtrm install project tdd-guard\n"));
|
|
41094
41114
|
}
|
|
41095
41115
|
console.log(kleur_default.green(" \u2713 Installation complete!\n"));
|
|
41096
41116
|
}
|
|
@@ -41114,33 +41134,55 @@ Installing ${skills.length} project skills:
|
|
|
41114
41134
|
}
|
|
41115
41135
|
function buildProjectInitGuide() {
|
|
41116
41136
|
const lines = [
|
|
41117
|
-
kleur_default.bold("\nProject Init \u2014
|
|
41118
|
-
|
|
41119
|
-
kleur_default.
|
|
41120
|
-
kleur_default.dim("
|
|
41121
|
-
kleur_default.dim(" -
|
|
41137
|
+
kleur_default.bold("\nProject Init \u2014 Production baseline\n"),
|
|
41138
|
+
kleur_default.dim("This command prints a complete setup checklist and then bootstraps beads + GitNexus for this repo.\n"),
|
|
41139
|
+
`${kleur_default.cyan("1) Install core project enforcement (quality-gates):")}`,
|
|
41140
|
+
kleur_default.dim(" xtrm install project quality-gates"),
|
|
41141
|
+
kleur_default.dim(" - Installs TypeScript + Python PostToolUse quality hooks"),
|
|
41142
|
+
kleur_default.dim(" - Includes Serena matcher coverage for edit-equivalent tools"),
|
|
41143
|
+
kleur_default.dim(" - Enforces linting/type-checking based on your repo config"),
|
|
41144
|
+
"",
|
|
41145
|
+
`${kleur_default.cyan("2) Optional installs depending on workflow:")}`,
|
|
41146
|
+
kleur_default.dim(" xtrm install project tdd-guard"),
|
|
41147
|
+
kleur_default.dim(" - Strong test-first enforcement (PreToolUse + prompt/session checks)"),
|
|
41148
|
+
kleur_default.dim(" xtrm install project service-skills-set"),
|
|
41149
|
+
kleur_default.dim(" - Service-aware skill routing + drift checks + git hook reminders"),
|
|
41150
|
+
"",
|
|
41151
|
+
`${kleur_default.cyan("3) Configure repo checks (hooks only enforce what your repo defines):")}`,
|
|
41152
|
+
kleur_default.dim(" - Tests: should fail on regressions (required for TDD workflows)"),
|
|
41153
|
+
kleur_default.dim(" - TS: eslint + prettier + tsc"),
|
|
41154
|
+
kleur_default.dim(" - PY: ruff + mypy/pyright"),
|
|
41122
41155
|
"",
|
|
41123
|
-
`${kleur_default.cyan("
|
|
41124
|
-
kleur_default.dim(" -
|
|
41125
|
-
kleur_default.dim(" -
|
|
41126
|
-
kleur_default.dim(
|
|
41127
|
-
kleur_default.dim(" - Hooks only enforce what your project config defines"),
|
|
41156
|
+
`${kleur_default.cyan("4) Beads workflow (required for gated edit/commit flow):")}`,
|
|
41157
|
+
kleur_default.dim(" - Claim work: bd ready --json -> bd update <id> --claim --json"),
|
|
41158
|
+
kleur_default.dim(" - During work: keep issue status current; create discovered follow-ups"),
|
|
41159
|
+
kleur_default.dim(' - Finish work: bd close <id> --reason "Done" --json'),
|
|
41128
41160
|
"",
|
|
41129
|
-
`${kleur_default.cyan("
|
|
41130
|
-
kleur_default.dim(" -
|
|
41131
|
-
kleur_default.dim(" -
|
|
41132
|
-
kleur_default.dim(" -
|
|
41161
|
+
`${kleur_default.cyan("5) Git workflow (main-guard expected path):")}`,
|
|
41162
|
+
kleur_default.dim(" - git checkout -b feature/<name>"),
|
|
41163
|
+
kleur_default.dim(" - commit on feature branch only"),
|
|
41164
|
+
kleur_default.dim(" - git push -u origin feature/<name>"),
|
|
41165
|
+
kleur_default.dim(" - gh pr create --fill && gh pr merge --squash"),
|
|
41166
|
+
kleur_default.dim(" - git checkout main && git pull --ff-only"),
|
|
41167
|
+
"",
|
|
41168
|
+
`${kleur_default.cyan("6) Hooks and startup automation:")}`,
|
|
41169
|
+
kleur_default.dim(" - PreToolUse: safety gates (main/beads/TDD/type-safety/etc.)"),
|
|
41170
|
+
kleur_default.dim(" - PostToolUse: quality checks + reminders"),
|
|
41171
|
+
kleur_default.dim(" - Stop: beads stop-gate prevents unresolved session claims"),
|
|
41172
|
+
kleur_default.dim(" - SessionStart: workflow context reminders"),
|
|
41133
41173
|
"",
|
|
41134
41174
|
kleur_default.bold("Quick start commands:"),
|
|
41135
41175
|
kleur_default.dim(" xtrm install project list"),
|
|
41136
|
-
kleur_default.dim(" xtrm install project
|
|
41176
|
+
kleur_default.dim(" xtrm install project quality-gates"),
|
|
41177
|
+
kleur_default.dim(" xtrm install project tdd-guard"),
|
|
41178
|
+
kleur_default.dim(" xtrm install project service-skills-set"),
|
|
41137
41179
|
""
|
|
41138
41180
|
];
|
|
41139
41181
|
return lines.join("\n");
|
|
41140
41182
|
}
|
|
41141
41183
|
async function printProjectInitGuide() {
|
|
41142
41184
|
console.log(buildProjectInitGuide());
|
|
41143
|
-
await
|
|
41185
|
+
await bootstrapProjectInit();
|
|
41144
41186
|
}
|
|
41145
41187
|
async function installProjectByName(toolName) {
|
|
41146
41188
|
if (toolName === "all" || toolName === "*") {
|
|
@@ -41149,16 +41191,20 @@ async function installProjectByName(toolName) {
|
|
|
41149
41191
|
}
|
|
41150
41192
|
await installProjectSkill(toolName);
|
|
41151
41193
|
}
|
|
41152
|
-
async function
|
|
41194
|
+
async function bootstrapProjectInit() {
|
|
41153
41195
|
let projectRoot;
|
|
41154
41196
|
try {
|
|
41155
41197
|
projectRoot = getProjectRoot();
|
|
41156
41198
|
} catch (err) {
|
|
41157
41199
|
console.log(kleur_default.yellow(`
|
|
41158
|
-
\u26A0 Skipping
|
|
41200
|
+
\u26A0 Skipping project bootstrap: ${err.message}
|
|
41159
41201
|
`));
|
|
41160
41202
|
return;
|
|
41161
41203
|
}
|
|
41204
|
+
await runBdInitForProject(projectRoot);
|
|
41205
|
+
await runGitNexusInitForProject(projectRoot);
|
|
41206
|
+
}
|
|
41207
|
+
async function runBdInitForProject(projectRoot) {
|
|
41162
41208
|
console.log(kleur_default.bold("Running beads initialization (bd init)..."));
|
|
41163
41209
|
const result = (0, import_child_process3.spawnSync)("bd", ["init"], {
|
|
41164
41210
|
cwd: projectRoot,
|
|
@@ -41184,6 +41230,44 @@ ${result.stderr || ""}`.toLowerCase();
|
|
|
41184
41230
|
if (result.stdout) process.stdout.write(result.stdout);
|
|
41185
41231
|
if (result.stderr) process.stderr.write(result.stderr);
|
|
41186
41232
|
}
|
|
41233
|
+
async function runGitNexusInitForProject(projectRoot) {
|
|
41234
|
+
const gitnexusCheck = (0, import_child_process3.spawnSync)("gitnexus", ["--version"], {
|
|
41235
|
+
cwd: projectRoot,
|
|
41236
|
+
encoding: "utf8",
|
|
41237
|
+
timeout: 5e3
|
|
41238
|
+
});
|
|
41239
|
+
if (gitnexusCheck.status !== 0) {
|
|
41240
|
+
console.log(kleur_default.yellow(" \u26A0 gitnexus not found; skipping index bootstrap"));
|
|
41241
|
+
console.log(kleur_default.dim(" Install with: npm install -g gitnexus"));
|
|
41242
|
+
return;
|
|
41243
|
+
}
|
|
41244
|
+
console.log(kleur_default.bold("Checking GitNexus index status..."));
|
|
41245
|
+
const status = (0, import_child_process3.spawnSync)("gitnexus", ["status"], {
|
|
41246
|
+
cwd: projectRoot,
|
|
41247
|
+
encoding: "utf8",
|
|
41248
|
+
timeout: 1e4
|
|
41249
|
+
});
|
|
41250
|
+
const statusText = `${status.stdout || ""}
|
|
41251
|
+
${status.stderr || ""}`.toLowerCase();
|
|
41252
|
+
const needsAnalyze = status.status !== 0 || statusText.includes("stale") || statusText.includes("not indexed") || statusText.includes("missing");
|
|
41253
|
+
if (!needsAnalyze) {
|
|
41254
|
+
console.log(kleur_default.dim(" \u2713 GitNexus index is ready"));
|
|
41255
|
+
return;
|
|
41256
|
+
}
|
|
41257
|
+
console.log(kleur_default.bold("Running GitNexus indexing (gitnexus analyze)..."));
|
|
41258
|
+
const analyze = (0, import_child_process3.spawnSync)("gitnexus", ["analyze"], {
|
|
41259
|
+
cwd: projectRoot,
|
|
41260
|
+
encoding: "utf8",
|
|
41261
|
+
timeout: 12e4
|
|
41262
|
+
});
|
|
41263
|
+
if (analyze.status === 0) {
|
|
41264
|
+
console.log(kleur_default.green(" \u2713 GitNexus index updated"));
|
|
41265
|
+
return;
|
|
41266
|
+
}
|
|
41267
|
+
if (analyze.stdout) process.stdout.write(analyze.stdout);
|
|
41268
|
+
if (analyze.stderr) process.stderr.write(analyze.stderr);
|
|
41269
|
+
console.log(kleur_default.yellow(` \u26A0 gitnexus analyze exited with code ${analyze.status}`));
|
|
41270
|
+
}
|
|
41187
41271
|
async function listProjectSkills() {
|
|
41188
41272
|
const entries = await getAvailableProjectSkills();
|
|
41189
41273
|
if (entries.length === 0) {
|
|
@@ -41247,7 +41331,7 @@ function createInstallProjectCommand() {
|
|
|
41247
41331
|
const listCmd = new Command("list").description("List available project skills").action(async () => {
|
|
41248
41332
|
await listProjectSkills();
|
|
41249
41333
|
});
|
|
41250
|
-
const initCmd = new Command("init").description("Show
|
|
41334
|
+
const initCmd = new Command("init").description("Show full onboarding guidance and bootstrap beads + GitNexus").action(async () => {
|
|
41251
41335
|
await printProjectInitGuide();
|
|
41252
41336
|
});
|
|
41253
41337
|
installProjectCmd.addCommand(listCmd);
|
|
@@ -41256,7 +41340,7 @@ function createInstallProjectCommand() {
|
|
|
41256
41340
|
}
|
|
41257
41341
|
function createProjectCommand() {
|
|
41258
41342
|
const projectCmd = new Command("project").description("Project skill onboarding and installation helpers");
|
|
41259
|
-
projectCmd.command("init").description("Show
|
|
41343
|
+
projectCmd.command("init").description("Show full onboarding guidance and bootstrap beads + GitNexus").action(async () => {
|
|
41260
41344
|
await printProjectInitGuide();
|
|
41261
41345
|
});
|
|
41262
41346
|
projectCmd.command("list").description("List available project skills").action(async () => {
|
|
@@ -55630,6 +55714,7 @@ var import_path15 = __toESM(require("path"), 1);
|
|
|
55630
55714
|
var import_fs_extra14 = __toESM(require_lib2(), 1);
|
|
55631
55715
|
var HOOK_CATALOG = [
|
|
55632
55716
|
{ file: "main-guard.mjs", event: "PreToolUse", desc: "Blocks direct edits on protected branches" },
|
|
55717
|
+
{ file: "main-guard-post-push.mjs", event: "PostToolUse", desc: "After feature-branch push, reminds PR/merge/sync steps" },
|
|
55633
55718
|
{ file: "skill-suggestion.py", event: "UserPromptSubmit", desc: "Suggests relevant skills based on user prompt" },
|
|
55634
55719
|
{ file: "serena-workflow-reminder.py", event: "SessionStart", desc: "Injects Serena semantic editing workflow reminder" },
|
|
55635
55720
|
{ file: "type-safety-enforcement.py", event: "PreToolUse", desc: "Prevents risky Bash and enforces safe edit patterns" },
|