Skip to content

[FUTURE] Implement Workflow/Automation System #334

Closed as not planned
Closed as not planned

Description

@malibio

Overview

Implement event-driven workflow engine that allows users to define automations triggered by node events.

Status: FUTURE - This is a placeholder issue for tracking. Design and implementation details will be added after foundational work (#332, #333, #312, #106) is complete.

Example Use Case

// Define workflow: Auto-create welcome task when customer becomes active
await mcp.call("define_workflow", {
  workflow_name: "customer_activation_welcome",
  trigger: {
    event_type: "property_changed",
    conditions: { 
      node_type: "customer", 
      property: "status", 
      new_value: "active" 
    }
  },
  actions: [{
    action_type: "create_node",
    parameters: {
      node_type: "task",
      content: "Send welcome email to {{node.content}}",
      properties: { 
        status: "pending", 
        customer_id: "{{trigger.node_id}}" 
      }
    }
  }]
});

High-Level Requirements

  • Workflow definition storage (workflow_definitions table)
  • Event bus integration for triggers
  • Template variable substitution
  • Action executor (create_node, update_node, etc.)
  • MCP tools for workflow management

Dependencies

Activity

  1. self-assigned this
    on Sep 11, 2026
  2. mstomar125 commented on Sep 11, 2026

    @mstomar125
    Contributor

    Triage: closing as superseded by the playbook engine

    This issue was filed as a [FUTURE] placeholder, explicitly gated on #332, #333, #312, #106. All four are now closed (the last, #312, closed 2026-05-17) — so the issue's own stated gate cleared about four months ago. In the interim, the concept described here was independently designed and implemented under a different name: the playbook engine (packages/core/src/playbook/), specified in playbook-system.md / playbook-engine.md in nodespace-docs.

    It is the same trigger → conditions → actions model this issue asked for, mapped directly:

    #334 asked for Playbook engine equivalent
    Workflow definition storage (workflow_definitions table) A playbook node (node_type: "playbook") stored in the universal graph — same concept, stored as a node rather than a dedicated SQL table, consistent with NodeSpace's "everything is a node" model
    Event bus integration for triggers PlaybookEngine subscribes to the domain-event broadcast channel for graph_event triggers (node_created, property_changed, relationship_added, relationship_removed), plus a scheduled/cron trigger type this issue didn't ask for
    Template variable substitution Runtime bindings ({trigger.node.id}, {trigger.property.new_value}, {actions[n].result.id}, {item.*}) — packages/core/src/playbook/actions.rs / cel.rs
    Action executor (create_node, update_node, etc.) Exactly create_node, update_node, plus add_relationship / remove_relationship — packages/core/src/playbook/actions.rs
    Conditions CEL expressions (cel-interpreter) with dot-path graph traversal and collection operators (.any, .all, .where) — considerably richer than the flat condition dict in this issue's example
    MCP tools for workflow management Per ADR-035 (2026-05-30), MCP was removed org-wide as the agent-integration surface in favor of the nodespace CLI + skill guidance. The playbook system's external control surface (list_playbooks, enable_playbook / disable_playbook, get_workflow_state, playbook logs) is specified and tracked as CLI verbs + skill guidance rather than MCP tools — see #2563

    This is already a complete, unit-tested Rust runtime (CEL evaluation, sequential action execution, cron scheduling, single-device cycle detection, save-time validation) — but it isn't wired up end-to-end yet. The remaining work is tracked on the playbook-engine issues, not here:

    Closing this as superseded to consolidate tracking: the concept, data model, and even most of the vocabulary ("trigger", "conditions", "actions", create_node, update_node) is realized by the playbook engine, just built under a different name, with a richer condition language and a graph-node storage substrate instead of a dedicated table. Keeping both open invites exactly the duplicate-effort/confusion risk this triage was meant to catch. Future workflow/automation work should happen on the playbook-engine thread (#2562 / #2563 / #2565 and any follow-ons), not here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions