feature

Flow authoring agent

The flow authoring agent edits Definition Code (API word: flow) — events, emits with labels, drawing, and multi-file packages.

Ask it when you want Collectable setups marked in history. It works against your live unsaved draft and proposes file patches.

Tools (typical)

Tool

Where

Notes

get_flow_state

server

Persisted state

get_flow_files

client

Live unsaved draft

lint_flow

client

Patches merge over draft

propose_flow_edit

client (human)

patches[] create/replace/delete

update_title / request_add_indicator

client

dry_run_flow

removed from agent surface

Do not rely on it

Prompting patterns

Good

  • “Emit or_break with label OR break ↑ when close crosses the opening range high; oncePer session.”

  • “Split classify helpers into ./classify.js; keep meta and onBar in the entry.”

  • “Add a subtitle with range % and sample n (two datapoints max).”

Bad

  • “Publish a study table of forward returns” — study agent.

  • “Skip labels, event id is enough” — labels are required.

  • “Import lodash from npm” — relative ESM only.

Constraints

  • kind: "flow" for Collect events

  • Every ctx.emit needs label

  • oncePer for dedupe

  • meta() only in the entry file

  • Lint over the draft before proposing patches

Next

  1. Emit and labels

  2. Multi-file packages and imports