feat(distribution): Claude plugin runtime + dist/ in git + Windows doctor#13
Merged
Conversation
Three small polish items folded onto the multi-channel branch before flipping #13 out of draft: - New `.githooks/pre-commit` rebuilds dist/ + statusline assets whenever staged files touch any build input (server/, cli/, scripts/, statusline/, hooks/, skills/, package.json, plugin.json, bun.lock). Pure docs/test/PRD commits skip the rebuild and stay fast. Without this hook it's easy to land main with dist/ out-of-sync from source — exactly the failure mode dist-in-git was supposed to prevent. - `package.json` adds a `prepare` script that runs `git config core.hooksPath .githooks` so contributors who clone + `bun install` get the hook for free. The `|| true` keeps it silent in environments without git (npm tarball install). - README: drop the new "lightweight companion layer for developers who want their coding environment to feel present, responsive, and alive" sentence. It read more abstract/marketing than the existing "still there at 2am when you're stuck on a bug" line right below it. Less is more.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lands the G0 multi-channel distribution work from PRD-v3.md plus polish items: doctor.ts Windows support, golden retriever frame mapping fix, hermetic build:reactions.
Summary
G0 multi-channel distribution
.claude-plugin/plugin.json: switch frombun + server/index.ts(required bun + source on disk) tonode + dist/server.js(works as long as the user has node).gitignore: drop thedist/line so the bundled artifacts that ship to npm are also visible to plugin / git-clone install pathscli/plugin-manifest.test.ts: pins the manifest tonode + dist/server.jsso future regression doesn't quietly break plugin installs.githooks/pre-commit: rebuilds dist/ + statusline assets when staged files touch any build input. Pure doc/test/PRD commits skip the rebuildpackage.jsonaddspreparescript so contributors get the hook automatically onbun installHermetic build:reactions
scripts/build-reactions.tsonly writesdist/reactions-pool.jsonby default — no longer touches~/.petsonality/sync:reactionsscript (and--sync-runtimeflag /PETSONALITY_SYNC_RUNTIME=1env var) for the dev "I want my local hooks updated" pathscripts/build-reactions.test.tsverifies the hermetic guaranteeDoctor Windows polish (PRD M5 item)
tryExeccalls with native equivalents (cmd.exe /c ver,$PSVersionTable,WT_SESSION/ConEmuANSI, etc.).ps1on Windowscli/doctor.test.tsBug fixes
.shand.ps1after PR fix: redesign golden retriever art + inline pet card for VSCode terminal #12's art redesign — fixed in both rendererscli/statusline-art.test.tsextended for the new art structureREADME polish
npm-0.4.0badge with the dynamicnpm/v/petsonalitybadge — auto-updates on each releaseTests
```
bun test
311 → 317 pass (+6 across plugin-manifest.test, build-reactions.test, doctor.test, statusline-art.test)
```
Test Plan
bun test(317 pass)bun run build(clean)npm pack --dry-runshowsdist/artifacts in tarballclaude plugin installsmoke testing — pending real-host verification post-mergeKnown follow-up
dist/reactions-pool.jsonis non-deterministic across builds:scripts/build-reactions.tssamples 200 random times into a Set, so the iteration order varies between runs. This produces ~700 lines of harmless noise in commits that touched build inputs. Worth a follow-up PR to make the build deterministic (sort the output, or iterate the source pools deterministically without sampling).Refs
PRD-v3.md G0 (multi-channel distribution architecture). Closes the open task list there except for Homebrew formula (long-term) and the live Windows / plugin smoke tests (need real host).