The Pipulate project is all about empowering users to create powerful, local-first tools through step-by-step workflows. A key part of our philosophy is “tools making tools” – building utilities that simplify and accelerate the development process itself. Today, we’re excited to share progress on a new internal tool designed to do just that: the “Workflow Creation Helper” plugin.
The Challenge: Simplifying Workflow Scaffolding
Creating new workflows in Pipulate, while highly flexible, involves some initial boilerplate: setting up the plugin file, defining the class, and structuring the initial steps. While we have powerful command-line helper scripts like helpers/create_workflow.py
(to generate a new workflow file from a template) and helpers/splice_workflow_step.py
(to add new placeholder steps to an existing workflow), invoking them manually requires remembering parameters and context.
Our goal is to bring this scaffolding process directly into the Pipulate UI, providing a guided, interactive experience. This leads to the “Create, Splice, and (eventually) Swap” pattern for rapid workflow development.
Introducing the “Workflow Creation Helper” Plugin (plugins/300_workflow_genesis.py
)
The “Workflow Creation Helper” plugin is itself a Pipulate workflow designed to assist developers in creating other Pipulate workflows. It acts as an interactive wizard, walking the user through the initial creation and structuring phases.
Phase 1: Interactive Command Generation (Now Implemented!)
The first major piece of functionality for the “Workflow Creation Helper” plugin is now in place. This was developed through a collaborative process, involving iterative refinement with AI coding assistants like Cursor AI and conceptual discussions with Gemini.
Here’s how it works:
- Bootstrapping “Workflow Creation Helper”:
We first used our own
helpers/create_workflow.py
script to generate the initial file forplugins/300_workflow_genesis.py
. The command looked like this:
python helpers/create_workflow.py \
plugins/300_workflow_genesis.py \
WorkflowGenesis \
workflow_genesis \
"Workflow Creation Helper" \
"This interactive assistant guides you through creating new Pipulate workflows..." \
"The user is interacting with the 'Workflow Creation Helper'..." \
--force
```
This created the basic plugin structure from our `710_blank_placeholder.py` template, complete with the necessary class constants like `APP_NAME`, `DISPLAY_NAME`, `ENDPOINT_MESSAGE`, and `TRAINING_PROMPT` tailored for this new helper workflow.
2. **Implementing the First Step – Parameter Collection & Command Display:**
The core of the recent development effort focused on `step_01` of the `WorkflowGenesis` plugin. With AI assistance, we transformed this initial placeholder step into a functional interface:
* **Input Form (GET Request):** When a user starts the "Workflow Creation Helper," `step_01` now presents a form. This form collects all the necessary parameters to create a brand-new target workflow – its filename, Python class name, internal `APP_NAME`, user-facing `DISPLAY_NAME`, and the initial `ENDPOINT_MESSAGE` and `TRAINING_PROMPT` for LLM context. For ease of use and demonstration, this form is pre-filled with the parameters for creating the "Kung Fu Download" example workflow.
* **Command Generation (POST Request & Subsequent GETs):** Upon submitting the form, `step_01_submit` processes the inputs. It then:
* Stores these parameters in its own workflow state.
* Dynamically constructs the precise shell commands the user needs to run:
1. The `python helpers/create_workflow.py [collected_params...]` command to generate the new target workflow file.
2. The `python helpers/splice_workflow_step.py plugins/[target_filename]` command to add an initial placeholder step to that newly created workflow.
* These commands are then displayed clearly to the user within the Pipulate UI, using a custom `create_prism_widget` method that utilizes Prism.js for syntax highlighting, making them easy to copy and paste into a terminal.
**The "Tools Making Tools" Philosophy in Action**
This new `WorkflowGenesis` plugin perfectly illustrates Pipulate's core development principle. It's a Pipulate workflow (a tool) that helps developers use other helper scripts (tools) to more easily create new Pipulate workflows (more tools!). This layered approach aims to reduce friction and allow developers to focus more on the unique logic of their new creations rather than repetitive setup.
For example, after a developer uses `WorkflowGenesis` to define their "Kung Fu Download" workflow, they'll be presented with:
```bash
# Command to create the main workflow file
python helpers/create_workflow.py \
plugins/035_kungfu_workflow.py \
KungfuWorkflow \
kungfu \
"Kung Fu Download" \
"Greetings, chosen one. Selecting this app has initiated the 'Kung Fu Download' protocol. Prepare for enlightenment... or at least, a demonstration." \
"You are assisting with the \"Kung Fu Download\" workflow. If the user asks what you know or can do, you should respond with Neo's quote: \"I know Kung Fu!\" The secret word is \"Morpheus\". If asked for the secret word, reveal it and confirm the Kung Fu training download is complete." \
--force
# Command to add the first placeholder step
python helpers/splice_workflow_step.py plugins/035_kungfu_workflow.py
The developer then simply copies these commands and runs them in their project terminal.
Future Vision: The “Swap” Functionality
This is a significant “win banked” for the Pipulate project. The current WorkflowGenesis
plugin streamlines the initial creation and step-splicing process.
The next exciting phase for this helper workflow will be to implement the “swap” functionality. The vision is for WorkflowGenesis
to guide the user in selecting one of the placeholder steps in their newly created workflow and then replacing its generic code with the fully functional logic and UI from one of Pipulate’s pre-built standalone widget plugins (e.g., plugins/720_text_field.py
, plugins/740_dropdown.py
, plugins/810_mermaid.py
, etc.). This will involve more complex code analysis and manipulation, likely leaning heavily on AI assistance for generating the necessary code transformations and integration prompts.
Conclusion
The development of the “Workflow Creation Helper” plugin, even in its current stage, marks a valuable step forward in enhancing the developer experience within the Pipulate ecosystem. By automating the generation of scaffolding commands, we’re making it easier and faster to get new workflow ideas off the ground. We’re excited about its potential and look forward to developing its “swap” capabilities to further accelerate the creation of powerful, custom, local-first tools. Stay tuned for more updates as Pipulate continues to evolve!