Generic-purpose cli-guard consumer for repos with external contributors
  • Go 97.3%
  • Ruby 1.5%
  • Makefile 0.9%
  • Shell 0.3%
Find a file
Kai Siren 9e22cbd3a6
Some checks are pending
release / release (push) Waiting to run
release / bump-formula (push) Blocked by required conditions
test / test (push) Waiting to run
Merge remote-tracking branch 'origin/main'
2026-05-30 23:58:20 -07:00
.agents/skills/ward chore: scrub personal-account ownership refs for contributor handoff 2026-05-30 23:56:46 -07:00
.claude chore: sync committed .claude/settings.json to local coily render 2026-05-28 16:27:10 -07:00
.github/workflows refactor: wipe agent-guard slug, move to coilyco-flight-deck org 2026-05-29 12:39:29 -07:00
.ward chore: scrub personal-account ownership refs for contributor handoff 2026-05-30 23:56:46 -07:00
cmd/ward chore: scrub personal-account ownership refs for contributor handoff 2026-05-30 23:56:46 -07:00
docs chore: scrub personal-account ownership refs for contributor handoff 2026-05-30 23:56:46 -07:00
Formula Merge remote-tracking branch 'origin/main' 2026-05-30 23:58:20 -07:00
.gitignore refactor: reframe agent-guard as ward (binary, .ward config, mission) 2026-05-28 16:25:21 -07:00
.golangci.yaml chore: scrub personal-account ownership refs for contributor handoff 2026-05-30 23:56:46 -07:00
.pre-commit-config.yaml chore: scrub personal-account ownership refs for contributor handoff 2026-05-30 23:56:46 -07:00
AGENTS.md chore: scrub personal-account ownership refs for contributor handoff 2026-05-30 23:56:46 -07:00
CODE_OF_CONDUCT.md Seed initial repo scaffolding 2026-05-13 21:38:21 -07:00
CONTRIBUTING.md chore: scrub personal-account ownership refs for contributor handoff 2026-05-30 23:56:46 -07:00
go.mod chore(go): rename module path to github.com/coilyco-flight-deck/ward 2026-05-29 11:47:52 -07:00
go.sum feat(hook): query cli-guard Registry directly, drop coily subprocess 2026-05-27 16:52:29 -07:00
LICENSE Seed initial repo scaffolding 2026-05-13 21:38:21 -07:00
Makefile Seed initial repo scaffolding 2026-05-13 21:38:21 -07:00
README.md chore: scrub personal-account ownership refs for contributor handoff 2026-05-30 23:56:46 -07:00
SECURITY.md chore: scrub personal-account ownership refs for contributor handoff 2026-05-30 23:56:46 -07:00

ward

A contributor-facing cli-guard consumer. ward sits between AI agents (or any semi-trusted automation) and the host system when working inside a ward-managed repo, wrapping a project's dev verbs behind cli-guard's policy gate.

ward is the contributor counterpart to coily. coily is the operator CLI - personal machines, homelab SSH, vault paths, deploy hooks. ward is the gate a contributor (human or agent) routes through to build, test, and lint project code. Both are thin, audited wrappers around the same cli-guard primitives, split by who is driving: operator vs contributor.

Status

v0. Downstream consumers upgrade to the ward binary and .ward config on their own schedule.

What it does

Wraps a project's dev verbs (build, test, vet, lint, tidy, cover) behind cli-guard's policy gate. Every invocation validates argv, writes one append-only JSONL audit row, binds to a git toplevel via --commit-scope, and refuses repo-shaped verbs on a dirty tree.

Each repo declares which Makefile targets are exposed in .ward/ward.yaml. The contract is verified by ward lint.

Install

brew tap coilyco-flight-deck/ward https://forgejo.coilysiren.me/coilyco-flight-deck/ward
brew install coilyco-flight-deck/ward/ward

The explicit-URL brew tap form is required because this repo isn't homebrew-* prefixed. The installed binary is ward.

Usage

ward exec build
ward exec test
ward lint

See docs/ for the full verb list.

Claude Code PreToolUse hook

ward hook pre-tool-use is a stdin-driven Claude Code hook. It does two things:

  1. Binary-path check. Refuses to let ward or coily run unless command -v resolves to a canonical homebrew install path. Blocks PATH-hijack attacks. On by default, no flag.
  2. Routing-hint surface. Catches bare invocations of wrapped binaries (make, gh, aws, kubectl, ...) and surfaces a recovery hint naming the right wrapper. The active table is picked by .ward/ward.yaml vs .coily/coily.yaml in cwd.

No network, no state. Failure modes pass through silently. Hard denial stays the job of permissions.deny.

Register with ward install-hooks (idempotent). Writes the PreToolUse entry to <git-toplevel>/.claude/settings.json. Flags: --path <file>, --dry-run, --check.

  • cli-guard - underlying security-boundary framework
  • coily - the operator-facing cli-guard consumer
  • cli-mcp - sibling cli-guard consumer that projects a urfave/cli tree as an MCP server

Support

Bug or feature request: create a new issue. Conduct: Code of Conduct. Security: SECURITY.md. License: LICENSE.

See also

Cross-reference convention from coilysiren/agentic-os#59.