Release loop
The owner runs /loop in Claude Code without a prompt; Claude Code then
reads .claude/loop.md (project file, plain Markdown, at most 25,000 bytes,
edits apply from the next iteration). Without an interval Claude chooses the
pause itself, between one minute and one hour, and ends the loop with
ScheduleWakeup and stop. A loop runs only while the session runs and
ends after seven days at the latest (Claude Code documentation on scheduled
tasks).
-
[E] One step per iteration, chosen from the state on GitHub in this order: finish the own open pull request, make the release ready, plan the release, clarify the next issue, build it (owner, 2026-11-12).
-
[E] Labels instead of milestones (owner, 2026-11-14), so issues can be filtered and a GitHub Project can group them; titles stay as they are:
- status:
ready(in the next release),in progress(Claude started it),in review(its pull request is ready and waits for CI or review),in discussion(planned for a later release); an open issue without a status label is in the backlog; - kind:
featureandidea(instead of „Idea –“ in the title); issues of the CI arefeaturetoo [V]. The milestonesnext releaseandplanned releaseare no longer used by the loop.
- status:
-
[V, replaced by #387 on 2026-11-23] Conditions on the labels: „Make the release ready“ when no open issue has
ready,in progressorin reviewand the release pull request is open; „Plan the release“ when none has those labels and no release pull request is open. A merged release closes the release pull request, so the loop stops there (since 2026-11-23 after its tag and its merged retrospective [V], see below) and a restarted/loopplans next. -
[E] Questions to the owner are written into the issue (owner, 2026-11-30, #547): a section „Offene Fragen“ in the body (numbered, 3 to 5 options each, the recommended one first), the label
frage-owner, andreadyremoved; the loop goes on with other work, and a session of the owner answers them and setsreadyagain. This replaces „asked with the question tool inside the iteration; the iteration waits for the answer“. -
[E]
owner-review(owner, 2026-12-01, #547): a pull request with texts or views the owner reviews (the Lexicanum of #545, new views, [V] texts for players) gets the labelowner-reviewand is merged only by the owner; merged by him means confirmed [E]. This narrows O4 for these pull requests. Replaced (owner, 2026-12-01): the owner reviews no pull request any more. The loop merges a pull request once its own review with the code-review skill leaves nothing open and the CI Gate is green; texts for players stay [V] until the owner changes them. Every finding of that review is first caught by a deterministic test or gate that fails — generic where possible, finding the pattern everywhere — and only then fixed. A ratchet or budget is never loosened by the loop (only by the owner); an OKF change may add an [E] only with its source (#554), else it is [V]. Schema changes and the image of #594 need no test of the owner on staging: the green complete night run and the upgrade tests are enough. Releases with a database migration or a change of the base image go out only after a green complete night run, mutation included. The work starts with the safety net: #549 (dropped on 2026-12-01) and the durable keys of #551, then #546, then #540 and #541, then #547 and #548, then #542 to #544 and the features by topics. -
[E] Decided for #547 and #548, not built yet (owner, 2026-11-30): the loop releases by itself once the CI Gate of the release pull request is green, with the tags of the version and
latest(nostableany more),nightlyfrommainandv3fromdevelop/v3; a release when about 5 topics are complete, at the latest 7 days after the last one with what is complete then, independent of the night run, none without a complete topic, parts of an incomplete topic onmainwith their switch off and hidden, and a release at once for an error in the live game, a balance change, a security hole or a risk of lost data (owner, 2026-12-01); the loop sets the topics itself at every start of/loopand whenever newreadyissues appear, from issues that belong or fit together, and keeps them in one open planning issue „Themen“ (topic → issues → state); it merges Renovate’s patch and minor updates with a green CI, a major update gets a question; the export of the error log before a release ends (#549; replaced on 2026-12-01: there are no reports to GitHub, the owner’s export stays); the loop never stops and waits for new work; its state lives on GitHub (a completion issue per release and hotfix, hotfixes watched, a declined retrospective, a wait withfrage-owner). This replaces the release on the owner’s word, the merge by the owner and the stop rule below once built. An issue counts as clarified when it has a comment that starts withGeklärtand lists the decisions with the OKF link. -
[E] The owner’s decisions are written into the body of the issue, not only into comments (owner, 2026-11-27, 203b, the retrospective of 26.11.29): the check „Linked Issues“ of CodeRabbit reads only the body, and it missed decisions recorded in comments (#418, #421).
-
[E] The loop asks the owner first what a release should bring, with proposals from the open issues; infrastructure first, features after it (owner, 2026-11-12). The chosen issues get the label
ready(owner, 2026-11-14; before, they formed the milestonenext release). -
[E, replaced by #387 on 2026-11-23] When no issue of the release is open any more and the release pull request is green with its candidate image, the loop tells the owner. The owner merges the release pull request; that is the release (owner, 2026-11-12, Branching and release). The loop stops once the owner has merged it, not when it has told the owner (owner, 2026-11-13, #149; replaces „tells the owner and stops“); since 2026-11-23 only after its tag and its merged retrospective [V] (below).
-
[E] Nightly failures first (owner, 2026-11-23, #387): every night a complete run on
main(ci.ymlon its schedule: the unit suite, the E2E suite, the image with the Compose stack and the upgrade test;mutation.yml: the complete mutation run;migrations-nightly.yml: the migration property tests). The loop first looks at the nightly results and fixes a failure through a pull request intomainbefore it starts other work. [U] What the loop does when a nightly failure cannot be traced to one merge (open on #387); until then it tells the owner. -
[E] The release after #387 (owner, 2026-11-23 and 2026-11-24): the step „Release“ comes when no open issue has
ready,in progressorin review. A release pull request is created only on the owner’s word: when none is open, the loop asks the owner whether to release now and on yes starts the workflow „Release pull request“ onmainby hand (workflow_dispatch); otherwise it plans the next release. The release pull request changes onlyVERSION,CHANGELOG.mdandchanges/and runs no expensive job; the loop checks its texts, waits for its green CI Gate and the run of „Release pull request“ of the currentmaincommit, and tells the owner. A push tomainrebuilds it in minutes; the loop checks it again and tells the owner again. No draft, no „Ready for review“, no full run and no candidate image any more; it is a draft only while another release branch holds its version or a released hotfix is not merged back [V] (Branching and release). This replaces the bullets marked „replaced by #387“ below and above. -
[E] Before every release the loop asks the owner for the export of the error log of the live server since the last release (the download of the admin tab „Fehler“, Error log) and reads it; an error of the game gets an issue before the release pull request is made ready (owner, 2026-11-22). No player name or id goes to GitHub. Reason: on 2026-11-22 the export showed #362 (
each_key_duplicateon „Flotte“), which no test had found. -
[E] After every release, whichever pull request released it (the release pull request of
release/main, a hotfix release pull request, or a collecting pull request by the owner’s exception), a short retrospective as a log entryokf/log/<date>-retro-<version>.md, the full version written with dashes (2026-11-22-retro-26-11-25.md): what cost time, and at most five consequences, each an issue, a guard or a rule; a machine check comes before a written rule (owner, 2026-11-22). Every lesson gets one consequence: a rule in the OKF where it is about behaviour, an issue where something has to be built (owner, 2026-11-22, #351). The first one is the retrospective of 26.11.25; it exceeds the limit of five, as its consequences were decided by the owner one by one before the limit was written; the limit holds from the next retrospective on (owner, 2026-11-23). -
[E] The missing retrospective is found by state, not by event (owner, 2026-11-23): at the start of every iteration, before a step is chosen, the loop checks whether the newest release tag has its retrospective
okf/log/*-retro-<version with dashes>.md; if it is missing, the loop writes it first, in a pull request, whichever pull request released it. Reason (CodeRabbit on #380): a release merged while the loop waits leaves no open release pull request, and a hotfix or a collecting pull request releases without one. The refinements below are [V] (CodeRabbit on #380, the owner is told):- every release tag from 26.11.25 on (the first release under the rule
of 2026-11-22) needs its retrospective, on
mainor in an open pull request; the missing ones are written oldest first, so two releases between two loop runs both get one; - the tag comes minutes after the merge:
tag.ymltags a commit onmainorhotfix/**that changedVERSIONonly after its green CI push run. IfVERSIONonmainhas no tag yet, a release is being tagged: the loop waits for the tag before anything else. If that push run or the tag workflow failed, the release is not out: the loop treats it as red CI (root cause, fix), tells the owner and does not plan a release; - the retrospective’s pull request is finished in step 1 like any open pull request (CI, review, merge under O4);
- the stop rule (owner, 2026-11-13, #149) becomes: the loop stops once the release this loop run made ready is tagged and its retrospective is merged; a missing retrospective of another release does not stop it.
- open details: O25 in Open points.
- every release tag from 26.11.25 on (the first release under the rule
of 2026-11-22) needs its retrospective, on
-
[E, replaced by #387 on 2026-11-23] The release pull request of
mainis a draft with the cheap run after every rebuild; its CI Gate is red on purpose (owner, 2026-11-13 and 2026-11-14, #147, Branching and release). In the step „Make the release ready“ the loop checks the single cheap jobs and the texts, then marks it „Ready for review“: that starts the full run (release-ready.yml). It waits for the green CI Gate of that run and for the candidate image, then tells the owner. A rebuild during the wait (a push tomain) sets it back to draft: the loop marks it ready again. -
[E, replaced by #387 on 2026-11-23] No merge freeze (owner, 2026-11-13, #149): every merge into
mainwhile the release pull request is open, not only a security merge, rebuilds it and sets it back to draft, and its last full run no longer counts. The loop keeps running after „Make the release ready“ until the owner has merged the release pull request; after each rebuild it makes the release ready again (texts and cheap jobs, „Ready for review“, the green full run and the candidate image) and then tells the owner again. That message is the only notice besides the draft state: no comment on the release pull request and no issue. -
[E] „Plan the release“ does not start the next cycle before the release is out (owner, 2026-11-14, #149): it needs no open release pull request, so a restarted
/loopfinds the same state on GitHub. The loop sees the release as the merge of the release pull request fromrelease/main(after that mergerelease-pr.shopens no new one,tag.ymltakes over) and stops (after the tag and the retrospective [V], see below). While the release pull request stays ready and green, the loop only waits and does not repeat its message (#149). The owner decided this first with the milestone („stays open until the release is merged“); with labels the open release pull request takes its place. -
[E, replaced by #387 on 2026-11-23] The loop marks the release pull request ready only after the run of „Release pull request“ for the current
maincommit has completed successfully: a rebuild still running would push a new head after the ready mark and leave it ready without a full run (CodeRabbit on #184, fixed 2026-11-14). -
[E] After a restart the loop does not know whether it told the owner about a ready and green release pull request: it tells the owner once more and then waits (owner, 2026-11-14). When the loop is about to end (seven days or the session) before the release is merged, it tells the owner, who starts
/loopagain; the new loop finds the state on GitHub (owner, 2026-11-14). -
[E, replaced by #387 on 2026-11-23] While a released hotfix is not merged back, „Ready for review“ is refused: „Release ready“ sets the pull request back to draft and comments why (owner, 2026-11-14, #147); the loop does not mark it ready then.
-
[V, replaced by #387 on 2026-11-23] The loop does not mark it ready while the last run of „Release pull request“ failed (a version held by another release branch): before #147 the workflow kept it a draft, now only the draft that every rebuild has shows it.
-
[E] The release pull request,
CHANGELOG.mdandVERSIONcome only fromscripts/release-pr.sh: the changelog section from the fragments, the version from the tags, the list of pull requests from the Git history (squash commits ending in(#N)). The loop never writes them by hand; it refreshes them by running the workflow (owner, 2026-11-12). -
[E] Every new or changed admin setting or admin action is named in the changelog fragment of its feature, saying what the admin can now do; the loop writes it so in every pull request and checks it again in the texts of the release pull request (owner, 2026-11-17; see Branching and release).
-
[E] The rules of the project stay as they are: do not assume anything that no decision or source gives, merges under O4, never a merge of a release pull request. Questions to the owner follow the next rule (owner, 2026-11-15; before, every decision was asked with 3 to 5 options).
-
[E] Fewer questions (owner, 2026-11-15): where a recommendation is consistent with the owner’s earlier decisions, take it without asking, record it as [V] with „taken as recommended“ and list it in the
Geklärtcomment; the owner adjusts it while testing. Ask, with 3 to 5 options, only when unsure: no recommendation is clearly best, it is not consistent with an earlier decision, it changes a rule of the project, or it concerns security, data loss or game values that no source gives. -
[E] Up to four own pull requests may be open at a time; subagents build issues that don’t depend on each other in their own git worktrees, Claude reviews each diff and opens, finishes and merges the pull requests itself (owner, 2026-11-12: two, replacing „one own pull request at a time“; owner, 2026-11-15: four, confirmed after the loop already worked with four while this bundle still said two). Open pull requests of design studies do not count (owner, 2026-11-16). At most two subagents build at the same time (owner, 2026-11-16): a pull request that only waits for CI or a review costs little, but every building agent costs memory (the out-of-memory stop of 2026-11-15 came from Stryker and E2E of two agents at once) and usage; merge conflicts are no longer the reason, since most of them were in
okf/log.mdbefore #212. -
[E] Two subagents always build (owner, 2026-11-16): when one finishes, the loop starts the next issue with
readyand aGeklärtcomment that depends neither on the open pull requests nor on an issue being built at once, also while it waits on CI or a review. Only the main agent waits, and it does not build itself; it finishes the open pull requests, cleans up (worktrees, labels), looks for new issues and pull requests, gets the owner’s decisions so that the next issues becomeready, and does whatever else keeps both agents building. Waiting with a free place wastes the time of the release; the limit of two stays for memory and usage. -
[E] Roles (owner, 2026-11-17): the subagents build; the main agent merges, gets the owner’s decisions so that issues become ready for building, and structures the work. Because the design patterns already cut most merge conflicts, it watches where the code still causes them or is hard to maintain, gives the subagents tasks to improve that or files issues for it, and orders the work so that subagents do not collide.
-
[E] The main agent writes each task for a subagent as Briefs for subagents says and records there what a result teaches (owner, 2026-11-18).
-
[E] Subagents run only the cheap local checks (owner, 2026-11-17): typecheck, eslint and the unit tests of the changed files, prettier,
checkLogandcheck:migrations, plus, for a change a player sees in the browser, a new E2E test once to show that it fails without the change. The full E2E suite, Stryker and the mutation gate run in the CI, so no agent waits for a free machine; a red CI goes back to a subagent. Reason: two agents shared one machine and waited hours for each other’s Stryker runs, while the CI runs the same checks anyway. Since 2026-11-22 the complete unit suite and Stryker on every changed mutated file run before every push to a pull request as well (the rule „Before every push“ below). -
[E] Small patches are slotted in between features (owner, 2026-11-16); they are the only pull requests that may be bundled, a feature is one issue in one pull request (owner, 2026-11-27, 204b): the main agent merges Renovate’s green patch and minor pull requests (one at a time, CI Gate green on a head up to date with
main; a major update and a minor one below 1.0 wait for the owner) and follows up Dependabot alerts without a Renovate security pull request; a small bug or cleanup issue may be the next issue of a free subagent. Reason: the owner wants them done before the release, not piled up at its end. -
[E] The loop does that in every iteration in which none of its own pull requests is the next one to merge, not only „while it waits“ (owner, 2026-11-18: „sowieso sollte der loop schauen, ob er solche PRs nicht selbst mal eben mit reinpackt“): it brings the oldest such Renovate pull request that can go on one step further (ask for the rebase, or merge it); one that is red on a head up to date with
mainis skipped, so it does not hold the newer ones back (CodeRabbit on #294). Reason: on 2026-11-18 five green minor updates were open, the oldest since 2026-11-13, although the rule above stood since 2026-11-16; the session beside the loop merged them. -
[E] An open pull request takes
mainin only when it is the next one to merge (CI green on its head, every finding answered), when GitHub reports a conflict (then no CI starts, as seen on #194), or when it needs code that just landed onmain(owner, 2026-11-15). Reason:mainrequires a branch to be up to date before the merge, so takingmainin after every merge reran CI on every open pull request; from 2026-11-12 to 2026-11-15, 89 of 182 CI runs of the loop’s pull requests (1,383 of 2,425 CI minutes) ran on such merges, 112 merges in 42 of 49 merged pull requests. Expected [V]: about a third fewer CI minutes and fewer loop turns; the time to merge stays about the same, because each merge still waits for one full run of the next pull request, and the median gap of 58 minutes between merges shows that merging is not the bottleneck. [E] Once the merge queue ofmainis on (O33, owner, 2026-12-01, #553), the loop puts the next pull request into the queue through the auto-merge of the REST API when its CI Gate is green and every finding is answered, and the queue tests it merged into the currentmain. While the check of the head of #431 stays (until a follow-up after the switch), a pull request still takesmainin before it goes into the queue; after that a pull request takesmainin only on a conflict or when it needs code frommain. The same holds for every rule here that asks for a head up to date withmainbefore a merge (Renovate’s patch and minor updates included) (Branching and release). -
[E] Before the loop makes the release pull request ready, it merges Renovate’s ordinary patch and minor pull requests of versions from 1.0 on (owner, 2026-11-16): one at a time, each under O4 (green CI Gate, no blocking finding, every finding answered) on a head up to date with
main; the loop asks Renovate for the rebase of the next one with the box „rebase/retry“ in its description, because Renovate rebases only on a conflict (owner, 2026-11-18, Branching and release). Reason: normal updates merge themselves only for patch (renovate.json), so minor ones waited without an owner; on 2026-11-16 six of them were open, the oldest since 2026-11-13. [V] A red one stays open and is named to the owner with the release, it is not fixed like a security pull request; major updates and minor updates below 1.0 wait for the owner (from 2026-11-18 without a pull request, listed in the Dependency Dashboard until the owner approves), each with one issue that the loop finds or opens without a status label (CodeRabbit on #266; see Branching and release). -
[E] A red security pull request of Renovate (from GitHub’s Dependabot alerts,
[SECURITY]at the end of its title) is handled like an own pull request in the first step (owner, 2026-11-13, #148; patch, pin and digest security updates merge themselves, minor ones from version 1.0 on; a major one and a minor one below 1.0 wait for the owner, see Branching and release): the loop finds the root cause and fixes it in its ownclaude/…pull request, never by a push to the Renovate branch; if it cannot, it asks the owner. That fix pull request does not count toward the limit of four open own pull requests (security first). -
[E] Local checks (owner, 2026-11-15):
pnpm checkand the relevant E2E tests run before the push after which a pull request is marked ready, and after a merge ofmainwith a conflict in code; other pushes of a draft rely on its CI, which runs the same checks (lint, types, unit tests, build, E2E) on every push of an ordinary pull request. Replaces „before every push“. Expected [V]: less agent time and memory (the out-of-memory stop of 2026-11-15 came from Stryker and E2E of two agents at once), a few more red draft runs. Since 2026-11-17 the cheap local checks above replacepnpm checkand the relevant E2E tests; the full E2E suite runs in the CI. Since 2026-11-22 every push to a pull request also runs the complete unit suite and Stryker on every changed mutated file (the next rule). -
[E] Before every push to a pull request: the complete unit suite and Stryker on every changed file of the
mutateglobs, with no exception for speed (owner, 2026-11-22). [V] A changed test file counts for the mutated source of the same name, as the CI chooses the files (Mutation runs of a pull request). Reason: on 2026-11-22 the coordinator told the build session to skip the local Stryker runs for speed, and the complete CI run of #347 then refusedsrc/client/logic/settings-draft.ts(92 %): one run of two hours lost. Replaces the rule „Local Stryker runs before a push only for changed logic files close to their floor“ (2026-11-12). -
[E] Saving usage (owner, 2026-11-15; the weekly limit stood at 94 % on 2026-11-15): an event that needs nothing (a bot edited a comment, CodeRabbit skipped a review, an own reply) gets no tool call and at most one line; large output (job logs, whole files, transcripts) is read by a subagent or with
grep, never in the loop’s thread; while it waits on CI or a review, the loop does not poll and keeps one fallback wakeup of about 50 minutes (replaces „20 to 30 minutes“); once a day it adds the weekly usage it can see, or „not visible“, to the log entry of its next pull request, never in a pull request of its own [U: whether a session can read its usage other than from a notice is not checked]. -
[E] (Replaced on 2026-11-22 by „Before every push to a pull request“ above.) Local Stryker runs before a push only for changed logic files whose score is less than about 2 points above their floor in
mutation-floors.txt(for exampleeconomy.ts,settle.ts,actions.ts); data and interface files such ascatalog.tsoricons.tsare left to the CI mutation job. A local run does not speed up the CI, which keeps its own incremental cache; it only saves a red run (owner, 2026-11-12). -
[E] Every pull request records its work as a new file in the update log,
okf/log/<date>-<short-name>.md, and changes no other entry (owner, 2026-11-15, #212, Documentation website): a merge ofmaininto an open branch no longer conflicts at the top of one log file, which saves a push and a CI run per merge. -
[E] The Lexicanum is kept up to date by Claude (owner, 2026-11-17, #285): a pull request that changes a rule or adds a catalog entry or a mission updates its article in the same pull request: the texts and formulas of
src/features/<key>/lexicon.de.ts(a mission:src/features/missions/<m>/lexicon.de.ts), and a rule the article shows moves intosrc/coreso the article computes it. A rule has a rule page, a question or a guide that states it, insrc/core/lexicon/pages/(#288): a pull request that changes that rule changes the page, which computes every number from the rules and the settings of the round, and a changed or new text goes into the review list. The tables follow by themselves; the guards ofsrc/core/lexicon/articles.test.tsandpages.test.tsturn the CI red for an entry or mission without an article or without keywords, a mission without its text, a level effect without words before its formula, a link without a target, a typed number in a text and a formula that disagrees with its rule. A new or changed text is a draft [V] in the review list Lexicanum texts until the owner confirms it (see Lexicanum). -
[E] The texts of the Lexicanum follow one structure and plain language (owner, 2026-11-30, #545, Lexicanum): „Was ist das?“, „So funktioniert es“, „Zusammenspiel“, „Zahlen“; loose, „du“, short sentences, the mechanic as the code does it. When a pull request changes a mechanic, it checks its article and every article whose „Zusammenspiel“ names it against the changed code and rewrites them in the same pull request; the CI check of #545 reports a missing change, and an exception needs the label
lexicon-unchangedwith a reason. The texts of a rewrite pull request count as confirmed once the owner merges it. -
[E] Claude bundles pushes: while the CI of a pull request runs, no push of documentation or OKF alone (for example confirmed [V] → [E]); such changes go with the next code push, or are pushed before the pull request is marked ready. Every push cancels the running CI and starts all jobs again (owner, 2026-11-12).
-
[E] No branch update while a review of CodeRabbit of that pull request runs, and a review of CodeRabbit is requested at most about once an hour (owner, 2026-11-27, 203b, the retrospective of 26.11.29): a branch update aborted a running review.
-
[V] Guards from loop engineering practice: a stop condition a machine can check (release pull request merged, then its tag and its retrospective), the state read fresh in every iteration, small reviewable steps, tests never weakened, and a hand-back to the owner after two failed attempts at one problem.
-
[V] While the loop waits on CI or a review it wakes every 20 to 30 minutes; GitHub events of subscribed pull requests wake it earlier.
-
[E] Labels are set with the GitHub tools of the session (issue update with the full list of labels, so the other labels stay); a label that does not exist yet is created by GitHub on first use.
-
[E] Work while waiting on CI (owner, 2026-12-01): the loop uses the time for reviews with the code-review skill, cleanup and structure, new design patterns that raise quality, technical debt to pay off, ideas for the performance of the software, gaps and new questions, ideas that fit the features, research on technologies for the game and the loop, and the preparation of the next issues. It produces only issues (
idea,frage-owner,readyafter clarification), no extra pull requests; superfluous tests are only proposed, never removed by the loop; security findings go only into private security advisories. -
[E] The loop’s main goals (owner, 2026-12-01): a shorter time between releases, fewer tokens, higher code quality and a test pipeline that lets ever fewer errors through, measured with the DORA metrics (deployment frequency, lead time for changes, change failure rate, time to restore) and the loop’s own metrics, reported weekly. The waiting time also covers these metrics, OKF hygiene, surviving mutants, recurring causes of red runs, the slowest tests, the Lexicanum and the operator docs against the code, a balance simulation (values stay the owner’s), the backlog and the updates waiting for the owner.