Skip to content

The preflight offers to install what is missing and starts the login: a guided first run, --doctor (after #50) #59

Closed

Description

@brettheap

Lane: xfactory-2 (xFactory-2)

RULING — Brett Heap, 2026-09-05, in session, verbatim: "why not have an install program that will do all this? so the user gets our program and then runs that and we do all this?", asked after walking through the eight steps README § Quick start gives a new Mac user, and "yes" to the proposal below: the preflight OFFERS each missing install and runs it on a typed yes; the login is started for the user; nothing is ever installed silently.

The finding

On a Mac the README (after #54) walks a first-time user through eight steps. Two of them are already the program: step 5 is openRepoShape --install and step 7 is the run. Steps 1–4 — the Xcode Command Line Tools, Homebrew, brew install gh, gh auth login — are copied by hand, and the same is true of apt/dnf on Linux and winget on Windows. The preflight in setup-project.py (_check_git, _check_python, _check_gh, preflight) already knows exactly what is missing and prints where to get it (GIT_MISSING, python.org, cli.github.com, Run: gh auth login) — and then exits, leaving the user to type the command it just named.

Those four steps are not automated today for three reasons that stay true: they need admin rights and, on a Mac, an Apple dialog; gh auth login opens a browser only the human can finish; and Homebrew-or-not, python.org-or-brew are the machine owner's choices. The tool must also never DEPEND on any of them — the shape runs where nothing can be installed. So the step up is an offer, not an installer.

What lands

  1. The preflight offers. When a check fails and a terminal is attached, setup-project.py prints the platform's install command and asks once — Run \brew install gh` now? Type yes to continue:— runs it onyes, re-checks, and continues; on anything else it prints what it prints today and exits as today. The offer table, per platform, uses the SAME commands README § Quick start documents so the two cannot disagree: macOS — xcode-select --installwhengitis missing (Apple's dialog),brew install ghwhenbrewis on PATH, otherwise the brew.sh link (**Homebrew's own installer is never run by us**; that stays in the user's hands); Debian/Ubuntu including WSL2 — the official cli.github.com apt block,sudo apt install git python3; Fedora — the dnf pair; Windows — winget install --id Git.Git, winget install --id GitHub.cli, and the python.org link for Python. Detection by sys.platform` plus which package manager is on PATH; an unrecognised platform gets today's text.
  2. The login is started, not completed. gh present but not authenticated: offer gh auth login and run it interactively in the user's terminal; the browser half is theirs; then re-check. When git has no credential helper that reaches gh, offer gh auth setup-git (the implementer verifies how gh itself detects that, and uses the same test).
  3. Consent is per action and is NOT --yes. --yes skips the one scaffold question and must not also install software. No terminal → no offers, today's refusal. AGENTS.md gains the line: an assistant never answers an install prompt; the human types it (the same rule as the repository-creation prompt). Cap moves.
  4. --doctor. Runs the preflight with its offers and stops before the plan — the "install program" Brett asked for, without a second program: openRepoShape --doctor passes it through (value-less flag list in the command), py setup-project.py --doctor on Windows. Exit 0 when everything is present, 1 otherwise.
  5. README § Quick start collapses to: install the command (Windows: download setup-project.py), run --doctor or just run it — it offers the rest. The per-platform paragraphs STAY as the reference for what the offers run and for a user who prefers to install by hand. Cap moves by the lines added minus the lines removed.
  6. Tests, with nothing ever installed. The offer table per platform with a fake run; refused offer = today's text and exit code; no-TTY = no prompt; --yes does not cover installs; --doctor exit codes; the parity of the README commands and the offer table (one test reads both). CI runners never execute an install command from this code.

Out: running Homebrew's installer; completing the browser login; a Windows twin of the openRepoShape command (#49 ruled it out); anything in setup.sh, which after #50 is a shim.

Nothing about what the shape means changes; the shape still confers nothing.

Sequencing

After #50 lands — Brett's word: pick it up after #50 merges. #50 makes setup-project.py the one definition behind both entry points; written before it, the offers would exist twice (bash and Python) and drift. Branch from the post-#50 main in worktree ~/projects/openRepoShape-worktrees/guided-preflight; one PR, body Lane: xfactory-2 (xFactory-2) then Claim: <this issue>.

Claim + sibling disclosure

CLAIMED — lane xfactory-2 (xFactory-2), the lane's SECOND window: session harness 42466ae1-e3f5-42d1-b680-9bf896e6e8e8 (Claude Code, profile team-04a, cwd ~/projects/openRepoShape, cross-session name openreposhape-b1 [90c755]), 2026-09-05T22:52Z, for the whole of the above. The lane's other window (xFactory-2 [8247c3]) holds #50 in worktree setup-sh-shim; it is told of this claim with this filing so #50 does not grow the offers. Rule 1 reads: (1) no existing governing record — #43/#46, #49/#53 and #54/#57 landed the README steps this collapses; (2) gh pr list --state all --search "doctor preflight install offer": none; (3) gh issue list --state all --search "doctor" and --search "installer prerequisites": none; (4) git ls-remote --heads origin | grep -iE 'doctor|install|prereq|preflight': no branch. Sibling lanes on this repository: xFactory-1 and openxfactory-4-opendox-extraction — no overlap.

Lane: xfactory-2 (xFactory-2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions