@kurrent/kcap 1.0.1 → 1.1.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/bin/kcap.js +12 -6
- package/bin/refresh.js +1 -0
- package/kcap/.claude-plugin/plugin.json +1 -1
- package/kcap/.codex-mcp.json +4 -0
- package/kcap/.mcp.json +6 -0
- package/kcap/README.md +1 -1
- package/kcap/skills/plans/SKILL.md +52 -0
- package/kcap/skills/validate-plan/SKILL.md +4 -3
- package/kcap/skills/work-items/SKILL.md +23 -7
- package/package.json +9 -9
package/bin/kcap.js
CHANGED
|
@@ -11,10 +11,9 @@ const fs = require("fs");
|
|
|
11
11
|
// module.exports below, so it would see partial exports).
|
|
12
12
|
const { PLATFORM_PACKAGES, platformKey } = require("./resolve");
|
|
13
13
|
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
// preserving today's default behavior.
|
|
14
|
+
// The package spec `kcap update` installs, from `kcap update --check`'s `install_tag`: the channel's
|
|
15
|
+
// dist-tag, or an exact version when the connected server caps the update. Falls back to "latest"
|
|
16
|
+
// when the probe is missing, failed, or has no tag.
|
|
18
17
|
function resolveInstallSpec(info) {
|
|
19
18
|
const tag = info && typeof info.install_tag === "string" && info.install_tag
|
|
20
19
|
? info.install_tag
|
|
@@ -22,6 +21,12 @@ function resolveInstallSpec(info) {
|
|
|
22
21
|
return `@kurrent/kcap@${tag}`;
|
|
23
22
|
}
|
|
24
23
|
|
|
24
|
+
// npm serves a packument from its cache for five minutes; within that window an install can
|
|
25
|
+
// resolve against a listing that predates the platform package's version and silently skip it.
|
|
26
|
+
function npmInstallArgs(spec) {
|
|
27
|
+
return ["install", "-g", spec, "--prefer-online"];
|
|
28
|
+
}
|
|
29
|
+
|
|
25
30
|
// Builds the arg list for the `kcap update --check` probe, forwarding only
|
|
26
31
|
// the channel-switch flags (`--beta`/`--stable`) from the user's `kcap update`
|
|
27
32
|
// invocation. Nothing else is forwarded — the probe already supplies `--check`
|
|
@@ -201,7 +206,7 @@ if (require.main === module) {
|
|
|
201
206
|
binaryDir = path.dirname(require.resolve(`${packageName}/package.json`));
|
|
202
207
|
} catch {
|
|
203
208
|
console.error(`Platform package ${packageName} is not installed.`);
|
|
204
|
-
console.error(`Try: npm
|
|
209
|
+
console.error(`Try: npm ${npmInstallArgs(`@kurrent/kcap@${require("../package.json").version}`).join(" ")}`);
|
|
205
210
|
process.exit(1);
|
|
206
211
|
}
|
|
207
212
|
|
|
@@ -354,7 +359,7 @@ function runUpdate(binaryPath, updArgs) {
|
|
|
354
359
|
}
|
|
355
360
|
}
|
|
356
361
|
|
|
357
|
-
const res = spawnSync("npm",
|
|
362
|
+
const res = spawnSync("npm", npmInstallArgs(resolveInstallSpec(info)), {
|
|
358
363
|
stdio: "inherit",
|
|
359
364
|
windowsHide: true,
|
|
360
365
|
...npmOpts,
|
|
@@ -400,6 +405,7 @@ function runUpdate(binaryPath, updArgs) {
|
|
|
400
405
|
|
|
401
406
|
module.exports = {
|
|
402
407
|
resolveInstallSpec,
|
|
408
|
+
npmInstallArgs,
|
|
403
409
|
probeArgs,
|
|
404
410
|
trashDirFor,
|
|
405
411
|
trashDirFromLauncher,
|
package/bin/refresh.js
CHANGED
package/kcap/.codex-mcp.json
CHANGED
package/kcap/.mcp.json
CHANGED
|
@@ -29,6 +29,12 @@
|
|
|
29
29
|
"cwd": "${CLAUDE_PROJECT_DIR}",
|
|
30
30
|
"description": "Attach the current session to a work item (issue, PR, or a brand-new item) on the Capacitor server, and list the work items a session is attached to."
|
|
31
31
|
},
|
|
32
|
+
"kcap-plans": {
|
|
33
|
+
"command": "kcap",
|
|
34
|
+
"args": ["mcp", "plans"],
|
|
35
|
+
"cwd": "${CLAUDE_PROJECT_DIR}",
|
|
36
|
+
"description": "Plan ledger — declare the plan, spec or design document this session works from (declare_plan_document), declare its task list (set_plan_tasks), record each task's status change (update_plan_task) and read the plan back after compaction (get_plan)."
|
|
37
|
+
},
|
|
32
38
|
"kcap-analytics": {
|
|
33
39
|
"command": "kcap",
|
|
34
40
|
"args": ["mcp", "analytics"],
|
package/kcap/README.md
CHANGED
|
@@ -81,7 +81,7 @@ Each hook pipes its JSON payload through the `kcap` CLI, which enriches it with
|
|
|
81
81
|
- `hide` / `kcap-hide` — Hide the current session (owner-only visibility)
|
|
82
82
|
- `review-flows` / `kcap-review-flows` — Run structured, iterative spec/code review loops; the reviewer vendor is chosen independently of the driver (pass a lowercase token like `claude`/`codex`/`cursor`)
|
|
83
83
|
- `agent-flows` / `kcap-agent-flows` — Run structured multi-participant agent flows (catalog `definition_id` or an inline `definition_yaml`), each participant declaring its own vendor/model
|
|
84
|
-
- `work-items` / `kcap-work-items` — Declare a work item's breakdown (parent and parts) and its blocks / blocked-by dependencies, so Home renders its topology
|
|
84
|
+
- `work-items` / `kcap-work-items` — Declare a work item's breakdown (parent and parts) and its blocks / blocked-by dependencies, so Home renders its topology, and record the loose ends a session leaves unfinished
|
|
85
85
|
- `guided-tour` / `kcap-guided-tour` — Onboarding tour: what Capacitor has recorded for your team, then per-use-case tutorials (evals, session recall, PR review, analytics)
|
|
86
86
|
|
|
87
87
|
In Claude they're invoked as `/kcap:recap`, `/kcap:errors`, `/kcap:guided-tour`, etc.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plans
|
|
3
|
+
description: >-
|
|
4
|
+
This skill should be used whenever you write or read a plan, spec or design
|
|
5
|
+
document, when you start executing a plan, and whenever a task list, todo
|
|
6
|
+
list or checklist comes up — yours or the user's. It says how to record the
|
|
7
|
+
plan and its tasks in Kurrent Capacitor through the `kcap mcp plans` MCP
|
|
8
|
+
tools, so progress shows in the session view and survives context
|
|
9
|
+
compaction.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Plans — declaring the document and its tasks
|
|
13
|
+
|
|
14
|
+
Capacitor keeps its own record of the plan a session executes: the document,
|
|
15
|
+
the ordered task list, and each task's status. It is written only by you,
|
|
16
|
+
through the `kcap-plans` MCP tools; nothing infers it. Three rules:
|
|
17
|
+
|
|
18
|
+
1. **When you write or are handed a plan, spec or design document, declare it.**
|
|
19
|
+
Call `declare_plan_document` with its `kind` (`plan`, `spec` or `design`)
|
|
20
|
+
and `path`. The file is read locally, hashed, and keyed against the
|
|
21
|
+
repository root; declaring the same file again from a later session lands
|
|
22
|
+
on the same plan. When a plan implements a spec, or a spec refines a design,
|
|
23
|
+
pass the other file as `argues_from` so both attach to one plan.
|
|
24
|
+
2. **When a plan has discrete steps, declare them and update each transition.**
|
|
25
|
+
Call `set_plan_tasks` with the whole ordered list (`title`, optional
|
|
26
|
+
`task_id`, `status`, `note`); re-send the whole list when the steps change,
|
|
27
|
+
carrying the `task_id`s you were given. Call `update_plan_task` every time a
|
|
28
|
+
task starts, finishes or is skipped, by `task_id` or 1-based `ordinal`, with
|
|
29
|
+
`status` `pending`, `in_progress`, `completed` or `skipped` and a `note`
|
|
30
|
+
when the reason matters. After compaction, `get_plan` returns the list.
|
|
31
|
+
3. **Keep whatever ledger your own workflow asks for as well.** These tools
|
|
32
|
+
replace the harness's task list, not your notes or any file another
|
|
33
|
+
workflow tells you to maintain.
|
|
34
|
+
|
|
35
|
+
## Tool reference
|
|
36
|
+
|
|
37
|
+
| Tool | Required args | Purpose |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| `declare_plan_document` | `kind`, `path` (+ `argues_from`, `work_item_id`, `session_id`) | Declare the document; returns `plan_id`, `document_key`, `created`. |
|
|
40
|
+
| `set_plan_tasks` | `tasks` (+ `plan_id`, `session_id`) | Replace the declared task list; returns tasks with ids and ordinals. |
|
|
41
|
+
| `update_plan_task` | `status` and one of `task_id` / `ordinal` (+ `note`, `plan_id`) | Record one transition; the result names the plan. |
|
|
42
|
+
| `get_plan` | — (+ `plan_id`, `session_id`) | Documents, tasks with status and source, progress. |
|
|
43
|
+
|
|
44
|
+
Without `plan_id` every tool acts on the session's current plan — the one it
|
|
45
|
+
most recently wrote to; a session on no plan gets one created by
|
|
46
|
+
`set_plan_tasks` and an empty result from `get_plan`. If a tool cannot resolve
|
|
47
|
+
the session, pass `session_id` explicitly.
|
|
48
|
+
|
|
49
|
+
## Requirements
|
|
50
|
+
|
|
51
|
+
Requires `kcap login`. The `kcap-plans` MCP server is registered for every
|
|
52
|
+
supported harness by `kcap setup` and `kcap plugin install`.
|
|
@@ -25,9 +25,10 @@ kcap validate-plan <sessionId>
|
|
|
25
25
|
|
|
26
26
|
## What It Returns
|
|
27
27
|
|
|
28
|
-
The command outputs
|
|
28
|
+
The command outputs these sections:
|
|
29
29
|
|
|
30
|
-
- **`## Plan`** — the full plan text
|
|
30
|
+
- **`## Plan`** — the full plan text: the document declared through the `kcap-plans` MCP tools when there is one, otherwise the server's best discovered candidate, followed by the other candidates
|
|
31
|
+
- **`## Tasks`** — the task list declared through the `kcap-plans` MCP tools, one line per task as `ordinal. [status] title (source)` with a progress line above it; absent when no tasks were declared
|
|
31
32
|
- **`## What's Done`** — two sub-sections:
|
|
32
33
|
- **Summary** — AI-generated summary of what was accomplished (from `WhatsDoneGenerated` events, if available)
|
|
33
34
|
- **Details** — list of files created (`Write`) and modified (`Edit`) during the session
|
|
@@ -36,7 +37,7 @@ The command outputs three sections:
|
|
|
36
37
|
## What To Do With The Output
|
|
37
38
|
|
|
38
39
|
1. Read the plan carefully and identify each distinct planned item
|
|
39
|
-
2. Compare each item against the summary and file list under "What's Done"
|
|
40
|
+
2. Compare each item against the summary and file list under "What's Done"; when a Tasks section is present, treat it as the checklist — a task still pending or in_progress is not done
|
|
40
41
|
3. If all items are complete, confirm to the user that the plan is fully implemented
|
|
41
42
|
4. If there are gaps, list the missing items and complete them now
|
|
42
43
|
|
|
@@ -5,11 +5,14 @@ description: >-
|
|
|
5
5
|
work item — that it breaks into sub-tasks (a parent and its parts), or that
|
|
6
6
|
one piece must land before another (a blocks / blocked-by dependency) — and
|
|
7
7
|
you want that structure recorded so it shows up in Kurrent Capacitor's Home
|
|
8
|
-
"Blockers & dependencies" view and progress figures.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
"Blockers & dependencies" view and progress figures. Also use it at the end of
|
|
9
|
+
a session or a plan step that leaves work unfinished, to record each
|
|
10
|
+
unfinished piece as a loose end in the user's next-work ledger. Use the `kcap
|
|
11
|
+
mcp workitems` MCP tools to DECLARE the breakdown, the relations and the loose
|
|
12
|
+
ends. Do NOT declare STRUCTURE for ordinary "attach this session to issue X"
|
|
13
|
+
correlation alone (a single `declare_work_item` call, no structure), or for a
|
|
14
|
+
single indivisible task with no parts and no dependencies — a loose end is
|
|
15
|
+
worth declaring in either case.
|
|
13
16
|
---
|
|
14
17
|
|
|
15
18
|
# Work items — declaring breakdown and dependencies
|
|
@@ -36,6 +39,8 @@ no breakdown.
|
|
|
36
39
|
- Two items describe the same work (a title-only item you created and the
|
|
37
40
|
issue/PR-keyed item the server minted) → merge yours into the keyed one.
|
|
38
41
|
- The session was attached to the wrong item → detach it.
|
|
42
|
+
- You are ending a session, or a plan step, with work you did not finish → declare
|
|
43
|
+
it as a loose end so it lands in the user's next-work ledger instead of evaporating.
|
|
39
44
|
|
|
40
45
|
## The flow
|
|
41
46
|
|
|
@@ -69,6 +74,16 @@ two — that records structure that isn't there. Merge instead:
|
|
|
69
74
|
removal is durable for automated correlation; an attachment a user pinned cannot be
|
|
70
75
|
removed by an agent.
|
|
71
76
|
|
|
77
|
+
## Loose ends
|
|
78
|
+
|
|
79
|
+
A loose end is one concrete piece of unfinished work — a missing test, a TODO you left in
|
|
80
|
+
the code, a follow-up the user asked for. Declare each with `declare_loose_end` (`text`,
|
|
81
|
+
one plain sentence). The server keys it on the session, the owner and the normalized text,
|
|
82
|
+
so declaring the same end twice is a no-op (`created: false`). It refuses text shorter than
|
|
83
|
+
12 or longer than 500 characters and "none"-style phrases — do not declare that there is
|
|
84
|
+
nothing left. Loose ends are the user's; they are never converted into work items by this
|
|
85
|
+
tool.
|
|
86
|
+
|
|
72
87
|
## Rules the server enforces
|
|
73
88
|
|
|
74
89
|
- **Visibility, not repository.** Every item you name must be visible to you.
|
|
@@ -88,15 +103,16 @@ two — that records structure that isn't there. Merge instead:
|
|
|
88
103
|
|
|
89
104
|
| Tool | Required args | Purpose |
|
|
90
105
|
|---|---|---|
|
|
91
|
-
| `declare_work_item` | exactly one of `issue_key` \| `pr_number` \| `work_item_id` \| `new_title` | Attach the session to a work item (or create one). `session_id` defaults to
|
|
106
|
+
| `declare_work_item` | exactly one of `issue_key` \| `pr_number` \| `work_item_id` \| `new_title` | Attach the session to a work item (or create one). `session_id` defaults to the current session. |
|
|
92
107
|
| `get_session_work_items` | — | List what the current session is attached to. |
|
|
108
|
+
| `declare_loose_end` | `text` | Record one unfinished item in the user's next-work ledger. `session_id` defaults to the current session. |
|
|
93
109
|
| `declare_work_breakdown` | `parent_id`, `part_ids` | Declare parent → parts. |
|
|
94
110
|
| `retract_work_breakdown` | `parent_id`, `part_ids` | Detach parts from the parent. |
|
|
95
111
|
| `declare_work_relation` | `from_id`, `to_id`, `relation_kind` (`blocks`\|`blocked_by`) | Declare a dependency. |
|
|
96
112
|
| `retract_work_relation` | `from_id`, `to_id`, `relation_kind` | Retract a dependency. |
|
|
97
113
|
| `get_work_item_topology` | `work_item_id` | Read parent, parts, and dependencies (visibility-scoped). |
|
|
98
114
|
| `merge_work_item` | `work_item_id`, `into_work_item_id` | Merge a duplicate into the survivor (prefer the keyed item as survivor). |
|
|
99
|
-
| `detach_work_item` | `work_item_id` | Detach the session from a wrongly attached item. `session_id` defaults to
|
|
115
|
+
| `detach_work_item` | `work_item_id` | Detach the session from a wrongly attached item. `session_id` defaults to the current session. |
|
|
100
116
|
|
|
101
117
|
## Requirements
|
|
102
118
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kurrent/kcap",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "CLI companion for Kurrent Capacitor — records and visualizes Claude Code sessions",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"repository": {
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
"postinstall": "node bin/postinstall.js"
|
|
15
15
|
},
|
|
16
16
|
"optionalDependencies": {
|
|
17
|
-
"@kurrent/kcap-darwin-arm64": "1.0
|
|
18
|
-
"@kurrent/kcap-linux-arm64": "1.0
|
|
19
|
-
"@kurrent/kcap-linux-musl-arm64": "1.0
|
|
20
|
-
"@kurrent/kcap-linux-musl-x64": "1.0
|
|
21
|
-
"@kurrent/kcap-linux-x64": "1.0
|
|
22
|
-
"@kurrent/kcap-win-x64": "1.0
|
|
17
|
+
"@kurrent/kcap-darwin-arm64": "1.1.0",
|
|
18
|
+
"@kurrent/kcap-linux-arm64": "1.1.0",
|
|
19
|
+
"@kurrent/kcap-linux-musl-arm64": "1.1.0",
|
|
20
|
+
"@kurrent/kcap-linux-musl-x64": "1.1.0",
|
|
21
|
+
"@kurrent/kcap-linux-x64": "1.1.0",
|
|
22
|
+
"@kurrent/kcap-win-x64": "1.1.0"
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"bin/",
|
|
26
26
|
"kcap/"
|
|
27
27
|
],
|
|
28
|
-
"kcapReleaseCommit": "
|
|
29
|
-
"kcapReleaseTag": "v1.0
|
|
28
|
+
"kcapReleaseCommit": "0d5409540aeff85a0e674505bede436ded6c35ff",
|
|
29
|
+
"kcapReleaseTag": "v1.1.0"
|
|
30
30
|
}
|