karvey-guardlisted
Install: claude install-skill MauricioQuezadaHaintech/karvey
# Karvey Guard
## Purpose
A **cross-cutting support layer** of the Karvey Method — NOT a pipeline phase. It provides the method's **guardrails**: it manages the enforcement hooks (which do block deterministically via `PreToolUse`), grants temporary override of the plan-gate, and can apply an **edit-lock** that restricts `Edit`/`Write` to a single directory.
Inspired by gstack's `/careful` + `/freeze` + `/guard`, absorbed as a single skill integrated into the method.
**Hard rules:**
- It is a **cross-cutting** skill, not a phase: **it does NOT change `spec.json:phase`** or the change's state.
- The hooks are **OPT-IN per project**, reversible. They are **never** imposed globally without the user deciding so.
- Aligned with `karvey/rules/enforcement.md` (the canonical rule) and `karvey/rules/project-config.md`.
It manages the two hooks defined in `karvey/rules/enforcement.md`, whose templates live in `karvey/hooks/`:
- **git-flow-guard** (`git-flow-guard.sh`) — `PreToolUse` over `Bash`. Blocks direct push to production, commits on `dev`/`master`, and manual deploy. Allowed flow: `feature/* → integration → PR → production`.
- **plan-gate** (`plan-gate.sh`) — `PreToolUse` over `Edit`/`Write`/destructive `Bash`. Requires an approved plan (the `KARVEY_PLAN_FLAG` marker, default `/tmp/claude-plan-approved`) throughout the flow.
## Execution steps
ALWAYS read `karvey/rules/enforcement.md` first to align before touching anything.
Resolve the mode from `$ARGUMENTS`. If no argu