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.5

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.5
File Size Uploaded
workgraph-0.3.5.tar.gz 38.1 kB Details

Built distribution (wheel)

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

Total release size: 85.4 kB

Release files / workgraph-0.3.5.tar.gz

Download URL workgraph-0.3.5.tar.gz
Size 38.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d4faa5d7c043e4afe90b3ada1926e92861e1881d9cd7db53eba8624db4444c22
BLAKE2b-256 checksum
How to use checksums
acf261a825ca1e467c67649c585a345d2951bad97d5dc3489ddfa8c538bd4a90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.5-py3-none-any.whl

Download URL workgraph-0.3.5-py3-none-any.whl
Size 47.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0c3a1bd1e402fe415766be8f2ccc73bf08f85aa1f318286e3651415b69c61f6
BLAKE2b-256 checksum
How to use checksums
05d82ac4ca80060b82ed3d4030d1ba415ea84c07eef6355eacbde08a0433b1c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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

This release

0.3.5 This release

2 release files

0.3.4

2 release files

0.3.3

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