diff --git a/CLAUDE.md b/CLAUDE.md index 1a8ca17..4d9c26a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,7 +2,7 @@ **TweakIdea** -A Claude Code skillset (slash commands + subagent definitions) that helps founders evaluate startup problems and discover product opportunities. Seven commands: `/tweak:browse-hn` searches HN via Algolia and ranks candidate threads to feed into `/tweak:analyze-hn-post`; `/tweak:analyze-hn-post` analyzes a single Hacker News discussion to identify technology shifts and surface product ideas; `/tweak:evaluate` runs 14 independent subagents to produce a weighted scorecard with assumption tracking; `/tweak:improve` reads a completed run and generates three concrete idea tweaks (small reframe, medium reshape, big reimagine) grounded in scoring rubrics; `/tweak:diff` compares two evaluation runs side-by-side showing score deltas, potential shifts, and per-dimension movers; `/tweak:list` and `/tweak:show` browse and open artifacts accumulated under `~/.tweakidea/`. +A Claude Code skillset (slash commands + subagent definitions) that helps founders evaluate startup problems and discover product opportunities. Eight commands: `/tweak:browse-hn` searches HN via Algolia and ranks candidate threads to feed into `/tweak:analyze-hn-post`; `/tweak:analyze-hn-post` analyzes a single Hacker News discussion to identify technology shifts and surface product ideas; `/tweak:evaluate` runs 14 independent subagents to produce a weighted scorecard with assumption tracking; `/tweak:improve` reads a completed run and generates three concrete idea tweaks (small reframe, medium reshape, big reimagine) grounded in scoring rubrics; `/tweak:diff` compares two evaluation runs side-by-side showing score deltas, potential shifts, and per-dimension movers; `/tweak:list` and `/tweak:show` browse and open artifacts accumulated under `~/.tweakidea/`; `/tweak:share` uploads a run's HTML report to a secret GitHub gist and returns a shareable rendered preview URL. **Core Value:** Help founders make better decisions -- evaluate whether a problem is worth solving, or discover what problems are emerging from technology shifts. diff --git a/README.md b/README.md index dc97030..1310d25 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,15 @@ Opens any artifact under `~/.tweakidea/` by timestamp, keyword, HN id, founder n - `/tweak:show hn 43374458` — an HN analysis by id - `/tweak:show best ideas` — ranked query over saved runs +### `/tweak:share` + +Uploads a run's `report.html` to a secret GitHub gist and prints two links — the gist itself and an `htmlpreview.github.io` rendered URL you can paste into Slack or email. Requires the [GitHub CLI](https://cli.github.com) (`gh auth login`). + +- `/tweak:share` — share the most recent run +- `/tweak:share latest` — same, explicit +- `/tweak:share 20260412-143022` — a specific run by timestamp +- `/tweak:share restaurant food waste` — keyword match on idea text + ## Prerequisites > [!IMPORTANT] @@ -155,7 +164,7 @@ Opens any artifact under `~/.tweakidea/` by timestamp, keyword, HN id, founder n npx tweakidea ``` -The installer prompts for global (`~/.claude`) or local (`./.claude`) placement. After install, open Claude Code and type `/tweak:` — you should see `browse-hn`, `diff`, `evaluate`, `improve`, `list`, `show`, and `analyze-hn-post` in the autocomplete. +The installer prompts for global (`~/.claude`) or local (`./.claude`) placement. After install, open Claude Code and type `/tweak:` — you should see `browse-hn`, `diff`, `evaluate`, `improve`, `list`, `share`, `show`, and `analyze-hn-post` in the autocomplete. > [!NOTE] > First `/tweak:evaluate` run takes 10-20 minutes — it creates your founder profile, runs the researcher, and dispatches 14 parallel Sonnet evaluators plus one Opus synthesis pass. Subsequent runs reuse the founder profile and finish faster. diff --git a/bin/install.js b/bin/install.js index f4ffcff..82c93ac 100755 --- a/bin/install.js +++ b/bin/install.js @@ -416,6 +416,7 @@ function install(isGlobal) { console.log(` ${bold}/tweak:evaluate${reset} ${dim}"Your startup idea description"${reset}`); console.log(` ${bold}/tweak:improve${reset} ${dim}latest${reset}`); console.log(` ${bold}/tweak:list${reset} ${dim}runs 20${reset}`); + console.log(` ${bold}/tweak:share${reset} ${dim}latest${reset}`); console.log(` ${bold}/tweak:show${reset} ${dim}latest${reset}`); console.log(''); } diff --git a/bin/manifest.js b/bin/manifest.js index 59ce27e..543c8a8 100644 --- a/bin/manifest.js +++ b/bin/manifest.js @@ -20,6 +20,7 @@ const COMMAND_FILES = [ 'commands/tweak/evaluate.md', 'commands/tweak/improve.md', 'commands/tweak/list.md', + 'commands/tweak/share.md', 'commands/tweak/show.md', 'commands/tweak/analyze-hn-post.md', ]; diff --git a/commands/tweak/share.md b/commands/tweak/share.md new file mode 100644 index 0000000..006823d --- /dev/null +++ b/commands/tweak/share.md @@ -0,0 +1,50 @@ +--- +name: tweak:share +description: Upload a run's report.html to a secret GitHub gist and print the gist + rendered preview URLs +argument-hint: +allowed-tools: + - Bash + - Read + - AskUserQuestion +--- + +## Purpose + +Publish a run's `report.html` as a secret GitHub gist and print both the gist URL and a `htmlpreview.github.io` rendered URL for sharing. + +$ARGUMENTS + +## Argument handling + +Resolve `$ARGUMENTS` to a single run under `~/.tweakidea/runs/`. Accept: empty or `latest` → newest run; a timestamp or prefix (`20260419`, `20260419-202954`); a keyword matched against `idea.json` across the 50 newest runs; or a ranked query (`best ideas`, `top 3 GO`, `potential > 4`) — pick the top hit. + +Runs only. If the query looks like an HN id (`hn-`, `hn `, or a bare numeric id) or `founder`/`me`, print one line — `/tweak:share is for evaluation runs only — HN and founder artifacts have no report.html.` — and stop. + +If a keyword or prefix matches 2–5 runs, use `AskUserQuestion` to pick; if more than 5, render the 5 newest matches and stop without uploading. + +## Preflight + +Require `gh`: `command -v gh >/dev/null && gh auth status >/dev/null 2>&1`. On failure, print exactly one line — `gh CLI not available or not logged in — install at https://cli.github.com and run \`gh auth login\`, then retry.` — and stop before any network call. + +## Upload + +Read `idea.json` from the resolved run to build the gist description: + +- Present and populated: `TweakIdea: ` (if `codename`/`subtitle` are empty, use the first ~80 chars of `problem`). +- Missing (legacy runs without `idea.json`): `TweakIdea evaluation ()`. + +Then run `gh gist create "/report.html" --desc ""`. Secret by default; no `--public` flag. Capture stdout, take the last non-empty line, and trim surrounding whitespace — that's the gist URL, of the form `https://gist.github.com//`. + +## Output + +On the success path, print exactly this — two sections, each a bold label on its own line followed by the URL on the next line in markdown autolink syntax (angle brackets), with one blank line between the sections. No surrounding prose, no commentary. + + **Code** + /> + + **Preview** + //raw/report.html> + +Derive `/` by stripping the `https://gist.github.com/` prefix from the trimmed upload URL. + +Never write under `~/.tweakidea/`. Never spawn agents. Each invocation creates a new gist — do not attempt to update or reuse prior ones. diff --git a/package.json b/package.json index 2fbd13b..229c3cb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tweakidea", - "version": "2.0.3", + "version": "2.1.0", "description": "14-dimension startup idea evaluator for Claude Code", "bin": { "tweakidea": "bin/install.js"