@sma1lboy/kobe 0.5.21 → 0.53.0

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 CHANGED
@@ -173,6 +173,88 @@ an exec bit. The behavior-test driver fixes it lazily on first spawn (see
173
173
  validates the repo path before creating; if it's complaining, check that
174
174
  `git status` runs cleanly inside the path you typed.
175
175
 
176
+ ## Driving kobe from another agent
177
+
178
+ Inside kobe, the `claude` (or `codex`, etc.) you are talking to can call back
179
+ out and spawn more kobe tasks — useful when you ask it to "try three approaches
180
+ in parallel" instead of doing them sequentially in one chat. The mechanism is a
181
+ small CLI surface; design rationale lives in [`docs/design/cli-api.md`](../../docs/design/cli-api.md).
182
+
183
+ ### Daemon lifecycle
184
+
185
+ A `kobe daemon` process holds your tasks and chat sessions. The TUI auto-starts
186
+ one on first launch; in scripts you may want to manage it explicitly.
187
+
188
+ ```bash
189
+ kobe daemon start # spawn detached, listen on the unix socket
190
+ kobe daemon status # JSON status (pid, uptime, attached clients, task count)
191
+ kobe daemon restart # graceful stop + start
192
+ kobe daemon stop # tell the daemon to drain and exit
193
+ ```
194
+
195
+ > Pre-0.6 builds shipped a separate `kobed` binary for the same commands. It
196
+ > was removed in favor of the single-bin surface (KOB-136); any script with
197
+ > `kobed restart` needs a one-time rename to `kobe daemon restart`.
198
+
199
+ ### `kobe api <verb>` — five shell verbs
200
+
201
+ Each call is a short-lived process: open the daemon socket, do one RPC, print
202
+ JSON to stdout, exit. Any tool with a `Bash` capability (Claude Code, Codex,
203
+ Cursor, a custom agent) can drive it.
204
+
205
+ | verb | flags | what it does |
206
+ |---|---|---|
207
+ | `spawn-task` | `--repo PATH --prompt TEXT [--title T] [--base-branch B]` | Create a new task + worktree + chat session. |
208
+ | `create-tab` | `--task-id ID [--title T]` | Open an extra chat tab on an existing task. |
209
+ | `send` | `--task-id ID --prompt TEXT [--tab-id TID]` | Resume the task's session with a new prompt. |
210
+ | `get-task` | `--task-id ID` | Read task metadata (status, branch, worktree, tabs). |
211
+ | `get-tab` | `--task-id ID --tab-id TID` | Read a single tab off the task. |
212
+
213
+ Output is one JSON object on stdout, `\n` terminated, exit 0. Errors land on
214
+ stderr as `{"error":{"message":"...","code":"..."}}` with a non-zero exit.
215
+ Add `--pretty` for human inspection.
216
+
217
+ Fan-out from a shell:
218
+
219
+ ```bash
220
+ T1=$(kobe api spawn-task --repo "$PWD" --prompt "Approach A: state machine" | jq -r .taskId)
221
+ T2=$(kobe api spawn-task --repo "$PWD" --prompt "Approach B: event sourcing" | jq -r .taskId)
222
+ T3=$(kobe api spawn-task --repo "$PWD" --prompt "Approach C: reducer pattern" | jq -r .taskId)
223
+
224
+ # Tell the user three tasks are running — they'll appear in the sidebar.
225
+ echo "Spawned $T1 $T2 $T3"
226
+
227
+ # Poll until each settles.
228
+ for ID in $T1 $T2 $T3; do
229
+ until [ "$(kobe api get-task --task-id "$ID" | jq -r .task.status)" = "idle" ]; do
230
+ sleep 10
231
+ done
232
+ done
233
+ ```
234
+
235
+ If the daemon isn't running, `kobe api ...` exits 2 with
236
+ `{"error":{"code":"BAD_DAEMON",...}}` on stderr. Start it with
237
+ `kobe daemon start` (or just launch the TUI).
238
+
239
+ ### Install the agent skill
240
+
241
+ `kobe api` gives the *capability*. The bundled SKILL.md gives the model the
242
+ *intent* — when to fan out, how to scope subtask prompts, how to read results
243
+ back. Install it once:
244
+
245
+ ```bash
246
+ kobe skill install # writes ~/.claude/skills/kobe/SKILL.md
247
+ kobe skill install --yes # overwrite an existing copy
248
+ kobe skill uninstall # remove it
249
+ ```
250
+
251
+ After install, Claude Code automatically picks up the skill on its next launch.
252
+ For project-level overrides, copy the file to `<repo>/.claude/skills/kobe/SKILL.md`
253
+ and customise — Claude Code's discovery order is project > user > none.
254
+
255
+ `kobe diagnose` reports whether the skill is installed, which is the
256
+ fastest way to confirm.
257
+
176
258
  ## Coming later
177
259
 
178
260
  - Homebrew tap (mirroring [`sma1lboy/homebrew-codefox`](https://github.com/sma1lboy/homebrew-codefox)) so you can `brew install kobe` without touching Bun directly.
@@ -190,22 +272,22 @@ bun run dev # boots the 5-pane TUI under KOBE_DEV=1 (no update chip, et
190
272
  bun run test # normal suite: fast tests + serial socket tests
191
273
  bun run test:behavior # slow PTY suite; only run for user-visible TUI behavior
192
274
  bun run typecheck # strict tsc
193
- bun run build # produces ./dist/index.js for `npm publish`
275
+ bun run build # produces ./dist/cli/index.js for npm
194
276
  ```
195
277
 
196
278
  Architecture, design philosophy, and the team-of-agents operating model live in:
197
279
 
198
- - [`docs/DESIGN.md`](./docs/DESIGN.md) — design philosophy, tech stack lock-in.
199
- - [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md) — module map and current state.
200
- - [`docs/HARNESS.md`](./docs/HARNESS.md) — the agent self-test contract.
201
- - [`docs/PLAN.md`](./docs/PLAN.md) — phase / wave plan.
202
- - [`HANDOFF.md`](./HANDOFF.md) — current direction + what just shipped.
280
+ - [`docs/DESIGN.md`](../../docs/DESIGN.md) — design philosophy, tech stack lock-in.
281
+ - [`docs/ARCHITECTURE.md`](../../docs/ARCHITECTURE.md) — module map and current state.
282
+ - [`docs/HARNESS.md`](../../docs/HARNESS.md) — the agent self-test contract.
283
+ - [`docs/PLAN.md`](../../docs/PLAN.md) — phase / wave plan.
284
+ - [`HANDOFF.md`](../../HANDOFF.md) — latest session state and follow-ups.
203
285
 
204
286
  ### Releasing
205
287
 
206
288
  Bump `package.json`, move `## [Unreleased]` in `CHANGELOG.md` to the new
207
289
  version section, commit, then push the matching `vX.Y.Z` tag. The release
208
- workflow ([`.github/workflows/release.yml`](./.github/workflows/release.yml))
290
+ workflow ([`.github/workflows/release.yml`](../../.github/workflows/release.yml))
209
291
  runs typecheck + unit tests + build, asserts the tag matches `package.json`,
210
292
  then `npm publish --provenance` and creates a GitHub release with the
211
293
  changelog section as the body.