LifeLab · reference
![[source]]{lens} — source says which set, lens says how to look at it. Space = AND, - = NOT, OR lives in the source list (union sets), never in the lens. The grammar is closed: if a token can't be completed from a menu, it isn't grammar. Same line works in region headers, the page-header filter, pickers, and buffers.
Order: filter terms are order-free (chips normalize to status · tags · dates · fields); duplicate shape keys — last wins; a scope token starts a run that lasts until the next scope token, so unscoped terms come first.
| mcp · project/lifelab | page — blocks that live there. Referenced: page order, write-home, drag = move. |
| :project/lifelab: | tag — blocks marked so. Computed: provenance groups, drag = mark/unmark, add = born matching. |
| lens/lifelab-now | saved lens — a named source+lens pair; summons its result. |
| Projects, Reading, :mcp: | union — any mix of named sets; this is OR. Grouped by source unless sorted; each sub-river keeps its own contract. |
| syntax | meaning | cost |
|---|---|---|
| todo · done · note | task tri-state: open · closed · no marker (a markerless block is a note). Negate any: -todo. Bare words — closed vocabulary, so no key needed; pages never appear bare inside {}, so no collision. | free |
| :tag: · -:tag: | tagged / not tagged. Self-delimiting — the colons are the key. Tag OR = summon a union of tags instead. | free |
| when: · remind: | the two built-in dates (entry · reminder). Keyed only because they collide. Values below. remind:none = unset; remind:overdue ≡ remind:..yesterday + still todo. | free |
| today · this-week · next-2w · last-3m | date words. Chip/completion always shows the resolved range — never guess a boundary. | free |
| -3w.. · ..+2w · -3w..-1w | date arithmetic, org-style units d w m y; .. ranges, ends may stay open; -- accepted as ... | free |
| 2026-07 · 2026-07-01..07-12 | anchored dates: a month, a day, an explicit range. | free |
| key:* · key:value | arbitrary metadata: existence and equality — the two ops that can't lie on untyped data. Keys harvested with counts; values complete top-N then typeahead (never enumerate 50 years). | free |
| calories>500 · calories:400..600 | comparisons and numeric/date ranges on a promoted key. Unpromoted → dotted underline, ignored, one-click promote; bad values become a lint list on fields/<key>. | promote |
| "exact phrase" | full-text match, quoted (web-search folk syntax). Bare words are never text search — they'd collide with the closed vocab. | free |
| joins · computed values · cross-key math | not grammar. Lua block, on purpose — the escape hatch stays imperative. | lua |
| sort: source · updated · created · when · remind · manual | source (default) keeps page order per sub-river. manual stores order on the lens — the only mode where drag-reorder is enabled in computed/interleaved regions. |
| group: source · page · tag · day · none | source (default) = one sub-river per summoned set. page = provenance headers. Interleaving (group:none + a sort) disables positional drag. |
| render: transclude · compact · list · table | transclude (default) = full blocks. compact = one line each. table = columns from mentioned keys. |
| limit: N | cap shown rows; footer reports the remainder (+18 more). |
| page: todo · linked: when:-3w.. · subpages: todo | section-scoped terms — filter just that section of a summoned page's face. Unscoped terms apply to all sections. |
| -linked · -subpages · -page | hide a whole section: ![[mcp]]{-linked -subpages} = bare river only. |
| depth: 1 · 2 · all | how far to descend into nested pages (default all). Header toggle [page] ≡ depth:0, [all] ≡ depth:all. |
Nested tint: rows homed in a nested/subpage keep the existing lighter-pane color at row level, in every render mode — provenance survives interleaved sorts even when group headers are off.
| region | drag in | drag out / between | reorder |
|---|---|---|---|
| referenced (page, union sub-river) | move — block re-homes to that page | move between pages (sub-river = page surface; existing logic unchanged) | yes — edits page order |
| computed (tag, lens result) | mark — tag applied, location unchanged | unmark — tag stripped, block stays home | only with sort:manual (order stored on lens) |
| interleaved (any region with a sort) | drop targets = group headers ("→ Projects / Reading") | per source row's contract | no — positions belong to the sort |
Storage: a lens is just this text — in a block (region), in a page property (lens: todo when:-3w.., pinned header), in view state (this visit), or shelved at lens/<name> (summonable). Copy the line = share the lens.