The doctor installs the fastlane seam, and proposes the edits it will not make #10

Merged
larandar merged 2 commits from agent.teyla/Jostoph:tango/9-doctor-fastlane into main 2026-08-10 06:03:38 +00:00
Contributor

Adds a fastlane step to .doctor.just, and splits the edits a doctor should not make silently into two [confirm]-guarded recipes.

.fastlane.just (#6) and .doctor.just (#7) sit side by side here, and the seam's header says it ships as one file "to another repo (Jostoph, with the doctor)". This is what actually puts it in a working repo.

In scope

  • fastlane — installs and refreshes .fastlane.just, gated on the forge carrying a fastlane branch (remote_bookmarks(exact:"fastlane"), the same test that defines trunk() here).
  • wire — appends the seam's mod? line to the repo's justfile.
  • adopt — inserts the Ting governance declaration into AGENTS.md.
  • The branching in fastlane reworked from an if/else ladder to one match over raw values with guards.

Out of scope

  • The manifest. The seam fetches, validates and caches .fastlane.toml itself on a one-day rule. A second reader with a different freshness policy is how two caches disagree.
  • --fix / --yes flags. just --yes already exists and works on [confirm] recipes, and just chains recipes natively (just wire adopt). just has no real flag parsing for recipes — a --fix flag would be *flags varargs plus a hand-rolled membership test.
  • Removal. A repo that loses its fastlane keeps its seam; deleting a local toggle because a fetch failed is not a repair.

Boundary

doctor must stay safe with no TTY, because agents run it. [confirm] declines on EOF and aborts its whole dependency chain — measured: a [confirm] recipe as a dependency stopped the dependent recipe from running at all. So no confirming recipe can be a dependency of doctor, and that is why wire and adopt are separate and public rather than a --fix flag on doctor.

fastlane installs an untracked file, which is the doctor's normal business. wire and adopt edit tracked files, which is why they are guarded and deliberate.

wire offers only the mod? line. The flake_override backtick flake-ops also carries runs the seam on every just invocation in that repo — a bigger commitment than a doctor should make on anyone's behalf.

Acceptance

Run against real repos:

  • Install — modron (carries fastlane, no seam): 🔧 .fastlane.just installed; second run ✅ present and current.
  • Seam works unmodifiedjust fastlane::assemble through the wired module emitted all four inputs at ?ref=fastlane, including the ?dir=flakes%2F… cases.
  • Skipflaky-mesh, plugins carry no fastlane: nothing installed, skip reported. vordr does.
  • doctor with no TTY — reports both outstanding edits, prompts nothing, aborts nothing.
  • wire decline (EOF)recipe not confirmed, file untouched. Accept — appended, module resolves, just --list shows it. Re-run✅ already wired.
  • just --yes wire — skips the prompt, native flag, no code needed.
  • Placement — inserted at the first blank line after the set block, checked against three real justfile shapes: flake-ops (line 21, under set script-interpreter), flaky-mesh (line 19), modron (line 3, beside its existing mod headroom, since it has no set lines). A mod? line appended to the bottom of a long justfile is a line nobody finds.
  • mod? with the seam absent degrades correctly — module skipped, no error.

Not executed: adopt's insert path. Its decline path shares the [confirm] mechanism verified for wire, but the insertion into AGENTS.md is untested — I had no repo where that file was throwaway.

Closes #9

Adds a `fastlane` step to `.doctor.just`, and splits the edits a doctor should not make silently into two `[confirm]`-guarded recipes. `.fastlane.just` (#6) and `.doctor.just` (#7) sit side by side here, and the seam's header says it ships as one file "to another repo (Jostoph, with the doctor)". This is what actually puts it in a working repo. ## In scope - `fastlane` — installs and refreshes `.fastlane.just`, gated on the forge carrying a `fastlane` branch (`remote_bookmarks(exact:"fastlane")`, the same test that defines `trunk()` here). - `wire` — appends the seam's `mod?` line to the repo's justfile. - `adopt` — inserts the Ting governance declaration into `AGENTS.md`. - The branching in `fastlane` reworked from an `if/else` ladder to one `match` over raw values with guards. ## Out of scope - **The manifest.** The seam fetches, validates and caches `.fastlane.toml` itself on a one-day rule. A second reader with a different freshness policy is how two caches disagree. - **`--fix` / `--yes` flags.** `just --yes` already exists and works on `[confirm]` recipes, and just chains recipes natively (`just wire adopt`). just has no real flag parsing for recipes — a `--fix` flag would be `*flags` varargs plus a hand-rolled membership test. - **Removal.** A repo that loses its fastlane keeps its seam; deleting a local toggle because a fetch failed is not a repair. ## Boundary `doctor` must stay safe with no TTY, because agents run it. **`[confirm]` declines on EOF and aborts its whole dependency chain** — measured: a `[confirm]` recipe as a dependency stopped the dependent recipe from running at all. So no confirming recipe can be a dependency of `doctor`, and that is why `wire` and `adopt` are separate and public rather than a `--fix` flag on `doctor`. `fastlane` installs an *untracked* file, which is the doctor's normal business. `wire` and `adopt` edit *tracked* files, which is why they are guarded and deliberate. `wire` offers only the `mod?` line. The `flake_override` backtick flake-ops also carries runs the seam on every `just` invocation in that repo — a bigger commitment than a doctor should make on anyone's behalf. ## Acceptance Run against real repos: - **Install** — modron (carries `fastlane`, no seam): `🔧 .fastlane.just installed`; second run `✅ present and current`. - **Seam works unmodified** — `just fastlane::assemble` through the wired module emitted all four inputs at `?ref=fastlane`, including the `?dir=flakes%2F…` cases. - **Skip** — `flaky-mesh`, `plugins` carry no `fastlane`: nothing installed, skip reported. `vordr` does. - **`doctor` with no TTY** — reports both outstanding edits, prompts nothing, aborts nothing. - **`wire` decline (EOF)** — `recipe not confirmed`, file untouched. **Accept** — appended, module resolves, `just --list` shows it. **Re-run** — `✅ already wired`. - **`just --yes wire`** — skips the prompt, native flag, no code needed. - **Placement** — inserted at the first blank line after the `set` block, checked against three real justfile shapes: flake-ops (line 21, under `set script-interpreter`), flaky-mesh (line 19), modron (line 3, beside its existing `mod headroom`, since it has no `set` lines). A `mod?` line appended to the bottom of a long justfile is a line nobody finds. - `mod?` with the seam absent degrades correctly — module skipped, no error. Not executed: `adopt`'s insert path. Its decline path shares the `[confirm]` mechanism verified for `wire`, but the insertion into `AGENTS.md` is untested — I had no repo where that file was throwaway. Closes #9
The seam ships as one file and fetches its own manifest; the doctor only
has to put it where a fastlane actually exists.

Closes #9
The wiring and governance edits become deliberate recipes rather than
printed advice, since [confirm] declines on EOF and cannot be a dependency
of a recipe that must stay safe without a TTY.

Closes #9
agent.teyla changed title from The doctor installs the fastlane seam where a fastlane exists to The doctor installs the fastlane seam, and proposes the edits it will not make 2026-08-10 06:03:24 +00:00
larandar deleted branch tango/9-doctor-fastlane 2026-08-10 06:03:38 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Ting/Jostoph!10
No description provided.