# Live Guard Gate

Asks before a tool call that would mutate live cloud infrastructure, and names the
guard agents that should review it first. It covers Terraform and Pulumi, the AWS, Azure,
Google Cloud and OCI CLIs, `kubectl`, Helm, Argo CD, Velero and Snowflake role changes.

## Reach and declared footprint

**L0 (no declared file writes, subprocess spawns or network egress).** All four
manifest footprint arrays (`env_reads`, `file_writes`, `spawns` and `egress_hosts`)
are empty. This is capability disclosure, not enforced isolation.

## How agent names are chosen

Each pattern in `patterns.json` carries an `agents` list. When several patterns match,
the reason lists the union of their agents in first-seen order. `lib/live-agents.mjs`
lists the live guard agents the patterns cover (`covered`) and those with no pattern yet
(`uncovered`). It is regenerated by `npm run mods:write`.

## Per-harness behavior

| Harness | Surface | Behavior |
| --- | --- | --- |
| Claude Code | native module | `tool.check` asks; the engine's own deny is never loosened |
| Claude Code | classic hook | `PreToolUse` asks |
| Kiro | Node hook | the whole payload is scanned; a hit is denied (no confirmation protocol) |
| Codex | Node hook | a hit is denied with a reason (Codex rejects ask) |

The mod reads no environment variables, writes no files and makes no network calls.

## Limitations

- It matches shell text in every string of the tool input, so a file whose content
  mentions such a command also asks.
- It does not know which cloud account or context is live; a command against a sandbox asks too.
- An `ask` may be auto-approved under a bypass permission mode.
- Input over the size limit is not evaluated and asks.
- The native API was verified against Claude Code 2.1.296 (early access). Other harnesses
  need Node 22+.

## Install

See [mods/README.md](../README.md).
