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.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sdf_plan-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a955a0da2f0d73535a4f5f02739ab7b2544191ac2369c3db57aaf8d770a2b8b9
MD5 14e231f22d372089d189691aa404d51d
BLAKE2b-256 f84215b64aec9528d86614ee5b2610e6968df89e49bf520dfeac7d0f95b104ea

See more details on using hashes here.

Provenance

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