ores.orgmode

Table of Contents

1. Diagram

ores.orgmode component diagram

Figure 1: ores.orgmode

2. Summary

ores.orgmode parses the subset of org-mode syntax this project's agile and knowledge docs actually use — frontmatter #+ keywords, the :PROPERTIES: drawer, headings, paragraphs, lists, tables, and [[id:UUID][text]] links — into a C++ document structure. It also resolves those id: links against the existing org-roam SQLite index (the same database compass search=/=compass show read from), so a caller can walk from a task to its parent story, a story to its sprint, etc. Pure C++, no UI/database/NATS dependency: usable directly from ores.shell and from any future consumer. Entity model is ported and adapted from an earlier project, dogen.org, rather than designed from scratch.

3. Inputs

  • A path to a .org file on disk (any doc under doc/ or a component's modeling/ directory).
  • The org-roam SQLite index (org-roam.db, built and maintained by compass index) for link resolution.

4. Outputs

  • A parsed document structure: frontmatter keywords (including #+type:), the :ID: property, a tree of headings with their body content (paragraphs/lists/tables), and the document's outgoing id: links.
  • For each id: link, the resolved target's path/title/type (or an explicit "unresolved" result for a dangling link).

5. Entry points

  • Parse: read a .org file path, return the document structure.
  • Resolve: given a document (or a single link), query the org-roam index and return the resolved target.

6. Dependencies

  • None beyond the standard library and this project's usual JSON/ reflection glue (ores.platform) for the corpus-wide JSON-dump test. Reads (does not write) the org-roam SQLite index directly — no NATS, no ores.database.

7. See also

target_link_libraries(${lib_target_name}
    PRIVATE
        Boost::boost
        unofficial::sqlite3::sqlite3)
target_link_libraries(${tests_target_name}
    PRIVATE
        ${lib_target_name}
        ores.utility.lib
        ores.testing.lib
        ores.logging.lib
        Catch2::Catch2
        faker-cxx::faker-cxx
        unofficial::sqlite3::sqlite3
        Threads::Threads)

Emacs 29.3 (Org mode 9.6.15)