Skip to main content

workgraph

workgraph orchestrates development workflows declared as graphs. Nodes run agents or commands; a node's outcome selects the transition to follow. The developer writes the workflow once and starts a run from a harness session with /workgraph. The run prints one progress line per node. One command resumes a stopped run.

The CLI bundles workflow and agent definitions; Workflow files lists them. This repository runs the bundled wg workflow on itself:

flowchart TD
    design([design])
    design -->|done| approve-design
    approve-design -->|accept| plan
    approve-design -->|reject| design
    plan -->|done| approve-plan
    approve-plan -->|accept| implement
    approve-plan -->|reject| plan
    implement -->|done| test
    test -->|pass| review
    test -->|fail| implement
    review --> code-review
    review --> overengineering-review
    review -->|pass| pr
    review -->|fail| review-loop
    review-loop -->|pass| implement
    review-loop -->|fail| implement
    review-loop -->|LIMIT| summary
    summary -->|done| pr
    pr -->|done| END

Install

As a Claude Code plugin:

/plugin marketplace add sylmarien/workgraph
/plugin install workgraph@workgraph

Installing the plugin adds the /workgraph skill. The plugin's install skill installs the CLI with uv, and its update skill upgrades it. Both check that uv is on PATH and install nothing else.

The CLI bundles workflow and agent definitions. A user's own definitions shadow them; see Workflow files for the bundled definitions and the resolution order.

As a Codex plugin:

codex plugin marketplace add sylmarien/workgraph
codex plugin add workgraph@workgraph

Start a new Codex session and invoke $workgraph <workflow> "#<issue>". The plugin shares the install, update, and run skills with the Claude Code plugin. The bundled workflows run nodes on the Claude harness, so they require claude and uv on PATH in Codex too.

Codex reads the repository's existing marketplace at .claude-plugin/marketplace.json and its manifest at .codex-plugin/plugin.json. Both plugins ship in the same Git release. The patch, minor, and major release workflows update both manifests and the CLI to the same version. See the Codex packaging documentation.

Without the plugin:

uv tool install workgraph

pip install workgraph installs the same package from PyPI. uv tool upgrade workgraph upgrades it. Requires Python 3.12+. An agent node additionally requires the CLI of its harness on PATH: claude for harness = "claude", codex for harness = "codex".

Example

workgraph run wg "#12"
design: done
approve-design: parked
parked at approve-design: Plan from this design? · spent 1m20s · $0.15
Review material from design:
https://github.com/sylmarien/workgraph/issues/12#issuecomment-5550441682
workgraph resume --decision accept
approve-design: accept
plan: done
approve-plan: parked
parked at approve-plan: Implement this plan? · spent 4m05s · $0.42
Review material from plan:
<the plan>

workgraph resume --decision accept delivers the decision and resumes the run.

Reference

Development

uv sync
uv run ruff check && uv run ruff format --check && uv run mypy && uv run pytest

The dogfood workflow runs the same gate: workgraph run wg "#<issue>".

Release files for workgraph 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for workgraph 0.3.3
File Size Uploaded
workgraph-0.3.3.tar.gz 38.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for workgraph 0.3.3
File Interpreter ABI Platform
workgraph-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 85.3 kB

Release files / workgraph-0.3.3.tar.gz

Download URL workgraph-0.3.3.tar.gz
Size 38.0 kB
Tags Source
SHA-256 checksum
How to use checksums
13a3b004e46e4334b72bae3509b2779037ccd0ac68be2d89510b283b964ab413
BLAKE2b-256 checksum
How to use checksums
a3af3c1e8df3bc6769171f09dd9e576e5edc899363e8c5b194d2e36abadad4d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / workgraph-0.3.3-py3-none-any.whl

Download URL workgraph-0.3.3-py3-none-any.whl
Size 47.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
225b8a308c991bbad70d8b519b6cf12726f9c581038530f940f3dcd781c75d9f
BLAKE2b-256 checksum
How to use checksums
e97984961e8a1c650378b494cf75936cca987489dd78c12220cded7a764f0052
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.3.5

2 release files

0.3.4

2 release files

This release

0.3.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page