toga-ai 1.0.979 → 1.0.981

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.
@@ -287,7 +287,6 @@
287
287
  ],
288
288
  "ask": [
289
289
  "mcp__clickup__clickup_update_task",
290
- "mcp__clickup__clickup_create_comment",
291
290
  "Bash(git push *)"
292
291
  ],
293
292
  "deny": [
@@ -101,11 +101,22 @@ 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)
117
+ - 2026-10-08 — Claude posts the PM comment and writes PR/commit/KB summaries without asking
118
+ for approval; `clickup_create_comment` removed from permissions.ask. Field changes and
119
+ pushes still ask. (jcardinal)
109
120
 
110
121
  ## Related
111
122
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.979",
3
+ "version": "1.0.981",
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,10 @@ 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`). Claude writes and posts the PM comment,
38
+ PR subject/body, commit notes, and KB summary itself — no approval prompt (secret scan
39
+ still runs). Ticket field changes still need the one approval list; pushes still ask.
36
40
  - `/ship`, `/land-and-deploy` — the commits, pushes, and PRs they describe.
37
41
 
38
42
  Force-pushing is never automatic in any repo, including the knowledge repo.
@@ -92,6 +96,10 @@ git -C <repo> log -1 --format="%h %ad %s" --date=short -- <file>
92
96
  - For push state, check `git -C <repo> status -sb` (ahead/behind) — do not assume.
93
97
  - If Claude did not check, it says **nothing** about commit or push state. No habit reminders
94
98
  like "still not committed" at the end of a summary.
99
+ - **Branch state too.** Never say a repo is "on branch X" or "on the wrong branch" from memory
100
+ or an earlier check. Run `git -C <repo> branch --show-current` (or `start-helper.js
101
+ branch-check`) fresh in the same turn first. When the developer says they switched, re-check
102
+ before you answer.
95
103
 
96
104
  ## Branch protection
97
105
 
@@ -436,7 +436,10 @@ const RETIRED_TOGA_HOOKS = ['kickoff-gate.js'];
436
436
 
437
437
  // Permission rules the TOGA template once shipped and no longer wants. Only exact TOGA-owned
438
438
  // strings go here — a developer's own rules are never removed.
439
- const RETIRED_TOGA_PERMISSIONS = { ask: ['mcp__clickup__clickup_create_task_comment'] };
439
+ const RETIRED_TOGA_PERMISSIONS = { ask: [
440
+ 'mcp__clickup__clickup_create_task_comment',
441
+ 'mcp__clickup__clickup_create_comment',
442
+ ] };
440
443
 
441
444
  function mergeSettings(claudeDir, sourceDir) {
442
445
  const templatePath = path.join(sourceDir, '.claude', 'settings.json');
@@ -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:
@@ -9,7 +9,11 @@ Order: **Part 1** KB capture (always) → **Part 2** ticket field check (always,
9
9
  a ticket) → **Part 3** "Is this ticket finished?" → push, PRs, PM comment, status.
10
10
 
11
11
  Keep the main thread lean: the KB write pipeline runs in the `session-capture` subagent, and
12
- ClickUp reads run in the `ticket-reader` subagent. The main thread distills, asks, and approves.
12
+ ClickUp reads run in the `ticket-reader` subagent. The main thread distills and asks only for real decisions.
13
+
14
+ Claude writes and posts all summary text itself — PM comment, PR subject and body, commit
15
+ notes, KB capture summary. Never ask the developer to approve that wording. Approvals are only
16
+ for real decisions: ticket field changes (one list), ELEVATED KB docs, and pushes.
13
17
 
14
18
  ## Step 0 — Rules, helpers, session ticket
15
19
 
@@ -31,8 +35,8 @@ Never: force-push, push any other branch, commit source code (that is `/commit`)
31
35
  **Has Code Changes** field (`af9eaba8-d3d3-4769-b8bc-28de78b04570` — worker2 owns it), write
32
36
  "Pseudocode Review" / "Pseudocode Required", touch any other ticket, or use the old read-only
33
37
  `mcp__claude_ai_ClickUP_for_Dev__*` tools. The `start-gate` hook blocks every other ClickUp
34
- write (other tools, other fields, other tickets). Claude Code asks the developer before every
35
- ClickUp write — that prompt is expected; it is the approval gate. `git push` may also ask for
38
+ write (other tools, other fields, other tickets). Claude Code asks before `clickup_update_task`
39
+ (field changes) — that prompt is expected. The PM comment posts without a prompt. `git push` may also ask for
36
40
  permission — that is expected too.
37
41
 
38
42
  **Helpers** (both print JSON):
@@ -322,8 +326,10 @@ comment.
322
326
  development finished)"
323
327
 
324
328
  **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."
329
+ unpushed commit count, and any uncommitted Claude changes from `COMMIT status`. If there are
330
+ uncommitted Claude changes, ask once: "These files aren't committed: <list>. Run /commit for
331
+ them now?" Yes → run the `/commit` skill's steps (same rules as `skills/commit/SKILL.md`).
332
+ Then say: "Run /finish again when the ticket is done."
327
333
 
328
334
  **KB / harness repo work (toga-tech / agilantsolutions/claude, on `_main`):** `knowledge/` was
329
335
  published in Part 1. Other harness files committed with `/commit` are pushed now:
@@ -343,10 +349,15 @@ skip Steps 12–14 and go to Step 15 (PM comment) and Step 16 (status).
343
349
  `origin/<TICKET>` if pushed). This includes commits from other sessions — that is intended.
344
350
  Keep for each: repo path, `owner/repo`, ahead count, pushed or not.
345
351
  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."
352
+ files: ask once — "These files aren't committed: <list>. Run /commit for them now?"
353
+ **Yes** → run the `/commit` skill's steps yourself (same rules as `skills/commit/SKILL.md`:
354
+ only this session's files, the `Claude-Notes: v1` format), then re-run step 1 and continue.
355
+ **No** → stop and say "Run /finish again when they are committed." (Changes outside
356
+ Claude's list, `otherChanged`, are the developer's — mention them, do not block.)
357
+ 3. If `gh auth status` fails, say exactly: "Run `gh auth login` in a terminal, then tell me
358
+ 'done'". When they say done, run `gh auth status` again and continue only if it passes.
359
+ Before saying any repo is on the wrong branch, re-check it fresh in that turn
360
+ (`git -C <repo> branch --show-current`) — never from memory or an earlier check.
350
361
  4. No repo with work → check whether this session committed on another branch. Per repo under
351
362
  the root: `git -C "<repo>" log --all --grep="Claude-Session: <sid>" --format=%h`, then for
352
363
  each hash `git -C "<repo>" branch --contains <hash>`. If any show up, list repo + branch,
@@ -421,7 +432,7 @@ Exit 0 + `{ok:true}` = clean. Exit 1 + `{ok:false, hits:[...]}` = a hit: show th
421
432
  the hit types (it never prints the values), fix the text, and scan again. Exit 2 = the file
422
433
  could not be read — fix the path. Never post until it prints `{ok:true}`.
423
434
 
424
- ## Step 15 — PM comment (developer approves the text first)
435
+ ## Step 15 — PM comment (Claude writes and posts it — no approval)
425
436
 
426
437
  Draft a short comment for the PM and release notes. Plain words, no code dumps, no secrets,
427
438
  no local paths:
@@ -436,15 +447,15 @@ no local paths:
436
447
  **Ticket fields changed by Claude:** <from Step 10 — or "None">
437
448
  ```
438
449
 
439
- Show it; after the developer approves (edit if asked), write the text to a temp file
450
+ Do not ask the developer to approve it. Write the text to a temp file
440
451
  (`toga-comment-<TICKET>.md` in the OS temp dir), run the **Secret scan** on it, delete the
441
- file, then post:
452
+ file. Stop only on a hit. Then post it, and show the posted text in the Step 17 report:
442
453
 
443
454
  ```
444
455
  mcp__clickup__clickup_create_comment
445
456
  entity_type: "task"
446
457
  entity_id: "<internalId>"
447
- comment_text: "<approved markdown, max 40000 characters>"
458
+ comment_text: "<markdown, max 40000 characters>"
448
459
  ```
449
460
 
450
461
  ## Step 16 — Set the status
@@ -465,7 +476,7 @@ Short list:
465
476
  1. KB: publish status (Step 5).
466
477
  2. Ticket fields changed (or "none").
467
478
  3. PRs: one url per repo, and which got `re-review`.
468
- 4. PM comment: posted (yes/no).
479
+ 4. PM comment: posted (yes/no), with the posted text.
469
480
  5. Status: `development finished` (or why not).
470
481
  6. Anything manual the developer must still do — as a numbered list.
471
482
 
@@ -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.