Skip to content

The pipeline

Every note moves through four stages. Each stage is a scan --stage:

1
2
3
add ─► pending ─[process]─► processed ─[classify]─► scanned ─[organize]─► organized
                                 │                                            │
                                 └──► unclassified                [consolidate] (themes only)
Stage Uses the LLM What it does
process yes, one call per note, plus an embedding writes a 2–3 sentence summary, 3–8 keywords and an embedding; pending → processed
classify yes, one call per 20 notes assigns each processed note to its best-fitting existing theme (up to 3 if clearly relevant) → scanned; a note that fits none → unclassified
organize yes, one call per theme for each theme with at least split_threshold notes and some newly scanned ones, proposes 2–4 subtopics and files notes under them; its scanned notes → organized
consolidate no files derived themes under themes that hold most of their notes, and prunes empty derived themes

Note statuses

Status Meaning Moves on with
pending imported, not processed scan
processed has a summary, keywords and an embedding scan (classify)
unclassified the model put it in no existing theme notecast theme add … re-queues all of them
scanned in at least one theme scan (organize)
organized its themes were considered for splitting —
failed the model's answer for it was unusable notecast retry-failed

scan without --stage

notecast scan (the same as --stage auto) runs the stages that are due, in order:

  1. process every pending note, always;
  2. classify once at least classify_every (10) notes are processed;
  3. organize once classify has run organize_after (2) times since the last organize;
  4. consolidate once organize has created subthemes in consolidate_after (3) runs.

It prints what it did as JSON:

1
{"processed": 4, "classified": 0, "splits": 0, "consolidate": {"edges_added": 0, "pruned": 0}}

With fewer notes than classify_every, auto mode waits; run notecast scan --stage classify to classify them now. The thresholds are configuration.

When things go wrong

  • Ollama is down or a model isn't pulled. scan checks before it starts and tells you which ollama pull to run. If Ollama disappears during a scan, the stage stops, exits with status 1, and the notes it hadn't reached stay where they were. Nothing is marked failed for this.
  • The model gives an unusable answer (not JSON, or the wrong shape). In process, that one note becomes failed; in classify and organize, the batch or theme is skipped and retried on the next scan.
  • Long notes. Only the first max_note_chars characters (12 000) are sent to the model, followed by […truncated].

Starting over

1
2
notecast reset          # drop all theme assignments; classified notes → processed
notecast reset --full   # delete all notes and derived themes (asks first)

A soft reset keeps summaries and embeddings, so re-classifying is one LLM call per 20 notes. Derived themes left empty by it are pruned at the next consolidate. --full keeps your base themes and the parent links between them.