Skip to content

feat(#406): document engine — documents + document_chunks tables (schema v11) - #426

Merged
ajianaz merged 1 commit into
developfrom
feat/406-document-engine
Jun 21, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/406-document-engine

Conversation

@ajianaz

@ajianaz ajianaz commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Implements #406 — the core wiki/knowledge base engine.

Summary

Transforms uteke from a memory store into a wiki/knowledge base engine (Outline/Obsidian style).

Schema v11 migration

  • documents: full markdown content with slug, title, tags, version
  • document_chunks: chunked sections with embeddings for semantic search
  • UNIQUE(namespace, slug), CASCADE delete

API

// Create/update a document (auto-chunks + embeds)
uteke.doc_upsert("architecture", "Architecture Guide", "# Content...", &["tech"], Some("wiki"))?;

// Get by slug or ID
let doc = uteke.doc_get("architecture", Some("wiki"))?;

// List documents
let docs = uteke.doc_list(Some("wiki"), 20)?;

// Delete
uteke.doc_delete(&id)?;

Chunking pipeline

  1. Document content → chunk_markdown() (feat: markdown/prose chunker — split by heading, respect token window #405) splits by headings
  2. Each chunk → embedder.embed() creates section-level embedding
  3. Chunks stored with heading, content, char offsets, embedding BLOB

Foundation for

Tests

3 unit tests: CRUD lifecycle, version increment on upsert, namespace isolation.

Milestone: v0.3.0 — Graph RAG

…ema v11)

Core wiki/knowledge base engine for uteke.

Schema v11: documents + document_chunks tables.
Store layer: upsert, get, list, delete, chunk insertion.
Uteke API: doc_upsert (auto-chunk + embed), doc_get, doc_list, doc_delete.
3 unit tests: CRUD, version increment, namespace isolation.

Foundation for #411 (doc CLI commands).
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-cli · BYOK · MIT

@ajianaz
ajianaz merged commit d011341 into develop Jun 21, 2026
8 checks passed
@ajianaz
ajianaz deleted the feat/406-document-engine branch June 21, 2026 15:09
ajianaz added a commit that referenced this pull request Aug 13, 2026
…ema v11) (#426)

Core wiki/knowledge base engine for uteke.

Schema v11: documents + document_chunks tables.
Store layer: upsert, get, list, delete, chunk insertion.
Uteke API: doc_upsert (auto-chunk + embed), doc_get, doc_list, doc_delete.
3 unit tests: CRUD, version increment, namespace isolation.

Foundation for #411 (doc CLI commands).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant