Skip to content

v1.6.19 — star nudge + full hardening pass#10

Merged
Anuj7411 merged 9 commits into
mainfrom
star-nudge
Jun 28, 2026
Merged

v1.6.19 — star nudge + full hardening pass#10
Anuj7411 merged 9 commits into
mainfrom
star-nudge

Conversation

@Anuj7411

Copy link
Copy Markdown
Owner

Closes the usage-vs-stars gap (~4k npm downloads/mo vs ~33 stars: people use it, nothing ever asks them to star).

Changes

  • One-time in-CLI star nudge. After sipcode proxy --stats shows real rewrites (totalInvocations > 0), print one line pointing to the repo. Shown once per machine ever, gated on a ~/.sipcode/.star-nudge marker (same pattern as the proxy/install markers). Never in --json, never when zero rewrites, never blocks, zero network calls (privacy guard green).
    • New src/lib/starNudge.ts is a pure gate (hasMarker/writeMarker seam); copy lives in MESSAGES.starNudge.
  • README social-proof badges. Live GitHub-stars badge (self-reinforcing) + monthly npm-downloads badge (shows real adoption).

Verification

  • 1,380 tests green (1,373 + 7 new: 4 helper unit + 3 proxy integration)
  • typecheck + lint clean; privacy + no-shell-args guards green
  • Nudge proven: shows once, then never again; absent in JSON and on empty stats

Note: the nudge is mild "ceremony" against the lean-output ethos, but it's one line at a real value moment, consistent with the ▸ next: hints the CLI already prints. Needs a patch release to reach users.

🤖 Generated with Claude Code

Anuj7411 and others added 9 commits June 27, 2026 03:01
…ings

Closes the gap between usage and stars: 4k downloads/mo vs ~33 stars because
nothing ever asks. After `sipcode proxy --stats` shows real rewrites
(totalInvocations > 0), print one line pointing to the repo. Shown ONCE per
machine ever, gated on a ~/.sipcode/.star-nudge marker (same pattern as the
proxy/install markers). Never in --json mode, never when zero rewrites, never
blocks, and makes no network call (privacy guard stays green).

New src/lib/starNudge.ts is a pure gate (hasMarker/writeMarker seam); the
copy lives in MESSAGES.starNudge. 7 new tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A live star-count badge is self-reinforcing social proof, and a monthly
downloads badge shows real adoption (~4k/mo). Both are the highest-ROI
README change for converting visitors to stars.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`sipcode today` summarizes all of today's sessions and does not accept
--here; only `why` and `stats` register it. Correct the tip that wrongly
listed today.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`why --here` / `stats --here` computed the project hash by replacing only
`:` and slashes, but Claude Code also turns whitespace into `-` (so
"C:\Projects\just research" is stored as "C--Projects-just-research"). The
mismatch made --here silently find zero sessions for any path with a space.

Extract a single cwdToProjectHash() in discover.ts (now also collapses
whitespace) and use it from both why's listSessionsHere and stats, so the two
copies can't drift again. 4 new tests pin the encoding.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two correctness bugs from a full component audit:

1. cwdToProjectHash only collapsed `:/\ + whitespace`, but Claude Code
   replaces EVERY non-alphanumeric with `-` (verified: ".claude-mem" dir is
   stored as "--claude-mem"). So --here still mismatched any path with a dot,
   paren, underscore, etc. Now uses /[^A-Za-z0-9]/g.

2. tsc rewriter appended `2>&1 | head` with no pipefail, so a FAILING
   typecheck returned head's exit 0 — reporting a broken build as success to
   Claude. Prepend `set -o pipefail;` so tsc's non-zero status propagates.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ssion

From the full component audit, all verified + tested:

- today/forecast/trend no longer crash on `--agent auto` (advertised in help)
  or a typo: route through resolveAgentFromOpts (quiet) like stats, plus the
  cursor "not supported" message. Was getAgentById(undefined).discoverSessions.
- init --no-proxy/--no-marker/--no-verify-mcp/--no-claude-md and receipt
  --no-share now honored: cli.ts translates Commander's opts.x=false → opts.noX
  (drift already did this; init/receipt didn't).
- proxy cat rewriter no longer matches `type` (a bash builtin that reports
  command type, not a file reader — awk rewrite changed its meaning).
- proxy grep rewriter no longer collapses `grep -rn`/-A/-B/-C/-o to `-c`
  (which dropped the exact lines/numbers requested); head-caps instead.
- impact now skips empty/zero-token sessions like stats/today/forecast/trend.
- docs: receipt makes a PNG not a "PDF" (README + llms-full); sample file
  opus-4-7 → opus-4-8.

NOTE: did NOT add pipefail to git/find/ls/grep/npm head-caps — on a successful
command with long output, head closing early SIGPIPE-kills it and pipefail
would report exit 141 (false failure). Only tsc is safe (success = no output).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The exit-code masking bug wasn't just tsc — every output cap (git, find, ls,
grep, npm, tsc) used `cmd | head -N`, so a FAILING command returned head's
exit 0 and looked successful to Claude. Naively adding `pipefail` would have
made it WORSE: head closes the pipe early, SIGPIPE-killing a SUCCESSFUL
long-output command → exit 141 (false failure).

Correct fix, in one shared base.capLines(): `set -o pipefail; cmd | awk
'NR<=N'`. awk prints only the first N lines but reads the WHOLE stream, so the
command always runs to completion (no SIGPIPE) and pipefail propagates its
true exit code. awk is already a proxy dependency (cat rewriter). Trade-off:
find/ls/grep can no longer stop early on huge trees (sub-second on a normal
repo); correctness wins.

All 6 rewriters now route through capLines; 100 rewriter tests updated to the
awk form. Full suite 1,387 green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
why (no --session) and MCP audit_latest_session picked sessions[0] blindly, so
an empty or in-flight latest transcript rendered an all-zero report. Both now
scan newest-first and pick the first non-empty session (drift already did
this), falling back to the newest if all are empty. Parses lazily, stops at
the first hit. Regression test added.

This closes the last item from the full component audit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bundles the growth work (one-time star nudge, README social-proof badges) with
a complete component-audit hardening batch: proxy exit-code preservation across
all output caps, --here full path encoding, today/forecast/trend agent-crash
fix, init/receipt --no-* flags, cat/grep rewriter corrections, and consistent
empty-session skipping in impact/why/MCP.

Bump 1.6.18 -> 1.6.19. CHANGELOG 1.6.19 entry + link ref. README badge,
llms.txt / llms-full.txt, landing page, and server.json all -> 1.6.19 / 1,388.

Tests: 1,373 -> 1,388, full suite green; privacy + no-shell-args guards green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Anuj7411 Anuj7411 changed the title Growth: one-time star nudge + README social-proof badges v1.6.19 — star nudge + full hardening pass Jun 28, 2026
@Anuj7411 Anuj7411 merged commit 690b6ac into main Jun 28, 2026
1 check passed
@Anuj7411 Anuj7411 deleted the star-nudge branch June 28, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant