Skip to content

Release 0.16.0: Stop hooks for Codex and Copilot CLI, doctor finds silent hooks, regression preset - #53

Merged
renezander030 merged 2 commits into
masterfrom
release/v0.16.0
Oct 23, 2026
Merged

renezander030 merged 2 commits into
masterfrom
release/v0.16.0

Conversation

@renezander030

Copy link
Copy Markdown
Owner

Added

  • skillgate install codex --stop and skillgate install copilot-cli --stop register a Stop hook, so a Codex or Copilot CLI agent cannot end its turn while gates fail. Both accept the same --format claude-stop answer as Claude Code (decision: "block" with the failing gates as the reason).
  • copilot-cli install target: .github/hooks/skillgate.json with a fail-closed PreToolUse hook on Bash (plus gatedTools), read by GitHub Copilot CLI and its cloud agent. doctor copilot-cli verifies it, and install all includes it.
  • doctor reports a hook that is registered but switched off: disableAllHooks in .claude/settings.json or .claude/settings.local.json, or [features] hooks = false in .codex/config.toml.
  • doctor reports a hook, pre-commit entry or workflow pinned to a different Skillgate version than the one running, and names the install command that fixes it.
  • skillgate init --preset regression adds gates for three things: no test case or test file is removed, no new skipped or focused test appears, and CI workflows and agent instruction files are unchanged versus the base ref.
  • check --format github also writes a result table to $GITHUB_STEP_SUMMARY.
  • skillgate <command> --help and skillgate help <command> print that command's usage and flags.

Changed

  • skillgate install github-actions now upgrades an installed Skillgate workflow in place. It updates the package pin and the pinned checkout and setup-node actions, and moves a Node 18 or 20 line to Node 22. Other edits stay. New workflows use setup-node v7.1.0 and Node 22.

Fixed

  • skillgate <command> --help no longer runs the command. Before, scaffold --help wrote evidence templates, zk-keygen --help wrote a key pair, and check --help ran every gate.
  • A flag that takes a value but is given none (--cwd last, --receipt --json) is now a usage error with exit 2. Before, --cwd crashed with a stack trace and --receipt --json wrote a receipt named --json. A bare --template or --threshold is now an error too, where it used to fall back to the generic template or a NaN threshold.

Verification

  • npm ci, npm run build, npm test on Node 20 and 22: 257/257 pass.
  • npm run test:coverage (Node 22): lines 95.47%, branches 86.59%, functions 98.16%, above all thresholds.
  • node dist/src/cli.js check: all 4 gates pass. fhe-metrics help, go test ./... and go vet ./... in contrib/fhe-metrics pass.
  • New test/release-016.test.ts covers each item through installIntegration, doctor and the CLI. It includes a Copilot-format PreToolUse payload being blocked and the regression preset catching a deleted test, a new .skip, an edited workflow and an edited AGENTS.md.
  • The tidy-up commit is behavior-preserving. CLI help, --version, subcommand help, exported declarations, schema hashes, explain over a command corpus, installed hook files, sync and scaffold output are all byte-identical to 0.15.0.

Review notes

  • Base: 42a4cf9 (master). There are two commits. The first, Tidy-up: 8 behavior-preserving refactors, can be reviewed on its own. The second holds the 0.16.0 features.
  • Touched: src/cli.ts, src/integrations.ts and, in the tidy-up only, src/core.ts, src/link.ts, src/scaffold.ts, src/command.ts, src/deps.ts and src/git.ts (the unused gitAvailable is removed; git.ts is not a package export). Also docs, CHANGELOG and tests.
  • Untouched: the gate engine's verdicts, the spec schema, the package exports (., ./core, ./zk), receipts and snapshots, the ZK and fhe-metrics paths, isolate/.
  • Behavior change to review: a value-taking flag with no value now exits 2 instead of guessing (two e2e tests were updated to this contract).
  • No other open pull requests.

- decideCommand and decideTool build their verdict in one place
- integrations: one owner each for the package name and the hook's timeout and Stop format
- glob gates share one empty-glob rule
- sync writes linked instruction files through one function
- scaffold: shared evidence bodies and the preamble marker are named once
- command matching and deps: restated regexes and sections read their named constant
- git: drop the unused gitAvailable; tests go through matchesGlob
- one rule for quoting a failing command's output in a gate reason

No change to CLI output, exit codes, JSON, installed files or stored hashes.
…lent hooks, regression preset

- install codex --stop and install copilot-cli --stop gate the end of the agent's turn
- copilot-cli install target: .github/hooks/skillgate.json, fail-closed PreToolUse
- doctor reports hooks that are registered but switched off, and hooks or workflows
  pinned to another Skillgate version
- install github-actions upgrades its own workflow (package pin, action pins, Node 22)
- init --preset regression: tests kept, no new skips, CI and instruction files unchanged
- check --format github writes a job summary
- <command> --help and help <command> print usage without running the command
- a value-taking flag without a value is a usage error
@renezander030
renezander030 merged commit 19f178b into master Oct 23, 2026
7 checks passed
@renezander030
renezander030 deleted the release/v0.16.0 branch October 23, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant