Epic: Flows as Python, Visualization Always On #10

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

Context

PRD: docs/flows-as-python.md

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 at runtime and rendered live in the UI. One authoring mode, one viewer, zero hand-written SDK code in consumer repos.

Prerequisites

  • hero_rpc#29 — Generated Python clients must emit service methods, not just rootobject CRUD

(hero_rpc#30 was closed — its scope moved into hero_logic#11. Tracing helpers live in hero_logic, not in the generator.)

Stories

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

  • Story 1 — Foundation: executor + schema + hero_tracing.py + span socket listener — #11
  • Story 2 — UI: kill Cytoscape, monaco editor + live span-tree viewer — #12
  • Story 3 — Migrate 6 built-in flows + library search — #13

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) 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 at runtime and rendered live in the UI. One authoring mode, one viewer, zero hand-written SDK code in consumer repos. ## Prerequisites - [ ] hero_rpc#29 — Generated Python clients must emit service methods, not just rootobject CRUD (hero_rpc#30 was closed — its scope moved into hero_logic#11. Tracing helpers live in hero_logic, not in the generator.) ## Stories All-at-once release. No DAG back-compat. Rollout: Story 1 → (Story 2 + Story 3 in parallel). - [ ] **Story 1** — Foundation: executor + schema + `hero_tracing.py` + span socket listener — #11 - [ ] **Story 2** — UI: kill Cytoscape, monaco editor + live span-tree viewer — #12 - [ ] **Story 3** — Migrate 6 built-in flows + library search — #13 ## 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#10
No description provided.