KnowledgeQuery
kqs is a Git-native platform for managing knowledge and documentation. Documentation, tasks, data specifications, and the links between them are plain Markdown files in a Git repository — and a single kqs binary adds search, an AI assistant, task tracking, and traceability from requirements to code. No servers, no external databases, no vendor lock.
Why
Obsidian and any markdown editor are great for reading and editing notes. But beyond a single folder, problems start: no sync between repositories, no cross-repo search, documentation lives apart from code, and nobody knows whether requirements are actually covered by implementation.
kqs does not replace Obsidian — it complements it with what's missing: multi-repo sync, full-text and semantic search, an AI assistant in the CLI, tasks in Git, and deep traceability of the requirement → design → code chain.
Features
- Dual mode —
--devfor developers (code scanning, checks) and--docfor knowledge repositories (full access, document creation). - Document chain — from idea to data:
idea → bft → brd/frd/nfr → adr → rfc → tz → typespec → code. - Search — full-text (SQLite FTS5) and vector (sqlite-vec + Candle, fully offline).
- AI assistant —
kqs askvia Ollama, OpenAI, Anthropic, or any other LLM. - Tasks in Git — one file per task, CRDT events instead of overwrites, no merge conflicts.
- Watcher — auto-commits changes; push only via
kqs push. - README on autopilot — task kanban board and document table of contents update automatically.
- Traceability —
@doc-anchorannotations in code, requirement chain checks, orphan and stale-link detection. - llm-help — LLM context for using kqs correctly.
Document Chain
Each document type answers its own question:
| Type | Question |
|---|---|
idea | Is this worth thinking about? |
bft | What does the business want and why? |
brd / frd / nfr | What should the system do? |
adr | What decision was made and why? |
rfc | What is proposed for discussion? |
tz | How is this designed technically? |
typespec | What data does the code implement? |
code | Implementation linked to the documentation |
Documentation-to-Code Traceability
Developers annotate code:
// @doc-anchor SecureTokenStorage
// @see docs://architecture/ADR-001.md
class KeychainStorage: TokenStorable { }
kqs check scan finds such annotations across all projects from the config and builds the graph BFT-001 → ADR-001 → TZ-001 → TypeSpec → @doc-anchor → code. kqs check traceability-deep verifies requirement chains, kqs check orphans finds documents without links, and orphan anchors become tasks automatically.
Installation
cargo install kqs
Or download a binary from GitHub Releases.
Quick Start
kqs init --path ~/knowledge --remote https://github.com/user/knowledge.git
kqs doc new adr "Database Choice" # → docs/03-architecture/adr-001-*.md
kqs search "system architecture" # full-text + vector
kqs task new --title "Implement search" --priority high
kqs check traceability-deep --deep # requirement chain coverage
kqs push # readme-gen → push
Links
- Repository: bimawa/KnowledgeQuery
- crates.io:
kqs