toga-ai 1.0.979 → 1.0.980

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -101,11 +101,19 @@ All tested 2026-10-08:
101
101
  `_production`, varies) — resolve with `gh repo view <owner/repo> --json defaultBranchRef`.
102
102
  - **The KB repo (`toga-tech`) works on `_main`.** No branch check and no PRs there; `/finish`
103
103
  still does the ticket check.
104
+ - **Re-check the branch, never repeat it.** When the developer says they switched (or before
105
+ repeating any mismatch), run `branch-check` / `git -C <repo> branch --show-current` fresh in
106
+ that turn. Never state a branch from memory or an earlier check.
107
+ - **`/finish` offers to commit.** Uncommitted session files → it asks once "Run /commit for them
108
+ now?"; yes = it runs the `/commit` steps itself, then continues; no = stop. `gh` not logged in
109
+ → "Run `gh auth login` in a terminal, then tell me 'done'", then re-check `gh auth status`.
104
110
 
105
111
  ## Change history
106
112
 
107
113
  - 2026-10-08 — Created: ClickUp-tied sessions (`/start`, `/commit`, `/pseudocode`, `/finish`)
108
114
  replace `/kickoff`, `/capture`, `/plan-ticket`, `/work-ticket`, `/rework-ticket`. (jcardinal)
115
+ - 2026-10-08 — Branch claims always re-checked fresh; `/finish` runs `/commit` on yes and
116
+ guides `gh auth login`. (jcardinal)
109
117
 
110
118
  ## Related
111
119
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.979",
3
+ "version": "1.0.980",
4
4
  "description": "TOGA Technology Team Claude Knowledge System — shared AI coding harness with skills, knowledge base CLI, and project installer for Claude Code.",
5
5
  "keywords": [
6
6
  "claude",
@@ -33,6 +33,8 @@ describes. It does not authorize publishing anything else in the session.
33
33
 
34
34
  - `/commit` — local commits of only the files this session changed. Never pushes.
35
35
  - `/finish` — the KB push to `_main`, the ticket-branch pushes, the PRs, and the ticket writes.
36
+ If this session's files are uncommitted, `/finish` asks once and, on "yes", runs the
37
+ `/commit` steps itself (same rules as `/commit`).
36
38
  - `/ship`, `/land-and-deploy` — the commits, pushes, and PRs they describe.
37
39
 
38
40
  Force-pushing is never automatic in any repo, including the knowledge repo.
@@ -92,6 +94,10 @@ git -C <repo> log -1 --format="%h %ad %s" --date=short -- <file>
92
94
  - For push state, check `git -C <repo> status -sb` (ahead/behind) — do not assume.
93
95
  - If Claude did not check, it says **nothing** about commit or push state. No habit reminders
94
96
  like "still not committed" at the end of a summary.
97
+ - **Branch state too.** Never say a repo is "on branch X" or "on the wrong branch" from memory
98
+ or an earlier check. Run `git -C <repo> branch --show-current` (or `start-helper.js
99
+ branch-check`) fresh in the same turn first. When the developer says they switched, re-check
100
+ before you answer.
95
101
 
96
102
  ## Branch protection
97
103
 
@@ -37,7 +37,8 @@ Run `helper status --session=<id>`. For each repo, tell the developer in plain w
37
37
  4. **Branch mismatch:** `branchMismatch` files were last edited on another branch
38
38
  (`entryBranch`). They are NOT in `toCommit`. If the list is not empty, **stop** for that
39
39
  repo: say which files were edited on which branch, and ask the developer to switch
40
- branches themselves.
40
+ branches themselves. When they say they switched, run `status` again fresh in that turn
41
+ and report only what it shows now — never repeat a mismatch from memory.
41
42
  5. **Possibly yours from before a resume:** list `sameBranchOtherSessions` (time, file count).
42
43
  If the developer says one is theirs, run `status` with that id too and merge the lists.
43
44
  6. **Ticket:** use the repo's `ticket`. `ticketSource` says where it came from:
@@ -322,8 +322,10 @@ comment.
322
322
  development finished)"
323
323
 
324
324
  **No** → stop. Report what is left local: for each repo from `START repos-with-work`, the
325
- unpushed commit count, and any uncommitted Claude changes from `COMMIT status`. Say:
326
- "Run /finish again when the ticket is done."
325
+ unpushed commit count, and any uncommitted Claude changes from `COMMIT status`. If there are
326
+ uncommitted Claude changes, ask once: "These files aren't committed: <list>. Run /commit for
327
+ them now?" Yes → run the `/commit` skill's steps (same rules as `skills/commit/SKILL.md`).
328
+ Then say: "Run /finish again when the ticket is done."
327
329
 
328
330
  **KB / harness repo work (toga-tech / agilantsolutions/claude, on `_main`):** `knowledge/` was
329
331
  published in Part 1. Other harness files committed with `/commit` are pushed now:
@@ -343,10 +345,15 @@ skip Steps 12–14 and go to Step 15 (PM comment) and Step 16 (status).
343
345
  `origin/<TICKET>` if pushed). This includes commits from other sessions — that is intended.
344
346
  Keep for each: repo path, `owner/repo`, ahead count, pushed or not.
345
347
  2. `COMMIT status --session=<sid> --root="$CLAUDE_PROJECT_DIR"`. If any repo has `toCommit`
346
- files: stop and say "There are uncommitted changes from this session in `<repo>`. Run
347
- /commit first, then /finish again." (Changes outside Claude's list, `otherChanged`, are the
348
- developer's — mention them, do not block.)
349
- 3. If `gh auth status` fails: stop and say "Run `gh auth login`, then /finish again."
348
+ files: ask once — "These files aren't committed: <list>. Run /commit for them now?"
349
+ **Yes** → run the `/commit` skill's steps yourself (same rules as `skills/commit/SKILL.md`:
350
+ only this session's files, the `Claude-Notes: v1` format), then re-run step 1 and continue.
351
+ **No** → stop and say "Run /finish again when they are committed." (Changes outside
352
+ Claude's list, `otherChanged`, are the developer's — mention them, do not block.)
353
+ 3. If `gh auth status` fails, say exactly: "Run `gh auth login` in a terminal, then tell me
354
+ 'done'". When they say done, run `gh auth status` again and continue only if it passes.
355
+ Before saying any repo is on the wrong branch, re-check it fresh in that turn
356
+ (`git -C <repo> branch --show-current`) — never from memory or an earlier check.
350
357
  4. No repo with work → check whether this session committed on another branch. Per repo under
351
358
  the root: `git -C "<repo>" log --all --grep="Claude-Session: <sid>" --format=%h`, then for
352
359
  each hash `git -C "<repo>" branch --contains <hash>`. If any show up, list repo + branch,
@@ -112,6 +112,10 @@ explicit "continue anyway":
112
112
  node ".../start-helper.js" override-branch --session <sid>
113
113
  ```
114
114
 
115
+ **Re-check, never repeat.** When the developer says they switched — or before you repeat any
116
+ mismatch — run `branch-check` again, fresh, in that same turn. Report only what it shows now.
117
+ Never state a repo's branch from memory or from an earlier check.
118
+
115
119
  ## Step 5 — GitHub login (warn only)
116
120
 
117
121
  Run `gh auth status`. If not logged in, say: "Run `gh auth login` before /finish." Keep going.