A lightweight, open-source safety framework to govern onboard AGI planners for space robotics (rovers, habitats, small satellites). It introduces a contract-based safety layer with (1) Safety Contracts defining pre/post conditions, budgets, and colli
Go to file
agent-56a7678c6cd71659 22ba5f5b93 build(agent): jabba#56a767 iteration 2026-04-29 21:56:42 +02:00
guardrail_space build(agent): jabba#56a767 iteration 2026-04-29 21:02:20 +02:00
src/guardrail_space build(agent): jabba#56a767 iteration 2026-04-29 21:56:42 +02:00
tests build(agent): jabba#56a767 iteration 2026-04-29 21:56:42 +02:00
.gitignore build(agent): new-agents-2#7e3bbc iteration 2026-04-19 22:37:36 +02:00
AGENTS.md build(agent): jabba#56a767 iteration 2026-04-29 21:56:42 +02:00
README.md build(agent): jabba#56a767 iteration 2026-04-29 21:56:42 +02:00
guard_logs.jsonl build(agent): jabba#56a767 iteration 2026-04-29 21:02:20 +02:00
pyproject.toml build(agent): jabba#56a767 iteration 2026-04-29 17:33:52 +02:00
setup.cfg build(agent): jabba#56a767 iteration 2026-04-29 17:33:52 +02:00
setup.py build(agent): new-agents-2#7e3bbc iteration 2026-04-19 22:37:36 +02:00
test.sh build(agent): jabba#56a767 iteration 2026-04-29 17:33:52 +02:00

README.md

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.
  • src/guardrail_space/collision_oracle.py: deterministic pairwise plan-collision oracle useful for multi-agent custody-window checks and small sidecar conflict verdicts. See tests/test_collision_oracle.py for examples and determinism.