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
- project shell created in control plane
- workspace/repo bound to project
- registration DAG runs via
devflow project initordevflow project import - project reaches
ready_for_source_scope - source docs -> scopes
- approved scope -> idea(s)
- idea -> DevFlow stories
- story -> implementation
- 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 fromruns.dag_idunless it looks like an ID, in which case the folder falls back todag<label>is derived from readable config fields such aslabel,name,title,idea_title,scope_title, orstory_title- the exact
run_idstill lands inmanifest.jsoninside 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,titleplanes: 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:
- Verify the worker is running: there should be a live
devflow worker supabase-eventsprocess. - Check Supabase credentials:
SUPABASE_URLandSUPABASE_SERVICE_KEY(or equivalent config) must be set and valid. - Confirm the event row in
devflow_execution_eventshasstatus = queuedandrun_id IS NULL— events with any other status are skipped. - Check that the event's
event_typeis in the supported set (seedocs/queue-worker-infra.md→ Supported event types). - Run with
--onceto get an immediate result and check stderr/stdout for errors. - If Realtime is misbehaving (false wake-ups or missed wakes), try
--no-realtimeto 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 notesdocs/ui-grounding-curtis-medium-tier-doctrine.md— follow-on UI grounding / wireframe planning doctrine from the Curtis pass, including the proposedui_screen_inventory.jsoncontract and the default medium-tier minimum for customer-facing wireframes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file devflow_engine-1.1.16.tar.gz.
File metadata
- Download URL: devflow_engine-1.1.16.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac99acf13feebb2c94fc5cbc78fb8b0523199a26e864de48dab6d695d8976ad7
|
|
| MD5 |
649fc83fce1bd6af20abd69669695ff1
|
|
| BLAKE2b-256 |
4396ffc4bb3fc52d403aad534eeabd75b5db280513f42ff6998a1277aac54ff3
|
File details
Details for the file devflow_engine-1.1.16-py3-none-any.whl.
File metadata
- Download URL: devflow_engine-1.1.16-py3-none-any.whl
- Upload date:
- Size: 789.9 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c28c19462523704fc86062b166b87fb16ae3b297f72d3896b01231e2954a6ba
|
|
| MD5 |
53c7056beed3ae98e09cfd7b18c866c1
|
|
| BLAKE2b-256 |
4bf2d568eec1c7bc2bf407d8bfdc226aae89cbf985fc3f4901137e67e6eea5ea
|