Semantic layer !3

merged merged by cmc on 2026-10-04 23:46 UTC · krz/orgstar:phase1-semantic-layer into main

Discussion

cmc

Adds DocumentModel, the typed layer the index and commands read, and the plan for it.

  • HeadingInfo: level, parent, TODO and done state, priority, title, own tags, property drawer, SCHEDULED/DEADLINE/CLOSED, clocks with durations, body and title timestamps, link targets, ID.
  • Inheritance on request with provenance (Resolved + ValueSource): tags with #+FILETAGS and an exclusion list; properties per policy (none/all/only), always-inherited and never-inherited keys, KEY+ appends.
  • SrcBlockInfo: language, switches, body, #+NAME, header arguments resolved from defaults, header-args/header-args:LANG (file down to heading, plain replaces, + appends), #+HEADER, begin line.
  • TableModel: rows and rules, #+TBLFM values, column widths that count CJK and emoji as two columns.
  • 76 tests pass; fuzz and corpus runs now also build a model.

Not covered: :results group merging, language default header arguments, CATEGORY from the file name, ,* unescaping.