guard
The guard command validates ongoing code changes against the latest approved implementation contract by running a governance script that detects scope drift, identifies incomplete planned modifications, flags missing acceptance tests, and recommends the next incremental safe step. Use this command during development to ensure changes align with architectural decisions and maintain test coverage compliance.
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/0xhimanshu/governor/HEAD/commands/guard.md -o ~/.claude/commands/guard.mdguard.md
# Governor Guard
Run:
```bash
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/governor.py" guard $ARGUMENTS
```
Use the result to report:
- possible scope drift
- planned files not changed yet
- acceptance tests still needed
- smallest safe next step
Keep the guidance concise and action-oriented.Audit recurring context files and suggest usage-limit optimizations.
Explain or summarize Governor vs Caveman performance benchmark results.
Automatically compress CLAUDE.md or other memory files with protected-span safety. One-command token savings.
Temporarily ask Governor to avoid compacting tool output for the next diagnostic step.
Install Governor compact-mode rule files into a project for Codex, Gemini, Cursor, Windsurf, or Cline.
Disable Governor compact response mode while keeping telemetry/tool hooks available.
Enable Governor compact professional mode for all prompts in this Claude Code session.
Create a compact implementation contract before broad app/site/game/refactor work.