# 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. Added in this iteration: - `src/guardrail_space/capsule.py`: Poetic Situation Capsule generator for tiny (128-512B) human+machine readable summaries useful in low-bandwidth operator triage. See tests/test_capsule.py for deterministic behavior and size checks.