Skip to main content

PlanSpec + lint + safety gates for agent plans.

Project description

sdf-plan

PlanSpec + lint + safety gates for agent plans.

3-Minute Quickstart

pip install sdf-plan
python -c "from sdf_plan import preflight_lint; print('OK')"
python examples/quickstart_local_lint.py

Expected output includes:

  • lint findings
  • policy summary with confirm-required counts

What You Get

  • PlanSpec models (sdf.v1.2)
  • lint engine
  • policy annotation helper
  • preflight_lint helper/decorator
  • LangGraph/CrewAI adapters

Local Dev Install

pip install -e .

Basic Example

from sdf_plan import lint_plan, policy_annotate, preflight_lint

plan = {"steps": [{"id": "S1", "type": "ACT", "intent": "send email", "inputs": [], "outputs": ["x"], "depends_on": [], "stop_condition": "Step S1 completed", "fallback": "reduce_scope"}]}
plan, summary = policy_annotate(plan)
findings = lint_plan(plan, max_steps=12, safety_mode="safe")
preflight_lint(plan, max_steps=12, safety_mode="safe")

Examples

  • examples/quickstart_local_lint.py
  • examples/langgraph_plangate_demo.py
  • examples/crewai_plangate_demo.py

Compatibility

Use Cloud schema hash checks to detect contract drift:

from sdf_plan.compat import assert_schema_compat, package_version

assert_schema_compat(package_version(), "schema_hash_from_/v1/schema")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sdf_plan-0.1.2.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sdf_plan-0.1.2-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file sdf_plan-0.1.2.tar.gz.

File metadata

  • Download URL: sdf_plan-0.1.2.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sdf_plan-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c198dc48aaa5dbb331de33aa4aec34254dbae072408ddaae254b5ca8131bee68
MD5 03a1507ec2f19345683a21c124eb5f53
BLAKE2b-256 6bf8a38f5900ca59a86b91267015e4baa7ffdd8940f1ee5a0ff6b633ff5efb16

See more details on using hashes here.

Provenance

The following attestation bundles were made for sdf_plan-0.1.2.tar.gz:

Publisher: release.yml on directiveproto/sdf-plan

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sdf_plan-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: sdf_plan-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sdf_plan-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d1eb8e182d0bb9202abb7ec57bd0f16b5c9137ecadddedc86b108fce82bb20f4
MD5 bf77868ce650233eca24b76068828458
BLAKE2b-256 7985e8b4da8523d601fd0dc955f4b3e419f165710e7a88678b9f104a22b9f447

See more details on using hashes here.

Provenance

The following attestation bundles were made for sdf_plan-0.1.2-py3-none-any.whl:

Publisher: release.yml on directiveproto/sdf-plan

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page