title: Knowledge Base Setup — Session Notes tags: [journal, knowledge-base, obsidian, cli, tooling, session-log] created: 2026-05-11 updated: 2026-05-11 status: active related:


Knowledge Base Setup — Session Notes

Summary

Set up an Obsidian-style knowledge base in notes/ for the Lemna project. Migrated existing flat notes into a structured folder hierarchy with frontmatter, wikilinks, and an index. Researched CLI/PKM tooling options for future integration.

What Was Done

1. Moved .opencode/notes/notes/

The previous notes folder was buried inside .opencode/. Moved to project root as a first-class knowledge base location.

2. Established Obsidian-Flavored Markdown Conventions

Every note now has:

  • YAML frontmatter: title, tags, created, updated, status, related
  • Wikilinks: [[slug]] syntax connecting related notes
  • Kebab-case filenames: matching wikilink slugs (e.g., edm-algorithm-review.md[[edm-algorithm-review]])

3. Created Folder Structure

notes/
├── index.md           ← Map of Content (MOC)
├── research/          ← Algorithms, architecture, investigations
├── results/          ← Training observations, experiment outcomes
└── templates/         ← Note template

4. Migrated 8 Existing Notes

Old filenameNew locationFolder
diffusionv2_algorithm.mdresearch/diffusionv2-algorithm.mdresearch
edm_algorithm_review.mdresearch/edm-algorithm-review.mdresearch
edm_pomodoro_algorithm_review.mdresearch/edm-pomodoro-algorithm-review.mdresearch
edm_noise_exploration.mdresearch/edm-noise-exploration.mdresearch
edm_pomodoro_session.mdresearch/edm-pomodoro-session.mdresearch
lemna-data-v2-plan.mdresearch/lemna-data-v2-plan.mdresearch
pomodoro_v0.6_training_observations.mdresults/pomodoro-v0.6-training-observations.mdresults
pomodoro_v0.7_training_plan.mdresults/pomodoro-v0.7-training-plan.mdresults

All notes got frontmatter added, internal references converted to wikilinks, and index.md updated.

5. Created Knowledge Base Skill

  • .opencode/skills/knowledge-base/SKILL.md — full conventions, frontmatter spec, naming rules, folder placement guide, tag vocabulary, search workflow
  • Added knowledge-base to the agent skills in .opencode/opencode.json
  • Added knowledge base section to .opencode/AGENTS.md

6. Researched CLI/PKM Tooling

Evaluated options for connecting the knowledge base to OpenCode and CLI workflows:

Obsidian CLI (official, v1.12+)

  • 100+ commands, requires Obsidian running
  • Search, create, move (link-rewriting), tags, properties, daily notes
  • MCP server built in via obsidian mcp-server
  • Good: native Obsidian integration, wikilink-aware moves
  • Bad: requires running app, no headless mode

Headless Obsidian

  • obsidian-headless (official npm) — Sync/Publish only, no vault manipulation
  • Xvfb + Openbox + systemd — run Obsidian headless on Linux servers
  • Docker options exist for sync-only

HTTP serving / remote viewing

  • Obsidian Publish ($8/mo, hosted)
  • obsidian-web (Go + Vue, 0 stars, too early)
  • obsidian-vps-publish (Docker, self-hosted publish)
  • obsidian-html-server (plugin, read-only localhost)
  • obsidian-web by susamn — Go+Vue, multi-backend (local/S3/MinIO), LLM chat, graph view, edit. Very early (0 stars, 1 release, not in AUR)

CLI-native knowledge base tools (not Obsidian-dependent)

ToolStarsKey FeatureAI Integration
zk~4.8kLightweight Zettelkasten CLINone
nb~6.5kSingle-file shell script, git syncNone
Hyalo~150Frontmatter ops, wikilink moves, lint, BM25 searchClaude Code skills + rules
Raven3Typed schemas, query language, daily notesMCP + skills
Memex12Hybrid search (BM25+semantic), typed relationsSKILL.md for agents
Remember.md~20Second brain plugin for OpenCode/ClaudeBuilt for OpenCode
TypeMD~40Object-based, TUI, web UI, MCP serverMCP
Brain Vault~30Karpathy LLM-Wiki, ingest/compile/askMCP + Claude skills

Logseq CLI

  • Official @logseq/cli — DB-graph based, Datalog queries, MCP server, search/validate/export
  • Community logseq-cli (PyPI) — Unix-composable, NDJSON output, HTTP API client
  • Caveat: Logseq is moving from file-based markdown to DB graphs. The CLIs work on DB graphs, not plain markdown folders. Poor fit for our notes/ setup.

Decisions Made

  1. Obsidian-style conventions without requiring Obsidian — plain markdown is the source of truth, Obsidian is optional for browsing
  2. No CLI tool integrated yet — the built-in OpenCode tools (read, write, grep, glob) work for our ~10 notes. Will add Hyalo or Obsidian CLI when the knowledge base grows
  3. No HTTP serving yet — obsidian-web and similar tools are too early. Can revisit when mature options exist or when remote viewing becomes a priority

Open Questions

  • Should we integrate Hyalo for structured frontmatter operations and wikilink-aware moves?
  • Should we add Obsidian CLI as an MCP server to opencode.json?
  • Remote viewing priority — needed now or later?
  • Daily notes — useful for this project or unnecessary overhead?
  • Should notes/ be opened as an Obsidian vault directly, or kept project-local?