feat: nightshift#83
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
devloop | 2fa3843 | Commit Preview URL Branch Preview URL |
Jul 06 2026, 12:11 AM |
Owner
Author
Devloop Review Round 1
Review 1Verdict: REJECT Acceptance matrix
Engineering quality matrix
Review flags
Findings
Missing tests
Fix instructions
Notes
|
Owner
Author
Devloop Review Round 2
Review 2Verdict: ACCEPT Acceptance matrix
Engineering quality matrix
Review flags
FindingsNone. Missing tests
Fix instructionsNone. Notes
|
Owner
Author
Devloop Final Report
Acceptance Matrix SummaryAcceptance matrix
Engineering Quality SummaryEngineering quality matrix
Implementation Summary
Commit References
Tests Run
Residual Risk
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Devloop Nightshift Mode
Problem
During waking hours the user drives agents interactively to ship focused work. Overnight that leverage is idle: the machine sits unused while a queue of high-value, well-scoped improvements goes unstarted. Today the only way to get autonomous overnight work is to hand-write specs the night before and manually launch
devloopon each, which defeats the point. There is no headless path that both decides what to work on and executes it without a human at the terminal, and no single artifact to review in the morning.Outcome
A scheduled, non-interactive
devloop nightshiftrun selects the 2-3 highest-leverage improvements in a target repository, drives each through the existing coder/reviewer loop in its own worktree, opens a draft PR per accepted change, and writes onedigest.mdsummarizing every run's verdict and PR link. The user installs the overnight trigger once withdevloop nightshift --install-schedule 02:00, wakes up to a set of review-ready draft PRs plus a digest, and never touches a terminal to make it happen. Both Claude Code and Codex run headlessly across the night (survey/review by one, implementation by the other).Acceptance Criteria
AC1:
devloop nightshiftis dispatched frommain()and documented in plain help, TUI help, and the README command table.AC2:
devloop nightshiftand every scheduled invocation force non-interactive behavior: plain output, no worktree shell, and no automatic update prompt, even when stdin/stdout are TTYs.AC3: The survey step builds a prompt that references the installed
devloop-specskill, the requested count, the current date, the.devloop/nightshift/<date>/specswrite directory, and an explicit "write specs only, do not implement" constraint, and launches the survey agent through the existing headlessrun_with_promptpath (not the interactive spec launcher).AC4: Given a survey agent that writes N specs, nightshift runs each valid spec exactly once, in sorted order, through the
--create-prrun path with the resolved coder, reviewer, per-spec max passes, and timeout.AC5: Per-spec runs are sequential: run K+1 does not start until run K's process exits.
AC6: A run that fails, stalls, is unclear, or times out is recorded in the digest and does not prevent subsequent specs from running.
AC7:
.devloop/nightshift/<date>/digest.mdis created with one row per spec containing its title, terminal status, branch, draft PR link (or a clear "no PR" marker), and report path, plus the survey rationale, and.devloop/nightshift/latestpoints at the newest run.AC8:
--dry-runwrites specs and a digest but invokes no per-spec run and opens no PR.AC9:
--statusprints the path to the latest digest, or a clear message when none exists.AC10:
nightshift_repos,nightshift_count,nightshift_coder,nightshift_reviewer,nightshift_survey_agent,nightshift_max_passes, andnightshift_scheduleare readable and writable through the config helpers with local-overrides-global precedence; the config key whitelist rejects unknown keys;nightshift_countis clamped to 1-5 and agent keys are normalized tocodex/claude.AC11:
--install-schedule HH:MMwrites ash.devloop.nightshiftplist under${DEVLOOP_LAUNCH_AGENTS_DIR:-$HOME/Library/LaunchAgents}whoseStartCalendarIntervalencodes the parsed hour and minute, whoseProgramArgumentsinvoke the resolved absolutedevlooppath withnightshiftand the resolved repos, and whoseEnvironmentVariables.PATH,StandardOutPath, andStandardErrorPathare populated; it then loads the agent via${DEVLOOP_LAUNCHCTL:-launchctl}and persistsnightshift_schedule.AC12:
--install-schedulenever invokessudo; it prints the exactpmsetwake command for the user to run and the written plist path.AC13:
--uninstall-scheduleunloads via${DEVLOOP_LAUNCHCTL:-launchctl}, removes the plist, and clearsnightshift_schedule, exiting 0 whether or not one existed.AC14: An invalid
--install-scheduletime and an unresolvable repo set each exit nonzero with a specific error and write no plist.AC15:
scripts/devloop_test.shcovers: dispatch/help/README presence, headless invariants, the survey prompt builder, orchestration over a stubbedDEVLOOP_RUN_CMDincluding a mid-list failure, digest andlatestgeneration,--dry-run,--status, every new config key (set/get/remove, precedence, clamping, whitelist rejection), plist generation contents, install load via a stubbedDEVLOOP_LAUNCHCTL, uninstall removal, and the two nonzero error paths.AC16: The project function coverage gate in
scripts/devloop_test.shstays at 100% for every new function.Review Trail
Review rounds and the final report are posted as PR comments below.
Generated by devloop.sh