karabiner / semantic text folding

Text that carries its own depth.

Lacuna keeps the short reading and the fuller explanation in the same source. Collapse it for pace, expand it for context, or package the hidden structure for a reversible plain-text handoff.

lacuna / author surface local parser
author markupnested input
rendered readingcollapsed
This canvas stays concise until depth is needed.

render.valid / surface retained / 2 hidden branches

simulation / no machine access no upload · no network source remains editable

one source / three readings

The syntax is the interface.

There is no detached annotation database to reconcile. The surface phrase, its optional depth, and its replacement live together and can nest inside one another.

01 / expansion

[surface](extra)

Collapsed output keeps surface. Expanded output writes surface + extra, preserving the sentence around both forms.

collapsedcanvasexpandedcanvas, the empty space,
02 / replacement

{expanded}{collapsed}

Collapsed output chooses the second branch. Expanded output chooses the first. Either branch can contain another expansion or replacement.

collapsedhidden structureexpandedworking space
03 / portable

Visible text plus map

Portable mode emits readable marker-bearing text and a Lacuna map. A later automatic pass can restore the expanded reading without the author markup.

bodycanvas[[1]]map1 / expand / extra

author → parse → render

Depth stays attached to meaning.

Use the CLI on a file or pipe text through standard input. The parser resolves nested structures before the renderer selects a reading, so depth does not depend on brittle search-and-replace passes.

input

Write once

Compose compact prose and optional context in the same line. Code spans and lightweight bold syntax remain available for terminal reading.

parser

Nest freely

An expansion can contain a replacement; a replacement branch can contain another expansion. The tree is resolved before output is chosen.

failure channel

Warn, do not vanish

An unmatched bracket or brace is rendered as visible text and produces a lint warning on stderr instead of failing silently.

output

Choose the reading

Render collapsed, expanded, portable, strip, or automatic output. Terminal color can distinguish inserted and replaced language without changing the text.


local utility / macOS

Small surface. Reversible depth.

The core renderer is a Python CLI. The optional screenshot wrapper adds a Karabiner-triggered capture and OCR route through Tesseract and jq.

install

Fetch only Lacuna

$./install.sh lacuna

The repository installer performs a sparse checkout and places the tool in the local automations directory with a command on PATH.

terminal

Pipe a reading

$echo 'This [canvas](, the empty space,)' | lacuna expanded

Use --color=auto|always|never for terminal emphasis and --quiet only when lint warnings are intentionally handled elsewhere.

requirements

Local boundaries

core
Python 3.9+
screenshot route
Tesseract + jq
config
~/.config/lacuna/config.json