Skip to content

feat: support user-defined workflow nodes - #348

Open
eshulman2 wants to merge 2 commits into
feature/conditional-workflow-edgesfrom
feature/user-defined-workflow-nodes
Open

eshulman2 wants to merge 2 commits into
feature/conditional-workflow-edgesfrom
feature/user-defined-workflow-nodes

Conversation

@eshulman2

Copy link
Copy Markdown
Collaborator

Summary

Add safe user-defined workflow nodes as inline templates or active project-published Node definitions. New runs resolve project references to exact revisions and pin the resolved template in the workflow artifact.

  • decision-v1 evaluates ordered typed predicates and emits a declared outcome.
  • agent-assessment-v1 sends only selected workflow inputs to one structured, tool-free model call and records a bounded summary.
  • Conditional edges can read node.<step>.outcome, including any/all branch scopes at join: all.
  • Add project-scoped node publication, activation, rollback, catalog, and CLI inspection, plus an artifact-review example.
  • Include template content in workflow manifest comparison and persist branch-keyed outcome records in checkpoints.

Verification

  • pytest -q tests/unit/workflow tests/integration/workflow/test_definition_publication.py — 1093 passed, 1 skipped
  • ruff check — passed
  • forge node validate docs/examples/workflow-nodes/artifact-review-node.yaml — passed

Stacked on #347 (feature/conditional-workflow-edges).

@eshulman2

Copy link
Copy Markdown
Collaborator Author

Demo path:

  1. Inspect and validate the example: forge node catalog and forge node validate docs/examples/workflow-nodes/artifact-review-node.yaml.
  2. Publish it for a test project: forge node publish DEMO docs/examples/workflow-nodes/artifact-review-node.yaml, then forge node activate DEMO artifact-review 1.
  3. Add a review_artifact step after specification generation in a project workflow, using node: {source: project, name: artifact-review} and a case for {fact: node.review_artifact.outcome, op: equals, value: ready}. Route ready to task generation and otherwise back to specification revision. The exact YAML snippet is in docs/examples/workflow-nodes/README.md.
  4. Run a DEMO ticket through the workflow with a specification. Inspect its checkpoint: node_results.review_artifact:main contains the declared outcome, short summary, and attempt. Publish and activate a second node revision, then verify the existing run keeps its pinned template while a new run uses revision 2.

The assessment node requires a configured model and a nonempty specification; missing input or malformed model output blocks the run.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant