This project is a local workflow IDE built on React Flow with a canonical workflow schema underneath.
Use this guide when adding a new atomic workflow node or changing the editor behavior.
The editor has three layers:
- Canonical workflow data:
lib/workflow/schema.ts - Primitive package components:
lib/workflow/node-primitives.ts - React Flow canvas state:
lib/flow/types.ts
Do not make React Flow node data the source of truth for product workflow behavior. Add behavior to the canonical workflow layer, then project it into React Flow. Primitive components are the reusable bottom layer used to explain and draft packaged nodes. They can appear in nested workspaces without becoming canonical workflow nodes.
Atomic nodes are profile-aware business operators such as JIN10 Source, Importance Score, or Webhook Notify.
-
Add the catalog entry.
File:
lib/workflow/node-catalog.tsInclude:
id: stable catalog id, for exampleintelligence.agent.scoreidPrefix: default node id prefix, for examplescorekind: canonical node kind fromworkflowNodeKindSchemacapability: canonical capability fromworkflowCapabilitySchemaparams: default canonical paramsrequiredAdapters: only when the node needs an adapter bindingkeywords: search terms for the command palette
-
Add the parameter template.
File:
lib/workflow/node-templates.tsAdd a
NodeTemplatewith typed fields:texttextareanumberbooleanselectslidertokens
Template fields can target:
source: "params"forworkflowProject.nodes[].paramssource: "adapter"for adapter mode/config
-
Add tests.
Minimum tests:
lib/workflow/node-catalog.test.tslib/workflow/node-templates.test.tslib/flow/store.test.tsif insertion or param updates change
-
Verify UI.
Run:
npm run typecheck npm test npm run build npm run smokeThen open the app, press
Ctrl+K, add the node, select it, and confirm the Inspector renders the template.
Adding a catalog node:
Command Palette
-> addWorkflowNodeFromCatalog
-> addCatalogNodeToWorkflowProject
-> workflowNodeToReactFlow
-> canvas node appears
Editing a parameter template:
Inspector
-> updateWorkflowNodeParams
-> workflowProject.nodes[].params or workflowProject.adapters[]
-> React Flow node fields/canonical metadata update
-> JSON/Mermaid export sees canonical changes
Inspecting node internals:
Inspector
-> getNodeInternals
-> show package sub-capabilities under the main node
-> map each internal step to a primitive component
-> double-click / Dive into Network opens locked primitive workspace
Drafting package internals:
Command Palette
-> Internal Primitive Components
-> addPrimitiveNode
-> draft node appears in the current nested workspace
-> canonical workflow remains unchanged until proposal/human accept
Primitive components are low-level building blocks such as Parse JSON, Map Fields, Condition Gate, Assert Schema, and Coverage Mark.
-
Add the primitive entry.
File:
lib/workflow/node-primitives.tsInclude stable
id,idPrefix,category, React Flow presentation fields, ports, default fields, and search keywords. -
Map internal capabilities when needed.
File:
lib/workflow/node-primitives.tsUpdate
CAPABILITY_TO_PRIMITIVE_IDso packaged internals resolve deterministically instead of relying on keyword search. -
Use the primitive in package internals.
File:
lib/workflow/node-internals.tsAdd or update
stepsfor the packaged node. The editor converts each step into a locked/draft primitive node when diving or unlocking internals. -
Add tests.
Minimum tests:
lib/workflow/node-primitives.test.tslib/workflow/node-internals.test.tslib/flow/store.test.tswhen insertion behavior changes
lib/workflow/schema.ts: canonical workflow contractlib/workflow/node-catalog.ts: operator librarylib/workflow/node-primitives.ts: bottom-level package component librarylib/workflow/node-templates.ts: Inspector parameter templateslib/workflow/node-internals.ts: packaged internals that map main nodes to primitive stepslib/workflow/to-react-flow.ts: canonical -> canvas projectionlib/workflow/from-react-flow.ts: canvas edits -> canonical exportlib/flow/store.ts: editor actionscomponents/flow/command-palette.tsx: add operatorscomponents/flow/inspector.tsx: parameter editingcomponents/flow/node-management-panel.tsx: node/adapter/run/proposal overview
- Keep JSON canonical as the source of truth.
- Keep adapter access behind adapter bindings.
- Keep live network disabled unless permissions say otherwise.
- Add fixtures before live fetch paths.
- Add tests for each new atomic node and adapter.
- Add primitive components for reusable sub-node behavior before hard-coding one-off internals.
- Update
.gstacktask/outcome notes for durable project memory.