Repository navigation
Nightly Architect runs: a cron recipe, and an Architect run that is safe to schedule - #257
Merged
Merged
Conversation
…ranch base <branch> (or --base <branch>) on architect names the Base branch, whatever the Launch directory has checked out: the Architecture review's worktree starts at its origin head, and the Spec run or Run the plan is dispatched as takes it as its Base branch, as an internal parameter of the dispatch. The detached-HEAD check is skipped when it is given, and launch pull only updates the checkout when the named branch is the one checked out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An Architect run takes, without waiting, an OS advisory lock keyed by the repository once its preflight checks pass, and holds it until its process exits, the run it dispatches included. One started while the lock is held is skipped: it says so on stderr, prints nothing on stdout, does nothing else and exits 0, and still sends its Run notification, with the outcome skipped and the reason. A review worktree a killed Architect run left is removed by the next one, so a kill leaves nothing to clean up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d for how an Architect run ended, the worktree says only what it knows The kill case now starts the next Architect run while the killed one's session is still going, so it would notice a lock a child process kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h its PR replaces was given or checked out, exact errors for base on a Run, the test module's doc in order Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One Architect run per repository at a time, with a skipped outcome
The plan an Architecture review marked ready carries the Architect run's Base branch inside the Reviewed outcome, next to the skipped one, and a run that names its Base branch takes the repository's lock once the checks on that branch pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thirdshift architect base <branch>: an Architect run names its Base branch
This was referenced Oct 1, 2026
Closed
…tect plan is open thirdshift labels the plan it marks ready architect-plan, in the request that swaps needs-triage for ready-for-agent, creating the label if the repository lacks it. Once the one-at-a-time lock is its own, an Architect run lists the repository's open issues with that label and is skipped if there are any: each plan's URL on stdout, one progress line naming each with the command that picks it up, exit 0, and the skipped Run notification. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… carries, the label's name and description apart, each open plan in the skipped notification Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The architect-plan label, and skipping an Architect run while an Architect plan is open
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rchitect plan by their names, a two-line help pointer, one helper for the unwrapped help Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g to fix on the branch) 2026-10-01T12:58:12Z, host thirdshift. Uncommitted work at the time of failure is included in this commit.
…chitect plan, type for finding the commands, an even help pointer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README: running an Architect run on a schedule
…rchitect plan as what the review published, doc comments wrapped Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JacobStephens2
marked this pull request as ready for review
October 1, 2026 16:59
…eside the Inherited failure's advice
Conflicts, each resolved to keep both sides:
- src/main.rs: the dispatched plan runs as StartedBy::ArchitectRun { base }, with main's retry command for its Base fix offer.
- src/notification.rs: both imports; the skipped body test gets main's advice field.
- tests/support/mod.rs: main's spawn_until_started now returns this branch's HeldRun, so run_until and run_copy_replaced_midway share it.
- CONTEXT.md, README.md: the Run notification's skipped outcome beside the Inherited failure's lines and the Pickup run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Closes #237
Summary
An Architect run that is safe to start from a timer, and the cron recipe for it. thirdshift is not a scheduler: the operating system runs the same command a person would type.
Skipped is an outcome, not a failure: exit 0, one progress line with the reason, and the one Run notification (subject
... Architect run: skipped, bodySkipped: <reason>) when one was asked for. A skipped run starts no agent session, does no launch pull, and creates no worktree, issue or label.The lock is an OS advisory lock on
~/.thirdshift/architect-locks/<owner>/<repo>.lock, held by the Architect run's process until it exits, so it covers the Spec run or Run it dispatched and is released however the process ends. It is tried before the open-plan check, so a running Architect run's own Architect plan is reported as already running, never as an unfinished plan.Seams under test: the
thirdshiftbinary, through the shared scenario support with the fakeclaude,ghand Resend (tests/architect_run.rs,tests/command_surface.rs), and the argument parser's unit tests (src/args.rs).Evidence
main,thirdshift architect base mainis an argument error, a second Architect run on a repository starts a second Architecture review, and one starts every night whatever the last one left open.After:
cargo teston 75f2baf: every suite passes,architect_runwith 74 tests andcommand_surfacewith 23;cargo clippy --all-targets -- -D warningsandcargo fmt --checkare clean.Merge Danger
Door: two-way
Reverting restores the old command. What stays behind is harmless: the
architect-planlabel on the repository and on plans already published, and empty lock files under~/.thirdshift/architect-locks.Blast Radius: Architect runs
A hand-typed
thirdshift architectnow exits 0 as skipped where it used to start a review: while another Architect run on the repository is running on the machine, or while an issue labelledarchitect-planis open. Runs and Spec runs started on an Issue URL are unchanged, apart from the progress line a Continuation prints when its pull request's base replaces another branch.Unaddressed findings
Standards
src/worktree.rscomments, where CONTEXT.md has Launch directory: the file uses it throughout for the repository the Launch directory is in, which is a different thing from the directory; the new sentence was shortened, the rest left as the file has it.planas a bare name in code (Skipped::OpenPlans,open_plans,PlanReady { plan }): CONTEXT.md's own Run notification entry says "the plan", and the identifiers sit inside the Architect module where no other plan exists. The prose that said the label "makes it the Architect plan" is fixed.architect.rsandbranch.rs),symbolic-refread twice: an Architect run has no Issue branch selection or Continuation to consult, and the two detached-HEAD messages differ on purpose, so a shared helper would take a flag for each difference.open_issues_labelledandensure_labelstake anowner/repostring;Repo::slugbesideIssueUrl::repo_slug; the(IssueUrl, String)pair inSkipped::OpenPlans:IssueUrlholds noRepo, so a string is what both callers have; giving it one is a wider change than this Spec.endedinmain.rsandnotification.rsbeside the typerun::Ended;Outcome::name()besideReviewed::review(): judgement calls on names an earlier Ticket review settled; no clearer pair came up.basepassed throughconcludeonly to reachReviewed::PlanReady: it keeps the dispatch from reading the Base branch a second way; one extra parameter.try_run_lockrepeats the shape ofGit::lock, and its caller mustmem::forgetthe file: the two differ in every line that matters (try or wait, home directory or git directory, held for the process or a scope), and the forget is one commented line next to the only call.Spec
<repo>-architectworktree is force-removed, which the Implementation Decisions don't list: story 22 needs it, a killed run otherwise blocks the next night, and it happens only once the lock is held.baserejects a branch that starts with a dash: a flag taken as a branch is the typo story 18 is about.git fetch origin <base>and creates the lock file: the Spec's own order puts the preflight checks and the lock before the skip, and none of what story 41 lists happens.review failed: the count is right, one notification, and the wording is One Run notification per Architect run #233's for any failure before a plan, preflight failures included; a new outcome name is not in this Spec.architect base mergetakesmergeas the branch: the Spec saysbasetakes the next argument, and the run stops at preflight withbase branch merge does not exist on origin.Tickets
🤖 Generated with Claude Code