Skip to content

README: a quick start for a first-time user, and Windows goes through WSL2 (#43) - #46

Merged
brettheap merged 1 commit into
mainfrom
docs/newcomer-quick-start
Sep 5, 2026
Merged

brettheap merged 1 commit into
mainfrom
docs/newcomer-quick-start

Conversation

@brettheap

@brettheap brettheap commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Lane: xfactory-2 (xFactory-2)
Claim: #43 (claim in the issue body)

Closes #43.

What this changes

A first-time user can now start from the top of the README without knowing anything in advance. Brett Heap, 2026-09-05, in session: "the does the prereq list gh needed? if not add that. we also need to have that command in our readme in github to make simple for uers. we want this for newbies to be able to use", and "what do we do for users that use windows? … we need to have a windows only and linux/wsl2 section right?"

The README listed gh as a requirement but never said how to install it, and the shortest way in — install the openRepoShape command once, then run it — sat inside the worked example, after the curl | bash one-liner and its API variant.

  • New § "Quick start for a first-time user" at the top of "Starting a project in a new organisation": four numbered steps. (1) Install the GitHub CLI — the official install page as the authority, brew install gh, and the Debian/Ubuntu and Fedora package commands copied from GitHub's own install_linux.md, not paraphrased. (2) gh auth login and the credential helper, with the reason the worked example already gives. (3) Install the openRepoShape command — the one-liner the README already had, plus its curl twin. (4) openRepoShape <Project> --org <your-org>, type yes once.
  • Platform paragraph. macOS and Linux run the steps in their own shell. Windows: WSL2, with the three commands to get there, and every step run inside the WSL shell — setup.sh and the openRepoShape command are bash scripts whose preflight needs a literal python3, so there is no native PowerShell path today and the README says so. Git Bash is untested and is not claimed. Ubuntu under WSL2 ships git and python3; the preflight names anything missing and where to get it (verified against setup.sh).
  • The existing curl | bash block is relabelled as the "without installing anything" alternative it is; nothing below it moves. The worked example's Requirements line gains the install pointer for gh.
  • README hygiene cap raised by exactly the lines added, reason recorded beside it.

Nothing in setup.sh, the openRepoShape command or any script changes.

Evidence

python3 -m pytest tests -q green on the rebased branch (count in the last commit message). Linux package commands verified byte for byte against https://raw.githubusercontent.com/cli/cli/trunk/docs/install_linux.md.

Sequenced after #45 (both moved the README cap); rebased onto the main that carries it. Merge word: Brett Heap, 2026-09-05, "merge #43 on green too".

🤖 Generated with Claude Code

Summary by Sourcery

Make the README approachable for first-time users by documenting prerequisites, authentication, installation, and supported platform setup before the existing project-starting instructions.

New Features:

  • Add a first-time-user quick-start guide covering GitHub CLI installation, authentication, command installation, and project creation.
  • Document WSL2 as the supported Windows path for running the bash and Python-based tooling.

Enhancements:

  • Clarify the existing no-install setup option and link the worked example's GitHub CLI requirement to its official installation instructions.

Documentation:

  • Expand the README with platform-specific setup guidance and package installation commands for macOS, Linux, and Windows via WSL2.

Tests:

  • Raise the README length hygiene limit to account for the new quick-start documentation.

… WSL2 (#43)

Brett Heap, 2026-09-05: "if not add that … make simple for users … we want
this for newbies to be able to use" and "we need to have a windows only and
linux/wsl2 section right?". The README listed gh as a requirement but never
said how to install it, and the shortest way in (install the openRepoShape
command, run it) sat inside the worked example after the curl | bash line.

Four numbered steps at the top of "Starting a project in a new organisation":
install gh (official page; brew; the Debian/Ubuntu and Fedora commands copied
from GitHub's own install_linux.md), gh auth login and the credential helper,
install the openRepoShape command, run it and type yes once. A platform
paragraph: macOS and Linux in their own shell; Windows through WSL2, because
setup.sh and the command are bash scripts whose preflight needs a literal
python3, so no native PowerShell path exists today. The curl | bash block is
relabelled as the no-install alternative; the Requirements line gains the
install pointer. README cap raised by the lines added.

Lane: xfactory-2 (xFactory-2)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 5, 2026 17:22
@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 20 hours and 30 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@sourcery-ai

sourcery-ai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Reviewer's Guide

Expands the README with a first-time-user quick start that explains gh installation and authentication, openRepoShape setup and usage, and WSL2-based Windows support, while preserving the existing installation-free flow and updating the documentation length guard.

Flow diagram for Windows WSL2 quick start

flowchart TD
    A[Windows user] --> B[Run wsl --install in administrator PowerShell]
    B --> C[Reboot and open Ubuntu]
    C --> D[Run all quick-start steps inside WSL shell]
    D --> E[Install gh]
    D --> F[Install openRepoShape]
    D --> G[Run openRepoShape]
Loading

File-Level Changes

Change Details Files
Adds a top-level onboarding path for first-time users, covering GitHub CLI setup, authentication, command installation, and project creation.
  • Documents official gh installation commands for macOS, Debian/Ubuntu/WSL2, and Fedora.
  • Explains gh authentication and HTTPS credential-helper configuration.
  • Provides both persistent command installation methods and the basic invocation flow.
  • Documents Windows support through WSL2 and explicitly excludes native PowerShell and untested Git Bash.
  • Relabels the existing one-shot `curl
bash` flow as an installation-free alternative and adds an install link to the worked-example requirements.
Updates the README hygiene test to accommodate the expanded onboarding documentation while recording the reason for the cap increase.
  • Raises the maximum README length from 743 to 821 lines.
  • Adds an inline rationale tying the increase to the new quick-start and platform guidance.
tests/test_repo_hygiene.py

Assessment against linked issues

Issue Objective Addressed Explanation
#43 Add a prominent quick-start section at the top of the new-organisation workflow that guides first-time users through installing and authenticating the GitHub CLI, installing openRepoShape, and running it with an organisation. ✅
#43 Explain how to install the GitHub CLI, including an official installation link and common macOS, Linux, and Windows/WSL2 guidance, and add an installation pointer to the worked example's requirements. ✅
#43 Update the README hygiene line cap to account for the added documentation while preserving the existing no-install alternative and keeping implementation scripts unchanged. ✅

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sonarqubecloud

sonarqubecloud Bot commented Sep 5, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new quick-start documentation includes a misleading statement about --visibility private even though the tooling defaults to private, which should be corrected before merging.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the repository documentation to make onboarding “first-time users” easier by moving the simplest path to the top of the README, adding explicit GitHub CLI install/auth steps, and documenting Windows usage via WSL2; it also adjusts the README length hygiene test accordingly.

Changes:

  • Add a “Quick start for a first-time user” section with gh install/auth, openRepoShape install, and first run instructions (including WSL2 guidance for Windows).
  • Clarify the existing curl | bash flow as the “without installing anything” alternative.
  • Raise the README line-count cap in hygiene tests to match the added documentation.
File summaries
File Description
README.md Adds first-time-user quick start, platform guidance (including WSL2), and links/commands for gh install + openRepoShape install.
tests/test_repo_hygiene.py Updates the README length cap and records the reason in-line.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread README.md
Comment on lines +104 to +108
`<Project>` is one positional CamelCase name (e.g. `Atlas`); `--org` is
required — from the flag, `$OPENREPOSHAPE_ORG`, or the command's own prompt
— and add `--visibility private` if you want that. It shows the plan and
asks once, `Type yes to continue:`; type `yes`. Afterwards `./<Project>` is
the cloned root. The worked example below walks through what this produces,
@brettheap
brettheap merged commit 2fd9573 into main Sep 5, 2026
4 checks passed
@brettheap
brettheap deleted the docs/newcomer-quick-start branch September 5, 2026 17:25
brettheap added a commit that referenced this pull request Sep 5, 2026
…e README route (#49) (#53)

* A native Windows path: setup-project.py, a windows-latest job, and the README route (#49)

Brett Heap, 2026-09-05: "what do we do for users that use windows? how do they
use this?" then "file the native windows issue and pick it up". Both entry
points were bash, so #46 could only send Windows users through WSL2; everything
behind them was already Python 3 stdlib shelling out to git and gh only.

setup-project.py is setup.sh's twin, phase for phase: self-bootstrap into a
temporary clone when not inside a checkout (from a file or from stdin),
preflight on the RUNNING interpreter (never a binary called python3; make
never required), the three names via --explain, the dry-run plan, one typed
yes, scaffold, clone where you stand, bootstrap, hand-over. Pure ASCII in
source and output because PowerShell 5.1 re-encodes piped text. abspath, never
resolve(), so 8.3 temp paths compare. A read-only-aware rmtree for the temp
clone. On Windows it clones with core.autocrlf=false, sets it in the clone,
and warns when the global setting is true.

setup.sh is byte-for-byte unchanged; a flag-parity test stands in for one
definition until #50 folds the bash into a shim. write_lf() gives every
write_text in shape_materialize and adopt LF bytes on every platform, so the
sha256 a project pins means the same number everywhere. Remediation strings
derive the interpreter name from sys.executable (digest-pinned templates
change: expected upstream drift). tests.yml gains a windows-latest job on the
full suite (PYTHONUTF8=1, per-invocation core.autocrlf=false and
core.longpaths=true, --basetemp=D:\t); bash-only suites and shebang shims skip
with an os.name == "nt" marker that names why. README: a "Windows, natively"
paragraph with the Invoke-WebRequest + py two-liner; WSL2 stays for the bash
entry points; AGENTS.md gets the same invocation. .gitattributes for the
templates is #51.

534 tests (+38). Green on windows-latest is the acceptance.

Lane: xfactory-2 (xFactory-2)
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Review fixes for the native Windows path (#49)

Adversarial review before opening: a machine with no git reaches the preflight message instead of a traceback (run() maps OSError to 127 and _main refuses first); source_path() uses abspath, never resolve(), so a symlinked entry point still injects --into (the #39 property); bump-leg, adopt and family writers go through write_lf; the checkout: regex tolerates spaces; signal-killed children map to shell status; the autocrlf probe reads the GLOBAL scope as bool and warns with [??], distinct from [!!]; empty-string and both-orders two-name refusals; Ctrl-C prints once; PYTHON names the platform-conventional command; --basetemp uses runner.temp; README names python as the py alternative and states the PowerShell 5.1 encoding mechanism correctly (ASCII for pipes, UTF-16 for >). 539 tests.

Lane: xfactory-2 (xFactory-2)
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* setup-project.py: validate CLI values before they reach git or gh; lower the complexity Sonar flagged (#49)

SonarCloud gate on PR #53: S8705 (values from argv reached subprocess unvalidated) - a local checked_value in the house pattern of scripts/repo_shape.py refuses empty, option-looking (leading -), control-character and out-of-shape values at parse time, with checked_ref for --shape-ref and checked_path for the two directory flags; S6466 - program_version is slice-only; S3776 - parse_args, resolve_org and preflight split into table-driven and per-prerequisite helpers (27/22/19 -> 9/0/1 by a local approximation of the rule); S1192 - file-name literals become constants. Every printed string is byte-identical; 8 new tests.

Lane: xfactory-2 (xFactory-2)
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Windows CI run 1: POSIX pin keys, a path guard that admits drive letters, and a YAML unescape bug (#49)

The first windows-latest run on PR #53 (42 failures, all in the shipped tools): (A) shape_materialize.place() built every contracts/shape-pin.yaml row with str(relative_to()), so on Windows the scaffold WROTE backslash rows and update-shape reported every file but the three at the root as unmapped - root_key() returns the POSIX form, and bump-leg stages and reports workflow paths the same way; (B) SAFE_ARG_RE had no drive colon and no backslash, so --local-remote-dir D:\... was refused - SAFE_PATH_RE admits a drive prefix, backslashes and a space, colon only as a drive letter; the adopt failures were a different bug entirely: repo_shape._scalar unescaped double-quoted YAML with chained str.replace, turning the \\t in D:\\a\\_temp\\t into a TAB on every platform - one left-to-right _unescape() now, and it ships into every project; adopt refuses a drive-letter --source as source-unresolvable instead of reading D: as a gh owner; (C) the bash -n hygiene test skips on Windows, where shutil.which finds the WSL launcher stub, not a bash; (D) family.py prints git paths in POSIX form. 19 Linux-runnable regression tests in tests/test_windows_paths.py, including root_key fed a PureWindowsPath.

Lane: xfactory-2 (xFactory-2)
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* EOF on a confirmation prompt is a place nobody can be asked (#49)

Windows CI run 2, the one failure left: tests/conftest.py run_script never redirected the child stdin, the runner inherited console handle reports isatty() True on Windows, update-shape.py confirm() called input() and died on EOFError with exit 1. update-shape.py and adopt-project.py now treat EOF on the prompt as their own no-terminal refusal (update-unconfirmed / adopt-unconfirmed, exit 2), and run_script passes stdin=DEVNULL unless a caller supplies input= or stdin=, so what a tool does when nobody can be asked is the same on every platform. Two regression tests. 570 tests.

Lane: xfactory-2 (xFactory-2)
Co-Authored-By: Claude Fable 5.1 <[email protected]>

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 5, 2026
…ffold leaves (#54) (#57)

Brett Heap, 2026-09-05: "we have the case for windows only and wsl/linux
users and mac users. we need to make sure it is explained for all. i think we
have nothing so far for mac users" then "go, file the issue and pick it up
after #49 lands". Read against main after #46 and #49, macOS was one line
(`brew install gh`), nothing had ever run on a Mac, the `gh api` one-liner
decoded with a flag BSD base64 does not take, and a first-time user could
neither rehearse the run nor learn what a failure part-way leaves behind.

README § Quick start: the platform block is now Linux / macOS / Windows,
natively / Windows via WSL2. The macOS paragraph names where git, make and
python3 come from (the Xcode Command Line Tools), that Homebrew is its own
install (linked, not pasted) and prints the Apple Silicon PATH line, `brew
install gh`, `brew install git-filter-repo` only for adopting, and that the
stock /bin/bash 3.2 is enough because neither bash entry point uses newer
syntax. `base64 -d` becomes `base64 --decode`. A "Rehearse first, creating
nothing" paragraph documents `--local-remote-dir <dir>` and says exactly which
route still touches the network (the command fetches setup.sh and setup.sh
self-bootstraps; from a checkout nothing does) and that `--org` is only a
string there. An "If it fails part-way" paragraph gives the creation order
(spec, code, root last), that there is no rollback, the refusal of a second
run, `--reuse-empty-repo` as root-only, `gh repo delete` and its scope, and
`internal` as Enterprise Cloud only — each sentence checked against
scaffold-project.py, shape_materialize.py and setup.sh.

tests.yml gains a `tests-macos` job on macos-latest mirroring the Linux job
(same action shas, same pins, same per-invocation identity), plus a step that
prints /bin/bash --version and runs `/bin/bash -n` on setup.sh and on
openRepoShape separately, because `bash -n a b` parses only `a`. Green on
macos-latest is what "runs on a Mac" means here; there is no Mac on this side.

Adversarial Opus review before opening found four defects, all fixed: the
rehearsal paragraph claimed "no network" of a route that fetches setup.sh and
clones the standard; the failure paragraph attributed the "NOTHING has been
rolled back" line to any failure when only a failed push prints it, and
described a clone-failure message that setup.sh prints only when the target
already exists; the tests.yml comment claimed `bash -n` catches mapfile,
declare -A and local -n, which are runtime builtins, not grammar; and the
macOS prose asserted which bash the runner's /bin/bash is.

README 872 -> 933, cap moved with the rationale beside it. AGENTS.md
unchanged. 570 tests pass on Linux.

Copilot's one review finding on the PR is folded in: the macOS paragraph
now names the exit when the Command Line Tools' python3 is too old (older
Tools shipped 3.8). #58 landed first, so the cap entry reads 881 -> 945 after
#51's; the ruleset refuses a force-push, so the rebase rode as a merge commit.
583 tests pass on Linux; tests, tests-macos and tests-windows green on the
merged head; the macOS runner's /bin/bash is 3.2.57 and parsed both entry
points.

Lane: xfactory-2 (xFactory-2)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
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.

README: a first-time user cannot find how to install gh, and the simplest start command is below the fold

2 participants