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
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@

All notable changes to `@nugehs/gate` are documented here.

## [0.3.0] - 2026-06-14

### Engine

- Findings are no longer capped at 5 per domain in the JSON. That cap was a
terminal-display nicety that leaked into the data model and starved editor
clients of squiggles on any repo with more than a handful of findings. The
`findings` array is now bounded only by a high runaway guard (`MAX_FINDINGS`),
and the summary counts already carry the true totals.
- Editor clients can pass `--strict` per run (e.g. from a `gate.strict` setting).

### VS Code / Cursor extension (`clients/vscode` 0.3.0)

The extension grows from a read-only verdict mirror into a full editor surface:

- **AI-native gating** — an `@gate` chat participant (`@gate can this ship?`,
`@gate /why`), a `gate_check` Language Model tool agent mode can call before it
declares a change done, and an MCP server provider that registers gate's own
MCP server with the editor. The assistant writing the code is checked by the
same gate CI uses.
- **Verdict cockpit** — a webview in gate's own Activity Bar container: the
unified verdict as an interactive board (jump to a finding, mute it, re-check).
- **Interactive findings** — Quick Fixes (mute a finding, open the tool's docs),
hovers with full detail, and a CodeLens above any line that carries a finding.
- **Faster, safer feedback loop** — saves are debounced and an in-flight run is
superseded (its child killed) instead of piling up overlapping full-repo gates.
- **Multi-root workspaces** — every folder is checked; the status bar shows the
worst verdict, the tree gains a per-folder layer.
- **More settings** — `gate.strict`, `gate.codeLens`, `gate.debounceMs`; a
getting-started walkthrough; and an "install the engine" flow.

## [0.2.0] - 2026-06-14

- Findings now carry `file` and `line` where the underlying tool provides a
Expand Down
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,26 @@ Tools:

Registry manifest: [`server.json`](server.json) (`io.github.nugehs/gate`).

## Editor extension

The same normalized verdict drives a **VS Code / Cursor extension**
([`clients/vscode`](clients/vscode)) — the gates, shifted left from CI into the
editor:

- a **verdict cockpit** and a checks tree in gate's own Activity Bar container;
- **inline diagnostics**, hovers, Quick Fixes (mute / open docs) and CodeLens on
located findings;
- **AI-native gating** — an `@gate` chat participant, a `gate_check` tool agent
mode can call before it says "done", and an MCP server provider — so the
assistant writing the code is checked by the same gate as CI;
- debounced run-on-save with in-flight cancellation, and multi-root support.

## Roadmap

gate is the shared spine. The same normalized verdict already drives the CLI,
the `--ci` gate, and the MCP server above. Next clients on the same JSON:
gate is the shared spine. The same JSON already drives the CLI, the `--ci` gate,
the MCP server, and the editor extension above. Next client on the same JSON:

- **Web cockpit** — a repo/PR verdict board over the JSON, unifying the four `*-web` sites.
- **Editor extension** — shift the gates left from CI into the editor as inline findings.

## License

Expand Down
75 changes: 60 additions & 15 deletions clients/vscode/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,59 @@
# gate — VS Code & Cursor extension

One ship/no-ship verdict in your editor. The extension runs
[`@nugehs/gate`](https://github.com/nugehs/gate) against your workspace and shows
the unified verdict from **aiglare**, **bouncer**, **tieline** and **repoctx**.
**One ship/no-ship verdict in your editor — and in your AI assistant.**

The extension runs [`@nugehs/gate`](https://github.com/nugehs/gate) against your
workspace and turns the unified verdict from **aiglare** (AI governance),
**bouncer** (compliance), **tieline** (contract drift) and **repoctx** (merge
readiness) into a live editor surface.

> Cursor, VSCodium and Windsurf are VS Code forks — this is the same extension
> for all of them. Install it from [Open VSX](https://open-vsx.org) or from a
> packaged `.vsix`.
> for all of them. Install it from [Open VSX](https://open-vsx.org) or a packaged
> `.vsix`.

## What you get

- **Status bar** — `✓ / ⚠ / ✗ gate: VERDICT`. Click to re-check.
- **`gate` panel** (Explorer) — the four checks with their status and summary,
expandable to findings (click a finding to jump to its line).
### The verdict, everywhere

- **Status bar** — `✓ / ⚠ / ✗ gate: VERDICT`. Click to open the cockpit.
- **Verdict cockpit** — a board in gate's own Activity Bar container: the overall
verdict, a card per domain, the blocking reasons, and every located finding.
Click a finding to jump to it, mute it, or re-check — all without leaving it.
- **Checks tree** — the four domains, expandable to findings (multi-root
workspaces get a folder layer on top).
- **Inline diagnostics** — squiggles on the exact line for findings that carry a
location: **aiglare** red surfaces and **tieline** drift. bouncer (a missing
control is an *absence*, no line) and repoctx (repo-level) stay in the panel.
- **Command** — `gate: Check Workspace`.
- **Run on save** — re-checks when you save (toggle with `gate.runOnSave`).
location (aiglare red surfaces, tieline drift), with a clickable rule link.

### Interactive findings

- **Quick Fixes** on any finding — **Mute** it (per-workspace, reversible) or
**open the tool's docs**.
- **Hovers** with the full finding detail and a one-click mute.
- **CodeLens** above any line that carries a finding (toggle with `gate.codeLens`).

### AI-native gating

The assistant writing your code is checked by the same gate your CI uses:

> Squiggles need the engine to emit `file:line` (gate ≥ 0.2.0). Against an older
> published gate the panel still works; the diagnostics simply stay empty.
- **`@gate` chat participant** — ask `@gate can this ship?`, or `@gate /why` for
the blocking reasons in plain language.
- **Agent tool** — in agent mode the model can call the **`gate_check`** tool
itself before it claims a change is ready; a `fail` verdict tells it not to ship.
- **MCP server** — gate registers its own MCP server with the editor, so any
MCP-aware agent gets the unified `gate_check` tool automatically.

### A feedback loop that keeps up

- **Run on save**, debounced — a save-storm collapses into one run.
- **In-flight runs are superseded** (the child process is killed) instead of
piling up overlapping full-repo gates.
- **Multi-root** — every workspace folder is checked; the status bar reports the
worst verdict across them.

> Squiggles, hovers and CodeLens need the engine to emit `file:line` and the full
> finding set (gate ≥ 0.3.0). Against an older engine the verdict still works; the
> located surfaces simply thin out. bouncer (a missing control is an *absence*,
> no line) and repoctx (repo-level) stay in the cockpit and tree by nature.

## Requirements

Expand All @@ -31,15 +64,27 @@ The `gate` engine must be resolvable. The extension looks, in order, for:
3. `gate` on `PATH`
4. `npx @nugehs/gate`

No engine installed? Run **gate: Install the gate engine** (or the button in the
cockpit / walkthrough).

## Settings

| Setting | Default | Meaning |
| --- | --- | --- |
| `gate.path` | `""` | Explicit path to gate (bin or `src/cli.js`). |
| `gate.runOnSave` | `true` | Re-run gate on file save. |
| `gate.runOnSave` | `true` | Re-run gate on file save (debounced). |
| `gate.strict` | `false` | Treat WARN/UNKNOWN as blocking too (`--strict`). |
| `gate.codeLens` | `true` | Show a CodeLens above lines with a finding. |
| `gate.debounceMs` | `500` | Delay after the last save before re-running. |
| `gate.only` | `[]` | Run only these checks. |
| `gate.skip` | `[]` | Skip these checks. |

## Commands

`gate: Check Workspace`, `gate: Refresh`, `gate: Open Verdict Cockpit`,
`gate: Show Output Log`, `gate: Clear Muted Findings`,
`gate: Install the gate engine`.

## Develop

```
Expand Down
4 changes: 4 additions & 0 deletions clients/vscode/media/gate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions clients/vscode/media/walkthrough/ai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Ask the AI

gate is wired into the editor's AI surfaces, so the assistant writing your code is
checked by the same gate your CI uses.

- **`@gate` chat participant** — in Copilot Chat, type `@gate can this ship?` or
`@gate /why` to get the verdict and the blocking reasons in plain language.
- **Agent tool** — in agent mode, the model can call the **`#gate`** tool itself
before it claims a change is ready. A `fail` verdict tells it not to ship.
- **MCP server** — gate registers its MCP server with the editor, so any
MCP-aware agent gets the unified `gate_check` tool automatically.

This is the whole point of the nugehs toolchain: governance that travels with the
code, from the editor to CI.
19 changes: 19 additions & 0 deletions clients/vscode/media/walkthrough/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Install the engine

The extension is a thin client over the **`@nugehs/gate`** CLI. Install it once:

```
npm i -g @nugehs/gate # global
# or, per project:
npm i -D @nugehs/gate
```

The extension resolves the engine in this order:

1. the `gate.path` setting
2. `node_modules/.bin/gate` in your workspace
3. `gate` on your `PATH`
4. `npx @nugehs/gate` (no install needed, just slower on first run)

You don't need all four underlying tools (aiglare, bouncer, tieline, repoctx) —
any that aren't configured are reported as **skipped**, never a failure.
18 changes: 18 additions & 0 deletions clients/vscode/media/walkthrough/run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Run your first check

Open the **gate** icon in the Activity Bar, or run **gate: Check Workspace** from
the Command Palette.

You get one normalized verdict:

| Status | Meaning |
| --- | --- |
| ✓ pass | every check that ran is clean |
| ⚠ warn | something worth a look — not blocking |
| ✗ fail | a blocking problem; do not ship |

Findings that carry a line (aiglare red surfaces, tieline drift) show up as inline
squiggles you can click to jump to. The **Verdict** cockpit summarizes all four
domains; the **Checks** tree lets you drill into individual findings.

Re-checks run automatically on save (toggle with `gate.runOnSave`).
8 changes: 4 additions & 4 deletions clients/vscode/package-lock.json

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

Loading
Loading