@sma1lboy/kobe 0.5.22 → 0.5.25
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/README.md +104 -7
- package/dist/cli/index.js +32505 -23905
- package/dist/share/skills/kobe/SKILL.md +109 -0
- package/package.json +3 -3
- package/dist/bin/kobed.js +0 -8286
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kobe
|
|
3
|
+
description: Spawn and coordinate parallel coding tasks via the kobe TUI from your shell. Use when the user asks to "try N approaches in parallel", "fan out", "compare implementations side-by-side", or "split this into subtasks". One task per attempt, each gets its own git worktree and its own agent session.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# kobe — parallel coding tasks from your shell
|
|
7
|
+
|
|
8
|
+
kobe is a local terminal UI that runs many AI coding sessions at once.
|
|
9
|
+
Each task lives in its own git worktree with its own agent session.
|
|
10
|
+
When the user asks for parallel exploration, fan out by spawning kobe
|
|
11
|
+
tasks instead of doing N attempts sequentially in one chat.
|
|
12
|
+
|
|
13
|
+
The daemon must already be running. The TUI auto-starts it; if not, run
|
|
14
|
+
`kobe daemon start` once.
|
|
15
|
+
|
|
16
|
+
## Triggers — fire fan-out when the user says
|
|
17
|
+
|
|
18
|
+
- "try N approaches in parallel", "并行试 N 个"
|
|
19
|
+
- "fan out", "split this into subtasks"
|
|
20
|
+
- "compare X and Y side-by-side"
|
|
21
|
+
- "explore a few different ways to..."
|
|
22
|
+
- explicit count: "spin up 3 tasks for..."
|
|
23
|
+
|
|
24
|
+
Single ambiguous tasks → no fan-out. Just do them in your own chat.
|
|
25
|
+
|
|
26
|
+
## How — the five verbs
|
|
27
|
+
|
|
28
|
+
Each verb is a one-shot shell command. Reads stdin: none. Writes a JSON
|
|
29
|
+
object to stdout, exits 0. On error, writes
|
|
30
|
+
`{"error":{"message":"...","code":"..."}}` to stderr and exits non-zero.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Spawn a new task. Returns task JSON; read `.taskId`.
|
|
34
|
+
kobe api spawn-task --repo $PWD --prompt "<scoped prompt>" [--title T] [--base-branch B]
|
|
35
|
+
|
|
36
|
+
# Create an extra chat tab on an existing task.
|
|
37
|
+
kobe api create-tab --task-id <id> [--title T]
|
|
38
|
+
|
|
39
|
+
# Send a follow-up prompt to a task (resumes the agent session).
|
|
40
|
+
kobe api send --task-id <id> --prompt "<text>" [--tab-id TID]
|
|
41
|
+
|
|
42
|
+
# Read a task's current state (status, branch, worktree, tabs).
|
|
43
|
+
kobe api get-task --task-id <id>
|
|
44
|
+
|
|
45
|
+
# Read a single tab off a task.
|
|
46
|
+
kobe api get-tab --task-id <id> --tab-id <tab-id>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Add `--pretty` to any verb to pretty-print stdout for inspection.
|
|
50
|
+
Output to stdout is always one JSON object terminated with `\n`.
|
|
51
|
+
|
|
52
|
+
## Workflow — fan-out + report back
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# 1. Spawn 3 parallel attempts. Cap at 3-4.
|
|
56
|
+
T1=$(kobe api spawn-task --repo "$PWD" --prompt "Approach A: use a state machine" | jq -r .taskId)
|
|
57
|
+
T2=$(kobe api spawn-task --repo "$PWD" --prompt "Approach B: use event sourcing" | jq -r .taskId)
|
|
58
|
+
T3=$(kobe api spawn-task --repo "$PWD" --prompt "Approach C: use a reducer pattern" | jq -r .taskId)
|
|
59
|
+
|
|
60
|
+
# 2. Tell the user what you spawned so the sidebar reads back correctly.
|
|
61
|
+
echo "Spawned three tasks: $T1 (state machine), $T2 (event sourcing), $T3 (reducer)"
|
|
62
|
+
|
|
63
|
+
# 3. Poll until each is idle. Don't tight-loop; sleep 5-15s between checks.
|
|
64
|
+
for ID in $T1 $T2 $T3; do
|
|
65
|
+
while true; do
|
|
66
|
+
STATUS=$(kobe api get-task --task-id "$ID" | jq -r .task.status)
|
|
67
|
+
case "$STATUS" in
|
|
68
|
+
idle|awaiting-approval|done) break ;;
|
|
69
|
+
esac
|
|
70
|
+
sleep 10
|
|
71
|
+
done
|
|
72
|
+
done
|
|
73
|
+
|
|
74
|
+
# 4. Read each result and aggregate. The active tab's id is on the task.
|
|
75
|
+
for ID in $T1 $T2 $T3; do
|
|
76
|
+
TAB=$(kobe api get-task --task-id "$ID" | jq -r .task.activeTabId)
|
|
77
|
+
kobe api get-tab --task-id "$ID" --tab-id "$TAB"
|
|
78
|
+
done
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Do
|
|
82
|
+
|
|
83
|
+
- Cap fan-out at 3-4 in parallel. The orchestrator caps total concurrency at 4.
|
|
84
|
+
- Give each subtask its own scoped prompt — don't dump the whole parent conversation.
|
|
85
|
+
- Tell the user what was spawned, with IDs, so they can follow along in the sidebar.
|
|
86
|
+
- Poll status with `sleep` between calls. 5-15 seconds is fine.
|
|
87
|
+
- Aggregate results back into your own chat before reporting to the user.
|
|
88
|
+
|
|
89
|
+
## Don't
|
|
90
|
+
|
|
91
|
+
- Don't fan out for single simple tasks. One thing → do it yourself in chat.
|
|
92
|
+
- Don't recursively spawn from inside a spawned task. There is no recursion
|
|
93
|
+
guard yet; you will starve the concurrency cap and the inner spawn will
|
|
94
|
+
hang.
|
|
95
|
+
- Don't use `kobe api send` as a chat channel. Every send is a full agent
|
|
96
|
+
turn — it costs tokens and time. Send a complete instruction, not a
|
|
97
|
+
conversation.
|
|
98
|
+
- Don't delete tasks. There is no `kobe api delete` verb on purpose. Cleanup
|
|
99
|
+
happens in the TUI by the user.
|
|
100
|
+
|
|
101
|
+
## When the daemon is not running
|
|
102
|
+
|
|
103
|
+
`kobe api ...` exits 2 with `{"error":{"code":"BAD_DAEMON",...}}` on stderr.
|
|
104
|
+
If you see this:
|
|
105
|
+
|
|
106
|
+
> The kobe daemon is not running. Ask the user to run `kobe daemon start`
|
|
107
|
+
> (or launch the kobe TUI, which auto-starts it), then re-try.
|
|
108
|
+
|
|
109
|
+
Don't try to start the daemon yourself; that's the user's call.
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@sma1lboy/kobe",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.25",
|
|
5
5
|
"description": "TUI orchestrator for Claude Code (codename)",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"packageManager": "bun@1.3.13",
|
|
8
8
|
"bin": {
|
|
9
|
-
"kobe": "dist/cli/index.js"
|
|
10
|
-
"kobed": "dist/bin/kobed.js"
|
|
9
|
+
"kobe": "dist/cli/index.js"
|
|
11
10
|
},
|
|
12
11
|
"files": ["dist", "README.md", "LICENSE"],
|
|
13
12
|
"publishConfig": {
|
|
@@ -38,6 +37,7 @@
|
|
|
38
37
|
"test:socket": "KOBE_INCLUDE_SOCKET=1 vitest run test/daemon test/orchestrator/bridge.test.ts --pool forks --minWorkers=1 --maxWorkers=1 --passWithNoTests",
|
|
39
38
|
"test:behavior": "KOBE_INCLUDE_BEHAVIOR=1 vitest run test/behavior --pool forks --minWorkers=1 --maxWorkers=1 --passWithNoTests",
|
|
40
39
|
"lint": "biome check .",
|
|
40
|
+
"postinstall": "bun run scripts/check-preview-deps.ts || true",
|
|
41
41
|
"prepublishOnly": "bun run typecheck && bun run build"
|
|
42
42
|
},
|
|
43
43
|
"//": "biome.json + bunfig.toml live at the monorepo root since they apply repo-wide; bun.lock also lives at root (workspace-shared).",
|