Skip to main content

DevFlow v2 CLI-first engine (projects, stories, execution store, review packets)

Project description

DevFlow Engine (v2)

CLI-first Python engine for DevFlow v2.

Goals

  • Project lifecycle: draft shell -> bind workspace/repo -> init/register/list/remove
  • Story lifecycle: index/validate/register/execute
  • Planning support: repo analysis -> source docs -> scopes -> approved scope -> idea(s) -> DevFlow stories
  • Implementation workflow: "green" gate = tests + typecheck + lint
  • Review workflow: story-driven compliance/soundness/security review packets persisted in SQLite
  • Error workflow: error queue + remediation runs
  • Execution store: .devflow/execution.sqlite

Documentation

  • docs/story-implementation-planning-node.md — per-story planning/gating node before TestDesign/Red, with dependency findings, queue decisions, and registry expectations consumed by downstream implementation nodes.

Install / Dev

This repo is intended to be run with uv.

cd devflow_engine
uv venv
uv pip install -e '.[dev]'

Run the CLI:

devflow --help

Happy path

  1. project shell created in control plane
  2. workspace/repo bound to project
  3. registration DAG runs via devflow project init or devflow project import
  4. project reaches ready_for_source_scope
  5. source docs -> scopes
  6. approved scope -> idea(s)
  7. idea -> DevFlow stories
  8. story -> implementation
  9. implementation -> review

Quickstart

Register an existing repo with DevFlow:

devflow project init --name my-repo

Create and register a new repo from a template:

devflow project import /absolute/path/to/my-repo --init python

Clone and register an existing GitHub repo:

devflow project import owner/repo

Draft story contracts based on repo scan:

devflow plan analyze
ls .devflow/drafts

Validate and register a story:

devflow story validate .devflow/drafts/DF-PLAN-001.yaml
devflow story register .devflow/drafts/DF-PLAN-001.yaml

Run the "green gate":

devflow impl gate
# or
./scripts/green.sh

Generate a review packet:

devflow review run DF-PLAN-001

Inspect errors:

devflow error list

Inspect per-node outputs from a stored run:

# dump a specific run by run_id
python scripts/dump_run_node_outputs.py \
  --run-id <run_uuid>

# or dump the latest run for any DAG by dag_id
python scripts/dump_run_node_outputs.py \
  --dag-id implementation_dag

# second-most-recent run for that DAG
python scripts/dump_run_node_outputs.py \
  --dag-id implementation_dag \
  --latest-index 2

Dumps are written under .devflow/node_output_dumps/<dag>/<label>/<timestamp>/ by default. The navigation path intentionally stays human-readable and omits run IDs / object IDs where possible:

  • <dag> comes from runs.dag_id unless it looks like an ID, in which case the folder falls back to dag
  • <label> is derived from readable config fields such as label, name, title, idea_title, scope_title, or story_title
  • the exact run_id still lands in manifest.json inside the dump directory

Use --output-root /tmp/devflow-dumps to write somewhere else.

Run the source -> scope scaffold end-to-end:

devflow source-scope run \
  --project-id proj_demo \
  --intake-id source_demo \
  --text "Customers approve quotes online. Approved quotes create jobs. Completed jobs create invoices and customers can pay online."

Gate a pre-shaped normalized packet + scope outline deterministically:

devflow source-scope gate \
  --project-id proj_demo \
  --source-packet .devflow/path/to/normalized_source_packet.json \
  --scope-outline .devflow/path/to/scope_outline.json

Story contracts

Story contracts are YAML documents containing:

  • id, title
  • planes: required plane write-ups (product, ux, technical, security, compliance, operations)
  • plane_oracles: list of {plane, anchor} entries used as verification anchors

The contract validator enforces presence of required planes + non-empty plane_oracles.

Execution store

All runs/events/errors/review packets are stored in:

  • .devflow/execution.sqlite

This database is created automatically on first CLI usage.

Workers / Background services

Supabase execution-event listener (devflow worker supabase-events)

This is the DFE-side listener/dispatcher for the devflow_execution_events Supabase table. It is the single long-running process that bridges the control-plane (Supabase) to the local DevFlow engine — picking up queued events and dispatching the appropriate DFE workflow for each.

Normal operation (continuous loop with Realtime):

devflow worker supabase-events

Starts an indefinite polling loop. While running it also opens a Supabase Realtime WebSocket subscription on devflow_execution_events. New INSERT events on that table wake the dispatch loop immediately rather than waiting for the next poll interval (default: 3 s). If the WebSocket connection drops it reconnects automatically in the background; polling continues as the fallback during any gap.

Process a single queued event and exit:

devflow worker supabase-events --once

Useful for manual trigger / smoke testing.

Disable Realtime (polling only):

devflow worker supabase-events --no-realtime

Runs the same polling loop but skips the WebSocket listener entirely. Use this when the websockets Python package is unavailable, or when you need to debug without a live connection.

Additional options:

Flag Default Description
--sleep-seconds N 3.0 Idle sleep between polls (also caps realtime wake latency)
--max-iterations N unlimited Stop after N loop iterations
--json off Emit JSON summary on exit

When queued events are not being picked up — checklist:

  1. Verify the worker is running: there should be a live devflow worker supabase-events process.
  2. Check Supabase credentials: SUPABASE_URL and SUPABASE_SERVICE_KEY (or equivalent config) must be set and valid.
  3. Confirm the event row in devflow_execution_events has status = queued and run_id IS NULL — events with any other status are skipped.
  4. Check that the event's event_type is in the supported set (see docs/queue-worker-infra.mdSupported event types).
  5. Run with --once to get an immediate result and check stderr/stdout for errors.
  6. If Realtime is misbehaving (false wake-ups or missed wakes), try --no-realtime to isolate the issue to the polling path.

See docs/queue-worker-infra.md for full architecture details.

Design notes

  • docs/scope-idea-agentification.md — current scope->idea agentic runtime notes
  • docs/ui-grounding-curtis-medium-tier-doctrine.md — follow-on UI grounding / wireframe planning doctrine from the Curtis pass, including the proposed ui_screen_inventory.json contract and the default medium-tier minimum for customer-facing wireframes

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

devflow_engine-1.1.9.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

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

devflow_engine-1.1.9-py3-none-any.whl (777.0 kB view details)

Uploaded Python 3

File details

Details for the file devflow_engine-1.1.9.tar.gz.

File metadata

  • Download URL: devflow_engine-1.1.9.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for devflow_engine-1.1.9.tar.gz
Algorithm Hash digest
SHA256 9f83d7baf8c5160e7a48a588f66e4d06eefa193ef40a8b2fae552b79803ddbce
MD5 6ac60b0fa6c3f7ecae057c264b1ec0b9
BLAKE2b-256 1145ebd3cd4c64a44743fb7e2614ddc1a686a367556b40420decdbb45db4a451

See more details on using hashes here.

File details

Details for the file devflow_engine-1.1.9-py3-none-any.whl.

File metadata

  • Download URL: devflow_engine-1.1.9-py3-none-any.whl
  • Upload date:
  • Size: 777.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for devflow_engine-1.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 e1c458a42653c2299424bf5a3dc6e29af7f9e905f71cb597d1744f2690d8fa49
MD5 90eacc6f9c2c129a69a2df40460338eb
BLAKE2b-256 6af16b4c7d63dcc0854a9584898f79fc77f022ec4e0354c508f843e73fdd6504

See more details on using hashes here.

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