Skip to main content

Workorder: the task record for coding agents

A coding agent's session ends mid-task; the next session does not know what was being done, where it stopped or what remains. Workorder keeps the task outside the conversation, with the same structure every time: mission, scope, acceptance, test, dependencies, progress and the next step. Any later session or agent runs workorder show and recovers it, so tasks survive new conversations and handoffs.

Agents also say DONE when nothing proves it. Workorder refuses that DONE until the task's test passes now and failed on the code before the change (for Python code, also with the change stubbed out).

A verified test result is not a verified task. DONE means the test proves the change did something; whether the task was done right is a person's acceptance, a separate state recorded with workorder accept.

flowchart TD
    A["An agent works on a task<br/><small>workorder new wrote tasks/TASK-1.md</small>"] --> B["The session ends mid-task<br/><small>progress and the next step stay in the task</small>"]
    B --> C["A new session picks it up<br/><small>workorder show: the same structure every time</small>"]
    C --> D["It finishes the work, with a test"]
    D --> E{"It claims DONE<br/><small>workorder done</small>"}
    E -- "nothing proves it" --> F["Refused, with what is missing"]
    F --> G["It adds the proof<br/><small>the task's test passes now, failed on the code<br/>before the change, and fails with the change stubbed out</small>"]
    G --> E
    E -- "the test proves it" --> H["DONE, with receipts"]
    H --> I["One pull request<br/><small>workorder check reruns the evidence</small>"]
    I --> J["A person reviews and merges<br/><small>whether it was done right is theirs to accept</small>"]

Comic: a coding agent says DONE and Workorder refuses until the task's test passes; then the next session picks up where the work left off from workorder show

Every task is a Markdown file in tasks/; receipts go in .workorder/. workorder done refuses a DONE while Scope or Acceptance is empty.

How it works · Reviewer guide · Reference · Guarantees and limits · Shortcuts Workorder flags

Needs Git and Python 3.10 or newer; no server or database. Tested in CI on Linux and Windows (Python 3.10, 3.12, 3.13).

Quick start

Install with pipx install workorder (no pipx?). Try it in a throwaway repository; a local origin stands in for GitHub:

mkdir demo && cd demo && git init -q -b main
git config user.name "Your Name" && git config user.email you@example.com
git init -q --bare ../demo-origin.git && git remote add origin ../demo-origin.git
workorder init
printf '__pycache__/\n' >> .gitignore
git add . && git commit -qm "Set up Workorder" && git push -qu origin main

The normal workflow is one branch and one pull request. Write the task on the branch, then fill in Scope and Acceptance in tasks/TASK-1.md:

git switch -c add-calc
workorder new --title "Add calc" --owner you --test "python3 test_calc.py" --code-paths calc.py
## Scope

In: add two numbers with `add(a, b)` in calc.py. Out: subtraction.

## Acceptance

- `add(2, 2)` returns `4`.

Do the work with a test, commit, finish the task, commit, push and open one pull request:

printf 'def add(a, b):\n    return a + b\n' > calc.py
printf 'from calc import add\n\nassert add(2, 2) == 4\n' > test_calc.py
git add . && git commit -qm "TASK-1: add calc"
workorder done --task TASK-1 --note "add() works; next: subtraction"
git add tasks/ .workorder/ && git commit -qm "TASK-1 done" && git push -qu origin add-calc

If done refuses, follow its Next line. If the task's own code or test files changed, run workorder renew --task <id>.

The pull-request workflow runs workorder check --base origin/main --run-tests --all-tests --require-task; run it locally to see what reviewers see. For a task written and finished in one pull request, it asks for an approving review or the label workorder-allow:TASK-1. Working alone, use solo mode (workorder init --solo). Landing the task on main first is an option.

Language support

Any test command works; the deeper checks are Python-only today.

Check Python with pytest Other test commands
Passes now Yes Yes, by exit code
Fails on the code before the change Per new or changed test Whole command
Fails with the changed functions stubbed out Python code Python code
Existing tests edited, removed or skipped Per test Per file in test_paths
Acceptance items tied to a test Yes No

Wrappers such as sh test.sh need --test-paths; full table.

The review rule

An approving review clears every finding except changes to existing tests or the Workorder workflow file, which need a label from someone other than the author (solo mode: the owner).

Finding What clears it
A finished task's test fails now, runs no tests, or times out Fix it; nothing else
A DONE claim lacks evidence, or its code changed after it was finished Finish the work or workorder renew --task ID, and commit the receipts
A task, receipt or configuration cannot be read; receipts edited or deleted; a dependency missing Fix or restore the named file
A project test that already failed on the base Nothing; it is a Note
A task written and finished in this pull request, or its Scope, Acceptance or dependencies changed Approving review, or workorder-allow:ID
Changed code that no task records (--require-task) Approving review, or workorder-allow:no-task
Changed code outside the task's code_paths Approving review, or workorder-allow:scope:ID
The test asserts nothing, passes on the base code, or still passes with the change stubbed out A better test; or approving review, or workorder-allow:ID
A refactor or no-code-change completion the base task did not declare Approving review, or workorder-allow:ID
The test did not land first (--require-test-first) Approving review, or workorder-allow:ID
The comparison with the base could not run Fix the setup; or approving review, or workorder-allow:ID
A reopened task's test fails; a task retired; a finished task removed with all its receipts Approving review, or workorder-allow:ID
An existing test edited, removed, skipped or weakened, or a task's test command or test paths changed workorder-allow:ID (covers what done --needs-review recorded), or workorder-allow:tests for shared files; not an approving review
Existing tests fail on the new code, including the project test workorder-allow:ID (covers what done --needs-review recorded), or workorder-allow:tests for project and unowned tests; not an approving review
The Workorder workflow file changed workorder-allow:workflow; not an approving review

The reviewer guide explains each finding.

Working with coding agents

Run workorder init in every clone (Git does not clone hooks); it also adds this block to AGENTS.md and CLAUDE.md:

## Tasks
- Start from the task: if the repository has an origin remote, run `git fetch origin`. On main, update with `git pull --rebase origin main`. On a feature branch, merge or rebase main as needed. Run `workorder show --task <id>` and follow its Scope, Acceptance, test and progress.
- Set `WORKORDER_AGENT` when sharing a Git identity. Run `workorder claim --task <id>` before work.
- Do the work with a test that fails without it. Commit, then run `workorder done --task <id> --note "<what was done>"`. Report refusals; never claim completion after one or run `workorder accept`.
- Keep unfinished progress with `workorder note --task <id> --next "<next step>" "<progress>"`; done clears next.
- Never edit a task's status or receipts by hand. Commit tasks/ and .workorder/ with the work.
- Renew only when the task's own code or tests changed after DONE: `workorder renew --task <id>`.
- Before saying done, run `workorder check --base origin/main --run-tests --all-tests --require-task`.
- Shortened output is saved in full to `.git/workorder/last-output.txt`.

workorder init --claude also installs Claude Code hooks for session start and stop.

Speed

done runs the task's own test, and the tests of finished tasks whose code this change touches. On rich: done 3 s, pre-commit 3-4 s, documentation 0.2 s.

Your whole suite runs once, in the pull-request check. init turns this on when it finds pytest (--no-project-test: off).

What it does not do

  • It does not judge whether the task was done right: DONE is evidence; acceptance is a person's (workorder accept or a review).
  • Local hooks can be skipped with git commit --no-verify; the pull-request check is what counts.
  • It does not prove the software works in production or read agent conversations.

Full reference · Team setup · Examples · Contributing · MIT license

Metadata

Release files for workorder 1.0.0

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

Source distribution (sdist)

Source distribution for workorder 1.0.0
File Size Uploaded Provenance Actions
workorder-1.0.0.tar.gz 412.1 kB With provenance Details for workorder-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 598.9 kB

Release files / workorder-1.0.0.tar.gz

Download URL workorder-1.0.0.tar.gz
Size 412.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5a1e7aacb24cfc958340d55be1045fe9b5237d1da5eb56753de9edf3f003ffae
BLAKE2b-256 checksum
How to use checksums
8399c5674770094e13b1703626b29c700cef08365a9112f1657271cde0d98560
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / workorder-1.0.0-py3-none-any.whl

Download URL workorder-1.0.0-py3-none-any.whl
Size 186.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b9c8f936be2c3fb7b60ce9992d302638ac2c520f764165ad2b2099f0aa98555
BLAKE2b-256 checksum
How to use checksums
89f3076bee144394e01e14e9ed92eb5eeb1df76b6ec1aa3a2413197d33f4691e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for workorder 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for workorder-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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