@spardutti/claude-skills 2.29.0 → 2.30.0

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.
Files changed (2) hide show
  1. package/lib/setup-hook.mjs +32 -0
  2. package/package.json +1 -1
@@ -454,6 +454,18 @@ const GAUNTLET_SCRIPT = `#!/usr/bin/env bash
454
454
  # Setting either command switches the whole repo to explicit mode — auto-detection
455
455
  # is off, and only what you set runs.
456
456
  #
457
+ # Per-project runners, for tests that cannot run on the host at all:
458
+ # <project>/.gauntlet-test executable; run instead of the detected test
459
+ # command, with $FILES as its arguments
460
+ # <project>/.gauntlet-typecheck executable; run instead of the detected
461
+ # typecheck command
462
+ #
463
+ # <project> is any directory holding a package.json or pyproject.toml, so one
464
+ # half of a monorepo can run on the host while the other runs in a container.
465
+ # Unlike GAUNTLET_TEST these do not disable detection anywhere else. Typically a
466
+ # two-line \`docker compose run --rm -T api pytest "$@"\`. Same shape as
467
+ # ship-gate's .mutmut-run.
468
+ #
457
469
  # Every run records why it ended in /tmp/claude-gauntlet-<session>.why, so a green
458
470
  # run and a skipped one are told apart without re-running the hook.
459
471
 
@@ -551,6 +563,26 @@ add_dir_gates() {
551
563
  [ -n "$d" ] && [ -n "\${ROOT_TC:-}" ] && have_tc="skip"
552
564
  [ -n "$d" ] && [ -n "\${ROOT_TEST:-}" ] && have_test="skip"
553
565
 
566
+ # A project whose tests need a database, a queue, or any other service cannot
567
+ # run them on the host, and detection here finds the host runner every time.
568
+ # An executable runner in the project directory says where they DO run —
569
+ # usually \`docker compose run\` against the app container — and wins over
570
+ # everything detected below.
571
+ #
572
+ # Per project, not per repo: GAUNTLET_TEST switches the WHOLE repo to explicit
573
+ # mode, so a monorepo needing a container for one stack had to hand-write
574
+ # commands for all of them. These let one half run on the host and the other
575
+ # in a container. Same shape as ship-gate's .mutmut-run, deliberately.
576
+ RUNNER_EXT="($JS_EXT|py)"
577
+ if [ -z "$have_tc" ] && [ -x "$d\${d:+/}.gauntlet-typecheck" ]; then
578
+ add_gate typecheck "$pre$RUNNER_EXT\\$" "\${run}./.gauntlet-typecheck"
579
+ have_tc="skip"
580
+ fi
581
+ if [ -z "$have_test" ] && [ -x "$d\${d:+/}.gauntlet-test" ]; then
582
+ add_gate tests "$pre$RUNNER_EXT\\$" "\${run}./.gauntlet-test \\$FILES"
583
+ have_test="skip"
584
+ fi
585
+
554
586
  if [ -f "$d\${d:+/}package.json" ]; then
555
587
  pkg="$d\${d:+/}package.json"
556
588
  if [ -z "$have_tc" ]; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spardutti/claude-skills",
3
- "version": "2.29.0",
3
+ "version": "2.30.0",
4
4
  "description": "Guardrails for Claude Code — best-practice skills, planning commands, and delivery gates.",
5
5
  "type": "module",
6
6
  "repository": {