File upkeep for repositories and the coding agents that read them

Clean repo. Clean context.

Every task leaves a trail: a plan, three handoffs, a dated gate report, a worktree per attempt. Five weeks in it is all still there, and the next agent reads every copy before it writes a line, then picks one. Moptop keeps the tree down to the current work. The rest leaves, copied and checked first, for an Archive that keeps every version in order and a click from coming back.

The console

A day in a repository.

The Moptop window over one working day: five weeks of agent sessions, then the first check, six stages in turn.

Search files…Filters
harbor Inbox History Plan Settings Run upkeep now
Working files143 files
    ArchiveEmpty

      Nothing archived yet.

      UpkeepView latest logNext check 4m 12s
      Stays · checked next time

      Monday8:40 AMOne working day

      The point

      An agent should read the project,
      not its history.

      A coding agent starts by reading the folder. Give it 143 files, seven checkouts of the same module and three handoffs for one task, and it spends its context telling them apart, then guesses. Give it 55 files, one handoff and one report, and it spends its context on the work. The history isn’t lost. It is in the Archive, where it can’t be read by accident.

      What the agent readsSame ask, twice
      Monday, 9:05 AMBefore the first check

      fix the slow exporter, the nightly run keeps timing out

      0files read
      • 7 copies of export.py, from 7 checkouts
      • 3 handoffs for the same task
      • 3 gate reports, 2 of them out of date
      • Last month’s perf audit, read in full
      • Works from the September handoff. It is the wrong one.
      Monday, 10:05 AMAfter it

      fix the slow exporter, the nightly run keeps timing out

      0files read
      • One handoff: HANDOFF-export-2026-10-05.md
      • One gate report: GATE_V5_REPORT_2026-10-05.md
      • 3 copies of export.py: the app and the 2 worktrees in use
      • Starts from the current state. Gets to work.
      The repository on both sides is the same one. Only the tree changed.

      The lamp panel

      Six lamps.
      One lit at a time.

      Every check, on its schedule or when you press Run upkeep now, goes through the same six stages. The panel along the foot of the window shows which one is on. Nothing moves until the last lamp.

      WatchNext check 4m 12s
      • harborMac miniWatching for the next check
      • atlasMacBookWatching for the next check
      • client-sitesMac miniAutomatic upkeep is off
      Run upkeep nowRuns on the Mac mini while Moptop is running there. Closing the tab doesn’t stop it.
      01

      Watch

      Make a repository, or a folder full of them, a space. Moptop finds each repository inside it, looks after each on its own, and never looks anywhere you didn’t point it. The first check is a plan you can read before anything moves.

      02

      Sort

      Source, tests, configuration and anything they read stay, however long they sit unchanged. So do the newest handoff and the newest report. What may move is the rest of a dated series, a plan the work has moved past, merge leftovers and finished worktrees. Where Moptop can’t tell which version is current, the series stays whole and waits in the Inbox as one card.

      SortChecking files now
      • src/harbor/export.py
      • docs/HANDOFF-export-2026-10-05.md
      • docs/HANDOFF-export-2026-10-02.md
      • docs/GATE_V4_REPORT_2026-10-02.md
      • docs/perf-audit-2026-09-02/
      • docs/REFACTOR_PLAN.md
      • src/harbor/retry.py.orig
      • worktrees/fix-retry
      • notes/PLAN.md · PLAN-final.md
      Most files stay and are checked again next time.
      Wait to settleWaiting for the quiet period
      Next eligible 15m 00s
      • GATE_V3_REPORT_2026-10-01.mdWaiting
      • HANDOFF-export-2026-09-29.mdWaiting
      • src/harbor/export.pySaved just now
      • worktrees/docs-sweepWaiting
      Nothing moves while you are working: any change in the repository restarts this wait.
      03

      Wait to settle

      Candidates wait fifteen quiet minutes in their repository. Any change there restarts the wait, so nothing leaves while you are in the middle of something. The wait is yours to set, down to none at all.

      04

      Prove it works

      Before anything moves, Moptop runs your test, lint and build commands on a private copy: first untouched, then without the batch. If a check fails without it, the batch is halved until the file the check needed is found, and that file stays.

      Prove it worksChecking
      $ python -m unittest on a private copy
      untouched            pass
      without the batch    test_rates fail
      halving the batch    9
      found                legacy-rates.csv needed · stays
      without the rest     pass
      vouched for          8 files · 6 runs
      Watchers, servers and browser-dependent scripts are skipped.
      Back up & verifyCopying
      Originaldocs/GATE_V3_REPORT_2026-10-01.mdSHA-256
      copy
      Copy, keptArchive/Previous versions/…SHA-256
      Fingerprints must match before anything moves.
      05

      Back up & verify

      Every file that moves is copied first, and the copy’s fingerprint must match the original’s before the original goes anywhere. Committed files leave with a Moptop commit limited to those paths, never mid-merge and never onto a detached checkout.

      06

      Archive

      The batch leaves the tree for the Archive, grouped by kind: previous versions, completed work, worktrees. Worktrees leave whole, branch and uncommitted edits included, and one click brings each back. Empty folders are removed, so the tree reads like a fresh clone. Nothing is deleted.

      ArchiveArchiving
      Working files
      • GATE_V3_REPORT…
      • GATE_V4_REPORT…
      • GATE_V5_REPORT…
      • REFACTOR_PLAN.md
      • retry.py.orig
      • fix-retry20 files
      Archive
      • Previous versions
      • Completed work
      • Worktrees
      Grouped by kind. Findable by search.

      The Archive

      Clean isn’t gone.
      The record is kept.

      The Archive keeps the whole run of the work in order: every earlier handoff, every superseded report, every finished worktree, each with where it was, why it moved and the fingerprint of the copy. Search it. Read the September handoff when you want to know what September thought. Restore a copy, or bring a worktree back whole. History lists every run that changed something, down to the event and its SHA-256.

      Archive
      docs/GATE_V3_REPORT_2026-10-01.mdArchive · Previous versions

      The retry budget ran out after 4 attempts on the slow exporter.

      Archive record

      Original location
      app/docs/GATE_V3_REPORT_2026-10-01.md
      Reason
      Older in a dated series · GATE_V5_REPORT_2026-10-05.md is newest
      Moptop commit
      a3f91c2 · archive: 2 files under docs
      SHA-256
      5be1 0c7a 93f2 e418 … matches
      Restore a copyCopy original path

      Restored a copy to Working files.

      HistoryMonday
      • 9:56 AMFirst check8 files archived · 4 worktrees moved out · legacy-rates.csv kept for the testsMopped & topped
      • 9:56 AMProvedpython -m unittest passed on a copy without the batch · 6 runs
      • 3:12 PMAutomatic checkGATE_V5_REPORT replaced by GATE_V6_REPORT · checks passedMopped & topped
      • 4:40 PMRestored by youworktree fix-retry back in place · branch fix/retry
      Changes and failures land here. Checks that changed nothing don’t.

      The machine room

      One computer,
      or every one you work on.

      Each computer runs its own Moptop and looks after only the folders on its own disk. One window shows the spaces from all of them, each named for the machine that holds it. The whole thing is Python’s standard library on your own machine, listening on loopback. No account, no model, no cloud.

      Spaces
      • harborMac mini
      • client-sitesMac mini
      • atlasMacBook
      • thesisMacBook
      Create a space Connected

      Questions from the back row

      Fair enough.
      Ask away.

      Will it touch my code?

      No. Source, tests, configuration and anything they read stay, however old. Git-tracked files are never archived for age, and files Git ignores are left where they are. Your own checks run before and after.

      What if it can’t tell which version is current?

      Then nothing moves. The series stays whole and appears in the Inbox as one card. This one is current settles it; Keep all keeps every file. An agent can settle it too, with scc supersede, following five short lines Moptop writes into CLAUDE.md and AGENTS.md. Your answer outranks the agent’s.

      What if it moves something I needed?

      It is in the Archive, with a copy that was checked before it moved. Search for it, restore a copy, or bring a worktree back whole. If a check fails after a batch, the batch is put back and movement pauses until you say otherwise.

      What about folders that aren’t mine, or aren’t repositories?

      A repository under someone else’s name has only its untracked leftovers looked after, and never gets a commit. Environments, vendored code and submodules are read for search and never touched. A plain folder works too: subfolders untouched for three months are archived, and loose files stay.

      Why does it look like a 1960 computer?

      Because the job is an operator’s job: a machine that watches, sorts, waits, proves, records and files, and tells you with one lit lamp what it is doing right now. If the console isn’t your style, there are VS Code, Obsidian and Antigravity skins.

      Power on

      Coming soon. Ask about Moptop.

      Terminal
      $ 

      Coming soon. Installation instructions will be available with the release.

      • Coming soon. Ask about the release.
      • Create a space. A repository, or a folder full of them. Nothing else to configure.
      • Leave it running. Upkeep runs on its schedule. Run upkeep now when you can’t wait.

      Coming soon · Platform and installation requirements will be confirmed with the release.