Distill¶
Captured notes and conversation fragments accumulate in sources/_captured/ and sources/_learned/. The distill command synthesizes these raw fragments into coherent wiki source pages that are then compiled into the knowledge base.
Flow¶
graph LR
C[Capture / Learn] --> CAP[_captured/ + _learned/]
CAP --> D[Distill]
D --> DIS[_distilled/]
DIS --> CO[Compile]
CO --> W[Wiki]
kompend compile --distill runs the distill step immediately before the
pipeline, so the corpus can be refined and compiled in one command.
Commands¶
# Capture: LLM extracts decisions, discoveries, corrections from text
kompend capture "We decided to use QKV projections with RoPE"
# Learn: store a verbatim fact
kompend learn "The transformer uses d_model=512" --tag architecture
# Distill: synthesize all captures into wiki source pages
kompend distill
# Or distill and compile in one run
kompend compile --distill
How it works¶
distillreads the top-level.mdfiles fromsources/_captured/andsources/_learned/.- Captures are grouped by their first tag.
- Each group is synthesized into a markdown source file via LLM (or a deterministic fallback if no LLM is available).
- Output is written to
sources/_distilled/with frontmatter tracking the source captures; re-runs update the existing page for a group in place. - The merged notes are archived to
sources/_archive/<kind>/(unless--no-archive). - A subsequent
kompend compileintegrates the distilled pages into the wiki.sources/_archive/is never compiled or returned by query.
Output format¶
Each distilled page includes:
---
type: distilled
title: "Attention Mechanisms"
synthesized_from:
- capture-20260613T120000Z-00-attention-decision.md
- learn-20260613T130000Z-attention-fact.md
tags:
- attention
- architecture
---
See also¶
- CLI Guide — capture, learn, distill commands
- Wiki Structure — output directory layout