Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@

## Unreleased

## 0.16.0 - 2026-10-23

### Added
- `skillgate install codex --stop` and `skillgate install copilot-cli --stop` register
a Stop hook, so Codex and Copilot CLI agents cannot end a turn while gates fail.
Both accept the same `--format claude-stop` answer as Claude Code.
- `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; `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 another Skillgate
version than the one running, with the `install` command that fixes it.
- `skillgate init --preset regression`: no test case or test file removed, no new
skipped or focused tests, CI workflows and agent instruction files 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` upgrades an installed Skillgate workflow in
place: the package pin, the pinned checkout and setup-node actions, and a Node 18
or 20 line move to Node 22. New workflows use setup-node v7.1.0 and Node 22.

### Fixed
- `skillgate <command> --help` no longer runs the command: `scaffold --help` wrote
evidence templates, `zk-keygen --help` wrote a key pair and `check --help` ran
every gate.
- A flag that takes a value and is given none (`--cwd` last, `--receipt --json`) is a
usage error with exit 2. `--cwd` crashed with a stack trace, and `--receipt --json`
wrote a receipt named `--json`. A bare `--template` or `--threshold` is now an
error too, instead of the generic template or a NaN threshold.

## 0.15.0 - 2026-10-16

### Added
Expand Down
29 changes: 22 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ Wire an existing policy into a harness without hand-editing its config:

```bash
skillgate install claude-code # add --stop to also gate the end of the agent's turn
skillgate install codex
skillgate install codex # --stop works here too
skillgate install copilot-cli # GitHub Copilot CLI and its cloud agent; --stop works here too
skillgate install gemini-cli
skillgate install cursor
skillgate install opencode
Expand All @@ -179,7 +180,17 @@ Agent hooks are installed **fail-closed**: if the gate itself cannot run (npx
missing, offline, registry error), the hook blocks instead of letting the command
through, and it gets a 10-minute budget so a slow test suite doesn't time out into
an allow. `doctor` flags a hook installed by an older version that would fail
open. Re-running `install` upgrades it in place.
open, a hook or workflow pinned to a different Skillgate version than the one
you run, and a hook the agent will never run because hooks are switched off
(`disableAllHooks` in `.claude/settings.json` or `.claude/settings.local.json`,
`[features] hooks = false` in `.codex/config.toml`). Re-running `install` upgrades
hooks, the pre-commit entry and the GitHub workflow in place; in the workflow it
moves the package pin, the pinned actions and a Node 18/20 line, and keeps your
other edits.

Every command explains itself without running: `skillgate check --help`,
`skillgate help sync`. A flag that takes a value and is given none is a usage
error (exit 2).

Generated hooks give the evaluator a nine-minute run budget inside the ten-minute
host timeout. Claude Stop hooks use explicit stdout JSON decisions, so test output
Expand All @@ -189,7 +200,9 @@ Upgrade an existing Stop hook with `skillgate install claude-code --stop`.
## Define your gates

Use `skillgate init --preset no-secrets` for credential and private infrastructure
checks. An optional `review` gate accepts a snapshot-bound OCR or host-agent
checks. `skillgate init --preset regression` writes the gates that catch an agent
gaming a green check: no test case or test file removed, no new skipped or focused
test, and CI workflows and agent instruction files unchanged versus the base ref. An optional `review` gate accepts a snapshot-bound OCR or host-agent
report. See [secrets and optional review](docs/external-gates.md) for setup, limits,
and reviewer trust. Both integrations are optional.

Expand Down Expand Up @@ -458,7 +471,8 @@ claude-code` writes it:
}
```

**Gate "done" itself.** `skillgate install claude-code --stop` also registers a
**Gate "done" itself.** `skillgate install claude-code --stop` (or `codex --stop`,
`copilot-cli --stop`) also registers a
`Stop` hook (`skillgate gate --event stop`). When the agent tries to end its turn
with changes in the worktree and unmet gates, the stop is refused and the failing
gates are fed back as the reason, so the agent keeps working instead of reporting
Expand All @@ -471,7 +485,8 @@ The same `skillgate gate` judges the command in each agent's own hook protocol:

| Agent | `skillgate install` writes | Hook |
|---|---|---|
| Codex | `.codex/hooks.json` | `PreToolUse` on `Bash`. Codex runs a new project hook only after you trust it. |
| Codex | `.codex/hooks.json` | `PreToolUse` on `Bash`, and `Stop` with `--stop`. Codex runs a new project hook only after you trust it. |
| GitHub Copilot CLI | `.github/hooks/skillgate.json` | `PreToolUse` on `Bash` (Claude-format payload), and `Stop` with `--stop`. A non-zero exit denies the call; the cloud agent loads the same file. |
| Gemini CLI | `.gemini/settings.json` | `BeforeTool` on `run_shell_command`, answering with `--format gemini` JSON |
| Cursor | `.cursor/hooks.json` | `beforeShellExecution` with `failClosed: true`, answering with `--format cursor` JSON |

Expand All @@ -481,7 +496,7 @@ These need no harness integration at all, which makes them the universal backsto

In GitHub Actions, `skillgate check --format github` turns each failing gate into
an error annotation on the file and line it names, so the PR shows the problem
in place. The workflow from `skillgate install github-actions` uses it.
in place, and writes a result table to the job summary. The workflow from `skillgate install github-actions` uses it.

Native Windows hook files are included in [`contrib/claude-code`](contrib/claude-code/):
the PowerShell adapter resolves `npx.cmd`, preserves the hook payload on stdin, and
Expand All @@ -492,7 +507,7 @@ Windows in CI.

**Worktrunk:** Skillgate works unchanged in [Worktrunk](https://worktrunk.dev/hook/)
worktrees. Track `.skillgate/done.yaml` and add
`pre-merge = "npx --yes @reneza/skillgate@0.15.0 check --base '{{ target }}'"`
`pre-merge = "npx --yes @reneza/skillgate@0.16.0 check --base '{{ target }}'"`
to `.config/wt.toml`. Worktrunk runs this blocking hook in the source worktree
after rebasing and aborts the merge on a nonzero exit. Skillgate discovers that
worktree's policy and evaluates paths relative to it, including when called from
Expand Down
2 changes: 1 addition & 1 deletion docs/spec-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ gatedTools: ["mcp__course__publish_*"]

A call to a matching tool runs the gates like a finish-line command. Scope a gate
to tools with `when.tool` (below). Hooks from `skillgate install claude-code`,
`codex` and `gemini-cli` include these tools in their matcher, and `doctor` reports
`codex`, `copilot-cli` and `gemini-cli` include these tools in their matcher, and `doctor` reports
a hook that does not. The opencode plugin checks `gatedTools` in
`tool.execute.before`. Cursor's hook covers shell commands only.

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reneza/skillgate",
"version": "0.15.0",
"version": "0.16.0",
"publishConfig": {
"access": "public"
},
Expand Down
Loading
Loading