Work a task through to merged PR
Table of Contents
This page documents a runbook — a named, repeatable composition of recipes and skills for a complete multi-step procedure. Each step references a recipe or skill by id-link.
Goal
Take an existing task from BACKLOG through implementation, PR
creation, review rounds, and merge — the full development lifecycle.
Task/story bookkeeping happens before the PR is raised, not after
review approves: the work is done as far as the developer is
concerned by the time review starts, and review is a post-done
validation activity. This ordering exists specifically so that once
CI goes green after the final review round, merge is the only
remaining action — no bookkeeping-only commit forces one more,
otherwise-avoidable CI cycle.
Preconditions
- A task exists in the current sprint with
#+type: task,State: BACKLOG. - The task's story is
STARTEDin the sprint. - You are on
mainor can create a fresh feature branch. ghCLI is authenticated;SSH_AUTH_SOCKis exported (see SSH memory).
Steps
In execution order:
Clock on. Run
compass task startwith the task's slug to switch branch, mark the taskSTARTED, and stamp the session journal:./projects/ores.compass/compass.sh task start <task-slug>
A task with no
#+branch:(scaffolded viacompass add taskor born as a story's first real task) getsfeature/<slug-kebab>derived automatically, created off freshorigin/main;--branchoverrides:./projects/ores.compass/compass.sh task start <task-slug> --branch <override>
This covers all three cases: new task on an existing story, resuming a BACKLOG task, and restarting an already-STARTED task after a session reset. Read
task_<slug>.orgafter clocking on: understand the* Goal,* Acceptancecriteria, and* Notes. (pr createsets#+pr:later.)- Sync with main.
compass pr sync— fetch, rebase, report; on conflicts it stops with the conflicted files and the ways out. If you are onmain, create a feature branch first: see How do I start work on a story?. - Implement. Do the actual work: write code, documents, or configuration. Follow the conventions in LLM instructions for code style, documentation, and testing.
- Commit. Use ORE Studio commit conventions:
[component] Imperative summarywith aCo-Authored-By:trailer. One logical change per commit. Never amend commits on a branch under review. Build and test locally. Same preset the CI would use:
cmake --build --preset <preset> ctest --preset <preset>
Do not proceed until both are clean — this is the only full build/test verification the change gets before review, since CI no longer runs one.
Close out task/story bookkeeping now — before the PR exists. The task is done as far as the developer is concerned; review is a post-done validation activity, not something bookkeeping waits on:
./projects/ores.compass/compass.sh task done <slug>
Task and story row flip to DONE with end date. Write the task's
* Resultby hand, distill any* Planinto the parent story's* Decisions. If this was the final task in the story, update both files in the same commit:a. In story.org
* Status: state →DONE,Now→Nothing., fillEnddate. b. In sprint.org* Stories: update the story row toDONEand fillEnd.Both files must stay in sync — a story
DONEinstory.orgbutSTARTED=/=BACKLOGinsprint.orgis a silent inconsistency the sprint health review will not catch automatically. Commit this bookkeeping now; it will be part of the PR from its very first push, not a follow-up. A task spanning several PRs stays open — close it on the PR that completes it.- Open a PR.
compass pr createper How do I create a PR? — it pushes (bookkeeping commit included), builds the body with Traceability, records the PR on the task, and stamps the journal. Include the step-5 build/test result as an explicit--changebullet so it's visible in the PR description. - Monitor CI. Wait for checks to pass. If a check fails, follow How do I fix a failing CI check?.
Handle review. When review comments arrive, follow How do I address PR review comments?:
- Sync with
mainfirst (rebase). - Decide accept/decline per comment.
- Apply fixes (one commit per logical fix); build and test locally before pushing.
- Push once — fixes and this round's
* Reviewtable update together, never a separate bookkeeping-only commit afterward. - Reply to every comment, resolve threads (API calls, not commits — safe to do after CI is green without starting a new cycle).
Repeat step 9 for each review round until the PR is approved.
- Sync with
Merge — immediately once CI is green post-approval. Nothing should be pushed between the last green CI run and the merge: task/story bookkeeping already rode in with step 6, and review- round bookkeeping already rode in with each round's fixes (step 9). The only things that legitimately delay a merge after green CI are a real merge conflict with
main(rebase and let CI run once more) or a genuinely new review round../projects/ores.compass/compass.sh pr merge
The guards refuse while threads are unresolved or CI is not green; merge never touches task state (a STARTED task is a hard stop, not a warning — see pr-merge), retries GitHub's transient base-branch-modified race, and deletes the remote branch. See How do I merge a PR?.
Postconditions
- Task is
DONEwith* Resultfilled, and the close-out commit rode in with the first push of the PR, not a late one. - PR is merged into
mainwith no commits after the last green CI run other than genuine review-round fixes or a rebase. - Review rounds are recorded in the task's
* Reviewtable, each entry committed together with that round's fixes. - Parent story reflects any decisions from the task's
* Plan. - If the story is complete:
story.organdsprint.orgboth showDONEwith matching end dates.
See also
- How do I start work on a story? — branch creation and STARTED transition.
- How do I monitor a PR until green? — the CI waiting loop.
- How do I merge a PR? — close it out.
- Start work on a new story — the preceding runbook for the story-scaffold phase.
- Runbook glossary entry — what a runbook is and how to create one.