Workflow as code.
One map for your agents, team and scripts.
Workfile is a declarative map of the tools you use and how work moves between them. It lives in the repo, so agents and people can gather the facts, ask what can move and see what’s missing.
curl -fsSL https://workfile.sh/install.sh | sh
Map your tools and how work moves between them.
A ticket lives in one tool, its pull request in another and its checks in a third. Workfile puts them on one map, with the stages work moves through and what each move needs. Workfile reads and decides. People, agents and release tooling make the changes with their own access.
.workfile/Example
Tracker status and related PR evidence
- todo jira To Do
- Then on to ready, which needs refinement.
- ready jira Ready for Dev back to todo when not ready yet
- Then on to doing.
- doing jira In Progress github draft PR
- Then on to review, which needs pull_request.
- review jira Code Review github review requested github checks pending back to doing when changes requested
- Then on to done, which needs code_review.
- done jira Done github PR merged github checks passing
Get it out of your head and into the repo.
The rules people carry around become .workfile/policy.yml. Anyone can read them, and changing one is a pull request. Run wf policy to see the workflow offline and wf policy --lint to find routes that skip a gate.
-
todo
todo
-
refinement
A story needs acceptance criteria before anyone starts it.
.workfile/policy.ymltodo → ready transitions: todo: to: [ready] requires: [refinement] gates: refinement: - if: jira.headings matches "*acceptance criteria*" when: jira.type == Story message: "{ticket} needs an Acceptance Criteria heading"wf check APP-51 --to ready
✗ Cannot move to ready yet
needs an Acceptance Criteria heading
-
ready
ready The move from ready to doing has no extra gate.
-
doing
doing
-
pull_request
Nothing goes to review without a pull request.
.workfile/policy.ymldoing → review transitions: doing: to: [review] requires: [pull_request] gates: pull_request: - if: github.prs >= 1 message: "{ticket} needs a pull request"wf check APP-53 --to review
✗ Cannot move to review yet
APP-53 needs a pull request
-
review
review
-
code_review
Finishing needs passing CI. High-risk PRs also need the lead’s approval on the current commit.
.workfile/policy.ymlreview → done transitions: review: to: [done, doing] requires: [code_review] gates: code_review: - if: github.checks == success - if: github.fresh_approvals >= 1 by: [lead] when: github.labels contains high-riskwf check APP-42 --to done
✗ Cannot move to done yet
Needs an approval from Alex Lead
-
done
done That’s the whole workflow. Five states, three gates, one file.
name: example-paymentstracker: jirastates: [todo, ready, doing, review, done] transitions: todo: to: [ready] requires: [refinement] ready: to: [doing, todo] doing: to: [review] requires: [pull_request] review: to: [done, doing] requires: [code_review] done: end: true gates: refinement: - if: jira.headings matches "*acceptance criteria*" when: jira.type == Story message: "{ticket} needs an Acceptance Criteria heading" pull_request: - if: github.prs >= 1 message: "{ticket} needs a pull request" code_review: - if: github.checks == success - if: github.fresh_approvals >= 1 by: [lead] when: github.labels contains high-risk
Write rules that don’t depend on the tool.
Every tracker supplies the same core facts, and so does every code host. Name your connections, then write rules that join them: a label on the ticket can decide how many approvals the pull request needs. Move your tickets and the rule stays the same.
This alpha supports Jira and GitHub Issues for tickets, and GitHub for code. A host such as Bitbucket would need its own adapter, supplying the same facts.
.workfile/providers.ymlExcerpt
tickets: provider: jira site: example-team.atlassian.net projects: [APP] statuses: doing: In Progress review: Code Review done: Done code: provider: github org: example-team repos: [payments]
tickets: provider: github org: example-team project: 7 repos: [payments] statuses: doing: In progress review: In review done: Done code: provider: github org: example-team repos: [payments]
.workfile/policy.ymlUnchanged
tracker: tickets transitions: review: to: [done] requires: [code_review] gates: code_review: - if: code.checks == success - if: code.approvals >= 2 when: tickets.labels contains high-risk
Agents ask. Workfile answers.
An agent shouldn’t have to guess how your team works, or carry a stale copy of it in a prompt. It can read the map, gather the facts on a ticket and ask how that work should move.
- How does work move here?
wf policy --jsonThe stages, allowed moves and gates, and where each provider’s facts come from.
- Where does this ticket stand?
wf status APP-42 --jsonIts stage, linked PRs and evidence, its next moves, and what each one still needs.
- Can it move to done?
wf check APP-42 --to done --jsonYes, no with what’s missing, or can’t tell. Exit code 0, 1 or 2.
agent sessionIllustrative
Change projects. Keep the agent.
Every project moves work its own way. Step into a folder and its .workfile/ is the map for that project. The same request follows a different route, with no change to the prompt.
“Ship this ticket.”Illustrative
cd ~/work/example-web
wf check WEB-7 --to done
✗ Cannot move to done yet
WEB-7 needs passing CI
agentI’ll fix the build and ask again.
cd ~/work/example-shop
wf check SHOP-12 --to released
✗ Cannot move to released yet
SHOP-12 needs QA sign-off
agentThat needs a person. I’ve asked QA.
People get the same answers.
Your team reads the map too. Use Tracker’s list or board to see where work stands. Inbox shows where you can act. Read a PR comment, investigate failing checks, or move a ticket that’s ready. Open the ticket or PR from the alert, or preview a configured agent prompt with the details attached.
wf tracker --view inboxIllustrative
- APP-53 needs a pull request. Open a PR before moving it to review.
- CI failed on payments#130. Open the PR to inspect the failing checks.
- Unread comments on payments#131. Open the thread from Inbox.
Try the alpha.
wf is available for macOS, Linux and Windows. Run wf setup to connect a tracker and choose your scope, then wf tracker to see your tickets and next actions.
curl -fsSL https://workfile.sh/install.sh | sh
Let the repo teach the agent.
We want an agent to enter any repo, learn how that team works and carry a change as far as the policy allows. That takes four answers. Two work today, and two come next.
- What do we use?
- Today
- The trackers, repos and code host in scope.
- How does work flow?
- Today
- Stages, moves and the gates between them.
- Where is everything?
- Next
- Documents, templates and channels, found from the project.
- How do we ship?
- Next
- The steps and evidence this kind of change needs.
Talk to us
Tell us how your team moves work and where the handoffs break down.