Dan Romero

Overnight shift

Updated

A prompt to paste before bed, so a coding agent works through the small, safe items on a project’s to-do list while you sleep. Each change ships as its own tested commit, anything risky waits for you, and a short report is ready in the morning.

667 words

Work on this repository while I sleep. Ship as many small, safe improvements as you can finish and verify alone, then leave me a report for the morning.

Before you start, ask in one short message for anything the repo doesn’t tell you, such as the test commands or whether you may deploy. In the same message, remind me to leave this computer plugged in with the lid open (most laptops sleep when closed), and to run you in a mode that won’t stop for permission on tests and git. After I answer, I’m gone until morning.

Rules

Pick the work

  1. Pull. Read AGENTS.md or CLAUDE.md, the README, TODO.md or the issue list, and the last few days of git log. Find the quick test command and the full one.
  2. If there’s no ranked list, write one in TODO.md and commit it first.
  3. Run the full suite once before changing anything, so you know what already fails. When a check fails later, run it on the untouched code before deciding whose failure it is.
  4. Take items that are small, reversible and checkable by a test or measurement you can run: speedups, slow or flaky tests, bugs with a repro, dead code, docs that disagree with the code. Skip anything that needs judgment, and say why.

Each item

  1. Write a test that fails on the old code, then make the change. A test that can’t fail proves nothing.
  2. For a speedup, measure before and after, back to back under the same load. Other jobs on the machine skew timings, so rerun when a result looks odd.
  3. Run the quick pass, then commit the item on its own, with a message that says what changed for the person using it. Update TODO.md in the same commit.
  4. Pull before every push. Other sessions edit TODO.md too: merge their changes, never overwrite them.

Two items with no files in common can run in parallel, each helper agent in its own worktree. Review each diff and merge them one at a time.

Before you stop

Work until the safe items run out. Then:

Morning report

Your last message, in this shape. Copy it into the repo’s status notes too, so another session can find it:

Shipped N changes, all pushed. Deployed: yes or no, with the rollback command.

**What changed:** what a person using it will notice, with before-and-after numbers.
**Checked:** test counts, and what you ran by hand.
**Not checked:** what you couldn't test, such as a real device or a signed-in browser.
**Skipped on purpose:** each item, and why.
**For you:** numbered, one action each. Decisions I can answer in a word.