toga-ai 1.0.15 → 1.0.16

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.15",
3
+ "version": "1.0.16",
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",
@@ -657,6 +657,9 @@ function main() {
657
657
  const action = updateClaudeMd(projectRoot, skillNames, harnessDir, 'npm bundle v' + bundleVersion);
658
658
  console.log(' ✓ CLAUDE.md ' + action);
659
659
 
660
+ // Write version marker so /kickoff can detect stale installs
661
+ try { fs.writeFileSync(path.join(claudeDir, 'toga-ai.version'), bundleVersion, 'utf8'); } catch (e) {}
662
+
660
663
  // ECC global integration — detect and report
661
664
  const eccPath = detectEcc();
662
665
  if (eccPath) {
@@ -5,6 +5,35 @@ description: Start-of-session context loader for TOGA Technology projects. Run t
5
5
 
6
6
  # Kickoff — prime a coding session from the team knowledge base
7
7
 
8
+ ## Step 0 — Auto-update check (runs before anything else)
9
+
10
+ Before loading any context, check whether the installed harness is up to date:
11
+
12
+ ```bash
13
+ INSTALLED=$(cat .claude/toga-ai.version 2>/dev/null || echo "unknown")
14
+ LATEST=$(node -e "const {execSync}=require('child_process');try{process.stdout.write(execSync('npm view toga-ai version',{timeout:5000}).toString().trim())}catch{process.stdout.write('unknown')}" 2>/dev/null)
15
+ ```
16
+
17
+ **If `INSTALLED` is `unknown`** — version file missing (project not yet installed). Skip and continue to Step 1.
18
+
19
+ **If `LATEST` is `unknown`** — npm unreachable (offline/timeout). Skip silently and continue to Step 1.
20
+
21
+ **If `INSTALLED` equals `LATEST`** — already up to date. Continue to Step 1.
22
+
23
+ **If `INSTALLED` differs from `LATEST`** — auto-upgrade now, then continue:
24
+
25
+ ```bash
26
+ npx toga-ai@latest
27
+ ```
28
+
29
+ Tell the developer:
30
+ > "Updated toga-ai from v`INSTALLED` → v`LATEST`. Skills, agents, and rules refreshed."
31
+
32
+ If the upgrade fails, warn and continue — a stale install beats a blocked session:
33
+ > "⚠ Auto-update to v`LATEST` failed. Run `npx toga-ai@latest` manually when convenient."
34
+
35
+
36
+
8
37
  Load the right knowledge before the developer starts coding. **Never assume missing
9
38
  facts — ask.** Heuristics may pre-fill a *suggested default* in a question, but record
10
39
  nothing without confirmation.