Fastest way to scaffold your LLM powered personal knowledge base - Obsidian, Claude Code, qmd, Github
JavaScript aiampclaude-codecodexcursorgithubknowledge-baseknowledge-graphknowledge-managementllmobsidianobsidian-vaultqmdsecond-brain
fix: resolve code smells and factual inconsistencies across codebase
jessepinkman990062662f4b2cc7
diff --git a/.claude/skills/release/SKILL.md b/.claude/skills/release/SKILL.mdindex b0743a3..1103d5c 100644--- a/.claude/skills/release/SKILL.md+++ b/.claude/skills/release/SKILL.md@@ -99,25 +99,16 @@ Verify:cat package.json | grep '"version"'```-### Step 5 — Update pack-test skill--The `pack-test` skill hardcodes the tarball filename (e.g., `claude-second-brain-0.1.0.tgz`). Update every occurrence of the old version string in `.claude/skills/pack-test/SKILL.md` to the new version using the Edit tool with `replace_all: true`.--Verify:-```bash-grep "claude-second-brain-" .claude/skills/pack-test/SKILL.md-```--### Step 6 — Commit the version bump+### Step 5 — Commit the version bump```bash-git add package.json .claude/skills/pack-test/SKILL.md+git add package.jsongit commit -m "chore: bump version to X.Y.Z"```Replace `X.Y.Z` with the confirmed new version.-### Step 7 — Push and open PR+### Step 6 — Push and open PRPush the current branch:@@ -146,13 +137,12 @@ gh pr create \- [ ] Changelog accurately reflects all changes- [ ] `package.json` version is correct-- [ ] Pack-test skill tarball filename updatedEOF)" \--base main```-### Step 8 — Report to user+### Step 7 — Report to userAfter the PR is created, tell the user:diff --git a/.gitignore b/.gitignoreindex 700b02a..fe7633e 100644--- a/.gitignore+++ b/.gitignore@@ -21,8 +21,8 @@ coverage# logslogs-_.log-report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json+*.log+report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json# dotenv environment variable files.envdiff --git a/CLAUDE.md b/CLAUDE.mdindex 6642412..517c68b 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -51,6 +51,9 @@ Summary of one ingested source. Slug is kebab-case derived from the title. One p### `qa` — `wiki/qa/[slug].md`A filed answer to a notable query. Created when an answer synthesizes multiple pages in a way worth preserving.+### `admin` — `wiki/index.md`, `wiki/log.md`+Special system/administrative pages. Not synthesis content. There are exactly two: `index.md` (master index) and `log.md` (activity log).+---## Frontmatter Format@@ -59,7 +62,7 @@ All wiki pages use this YAML frontmatter:```yaml----type: overview | topic | entity | source-summary | qa+type: overview | topic | entity | source-summary | qa | admintags: [tag1, tag2]sources: ["[[wiki/sources/source-slug]]"]related: ["[[wiki/related-page]]"]@@ -67,7 +70,7 @@ updated: YYYY-MM-DD---```-- `type`: Required. One of the five page types above.+- `type`: Required. One of the six page types above.- `tags`: Optional. Lowercase, hyphenated. Topics for the Obsidian tag pane.- `sources`: Links to the `wiki/sources/` pages that informed this page.- `related`: Links to other wiki pages directly relevant to this one.@@ -108,7 +111,7 @@ Run this workflow whenever the user adds a new source. Do not skip steps.- Add the new source to the Sources section with a one-line description and link.**Step 5 — Identify affected wiki pages**-- Run `bunx @tobilu/qmd query -c wiki "<source topic and key claims>"` to surface related existing wiki pages.+- Run `INDEX_PATH=qmd.sqlite bunx @tobilu/qmd query -c wiki "<source topic and key claims>"` to surface related existing wiki pages.- Also Glob `wiki/*.md` and `wiki/sources/*.md` to ensure completeness.- List all pages to create or update.@@ -139,7 +142,7 @@ Run this workflow whenever the user adds a new source. Do not skip steps.Run this workflow when the user asks a question against the wiki.**Step 1 — Search the wiki**-- Run `bunx @tobilu/qmd query -c wiki "<question>"` to surface semantically relevant pages.+- Run `INDEX_PATH=qmd.sqlite bunx @tobilu/qmd query -c wiki "<question>"` to surface semantically relevant pages.- Read `wiki/index.md` to confirm coverage and catch any pages qmd didn't surface.- Read the 2-5 most relevant pages fully.diff --git a/template/.claude/skills/setup/SKILL.md b/template/.claude/skills/setup/SKILL.mdindex c97de48..fcb2342 100644--- a/template/.claude/skills/setup/SKILL.md+++ b/template/.claude/skills/setup/SKILL.md@@ -1,6 +1,6 @@---name: setup-description: "Initialize this obsidian-agent-memory vault. Registers qmd collections and generates vector embeddings. Use when: setting up for the first time, re-registering collections, or re-indexing after a bulk ingest session. Trigger phrases: /setup, setup vault, initialize collections, reindex, register qmd."+description: "Initialize this claude-second-brain vault. Registers qmd collections and generates vector embeddings. Use when: setting up for the first time, re-registering collections, or re-indexing after a bulk ingest session. Trigger phrases: /setup, setup vault, initialize collections, reindex, register qmd."argument-hint: "Optional: 'reindex' to skip registration and only re-index files"---@@ -24,7 +24,7 @@ Run:bun scripts/qmd/setup.ts```-Registers the four qmd collections (`wiki`, `raw-sources`, `human`, `daily-notes`) and their path-level context descriptions. Idempotent — safe to re-run.+Registers the two core qmd collections (`wiki`, `raw-sources`) and their path-level context descriptions. Idempotent — safe to re-run.**Step 2 — Index files and generate embeddings**@@ -49,7 +49,7 @@ Do **not** re-run after every single file edit — batch it after a session.Run these three commands to confirm everything is working:```bash-# List registered collections (expect: wiki, raw-sources, human, daily-notes)+# List registered collections (expect: wiki, raw-sources)INDEX_PATH=__QMD_PATH__ bunx @tobilu/qmd collection list# List registered contexts@@ -59,7 +59,7 @@ INDEX_PATH=__QMD_PATH__ bunx @tobilu/qmd context listINDEX_PATH=__QMD_PATH__ bunx @tobilu/qmd status```-All four collections should appear in `collection list`. `status` should show non-zero document and embedding counts — if embeddings are 0, re-run step 2.+Both collections should appear in `collection list`. `status` should show non-zero document and embedding counts — if embeddings are 0, re-run step 2.## Notes- `bun` is managed via `mise` — ensure `mise install` has been run before setupdiff --git a/template/.gitignore.template b/template/.gitignore.templateindex e4a5ab2..f3a7d14 100644--- a/template/.gitignore.template+++ b/template/.gitignore.template@@ -21,8 +21,8 @@ coverage# logslogs-_.log-report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json+*.log+report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json# dotenv environment variable files.envdiff --git a/template/CLAUDE.md b/template/CLAUDE.mdindex 11ace6b..606b58e 100644--- a/template/CLAUDE.md+++ b/template/CLAUDE.md@@ -51,6 +51,9 @@ Summary of one ingested source. Slug is kebab-case derived from the title. One p### `qa` — `wiki/qa/[slug].md`A filed answer to a notable query. Created when an answer synthesizes multiple pages in a way worth preserving.+### `admin` — `wiki/index.md`, `wiki/log.md`+Special system/administrative pages. Not synthesis content. There are exactly two: `index.md` (master index) and `log.md` (activity log).+---## Frontmatter Format@@ -59,7 +62,7 @@ All wiki pages use this YAML frontmatter:```yaml----type: overview | topic | entity | source-summary | qa+type: overview | topic | entity | source-summary | qa | admintags: [tag1, tag2]sources: ["[[wiki/sources/source-slug]]"]related: ["[[wiki/related-page]]"]@@ -67,7 +70,7 @@ updated: YYYY-MM-DD---```-- `type`: Required. One of the five page types above.+- `type`: Required. One of the six page types above.- `tags`: Optional. Lowercase, hyphenated. Topics for the Obsidian tag pane.- `sources`: Links to the `wiki/sources/` pages that informed this page.- `related`: Links to other wiki pages directly relevant to this one.@@ -108,7 +111,7 @@ Run this workflow whenever the user adds a new source. Do not skip steps.- Add the new source to the Sources section with a one-line description and link.**Step 5 — Identify affected wiki pages**-- Run `bunx @tobilu/qmd query -c wiki "<source topic and key claims>"` to surface related existing wiki pages.+- Run `INDEX_PATH=__QMD_PATH__ bunx @tobilu/qmd query -c wiki "<source topic and key claims>"` to surface related existing wiki pages.- Also Glob `wiki/*.md` and `wiki/sources/*.md` to ensure completeness.- List all pages to create or update.@@ -139,7 +142,7 @@ Run this workflow whenever the user adds a new source. Do not skip steps.Run this workflow when the user asks a question against the wiki.**Step 1 — Search the wiki**-- Run `bunx @tobilu/qmd query -c wiki "<question>"` to surface semantically relevant pages.+- Run `INDEX_PATH=__QMD_PATH__ bunx @tobilu/qmd query -c wiki "<question>"` to surface semantically relevant pages.- Read `wiki/index.md` to confirm coverage and catch any pages qmd didn't surface.- Read the 2-5 most relevant pages fully.diff --git a/template/scripts/qmd/reindex.ts b/template/scripts/qmd/reindex.tsindex af35b3e..949b6da 100644--- a/template/scripts/qmd/reindex.ts+++ b/template/scripts/qmd/reindex.ts@@ -7,7 +7,7 @@* bun scripts/qmd/reindex.ts** Suitable as a cronjob:- * 0 * * * * cd /home/user/obsidian-agent-memory && bun scripts/qmd/reindex.ts+ * 0 * * * * cd /home/user/my-brain && bun scripts/qmd/reindex.ts*/import { createStore } from "@tobilu/qmd"diff --git a/template/scripts/qmd/setup.ts b/template/scripts/qmd/setup.tsindex ab3ed54..6eb29cb 100644--- a/template/scripts/qmd/setup.ts+++ b/template/scripts/qmd/setup.ts@@ -33,8 +33,6 @@ async function ensureCollection(name: string, relPath: string, pattern: string)console.log("Collections:")await ensureCollection("wiki", "wiki", "**/*.md")await ensureCollection("raw-sources", "sources", "**/*.md")-await ensureCollection("human", "human", "**/*.md")-await ensureCollection("daily-notes", "daily-notes", "**/*.md")// --- Global context ---console.log("\nContexts:")@@ -55,13 +53,4 @@ await store.addContext("raw-sources", "/articles", "Web articles saved as markdoawait store.addContext("raw-sources", "/pdfs", "PDF files or their extracted text")await store.addContext("raw-sources", "/personal", "Personal notes flagged for wiki ingestion")-// human/-await store.addContext("human", "", "User's personal notes — not Claude-maintained; covers work, social life, investing, hobbies, and more")-await store.addContext("human", "/ideas", "Brainstorming and exploratory ideas")-await store.addContext("human", "/job-hunt", "Job search notes and preparation")-await store.addContext("human", "/misc", "Miscellaneous personal notes")--// daily-notes/-await store.addContext("daily-notes", "", "User's daily and weekly journal entries, dated by year and week number")-console.log("\nSetup complete. Run: bun scripts/qmd/reindex.ts")diff --git a/template/wiki/index.md b/template/wiki/index.mdindex a47bbae..1015522 100644--- a/template/wiki/index.md+++ b/template/wiki/index.md@@ -1,5 +1,5 @@----type: overview+type: admintags: []updated: 2026-01-01---diff --git a/template/wiki/log.md b/template/wiki/log.mdindex 65ebe76..f75e463 100644--- a/template/wiki/log.md+++ b/template/wiki/log.md@@ -1,5 +1,5 @@----type: overview+type: admintags: []updated: 2026-01-01---