Use for long-running Phase 1 or Phase 2 orchestration when the project needs recoverable checkpointing, strong autonomy, and clean pause/resume behavior through canonical run state.
Run the research system for an extended stretch without turning the orchestrator into a hidden owner of scientific truth.
overnight is a run controller. It owns checkpointing, sequencing, pause/resume, and run summaries. It does not own experiment verdicts, archive narratives, or reusable memory.
Use when:
review-state.jsonDo not use when:
overnight to invent scientific state that belongs to another skillprojects/<slug>/project-brief.mdprojects/<slug>/STATE.mdprojects/<slug>/experiment-memory.mdprojects/<slug>/review-state.json when presentdocs/policies/overnight-policy.mdprojects/<slug>/review-state.jsonprojects/<slug>/STATE.mdprojects/<slug>/experiment-memory.mdprojects/<slug>/results.tsvprojects/<slug>/plans/<idea>/anchor.mdprojects/<slug>/decision-tree.mdprojects/<slug>/archive/archive-<experiment_id>.mdprojects/<slug>/archive/artifacts/<experiment_id>/...memory/*projects/<slug>/workspace/dashboard-data.jsonBefore starting or resuming, verify:
project-brief.md exists and contains a usable intake configurationSTATE.md exists and is structurally readableexperiment-memory.md exists and is structurally readablereview-state.json is valid JSON if resumingAdditional mode checks:
phase1 start:
phase0 or phase1phase2 start:
phase2-ready or the project is already in phase2resume:
STATE.md.current_run_id points to a different unfinished run, stop and use resume or close that run canonically firstIf these checks fail, stop and report the exact missing contract or invalid state.
Supported modes:
phase1phase2resumeFor phase1, treat project-brief.md as the canonical source of intake configuration.
Do not rely on an ephemeral topic string as the only source of truth.
For phase2, verify Phase 2 readiness before taking ownership.
For resume, load the existing run and reuse its run_id.
Read:
project-brief.md for intake mode, autonomy preferences, escalation triggers, and environment constraintsSTATE.md for current phase, current run, decision posture, human attention state, and next actionexperiment-memory.md for the active line snapshot and latest validation posturereview-state.json when present for prior step history and paused-run contextStop if canonical files disagree in a way that makes the next step unsafe to choose.
For a new run, create review-state.json only when there is no different unfinished active run.
Then write a valid Run State record with:
run_idrun_typeproject_idphasetarget_idstatus: runningstarted_atupdated_atfinished_at: nullcurrent_step_indexcurrent_step_nameresume_safeblocking_reasondecision_modehuman_attentiondecision_typedecision_options_refdecision_optionserrors, warnings, and artifactssummarysteps[]For a resumed run:
in-progress at mostdecision_options_refThen update STATE.md run-lifecycle fields:
current_run_idproject_status to running unless canonical state already requires waiting-humandecision_mode, human_attention, risk_level, blockers, and last_updatedphase: phase2 only when a Phase 2 run actually beginsMaintain the invariant that STATE.md.current_run_id matches review-state.json.run_id while the run remains active or paused.
Do not change active_idea_id, active_branch_id, or experiment verdict state here.
Choose one approved next step at a time.
If no active experiment line exists yet, use the approved bootstrap sequence:
literature-reviewidea-creatornovelty-checkexperiment-plananchor-wrapperDrive this sequence from project-brief.md intake mode:
direction-searchseed-papersKeep each step checkpointed separately in review-state.json.
After an active line exists, route from canonical state:
anchor-wrapper when the current line already has a concrete experiment plan but no bound anchor yetrun-experiment when the line is ready for first execution, rerun, or bounded tweakanalyze-results when new result evidence exists without current structured analysisdrift-detector when current analysis exists but drift for the latest evidence is missing or stalejudge when drift is consistent and next_experiment_action is judge-readyexperiment-plan when judge has already set next_experiment_action: branch, canonical posture still allows bounded autonomous branching, and the current idea-scoped plan slot is safe to reusearchive when judge has already set next_experiment_action: archive and the project is not human-gatedIf the latest canonical posture is phase2-ready, finish the Phase 1 run as a handoff-ready completion instead of faking a Phase 2 start.
Do not inline paper workflow details here.
Use:
phase2-publishas the approved delegated publication workflow.
Before executing the selected step, inspect STATE.md.
If canonical posture is:
decision_mode: human-gated