Skip to main content

Flowpact

CI PyPI License

Human-writable workflow + success contracts for AI products.

Non-engineers (Workflow Contract Authors) capture process stages, scope boundaries, policies, success recipes, and evidence requirements in one pact.yaml. The CLI validates the pact and derives client ask lists and no-claim gates — so teams stop reverse-engineering client workflow from meetings and arguing about accuracy without a shared definition of done.

One-line positioning. Data contracts certify seams; eval kits score free-text answers; Flowpact certifies that the engagement has defined the client’s workflow and success rules — and knows what is still missing. Optional flowpact-score executes a structured draft-vs-gold claim from export-eng.json.

Positioning matrix

Layer Role
Flowpact Defines workflow + success recipe; validates; asks / no-claim; export-eng
flowpact-score (optional) Executes the claim: frozen gold + drafts + recipe → field scores → pass/fail
Trustline / GE Audits warehouse / data seams (not Flowpact)
RAGAS / DeepEval Adjacent free-text / trace eval kits (not a structured field recipe runner)

Non-goals (base package)

Adjacent tool Why base Flowpact is not that
Trustline / Great Expectations Does not query warehouses or compile SQL
RAGAS / DeepEval Does not run LLM judges or embeddings in the base install
OpenAPI / JSON Schema (runtime) Does not validate HTTP or candidate payloads at runtime
Orchestrators (Airflow, etc.) Does not schedule or execute generation
Full RAGAS replacement flowpact-score is structured draft-vs-gold only — not free-text Q&A eval

Base pip install flowpact never pulls torch, OpenAI, or embedding models. Heavy methods live behind flowpact[score-embed] / flowpact[score-llm].

Install

From PyPI:

pip install flowpact
pip install 'flowpact[score]'          # optional draft-vs-gold runner (flowpact-score)
# pip install 'flowpact[score-embed]'  # embedding_similarity (stub / heavy deps)
# pip install 'flowpact[score-llm]'    # llm_judge (stub; off by default)

From source (development):

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,score]"

Releases are published from v* tags via GitHub Actions (Trusted Publishing). See CONTRIBUTING.md.

Commands

flowpact init --template ai-draft-vs-gold
flowpact validate pact.yaml
flowpact asks pact.yaml
flowpact no-claim pact.yaml --strict
flowpact render pact.yaml
flowpact export-eng pact.yaml -o export-eng.json

Optional score

flowpact-score run \
  --export-eng export-eng.json \
  --gold gold.jsonl \
  --drafts drafts.jsonl \
  --out reports/score_run/

flowpact-score diff \
  --baseline reports/score_run_a/manifest.json \
  --candidate reports/score_run_b/manifest.json

Exit codes: 0 pass, 1 claim fail / regression, 2 usage or input error.

Field paths are dotted (a.b.0.c). Population / gate rules use a small DSL (equals …, in a, b, c, bare token). See src/flowpact/score/README.md.

Minimal CI snippet

flowpact validate pact.yaml
flowpact no-claim pact.yaml --strict
flowpact export-eng pact.yaml -o export-eng.json
flowpact-score run --export-eng export-eng.json --gold gold.jsonl --drafts drafts.jsonl --out reports/score_run/
flowpact-score diff --baseline reports/baseline/manifest.json --candidate reports/score_run/manifest.json

Prefer clearing no-claim blockers before scoring (no-claim --strict, or flowpact-score run --require-claim-clear --pact pact.yaml).

Example (synthetic draft-vs-gold)

Northwind Benefits policy-answer copilot — synthetic domain only, for schema/CLI demos.

flowpact validate examples/draft-vs-gold/pact.yaml
flowpact asks examples/draft-vs-gold/pact.yaml
flowpact no-claim examples/draft-vs-gold/pact.yaml --strict
flowpact export-eng examples/draft-vs-gold/pact.yaml -o /tmp/export-eng.json
flowpact-score run \
  --export-eng /tmp/export-eng.json \
  --gold examples/draft-vs-gold/gold.jsonl \
  --drafts examples/draft-vs-gold/drafts.jsonl \
  --out /tmp/score_run/

Details: examples/draft-vs-gold/README.md. Hand-derived spike reports: asks.hand.md, no-claim.hand.md.

Schema

Frozen authoring format flowpact: "0.1" — JSON Schema at schemas/pact.schema.json (also shipped in the package). export-eng adds additive export_schema: "1". Score report schemas: schemas/score-manifest.schema.json, schemas/score-scorecard.schema.json, schemas/score-population-audit.schema.json. Design plan: docs/design/FLOWPACT_PLAN.md.

Contributing

See CONTRIBUTING.md. CI runs ruff + pytest on Python 3.11–3.13.

License

Apache-2.0 — see LICENSE.

Metadata

Release files for flowpact 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flowpact 0.2.0
File Size Uploaded
flowpact-0.2.0.tar.gz 33.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flowpact 0.2.0
File Interpreter ABI Platform
flowpact-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 68.3 kB

Release files / flowpact-0.2.0.tar.gz

Download URL flowpact-0.2.0.tar.gz
Size 33.1 kB
Tags Source
SHA-256 checksum
How to use checksums
bb110cd7c1400c0ba17c6b2549d5785f32a6652ad40c411d3c154f579c0b74d8
BLAKE2b-256 checksum
How to use checksums
935f77e2076333ca99a21720f8abecd28e4af50ca7331567f009bc6d9005183d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.

Transparency log

Release files / flowpact-0.2.0-py3-none-any.whl

Download URL flowpact-0.2.0-py3-none-any.whl
Size 35.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b238ee207679523cebc33abbc356e69289eb7dcd85be5502643c7f9297fc7c84
BLAKE2b-256 checksum
How to use checksums
62355dafbe05fe30fe7a11faaa2228a3ca352a45e2f240ce74063c6a6f6cc5ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page