agent-gauntlet 0.15.0 → 0.15.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/dist/index.js +67 -233
- package/dist/index.js.map +5 -5
- package/package.json +3 -2
- package/skills/gauntlet-check/SKILL.md +22 -0
- package/skills/gauntlet-run/SKILL.md +67 -0
- package/{dist/skill-templates/setup-skill.md → skills/gauntlet-setup/SKILL.md} +10 -1
- /package/{dist/skill-templates/fix-pr.md → skills/gauntlet-fix-pr/SKILL.md} +0 -0
- /package/{dist/skill-templates/help-skill.md → skills/gauntlet-help/SKILL.md} +0 -0
- /package/{dist/skill-templates/help-ref-adapter-troubleshooting.md → skills/gauntlet-help/references/adapter-troubleshooting.md} +0 -0
- /package/{dist/skill-templates/help-ref-ci-pr-troubleshooting.md → skills/gauntlet-help/references/ci-pr-troubleshooting.md} +0 -0
- /package/{dist/skill-templates/help-ref-config-troubleshooting.md → skills/gauntlet-help/references/config-troubleshooting.md} +0 -0
- /package/{dist/skill-templates/help-ref-gate-troubleshooting.md → skills/gauntlet-help/references/gate-troubleshooting.md} +0 -0
- /package/{dist/skill-templates/help-ref-lock-troubleshooting.md → skills/gauntlet-help/references/lock-troubleshooting.md} +0 -0
- /package/{dist/skill-templates/help-ref-stop-hook-troubleshooting.md → skills/gauntlet-help/references/stop-hook-troubleshooting.md} +0 -0
- /package/{dist/skill-templates/push-pr.md → skills/gauntlet-push-pr/SKILL.md} +0 -0
- /package/{dist/skill-templates/gauntlet-run-extract-prompt.md → skills/gauntlet-run/extract-prompt.md} +0 -0
- /package/{dist/skill-templates/gauntlet-run-update-prompt.md → skills/gauntlet-run/update-prompt.md} +0 -0
- /package/{dist/skill-templates → skills/gauntlet-setup/references}/check-catalog.md +0 -0
- /package/{dist/skill-templates/setup-ref-project-structure.md → skills/gauntlet-setup/references/project-structure.md} +0 -0
- /package/{dist/skill-templates/status.md → skills/gauntlet-status/SKILL.md} +0 -0
package/dist/index.js
CHANGED
|
@@ -287,7 +287,7 @@ import { Command } from "commander";
|
|
|
287
287
|
// package.json
|
|
288
288
|
var package_default = {
|
|
289
289
|
name: "agent-gauntlet",
|
|
290
|
-
version: "0.15.
|
|
290
|
+
version: "0.15.2",
|
|
291
291
|
description: "A CLI tool for testing AI coding agents",
|
|
292
292
|
license: "MIT",
|
|
293
293
|
author: "Paul Caplan",
|
|
@@ -308,6 +308,7 @@ var package_default = {
|
|
|
308
308
|
],
|
|
309
309
|
files: [
|
|
310
310
|
"dist",
|
|
311
|
+
"skills",
|
|
311
312
|
"README.md",
|
|
312
313
|
"LICENSE"
|
|
313
314
|
],
|
|
@@ -323,7 +324,7 @@ var package_default = {
|
|
|
323
324
|
"build:npm": "bun build.ts",
|
|
324
325
|
prepublishOnly: "bun run build:npm",
|
|
325
326
|
test: "bun test",
|
|
326
|
-
"test:e2e": "bun run build:npm && bun test/integration/
|
|
327
|
+
"test:e2e": "bun run build:npm && bun test test/integration/",
|
|
327
328
|
lint: "biome check src",
|
|
328
329
|
typecheck: "tsc --noEmit && tsc --noEmit -p test/tsconfig.json",
|
|
329
330
|
changeset: "changeset",
|
|
@@ -2874,8 +2875,7 @@ class ClaudeAdapter {
|
|
|
2874
2875
|
|
|
2875
2876
|
--- DIFF ---
|
|
2876
2877
|
${opts.diff}`;
|
|
2877
|
-
const
|
|
2878
|
-
const tmpFile = path11.join(tmpDir, `gauntlet-claude-${process.pid}-${Date.now()}.txt`);
|
|
2878
|
+
const tmpFile = path11.join(os2.tmpdir(), `gauntlet-claude-${process.pid}-${Date.now()}.txt`);
|
|
2879
2879
|
await fs11.writeFile(tmpFile, fullContent);
|
|
2880
2880
|
const args = ["-p"];
|
|
2881
2881
|
if (opts.allowToolUse === false) {
|
|
@@ -2890,8 +2890,9 @@ ${opts.diff}`;
|
|
|
2890
2890
|
thinkingEnv.MAX_THINKING_TOKENS = String(CLAUDE_THINKING_TOKENS[opts.thinkingBudget]);
|
|
2891
2891
|
}
|
|
2892
2892
|
const cleanup = () => fs11.unlink(tmpFile).catch(() => {});
|
|
2893
|
+
const { CLAUDECODE: _, ...parentEnv } = process.env;
|
|
2893
2894
|
const execEnv = {
|
|
2894
|
-
...
|
|
2895
|
+
...parentEnv,
|
|
2895
2896
|
[GAUNTLET_STOP_HOOK_ACTIVE_ENV]: "1",
|
|
2896
2897
|
...otelEnv,
|
|
2897
2898
|
...thinkingEnv
|
|
@@ -7222,7 +7223,7 @@ function registerHelpCommand(program) {
|
|
|
7222
7223
|
});
|
|
7223
7224
|
}
|
|
7224
7225
|
// src/commands/init.ts
|
|
7225
|
-
import {
|
|
7226
|
+
import { statSync } from "node:fs";
|
|
7226
7227
|
import fs27 from "node:fs/promises";
|
|
7227
7228
|
import path26 from "node:path";
|
|
7228
7229
|
import { fileURLToPath } from "node:url";
|
|
@@ -7242,28 +7243,6 @@ async function computeSkillChecksum(skillDir) {
|
|
|
7242
7243
|
}
|
|
7243
7244
|
return hash.digest("hex");
|
|
7244
7245
|
}
|
|
7245
|
-
function computeExpectedSkillChecksum(content, references, siblingFiles) {
|
|
7246
|
-
const entries = [
|
|
7247
|
-
{ relativePath: "SKILL.md", content },
|
|
7248
|
-
...toEntries(siblingFiles, ""),
|
|
7249
|
-
...toEntries(references, "references")
|
|
7250
|
-
];
|
|
7251
|
-
entries.sort((a, b) => a.relativePath.localeCompare(b.relativePath));
|
|
7252
|
-
const hash = createHash("sha256");
|
|
7253
|
-
for (const entry of entries) {
|
|
7254
|
-
hash.update(entry.relativePath);
|
|
7255
|
-
hash.update(entry.content);
|
|
7256
|
-
}
|
|
7257
|
-
return hash.digest("hex");
|
|
7258
|
-
}
|
|
7259
|
-
function toEntries(files, prefix) {
|
|
7260
|
-
if (!files)
|
|
7261
|
-
return [];
|
|
7262
|
-
return Object.entries(files).map(([name, content]) => ({
|
|
7263
|
-
relativePath: prefix ? path25.join(prefix, name) : name,
|
|
7264
|
-
content
|
|
7265
|
-
}));
|
|
7266
|
-
}
|
|
7267
7246
|
function computeHookChecksum(entries) {
|
|
7268
7247
|
const gauntletEntries = entries.filter((entry) => isGauntletHookEntry(entry));
|
|
7269
7248
|
const hash = createHash("sha256");
|
|
@@ -7358,10 +7337,37 @@ async function promptHookOverwrite(hookFile, skipPrompts) {
|
|
|
7358
7337
|
|
|
7359
7338
|
// src/commands/init.ts
|
|
7360
7339
|
var __dirname2 = path26.dirname(fileURLToPath(import.meta.url));
|
|
7361
|
-
|
|
7362
|
-
const
|
|
7363
|
-
|
|
7364
|
-
|
|
7340
|
+
var SKILLS_SOURCE_DIR = (() => {
|
|
7341
|
+
const bundled = path26.join(__dirname2, "..", "skills");
|
|
7342
|
+
const dev = path26.join(__dirname2, "..", "..", "skills");
|
|
7343
|
+
try {
|
|
7344
|
+
statSync(bundled);
|
|
7345
|
+
return bundled;
|
|
7346
|
+
} catch (err) {
|
|
7347
|
+
const code = err.code;
|
|
7348
|
+
if (code === "ENOENT" || code === "ENOTDIR")
|
|
7349
|
+
return dev;
|
|
7350
|
+
throw err;
|
|
7351
|
+
}
|
|
7352
|
+
})();
|
|
7353
|
+
var SKILL_ACTIONS = [
|
|
7354
|
+
"run",
|
|
7355
|
+
"check",
|
|
7356
|
+
"push-pr",
|
|
7357
|
+
"fix-pr",
|
|
7358
|
+
"status",
|
|
7359
|
+
"help",
|
|
7360
|
+
"setup"
|
|
7361
|
+
];
|
|
7362
|
+
var SKILL_DESCRIPTIONS = {
|
|
7363
|
+
run: "Run the verification suite",
|
|
7364
|
+
check: "Run checks only (no reviews)",
|
|
7365
|
+
"push-pr": "Commit, push, and create a PR",
|
|
7366
|
+
"fix-pr": "Fix PR review comments and CI failures",
|
|
7367
|
+
status: "Show gauntlet status",
|
|
7368
|
+
help: "Diagnose and explain gauntlet behavior",
|
|
7369
|
+
setup: "Configure checks and reviews interactively"
|
|
7370
|
+
};
|
|
7365
7371
|
var CLI_PREFERENCE_ORDER = [
|
|
7366
7372
|
"codex",
|
|
7367
7373
|
"claude",
|
|
@@ -7380,179 +7386,6 @@ var ADAPTER_CONFIG = {
|
|
|
7380
7386
|
model: "codex"
|
|
7381
7387
|
}
|
|
7382
7388
|
};
|
|
7383
|
-
function buildGauntletSkillContent(mode) {
|
|
7384
|
-
const isRun = mode === "run";
|
|
7385
|
-
const name = isRun ? "run" : "check";
|
|
7386
|
-
const description = isRun ? "Run the full verification gauntlet. Use this as the final step after completing a coding task — verifies quality, runs checks, and ensures all gates pass. Must be run before committing, pushing, or creating PRs." : "Run checks only (no reviews)";
|
|
7387
|
-
const command = isRun ? "agent-gauntlet run" : "agent-gauntlet check";
|
|
7388
|
-
const heading = isRun ? "Execute the autonomous verification suite." : "Run the gauntlet checks only — no AI reviews.";
|
|
7389
|
-
const disableModelInvocation = isRun ? "false" : "true";
|
|
7390
|
-
const allowedTools = isRun ? "Bash, Task" : "Bash";
|
|
7391
|
-
const frontmatter = `---
|
|
7392
|
-
name: gauntlet-${name}
|
|
7393
|
-
description: >-
|
|
7394
|
-
${description}
|
|
7395
|
-
disable-model-invocation: ${disableModelInvocation}
|
|
7396
|
-
allowed-tools: ${allowedTools}
|
|
7397
|
-
---`;
|
|
7398
|
-
const steps = [
|
|
7399
|
-
`1. Run \`agent-gauntlet clean\` to archive any previous log files`,
|
|
7400
|
-
`2. Run \`${command}\``
|
|
7401
|
-
];
|
|
7402
|
-
if (isRun) {
|
|
7403
|
-
steps.length = 0;
|
|
7404
|
-
steps.push(`1. Run \`agent-gauntlet clean\` to archive any previous log files.`, `2. Run \`${command}\` using \`Bash\` with \`timeout: 300000\`. Wait for the complete output. **Verify you can see a \`Status:\` line in the output before continuing.**`, `3. **Check the status line:**
|
|
7405
|
-
- \`Status: Passed\` → Go to step 8.
|
|
7406
|
-
- \`Status: Passed with warnings\` → Go to step 8.
|
|
7407
|
-
- \`Status: Failed\` → Continue to step 4. **You MUST continue — do not stop here.**
|
|
7408
|
-
- \`Status: Retry limit exceeded\` → Run \`agent-gauntlet clean\` to archive logs. Go to step 8.
|
|
7409
|
-
- No status line visible → The command may have timed out or failed to run. Re-run with a longer timeout or investigate the error. Do NOT proceed as if it passed.
|
|
7410
|
-
4. **Extract failures** (required when status is Failed):
|
|
7411
|
-
- Infer the log directory from the file paths in the console output (e.g., if output references \`gauntlet_logs/check_._lint.1.log\`, the log directory is \`gauntlet_logs/\`)
|
|
7412
|
-
- Read \`extract-prompt.md\` from this skill's directory
|
|
7413
|
-
- **Extract log failures** using the first available strategy:
|
|
7414
|
-
a. **Task tool** (Claude Code): \`Task\` with \`subagent_type="general-purpose"\`, \`model="haiku"\`, \`prompt=\` extract-prompt content + \`"\\n\\nLog directory: <inferred path>"\`. NEVER use \`run_in_background: true\`.
|
|
7415
|
-
b. **Subagent delegation**: If your environment supports delegating work to a subagent but not the Task tool, delegate the extract-prompt instructions with the log directory to a subagent for processing.
|
|
7416
|
-
c. **Inline fallback**: If no subagent capability is available, follow the extract-prompt instructions yourself to read the log files and produce the compact failure summary.
|
|
7417
|
-
5. **Fix code** based on the compact summary. You MUST address every actionable item:
|
|
7418
|
-
- CHECK failures with Fix Skill: invoke the named skill
|
|
7419
|
-
- CHECK failures with Fix Instructions: follow the instructions
|
|
7420
|
-
- REVIEW violations: apply the trust level above, fix or skip
|
|
7421
|
-
6. For REVIEW violations you addressed:
|
|
7422
|
-
- Read \`update-prompt.md\` from this skill's directory
|
|
7423
|
-
- **Update review decisions** using the first available strategy (same as step 4):
|
|
7424
|
-
a. **Task tool** (Claude Code): \`Task\` with \`subagent_type="general-purpose"\`, \`model="haiku"\`, \`prompt=\` update-prompt content + log directory + decisions list. NEVER use \`run_in_background: true\`.
|
|
7425
|
-
b. **Subagent delegation**: Delegate the update-prompt instructions with the log directory and decisions to a subagent.
|
|
7426
|
-
c. **Inline fallback**: Follow the update-prompt instructions yourself to update the review JSON files.
|
|
7427
|
-
7. **Re-run verification:** Run \`${command}\` again with \`Bash\` and \`timeout: 300000\`. Do NOT run \`agent-gauntlet clean\` between retries. The tool detects existing logs and automatically switches to verification mode. **Go back to step 3** to check the status line and repeat.
|
|
7428
|
-
8. **Provide a summary** of the session:
|
|
7429
|
-
- Final Status: (Passed / Passed with warnings / Retry limit exceeded)
|
|
7430
|
-
- Issues Fixed: (list key fixes)
|
|
7431
|
-
- Issues Skipped: (list skipped items and reasons)
|
|
7432
|
-
- Outstanding Failures: (if retry limit exceeded, list unverified fixes and remaining issues)`);
|
|
7433
|
-
} else {
|
|
7434
|
-
steps.push(`3. If any checks fail:
|
|
7435
|
-
- Read the \`.log\` file path provided in the output for each failed check. If the log contains a \`--- Fix Instructions ---\` section, follow those instructions. If it contains a \`--- Fix Skill: <name> ---\` section, invoke that skill.
|
|
7436
|
-
- Fix the issues found.
|
|
7437
|
-
4. Run \`${command}\` again to verify your fixes. Do NOT run \`agent-gauntlet clean\` between retries.
|
|
7438
|
-
5. Repeat steps 3-4 until all checks pass or you've made 3 attempts.
|
|
7439
|
-
6. Provide a summary of the session:
|
|
7440
|
-
- Checks Passed: (list)
|
|
7441
|
-
- Checks Failed: (list with brief reason)
|
|
7442
|
-
- Fixes Applied: (list key fixes)`);
|
|
7443
|
-
}
|
|
7444
|
-
if (isRun) {
|
|
7445
|
-
return `${frontmatter}
|
|
7446
|
-
<!--
|
|
7447
|
-
REVIEW TRUST LEVEL
|
|
7448
|
-
Controls how aggressively the agent acts on AI reviewer feedback.
|
|
7449
|
-
Change the trust_level value below to one of: high, medium, low
|
|
7450
|
-
|
|
7451
|
-
- high: Fix all issues unless you strongly disagree or have low confidence the human wants the change.
|
|
7452
|
-
- medium: Fix issues you reasonably agree with or believe the human wants fixed. (DEFAULT)
|
|
7453
|
-
- low: Fix only issues you strongly agree with or are confident the human wants fixed.
|
|
7454
|
-
-->
|
|
7455
|
-
<!-- trust_level: medium -->
|
|
7456
|
-
|
|
7457
|
-
# /gauntlet-${name}
|
|
7458
|
-
${heading}
|
|
7459
|
-
|
|
7460
|
-
**Review trust level: medium** — Fix issues you reasonably agree with or believe the human wants to be fixed. Skip issues that are purely stylistic, subjective, or that you believe the human would not want changed. When you skip an issue, briefly state what was skipped and why.
|
|
7461
|
-
|
|
7462
|
-
## Critical rules — read before proceeding
|
|
7463
|
-
|
|
7464
|
-
**This is a BLOCKING GATE, not an optional check.** You may NOT declare your coding task complete, commit, push, or create a PR until the gauntlet reaches a terminal status. Treat every gauntlet run as the single most important step of your workflow.
|
|
7465
|
-
|
|
7466
|
-
**MANDATORY BEHAVIORS:**
|
|
7467
|
-
- **ALL Bash commands in this skill MUST be synchronous.** NEVER use \`run_in_background: true\` for any Bash call. NEVER use \`&\` to background any command.
|
|
7468
|
-
- **ALL Task tool calls MUST be synchronous.** NEVER use \`run_in_background: true\`.
|
|
7469
|
-
- **ALWAYS wait for and read the full command output** before proceeding. The command typically takes 1-2 minutes. Set \`timeout: 300000\` (5 minutes) on Bash calls to allow headroom.
|
|
7470
|
-
- **NEVER assume success.** You must see an explicit \`Status:\` line in the output. If you do not see \`Status: Passed\`, \`Status: Passed with warnings\`, or \`Status: Retry limit exceeded\` in the output, the run is not complete — wait for it or investigate.
|
|
7471
|
-
- **NEVER skip the fix-retry loop.** If the run fails, you MUST extract failures, fix code, and re-run. This is not optional.
|
|
7472
|
-
|
|
7473
|
-
## Procedure
|
|
7474
|
-
|
|
7475
|
-
${steps.join(`
|
|
7476
|
-
`)}
|
|
7477
|
-
`;
|
|
7478
|
-
}
|
|
7479
|
-
return `${frontmatter}
|
|
7480
|
-
|
|
7481
|
-
# /gauntlet-${name}
|
|
7482
|
-
${heading}
|
|
7483
|
-
|
|
7484
|
-
${steps.join(`
|
|
7485
|
-
`)}
|
|
7486
|
-
`;
|
|
7487
|
-
}
|
|
7488
|
-
var GAUNTLET_RUN_SKILL_CONTENT = buildGauntletSkillContent("run");
|
|
7489
|
-
var GAUNTLET_RUN_SIBLING_FILES = {
|
|
7490
|
-
"extract-prompt.md": readSkillTemplate("gauntlet-run-extract-prompt.md"),
|
|
7491
|
-
"update-prompt.md": readSkillTemplate("gauntlet-run-update-prompt.md")
|
|
7492
|
-
};
|
|
7493
|
-
var GAUNTLET_CHECK_SKILL_CONTENT = buildGauntletSkillContent("check");
|
|
7494
|
-
var PUSH_PR_SKILL_CONTENT = readSkillTemplate("push-pr.md");
|
|
7495
|
-
var FIX_PR_SKILL_CONTENT = readSkillTemplate("fix-pr.md");
|
|
7496
|
-
var GAUNTLET_STATUS_SKILL_CONTENT = readSkillTemplate("status.md");
|
|
7497
|
-
var HELP_SKILL_BUNDLE = {
|
|
7498
|
-
content: readSkillTemplate("help-skill.md"),
|
|
7499
|
-
references: {
|
|
7500
|
-
"stop-hook-troubleshooting.md": readSkillTemplate("help-ref-stop-hook-troubleshooting.md"),
|
|
7501
|
-
"config-troubleshooting.md": readSkillTemplate("help-ref-config-troubleshooting.md"),
|
|
7502
|
-
"gate-troubleshooting.md": readSkillTemplate("help-ref-gate-troubleshooting.md"),
|
|
7503
|
-
"lock-troubleshooting.md": readSkillTemplate("help-ref-lock-troubleshooting.md"),
|
|
7504
|
-
"adapter-troubleshooting.md": readSkillTemplate("help-ref-adapter-troubleshooting.md"),
|
|
7505
|
-
"ci-pr-troubleshooting.md": readSkillTemplate("help-ref-ci-pr-troubleshooting.md")
|
|
7506
|
-
}
|
|
7507
|
-
};
|
|
7508
|
-
var SETUP_SKILL_CONTENT = readSkillTemplate("setup-skill.md");
|
|
7509
|
-
var CHECK_CATALOG_REFERENCE = readSkillTemplate("check-catalog.md");
|
|
7510
|
-
var PROJECT_STRUCTURE_REFERENCE = readSkillTemplate("setup-ref-project-structure.md");
|
|
7511
|
-
var SKILL_DEFINITIONS = [
|
|
7512
|
-
{
|
|
7513
|
-
action: "run",
|
|
7514
|
-
content: GAUNTLET_RUN_SKILL_CONTENT,
|
|
7515
|
-
description: "Run the verification suite",
|
|
7516
|
-
siblingFiles: GAUNTLET_RUN_SIBLING_FILES
|
|
7517
|
-
},
|
|
7518
|
-
{
|
|
7519
|
-
action: "check",
|
|
7520
|
-
content: GAUNTLET_CHECK_SKILL_CONTENT,
|
|
7521
|
-
description: "Run a single check gate"
|
|
7522
|
-
},
|
|
7523
|
-
{
|
|
7524
|
-
action: "push-pr",
|
|
7525
|
-
content: PUSH_PR_SKILL_CONTENT,
|
|
7526
|
-
description: "Commit, push, and create a PR"
|
|
7527
|
-
},
|
|
7528
|
-
{
|
|
7529
|
-
action: "fix-pr",
|
|
7530
|
-
content: FIX_PR_SKILL_CONTENT,
|
|
7531
|
-
description: "Fix PR review comments and CI failures"
|
|
7532
|
-
},
|
|
7533
|
-
{
|
|
7534
|
-
action: "status",
|
|
7535
|
-
content: GAUNTLET_STATUS_SKILL_CONTENT,
|
|
7536
|
-
description: "Show gauntlet status"
|
|
7537
|
-
},
|
|
7538
|
-
{
|
|
7539
|
-
action: "help",
|
|
7540
|
-
content: HELP_SKILL_BUNDLE.content,
|
|
7541
|
-
references: HELP_SKILL_BUNDLE.references,
|
|
7542
|
-
skillsOnly: true,
|
|
7543
|
-
description: "Diagnose and explain gauntlet behavior"
|
|
7544
|
-
},
|
|
7545
|
-
{
|
|
7546
|
-
action: "setup",
|
|
7547
|
-
content: SETUP_SKILL_CONTENT,
|
|
7548
|
-
references: {
|
|
7549
|
-
"check-catalog.md": CHECK_CATALOG_REFERENCE,
|
|
7550
|
-
"project-structure.md": PROJECT_STRUCTURE_REFERENCE
|
|
7551
|
-
},
|
|
7552
|
-
skillsOnly: true,
|
|
7553
|
-
description: "Configure checks and reviews interactively"
|
|
7554
|
-
}
|
|
7555
|
-
];
|
|
7556
7389
|
var NATIVE_CLIS = new Set(["claude", "cursor"]);
|
|
7557
7390
|
function registerInitCommand(program) {
|
|
7558
7391
|
program.command("init").description("Initialize .gauntlet configuration").option("-y, --yes", "Skip prompts and use defaults").action(async (options) => {
|
|
@@ -7614,40 +7447,41 @@ num_reviews: ${numReviews}
|
|
|
7614
7447
|
`);
|
|
7615
7448
|
console.log(chalk10.green("Created .gauntlet/reviews/code-quality.yml"));
|
|
7616
7449
|
}
|
|
7617
|
-
async function
|
|
7618
|
-
await fs27.mkdir(
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7450
|
+
async function copyDirRecursive(opts) {
|
|
7451
|
+
await fs27.mkdir(opts.dest, { recursive: true });
|
|
7452
|
+
const entries = await fs27.readdir(opts.src, { withFileTypes: true });
|
|
7453
|
+
for (const entry of entries) {
|
|
7454
|
+
const srcPath = path26.join(opts.src, entry.name);
|
|
7455
|
+
const destPath = path26.join(opts.dest, entry.name);
|
|
7456
|
+
if (entry.isDirectory()) {
|
|
7457
|
+
await copyDirRecursive({ src: srcPath, dest: destPath });
|
|
7458
|
+
} else {
|
|
7459
|
+
await fs27.copyFile(srcPath, destPath);
|
|
7460
|
+
}
|
|
7627
7461
|
}
|
|
7628
7462
|
}
|
|
7629
7463
|
async function installSkillsWithChecksums(projectRoot, skipPrompts) {
|
|
7630
7464
|
const skillsDir = path26.join(projectRoot, ".claude", "skills");
|
|
7631
|
-
for (const
|
|
7632
|
-
const
|
|
7633
|
-
const
|
|
7634
|
-
const
|
|
7635
|
-
const
|
|
7636
|
-
if (!await exists(
|
|
7637
|
-
await
|
|
7638
|
-
console.log(chalk10.green(`Created ${
|
|
7465
|
+
for (const action of SKILL_ACTIONS) {
|
|
7466
|
+
const dirName = `gauntlet-${action}`;
|
|
7467
|
+
const sourceDir = path26.join(SKILLS_SOURCE_DIR, dirName);
|
|
7468
|
+
const targetDir = path26.join(skillsDir, dirName);
|
|
7469
|
+
const relativeDir = `${path26.relative(projectRoot, targetDir)}/`;
|
|
7470
|
+
if (!await exists(targetDir)) {
|
|
7471
|
+
await copyDirRecursive({ src: sourceDir, dest: targetDir });
|
|
7472
|
+
console.log(chalk10.green(`Created ${relativeDir}`));
|
|
7639
7473
|
continue;
|
|
7640
7474
|
}
|
|
7641
|
-
const
|
|
7642
|
-
const
|
|
7643
|
-
if (
|
|
7475
|
+
const sourceChecksum = await computeSkillChecksum(sourceDir);
|
|
7476
|
+
const targetChecksum = await computeSkillChecksum(targetDir);
|
|
7477
|
+
if (sourceChecksum === targetChecksum)
|
|
7644
7478
|
continue;
|
|
7645
|
-
const shouldOverwrite = await promptFileOverwrite(
|
|
7479
|
+
const shouldOverwrite = await promptFileOverwrite(dirName, skipPrompts);
|
|
7646
7480
|
if (!shouldOverwrite)
|
|
7647
7481
|
continue;
|
|
7648
|
-
await fs27.rm(
|
|
7649
|
-
await
|
|
7650
|
-
console.log(chalk10.green(`Updated ${
|
|
7482
|
+
await fs27.rm(targetDir, { recursive: true, force: true });
|
|
7483
|
+
await copyDirRecursive({ src: sourceDir, dest: targetDir });
|
|
7484
|
+
console.log(chalk10.green(`Updated ${relativeDir}`));
|
|
7651
7485
|
}
|
|
7652
7486
|
}
|
|
7653
7487
|
async function installHookWithChecksums(target, skipPrompts) {
|
|
@@ -7726,8 +7560,8 @@ function printPostInitInstructions(devCLINames) {
|
|
|
7726
7560
|
console.log(chalk10.bold("To complete setup, reference the setup skill in your CLI: @.claude/skills/gauntlet-setup/SKILL.md. This will guide you through configuring the static checks (unit tests, linters, etc.) that Agent Gauntlet will run."));
|
|
7727
7561
|
console.log();
|
|
7728
7562
|
console.log("Available skills:");
|
|
7729
|
-
for (const
|
|
7730
|
-
console.log(` @.claude/skills/gauntlet-${
|
|
7563
|
+
for (const action of SKILL_ACTIONS) {
|
|
7564
|
+
console.log(` @.claude/skills/gauntlet-${action}/SKILL.md — ${SKILL_DESCRIPTIONS[action]}`);
|
|
7731
7565
|
}
|
|
7732
7566
|
}
|
|
7733
7567
|
}
|
|
@@ -9210,4 +9044,4 @@ if (process.argv.length < 3) {
|
|
|
9210
9044
|
}
|
|
9211
9045
|
program.parse(process.argv);
|
|
9212
9046
|
|
|
9213
|
-
//# debugId=
|
|
9047
|
+
//# debugId=D19CB86EB2F3D65664756E2164756E21
|