Torus Engineering in Practice

“Spare me the theory. Give me the snippet.”

The engineer’s guide — official documentation for adopting the paradigm without reading the paper

TL;DR Keep two loops. The first turns the work (you already have this one). The second periodically revisits how the work is turned (put it on a calendar). If the two wind independently, the product takes care of itself. That’s all — if you have read this far, installation is essentially complete.

§1Quick Start (3 minutes)1

  1. Locate your execution loop. You already have one: fixing CI, handling issues, opening PRs — the thing you go around every day is the first circle (the meridian). Additional work required: none.
  2. Install an improvement loop. Create one recurring calendar event titled “Review how the agents are run (30 min).” That is your second circle (the longitude). It is topologically essential that this exists as a calendar event, not as good intentions.
  3. Take the product. Do nothing. As long as the two loops wind independently, the product S1 × S1 forms on its own. This step is handled by topology; no additional dependency is required.

That is the entire installation. Everything below is for reading after it works.

§2Copy-Paste Files

For readers who want only the conclusions, here are two files you can paste as-is. The first appends to CLAUDE.md; the second winds the longitude. Adjust the numbers to taste, but do not change the structure (two loops, mutually independent).

CLAUDE.md (append)
## Torus Operating Rules

### Execution loop (meridian)
- If CI is red, fix it. If an issue arrives, handle it. If you open a PR,
  see it through.
- After each revolution, increment the number in `.torus/revolutions`.

### Improvement loop (longitude)
- Whenever `.torus/revolutions` reaches a multiple of 100, stop fixing the
  loop's work and fix the loop **itself**:
  1. Name three failure patterns from the last 100 revolutions
  2. Revise at least one thing in this CLAUDE.md
  3. Delete one Skill nobody uses (a brief eulogy is optional)
- Do not improve the improvement loop from inside the improvement loop
  (genus 2 ships in the next major version).

### Forbidden
- Do not fill the hole. The moment everything is automated, the torus
  degenerates to a sphere and you are back in the 4th generation (§4 of
  the paper). Always keep one cavity through which human judgment passes.
.github/workflows/improvement-loop.yml
# The longitudinal circle. Winds independently of the meridian (your usual CI).
name: improvement-loop
on:
  schedule:
    - cron: "0 9 * * 1"   # tune your winding ratio here (see Table 1)
  workflow_dispatch:        # the hole through which human judgment passes. Do not seal.
jobs:
  wind:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Revise the execution loop itself
        run: |
          echo "Aggregate recent failure patterns; open a PR revising CLAUDE.md"
          # Put your favorite agent CLI here. There is one rule:
          # this job must not touch product code. The moment it does, it is
          # the execution loop, the longitude collapses onto the meridian,
          # and your genus drops to 0.

§3Choosing a Winding Ratio (Cheat Sheet)

The winding ratio — how many revolutions of the execution loop per revolution of the improvement loop — is the only tuning parameter in torus engineering. When in doubt, use 100 : 1.

Table 1. Recommended winding ratios.
RatioNameUse case
10 : 1AggressiveEarly days, when nothing is understood yet.
100 : 1StandardWhen in doubt, this. The recommended default.
1000 : 1EnterpriseFor organizations where improvement requires sign-off.
1 : 1The diagonalA retrospective after every revolution. Nothing but retrospectives. Not recommended.
n : 04th generationNo improvement loop. That is just a loop.
φ : 1GoldenThe orbit fills the torus densely. Everything will be improved eventually; “eventually” carries no timestamp.

§4Troubleshooting

Table 2. Common symptoms and their topological diagnoses.
SymptomTopological diagnosisRemedy
Cannot remember the last time the improvement loop ranDegeneration to a sphere (genus 0)Eat one doughnut, reflect on the purpose of the hole, and return to Step 2 of §1.
Nothing but retrospectives; no work gets doneAn orbit of winding numbers (0, n)Your winding ratio is upside down. Swap numerator and denominator.
The workflow diagram has become spaghettiFailure of the ambient space (the plane)Not your fault. Raise the genus (paper, Corollary 3.2).
The session died mid-taskNormalBy periodic boundary conditions, whatever exits the right edge re-enters from the left. Topologically, nothing was lost.
Can no longer tell Dev from OpsEarly-stage Klein-bottlingWorking as intended. Congratulations (Appendix A).
Subagents have started spawning subagentsEarly-stage fractalizationDo not stop them. Self-similarity is manifesting (companion paper).

§5Adoption Checklist

Four checks out of six and your system is topologically a torus. The remaining two will be improved on the next trip around the longitude. That is the nice thing about this method.

§6Glossary

Provided in case you must converse with the authors of the paper.

Table 3. Paper terminology → engineer’s terminology.
In the paperIn engineering
Meridian circleYour everyday work loop
Longitudinal circleThe recurring retrospective
Winding ratioHow many revolutions per retrospective
GenusThe number of holes; loosely, the number of places a human still fits
Dense orbitThe backlog will all get done (date TBD)
Degeneration to the sphereFully automated, and nobody is watching

§7Frequently Asked Questions (Practical)

Do I need to read the paper?
No. That is what this page is for. Note, however, that on a torus the state “hasn’t read it” eventually winds back around to “has read it.”
Does it work if I just copy-paste?
The act of copy-pasting was one revolution of the execution loop. It is already working.
How do I explain this to my manager?
Try “it is the product of a loop and a graph.” If that fails, “the adoption cost is one doughnut” (paper, §5) will succeed.

1 “Three minutes” is a topological estimate and may be continuously deformed into an interval of arbitrary length. ↩