Posts that wait and threads
Posts that wait
A deliver: report rule with wait: true posts its result on the item and waits for your answer there, like a plan; your approve hands the item to the next stage. Plans wait by default (wait: false lets one go ahead); reports don't.
queue:
- skill: story
where: { section: Inbox }
deliver: report
wait: true # your approve hands it to the next rule
on_done: { move: Ready for design } # held until you approve
- skill: prototype
where: { approved: story } # works on a tracker that can't move cards too
deliver: report
gates:
taste: { skill: judge, instructions: [judges/design.md] } # one that fires holds the postThe post is the result as on_done: { comment: result } writes it, asked for or not, with how to answer and its state on the mark line:
Result of story
Export VAT as CSV from the reports page.
Status: done
To approve, reply with approve as the first line. Any other reply is feedback: awaywork runs this step again with it.
— awaywork · waits · move=Ready%20for%20design · saw=Inbox- It holds its rule. Later runs skip the card as waiting for your approval (
approve,story's result), whatever changes, and no rule below takes it. Linked items rank on their own, so a red-CI fix on the linked PR still runs. - You answer as on a plan,
awaywork approve <source:key>andaincluded. Feedback reruns the step with the thread initem.md, its new post waiting whateverwaitsays. - Approved, it hands the item on.
approvedbecomes the post's skill, read off the thread, sowhere: { approved: story }works even where awaywork can't move cards; a newer waiting post leaves it on the one before. The posting rule is done with the item; with no rule after it, the item is skipped as#1 story doesn't run again: you approved its result; to run it again, delete that post on <url>(thenawaywork run --unit <key>if the card hasn't changed). on_donewaits too. The post holds itsmoveand records the card's status. The first run that sees yourapprove(window,soonor manual) makes that move, even ifon_donechanged since, before planning, with no model run:on_done: moved ENG-2101 to Ready for design, its post approved.- Gone ahead. A report rule with gates of its own and no
waitgoes ahead when they run clear (Gates: none fired (taste)on top,— awaywork · went ahead · gates=tasteas the mark), moves the card at once and counts as approved. A gate that fires makes it wait, card on top.
Details:
- A held move happens only while the card is in the status the post saw (on GitHub, the label not on yet) and no newer awaywork post is on the item. A dry run only says it would; the report lists the move, or why it failed, under Held moves. Moving or reassigning the card yourself releases the post.
- A report rule that waits, or has gates of its own, needs a source that can write, or a thread: naming one that can't is a config error, and
doctorwarns about any it may match. waiton apr,draft_pr,pushorpending_reviewrule is a config error: the PR is the decision. So iswaiton aplannedrule: a report task's result waits only when a gate of its rule fires, and it sets noapproved.
The simplest two-stage queue plans the sprint's tasks as reports and implements those you approve:
queue:
- skill: plan
source: asana
where: { section: Current sprint }
deliver: report
wait: true # your approve hands it on
- skill: implement
where: { section: Current sprint, approved: plan }implement finds the plan as its earlier report. While its draft is open the task waits for review; once merged, move the task out of the section and neither rule takes it again.
Threads
Your Jira token is read:jira-work, or your custom source has no write: the card can't take awaywork's posts. thread: github on a rule moves the conversation to a GitHub issue awaywork opens in the card's repo (repo_map, or a custom item's repo), assigned to you, so GitHub pings you:
queue:
- skill: story
source: jira # read-only
deliver: report
wait: true
thread: github # posts and replies on an issue in the card's repo
- skill: prototype
source: jira
where: { approved: story }
deliver: report
thread: github
on_done: { comment: result }The rule's first post opens it:
CARD-1: Export VAT report
awaywork posts here for [CARD-1](https://tracker.example/CARD-1), Export VAT report: its plans, results and questions. Reply here to answer them; the card still decides whether it's yours.
<!-- awaywork thread item=tracker:CARD-1 -->- It's the card's thread now. Its comments follow the card's in
item.mdand wherever awaywork reads posts, so plans, posts that wait, held moves, pins and questions work there. Every post for the card goes there, other rules' and tasks' too, so keep a card's rules on one thread. A reply counts as a change to the card (awaywork's posts don't). - Your reply decides:
approveon the issue, orawaywork approve jira:ENG-2101(or the thread's key,github:acme/api#57). A teammate'sapproveis context. Skips point at the thread:CARD-1: waiting for your approval of story's result on https://github.com/acme/api/issues/212. - The card still decides whether it's yours, every run: reassign it and its thread neither fans out nor takes answers.
on_donemoves stay on the card: one that can't move holds no move, and a plain post's move reportscouldn't move ENG-2101 to "Ready": jira can't write to its items. - Its end: once the card's source says it's done, closed or merged, read back a week, the next run comments and closes the issue (
closed https://github.com/acme/api/issues/212, CARD-1's thread: the card is closed; a dry run sayswould close).
Details:
- Each run lists the open issues you opened in the card's repo and takes the one whose marker names the card. The GitHub source leaves issues with the marker out of its items, or a plan rule would take the thread itself.
- All tasks merged isn't the end: the card says
all tasks done: close or move the carduntil you do, its thread open with it. Close the thread yourself and the next post opens a new one. A thread whose card leaves your items without reading as done (reassigned, moved to anotherrepo, closed while no run read back that week) stays open: close it yourself. thread: <source>names a custom source withthread: trueinstead, a Notion database or a folder of Markdown files, which opens and lists threads itself (Thread hosts); that's the one for a Bitbucket config, wherethread: githubis a config error.- A thread goes on the plan's rule, never a
plannedone: tasks post where their plan did. Thread writes use theghlogin awaywork opens PRs with, never the worker's. - A host that notifies nobody (a Markdown folder) wants a notify hook, or a plan there waits unseen.