pi-kage 0.3.6 → 0.3.7

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.
Files changed (3) hide show
  1. package/README.md +22 -18
  2. package/bin/kage.mjs +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -8,37 +8,41 @@
8
8
 
9
9
  <p align="center"><img src="./assets/demo.svg" alt="kage demo" width="100%"></p>
10
10
 
11
- `kage` copies your repo into an isolated sibling folder, drops you straight into a **fresh**
12
- [pi](https://github.com/earendil-works) session to work in parallel, and when you're done merges the
13
- clone's new sessions back into the original and dispels the clone.
11
+ `kage` runs multiple AI coding-agent sessions against one repo in parallel. The problem it solves:
12
+ point two agents at the same checkout and they fight over one working tree — editing the same files,
13
+ colliding on branches, tripping over each other's uncommitted changes.
14
+
15
+ Instead of a shared [`git worktree`](https://git-scm.com/docs/git-worktree), kage gives each session
16
+ its own **full copy** of the repo in a sibling folder — its own working tree, its own `.git`. Code
17
+ comes back through git (a PR, or a branch fetch); the agent's session memory comes back through
18
+ `~/.pi`. kage never copies a working tree back onto the origin, so concurrent sessions can't collide.
19
+ And like a real Naruto shadow clone, the clone carries the agent's memory out and returns it on
20
+ dispel (see [How it works](#how-it-works)).
14
21
 
15
22
  ```bash
16
23
  npm install -g pi-kage
17
24
  cd my-app
18
- kage # 🥷 clone ../my-app--kage-<ts>, open a fresh pi (origin history resumable)
25
+ kage # 🥷 clone -> ../my-app--kage-<ts>, open a fresh pi (origin history resumable)
19
26
  # ...work in the clone: commit, push, open a PR, quit pi...
20
27
  kage finish # 💨 merge the clone's new sessions back, delete the clone
21
28
  ```
22
29
 
23
30
  ---
24
31
 
25
- ## The problem
26
-
27
- Running **multiple agent sessions on the same repo at once** is a mess: they edit the same files,
28
- fight over the working tree, and collide on branches. You end up babysitting merge conflicts
29
- instead of shipping.
32
+ ## Why a full copy instead of `git worktree`?
30
33
 
31
- ## The idea
34
+ A worktree is the obvious way to get a second working directory, but every worktree shares the
35
+ repo's single `.git`. For parallel agents that shared `.git` is the problem:
32
36
 
33
- A shadow clone is a **full, independent copy** of the repo like a second engineer on a second
34
- machine. Each parallel session gets its own working tree, branch, commits, and PR. Code merges the
35
- normal way: on GitHub. No local collisions, ever. And like a real Naruto shadow clone, it carries
36
- your memory out and returns it on dispel (see [How it works](#how-it-works)).
37
+ - you can't check out the same branch in two worktrees;
38
+ - stash, refs, config, and the index are shared;
39
+ - a worktree is a clean checkout no `node_modules`, `.env`, `.venv`, or build cache so each one
40
+ needs a full setup pass before the agent can build or run anything.
37
41
 
38
- Why a full folder copy instead of `git worktree`? A worktree shares one `.git`, which means you
39
- can't check out the same branch twice, you share stash/refs, and you get a *fresh* checkout with no
40
- `node_modules` / `.env` / build cache. A real copy avoids all of that. On macOS APFS the copy is a
41
- `cp -c` clonefile (copy-on-write): near-instant and space-free until files diverge.
42
+ A full copy has none of those constraints: independent `.git`, independent branches, and every
43
+ untracked or gitignored file is already in place. The price is disk and copy time which on macOS
44
+ APFS kage avoids with a `cp -c` clonefile (copy-on-write): the clone is near-instant and uses no
45
+ extra space until files actually diverge. Non-reflink filesystems fall back to a full recursive copy.
42
46
 
43
47
  ## Install
44
48
 
package/bin/kage.mjs CHANGED
@@ -28,7 +28,7 @@ import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, wri
28
28
  import { homedir } from "node:os";
29
29
  import { basename, dirname, join, resolve, sep } from "node:path";
30
30
  import readline from "node:readline";
31
- const VERSION = "0.3.6"; // keep in sync with package.json (enforced by test)
31
+ const VERSION = "0.3.7"; // keep in sync with package.json (enforced by test)
32
32
  const MARKER = ".kage.json";
33
33
  const SESSIONS = process.env.KAGE_SESSIONS_DIR || join(homedir(), ".pi", "agent", "sessions");
34
34
  const RECENT_SESSIONS = 5; // how many of the origin's most-recent sessions to copy into a clone
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-kage",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "🥷 Shadow Clone Jutsu for your git repo: copy it into an isolated folder, work in parallel with pi, then merge the session memory back",
5
5
  "keywords": [
6
6
  "pi",