Documentation
How Nightshift works
Understand the durable contract, one-item loop, gates, decisions, recovery, and morning handoff.
Answers: how Nightshift works · Updated
Nightshift moves the working contract out of chat and onto disk. The agent reads one approved item, implements it, runs its gates, commits it locally, ticks it, and continues until the list is complete or the owner stops the shift.
The durable loop
Every item follows the same visible cycle. The punch list remains authoritative across compaction, restart, or a recovered session.
- Read the current item and gates.
- Build the complete outcome.
- Run the required verification.
- Create one local conventional commit.
- Tick the item and continue.
Questions become decisions
An unattended run cannot wait for a sleeping owner. When a choice is genuinely yours, Nightshift selects a reversible default, records the reasoning and rollback in the parking lot, and keeps working. Known later work belongs on the drafting table instead.
- Parking lot: owner decisions and defaults chosen.
- Drafting table: known work staged for later.
- Snag log: findings and their disposition.
- Shift log: progress, recovery, and handoff events.
Recovery without a second worker
One shift binds one session identity and one process lease. A watchman starts a replacement only when host evidence shows the active process is gone and the recorded identity can be resumed or safely handed off.
- The punch list survives even when conversation history does not.
- The process lease prevents the older process from continuing observable tool work.
- Other normal tabs and conversations remain free to work.
Start with a bounded prompt
This prompt names the outcome and preserves Nightshift’s review boundary. Paste it into the supported coding host from the project you want to change.
Explain how Nightshift would keep this project's objective, progress, decisions, and verification durable before I start a shift.What this workflow does not claim
- A checked box is self-reported; the gate does not independently prove implementation quality.
- Recovery preserves the work contract but cannot repair a host's conversation history or UI.
Evidence and sources
These links support the released behavior, public outcomes, or problem language described on this page.
Frequently asked questions
Is Nightshift just a long prompt?
No. The contract, decisions, progress, and recovery state live in project files, while hooks enforce the host boundaries the owner enabled.
Does the clock-out gate prove the work is correct?
No. It enforces completion of the declared list. Item definitions, project checks, and human review establish quality.