guardrail-space-verifiable-.../README.md

1.1 KiB

GuardRail.Space — Safety Contracts DSL (partial)

This repository contains a minimal Python package implementing a lightweight SafetyContract DSL and a tiny runtime policy engine suitable for use as the basis of GuardRail.Space. It is intentionally small: a focused, well-tested chunk that implements SafetyContracts, basic budget checks, and a policy engine that can veto or rewrite proposed actions.

What is included in this change

  • A small Python package guardrail_space with:
    • contract.py: SafetyContract dataclasses and checks
    • engine.py: a minimal policy engine that can accept, veto, or rewrite actions
  • Unit tests under tests/ exercising contract evaluation and engine behavior
  • Packaging metadata (pyproject.toml, setup.cfg) so python3 -m build works
  • test.sh which runs the test-suite and builds a sdist/wheel

This is a focused increment toward the full GuardRail.Space vision (WASM runner, ROS shims, fuzz harness, etc.). Next steps can extend the DSL, add serialization (YAML/DSL), shadow runner integration, and the situation-summary artifacts.