Guide the git board through Save, Share, Review and Tidy, with the other actions folded away

AI Assisted
This commit is contained in:
jparkerweb committed 2026-11-18 06:39:22 -08:00
1 parent e6d5075101
commit 326262df5a
11 files changed
+566 -177

No files matched your search

+1 -1
View File
@@ -94,7 +94,7 @@ In the terminal the same stops are asked in prose, with the diff printed.
1. **State.** Run `state`. Exit 3 → 1b. `inProgress` or `conflicted` → say what is in progress and go to Conflict help.
1b. **Not a repository.** Run `init-check`. `safe: false` → explain (inside another repository, the home folder or a drive root) and stop. `safe` → ask before `git init`, naming the folder and its first branch (`branch`, `main` unless `init.defaultBranch` says otherwise). On yes run `commands` in order (never a bare `git init`, which may start on `master`). If `hasGitignore` is false and `suggestedIgnore` is not empty, propose that `.gitignore` for approval, write it, then continue at 4 (the first commit; no push offer later because there is no remote; say it can be added with `git remote add origin <url>`).
2. **Nothing to commit.** If `push` is not null, go to 7. Otherwise say the tree is clean and everything is pushed (or that there is no remote), and stop.
3. **Branch.** On the board, skip this: the page's **You're on main** line already offered it, and its answer arrives as `create` with `then: "commit"`. In the terminal, when `onDefault` (or `detached`) and `hasCommits`, offer one drafted branch name `<type>/<short-description>` (types: feature, fix, chore, docs, refactor, test; `feature/export-csv`). Run any name the person types through `branch-check`, then `plan create`. Skipping is always fine (on a detached HEAD, warn that commits there are easy to lose). When `defaultBranch` is null say why there is no offer.
3. **Branch.** On the board, skip this: the Save step's **Start a branch and commit** already offered it, and its answer arrives as `create` with `then: "commit"`. In the terminal, when `onDefault` (or `detached`) and `hasCommits`, offer one drafted branch name `<type>/<short-description>` (types: feature, fix, chore, docs, refactor, test; `feature/export-csv`). Run any name the person types through `branch-check`, then `plan create`. Skipping is always fine (on a detached HEAD, warn that commits there are easy to lose). When `defaultBranch` is null say why there is no offer.
4. **Read the changes.** `git diff`, `git diff --cached` and the untracked files (an `untracked` path ending in `/` is a folder: list its files with `git ls-files -o --exclude-standard -- <folder>` and stage them by name). If the person staged some files, work from that staged set and leave the rest alone (say what was left). On the board, only the paths the action named, or every changed file on a hand-off. Decide whether the work is one concern or several.
5. **Message.** One concern: draft a subject, or use the argument and skip approval; ask **Yes** / **Edit** / **No**. Several: always suggest whole-file groups, each with a subject, naming any file that mixes concerns and which group took it; ask **Approve** / **Change it** / **One commit instead** (asked even when the subject came as the argument). Name the `sensitive` and `large` files you are leaving out.
6. **Commit.** For each group in order: with more than one group, run `git reset -q` first so only that group is staged; then run `commit-msg.mjs --subject "<s>" --files <a> --files <b>` (`--files` once per path) and its `command` (or `add`, then `commit`). Finish with `git log --oneline -<n>`. On the console post `run: { "event": "git-commits", "id": "<first short hash>", "commits": <n> }` with the `reread` and a `git-result` line naming the hashes with `op: "commit"`, so the board lights Push.