toga-ai 1.0.170 → 1.0.172
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.
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: session
|
|
3
|
+
slug: team-shared-sessions
|
|
4
|
+
title: Team-shared sessions + skill discovery
|
|
5
|
+
author: jcardinal
|
|
6
|
+
repos: [_underscore]
|
|
7
|
+
framework: "2.0"
|
|
8
|
+
client: shared
|
|
9
|
+
status: active
|
|
10
|
+
created: 2026-06-23
|
|
11
|
+
updated: 2026-06-23
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Session: team-shared-sessions
|
|
15
|
+
**Date:** 2026-06-23
|
|
16
|
+
**Project/Repo:** toga-tech harness (team `claude` repo) — not an application repo
|
|
17
|
+
**Task:** Make /session-save and /session-resume store sessions in the team knowledge repo (knowledge/sessions/) so one developer can save an in-progress session and another can resume it, with automatic push/pull, a way to list sessions, and manual delete of stale ones — plus a /team-skills discovery skill.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## What WORKED
|
|
22
|
+
- Added five subcommands to `knowledge.js` (committed to `_main`, `44f740d`): `session-save`, `session-list`, `session-show`, `session-delete`, `skills`. Verified: `node -c knowledge.js` passes; `skills --installed=d:/WWW/.claude/skills` correctly flags `worker2-action` as local-only; `session-list` empty + populated both render.
|
|
23
|
+
- Key design win confirmed during exploration: `knowledge/sessions/` rides the existing `publish` git rails for free, AND `allDocs()` only walks `1.0/ 2.0/ standalone/ clients/`, so `validate`/`index` ignore `sessions/` with zero exemption code. `node knowledge.js validate` → "OK (24 repos)" with a session file present.
|
|
24
|
+
- `session-list`/`show`/`delete` read from `origin/<branch>` via `git ls-tree`/`git show` after a `git fetch` — shows teammates' pushed sessions without touching the working tree. Verified working-tree fallback when origin has none.
|
|
25
|
+
- All three `session-save` guard paths reject BEFORE any push: outside-dir → `ABORT_OUTSIDE_SESSIONS`; missing keys → `INVALID — missing frontmatter: ...`; planted `AKIA...` key → `SECRET — line N: AWS access key id`.
|
|
26
|
+
- Rewrote `skills/session-save/SKILL.md` (team-by-default + local fallback) and `skills/session-resume/SKILL.md` (fetch-first; `latest`/`<slug-or-id>`/`list`/`delete <id>`; briefing names the author).
|
|
27
|
+
- Created `skills/team-skills/SKILL.md` (read-only discovery; pairs with `/sync-team-skills`).
|
|
28
|
+
- Updated `scripts/hooks/session-start.js`: time-boxed (3500ms) `teamSessions()` peek that prints available team sessions; fails silent offline. `node -c` passes; runs clean (silent when no sessions — correct).
|
|
29
|
+
- Documented `type: session` + `knowledge/sessions/` in `knowledge/CONVENTIONS.md`.
|
|
30
|
+
- Synced all skills to `d:\WWW\.claude\skills` via `node sync-skills.js d:/WWW` (9 skills incl. team-skills) and copied the updated hook locally.
|
|
31
|
+
- Committed only the 6 intended files + new `team-skills/` to `_main` and pushed (had to `git stash push -- CLAUDE.md` first because of a pre-existing unstaged CLAUDE.md edit; popped it back after).
|
|
32
|
+
|
|
33
|
+
## What did NOT work — DO NOT RETRY THESE
|
|
34
|
+
- `git rebase origin/_main` failed with `error: cannot rebase: You have unstaged changes` because `CLAUDE.md` had a PRE-EXISTING (not-ours) modification in the team repo working tree. FIX that worked: `git stash push -- CLAUDE.md`, rebase+push, then `git stash pop`. Do NOT commit CLAUDE.md to "fix" this — that edit is not ours.
|
|
35
|
+
- Do NOT treat `toga-tech/.claude/skills/` as the source of truth — it is untracked/gitignored (a local install). The COMMITTED source is the root-level `skills/`, `knowledge.js`, `sync-skills.js`, `scripts/hooks/`. Editing `.claude/` copies would not ship.
|
|
36
|
+
|
|
37
|
+
## Not tried yet (candidates for next session)
|
|
38
|
+
- Optional: `knowledge.js skills --write-readme` (or fold into `sync-skills.js`) to regenerate the stale README skill table from frontmatter automatically. Explicitly deferred this session.
|
|
39
|
+
- End-to-end cross-developer resume has only been simulated locally (origin had no sessions during testing). Once this very session file is pushed, verify `/session-resume team-shared-sessions` from a fresh clone / another machine.
|
|
40
|
+
- `session-list` does a network `git fetch` (6s timeout) on every call; the startup hook bounds it to 3.5s. Consider a `--no-fetch` fast path for the hook if startup latency is felt in practice.
|
|
41
|
+
|
|
42
|
+
## Current file state
|
|
43
|
+
| File | Status | Notes |
|
|
44
|
+
|------|--------|-------|
|
|
45
|
+
| toga-tech/knowledge.js | Modified, committed `44f740d` | +session-* and skills subcommands, shared `pushStaged()` helper |
|
|
46
|
+
| toga-tech/skills/session-save/SKILL.md | Modified, committed | team-by-default save + push, local fallback |
|
|
47
|
+
| toga-tech/skills/session-resume/SKILL.md | Modified, committed | fetch-first; latest/slug/list/delete; author in briefing |
|
|
48
|
+
| toga-tech/skills/team-skills/SKILL.md | Created, committed | new discovery skill |
|
|
49
|
+
| toga-tech/scripts/hooks/session-start.js | Modified, committed | team-session startup peek |
|
|
50
|
+
| toga-tech/knowledge/CONVENTIONS.md | Modified, committed | type: session schema + sessions/ layout |
|
|
51
|
+
| d:/WWW/.claude/skills/* + hooks/toga/session-start.js | Synced locally | for immediate local use (gitignored install) |
|
|
52
|
+
| toga-tech/CLAUDE.md | Pre-existing unstaged edit (NOT ours) | left untouched; was stashed/popped during push |
|
|
53
|
+
|
|
54
|
+
## Decisions made
|
|
55
|
+
- Store sessions under `knowledge/sessions/` (not a new top-level dir) — reuses `publish` staging + `npx toga-ai` distribution with no new git plumbing. Rejected: separate branch per session (merge complexity), separate sync mechanism.
|
|
56
|
+
- One file per session named `YYYY-MM-DD-<slug>-<author>.md` — author suffix prevents slug collisions between developers.
|
|
57
|
+
- Team-by-default save; local `~/.claude/session-data` only as offline/no-clone fallback. (User decision.)
|
|
58
|
+
- Cleanup = manual delete + age flagging (`STALE` > 14 days); no auto-deletion. (User decision.)
|
|
59
|
+
- SessionStart hook surfaces team sessions with a timeout-guarded fetch. (User decision.)
|
|
60
|
+
- Sessions are NOT knowledge docs: they get their own lightweight frontmatter + secret scan in `session-save`, and are deliberately excluded from `validate`/`index` (free, via `allDocs()` scope).
|
|
61
|
+
|
|
62
|
+
## Blockers
|
|
63
|
+
none
|
|
64
|
+
|
|
65
|
+
## Exact next step
|
|
66
|
+
> From a fresh clone or another machine, run `/session-resume team-shared-sessions` and confirm it fetches and renders this session's briefing — the real cross-developer round-trip that was only simulated locally this session.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
_Saved by /session-save on 2026-06-23_
|
package/package.json
CHANGED
|
@@ -47,7 +47,12 @@ to change the threshold. If it prints "No team sessions saved yet.", say so and
|
|
|
47
47
|
No team sessions saved yet. Save one at the end of your work: /session-save [name]
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
Whenever you render this table to the developer (in `list` mode **and** in the
|
|
51
|
+
no-argument discovery flow), explicitly disclose that delete is available — e.g. a
|
|
52
|
+
trailing line: "To retire a stale session, run `/session-resume delete <id>`." A
|
|
53
|
+
developer must never have to already know the command to discover it.
|
|
54
|
+
|
|
55
|
+
**`list` mode:** render this table (with the delete disclosure) and stop here.
|
|
51
56
|
|
|
52
57
|
**`delete <id>` mode:** confirm with the developer, then run
|
|
53
58
|
`node "<TEAM_REPO>/knowledge.js" session-delete <id> --msg="session: retire <id>"`,
|
|
@@ -61,7 +66,8 @@ report the `SESSION: DELETED|NOT_FOUND|CONFLICT` result, and stop.
|
|
|
61
66
|
- `<slug-or-id>` → the row whose id equals it or contains the slug. If several match
|
|
62
67
|
(same slug, different authors/dates), show those candidates (date + author) and ask which.
|
|
63
68
|
- If none match: "No session found matching '<x>'. Available: [list ids]."
|
|
64
|
-
- No argument → ask: "Which session should I load? (id or slug
|
|
69
|
+
- No argument → ask: "Which session should I load? (id or slug — or `delete <id>` to
|
|
70
|
+
retire a stale one)"
|
|
65
71
|
|
|
66
72
|
---
|
|
67
73
|
|