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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

sdf_plan-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sdf_plan-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71382e4faef0ca70f2d7aa3b653a9c11bd6422bfe40eba409d3162a08db605d1
MD5 9292843ef29c9bc10df68a9bb5afbb71
BLAKE2b-256 19c7cc7e9ae77f854f273834466f7ec2ece4d8a1d139e345b4730588b0eac126

See more details on using hashes here.

Provenance

The following attestation bundles were made for sdf_plan-0.1.0-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