From ddca5fc788068edebab707dd9604934a084b465b Mon Sep 17 00:00:00 2001 From: Ben Barber Date: Thu, 20 Aug 2026 13:26:54 -0400 Subject: [PATCH] plugin: compose a title and description when sharing /path:share and /path:link-pr now write a 2-4 word title and a one or two sentence description for the session and pass them via --title and --description; user-supplied values win. link-pr uses the title as the PR link text. MIN_VERSION moves to 0.18.0 (the first CLI with the flags); plugin version 0.3.0. --- .claude-plugin/marketplace.json | 2 +- CHANGELOG.md | 8 ++++++++ plugins/claude-code/.claude-plugin/plugin.json | 2 +- plugins/claude-code/commands/link-pr.md | 5 +++-- plugins/claude-code/commands/share.md | 11 ++++++++++- plugins/claude-code/scripts/ensure-path.sh | 2 +- 6 files changed, 24 insertions(+), 6 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 335ee3c6..c524b41f 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -10,7 +10,7 @@ { "name": "path", "description": "Slash commands for the Toolpath path CLI: /path:share uploads an agent session to Pathbase, /path:query runs jaq queries over your local session cache. Installs the path binary globally on first use", - "version": "0.2.0", + "version": "0.3.0", "author": { "name": "Empathic" }, diff --git a/CHANGELOG.md b/CHANGELOG.md index c625f68f..731ac32a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to the Toolpath workspace are documented here. +## Claude Code plugin 0.3.0 — 2026-08-21 + +`/path:share` and `/path:link-pr` now compose a short title and a one +or two sentence description of the shared session and pass them via +`path share`'s new `--title`/`--description` flags; user-supplied +values win. `/path:link-pr` uses the composed title as the PR link +text. `MIN_VERSION` moves to 0.19.0, the first CLI with the flags. + ## path-cli 0.19.0 — 2026-08-21 `path share` and `path p export pathbase` gain `--title` and diff --git a/plugins/claude-code/.claude-plugin/plugin.json b/plugins/claude-code/.claude-plugin/plugin.json index 9cac6301..91560c83 100644 --- a/plugins/claude-code/.claude-plugin/plugin.json +++ b/plugins/claude-code/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "path", - "version": "0.2.0", + "version": "0.3.0", "description": "Toolpath for Claude Code — /path:share uploads an agent session to Pathbase, /path:query answers questions about your local session history. Bundles the path CLI, installed globally on first use", "author": { "name": "Empathic" diff --git a/plugins/claude-code/commands/link-pr.md b/plugins/claude-code/commands/link-pr.md index 3f943174..579ec275 100644 --- a/plugins/claude-code/commands/link-pr.md +++ b/plugins/claude-code/commands/link-pr.md @@ -35,10 +35,11 @@ Same rules as `/path:share`: - Share the current conversation — the "Current session id" from the context above (fall back to the newest row of `"${CLAUDE_PLUGIN_ROOT}/scripts/ensure-path.sh" sessions` if it reads `unknown`). - If the Auth context shows no login and the user didn't pass `--anon`, stop and ask: anonymous upload, or `path auth login` in their own terminal first (never run it yourself)? +- Compose a title and description for the upload, same as `/path:share`: a 2–4 word title naming the work and one or two sentences summarizing what the session did — for this command that's usually the work behind the PR. User-supplied `--title`/`--description` win. - Run, passing through any of `--anon`, `--public`, `--repo`, `--name`, `--url` from the arguments: ``` - ... exec share --harness claude --project --session + ... exec share --harness claude --project --session --title --description <description> ``` Note the Pathbase URL it prints. @@ -53,7 +54,7 @@ Note the Pathbase URL it prints. --- - Agent session: [<short description of what the session did>](<pathbase-url>) + Agent session: [<the title you composed for the share>](<pathbase-url>) ``` If an `Agent session:` line already exists for a different session, add a new line under it rather than replacing it. diff --git a/plugins/claude-code/commands/share.md b/plugins/claude-code/commands/share.md index c54cf6a2..a76848ab 100644 --- a/plugins/claude-code/commands/share.md +++ b/plugins/claude-code/commands/share.md @@ -38,10 +38,19 @@ If the current session id reads `unknown`, treat the newest row of the `sessions If the Auth context shows no valid login and the user did not pass `--anon`, stop and ask: upload anonymously (`--anon` — unlisted, addressable only by UUID), or log in first? Logging in means the user runs `path auth login` in their own terminal (it needs an interactive code paste — never run it yourself), then re-runs `/path:share`. +### Compose a title and description + +Write both yourself before uploading — they become the shared page's header: + +- **Title**: very short, 2–4 words naming the work (e.g. "Rate limiter retry", "Login form fix"). Not a sentence, no trailing period. +- **Description**: one or two sentences summarizing what the session did and how it turned out. + +For the current session, summarize the conversation you're in. For another session, base them on its first-user-message column from the listing (and, if that's too thin to summarize, `exec show <harness> --project <absolute cwd> --session <session-id>`). If the user supplied `--title` or `--description` in the arguments, theirs win — don't compose that field. + ### Upload ``` -"${CLAUDE_PLUGIN_ROOT}/scripts/ensure-path.sh" exec share --harness <harness> --session <session-id> [flags] +"${CLAUDE_PLUGIN_ROOT}/scripts/ensure-path.sh" exec share --harness <harness> --session <session-id> --title <title> --description <description> [flags] ``` - Add `--project <absolute cwd>` for claude/gemini/pi session ids; omit it for codex/opencode/cursor/copilot. diff --git a/plugins/claude-code/scripts/ensure-path.sh b/plugins/claude-code/scripts/ensure-path.sh index 1ccaadb5..81656159 100755 --- a/plugins/claude-code/scripts/ensure-path.sh +++ b/plugins/claude-code/scripts/ensure-path.sh @@ -32,7 +32,7 @@ REPO="empathic/toolpath" INSTALL_DIR="${TOOLPATH_INSTALL_DIR:-$HOME/.local/bin}" FALLBACK_DIR="${TOOLPATH_CONFIG_DIR:-$HOME/.toolpath}/bin" # Oldest release whose CLI surface the plugin's commands are written against. -MIN_VERSION="0.15.0" +MIN_VERSION="0.19.0" TMPDIR_CLEANUP="" log() { echo "$@" >&2; }