From 0db69b6cfc997c36adb96aa11b92ed6a9376322a Mon Sep 17 00:00:00 2001 From: w1am <33353798+w1am@users.noreply.github.com> Date: Thu, 25 Jun 2026 12:13:59 +0400 Subject: [PATCH 1/2] Expand kcap CLI skill to 8 agents, WorkOS login, and v0.7.9 commands --- .../skills/kurrent-capacitor-cli/SKILL.md | 5 +-- .../references/daemon.md | 20 ++++++++++-- .../references/import.md | 8 ++++- .../references/install-setup.md | 31 +++++++++---------- .../references/mcp-review.md | 2 +- .../references/plugins.md | 23 +++++++++----- .../references/profiles.md | 4 +-- .../references/sessions.md | 2 +- 8 files changed, 62 insertions(+), 33 deletions(-) diff --git a/plugins/kurrent/skills/kurrent-capacitor-cli/SKILL.md b/plugins/kurrent/skills/kurrent-capacitor-cli/SKILL.md index cc6df24..6a3ac68 100644 --- a/plugins/kurrent/skills/kurrent-capacitor-cli/SKILL.md +++ b/plugins/kurrent/skills/kurrent-capacitor-cli/SKILL.md @@ -3,7 +3,8 @@ name: kurrent-capacitor-cli description: >- Use when installing, configuring, or operating the kcap CLI, aka the Kurrent Capacitor CLI / Capacitor CLI (npm @kurrent/kcap), which records - Claude Code, Codex, and Cursor sessions to a Capacitor server. Covers + coding-agent sessions (Claude Code, Codex, Cursor, Copilot, Gemini, Kiro, + Pi, OpenCode) to a Capacitor server. Covers install/setup/login, profiles, where its config and on-disk state live, importing and remapping past sessions, recap/eval/errors on a recorded session, visibility and privacy (hide, disable, ignoring or excluding @@ -13,7 +14,7 @@ description: >- # kcap CLI (Kurrent Capacitor) -`kcap` is the `@kurrent/kcap` npm CLI that records coding-agent sessions (Claude Code, Codex CLI, Cursor) to a Kurrent Capacitor server, then lets you recap, evaluate, and PR-review them with full transcript context. This skill is the source of truth for its commands, flags, config keys, and gotchas, the binary ships from a repo created after the model's training cutoff, so **do not reconstruct command or flag names from memory; copy them from the reference files.** +`kcap` is the `@kurrent/kcap` npm CLI that records coding-agent sessions (Claude Code, Codex CLI, Cursor, Copilot CLI, Gemini CLI, Kiro CLI, Pi, OpenCode) to a Kurrent Capacitor server, then lets you recap, evaluate, and PR-review them with full transcript context. This skill is the source of truth for its commands, flags, config keys, and gotchas, the binary ships from a repo created after the model's training cutoff, so **do not reconstruct command or flag names from memory; copy them from the reference files.** ## Overview diff --git a/plugins/kurrent/skills/kurrent-capacitor-cli/references/daemon.md b/plugins/kurrent/skills/kurrent-capacitor-cli/references/daemon.md index 683fb4f..6253dc3 100644 --- a/plugins/kurrent/skills/kurrent-capacitor-cli/references/daemon.md +++ b/plugins/kurrent/skills/kurrent-capacitor-cli/references/daemon.md @@ -17,7 +17,22 @@ kcap daemon doctor # diagnose lock-file state for every daemon kcap daemon doctor --clean # also remove stale lock/pid files (held entries untouched) ``` -Start options: `--name`, `--server-url`, `--max-agents ` (default 5), `--log-file `, `-d`/`--detach`. +Start options: `--name`, `--server-url`, `--max-agents ` (default 5), `--log-file `, `--log-level ` (default `information`; also via `KCAP_DAEMON_LOG_LEVEL`, the flag wins; use `debug` for transport diagnostics like DaemonPing RTT), `-d`/`--detach`. + +## Run as an OS service + +For a daemon that survives logout, auto-restarts on crash/`SIGKILL`, and starts at login, register it as a per-user OS service (launchd on macOS, systemd user unit on Linux, Scheduled Task on Windows) instead of running `daemon start -d` by hand. + +```bash +kcap daemon service install # register + start; pins profile, captures PATH +kcap daemon service install --name laptop --profile work --max-agents 10 --no-start +kcap daemon service status # installed / running state +kcap daemon service start # start an installed (stopped) service +kcap daemon service stop # stop but keep installed +kcap daemon service uninstall # stop and remove the unit +``` + +`install` pins the profile via `KCAP_PROFILE` and captures your shell `PATH`, so `claude` / `codex` resolve the same way they do interactively. `--no-start` registers without starting. All actions take `--name N` to target a specific daemon name. ## Running multiple daemons on one machine @@ -49,6 +64,7 @@ Runtime env-var overrides (take precedence over the profile): ```bash KCAP_CLAUDE_PATH=/opt/claude/bin/claude kcap daemon start KCAP_CODEX_PATH=/opt/codex/bin/codex kcap daemon start +KCAP_MAX_AGENTS=10 kcap daemon start # overrides --max-agents / daemon.max_agents ``` Hosted Codex agents require the Codex hook surface (installed by `kcap setup` or `kcap plugin install --codex`, see [plugins.md](plugins.md)). The daemon starts Codex with `--sandbox workspace-write` and `--ask-for-approval on-request`, escalating sensitive operations through the daemon's permission bridge to the dashboard. @@ -70,5 +86,5 @@ Persisted to `~/.config/kcap/repos.json` and reported to the server on daemon co ```bash kcap cleanup # kill all orphaned watcher processes -kcap update # check for and install CLI updates +kcap update # upgrade the CLI and refresh opted-in agent plugins (--check to only report) ``` diff --git a/plugins/kurrent/skills/kurrent-capacitor-cli/references/import.md b/plugins/kurrent/skills/kurrent-capacitor-cli/references/import.md index a58d367..3add6b0 100644 --- a/plugins/kurrent/skills/kurrent-capacitor-cli/references/import.md +++ b/plugins/kurrent/skills/kurrent-capacitor-cli/references/import.md @@ -2,11 +2,15 @@ ## Backfilling history -`kcap import` discovers and uploads past local transcripts from every detected agent so they appear in the dashboard: +`kcap import` discovers and uploads past local transcripts from every detected agent so they appear in the dashboard. It walks **seven** agents (`import` covers Claude, Codex, Cursor, Copilot, Gemini, Kiro, Pi; OpenCode is live-ingest only, no historical import): - Claude, `~/.claude/projects//.jsonl` - Codex, `~/.codex/sessions/.../rollout-.jsonl` - Cursor, `~/.cursor/projects//agent-transcripts//.jsonl` +- Copilot, `~/.copilot/session-state//events.jsonl` (honours `$COPILOT_HOME`) +- Gemini, `~/.gemini/tmp//chats/session--.jsonl` +- Kiro, `~/.kiro/sessions/cli/.jsonl` (honours `$KIRO_HOME`) +- Pi, `~/.pi/agent/sessions/.../_.jsonl` (badlogic/pi-mono) ### A scope is REQUIRED @@ -33,6 +37,8 @@ kcap import --codex --org # only Codex rollouts kcap import --cursor --all # only Cursor ``` +The full set of vendor filters: `--claude`, `--codex`, `--cursor`, `--copilot`, `--gemini`, `--kiro`, `--pi`. Filters are additive — pass several to import that subset. + ### Other flags ```bash diff --git a/plugins/kurrent/skills/kurrent-capacitor-cli/references/install-setup.md b/plugins/kurrent/skills/kurrent-capacitor-cli/references/install-setup.md index fde2630..b9d9442 100644 --- a/plugins/kurrent/skills/kurrent-capacitor-cli/references/install-setup.md +++ b/plugins/kurrent/skills/kurrent-capacitor-cli/references/install-setup.md @@ -32,7 +32,7 @@ npm install -g @kurrent/kcap --allow-scripts=@kurrent/kcap allow-scripts[]=@kurrent/kcap ``` -**What the postinstall actually does:** it only *refreshes* user-scope agent integrations, Claude / Codex / Cursor skills and hook/plugin registration, by running `kcap plugin install ... --if-installed` for each. It runs on every global install but is gated by `--if-installed`, so it is a **no-op unless you previously opted in** (a marker file or pre-existing kcap entries are detected). It never installs onto a fresh system, swallows all errors, and always exits 0 so `npm install` can't fail. +**What the postinstall actually does:** it only *refreshes* your opted-in user-scope agent integrations (skills + hook/plugin registration, across whichever of the supported agents you previously installed), by running `kcap plugin install ... --if-installed` for each. It runs on every global install but is gated by `--if-installed`, so it is a **no-op unless you previously opted in** (a marker file or pre-existing kcap entries are detected). It never installs onto a fresh system, swallows all errors, and always exits 0 so `npm install` can't fail. Without opting in, re-run the refresh by hand after each upgrade: @@ -53,10 +53,10 @@ kcap setup Walks through these steps, in order: -1. **Server URL** — provided by your admin, e.g. `https://my-tenant.kcap.ai`. -2. **Login** — GitHub, browser/PKCE by default, falls back to Device Flow. +1. **Server URL** — provided by your admin, e.g. `https://my-tenant.kcap.ai`. Can be skipped when the server supports tenant discovery (see Login). +2. **Login** — at discovery you choose how to sign in: **email / SSO (WorkOS)** or **GitHub** (browser/PKCE by default, falls back to Device Flow). When the server's auth provider is `None`, setup prints "no login required" and skips this step. 3. **Default visibility** — `private` / `org_public` / `public`; the dashboard-visibility default applied to new sessions. -4. **Coding-agent hooks** — one yes/no per detected agent (Claude Code / Codex CLI / Cursor). +4. **Coding-agent hooks** — one yes/no per detected agent (Claude Code / Codex CLI / Cursor / Copilot CLI / Gemini CLI / Kiro CLI / Pi / OpenCode). 5. **Daemon name**. When you describe what `kcap setup` covers, list **all five** steps — the **default-visibility** choice is part of the wizard and is the one most easily forgotten. @@ -74,12 +74,13 @@ kcap whoami **Recording only happens once a supported coding agent is installed and its hooks are in place.** Setup alone just detects agents and writes hook registrations, it captures nothing on its own. The hook firing when the agent runs is the only trigger, so there's no recording without a supported agent. -Three agents are supported as recording sources: **Claude Code, Codex CLI, and Cursor.** Detection differs: +Eight agents are supported as recording sources: **Claude Code, Codex CLI, Cursor, Copilot CLI, Gemini CLI, Kiro CLI, Pi, and OpenCode.** Detection mixes `PATH` and user-dir presence: - **Claude Code** and **Codex CLI** are detected via `PATH`. -- **Cursor** is detected by user-dir presence (`~/.cursor/`), so IDE-only users without a `cursor` shell command are still covered. +- **Cursor** via user-dir presence (`~/.cursor/`), so IDE-only users without a `cursor` shell command are still covered. +- **Copilot** (`~/.copilot/` or `copilot` on PATH), **Gemini** (`~/.gemini/` or `gemini`), **Kiro** (`~/.kiro/` or `kiro`/`kiro-cli`), **Pi** (`~/.pi/` or `pi`), **OpenCode** (`~/.config/opencode/` or `~/.local/share/opencode/` or `opencode`). -PATH detection therefore applies only to Claude and Codex; Cursor is covered by its user directory even when no `cursor` command is on PATH. +One yes/no prompt is shown per detected agent. Hooks install user-wide, **except Pi and OpenCode**, which expose no shell hooks: kcap installs an in-process extension/plugin (`~/.pi/agent/extensions/kcap.ts`, `~/.config/opencode/plugins/kcap.ts`) that streams each session and shells out to `kcap hook --pi` / `--opencode`, so `kcap` must be on `PATH`. ### Non-interactive / CI @@ -87,15 +88,13 @@ PATH detection therefore applies only to Claude and Codex; Cursor is covered by kcap setup --server-url https://my-tenant.kcap.ai --no-prompt ``` -In `--no-prompt` mode the wizard installs hooks for **every detected agent by default.** Opt out per agent with these exact flags (there is no `--only-claude` / `--agents=...`): +In `--no-prompt` mode the wizard installs hooks for **every detected agent by default.** Opt out per agent with a `--skip--hooks` flag (there is no `--only-claude` / `--agents=...`). One flag per agent: `--skip-claude-hooks`, `--skip-codex-hooks`, `--skip-cursor-hooks`, `--skip-copilot-hooks`, `--skip-gemini-hooks`, `--skip-kiro-hooks`, `--skip-pi-hooks`, `--skip-opencode-hooks`. Pass every flag *except* the agent you want: ```bash -# Claude hooks only: -kcap setup --server-url --no-prompt --skip-codex-hooks --skip-cursor-hooks -# Codex only: -kcap setup --server-url --no-prompt --skip-claude-hooks --skip-cursor-hooks -# Cursor only: -kcap setup --server-url --no-prompt --skip-claude-hooks --skip-codex-hooks +# Claude hooks only (skip the other seven): +kcap setup --server-url --no-prompt \ + --skip-codex-hooks --skip-cursor-hooks --skip-copilot-hooks \ + --skip-gemini-hooks --skip-kiro-hooks --skip-pi-hooks --skip-opencode-hooks ``` Other setup flags: `--daemon-name `, `--default-visibility `, `--device` (force Device Flow login), `--use-provider-api-key ` (see [config-privacy.md](config-privacy.md)). @@ -107,9 +106,9 @@ If you run setup outside a git working tree it still completes (user-scope hooks ## Login on its own ```bash -kcap login # browser OAuth (localhost callback + PKCE for GitHub) +kcap login # browser OAuth; pick email/SSO (WorkOS) or GitHub at discovery kcap login --device # force GitHub Device Flow (SSH / headless / no browser) -kcap login --discover # discover every Capacitor tenant across your GitHub orgs and save each as a profile +kcap login --discover # discover every Capacitor tenant you belong to (via email/SSO or GitHub) and save each as a profile kcap logout # delete stored tokens ``` diff --git a/plugins/kurrent/skills/kurrent-capacitor-cli/references/mcp-review.md b/plugins/kurrent/skills/kurrent-capacitor-cli/references/mcp-review.md index 2360a2e..d9c71aa 100644 --- a/plugins/kurrent/skills/kurrent-capacitor-cli/references/mcp-review.md +++ b/plugins/kurrent/skills/kurrent-capacitor-cli/references/mcp-review.md @@ -56,7 +56,7 @@ kcap mcp review --owner --repo --pr # session defaults ## `kcap mcp judge` -Binds to a session and surfaces judge facts/clusters for that session: +Binds to a session and exposes six read-only tools for fetching that session's context on demand: `get_session_recap`, `get_session_errors`, `get_session_summary`, `get_transcript`, `search_session`, `get_tool_result`. This is the surface the server-tagged eval judges use (see [sessions.md](sessions.md)). ```bash kcap mcp judge --session diff --git a/plugins/kurrent/skills/kurrent-capacitor-cli/references/plugins.md b/plugins/kurrent/skills/kurrent-capacitor-cli/references/plugins.md index cc0cd58..7c8646c 100644 --- a/plugins/kurrent/skills/kurrent-capacitor-cli/references/plugins.md +++ b/plugins/kurrent/skills/kurrent-capacitor-cli/references/plugins.md @@ -3,18 +3,25 @@ `kcap plugin install` / `remove` manages the hooks and agent skills for each supported agent. `kcap setup` already installs these for detected agents; use `kcap plugin` to add an agent installed *after* setup, scope an install to one repo, or refresh. ```bash -kcap plugin install [--project] [--codex] [--cursor] [--skills] [--if-installed] -kcap plugin remove [--codex] [--cursor] [--skills] +kcap plugin install [--project] [--codex] [--cursor] [--copilot] [--gemini] [--kiro] [--pi] [--opencode] [--skills] [--if-installed] +kcap plugin remove [--codex] [--cursor] [--copilot] [--gemini] [--kiro] [--pi] [--opencode] [--skills] ``` +Eight agents have a vendor flag (`--codex`, `--cursor`, `--copilot`, `--gemini`, `--kiro`, `--pi`, `--opencode`, plus `--skills` for the agent-agnostic skills). Claude is the **default, flag-less** target — there is no `--claude` on `plugin` (it only exists as an `import` vendor filter). + ## What each target installs | Command | Installs | |--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------| -| `kcap plugin install` | Claude Code plugin (user scope). **Claude is the default target, with no flag, there is no `--claude` flag.** | -| `kcap plugin install --codex` | Codex CLI **hooks AND agent skills** (`~/.codex/hooks.json` + `~/.agents/skills/`). | -| `kcap plugin install --cursor` | Cursor hooks (`~/.cursor/hooks.json`; all 8 supported entries, merged with existing). | -| `kcap plugin install --skills` | Only the agent-agnostic skills (`~/.agents/skills/`), no Codex hooks. Use if you only have Cursor (or another agent that reads `~/.agents/skills/`). | +| `kcap plugin install` | Claude Code plugin (user scope). **Claude is the default target, with no flag, there is no `--claude` flag.** | +| `kcap plugin install --codex` | Codex CLI **hooks AND agent skills** (`~/.codex/hooks.json` + `~/.agents/skills/`). | +| `kcap plugin install --cursor` | Cursor hooks (`~/.cursor/hooks.json`; all 8 hook events, merged with existing). User-scope only. | +| `kcap plugin install --copilot` | Copilot CLI hooks written to `~/.copilot/hooks/kcap.json` (honours `$COPILOT_HOME`; Copilot merges every `*.json` there, so user files are untouched). Restart running `copilot` sessions after. | +| `kcap plugin install --gemini` | Gemini CLI hooks merged into the **shared** `~/.gemini/settings.json` (honours `$GEMINI_HOME`; other keys/hooks preserved, fails closed on invalid JSON). Restart `gemini` after. | +| `kcap plugin install --kiro` | Clones your default Kiro agent → `~/.kiro/agents/kcap.json` (preserving its tools), adds the `agentSpawn` hook, and sets it as default (`chat.defaultAgent`) so every session is captured (honours `$KIRO_HOME`). Needs `kiro-cli` on PATH; restart kiro-cli. | +| `kcap plugin install --pi` | Pi (badlogic/pi-mono) live-ingest **extension** → `~/.pi/agent/extensions/kcap.ts` (no shell hooks). Auto-loads on `pi` startup; shells out to `kcap hook --pi`, so `kcap` must be on PATH. User-wide only. | +| `kcap plugin install --opencode` | SST OpenCode live-ingest **plugin** → `~/.config/opencode/plugins/kcap.ts` (no shell hooks). Auto-loads on `opencode` startup; shells out to `kcap hook --opencode`. User-wide only. | +| `kcap plugin install --skills` | Only the agent-agnostic skills (`~/.agents/skills/`), no Codex hooks. Use if you only have Cursor (or another agent that reads `~/.agents/skills/`). | After installing **Codex** hooks, the next `codex` launch prompts to **trust the new hooks, accept once** to trust them all (or run `/hooks` inside Codex to trust entries individually). For a `--project` install also run `codex` once in the repo and accept the workspace-trust prompt. @@ -24,7 +31,7 @@ After installing **Codex** hooks, the next `codex` launch prompts to **trust the - **User scope (default):** hooks for the current user, fire for every session. - **`--project`:** apply hooks to the current repo only, Claude → `/.claude/settings.local.json`, Codex → `/.codex/hooks.json`. **Skills are always user-wide; `--project` only affects hooks.** -- **Cursor** uses a single user-scope `~/.cursor/hooks.json`, there is no project variant, so `--project` has no effect with `--cursor`. Cursor is detected by user-dir presence, not `PATH`. +- **Only Claude and Codex have a project scope.** Cursor, Copilot, Gemini, Kiro, Pi, and OpenCode are user-scope only (shared config files or in-process extensions/plugins), so `--project` has no effect with those flags. Cursor is detected by user-dir presence, not `PATH`. ## The installed skills @@ -59,4 +66,4 @@ kcap uninstall --project --yes # also strip project-scope hooks in the cwd's re kcap uninstall --keep-config # remove integrations, keep ~/.config/kcap (profiles, tokens, ignore lists) ``` -`uninstall` stops running daemons and watcher processes, strips kcap entries from user-level Claude / Codex / Cursor hook files (preserving non-kcap entries), removes the `~/.agents/skills/kcap-*` skills (plus legacy `~/.codex/skills/kcap-*`), and deletes `~/.config/kcap/`. `--project` additionally cleans `/.claude/settings.local.json` and `/.codex/hooks.json` (errors if not inside a git tree; Cursor is user-scope only, so `--project` doesn't touch it). Per-agent selective cleanup isn't exposed here, use `kcap plugin remove [--codex|--cursor|--skills]` for that. +`uninstall` always touches **all known agents**: it stops running daemons and watcher processes, then strips kcap from every integration — Claude / Codex / Cursor / Gemini hook entries (preserving non-kcap entries in shared files), the Copilot hooks file, the Kiro agent (restoring the default it replaced), the Pi extension and OpenCode plugin, the `~/.agents/skills/kcap-*` skills (plus legacy `~/.codex/skills/kcap-*`), and `~/.config/kcap/`. `--project` additionally cleans `/.claude/settings.local.json` and `/.codex/hooks.json` (errors if not inside a git tree; only Claude/Codex have project scope). Per-agent selective cleanup isn't exposed here, use `kcap plugin remove [--codex|--cursor|--copilot|--gemini|--kiro|--pi|--opencode|--skills]` for that. diff --git a/plugins/kurrent/skills/kurrent-capacitor-cli/references/profiles.md b/plugins/kurrent/skills/kurrent-capacitor-cli/references/profiles.md index b02d053..e7fea10 100644 --- a/plugins/kurrent/skills/kurrent-capacitor-cli/references/profiles.md +++ b/plugins/kurrent/skills/kurrent-capacitor-cli/references/profiles.md @@ -12,7 +12,7 @@ kcap profile show work # defaults to the active profile when name omitt kcap profile remove work ``` -`--remote ` associates the profile with git-remote patterns and is **repeatable**, pass it multiple times for multiple orgs/hosts. +`--remote ` associates the profile with git-remote patterns and is **repeatable**, pass it multiple times for multiple orgs/hosts. `--no-probe` skips the server-reachability check when adding a profile (useful for a server that isn't up yet, or offline). ### `--remote` wildcard matching @@ -62,6 +62,6 @@ This is why `kcap import --org` works for tenant-bound profiles: `kcap setup` na kcap login --discover ``` -Runs tenant discovery across all your GitHub org memberships, exchanges tokens for each discovered Capacitor tenant, saves them as named profiles, and sets the picked tenant active. No existing profile config is required first. +Runs tenant discovery across the tenants you belong to (sign in with email/SSO via WorkOS, or with GitHub), exchanges tokens for each discovered Capacitor tenant, saves them as named profiles, and sets the picked tenant active. No existing profile config is required first. > Profiles are real, named config objects, **do not** suggest per-repo environment variables or a single global config file the user hand-edits as the way to switch servers. Use `profile add` + `--remote` / `kcap use`. diff --git a/plugins/kurrent/skills/kurrent-capacitor-cli/references/sessions.md b/plugins/kurrent/skills/kurrent-capacitor-cli/references/sessions.md index d06d4ed..21d57ed 100644 --- a/plugins/kurrent/skills/kurrent-capacitor-cli/references/sessions.md +++ b/plugins/kurrent/skills/kurrent-capacitor-cli/references/sessions.md @@ -50,7 +50,7 @@ kcap eval --list-questions # print the question taxonomy and exit - **13 questions across 4 categories**: safety, plan adherence, quality, efficiency. - **Each question is asked of Claude in its own headless invocation** (a separate judge per question). - **The default judge is text-only.** It reasons from the **compacted session trace embedded in its prompt** — the server's eval-context endpoint supplies that trace, and live tools (Read, Bash, Grep, WebFetch, ...) are **blocked**, so the judge works from the evidence in the prompt rather than hitting any service. -- A **few server-tagged questions instead get a read-only MCP tool surface** (`kcap-review`) to fetch context on demand. Mentioning this is correct but optional; describing "every judge has no tools" is an acceptable simplification. +- A **few server-tagged questions instead get a read-only MCP tool surface** (the `kcap-judge` server — distinct from the plugin's `kcap-review`) to fetch context on demand. Mentioning this is correct but optional; describing "every judge has no tools" is an acceptable simplification. Output is **a score per category plus an overall score** — each on a **1-5 scale with a pass / warn / fail verdict** — plus a finding and supporting evidence per question. The aggregate is persisted back to the session's stream as a `SessionEvalCompleted` event, so trends are queryable from the dashboard. Judges run sequentially; expect ~1-3 minutes total. From f1987250fb6f50adca9dc7b6718c8af77e6cf936 Mon Sep 17 00:00:00 2001 From: w1am <33353798+w1am@users.noreply.github.com> Date: Thu, 25 Jun 2026 12:29:37 +0400 Subject: [PATCH 2/2] Address PR review: align evals and fix skill layering --- .../quality/cases/kurrent-capacitor-cli.yaml | 52 +++++++++++-------- evals/trigger/kurrent-capacitor-cli.json | 15 ++++++ .../skills/kurrent-capacitor-cli/SKILL.md | 8 ++- .../references/daemon.md | 2 +- 4 files changed, 51 insertions(+), 26 deletions(-) diff --git a/evals/quality/cases/kurrent-capacitor-cli.yaml b/evals/quality/cases/kurrent-capacitor-cli.yaml index 9c0f7a1..7d337d1 100644 --- a/evals/quality/cases/kurrent-capacitor-cli.yaml +++ b/evals/quality/cases/kurrent-capacitor-cli.yaml @@ -7,39 +7,45 @@ value: >- Directs the user to run `kcap setup` (the interactive wizard) and describes the steps it covers: entering the server URL (provided by their admin), - logging in with GitHub, choosing default visibility, and installing - coding-agent hooks. The default GitHub login is browser-based OAuth (localhost - callback + PKCE); Device Flow is only the fallback for headless/SSH - environments or when `--device` is passed, so an answer that says login opens - a browser by default is CORRECT and must not be penalized, and an answer that - claims Device Flow is the default is wrong. Mentions verifying with - `kcap whoami` and/or `kcap status`. Does NOT invent commands like `kcap init`, - `kcap start`, or a config file the user must hand-write. + logging in, choosing default visibility, and installing coding-agent hooks. + At login the user picks how to sign in — email / SSO (WorkOS) or GitHub — so + an answer that mentions either method (or both) is correct; do NOT require it + to say GitHub specifically. For the GitHub path, login is browser-based OAuth + (localhost callback + PKCE) by default and Device Flow is only the fallback for + headless/SSH or when `--device` is passed, so an answer that says GitHub login + opens a browser by default is CORRECT and one that claims Device Flow is the + default is wrong. Mentions verifying with `kcap whoami` and/or `kcap status`. + Does NOT invent commands like `kcap init`, `kcap start`, or a config file the + user must hand-write. - type: llm-rubric value: >- - Notes that recording only happens once a supported coding agent (Claude Code, - Codex CLI, or Cursor) is installed and its hooks are in place. Setup alone, - which just detects agents and writes hook registrations, captures nothing. The - hook firing when the agent runs is the only trigger, so there is no recording - without a supported agent. Accepts (does not penalize) answers that mention - only Claude Code and/or Codex, but treats naming Codex CLI as the sole second - agent (omitting Cursor) as incomplete rather than correct. Does not require the - phrase "on PATH": detection is PATH-based for Claude and Codex but - directory-based for Cursor, so an answer that hinges recording solely on an - agent being "on PATH" is imprecise. + Notes that recording only happens once a supported coding agent is installed + and its hooks are in place. The supported agents are Claude Code, Codex CLI, + Cursor, Copilot CLI, Gemini CLI, Kiro CLI, Pi, and OpenCode; since the user + asked about Claude Code, an answer focused on Claude Code is fine and need not + enumerate the rest. Setup alone, which just detects agents and writes hook + registrations, captures nothing. The hook firing when the agent runs is the + only trigger, so there is no recording without a supported agent. Does not + require the phrase "on PATH": detection is PATH-based for some agents but + directory-based for others (e.g. Cursor via `~/.cursor/`), so an answer that + hinges recording solely on an agent being "on PATH" is imprecise. - description: "[setup] Non-interactive setup, Claude hooks only" vars: skill: kurrent-capacitor-cli - message: "How do I run kcap setup in CI with no prompts, installing only the Claude Code hooks and skipping Codex and Cursor?" + message: "How do I run kcap setup in CI with no prompts, installing only the Claude Code hooks and no other agents?" assert: - type: llm-rubric value: >- Shows `kcap setup --server-url --no-prompt` and explains that - `--no-prompt` installs hooks for EVERY detected agent by default, so you must - opt out of the others with `--skip-codex-hooks` and `--skip-cursor-hooks` to - get Claude-only. Uses these exact opt-out flags (not invented ones like - `--only-claude` or `--agents=claude`). + `--no-prompt` installs hooks for EVERY detected agent by default, so to get + Claude-only you must opt out of every other agent with its `--skip--hooks` + flag: `--skip-codex-hooks`, `--skip-cursor-hooks`, `--skip-copilot-hooks`, + `--skip-gemini-hooks`, `--skip-kiro-hooks`, `--skip-pi-hooks`, and + `--skip-opencode-hooks`. Uses these `--skip-*-hooks` opt-out flags (not invented + ones like `--only-claude` or `--agents=claude`). An answer that only skips Codex + and Cursor, leaving the newer agents (Copilot/Gemini/Kiro/Pi/OpenCode) + installable, is incomplete. - description: "[import] Backfilling past sessions requires an explicit scope" vars: diff --git a/evals/trigger/kurrent-capacitor-cli.json b/evals/trigger/kurrent-capacitor-cli.json index f00719e..a306e6e 100644 --- a/evals/trigger/kurrent-capacitor-cli.json +++ b/evals/trigger/kurrent-capacitor-cli.json @@ -88,5 +88,20 @@ "query": "How do I give Claude transcript context from past Capacitor sessions when reviewing a PR?", "should_trigger": true, "note": "mcp-review — kcap review / kcap mcp PR context, references/mcp-review.md" + }, + { + "query": "How do I get kcap to record my Gemini CLI sessions into Capacitor?", + "should_trigger": true, + "note": "install/setup + plugins — newly supported agent (Gemini); kcap now records 8 agents, not just Claude/Codex/Cursor" + }, + { + "query": "How do I write a prompt for the Gemini CLI to summarize a file?", + "should_trigger": false, + "note": "DEFER — using the Gemini CLI itself, not recording it with kcap; guards the new agent-name collision introduced by listing Gemini as a supported vendor" + }, + { + "query": "How do I enable GitHub Copilot inline suggestions in VS Code?", + "should_trigger": false, + "note": "DEFER — Copilot IDE feature, unrelated to kcap session recording; guards the Copilot name collision now that Copilot CLI is a supported vendor" } ] diff --git a/plugins/kurrent/skills/kurrent-capacitor-cli/SKILL.md b/plugins/kurrent/skills/kurrent-capacitor-cli/SKILL.md index 6a3ac68..7675e5e 100644 --- a/plugins/kurrent/skills/kurrent-capacitor-cli/SKILL.md +++ b/plugins/kurrent/skills/kurrent-capacitor-cli/SKILL.md @@ -22,7 +22,7 @@ The CLI splits into a few concerns. Match the user's need to a reference file be **Key surfaces:** -- **Onboarding**: `kcap setup` (one wizard: server URL, GitHub login, visibility, agent hooks, daemon name), then verify with `kcap status` / `kcap whoami`. +- **Onboarding**: `kcap setup` (one wizard: server URL, login via email/SSO or GitHub, visibility, agent hooks, daemon name), then verify with `kcap status` / `kcap whoami`. - **Recording**: once an agent's hooks are installed, sessions stream automatically; nothing else to run. - **Profiles**: one server config each (URL, visibility, daemon, ignore list); auto-switch by git remote. - **History**: `kcap import` backfills past local transcripts; requires an explicit scope. @@ -43,12 +43,16 @@ Pick the one file that owns the user's need. Don't load more than you need. | Where the config file lives (`$HOME/.config/kcap/config.json`) and the `KCAP_CONFIG_DIR` override, `kcap config show` / `set`, config keys, default visibility, excluding repos vs paths (`excluded_repos` / `kcap ignore`), provider-API-key scrubbing, SessionStart guidance injection | [`references/config-privacy.md`](references/config-privacy.md) | | `kcap daemon` lifecycle, running multiple daemons (naming / flock), hosted Claude/Codex agents, `daemon.claude_path` / `daemon.codex_path`, `kcap repos`, daemon env vars | [`references/daemon.md`](references/daemon.md) | | Giving an agent session/PR context: `kcap mcp sessions` / `review` / `judge`, `kcap review `, auto-registration, the MCP tools | [`references/mcp-review.md`](references/mcp-review.md) | -| `kcap plugin install` / `remove` (hooks + skills) for Claude / Codex / Cursor, `--project` vs user scope, `--skills`, `--if-installed`, and `kcap uninstall` | [`references/plugins.md`](references/plugins.md) | +| `kcap plugin install` / `remove` (hooks + skills) for each supported agent (Claude, Codex, Cursor, Copilot, Gemini, Kiro, Pi, OpenCode), `--project` vs user scope, `--skills`, `--if-installed`, and `kcap uninstall` | [`references/plugins.md`](references/plugins.md) | ## Switching profiles **Before running `kcap use` to switch profiles, ask whether to bind it to this repo only (the no-flag default) or globally (`--global`).** A no-flag `kcap use` silently creates a repo-scoped binding that overrides the global active profile for that directory, so choosing scope for the user can quietly reroute one repo while the rest stay on the old profile. Surface the choice; don't assume. See [`references/profiles.md`](references/profiles.md) for the binding mechanics and resolution order. +## Running the daemon persistently + +**When the user wants the daemon to stay up (survive logout/reboot, restart on crash), recommend `kcap daemon service install` over `kcap daemon start -d`.** The detached `-d` form runs only until logout or reboot; the service form is OS-managed. See [`references/daemon.md`](references/daemon.md). + ## Quick Reference ```bash diff --git a/plugins/kurrent/skills/kurrent-capacitor-cli/references/daemon.md b/plugins/kurrent/skills/kurrent-capacitor-cli/references/daemon.md index 6253dc3..23e42e0 100644 --- a/plugins/kurrent/skills/kurrent-capacitor-cli/references/daemon.md +++ b/plugins/kurrent/skills/kurrent-capacitor-cli/references/daemon.md @@ -21,7 +21,7 @@ Start options: `--name`, `--server-url`, `--max-agents ` (default 5), `--log- ## Run as an OS service -For a daemon that survives logout, auto-restarts on crash/`SIGKILL`, and starts at login, register it as a per-user OS service (launchd on macOS, systemd user unit on Linux, Scheduled Task on Windows) instead of running `daemon start -d` by hand. +`kcap daemon service` registers the daemon as a per-user OS service (launchd on macOS, systemd user unit on Linux, Scheduled Task on Windows). A service-managed daemon survives logout, auto-restarts on crash/`SIGKILL`, and starts at login — unlike a manual `daemon start -d`, which runs only until logout/reboot. ```bash kcap daemon service install # register + start; pins profile, captures PATH