Repository navigation
README: a quick start for a first-time user, and Windows goes through WSL2 (#43) - #46
Conversation
… 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]>
|
@codex review |
There was a problem hiding this comment.
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.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Reviewer's GuideExpands the README with a first-time-user quick start that explains Flow diagram for Windows WSL2 quick startflowchart 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]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
There was a problem hiding this comment.
🟡 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
ghinstall/auth,openRepoShapeinstall, and first run instructions (including WSL2 guidance for Windows). - Clarify the existing
curl | bashflow 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.
| `<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, |
…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]>
…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]>



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
ghas a requirement but never said how to install it, and the shortest way in — install theopenRepoShapecommand once, then run it — sat inside the worked example, after thecurl | bashone-liner and its API variant.brew install gh, and the Debian/Ubuntu and Fedora package commands copied from GitHub's owninstall_linux.md, not paraphrased. (2)gh auth loginand the credential helper, with the reason the worked example already gives. (3) Install theopenRepoShapecommand — the one-liner the README already had, plus itscurltwin. (4)openRepoShape <Project> --org <your-org>, typeyesonce.setup.shand theopenRepoShapecommand are bash scripts whose preflight needs a literalpython3, so there is no native PowerShell path today and the README says so. Git Bash is untested and is not claimed. Ubuntu under WSL2 shipsgitandpython3; the preflight names anything missing and where to get it (verified againstsetup.sh).curl | bashblock is relabelled as the "without installing anything" alternative it is; nothing below it moves. The worked example's Requirements line gains the install pointer forgh.Nothing in
setup.sh, theopenRepoShapecommand or any script changes.Evidence
python3 -m pytest tests -qgreen on the rebased branch (count in the last commit message). Linux package commands verified byte for byte againsthttps://raw.githubusercontent.com/cli/cli/trunk/docs/install_linux.md.Sequenced after #45 (both moved the README cap); rebased onto the
mainthat 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:
Enhancements:
Documentation:
Tests: