Skip to content

examples/agy-safety-gate: enable Stage-0 static pre-filter (--static-stage) by default #53

Closed

Description

@ghchinoy

Context

In examples/agy-safety-gate/dgem_gate.py, the <1 ms Stage-0 deterministic static pre-filter (evaluate_static_stage0, blocking catastrophic destructive commands such as sudo, rm -rf /, force-pushes to main/master, .agents/hooks.json tampering, and credential file reads while fast-allowing pure local workspace reads) currently defaults to False (DGEM_GATE_STATIC=0).

On the 200-item held-out confirming evaluation across 6 tool-call categories, combining Stage-0 static rules with the 2-slot tool_safety_gate.json.tmpl policy and --cascade gemini is the recommended production configuration (95.0% accuracy, 0/70 safety leaks, 2/90 benign confirmation prompts at 10% Stage-2 escalation, vs. 11/90 benign prompts when Stage 1 runs alone).

Proposed Change

  1. Enable static_stage by default in GateConfig (DGEM_GATE_STATIC defaults to "1"), while keeping explicit opt-outs via --no-static-stage and DGEM_GATE_STATIC=0 (and preserving --static-stage for backwards compatibility).
  2. Update examples/agy-safety-gate/hooks.example.json, README.md (including the 200-item held-out evaluation summary and --cascade gemini recommendation), and test_dgem_gate.py.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions