// SERVICE SPECIFICATION - 10 DAYS
AI Second Brain
Build a private, Git-backed team knowledge vault in plain Markdown that captures web clippings, PDFs, and meeting notes, organizes them with local models, and answers complex questions with verifiable citations.
Table of Contents
- Solving the Institutional Memory Problem
- Plain-Text Markdown & Git Vault Architecture
- Local-First AI Organization & Privacy Boundaries
- Cited Vector Retrieval & Weekly Digest
- Enterprise RBAC, Audit & Knowledge Governance
- Failure-Mode Recovery & Index Reconciliation
- Tutorial 1: Production Python Vault Indexer & Cited Query
- Tutorial 2: Production Frontmatter & Tagging Prompt
- Tutorial 3: Step-by-Step 5-Day Implementation Runbook
- Tutorial 4: Production Python Git-to-Vector Reconciler
- Tutorial 5: Production Knowledge Conflict & Deprecation Prompt
- Tutorial 6: Step-by-Step Governance & Backup Audit
- Live References
Solving the Institutional Memory Problem
Every growing organization leaks knowledge. Architectural decisions live in buried Slack threads, client onboarding playbooks sit inside personal Google Docs, and post-mortem lessons vanish when engineers rotate teams. Traditional wikis fail because they demand manual curation: busy teams rarely have time to tag, link, and summarize every document they produce.
An AI Second Brain solves this by decoupling capture from organization. Team members drop raw web clippings, PDFs, email exports, and quick voice-to-text notes into a single inbox folder. Automated Python pipelines normalize those inputs into clean Markdown, deduplicate them via SHA-256 content hashes, and invoke a local language model to propose titles, summaries, and canonical tags - always requiring human approval before committing to the shared vault.
Plain-Text Markdown & Git Vault Architecture
Proprietary SaaS knowledge bases trap your company's intellectual property behind proprietary databases and unpredictable subscription tiers. By standardizing on Obsidian Markdown vaults backed by Git, your team gains full cryptographic history, branch-based collaboration, and instant portability.
We structure the vault using a disciplined PARA hierarchy (`00-inbox`, `10-projects`, `20-areas`, `30-resources`, `90-archive`) paired with strict YAML frontmatter schemas (`title`, `date`, `tags`, `source`, `status`). A curated taxonomy of at most twenty canonical tags prevents tag sprawl and ensures deterministic filtering.
Local-First AI Organization & Privacy Boundaries
Sending proprietary contracts, HR notes, or unreleased product roadmaps to third-party cloud APIs introduces unnecessary compliance risk. Using Ollama local model serving, the organization pipeline runs entirely on your own hardware. The local model reads incoming inbox notes, generates a concise three-sentence summary, and proposes tags strictly from your approved taxonomy.
Crucially, AI suggestions are written into a `proposed_` frontmatter block rather than overwriting canonical metadata. A team member reviews and promotes approved notes during a ten-minute daily triage, guaranteeing zero silent hallucinations in your knowledge base.
Cited Vector Retrieval & Weekly Digest
To make the vault conversational, we split Markdown files by heading boundaries (capped at roughly 800 words per chunk) and generate dense vector embeddings stored in Chroma local vector database. When a team member asks a question, the retriever fetches the top four semantic matches and instructs the model to answer exclusively from those chunks while citing the exact source filenames.
Every Sunday evening, a scheduled cron job compiles a Weekly Review Digest: listing newly captured notes, stale drafts awaiting review, and suggested wikilinks between related projects.
Enterprise RBAC, Audit & Knowledge Governance
When an organization consolidates engineering runbooks, executive strategy memos, and client post-mortems into a unified AI Second Brain, access control cannot remain an afterthought. A flat vector index where every employee can query every document creates immediate confidentiality leaks - for example, surfacing unreleased M&A notes or HR compensation bands to unauthorized teams. Enterprise deployments therefore enforce document-level Role-Based Access Control (RBAC) at both the Git repository boundary and the vector retrieval filter layer.
Each Markdown note carries immutable YAML frontmatter declaring its classification (public, internal, confidential, restricted) and allowed_groups. During ingestion, these metadata attributes are indexed alongside the embedding vectors inside Chroma metadata filters or PostgreSQL pgvector row-level security policies. Before any similarity search executes, the query engine injects the authenticated user's group claims as a mandatory pre-filter, guaranteeing that restricted chunks never enter the LLM context window.
Every retrieval and synthesis event is written to an append-only audit log recording the user identity, query hash, retrieved document URIs, and timestamp. Combined with Git commit history, compliance officers gain complete lineage from any AI-generated answer back to the exact human author and pull request that approved the underlying knowledge.
Failure-Mode Recovery & Index Reconciliation
A common failure mode in RAG-backed knowledge bases is silent index drift: files are renamed, deleted, or merged in Git, yet their orphaned embeddings persist in the vector database. When employees query the Second Brain, the retriever surfaces deprecated runbooks or broken file paths, eroding trust in the entire system.
To eliminate drift, the vault indexer operates as a deterministic reconciler rather than an append-only script. On every Git push or scheduled nightly sweep, the reconciler computes a SHA-256 content hash for each Markdown file and compares it against the stored content_hash metadata in the vector store. Unchanged files are skipped in milliseconds, modified files atomically replace their prior chunks, and deleted files trigger immediate vector tombstone purges.
If a local embedding model such as Ollama nomic-embed-text is temporarily unavailable during a bulk re-index, the reconciler checkpoints its progress in a local SQLite state table and resumes from the last committed hash without duplicating vectors.
Tutorial 1: Production Python Vault Indexer & Cited Query
This Python script indexes Markdown files into Chroma using local Ollama embeddings and answers questions with explicit filename citations.
Tutorial 2: Production Frontmatter & Tagging Prompt
Use this prompt with your local Ollama model to classify incoming inbox notes against your approved tag taxonomy without inventing arbitrary labels.
Tutorial 3: Step-by-Step 5-Day Implementation Runbook
- Day 1 - Vault & Git Initialization: Create the PARA directory structure in Obsidian, define YAML frontmatter templates, and initialize a private Git repository with `.gitignore` excluding the vector index.
- Day 2 - Capture & Deduplication: Configure web clippers and email-to-Markdown scripts routing into `00-inbox/`, guarded by SHA-256 content-hash deduplication.
- Day 3 - Local Model Triage: Deploy Ollama with a local chat model to populate `proposed_` frontmatter fields, enforcing your 20-tag ceiling.
- Day 4 - Vector Indexing & Cited Q&A: Chunk notes by Markdown heading, generate local embeddings into Chroma, and validate 10 real team queries for citation accuracy.
- Day 5 - Weekly Digest & Handover: Schedule nightly incremental re-indexing and Sunday digest generation via cron, then verify a full Git restore test.
Tutorial 4: Production Python Git-to-Vector Reconciler
This reconciler computes SHA-256 hashes across your Markdown vault, skips unchanged notes, atomically updates modified notes, and purges deleted file vectors to prevent index drift.
Tutorial 5: Production Knowledge Conflict & Deprecation Prompt
Run this prompt during weekly vault maintenance to detect contradictory SOPs, flag stale runbooks, and propose canonical merge targets.
Tutorial 6: Step-by-Step Governance & Backup Audit
- Enforce Frontmatter Linting in CI: Add a GitHub Actions pre-merge check that rejects any Markdown note missing
classification,owner, orallowed_groups. - Verify RBAC Pre-Filter Isolation: Execute automated integration tests with a restricted-group token to confirm zero confidential chunks appear in vector query results.
- Schedule Nightly Hash Reconciliation: Run
vault_reconciler.pyvia cron or CI to purge deleted notes and re-embed modified files. - Snapshot Encrypted Git Mirrors: Replicate the bare Git repository to an immutable, encrypted object-storage bucket with 90-day point-in-time recovery.
- Review Staleness Digest: Distribute a weekly automated report listing notes untouched for 180+ days to their designated owners for archive or renewal.
Live References
- Obsidian Official Help & Markdown Vault Documentation
- Ollama Local Model & Embedding Library
- Chroma Vector Database Documentation
- Anthropic Claude API Documentation
- pgvector: Open-Source Vector Similarity Search for PostgreSQL
- PostgreSQL Row-Level Security (RLS) Policies Documentation
- Git Official Reference & Bare Repository Mirroring
- Pydantic Data Validation & Frontmatter Schema Enforcement
- SQLite Documentation for Local State Checkpointing
- OpenAI Embeddings & Semantic Retrieval Guide
Own Your Team's Institutional Memory
Commission a 10-day AI Second Brain engagement: 5 days of live engineering training plus 5 days of dedicated support.