diff --git a/app/spec/README.md b/app/spec/README.md index 788782c..180cc7e 100644 --- a/app/spec/README.md +++ b/app/spec/README.md @@ -4,6 +4,11 @@ walkthrough of the important App, Worker and Sync paths using existing spec types and pseudocode. It exports no interface and adds no virtual library. +Run `dune build @doc` and open `_build/default/_doc/_html/logseq_journal/index.html`. +The package homepage links to the execution guide and the coordination API. +The guide's `.mld` page is generated from its single `.mli` documentation comment; +edit only the `.mli` body. + Each area under this directory is an independent wrapped Dune virtual library. Do not use recursive `include_subdirs` to merge future specifications into one library. Add another area only when it has actual contracts and consumers. diff --git a/app/spec/dune b/app/spec/dune new file mode 100644 index 0000000..2f60a9f --- /dev/null +++ b/app/spec/dune @@ -0,0 +1,15 @@ +; Keep the documentation-only .mli as the sole body source. +; Extract its single comment without adding an OCaml module or library. + +(rule + (target journal_execution_flow.mld) + (action + (with-stdout-to + %{target} + (progn + (echo "{0 Journal execution flow}\n\n") + (run sed -e "1s/^(\\*\\* *//" -e "$d" %{dep:journal_execution_flow.mli}))))) + +(documentation + (package logseq_journal) + (mld_files index journal_execution_flow)) diff --git a/app/spec/index.mld b/app/spec/index.mld new file mode 100644 index 0000000..794dd84 --- /dev/null +++ b/app/spec/index.mld @@ -0,0 +1,10 @@ +{0 Logseq Journal} + +{1 Execution guide} + +{{!page-journal_execution_flow}Journal execution flow}: follow startup, reads, +durable writes, synchronization and resource retirement through the existing specs. + +{1 Library logseq_journal.worker_coordination} + +The App/Worker coordination API is {!module-Journal_worker_coordination}.