Skip to content

The architect-plan label, and skipping an Architect run while an Architect plan is open - #264

Merged
JacobStephens2 merged 2 commits into
issue-237from
issue-248
Oct 1, 2026
Merged

JacobStephens2 merged 2 commits into
issue-237from
issue-248

Conversation

@JacobStephens2

Copy link
Copy Markdown
Owner

Summary

thirdshift labels every Architect plan architect-plan, and an Architect run is skipped while one is open.

 thirdshift architect
   arguments, User config, Run notification checks
   preflight checks
   one-at-a-time lock            held? -> skipped: already running
+  open issues labelled architect-plan
+    any? -> skipped: each plan's URL on stdout, one progress line, exit 0
   launch pull, worktree, Architecture review
   checks on the plan
-  swap needs-triage for ready-for-agent
+  create the architect-plan label if the repository lacks it
+  swap needs-triage for ready-for-agent and add architect-plan, in one request
   dispatch, unless --plan-only

What a run skipped this way says, on stderr and in the Skipped: line of its Run notification, several joined by ; :

Architect plan #7 "Deepen the session module" is still open: pick it up with thirdshift https://github.com/acme/widgets/issues/7
src/
├── architect.rs   # the label, Skipped::OpenPlans, the check after the lock, Outcome::urls for stdout
├── github.rs      # ensure_labels, out of create_issue; open_issues_labelled takes the repository
└── main.rs        # help text; stdout carries the outcome's URLs

Seams under test: the thirdshift binary, through the architect_run and command_surface end-to-end tests with the fake claude and gh. The fake gh already listed issues by label and listed and created labels, so it is unchanged.

Evidence

  • Before: cargo test --test architect_run an_open_architect_plan_skips

    thirdshift: creating worktree .../work/widgets-architect detached at origin/main
    thirdshift: starting the Architecture review of main
    thirdshift: architecture-review: session started
    ...
      left: Some(1)
     right: Some(0)
    

    and, for the label, left: ["ready-for-agent"] right: ["ready-for-agent", "architect-plan"].

    After: cargo test: every suite passes, architect_run with 73 (9 new, the rest updated for the label), command_surface with 22. cargo clippy --all-targets and cargo fmt --check are clean.

    New cases: the label is created when the repository lacks it and left alone when it has it, whatever its case; an open Architect plan skips the run with architect, --plan-only and merge base main, with no session, no launch pull and GitHub unchanged; each of several open plans is named; a closed plan or a removed label lets the run go ahead; an idea issue, or a plan a failed review left needs-triage, doesn't skip it; a plan whose dispatched run failed is never retried; the skipped notification names each plan and its command. The lock-first order is asserted in the existing dispatched-run test, where the first run's plan is labelled and the second run still reports already running.

Merge Danger

Door: two-way

Reverting restores the old behaviour. Plans labelled meanwhile keep an architect-plan label nothing reads.

Blast Radius: Architect runs

Every thirdshift architect now makes one gh issue list before its review, and fails if that call fails. A repository where an earlier plan is still open gets no new Architect run until it is finished, closed or unlabelled, by design. The progress line for the label swap changed its wording, for anything that reads stderr.

Unaddressed findings

Standards

  • open_issues_labelled and ensure_labels take the repository as an owner/repo string, though a Repo type exists. Their callers hold different types, an IssueUrl in the Base fix and a Repo in the Architect run, and the slug is what gh --repo takes; uniting the two is a wider change to github.rs than this Ticket.
  • Skipped::OpenPlans holds an unnamed issue-and-title pair. It is the shape open_issues_labelled already returned, and it now has one reader for each half; a named type would be for one variant.
  • still_open in the tests restates the production format. The repository's tests assert literal output, and the notification test now reuses the helper instead of a second copy.
  • Bare "plan" in older README and help prose. The new prose says Architect plan; the existing sentences on the plan a review publishes, which is not yet an Architect plan until it is labelled, are left as they were.

Spec

  • Several open plans share one stderr line and one Skipped: line, which gets long. Nightly Architect runs: a cron recipe, and an Architect run that is safe to schedule #237 asks for one progress line with the reason, and more than one open Architect plan takes a label added by hand or two machines racing.
  • A failed gh issue list ends the run with the notification outcome review failed, though no review started. Every failure before the review, the preflight checks included, already reports that way; renaming it belongs with the notification, not this check.
  • The label is created before the label swap, so a failed swap can leave it on the repository. Harmless: the label means nothing until an open issue carries it, and the next Architect run finds it there.
  • No flag overrides the check: covered only by a merge base main case and the help text. There is no override flag to test against.

Closes #248

🤖 Generated with Claude Code

JacobStephens2 and others added 2 commits October 1, 2026 12:22
…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>
@JacobStephens2
JacobStephens2 merged commit 6336e36 into issue-237 Oct 1, 2026
13 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-248 branch October 1, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant