toga-ai 1.0.26 → 1.0.28

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
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",
@@ -138,6 +138,13 @@ Skip mirror-back if the paths are the same directory.
138
138
 
139
139
  ## Step 7 — Push (only when IS_GIT_CLONE is true)
140
140
 
141
+ **This push is pre-authorized and mandatory — never ask the developer to confirm it.**
142
+ Running `/capture` IS the authorization to publish. After validate + index pass and the
143
+ staged set is confined to `knowledge/`, commit and push automatically as the final step of
144
+ every capture. Do not pause, do not present a "ready to push?" prompt, do not offer to "leave
145
+ it staged locally." The only reasons to stop are the guardrails already listed below: nothing
146
+ new to push (Check B empty), files staged outside `knowledge/`, or a push that errors.
147
+
141
148
  If `IS_GIT_CLONE` is false — skip this step entirely and show:
142
149
  > "⚠ Docs written to `.claude/knowledge/` only (no git clone). Run `npx toga-ai`
143
150
  > to create `~/toga-tech`, then re-run /capture to push."
@@ -156,17 +163,40 @@ git -C "<TEAM_REPO>" status --short knowledge/
156
163
  ```
157
164
  If empty — report "No new knowledge to push" and exit cleanly.
158
165
 
159
- **Push:**
166
+ **Commit:**
160
167
  ```bash
161
168
  git -C "<TEAM_REPO>" add knowledge/
162
169
  git -C "<TEAM_REPO>" diff --cached --quiet || \
163
170
  git -C "<TEAM_REPO>" commit -m "knowledge: <one-line summary>"
164
- git -C "<TEAM_REPO>" push origin HEAD:feature/ai-harness-improvements
165
171
  ```
166
172
 
167
173
  Never stage files outside `knowledge/`. If `git diff --cached` includes anything outside
168
174
  `knowledge/`, abort and warn before committing.
169
175
 
176
+ **Sync, then push (rebase BEFORE pushing — this prevents the version-bump conflict):**
177
+
178
+ Every push to this branch triggers a CI job that commits a `chore: bump version [skip ci]`
179
+ back to the branch. So after *any* prior push (e.g. an earlier capture in the same session),
180
+ your local branch is one commit behind the remote, and a naive push is rejected as a
181
+ non-fast-forward. Rebase your fresh commit onto the remote **before** pushing — this pulls in
182
+ commits that already exist (no waiting on CI), so the push fast-forwards cleanly:
183
+
184
+ ```bash
185
+ git -C "<TEAM_REPO>" fetch origin
186
+ git -C "<TEAM_REPO>" rebase origin/feature/ai-harness-improvements
187
+ git -C "<TEAM_REPO>" push origin HEAD:feature/ai-harness-improvements
188
+ ```
189
+
190
+ > **Do NOT "pull after push" instead** — the bump commit for *this* push is created
191
+ > asynchronously by CI a few seconds later, so pulling immediately afterward races CI and
192
+ > usually grabs nothing. Rebasing *before* the push is what reliably avoids the conflict,
193
+ > with zero dependency on npm build/publish timing.
194
+
195
+ **If the push is still rejected** (a bump commit landed in the brief window between your
196
+ rebase and push), simply repeat `fetch` → `rebase` → `push`, up to 2 more times. This is an
197
+ expected occasional race, not an error — do not report it as a failure unless all retries are
198
+ exhausted.
199
+
170
200
  **If push succeeds:**
171
201
  > "✓ Pushed to `feature/ai-harness-improvements` — CI publishes new npm version. Teammates get it on `npx toga-ai`."
172
202