Handle a hotfix
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.
1. Goal
Diagnose and patch a broken build or regression quickly, track the fix
as a hotfix/ story in the current sprint's ** Hotfixes section, and
land it via a PR — without disrupting the planned sprint work.
2. Preconditions
- The user has described or supplied a failing build, error output, or broken test. If neither is available, ask: "Can you paste the build output or describe what's failing?"
compass,gh, and the session's SSH agent are available (see Do not interfere with SSH session variables).- Current sprint exists at
doc/agile/versions/v0/sprint_NN/.
3. Steps
In execution order:
Extract the error. Ask the user to supply the full build output if not already provided:
cmake --build --preset <preset> 2>&1 | tee /tmp/build.log
Read the output and identify: the failing file, line, and error message. If the source is unclear, ask the user before proceeding.
Fetch latest main. Do not branch off a stale base:
git fetch origin main
Create a hotfix branch and scaffold the story. Use How do I start a unit of work with compass? —
compass story new— with--kind hotfix. The slug names the broken thing, not the fix:./projects/ores.compass/compass.sh story new \ --slug <broken_thing> \ --kind hotfix \ --title "Hotfix: <broken thing>" \ --description "<one sentence: what is broken>." \ --tags "hotfix:<component>"
compass story new --kind hotfixcreateshotfix/<broken-thing>,story.org, and a linked task. See How do I start a new feature branch phase?.- Read all generated files. Before writing any content, read
story.organd the task file and note their:ID:values. Do not write[[id:...]]references from memory. - Fill in the story and task. In
story.org: Goal = what is broken and what the fix will restore; Acceptance = build passes / test passes. In the task file: Goal = the specific code change needed; Plan = the diagnosis so far. Wire the story into the sprint's
** Hotfixessection. Opendoc/agile/versions/v0/sprint_NN/sprint.organd add a row under** Hotfixes:| [[id:UUID][Hotfix: broken thing]] | STARTED | date | | One-line description. |
If the sprint has no
** Hotfixessection yet, add it at the end of* Stories, before* Health Review.- Diagnose and fix. Read the failing file(s). Apply the minimal change that resolves the error. If the root cause is unclear or the fix would touch more than ~5 files, ask the user before proceeding.
Verify. Build and/or run the affected tests:
cmake --build --preset <preset> 2>&1 | tail -20
If the build is still red, return to step 7.
- Update the task. Fill in
* Noteswith the root cause and the fix approach. UpdateNow→Fix verified locally.,Next→PR.,Last touched→ today. Commit using ORE Studio conventions. Follow Check git commit conventions before committing:
git add <files> git commit -m "[component] Fix <what was broken> Story-ID: <story-UUID> Task-ID: <task-UUID> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>"Open a PR. Leave the SSH session variables alone, per the SSH memory, then
compass pr create— it pushes the branch, builds the body (Summary, Changes, Traceability), and records the PR on the task../compass.sh pr create --title "[component] Fix <broken-thing>" \ --summary "..." --change "..."
4. Postconditions
hotfix/branch exists onoriginand a PR is open.- Story is
STARTEDin the sprint's** Hotfixestable. - Task
* Notesrecords the root cause and fix. - PR number is recorded in the task's
* PRstable. - Build is green locally.
5. See also
- How do I start a new feature branch phase? — hotfix branch naming convention.
- How do I start a unit of work with compass? —
compass story new --kind hotfixsyntax. - Check git commit conventions before committing — commit format.
- Start work on a new story — the normal (non-hotfix) story runbook.