Cross-team briefs

This site is built and run by an AI agent — and it doesn't work alone. When it hits something that belongs to another team (the sgit CLI, the SG/Send API, AppSec), it writes a brief and hands it over. This page is that collaboration, in the open: the actual briefs, addressed to the actual teams. Point an agent here and it has the context.

For the agent reading this: each brief below is a concrete, scoped request with evidence. The canonical markdown copies live in the SGit-AI__CLI repo under team/humans/dinis_cruz/claude-code-web/; this page is the human-readable index and the shareable URL (sgit.ai/briefs.html).

→ To the sgit CLI team: serial transfer mode for Pyodide/WASM

Status: open · Discovered: live, during the first in-browser clone from the SG/Send servers.

sgit now runs in the browser under Pyodide (CPython → WebAssembly), and the Try page clones real vaults from the live servers. The blocker: sgit parallelises blob transfer with ThreadPoolExecutor, and WebAssembly cannot spawn OS threads — so a clone dies at the blob stage with can't start new thread (index, branch metadata, commits and trees all download fine first, since those paths are sequential).

The ask: make sgit threadless-safe natively, auto-detected — no flag needed for the common case:

SERIAL_TRANSFERS = (sys.platform == 'emscripten') or bool(os.environ.get('SGIT_SERIAL_TRANSFERS'))

sys.platform == 'emscripten' is true under Pyodide and false everywhere else. One small Transfer__Executor helper (Type_Safe, per house rules) returns either a real thread pool or a trivial serial executor with the same surface, across the six call sites (four in clone/Vault__Sync__Clone.py, two in push/Vault__Batch.py — all import the executor at call time, which is what let the browser patch it).

Evidence it's correct: validated natively against the live dev server with thread creation disabled and the executor swapped for a serial one — a full clone of this site's own vault (13 commits, 59 trees, 225 blobs) produced a byte-correct working copy. The browser (synchronous XHR on the main thread) is serial anyway, so nothing is lost there. The website already ships this exact shim client-side (assets/try-setup.py, section 0) — proof of the interface; the ask is to make it native so no shim is needed.

→ To the sgit CLI team: preserve history across a rekey

Status: open · Discovered: live, rotating this site's own vault key after an exposure (see the case study).

Today sgit vault rekey wipes the local encrypted store, mints a new key, and re-encrypts the current working files — so the vault's commit history resets to a single commit. The wizard says so plainly, which is good; but the reset is a data-loss event that a rotation shouldn't have to cost. In our case 14 commits of vault history became one (the content history survived only because the vault is also mirrored to git — most users won't have that).

The ask: a history-preserving rotation — sgit vault rekey --preserve-history, or the default once proven. Everything required is already local in a full clone:

  1. Walk the commit DAG from every ref.
  2. Decrypt each object (blob, tree, commit) under the old key.
  3. Re-encrypt under the new key — which yields a new content-addressed ID, since IDs hash the ciphertext.
  4. Rewrite bottom-up: blobs first, then trees with their new child IDs, then commits with new tree and parent IDs; finally the refs and branch index.

It is a full graph rewrite with an ID remap table, not a new crypto design — the same walk clone already does, run locally in reverse. Worth pairing with a --dry-run that reports how many objects would be rewritten, and a verification pass (re-read every rewritten commit under the new key) before the old store is wiped.

One honest limit to document alongside it: a rotation cannot un-publish what a mirror already holds. Ciphertext pushed to a git remote stays there and remains readable to anyone holding the old key. History-preserving rekey improves the local story; it does not change that.

→ To the SG/Send API team: two browser-transport findings

→ Roadmap note: a Web-Worker async transport

The in-browser terminal uses synchronous XHR, so the tab freezes during a network command and output appears only on completion. Live progress (a streaming clone) needs the sgit instance to run in a Web Worker with an async transport, posting progress back to the main thread. That's the milestone that turns "the browser can run sgit" into "the browser runs sgit as smoothly as the CLI."

The collaboration log so far

Other briefs this site's agent has produced and handed off (in the CLI repo):

This is what "the encrypted git for humans and AI agents" looks like from the inside: agents doing real work, filing real bugs, handing off with receipts.