Epic: Flows as Python, Visualization Always On #9

Open
opened 2026-04-21 14:16:00 +00:00 by timur · 0 comments
Owner

Context

PRD: docs/flows-as-python.md (commit ea502d1)

The DAG-as-JSON authoring model is being deleted. Flows become Python functions decorated with @flow(...), with with flow.step(name): blocks for named steps. A span tree is emitted automatically at runtime and rendered live in the UI. One authoring mode, one viewer, zero hand-written SDK code.

Prerequisites (in hero_rpc)

  • hero_rpc#29 — Generated Python clients must emit service methods, not just rootobject CRUD
  • hero_rpc#30 — Generated Python clients must ship a shared tracing module + auto-span every RPC call

Both must land before Story 1 here can start.

Stories

All-at-once release. No DAG back-compat. Rollout order is Story 1 → (Story 2 + Story 3 in parallel).

  • Story 1 — Foundation: executor + schema + span socket listener (filed separately)
  • Story 2 — UI: kill Cytoscape, monaco editor + live span-tree viewer (filed separately)
  • Story 3 — Migrate 6 built-in flows + library search (filed separately)

Out of scope

  • Human-in-the-loop pauses (handled by Python scripts talking to Slack if needed)
  • Edit-by-tree for non-coders (schema leaves room; v2 feature)
  • Pre-execution visualization (tree is rendered from actual span events)
  • Meta-DSL — rejected in the PRD

Done when

  • All three stories closed
  • The 6 existing built-in flows run as Python and render span trees identically in the UI
  • node_runs / Node / Edge / template_loader.rs / node_executors.rs deleted from the codebase
  • Service Agent v3 consults the flow library as its first step
## Context PRD: [`docs/flows-as-python.md`](https://forge.ourworld.tf/lhumina_code/hero_logic/src/branch/development/docs/flows-as-python.md) (commit `ea502d1`) The DAG-as-JSON authoring model is being deleted. Flows become Python functions decorated with `@flow(...)`, with `with flow.step(name):` blocks for named steps. A span tree is emitted automatically at runtime and rendered live in the UI. One authoring mode, one viewer, zero hand-written SDK code. ## Prerequisites (in hero_rpc) - [ ] hero_rpc#29 — Generated Python clients must emit service methods, not just rootobject CRUD - [ ] hero_rpc#30 — Generated Python clients must ship a shared tracing module + auto-span every RPC call Both must land before Story 1 here can start. ## Stories All-at-once release. No DAG back-compat. Rollout order is Story 1 → (Story 2 + Story 3 in parallel). - [ ] **Story 1** — Foundation: executor + schema + span socket listener (filed separately) - [ ] **Story 2** — UI: kill Cytoscape, monaco editor + live span-tree viewer (filed separately) - [ ] **Story 3** — Migrate 6 built-in flows + library search (filed separately) ## Out of scope - Human-in-the-loop pauses (handled by Python scripts talking to Slack if needed) - Edit-by-tree for non-coders (schema leaves room; v2 feature) - Pre-execution visualization (tree is rendered from actual span events) - Meta-DSL — rejected in the PRD ## Done when - All three stories closed - The 6 existing built-in flows run as Python and render span trees identically in the UI - `node_runs` / `Node` / `Edge` / `template_loader.rs` / `node_executors.rs` deleted from the codebase - Service Agent v3 consults the flow library as its first step
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_logic#9
No description provided.