Skip to content

Knowledge Base System

Overview

You need a system that feels like a "Corporate Wiki" to your humans, but looks like "Structured Data" to your Go Service.

The best system for this specific architecture (Go + Local-First + Developer Mindset) is the Git-Wiki Stack.

You do not buy Notion or Confluence. You combine three tools to create a "Headless Knowledge Base."


1. The Stack: "Obsidian + Git + MkDocs"

This stack separates Editing, Storage, and Viewing.

Role The Tool Why?
Authoring (Write) Obsidian or VS Code Best-in-class local editor. Handles links/frontmatter natively. Fast.
Storage (Sync) Git (GitHub/GitLab) Version control. The "Source of Truth."
Publishing (Read) Material for MkDocs Turns Markdown into a beautiful, searchable, mobile-friendly website for your team.
Intelligence (AI) Your Go Service Scans the raw .md files in Git to populate the Graph.

2. The Human Workflow (How people use it)

The Author (You/Team):

  1. Open Obsidian.
  2. Create a file: SOP - Opening the Store.md.
  3. Apply a template (adds the YAML frontmatter automatically).
  4. Write the guide.
  5. Commit & Push.

The Consumer (Employee):

  1. They go to wiki.neonogre.com (The MkDocs site).
  2. They see a polished, fast website with search, sidebar navigation, and diagrams.
  3. They read the "Opening the Store" guide.

3. The Machine Workflow (How AI uses it)

This is where your Go Service shines. Because the "Wiki" is just a folder of text files, the machine has "Root Access" to the knowledge.

The "Ingestion" Function: Your Go service doesn't scrape the website. It reads the repo directly.

func SyncKnowledgeBase() {
    // 1. Pull latest changes
    git.Pull("docs-repo")

    // 2. Walk the files
    filepath.Walk("docs-repo/content", func(path string, info os.FileInfo, err error) {
        if filepath.Ext(path) == ".md" {
            // 3. Parse Frontmatter (The Metadata)
            meta, body := parseMarkdown(path)

            // 4. Update the Graph (Postgres)
            // "I know this SOP exists, it is owned by Retail Ops, and here is the URL."
            updateGraphNode(meta)

            // 5. Update the Vector Database (pgvector)
            // "Here is the actual content for fuzzy search."
            updateEmbeddings(body)
        }
    })
}

4. Why this beats Notion/Confluence for AI

Feature Notion / Confluence The Git-Wiki Stack
Data Format Proprietary JSON blocks. Hard to parse. Plain Markdown. Universal standard.
API Access Rate limited. Slow. Instant. It's just file I/O on disk.
Metadata Hidden in UI properties. Explicit YAML Frontmatter.
Context "Page ID 49281" "[[dealer-network]]" (Semantic Links).
Ownership "Who wrote this?" Git Blame (Exact history).

5. Setting it up (The "Golden Path")

Step 1: The Repo Structure

Create a repo called knowledge-base.

/knowledge-base
├── mkdocs.yml          # Site configuration (Theme, Nav)
└── docs/               # The Content
    ├── systems/        # System Documentation
    ├── sops/           # Standard Operating Procedures
    ├── policies/       # Governance/Rules
    └── records/        # Meeting Logs / ADRs

Step 2: Template

Point Obsidian to this folder. Install the "Templater" plugin. Or a VS Code Plugin. Create a template that forces the Core 7 frontmatter:

---
id: "<% tp.file.creation_date("YYYYMMDD") %>-<% tp.file.title %>"
type: Knowledge
subtype: SOP
system: "[[choose-system]]"
status: Draft
---

Step 3: The Pipeline

Configure GitHub Actions (or your Go Service) to build the site on push. mkdocs build -> Generates static HTML -> Uploads to AWS S3 or GitHub Pages.

Summary

Use the "Git-Wiki" System.

  • For Humans: It looks like a professional documentation site (via MkDocs).
  • For Machines: It looks like a structured dataset (via Git/Markdown).
  • For You: It fits your developer ethos (Text files, Git, Go).

This bridges the gap. Your team gets a friendly URL (wiki.company.com), and your AI gets raw, structured data access.