Conversation
…e collisions DUPLICATE_SLUG in doctor --integrations was firing whenever two pages shared a tail — including the common case where a project's display name matches its repo name (projects/pbrain + repos/joedanz/pbrain). Per Contract rule 2 of project-onboard, path-qualified wikilinks resolve unambiguously, so the collision is only a real problem when a bare-slug [[tail]] reference exists somewhere in the brain. The check now defers emission until the wikilink scan has confirmed a bare-slug reference, and the detail points at the referring page so users can fix it in one edit. pgvector and RLS checks in doctor both called db.getConnection() (the postgres npm driver), which is uninitialized on PGLite, so PGLite users got "[WARN] Could not check pgvector extension" and "[WARN] Could not check RLS status" on every doctor run. Both are gated on engine type now: PGLite reports "Bundled with PGLite runtime" and "N/A for PGLite (local embedded DB)". Postgres path is byte-identical. Also installs the project-onboard `## pbrain` self-declaration section into this repo's CLAUDE.md, which is the idempotency-gate artifact produced when running project-onboard on pbrain itself.
joedanz
added a commit
that referenced
this pull request
Apr 17, 2026
…k checks Three more classes of doctor noise cleared after PR #25: 1. skill_symlinks shadowed dump — the check classifies any symlink that doesn't resolve into the current repo as foreign, so users with a global install at ~/.pbrain-repo who also have a dev clone elsewhere saw all 26×3 = 78 skills flagged as "shadowed by other plugins" on every doctor run. Added an `ours-elsewhere` state that walks up from the resolved symlink target looking for package.json with name: "pbrain" — deterministic detection, works for any pbrain checkout location. Doctor now reports `installed — claude: 26, cursor: 26, windsurf: 26 (symlinks resolve to sibling checkout at <path>)` instead. 2. mece_overlap between maintain and citation-fixer on trigger "citation audit" — removed from maintain since citation-fixer is the specialized skill for that phrase. maintain still handles citation audits as part of broader health runs via its description. 3. dry_violation warnings on 7 brain-writing skills (ingest, enrich, setup, signal-detector, idea-ingest, media-ingest, meeting-ingestion) that inlined citation/Iron-Law rules without referencing the canonical skills/conventions/quality.md. Added a single `> **Quality rules:**` line next to each skill's existing filing-rule reference. The inline recap stays (it's useful local guidance); the convention file is marked as the source of truth. Health score on a fresh install goes from 80 → 95. The only remaining [WARN] on this brain is `embeddings` (real, user-actionable via `pbrain embed --stale`). Test coverage: two new cases for scanTargets — symlink into sibling pbrain checkout (ours-elsewhere) and symlink into non-pbrain tree (still foreign-symlink). Full unit suite: 979 pass, 0 fail.
4 tasks
joedanz
added a commit
that referenced
this pull request
Apr 17, 2026
…k checks (#26) Three more classes of doctor noise cleared after PR #25: 1. skill_symlinks shadowed dump — the check classifies any symlink that doesn't resolve into the current repo as foreign, so users with a global install at ~/.pbrain-repo who also have a dev clone elsewhere saw all 26×3 = 78 skills flagged as "shadowed by other plugins" on every doctor run. Added an `ours-elsewhere` state that walks up from the resolved symlink target looking for package.json with name: "pbrain" — deterministic detection, works for any pbrain checkout location. Doctor now reports `installed — claude: 26, cursor: 26, windsurf: 26 (symlinks resolve to sibling checkout at <path>)` instead. 2. mece_overlap between maintain and citation-fixer on trigger "citation audit" — removed from maintain since citation-fixer is the specialized skill for that phrase. maintain still handles citation audits as part of broader health runs via its description. 3. dry_violation warnings on 7 brain-writing skills (ingest, enrich, setup, signal-detector, idea-ingest, media-ingest, meeting-ingestion) that inlined citation/Iron-Law rules without referencing the canonical skills/conventions/quality.md. Added a single `> **Quality rules:**` line next to each skill's existing filing-rule reference. The inline recap stays (it's useful local guidance); the convention file is marked as the source of truth. Health score on a fresh install goes from 80 → 95. The only remaining [WARN] on this brain is `embeddings` (real, user-actionable via `pbrain embed --stale`). Test coverage: two new cases for scanTargets — symlink into sibling pbrain checkout (ours-elsewhere) and symlink into non-pbrain tree (still foreign-symlink). Full unit suite: 979 pass, 0 fail.
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.
Summary
Two doctor false-positives that made
pbrain doctornoisy for every user, fixed:DUPLICATE_SLUGfired on every project whose repo name matches its product name.projects/pbrain+repos/joedanz/pbraincollide on the tailpbrain— but path-qualified wikilinks (which is whatproject-onboardalways emits per Contract rule 2) resolve unambiguously. The check now fires only when a bare-slug[[tail]]wikilink actually references the ambiguous tail, and the detail names the referring page so you can fix it in one edit.pgvectorandrlschecks warned "Could not check ..." on every PGLite doctor run. Both useddb.getConnection()(thepostgresnpm driver), which is uninitialized in PGLite mode. Gated on engine type: PGLite reportsBundled with PGLite runtimeandN/A for PGLite (local embedded DB). Postgres path is byte-identical.Plus the
## pbrainself-install section in this repo'sCLAUDE.md— the project-onboard Phase 8 artifact produced when onboarding pbrain itself.Test plan
bun test test/doctor-integrations.test.ts test/doctor.test.ts— 16 pass, 0 failpbrain doctor --integrationson a real brain withprojects/pbrain+repos/joedanz/pbrain: green (15 pages, 30 wikilinks, 0 issues)pbrain doctoron PGLite: pgvector + rls now report[OK]instead of[WARN]; health score up to 85/100What this PR does NOT fix (deliberate)
resolver_healthMECE_OVERLAP / DRY_VIOLATION — real skill-content cleanup, separate concernskill_symlinks shadowed— real install-state notice, already actionable viapbrain install-skills