Skip to content

Releases: joedanz/pbrain

v0.1.0 — First PBrain release

17 Apr 16:43
dd84fee

Choose a tag to compare

The first PBrain release. Adaptation work was phased across four PRs merged to master incrementally; this release tags the final state after all four phases plus the pre-tag polish wave below.

Pre-tag polish and dogfood fixes

Everything merged between the Phase 4 merge and the v0.1.0 tag actually moving — installer work, doctor false-positive cleanup, project onboarding primitives, and issues that surfaced dogfooding PBrain against a real Obsidian vault on Google Drive.

  • pbrain doctor is quiet when there's nothing to fix. Three more false-positive classes eliminated: (1) the skill_symlinks check no longer dumps "shadowed by other plugins: claude:..., cursor:..., windsurf:..." for all 78 entries when your installed symlinks happen to point at a sibling PBrain checkout (e.g. ~/.pbrain-repo while you're running doctor from a dev clone) — a new ours-elsewhere state detects any pbrain tree via package.json.name === 'pbrain' and the message now reads installed — claude: 26, cursor: 26, windsurf: 26 (symlinks resolve to sibling checkout at <path>). (2) The resolver_health MECE overlap between maintain and citation-fixer on the trigger "citation audit" is gone — removed from maintain since citation-fixer is the specialized skill for that phrase. (3) Seven skills (ingest, enrich, setup, signal-detector, idea-ingest, media-ingest, meeting-ingestion) now reference skills/conventions/quality.md alongside their local citation / Iron-Law recap, silencing the DRY-violation warnings while keeping the inline guidance readable. Doctor's health score on a fresh install now reflects only real, user-actionable issues.
  • pbrain doctor no longer cries wolf on PGLite or on project/repo pairs that share a name. The DUPLICATE_SLUG check was firing every time you onboarded a project whose repo name matches its product name — projects/pbrain + repos/joedanz/pbrain always collide on the tail "pbrain," even when every wikilink in the brain is path-qualified and there's no real ambiguity. It now fires only when a bare-slug [[tail]] wikilink actually references the ambiguous tail, and the message points at the exact page referencing it so you can fix it in one edit. Separately, the pgvector and rls checks stop reporting "Could not check ..." for PGLite users — pgvector is bundled with the PGLite WASM runtime and RLS is meaningless for a local embedded DB, so both now report green with an explanatory message. Your doctor health score now reflects real problems, not check-runner noise.
  • project-onboard accepts the product name and domain as positional arguments in any order, and infers the repo from your current directory. Call it with project-onboard <name> <domain> from inside a repo and that's all you need — no repo URL, no keyword wrapping. Args are classified by shape, not position: anything with a slash is the repo, anything with a TLD is the domain, everything else is the display name. The project slug resolves in priority order — explicit display name wins, then domain root, then package.json, then the repo name with suffixes like -web / -app / -monorepo stripped — so a repo called <name>-web still gets filed under projects/<name>. Use project=<value> as a named escape hatch when a display name itself looks like a domain.
  • Onboard a coding project once, and every future Claude Code session in that project already knows it. The project-onboard skill now installs a short ## pbrain declaration into the project's own CLAUDE.md at the end of its run — slug, brain-query guidance, and the pbrain remember recipe. Every subsequent session in that project auto-recognizes it and routes brain lookups to the right slug; the skill's new Phase 0 idempotency gate short-circuits in ~5ms so re-invocation is a free no-op. No machine-wide hook, no ~/.claude/settings.json edit, no manually-written .pbrain-project marker — just one gesture per project, ever. Delete the ## pbrain section to stop tracking. Per-project opt-in keeps client checkouts and scratch clones out of your brain by default.
  • New: pbrain remember "<summary>" records a decision on the current project without you passing a slug. Run it from inside any onboarded repo and it resolves cwd → brain slug via the resolver PR #18 shipped, then appends a dated timeline entry to repos/<owner>/<name>. "Switched auth from Clerk to Better Auth for Convex compatibility" is one command, not an LLM prompt. Exits with a helpful pointer at the project-onboard skill when cwd isn't a tracked project.
  • New: pbrain whoami --json emits {slug, matchedVia, cwd} as machine-readable JSON so skills and scripts can decide what to do without parsing prose. This is the primitive the project-onboard skill's idempotency gate shells out to, and the shape any future SessionStart hook or agent decision-tree can consume.
  • New: pbrain canonical-url <url> is the single source of truth for git-URL canonicalization. Wraps the internal normalizeGitUrl() so skills, scripts, and CI shell out for a guaranteed-consistent form (lowercase host/path, .git stripped, https:// scheme) across SSH, HTTPS, scp-form, ssh+port, and git:// inputs. Hand-rolling normalization in skill prose was fragile; now there's one command that can't drift from the engine's lookup query.
  • Breaking (dev-only): findRepoByUrl is now a GIN-indexed frontmatter.github_url containment query — body-scan ILIKE path deleted. Pages written by the project-onboard skill now carry github_url: <canonical> in frontmatter; the lookup query uses frontmatter @> jsonb_build_object('github_url', $1) and hits idx_pages_frontmatter directly. Repo-page resolution at session start went from an unindexed sequential ILIKE '%<url>%' over every repos/* body to a ~1ms indexed containment check. No backfill is shipped — PBrain is pre-release and there are no production users with legacy body-scan-only pages to migrate. The project-onboard skill has been updated to write type: source + canonical github_url in frontmatter on every new page, and the repo slug convention moved to collision-free nested repos/<owner>/<name> (was repos/<owner>-<name>, which could collapse foo-bar/baz and foo/bar-baz to the same slug).
  • One-line installer — curl … | bash and you have a working PBrain. curl -fsSL https://raw.githubusercontent.com/joedanz/pbrain/master/scripts/install.sh | bash now detects or installs Bun, clones the repo into ~/.pbrain-repo, runs bun install && bun link, prompts for your Obsidian vault, runs pbrain init, and optionally registers skills into Claude Code / Cursor / Windsurf — in a single pipe. Re-run to upgrade: the installer is idempotent, detects the existing checkout, and runs git pull && bun install on top of it. Fully scriptable for agents and CI with --brain-path, --install-dir, --branch, --yes, --skip-skills, --skip-init, and --dry-run flags (plus matching PBRAIN_* env vars). Refuses to run as root, points Windows users at WSL, and degrades cleanly when piped without a TTY. See docs/install.md for the full reference.
  • pbrain whoami tells you which brain project your current directory maps to. cd into a repo, run pbrain whoami, and get back the brain slug — either from a .pbrain-project marker you dropped (wins on monorepos and sub-projects) or inferred from your git remotes (canonicalized across SSH/HTTPS/ssh+port/GitHub-Enterprise shapes, matched against the GitHub: line project-onboard writes into each repos/<owner>-<slug>.md page). Tries remotes in precedence order — origin, then upstream, then any others — so if you're in a fork whose canonical lives upstream, it still resolves. Stops the ancestor marker-walk at $HOME so a dotfiles repo in ~ can't falsely claim unrelated subdirectories, and handles git worktrees and submodules correctly via .git-file gitdir pointers. --verbose lists what every layer tried so you can tell exactly why a miss happened. This is the first piece of the auto-brain-inject experience — the primitive a future SessionStart hook or /pbrain-context command will use to pull the right project's graph neighborhood into your Claude Code session automatically. Also exposed as the MCP op find_repo_by_url for any tool that wants the URL → repo-page lookup on its own.
  • Breaking: Claude Code plugin distribution removed. Install via git clone && bun install && bun link. The plugin was skills-only — it shipped the 26 markdown skill files without the pbrain CLI that those skills call. Users who installed it hit "command not found: pbrain" the first time a skill tried to search or write, with no clear path forward. We removed the .claude-plugin/ manifest and the OpenClaw bundle manifest entirely. The CLI route (README.md Standalone CLI section) is now the canonical install for everyone — humans, agents, IDE users. IDE skill registration still works via pbrain install-skills (run it after bun link). A follow-up PR will add a one-line bootstrap installer.
  • pbrain init now requires --brain-path on fresh installs; reuses it on re-init. Before: bare pbrain init wrote a config with no brain_path, leaving every skill stranded without a folder to write into. After: fresh installs (no prior ~/.pbrain/config.json) fail fast with a clear error unless you pass --brain-path ~/ObsidianVault/MyBrain or set PBRAIN_BRAIN_PATH. Re-runs on already-configured machines reuse the saved path silently, so the git pull && bun install && pbrain init upgrade flow still works hands-off. Interactive mode rejects empty input and offers to mkdir -p the folder if it doesn't exist.
  • pbrain install-skills no longer runs automatically during pbrain init. Before: init prompted inline to symlink skills into Claude Code / Cursor / Windsurf, then shelled out to pbrain install-skills ...
Read more