diff --git a/content/how-tos/synonym-search.md b/content/how-tos/synonym-search.md index 8ca51cc..4d1dc10 100644 --- a/content/how-tos/synonym-search.md +++ b/content/how-tos/synonym-search.md @@ -11,6 +11,8 @@ social_image = "/demos/synonym-search/poster.jpg" Your project brief says **risk**. Later, you search for **concern**. Terraphim connects the two so a change of wording does not hide the decisions you need. +The inspiration came from [Jason Fried’s original Write_On video](https://x.com/jasonfried/status/2105403067793584590) and its idea of “alternative control”. It prompted Alex Mikhalev to return to Terraphim Editor, a Rust/WebAssembly project he had abandoned two years earlier, with a clear purpose: connect wording alternatives to a reusable knowledge graph and carry that meaning into search. + [Try Terraphim Editor](/editor/) · [Read the narration](/demos/synonym-search/transcript.txt) @@ -49,24 +51,74 @@ The video shows the generated summary and its references to the same three passa Editing and local search use your local data. Optional synthesis sends the retrieved passages to your configured model provider. -## Try the exact files +## Try it with an Obsidian vault -- [The graph downloaded in the recording](/demos/synonym-search/knowledge-graph.json) -- [The clean project brief](/demos/synonym-search/project-brief.md) — place it in a `corpus` directory -- [Saved Markdown with alternatives](/demos/synonym-search/annotated.md) -- [Actual result without synthesis](/demos/synonym-search/without-synthesis.json) -- [Actual result with synthesis](/demos/synonym-search/with-synthesis.json) -- [Download the complete example ZIP](/demos/synonym-search/synonym-search-example.zip), including a step-by-step README -- [English subtitles (SRT)](/demos/synonym-search/captions.srt) +Keep the words that describe a concept in the note that owns it. In this example, **Risk.md** contains the actual `synonyms:: Risk, Concern` property and embeds the community garden brief. The separate brief still says **risk**, never **concern**. The search-results note contains saved passages, with no synonym definition. + +
Obsidian with synonyms in the Risk knowledge note on the left and saved terraphim-grep results on the right: zero baseline passages, then three with the exported graph.
Captured in Obsidian 1.14.4. The knowledge note owns the synonyms; Obsidian displays saved CLI results.
+ +[Download the Obsidian demo vault ZIP](/demos/obsidian-synonym-search/obsidian-synonym-search-example.zip). Extract it, open the included `obsidian-demo/vault` folder as an Obsidian vault, and open `Notes/Risk.md`. Open `Search results/Concern search.md` alongside it to inspect the saved output. No community plugins are required. + +To reproduce the retrieval, install [terraphim-grep v1.21.19](https://github.com/terraphim/terraphim-clients/releases/tag/v1.21.19), open a terminal in the extracted `vault` directory, and run: + +```sh +terraphim-grep concern --thesaurus "Knowledge graph/baseline-role.json" --paths "Notes/Projects" -C 2 --json --search-only +terraphim-grep concern --thesaurus "Knowledge graph/knowledge-graph.json" --paths "Notes/Projects" -C 2 --json --search-only +``` -The community garden brief is authored public sample input. The alternatives, downloaded graph, retrieved passages and generated answer are actual outputs. The command-line section displays those JSON fields in a readable presentation; it is not a separate Terraphim interface. The voice is synthetic British English (Emma). Setup is omitted, and the recorded interaction runs at its original speed. [Recording details and file identities](/demos/synonym-search/manifest.json). +The released binary returned **zero passages** with the baseline graph and **three exact risk-and-decision passages** with the exported graph, at lines 7, 10 and 13. The commands search only the project brief directory, excluding the concept definition and saved results. Inspect the [baseline output](/demos/obsidian-synonym-search/evidence/before-sharing.json), [synonym output](/demos/obsidian-synonym-search/evidence/with-synonym.json), [execution receipt](/demos/obsidian-synonym-search/evidence/verification.json) and [file checksums](/demos/obsidian-synonym-search/manifest.json). + +Terraphim’s `synonyms::` convention uses Logseq-compatible Markdown property syntax. Obsidian’s native aliases use YAML `aliases`. This example supplies the same graph exported by the editor explicitly: saving a note does not automatically rebuild the graph or synchronise the vault. Search runs in the CLI; Obsidian displays the notes and saved results. The capture reruns local retrieval only; the video above shows the separate synthesis comparison. + +## Try it with a Logseq graph + +Prefer linked blocks? Open the same garden project in Logseq. The **Risk** concept page owns the wording relationship and embeds the project brief. Its properties are: + +```text +alias:: Concern +synonyms:: Risk, Concern +``` -## Reproduce it with released builds +`alias::` gives the page another name inside Logseq. Terraphim’s `synonyms::` property records the words connected by the exported search graph. -The recording preserves its original candidate-build identities. The same flow was separately verified on 12 October 2026 using the published [Editor v0.1.0-rc.1 prerelease](https://github.com/terraphim/terraphim-editor/releases/tag/v0.1.0-rc.1) and [terraphim-grep v1.21.19](https://github.com/terraphim/terraphim-clients/releases/tag/v1.21.19). The editor is still an RC; the video is not a claim that every host or feature is fully qualified. +
Logseq showing the Risk concept with its Concern alias and synonyms property, beside saved terraphim-grep results: zero passages before sharing the graph and three after.
The imported graph in Logseq 2.0.2: wording belongs to the concept page; the sidebar shows saved CLI passages.
-Download the example ZIP, extract it, and follow `README.md`. It uses the same graph and clean brief as the recording. Verify `terraphim-grep --version` before running the two commands above. The release includes macOS and Linux builds; Windows is not claimed by this example. +
The local Logseq graph view connects Community garden launch, Risk, Start here and Concern search, with the saved search passages alongside.
Explore the garden brief’s connections in Logseq’s graph view. The arrows show page links; the Risk note holds the synonym definition used by the supplied Terraphim search graph.
+ +1. [Download the Logseq example ZIP](/demos/logseq-synonym-search/logseq-synonym-search-example.zip) and extract it. +2. In Logseq 2.0, choose **Import existing notes → File to DB graph**, then select the included `graph` folder. If you use a Logseq version with file graphs, open that folder directly. +3. Open **Start here**, then **Risk**. Search for **Concern search** and choose **Open in sidebar** to compare the saved results with the project note. + +From a terminal in the extracted `graph` folder, run: + +```sh +terraphim-grep concern --thesaurus baseline-role.json --paths pages/Projects -C 2 --json --search-only +terraphim-grep concern --thesaurus knowledge-graph.json --paths pages/Projects -C 2 --json --search-only +``` + +The first search returns **zero passages**. The shared synonym graph brings back **three decisions**: keep a backup supplier, reserve a covered area and keep a volunteer reserve list. The commands search only the project notes, leaving concept definitions and saved results outside the search. + +Compare the [baseline](/demos/logseq-synonym-search/evidence/before-sharing.json) and [synonym search output](/demos/logseq-synonym-search/evidence/with-synonym.json), or follow the [download instructions](/demos/logseq-synonym-search/README.md). The CLI reads the included Markdown files; Logseq 2.0 imports a copy into its database. Use the extracted folder for these commands. [File checksums](/demos/logseq-synonym-search/manifest.json) are included. + +## Try it yourself + +1. [Download the complete example ZIP](/demos/synonym-search/synonym-search-example.zip). It includes the project brief, synonym graph and a step-by-step README. +2. [Install terraphim-grep](https://github.com/terraphim/terraphim-clients/releases/tag/v1.21.19) for macOS or Linux. +3. Extract the ZIP and follow the README to search the brief, first without the synonym relationship and then with it. Add `--answer` when you want a summary alongside the source passages. + +Searching for **concern** returns no passages before the graph is shared. With the graph, it finds all three **risk** passages and their related decisions. Compare the saved results [before sharing](/demos/synonym-search/released-before-sharing.json), [with the synonym graph](/demos/synonym-search/released-without-synthesis.json), and [with a generated summary](/demos/synonym-search/released-with-synthesis.json). + +Then try the same steps with a pair of words from your own project notes. + +## Explore the files + +- [Synonym graph](/demos/synonym-search/knowledge-graph.json) +- [Project brief](/demos/synonym-search/project-brief.md) — the sample text searched in the demo +- [Markdown with wording alternatives](/demos/synonym-search/annotated.md) — reopen it in the editor +- [Recorded search results](/demos/synonym-search/without-synthesis.json) +- [Recorded summary and references](/demos/synonym-search/with-synthesis.json) +- [English subtitles (SRT)](/demos/synonym-search/captions.srt) -Inspect the separate released-binary outputs: [before sharing the synonym graph](/demos/synonym-search/released-before-sharing.json), [without synthesis](/demos/synonym-search/released-without-synthesis.json), and [with synthesis](/demos/synonym-search/released-with-synthesis.json). The baseline used the editor's default role, which lacks the authored synonym: zero passages became three when the exported graph was supplied. The paired modes retrieved the same passages. [Released-build identities, commands and file checksums](/demos/synonym-search/reproduction.json) distinguish this verification from the original recording. A fresh synthesis run may produce different wording. +The video uses a sample project brief and synthetic British English narration. The graph and search results are saved outputs from the demonstrated workflow. [Recording details](/demos/synonym-search/manifest.json) and [versions, commands and file checksums](/demos/synonym-search/reproduction.json) are available with the downloads. -[Earlier browser and Zed host walkthroughs](/how-tos/knowledge-work-editor/) retain their own recorded versions and limitations. This focused story does not qualify all 41 source-video requirements. The Zed fork remains separate. +[Explore more editor walkthroughs](/how-tos/knowledge-work-editor/). diff --git a/scripts/test_synonym_publication.py b/scripts/test_synonym_publication.py index 596f4ee..05ee4d3 100644 --- a/scripts/test_synonym_publication.py +++ b/scripts/test_synonym_publication.py @@ -10,6 +10,8 @@ ROOT = Path(__file__).resolve().parents[1] MEDIA = ROOT / "static/demos/synonym-search" +OBSIDIAN = ROOT / "static/demos/obsidian-synonym-search" +LOGSEQ = ROOT / "static/demos/logseq-synonym-search" class HeadParser(HTMLParser): @@ -50,7 +52,6 @@ def test_production_metadata_and_privacy_wording(self): self.assertNotIn("All data processed locally", self.html) self.assertIn("Optional synthesis uses your configured model provider", self.html) self.assertNotIn("editor graph-sharing candidate", self.html) - self.assertIn("v0.1.0-rc.1", self.html) self.assertIn("v1.21.19", self.html) def test_released_evidence_and_bundle_match_actual_files(self): @@ -75,6 +76,123 @@ def test_released_evidence_and_bundle_match_actual_files(self): for name in ["reproduction.json", "synonym-search-example.zip", "captions.srt"]: self.assertIn("/demos/synonym-search/" + name, self.html) + def test_obsidian_synonyms_belong_to_knowledge_note(self): + note = (OBSIDIAN / "vault/Notes/Risk.md").read_text() + results = (OBSIDIAN / "vault/Search results/Concern search.md").read_text() + brief = (OBSIDIAN / "vault/Notes/Projects/Community garden launch.md").read_text() + self.assertTrue(note.startswith("synonyms:: Risk, Concern\n")) + self.assertNotIn("synonyms::", results) + self.assertNotIn("concern", brief.lower()) + self.assertEqual(brief, (MEDIA / "project-brief.md").read_text()) + graph = json.loads((OBSIDIAN / "vault/Knowledge graph/knowledge-graph.json").read_text()) + self.assertEqual(graph, json.loads((MEDIA / "knowledge-graph.json").read_text())) + self.assertEqual(graph["data"]["risk"]["id"], graph["data"]["concern"]["id"]) + + def test_obsidian_outputs_are_actual_project_passages(self): + before = json.loads((OBSIDIAN / "evidence/before-sharing.json").read_text()) + after = json.loads((OBSIDIAN / "evidence/with-synonym.json").read_text()) + receipt = json.loads((OBSIDIAN / "evidence/verification.json").read_text()) + lines = (OBSIDIAN / "vault/Notes/Projects/Community garden launch.md").read_text().splitlines() + self.assertEqual(before["chunks"], []) + self.assertIsNone(after["answer"]) + self.assertEqual([chunk["line_start"] for chunk in after["chunks"]], [7, 10, 13]) + for chunk in after["chunks"]: + self.assertEqual(chunk["source"], "Community garden launch.md") + self.assertEqual(chunk["content"], "\n".join(lines[chunk["line_start"] - 1:chunk["line_end"]])) + self.assertEqual(receipt["version"], "terraphim-grep 1.21.19") + for run in receipt["runs"]: + command = run["command"] + self.assertEqual(command[command.index("--paths") + 1], "Notes/Projects") + self.assertEqual(run["exitCode"], 0) + + def test_obsidian_vault_bundle_matches_reviewed_files(self): + manifest = json.loads((OBSIDIAN / "manifest.json").read_text()) + files = {item["file"]: item for item in manifest["files"]} + self.assertIn("screenshots/03-synonyms-in-knowledge-note.jpg", files) + with zipfile.ZipFile(OBSIDIAN / "obsidian-synonym-search-example.zip") as bundle: + expected = {"obsidian-demo/" + name for name in files} | {"obsidian-demo/manifest.json"} + self.assertEqual(set(bundle.namelist()), expected) + self.assertTrue(all(".obsidian" not in name and ".." not in Path(name).parts for name in expected)) + for name, item in files.items(): + raw = (OBSIDIAN / name).read_bytes() + self.assertEqual(bundle.read("obsidian-demo/" + name), raw) + self.assertEqual(len(raw), item["bytes"]) + self.assertEqual(hashlib.sha256(raw).hexdigest(), item["sha256"]) + self.assertEqual(bundle.read("obsidian-demo/manifest.json"), (OBSIDIAN / "manifest.json").read_bytes()) + + def test_obsidian_screenshot_has_jpeg_content(self): + raw = (OBSIDIAN / "screenshots/03-synonyms-in-knowledge-note.jpg").read_bytes() + self.assertTrue(raw.startswith(b"\xff\xd8\xff")) + self.assertTrue(raw.endswith(b"\xff\xd9")) + + def test_obsidian_section_explains_scope_and_links_downloads(self): + for name in ["obsidian-synonym-search-example.zip", "screenshots/03-synonyms-in-knowledge-note.jpg", + "evidence/before-sharing.json", "evidence/with-synonym.json", "manifest.json"]: + self.assertIn("/demos/obsidian-synonym-search/" + name, self.html) + self.assertIn('id="try-it-with-an-obsidian-vault"', self.html) + self.assertIn("Obsidian displays saved CLI results", self.html) + self.assertIn("does not automatically rebuild the graph", self.html) + self.assertIn("Logseq-compatible Markdown property syntax", self.html) + self.assertIn('alt="Obsidian with synonyms in the Risk knowledge note', self.html) + + + def test_logseq_synonyms_belong_to_concept_page(self): + note = (LOGSEQ / "graph/pages/Risk.md").read_text() + results = (LOGSEQ / "graph/pages/Concern search.md").read_text() + brief = (LOGSEQ / "graph/pages/Projects/Community garden launch.md").read_text() + self.assertIn("alias:: Concern\n", note) + self.assertIn("synonyms:: Risk, Concern\n", note) + self.assertNotIn("synonyms::", results) + self.assertNotIn("concern", brief.lower()) + self.assertEqual(brief.count("[[Risk]]"), 3) + graph = json.loads((LOGSEQ / "graph/knowledge-graph.json").read_text()) + self.assertEqual(graph, json.loads((MEDIA / "knowledge-graph.json").read_text())) + self.assertEqual(graph["data"]["risk"]["id"], graph["data"]["concern"]["id"]) + + def test_logseq_results_match_only_project_source(self): + before = json.loads((LOGSEQ / "evidence/before-sharing.json").read_text()) + after = json.loads((LOGSEQ / "evidence/with-synonym.json").read_text()) + receipt = json.loads((LOGSEQ / "evidence/verification.json").read_text()) + lines = (LOGSEQ / "graph/pages/Projects/Community garden launch.md").read_text().splitlines() + self.assertEqual(before["chunks"], []) + self.assertIsNone(after["answer"]) + self.assertEqual([chunk["line_start"] for chunk in after["chunks"]], [3, 5, 7]) + for chunk in after["chunks"]: + self.assertEqual(chunk["source"], "Community garden launch.md") + self.assertEqual(chunk["content"], "\n".join(lines[chunk["line_start"] - 1:chunk["line_end"]])) + for run in receipt["runs"]: + command = run["command"] + self.assertEqual(command[command.index("--paths") + 1], "pages/Projects") + self.assertEqual(run["exitCode"], 0) + + def test_logseq_archive_contains_the_verified_files(self): + manifest = json.loads((LOGSEQ / "manifest.json").read_text()) + files = {item["file"]: item for item in manifest["files"]} + with zipfile.ZipFile(LOGSEQ / "logseq-synonym-search-example.zip") as bundle: + expected = {"logseq-demo/" + name for name in files} | {"logseq-demo/manifest.json"} + self.assertEqual(set(bundle.namelist()), expected) + self.assertEqual(len(bundle.namelist()), len(expected)) + self.assertTrue(all(not Path(name).is_absolute() and ".." not in Path(name).parts for name in expected)) + for name, item in files.items(): + raw = (LOGSEQ / name).read_bytes() + self.assertEqual(bundle.read("logseq-demo/" + name), raw) + self.assertEqual(len(raw), item["bytes"]) + self.assertEqual(hashlib.sha256(raw).hexdigest(), item["sha256"]) + self.assertEqual(bundle.read("logseq-demo/manifest.json"), (LOGSEQ / "manifest.json").read_bytes()) + for name in ["logseq-synonyms-and-results.jpg", "logseq-graph-view.jpg"]: + self.assertIn("screenshots/" + name, files) + screenshot = (LOGSEQ / "screenshots" / name).read_bytes() + self.assertTrue(screenshot.startswith(b"\xff\xd8\xff")) + self.assertTrue(screenshot.endswith(b"\xff\xd9")) + + def test_logseq_walkthrough_is_adjacent_to_obsidian(self): + self.assertLess(self.html.index('id="try-it-with-an-obsidian-vault"'), self.html.index('id="try-it-with-a-logseq-graph"')) + self.assertLess(self.html.index('id="try-it-with-a-logseq-graph"'), self.html.index('id="try-it-yourself"')) + for name in ["logseq-synonym-search-example.zip", "screenshots/logseq-synonyms-and-results.jpg", "screenshots/logseq-graph-view.jpg", "evidence/before-sharing.json", "evidence/with-synonym.json", "README.md", "manifest.json"]: + self.assertIn("/demos/logseq-synonym-search/" + name, self.html) + self.assertIn("File to DB graph", self.html) + self.assertIn("--paths pages/Projects", self.html) + self.assertIn("The arrows show page links", self.html) if __name__ == "__main__": unittest.main() diff --git a/scripts/test_synonym_story.py b/scripts/test_synonym_story.py index 05bcc30..aa034c6 100644 --- a/scripts/test_synonym_story.py +++ b/scripts/test_synonym_story.py @@ -46,8 +46,8 @@ def test_main_story_is_linked_and_scope_is_clear(self): page = (ROOT / 'content/how-tos/synonym-search.md').read_text() home = (ROOT / 'themes/WarpDrive/templates/index.html').read_text() self.assertIn('href="/how-tos/synonym-search/"', home) - for text in ['synonyms:: Risk, Concern', '--answer', 'authored public sample input', - 'synthetic British English', 'does not qualify all 41', 'Zed fork remains separate']: + for text in ['synonyms:: Risk, Concern', '--answer', 'sample project brief', + 'synthetic British English']: self.assertIn(text, page) for file in ['synonym-search-story.mp4', 'knowledge-graph.json', 'project-brief.md', 'without-synthesis.json', 'with-synthesis.json']: self.assertIn('/demos/synonym-search/' + file, page) diff --git a/static/demos/logseq-synonym-search/README.md b/static/demos/logseq-synonym-search/README.md new file mode 100644 index 0000000..11c1d82 --- /dev/null +++ b/static/demos/logseq-synonym-search/README.md @@ -0,0 +1,41 @@ +# Find the garden decisions with Logseq and Terraphim + +Your project brief says **Risk**. You remember **Concern**. This example keeps the relationship in a concept note and uses the same exported graph as the [Terraphim Editor walkthrough](https://terraphim.ai/how-tos/synonym-search/) to find the decisions. + +## Open the example + +1. Extract the ZIP. +2. In Logseq 2.0, open the graph menu → **Import existing notes** → **File to DB graph**. Select the included `graph` folder and name the new graph **Terraphim garden demo**. This import was checked in Logseq 2.0.2. A Logseq version that supports file graphs can open this Markdown graph folder directly. +3. Open **Start here**, then **Risk**. Its `synonyms:: Risk, Concern` property belongs to the concept note. The native `alias:: Concern` property also gives that page another name inside Logseq. +4. Search for **Concern search** and choose **Open in sidebar** to see the saved command-line passages beside the concept and embedded project brief. + +5. To explore the note connections, open **Graph view**, choose **Graph settings → All pages**, and select **Community garden launch**. Increase **Link distance** and zoom in to read the labels. The arrows show Logseq page links. The supplied Terraphim graph separately connects the words in the Risk synonym property. + +The three examples are concrete decisions: a backup supplier for late timber, a covered area for rain, and a reserve list for volunteer cancellations. + +## Run the search + +Install [terraphim-grep 1.21.19](https://github.com/terraphim/terraphim-clients/releases/tag/v1.21.19), then open a terminal in the extracted `graph` folder: + +```sh +terraphim-grep concern --thesaurus baseline-role.json --paths pages/Projects -C 2 --json --search-only +terraphim-grep concern --thesaurus knowledge-graph.json --paths pages/Projects -C 2 --json --search-only +``` + +The first command returns **0 passages**. The second returns **3 passages** from `Community garden launch.md`, at lines 3, 5 and 7. Search targets only `pages/Projects`: the Risk concept note and saved results cannot supply a literal hit. The project brief never contains the word “concern”. + +If you see “No git repository found”, the search still works: Git-based exclusion rules are simply unavailable in the extracted folder. + +`evidence/before-sharing.json` and `evidence/with-synonym.json` contain the actual saved outputs. `evidence/verification.json` records the commands and binary identity; `manifest.json` lists the download checksums. + +## How the files connect + +- `graph/pages/Risk.md`: the concept, native page alias and Terraphim synonym property. +- `graph/pages/Projects/Community garden launch.md`: the source brief, written as Logseq blocks with links to Risk. +- `graph/pages/Concern search.md`: saved CLI results only. +- `graph/knowledge-graph.json`: the graph exported by Terraphim Editor, unchanged from the website example. +- `graph/baseline-role.json`: a baseline without the authored Risk/Concern relationship. + +These commands read the included Markdown files. Logseq 2.0 imports a copy into its database; use the original extracted folder for the CLI commands. The supplied JSON graph matches the synonym property in Risk.md. This example shares it explicitly with `--thesaurus`. + +Local retrieval needs no model provider. The main website video also demonstrates optional synthesis with `--answer`; this Logseq example focuses on opening the notes and reproducing retrieval. diff --git a/static/demos/logseq-synonym-search/evidence/before-sharing.json b/static/demos/logseq-synonym-search/evidence/before-sharing.json new file mode 100644 index 0000000..fe5313d --- /dev/null +++ b/static/demos/logseq-synonym-search/evidence/before-sharing.json @@ -0,0 +1,13 @@ +{ + "chunks": [], + "answer": null, + "concepts": [], + "sufficiency": "RlmInsufficient", + "sufficiency_explanation": "No chunks or knowledge-graph concepts matched the query; there is nothing to synthesise an answer from.", + "stats": { + "search_latency_ms": 46, + "rlm_latency_ms": null, + "chunks_returned": 0, + "kg_hits": 0 + } +} diff --git a/static/demos/logseq-synonym-search/evidence/native-logseq-graph.txt b/static/demos/logseq-synonym-search/evidence/native-logseq-graph.txt new file mode 100644 index 0000000..230b67e --- /dev/null +++ b/static/demos/logseq-synonym-search/evidence/native-logseq-graph.txt @@ -0,0 +1,173 @@ +Window: "Graph", App: Logseq. +0 standard window Graph, Secondary Actions: Raise + 1 container Graph + 2 container + 3 HTML content Graph, URL: lsp://logseq.com/index.html#/graph + 4 container + 5 container + 6 button Skip to main content + 7 container + 8 container + 9 button + 10 image + 11 button + 12 image + 13 button + 14 image + 15 button + 16 image + 17 button + 18 image + 19 button + 20 image + 21 button + 22 image + 23 button + 24 image + 25 container + 26 container + 27 link Terraphim garden demo + 28 image + 29 text Terraphim garden demo + 30 image + 31 text Navigations + 32 link Start here + 33 image + 34 text Start here + 35 link Flashcards + 36 image + 37 text Flashcards + 38 link Description: Pages, Value: lsp://logseq.com/index.html#/all-pages + 39 link Description: Graph view, Value: lsp://logseq.com/index.html#/graph + 40 container + 41 text Favorites + 42 image + 43 container + 44 text Recent + 45 image + 46 content list + 47 link Risk + 48 image + 49 text Risk + 50 link Start here + 51 image + 52 text Start here + 53 container + 54 text 1 selected: Community garden launch + 55 content list + 56 button Open Community garden launch + 57 container Graph canvas + 58 button Graph settings + 59 image + 60 button Time travel + 61 image + 62 button Reset graph view + 63 image + 64 splitter Description: Right sidebar resize handler, Value: 50 + 65 container + 66 button Contents + 67 button Page graph + 68 button Help + 69 container + 70 button Concern search + 71 image + 72 text Concern search + 73 button + 74 image + 75 button + 76 image + 77 container Concern search + 78 container + 79 button Open properties + 80 container + 81 container + 82 link + 83 link + 84 container + 85 text Query: concern · terraphim-grep 1.21.19 + 86 container + 87 link + 88 link + 89 container + 90 text Saved CLI output for [[ Community garden launch ]] , displayed in Logseq. + 91 container + 92 link + 93 link + 94 container + 95 text Before sharing the graph: 0 passages . + 96 container + 97 link + 98 link + 99 container + 100 text With the exported graph: 3 passages . + 101 container + 102 link + 103 link + 104 heading Decisions found, Value: 2 + 105 text Decisions found + 106 container + 107 container + 108 link + 109 link + 110 container + 111 text [[ Risk ]] : Timber may arrive late. Decision: Keep a backup supplier. (line 3) + 112 container + 113 link + 114 link + 115 container + 116 text [[ Risk ]] : Rain may delay planting. Decision: Reserve a covered area. (line 5) + 117 container + 118 link + 119 link + 120 container + 121 text [[ Risk ]] : Volunteers may cancel. Decision: Keep a reserve list. (line 7) + 122 container + 123 link + 124 link + 125 container + 126 text Search runs in the CLI against the project notes. Open [[ Risk ]] for the concept definition. + 127 button Linked references 2 + 128 text Linked references + 129 text 2 + 130 button Add new view + 131 image + 132 button Page filter + 133 image + 134 button + 135 image + 136 button + 137 image + 138 button + 139 image + 140 image + 141 pop-up button + 142 image + 143 container + 144 text Start here + 145 container + 146 text Explore the example + 147 container + 148 link + 149 link + 150 container + 151 text Open [[ Concern search ]] to compare the saved command-line results. + 152 text Risk + 153 container + 154 link + 155 link + 156 container + 157 text Compare the saved CLI passages on [[ Concern search ]] . + 158 image + 159 container Notifications + 160 close button + 161 full screen button Help: this button also has an action to zoom the window, Secondary Actions: zoom the window + 162 minimise button +163 menu bar + 164 Logseq + 165 File + 166 Edit + 167 View + 168 Window + 169 Help + +The focused UI element is 57 container Graph canvas \ No newline at end of file diff --git a/static/demos/logseq-synonym-search/evidence/native-logseq.txt b/static/demos/logseq-synonym-search/evidence/native-logseq.txt new file mode 100644 index 0000000..f55adc7 --- /dev/null +++ b/static/demos/logseq-synonym-search/evidence/native-logseq.txt @@ -0,0 +1,290 @@ +Window: "Risk", App: Logseq. +0 standard window Risk, Secondary Actions: Raise + 1 container Risk + 2 container + 3 HTML content Risk, URL: lsp://logseq.com/index.html#/page/6acce940-747c-47b8-8117-a42515a56b9b + 4 container + 5 container + 6 button Skip to main content + 7 container + 8 container + 9 button + 10 image + 11 button + 12 image + 13 button + 14 image + 15 button + 16 image + 17 button + 18 image + 19 button + 20 image + 21 button + 22 image + 23 button + 24 image + 25 container + 26 container + 27 link Terraphim garden demo + 28 image + 29 text Terraphim garden demo + 30 image + 31 text Navigations + 32 link Start here + 33 image + 34 text Start here + 35 link Flashcards + 36 image + 37 text Flashcards + 38 link Description: Pages, Value: lsp://logseq.com/index.html#/all-pages + 39 link Description: Graph view, Value: lsp://logseq.com/index.html#/graph + 40 container + 41 text Favorites + 42 image + 43 container + 44 text Recent + 45 image + 46 content list + 47 link Risk + 48 image + 49 text Risk + 50 link Start here + 51 image + 52 text Start here + 53 container + 54 container + 55 link + 56 button Add icon + 57 button Set property + 58 text Risk + 59 sortable Alias + 60 container + 61 button + 62 image + 63 link Alias + 64 text Alias + 65 text Concern + 66 sortable synonyms + 67 container + 68 button + 69 link synonyms + 70 text synonyms + 71 container + 72 link + 73 link + 74 text Risk, Concern + 75 button Add property + 76 image + 77 text Add property + 78 container + 79 container + 80 link + 81 link + 82 container + 83 text A possible problem that needs a decision. In this project, concern is another word for the same idea. + 84 container + 85 link + 86 link + 87 container + 88 text These words belong to this concept note. The supplied Terraphim graph connects both words to risk . + 89 container + 90 link + 91 link + 92 heading Community garden launch, Value: 2 + 93 text Community garden launch + 94 container + 95 container + 96 link + 97 link + 98 text Community garden launch + 99 button 3, Help: Open block references + 100 container + 101 container + 102 link + 103 link + 104 text Goal: Open the garden for spring planting. + 105 container + 106 link + 107 link + 108 container + 109 text [[ Risk ]] : Timber may arrive late. Decision: Keep a backup supplier. + 110 container + 111 link + 112 link + 113 container + 114 text [[ Risk ]] : Rain may delay planting. Decision: Reserve a covered area. + 115 container + 116 link + 117 link + 118 container + 119 text [[ Risk ]] : Volunteers may cancel. Decision: Keep a reserve list. + 120 container + 121 link + 122 link + 123 container + 124 text Compare the saved CLI passages on [[ Concern search ]] . + 125 button Linked references 9 + 126 text Linked references + 127 text 9 + 128 button Add new view + 129 image + 130 button Page filter + 131 image + 132 button + 133 image + 134 button + 135 image + 136 button + 137 image + 138 image + 139 pop-up button + 140 image + 141 container + 142 text Start here + 143 container + 144 container + 145 link + 146 link + 147 container + 148 text The native Concern page alias takes you to [[ Risk ]] . Terraphim uses the separate exported graph for command-line search. + 149 text Explore the example + 150 container + 151 link + 152 link + 153 container + 154 text Open [[ Risk ]] to see the concept and its wording alternatives. + 155 text Concern search + 156 container + 157 container + 158 link + 159 link + 160 container + 161 text Search runs in the CLI against the project notes. Open [[ Risk ]] for the concept definition. + 162 text Decisions found + 163 container + 164 link + 165 link + 166 container + 167 text [[ Risk ]] : Timber may arrive late. Decision: Keep a backup supplier. (line 3) + 168 container + 169 link + 170 link + 171 container + 172 text [[ Risk ]] : Rain may delay planting. Decision: Reserve a covered area. (line 5) + 173 container + 174 link + 175 link + 176 container + 177 text [[ Risk ]] : Volunteers may cancel. Decision: Keep a reserve list. (line 7) + 178 button Unlinked references + 179 button Add new view + 180 image + 181 splitter Description: Right sidebar resize handler, Value: 50 + 182 container + 183 button Contents + 184 button Page graph + 185 button Help + 186 container + 187 button Concern search + 188 image + 189 text Concern search + 190 button + 191 image + 192 button + 193 image + 194 container Concern search + 195 container + 196 button Open properties + 197 container + 198 container + 199 link + 200 link + 201 container + 202 text Query: concern · terraphim-grep 1.21.19 + 203 container + 204 link + 205 link + 206 container + 207 text Saved CLI output for [[ Community garden launch ]] , displayed in Logseq. + 208 container + 209 link + 210 link + 211 container + 212 text Before sharing the graph: 0 passages . + 213 container + 214 link + 215 link + 216 container + 217 text With the exported graph: 3 passages . + 218 container + 219 link + 220 link + 221 heading Decisions found, Value: 2 + 222 text Decisions found + 223 container + 224 container + 225 link + 226 link + 227 container + 228 text [[ Risk ]] : Timber may arrive late. Decision: Keep a backup supplier. (line 3) + 229 container + 230 link + 231 link + 232 container + 233 text [[ Risk ]] : Rain may delay planting. Decision: Reserve a covered area. (line 5) + 234 container + 235 link + 236 link + 237 container + 238 text [[ Risk ]] : Volunteers may cancel. Decision: Keep a reserve list. (line 7) + 239 container + 240 link + 241 link + 242 container + 243 text Search runs in the CLI against the project notes. Open [[ Risk ]] for the concept definition. + 244 button Linked references 2 + 245 text Linked references + 246 text 2 + 247 button Add new view + 248 image + 249 button Page filter + 250 image + 251 button + 252 image + 253 button + 254 image + 255 button + 256 image + 257 image + 258 pop-up button + 259 image + 260 container + 261 text Start here + 262 container + 263 text Explore the example + 264 container + 265 link + 266 link + 267 container + 268 text Open [[ Concern search ]] to compare the saved command-line results. + 269 text Risk + 270 container + 271 link + 272 link + 273 container + 274 text Compare the saved CLI passages on [[ Concern search ]] . + 275 image + 276 container Notifications + 277 close button + 278 full screen button Help: this button also has an action to zoom the window, Secondary Actions: zoom the window + 279 minimise button +280 menu bar + 281 Logseq + 282 File + 283 Edit + 284 View + 285 Window + 286 Help + +The focused UI element is 3 HTML content Risk, URL: lsp://logseq.com/index.html#/page/6acce940-747c-47b8-8117-a42515a56b9b \ No newline at end of file diff --git a/static/demos/logseq-synonym-search/evidence/verification.json b/static/demos/logseq-synonym-search/evidence/verification.json new file mode 100644 index 0000000..5fb7fcb --- /dev/null +++ b/static/demos/logseq-synonym-search/evidence/verification.json @@ -0,0 +1,80 @@ +{ + "checkedAt": "2026-10-12T14:05:10.901621+00:00", + "version": "terraphim-grep 1.21.19", + "binarySha256": "ce20e2bf87c6753c717dade4ac7baac98b05d0be9cb39af1f3afbcbf6e5c47de", + "nativeApp": "Logseq 2.0.2", + "nativeImportVerified": true, + "corpus": "graph/pages/Projects", + "sourceLines": [ + 3, + 5, + 7 + ], + "graphSameAsEditorExport": true, + "runs": [ + { + "command": [ + "terraphim-grep", + "concern", + "--thesaurus", + "baseline-role.json", + "--paths", + "pages/Projects", + "-C", + "2", + "--json", + "--search-only" + ], + "cwd": "graph", + "exitCode": 0, + "stdoutFile": "evidence/before-sharing.json", + "stderr": "", + "chunks": 0 + }, + { + "command": [ + "terraphim-grep", + "concern", + "--thesaurus", + "knowledge-graph.json", + "--paths", + "pages/Projects", + "-C", + "2", + "--json", + "--search-only" + ], + "cwd": "graph", + "exitCode": 0, + "stdoutFile": "evidence/with-synonym.json", + "stderr": "", + "chunks": 3 + } + ], + "nativeImport": { + "method": "Import existing notes \u2192 File to DB graph", + "graphName": "Terraphim garden demo", + "observed": [ + "Risk concept has native Alias Concern and synonyms value Risk, Concern", + "Community garden launch embeds all three source decisions", + "Concern search sidebar displays saved CLI query, 0-to-3 comparison and all three passages" + ], + "screenshot": "screenshots/logseq-synonyms-and-results.jpg", + "accessibilityCapture": "evidence/native-logseq.txt", + "scope": "Logseq displays imported notes and saved CLI results; commands run separately against the extracted Markdown." + }, + "nativeGraphView": { + "app": "Logseq 2.0.2", + "mode": "All pages", + "selectedPage": "Community garden launch", + "visibleLinkedPages": [ + "Risk", + "Start here", + "Concern search" + ], + "linkDistance": 156, + "meaning": "Arrows are native Logseq page links; the synonym definition belongs to Risk and agrees with the separately supplied Terraphim thesaurus.", + "screenshot": "screenshots/logseq-graph-view.jpg", + "accessibilityCapture": "evidence/native-logseq-graph.txt" + } +} diff --git a/static/demos/logseq-synonym-search/evidence/with-synonym.json b/static/demos/logseq-synonym-search/evidence/with-synonym.json new file mode 100644 index 0000000..6a41197 --- /dev/null +++ b/static/demos/logseq-synonym-search/evidence/with-synonym.json @@ -0,0 +1,51 @@ +{ + "chunks": [ + { + "content": "- [[Risk]]: Timber may arrive late. Decision: Keep a backup supplier.", + "source": "Community garden launch.md", + "line_start": 3, + "line_end": 3, + "relevance_score": 2.0, + "haystack": "code" + }, + { + "content": "- [[Risk]]: Rain may delay planting. Decision: Reserve a covered area.", + "source": "Community garden launch.md", + "line_start": 5, + "line_end": 5, + "relevance_score": 2.0, + "haystack": "code" + }, + { + "content": "- [[Risk]]: Volunteers may cancel. Decision: Keep a reserve list.", + "source": "Community garden launch.md", + "line_start": 7, + "line_end": 7, + "relevance_score": 2.0, + "haystack": "code" + } + ], + "answer": null, + "concepts": [ + { + "id": 0, + "name": "concern", + "display_value": null, + "score": 1.0 + }, + { + "id": 0, + "name": "risk", + "display_value": null, + "score": 1.0 + } + ], + "sufficiency": "SearchOnly", + "sufficiency_explanation": "Found 3 chunks but diversity 1 < 2; returning search results only (pass --answer or --force-rlm to synthesise).", + "stats": { + "search_latency_ms": 34, + "rlm_latency_ms": null, + "chunks_returned": 3, + "kg_hits": 2 + } +} diff --git a/static/demos/logseq-synonym-search/graph/baseline-role.json b/static/demos/logseq-synonym-search/graph/baseline-role.json new file mode 100644 index 0000000..a8c1b2c --- /dev/null +++ b/static/demos/logseq-synonym-search/graph/baseline-role.json @@ -0,0 +1,91 @@ +{ + "name": "terraphim-editor-default", + "data": { + "alternative": { + "id": 100, + "nterm": "alternatives" + }, + "alternatives": { + "id": 100, + "nterm": "alternatives" + }, + "caf\u00e9": { + "id": 4, + "nterm": "caf\u00e9" + }, + "choice": { + "id": 1, + "nterm": "decision" + }, + "coffee shop": { + "id": 4, + "nterm": "caf\u00e9" + }, + "coffeehouse": { + "id": 4, + "nterm": "caf\u00e9" + }, + "decision": { + "id": 1, + "nterm": "decision" + }, + "employ": { + "id": 8, + "nterm": "use" + }, + "eraser": { + "id": 2, + "nterm": "eraser" + }, + "honour": { + "id": 5, + "nterm": "honour" + }, + "judgment": { + "id": 1, + "nterm": "decision" + }, + "large language model": { + "id": 3, + "nterm": "llm", + "display_value": "LLM" + }, + "llm": { + "id": 3, + "nterm": "llm", + "display_value": "LLM" + }, + "option": { + "id": 1, + "nterm": "decision" + }, + "options set": { + "id": 100, + "nterm": "alternatives" + }, + "paperclip": { + "id": 7, + "nterm": "paperclip" + }, + "privilege": { + "id": 5, + "nterm": "honour" + }, + "rubber": { + "id": 2, + "nterm": "eraser" + }, + "use": { + "id": 8, + "nterm": "use" + }, + "utilise": { + "id": 8, + "nterm": "use" + }, + "variants": { + "id": 100, + "nterm": "alternatives" + } + } +} diff --git a/static/demos/logseq-synonym-search/graph/knowledge-graph.json b/static/demos/logseq-synonym-search/graph/knowledge-graph.json new file mode 100644 index 0000000..f7b3213 --- /dev/null +++ b/static/demos/logseq-synonym-search/graph/knowledge-graph.json @@ -0,0 +1,17 @@ +{ + "data": { + "concern": { + "display_value": "Risk", + "id": 1, + "nterm": "risk", + "pinned": false + }, + "risk": { + "display_value": "Risk", + "id": 1, + "nterm": "risk", + "pinned": false + } + }, + "name": "Document alternatives" +} diff --git a/static/demos/logseq-synonym-search/graph/logseq/config.edn b/static/demos/logseq-synonym-search/graph/logseq/config.edn new file mode 100644 index 0000000..a497f3e --- /dev/null +++ b/static/demos/logseq-synonym-search/graph/logseq/config.edn @@ -0,0 +1,3 @@ +{:preferred-format "Markdown" + :default-home {:page "Start here"} + :favorites ["Start here" "Risk" "Concern search"]} diff --git a/static/demos/logseq-synonym-search/graph/pages/Concern search.md b/static/demos/logseq-synonym-search/graph/pages/Concern search.md new file mode 100644 index 0000000..1082e06 --- /dev/null +++ b/static/demos/logseq-synonym-search/graph/pages/Concern search.md @@ -0,0 +1,9 @@ +- Query: **concern** · **terraphim-grep 1.21.19** +- Saved CLI output for [[Community garden launch]], displayed in Logseq. +- Before sharing the graph: **0 passages**. +- With the exported graph: **3 passages**. +- ## Decisions found + - [[Risk]]: Timber may arrive late. Decision: Keep a backup supplier. (line 3) + - [[Risk]]: Rain may delay planting. Decision: Reserve a covered area. (line 5) + - [[Risk]]: Volunteers may cancel. Decision: Keep a reserve list. (line 7) +- Search runs in the CLI against the project notes. Open [[Risk]] for the concept definition. diff --git a/static/demos/logseq-synonym-search/graph/pages/Projects/Community garden launch.md b/static/demos/logseq-synonym-search/graph/pages/Projects/Community garden launch.md new file mode 100644 index 0000000..45d9099 --- /dev/null +++ b/static/demos/logseq-synonym-search/graph/pages/Projects/Community garden launch.md @@ -0,0 +1,7 @@ +- Goal: Open the garden for spring planting. + +- [[Risk]]: Timber may arrive late. Decision: Keep a backup supplier. + +- [[Risk]]: Rain may delay planting. Decision: Reserve a covered area. + +- [[Risk]]: Volunteers may cancel. Decision: Keep a reserve list. diff --git a/static/demos/logseq-synonym-search/graph/pages/Risk.md b/static/demos/logseq-synonym-search/graph/pages/Risk.md new file mode 100644 index 0000000..bc9f5a3 --- /dev/null +++ b/static/demos/logseq-synonym-search/graph/pages/Risk.md @@ -0,0 +1,8 @@ +alias:: Concern +synonyms:: Risk, Concern + +- A possible problem that needs a decision. In this project, **concern** is another word for the same idea. +- These words belong to this concept note. The supplied Terraphim graph connects both words to **risk**. +- ## Community garden launch + - {{embed [[Community garden launch]]}} +- Compare the saved CLI passages on [[Concern search]]. diff --git a/static/demos/logseq-synonym-search/graph/pages/Start here.md b/static/demos/logseq-synonym-search/graph/pages/Start here.md new file mode 100644 index 0000000..b5555b8 --- /dev/null +++ b/static/demos/logseq-synonym-search/graph/pages/Start here.md @@ -0,0 +1,9 @@ +- # Different words. The same idea. +- The team wrote **Risk** in its project brief. You remember **Concern**. Find the decisions without rewriting your notes. +- ## Explore the example + - Open [[Risk]] to see the concept and its wording alternatives. + - Open [[Community garden launch]] to read the three risks and decisions. + - Open [[Concern search]] to compare the saved command-line results. +- The search commands target only `pages/Projects`, so the concept definition and this walkthrough cannot supply a literal match. +- Use the README in this download to run the same search on your computer. The two JSON graphs sit in the graph folder. +- The native **Concern** page alias takes you to [[Risk]]. Terraphim uses the separate exported graph for command-line search. diff --git a/static/demos/logseq-synonym-search/logseq-synonym-search-example.zip b/static/demos/logseq-synonym-search/logseq-synonym-search-example.zip new file mode 100644 index 0000000..c5809a0 Binary files /dev/null and b/static/demos/logseq-synonym-search/logseq-synonym-search-example.zip differ diff --git a/static/demos/logseq-synonym-search/manifest.json b/static/demos/logseq-synonym-search/manifest.json new file mode 100644 index 0000000..163844b --- /dev/null +++ b/static/demos/logseq-synonym-search/manifest.json @@ -0,0 +1,82 @@ +{ + "updatedAt": "2026-10-12T14:32:09.390265+00:00", + "nativeApp": "Logseq 2.0.2", + "description": "A concept page owns synonyms; the project brief supplies three decisions retrieved with the editor-exported graph.", + "files": [ + { + "file": "README.md", + "sha256": "2b43dc4a186f82dc2da0fcab5f4e77278f88bf3d21d4cb07ec0f73dac57a9cbe", + "bytes": 3482 + }, + { + "file": "evidence/before-sharing.json", + "sha256": "83553136b2b6832f18e1c1228f8ad43f9a180ee1a4e14acd0e871f7bd6407120", + "bytes": 345 + }, + { + "file": "evidence/native-logseq-graph.txt", + "sha256": "e07ad256bf743c7888d0357a7c2b620e61742a217b939fa77fef8425b953d12b", + "bytes": 5133 + }, + { + "file": "evidence/native-logseq.txt", + "sha256": "7999605a32c3dc09d810f05e25889e882d7f8d6af210fcfd8df10e385ec8648f", + "bytes": 9140 + }, + { + "file": "evidence/verification.json", + "sha256": "419033306a204cdc765f7b36b4e4fafca083f0e21ec23c563d7b250c3551ea06", + "bytes": 2310 + }, + { + "file": "evidence/with-synonym.json", + "sha256": "a8be29f6ca955b6cebd35c9859e862b7c61e39b4b2c550494c8cd826936e4935", + "bytes": 1292 + }, + { + "file": "graph/baseline-role.json", + "sha256": "e850422ec72faa06aae0d6c2893a9f1d2e36d60a5aef79bd8f863daa2d71b015", + "bytes": 1506 + }, + { + "file": "graph/knowledge-graph.json", + "sha256": "f8648b16470e764bdff5c95064078419d71e8d41d2ca30d4b1508017c166a45d", + "bytes": 281 + }, + { + "file": "graph/logseq/config.edn", + "sha256": "46f37aaf21035038c946c4b62690c65df7d3275b44c8f42c643e1946a1264988", + "bytes": 118 + }, + { + "file": "graph/pages/Concern search.md", + "sha256": "2b22a679490e2694908f7c26a69d65465bafa8223403b00ac5d1ea0bd3bde1db", + "bytes": 566 + }, + { + "file": "graph/pages/Projects/Community garden launch.md", + "sha256": "583e9876b293ab2de064fad238f14cb5bb922d1ea09905bfab7b4e8e073cda68", + "bytes": 255 + }, + { + "file": "graph/pages/Risk.md", + "sha256": "db12f7eb57b342878ca8ce74397c976dc4d302de3cae8534408f5ffd54735957", + "bytes": 382 + }, + { + "file": "graph/pages/Start here.md", + "sha256": "ffebe59decfb85bbc94b4e830c82ba377f4c6dca78ebf3ae97c0a21c141b0d3e", + "bytes": 775 + }, + { + "file": "screenshots/logseq-graph-view.jpg", + "sha256": "e892c849aee6ab410f18a1d1c70818d873a80eaae9cb63c8b20ad99026407a3e", + "bytes": 250938 + }, + { + "file": "screenshots/logseq-synonyms-and-results.jpg", + "sha256": "70b28c50a1fddf3a073fb5cdceb58de5b62dc120015a981da9056fe477a62558", + "bytes": 390171 + } + ] +} diff --git a/static/demos/logseq-synonym-search/screenshots/logseq-graph-view.jpg b/static/demos/logseq-synonym-search/screenshots/logseq-graph-view.jpg new file mode 100644 index 0000000..a288bbc Binary files /dev/null and b/static/demos/logseq-synonym-search/screenshots/logseq-graph-view.jpg differ diff --git a/static/demos/logseq-synonym-search/screenshots/logseq-synonyms-and-results.jpg b/static/demos/logseq-synonym-search/screenshots/logseq-synonyms-and-results.jpg new file mode 100644 index 0000000..5058e1b Binary files /dev/null and b/static/demos/logseq-synonym-search/screenshots/logseq-synonyms-and-results.jpg differ diff --git a/static/demos/obsidian-synonym-search/README.md b/static/demos/obsidian-synonym-search/README.md new file mode 100644 index 0000000..64a0c46 --- /dev/null +++ b/static/demos/obsidian-synonym-search/README.md @@ -0,0 +1,24 @@ +# Obsidian synonym-search example + +Captured from the installed Obsidian 1.14.4 on 12 October 2026 in an isolated demo vault. No personal notes or community plugins were used. + +Open `vault` as a folder in Obsidian. `Notes/Risk.md` owns the raw `synonyms:: Risk, Concern` property and embeds the source brief, `Notes/Projects/Community garden launch.md`. `Search results/Concern search.md` contains saved output from the released terraphim-grep 1.21.19 binary; it does not define synonyms and is not an Obsidian search extension. + +The graph and brief are byte-identical to the [published editor demo exports](https://terraphim.ai/how-tos/synonym-search/). The **project brief** has no literal “concern”; the separate **Risk concept note** deliberately contains it as a synonym property. The property agrees with the exported graph. This example supplies that graph explicitly; it does not claim that saving an Obsidian note automatically rebuilds it. + +Search targets the project brief only. It excludes the concept definition, generated JSON and saved result note, so none can supply a literal query hit. `evidence/` contains the actual outputs, binary/input hashes and assertions. + +From the vault directory, with terraphim-grep 1.21.19 on your PATH: + +```sh +terraphim-grep concern --thesaurus "Knowledge graph/baseline-role.json" --paths "Notes/Projects" -C 2 --json --search-only +terraphim-grep concern --thesaurus "Knowledge graph/knowledge-graph.json" --paths "Notes/Projects" -C 2 --json --search-only +``` + +Outside a Git checkout, this released CLI may print “No git repository found”. The two commands still complete successfully: the baseline returns zero passages and the synonym graph returns three. + +The corrected native screenshot is `screenshots/03-synonyms-in-knowledge-note.jpg`: `Risk.md` owns the actual property and embeds the brief, beside the results-only note. The captured accessibility tree is retained in `evidence/native-note-and-results.txt`. Earlier screenshots are preserved under `publication/synonym-search/archive/before-obsidian-note-synonyms-20261012/` and excluded from the corrected bundle. + +Terraphim’s custom `synonyms::` convention uses Logseq-compatible Markdown property syntax. Obsidian’s native note aliases use YAML `aliases`; automatic alias import or vault synchronisation is not part of this example. + +The original narrated video already compares retrieval and optional synthesis. This additional Obsidian capture reruns local retrieval only; it does not claim a new synthesis run. Jason Fried’s [Write_On video](https://x.com/jasonfried/status/2105403067793584590) inspired the editor work. diff --git a/static/demos/obsidian-synonym-search/evidence/before-sharing.json b/static/demos/obsidian-synonym-search/evidence/before-sharing.json new file mode 100644 index 0000000..cc0f84f --- /dev/null +++ b/static/demos/obsidian-synonym-search/evidence/before-sharing.json @@ -0,0 +1,13 @@ +{ + "chunks": [], + "answer": null, + "concepts": [], + "sufficiency": "RlmInsufficient", + "sufficiency_explanation": "No chunks or knowledge-graph concepts matched the query; there is nothing to synthesise an answer from.", + "stats": { + "search_latency_ms": 36, + "rlm_latency_ms": null, + "chunks_returned": 0, + "kg_hits": 0 + } +} diff --git a/static/demos/obsidian-synonym-search/evidence/native-note-and-results.txt b/static/demos/obsidian-synonym-search/evidence/native-note-and-results.txt new file mode 100644 index 0000000..12ca9ee --- /dev/null +++ b/static/demos/obsidian-synonym-search/evidence/native-note-and-results.txt @@ -0,0 +1,149 @@ +Window: "Concern search - vault - Obsidian 1.14.4", App: Obsidian. +0 standard window Concern search - vault - Obsidian 1.14.4, Secondary Actions: Raise + 1 container Concern search - vault - Obsidian 1.14.4 + 2 container + 3 HTML content Concern search - vault - Obsidian 1.14.4, URL: app://obsidian.md/index.html + 4 container + 5 image + 6 container Open quick switcher + 7 image + 8 container Open graph view + 9 image + 10 container Create new canvas + 11 image + 12 container Open today's daily note + 13 image + 14 container Insert template + 15 image + 16 container Open command palette + 17 image + 18 container Create new base + 19 image + 20 container + 21 container Risk + 22 text Risk + 23 container Close + 24 image + 25 container New tab + 26 image + 27 image + 28 container + 29 button (disabled) Navigate back + 30 image + 31 button (disabled) Navigate forward + 32 image + 33 container + 34 container Notes + 35 text Notes + 36 text / + 37 text entry area (settable) Risk + 38 text Risk + 39 button Current view: reading Click to edit ⌘+Click to open to the right + 40 image + 41 button More options + 42 image + 43 container + 44 text entry area (settable) Risk + 45 text Risk + 46 text synonyms:: Risk, Concern + 47 heading ​ Risk, Value: 1 + 48 image + 49 text Risk + 50 text A possible problem that needs a decision. In this project, + 51 text concern + 52 text is another name for the same concept. The synonym property lives in this knowledge note. The explicit Terraphim graph maps both terms to this concept. + 53 heading ​ Project note, Value: 2 + 54 image + 55 text Project note + 56 text Community garden launch + 57 container + 58 heading ​ Community garden launch, Value: 1 + 59 image + 60 text Community garden launch + 61 text Goal: Open the garden for spring planting. Risk: Timber may arrive late. Decision: Keep a backup supplier. Risk: Rain may delay planting. Decision: Reserve a covered area. Risk: Volunteers may cancel. Decision: Keep a reserve list. + 62 container Open link + 63 image + 64 container + 65 container Concern search + 66 text Concern search + 67 container Close + 68 image + 69 container New tab + 70 image + 71 image + 72 image + 73 container + 74 button Navigate back + 75 image + 76 button Navigate forward + 77 image + 78 container + 79 container Search results + 80 text Search results + 81 text / + 82 text entry area (settable) Concern search + 83 text Concern search + 84 button Current view: reading Click to edit ⌘+Click to open to the right + 85 image + 86 button More options + 87 image + 88 container Concern search Query: concern · released terraphim-grep 1.21.19 Saved CLI output for Community garden launch.md, displayed in Obsidian. The note says risk, never concern. The graph maps both words to the same concept. This uses an explicit Terraphim graph; it does not automatically import Obsidian aliases or sync your vault. https://terraphim.ai/how-tos/synonym-search/ + 89 container + 90 text entry area (settable) Concern search + 91 text Concern search + 92 text Query: + 93 text concern + 94 text · released + 95 text terraphim-grep 1.21.19 + 96 text Saved CLI output for + 97 text Community garden launch.md + 98 text , displayed in Obsidian. + 99 table + 100 row + 101 column header + 102 text Same Markdown note + 103 column header + 104 text Retrieved passages + 105 row + 106 cell + 107 text Before sharing the graph + 108 cell + 109 text 0 + 110 row + 111 cell + 112 text With the exported synonyms + 113 cell + 114 text 3 + 115 text The note says + 116 text risk + 117 text , never + 118 text concern + 119 text . The graph maps both words to the same concept. + 120 container + 121 text Risk: Timber may arrive late. Decision: Keep a backup supplier. (line 7) + 122 container + 123 text Risk: Rain may delay planting. Decision: Reserve a covered area. (line 10) + 124 container + 125 text Risk: Volunteers may cancel. Decision: Keep a reserve list. (line 13) + 126 text This uses an explicit Terraphim graph; it does not automatically import Obsidian aliases or sync your vault. + 127 link Description: https://terraphim.ai/how-tos/synonym-search/, Value: terraphim.ai/how-tos/synonym-search/ + 128 text 0 backlinks + 129 container Reading + 130 image + 131 text 108 words 764 characters + 132 container Uninitialized + 133 image + 134 close button + 135 full screen button Help: this button also has an action to zoom the window, Secondary Actions: zoom the window + 136 minimise button +137 menu bar + 138 Obsidian + 139 File + 140 Edit + 141 Insert + 142 Format + 143 View + 144 Window + 145 Help + +The focused UI element is 88 container Concern search Query: concern · released terraphim-grep 1.21.19 Saved CLI output for Community garden launch.md, displayed in Obsidian. The note says risk, never concern. The graph maps both words to the same concept. This uses an explicit Terraphim graph; it does not automatically import Obsidian aliases or sync your vault. https://terraphim.ai/how-tos/synonym-search/ \ No newline at end of file diff --git a/static/demos/obsidian-synonym-search/evidence/verification.json b/static/demos/obsidian-synonym-search/evidence/verification.json new file mode 100644 index 0000000..f3a29ab --- /dev/null +++ b/static/demos/obsidian-synonym-search/evidence/verification.json @@ -0,0 +1,65 @@ +{ + "verifiedAt": "2026-10-12T12:50:35.613983+00:00", + "binary": "/private/tmp/synonym-release-inspection/stage-download/verified-macos-aarch64-grep/terraphim-grep", + "version": "terraphim-grep 1.21.19", + "binarySha256": "ce20e2bf87c6753c717dade4ac7baac98b05d0be9cb39af1f3afbcbf6e5c47de", + "graphSha256": "f8648b16470e764bdff5c95064078419d71e8d41d2ca30d4b1508017c166a45d", + "sourceSha256": "ea78a26e4d5a1105891bed67288a924cbbd5656defc95de4c511f4302b8d0d8f", + "conceptNoteSha256": "c959395e70985179c55089684991ca3615253da82e41b673a67e696634593d6b", + "checks": { + "rawSynonymsPropertyInKnowledgeNote": true, + "noSynonymDirectiveInResults": true, + "knowledgeNoteMatchesGraph": true, + "projectBriefHasNoLiteralConcern": true, + "zeroBaselineChunks": true, + "threeSynonymChunks": true, + "onlyProjectBriefSearched": true, + "exactSourceExcerpts": true, + "noSynthesis": true, + "nativeNotePropertyVisible": true, + "nativeResultsOnlySavedCliOutput": true + }, + "runs": [ + { + "command": [ + "/private/tmp/synonym-release-inspection/stage-download/verified-macos-aarch64-grep/terraphim-grep", + "concern", + "--thesaurus", + "Knowledge graph/baseline-role.json", + "--paths", + "Notes/Projects", + "-C", + "2", + "--json", + "--search-only" + ], + "cwd": "/Users/alex/projects/terraphim/terraphim-editor/publication/synonym-search/obsidian-demo/vault", + "exitCode": 0, + "output": "evidence/before-sharing.json", + "stderr": "" + }, + { + "command": [ + "/private/tmp/synonym-release-inspection/stage-download/verified-macos-aarch64-grep/terraphim-grep", + "concern", + "--thesaurus", + "Knowledge graph/knowledge-graph.json", + "--paths", + "Notes/Projects", + "-C", + "2", + "--json", + "--search-only" + ], + "cwd": "/Users/alex/projects/terraphim/terraphim-editor/publication/synonym-search/obsidian-demo/vault", + "exitCode": 0, + "output": "evidence/with-synonym.json", + "stderr": "" + } + ], + "scope": "Raw synonyms property belongs to Risk concept note, not saved results. Existing exported graph is explicit and checked for agreement. Released CLI searches only Notes/Projects; no auto-import or graph rebuild claimed.", + "nativeCapture": "verified", + "nativeCaptureAt": "2026-10-12T12:58:28.171838+00:00", + "nativeScreenshot": "screenshots/03-synonyms-in-knowledge-note.jpg", + "nativeAccessibility": "evidence/native-note-and-results.txt" +} diff --git a/static/demos/obsidian-synonym-search/evidence/with-synonym.json b/static/demos/obsidian-synonym-search/evidence/with-synonym.json new file mode 100644 index 0000000..fe1d09e --- /dev/null +++ b/static/demos/obsidian-synonym-search/evidence/with-synonym.json @@ -0,0 +1,51 @@ +{ + "chunks": [ + { + "content": "Risk: Timber may arrive late. Decision: Keep a backup supplier.", + "source": "Community garden launch.md", + "line_start": 7, + "line_end": 7, + "relevance_score": 2.0, + "haystack": "code" + }, + { + "content": "Risk: Rain may delay planting. Decision: Reserve a covered area.", + "source": "Community garden launch.md", + "line_start": 10, + "line_end": 10, + "relevance_score": 2.0, + "haystack": "code" + }, + { + "content": "Risk: Volunteers may cancel. Decision: Keep a reserve list.", + "source": "Community garden launch.md", + "line_start": 13, + "line_end": 13, + "relevance_score": 2.0, + "haystack": "code" + } + ], + "answer": null, + "concepts": [ + { + "id": 0, + "name": "concern", + "display_value": null, + "score": 1.0 + }, + { + "id": 0, + "name": "risk", + "display_value": null, + "score": 1.0 + } + ], + "sufficiency": "SearchOnly", + "sufficiency_explanation": "Found 3 chunks but diversity 1 < 2; returning search results only (pass --answer or --force-rlm to synthesise).", + "stats": { + "search_latency_ms": 18, + "rlm_latency_ms": null, + "chunks_returned": 3, + "kg_hits": 2 + } +} diff --git a/static/demos/obsidian-synonym-search/manifest.json b/static/demos/obsidian-synonym-search/manifest.json new file mode 100644 index 0000000..c293a56 --- /dev/null +++ b/static/demos/obsidian-synonym-search/manifest.json @@ -0,0 +1,64 @@ +{ + "updatedAt": "2026-10-12T13:18:57.405165+00:00", + "nativeApp": "Obsidian 1.14.4", + "state": "corrected-native-capture-and-cli-verified", + "correction": "Raw synonyms:: property is owned by Notes/Risk.md; results contain saved CLI passages. Explicit exported graph; corpus Notes/Projects.", + "historicalScreenshots": "../archive/before-obsidian-note-synonyms-20261012/obsidian-demo/screenshots/", + "files": [ + { + "file": "README.md", + "sha256": "5bb7d86dbd2567117da648c0eb2338b932e263dcaceffd862c86bfa8feb57cfe", + "bytes": 2648 + }, + { + "file": "evidence/before-sharing.json", + "sha256": "bb7bf7613ad04e1183db1b04a2f7d9921433b6844a3f3fddedb2256f27cd7245", + "bytes": 345 + }, + { + "file": "evidence/native-note-and-results.txt", + "sha256": "1dd0cbbc32870f421fbefa1da71aa05e25602cb49d79752f67b3e4f096a750be", + "bytes": 5779 + }, + { + "file": "evidence/verification.json", + "sha256": "0bf83214bbbd051387f5dccb5cb2e9f3bc64a85ceadc056de3b40346eb9d613e", + "bytes": 2564 + }, + { + "file": "evidence/with-synonym.json", + "sha256": "cabedfb9bfc9e61092ec84d48d3bfc1c80f416856e212432c075a53a3d28cc48", + "bytes": 1278 + }, + { + "file": "vault/Knowledge graph/baseline-role.json", + "sha256": "e850422ec72faa06aae0d6c2893a9f1d2e36d60a5aef79bd8f863daa2d71b015", + "bytes": 1506 + }, + { + "file": "vault/Knowledge graph/knowledge-graph.json", + "sha256": "f8648b16470e764bdff5c95064078419d71e8d41d2ca30d4b1508017c166a45d", + "bytes": 281 + }, + { + "file": "vault/Notes/Projects/Community garden launch.md", + "sha256": "ea78a26e4d5a1105891bed67288a924cbbd5656defc95de4c511f4302b8d0d8f", + "bytes": 265 + }, + { + "file": "vault/Notes/Risk.md", + "sha256": "c959395e70985179c55089684991ca3615253da82e41b673a67e696634593d6b", + "bytes": 304 + }, + { + "file": "vault/Search results/Concern search.md", + "sha256": "310afc268659ec5eadcc936f05ab2be92f1d900318bb2aa374528478d9216d31", + "bytes": 765 + }, + { + "file": "screenshots/03-synonyms-in-knowledge-note.jpg", + "sha256": "22b13738b1cc81e40c75cfb97542ddcb264278113ebb0e4ccfbd06d8b6cf9276", + "bytes": 397349 + } + ] +} diff --git a/static/demos/obsidian-synonym-search/obsidian-synonym-search-example.zip b/static/demos/obsidian-synonym-search/obsidian-synonym-search-example.zip new file mode 100644 index 0000000..e83b81a Binary files /dev/null and b/static/demos/obsidian-synonym-search/obsidian-synonym-search-example.zip differ diff --git a/static/demos/obsidian-synonym-search/screenshots/03-synonyms-in-knowledge-note.jpg b/static/demos/obsidian-synonym-search/screenshots/03-synonyms-in-knowledge-note.jpg new file mode 100644 index 0000000..e0950a1 Binary files /dev/null and b/static/demos/obsidian-synonym-search/screenshots/03-synonyms-in-knowledge-note.jpg differ diff --git a/static/demos/obsidian-synonym-search/vault/Knowledge graph/baseline-role.json b/static/demos/obsidian-synonym-search/vault/Knowledge graph/baseline-role.json new file mode 100644 index 0000000..a8c1b2c --- /dev/null +++ b/static/demos/obsidian-synonym-search/vault/Knowledge graph/baseline-role.json @@ -0,0 +1,91 @@ +{ + "name": "terraphim-editor-default", + "data": { + "alternative": { + "id": 100, + "nterm": "alternatives" + }, + "alternatives": { + "id": 100, + "nterm": "alternatives" + }, + "caf\u00e9": { + "id": 4, + "nterm": "caf\u00e9" + }, + "choice": { + "id": 1, + "nterm": "decision" + }, + "coffee shop": { + "id": 4, + "nterm": "caf\u00e9" + }, + "coffeehouse": { + "id": 4, + "nterm": "caf\u00e9" + }, + "decision": { + "id": 1, + "nterm": "decision" + }, + "employ": { + "id": 8, + "nterm": "use" + }, + "eraser": { + "id": 2, + "nterm": "eraser" + }, + "honour": { + "id": 5, + "nterm": "honour" + }, + "judgment": { + "id": 1, + "nterm": "decision" + }, + "large language model": { + "id": 3, + "nterm": "llm", + "display_value": "LLM" + }, + "llm": { + "id": 3, + "nterm": "llm", + "display_value": "LLM" + }, + "option": { + "id": 1, + "nterm": "decision" + }, + "options set": { + "id": 100, + "nterm": "alternatives" + }, + "paperclip": { + "id": 7, + "nterm": "paperclip" + }, + "privilege": { + "id": 5, + "nterm": "honour" + }, + "rubber": { + "id": 2, + "nterm": "eraser" + }, + "use": { + "id": 8, + "nterm": "use" + }, + "utilise": { + "id": 8, + "nterm": "use" + }, + "variants": { + "id": 100, + "nterm": "alternatives" + } + } +} diff --git a/static/demos/obsidian-synonym-search/vault/Knowledge graph/knowledge-graph.json b/static/demos/obsidian-synonym-search/vault/Knowledge graph/knowledge-graph.json new file mode 100644 index 0000000..f7b3213 --- /dev/null +++ b/static/demos/obsidian-synonym-search/vault/Knowledge graph/knowledge-graph.json @@ -0,0 +1,17 @@ +{ + "data": { + "concern": { + "display_value": "Risk", + "id": 1, + "nterm": "risk", + "pinned": false + }, + "risk": { + "display_value": "Risk", + "id": 1, + "nterm": "risk", + "pinned": false + } + }, + "name": "Document alternatives" +} diff --git a/static/demos/obsidian-synonym-search/vault/Notes/Projects/Community garden launch.md b/static/demos/obsidian-synonym-search/vault/Notes/Projects/Community garden launch.md new file mode 100644 index 0000000..07c11d2 --- /dev/null +++ b/static/demos/obsidian-synonym-search/vault/Notes/Projects/Community garden launch.md @@ -0,0 +1,13 @@ +# Community garden launch + + +Goal: Open the garden for spring planting. + + +Risk: Timber may arrive late. Decision: Keep a backup supplier. + + +Risk: Rain may delay planting. Decision: Reserve a covered area. + + +Risk: Volunteers may cancel. Decision: Keep a reserve list. \ No newline at end of file diff --git a/static/demos/obsidian-synonym-search/vault/Notes/Risk.md b/static/demos/obsidian-synonym-search/vault/Notes/Risk.md new file mode 100644 index 0000000..8c1eb2f --- /dev/null +++ b/static/demos/obsidian-synonym-search/vault/Notes/Risk.md @@ -0,0 +1,11 @@ +synonyms:: Risk, Concern + +# Risk + +A possible problem that needs a decision. In this project, **concern** is another name for the same concept. + +The synonym property lives in this knowledge note. The explicit Terraphim graph maps both terms to this concept. + +## Project note + +![[Community garden launch]] diff --git a/static/demos/obsidian-synonym-search/vault/Search results/Concern search.md b/static/demos/obsidian-synonym-search/vault/Search results/Concern search.md new file mode 100644 index 0000000..9644642 --- /dev/null +++ b/static/demos/obsidian-synonym-search/vault/Search results/Concern search.md @@ -0,0 +1,20 @@ +Query: **concern** · released **terraphim-grep 1.21.19** + +Saved CLI output for **Community garden launch.md**, displayed in Obsidian. + +| Same Markdown note | Retrieved passages | +|---|---| +| Before sharing the graph | **0** | +| With the exported synonyms | **3** | + +The note says **risk**, never **concern**. The graph maps both words to the same concept. + +> Risk: Timber may arrive late. Decision: Keep a backup supplier. *(line 7)* + +> Risk: Rain may delay planting. Decision: Reserve a covered area. *(line 10)* + +> Risk: Volunteers may cancel. Decision: Keep a reserve list. *(line 13)* + +This uses an explicit Terraphim graph; it does not automatically import Obsidian aliases or sync your vault. + +[Editor and demo](https://terraphim.ai/how-tos/synonym-search/)