Scenario 2: Local context for a tag (orange area) This demonstrates the power of the model. When you open the tiddler for the “recipes” tag, its local context is built differently: Own attributes (outgoing relationships): Like any tiddler, the “recipes” node has its own properties. In the diagram, this is the path “recipes” → “description” → “Recipe collection”. This is what you will see in the body of the tag tiddler itself. Tagging feedback (incoming relationships): The most important thing is to find all the tiddlers that use this tag. The system performs a reverse search on the graph: Finds the Entity Node (“recipes”). Looks for all the Property Nodes (“tags”) that point to it. From these Property Nodes, it goes “up” to the Entity Nodes they belong to. The orange area in the diagram shows this context. It includes: The “recipes” node itself and its own description. All the tiddlers that tag it (“Apple Pie Recipe” and “Charlotte Recipe”), since they are part of its “use” context. This model shows precisely how a complex, bidirectional knowledge network is born from a flat list of fields and values, and the “local context” is the dynamic result of navigating that network.
The local context is not a static property of the tiddler. It is the result of a computation that TiddlyWiki performs on the fly when you view a particular tiddler. This process can be thought of as a series of queries to our TiddlyWikiStore.
Let’s say we’ve opened the tiddler “Apple Pie Recipe”. Our current focus (currentTiddler) is the key “Apple Pie Recipe”. How does TiddlyWiki build its context?
Step 1: Extracting Direct Attributes (Self-Context)
The very first layer of context is the tiddler itself. The system simply reads the value for the key TiddlyWikiStore[“Apple Pie Recipe”]. From here we immediately get:
Its tags: recipes, baking
Its user field difficulty: medium
Its text, which contains the transclusion {{Shortcrust pastry}}
Step 2: Finding relationships through common values (Sibling Context)
Now the system uses the extracted attributes to find other tiddlers.
Tag context: TiddlyWiki queries the entire TiddlyWikiStore: “Find all tiddlers that have recipes OR baking in their tags”.
As a result of this scan of all values in the array, the tiddler “Shortcrust pastry” (by the recipes tag) and other recipes will be found. These tiddlers are “neighbors” and form the context of the common category.
Step 3: Finding backlinks (Backlink/Referrer Context)
This is one of the most powerful mechanisms. To find what references our pie, TiddlyWiki scans the entire TiddlyWikiStore array again.
Query: “For each tiddler in TiddlyWikiStore, check its text field. Does it contain the string [[Apple Pie Recipe]]?”.
If the tiddler “Weekly Shopping List” contained such a reference, it would be found and shown in the Referring tiddlers list. This creates a “use” or “mention” context for our tiddler.
Step 4: Composition Context
When TiddlyWiki renders the text “For the dough, we need {{Shortcrust pastry}}.”, it sees the transclusion syntax.
It takes the name “Shortcrust pastry”.
Searches TiddlyWikiStore[“Shortcrust pastry”].
Takes the text field from the found object.
Inserts this text in place of {{Shortcrust pastry}}.
Importantly, this happens in the “rendering context” of the “Apple Pie Recipe”. This allows variables to be passed and templates to be used that can change the rendering of the “Shortcrust pastry” depending on where it is inserted.
Conclusion: Context as a result of filters
All this “query” and “scanning” magic in TiddlyWiki is implemented through the mechanism of filters (Filters). A filter is, in essence, a query language for our associative array TiddlyWikiStore.
[tag[recipes]] is a query: “scan all the values in the array and return the keys of those whose tags field contains recipes”.
[backlinks[]] is a query: “take currentTiddler, and then scan all the values in the array and return the keys of those that link to currentTiddler”.
I consider the raised topic to be fundamental in the context of Tiddlyvika’s development. Otherwise, it will fly by unnoticed, like hundreds of others…
I did move it to its own thread, since it does not belong to the Community Survey 2025, which is handled by an external form.
DAG is a Directed Acyclic Graph. Your image does show cycles. – So the title may need to be changed. To DG Directed Graph
IMO what you describe here can be achieved with the existing TiddlyMap project - or even better with the rewritten one, once that’s finished.
You might want to look at the (non-graphical) work I did towards defining a notion of inter-tiddler distance, in order to use the wiki’s implicit structure to derive the notion of such neighborhoods.
- Creating a "What's Nearby" feature
- Nearby Neighbors Plugin: POC release
- Nearby Neighbors Plugin: Another POC release
It never proceeded beyond the alpha stage. Even what’s there needs work. But you might still find it interesting.
The fact that you offer me Tiddlymap and to see what DAG is means that you did not understand the essence of my proposal. Perhaps these are my problems. In particular, related to my lack of English and the fact that I simply have not yet found the form, how best to explain it. Well then. We will continue to look for the necessary forms.
Thank you very much for your interest in the topic. Of course, I noticed one of your specific examples online and I have it in mind. I liked the idea, but I did not delve deeper, because at that time I was at a different level of understanding. I just started to delve into the problem. And only now I understood the importance of your idea. Of course, now I will definitely look at everything more closely, and, in particular, at what you offer in the links. Thanks again! I will figure it out. Of course, now I can definitely say that it is interesting! But I will comment on what I understand from the links, naturally, when I read it. I’m off to read!
Sergey,
I think it it’s great you have put this together and introduced us to DAG’s (Dag which in Australian English means something else) and while I think if this could be developed further it would be useful, their is a deep history of implementing similar and different models on tiddlywiki.
I think you may be wrong in this assumption. I am not sure how long you have being in the community but TiddlyWiki has being used for visualising and linking data and relationships since it was first created. Many of the concepts in your model have being discussed and implemented multiple times in similar ways. This is one of tiddlywikis strengths, one can similtaniously represent the same data via multiple relationships, contexts and views. Even nativly.
The recent inclusion of the transcludes Operator alongside backtranscludes, links, backlinks, each (via field existence), listed, tagging and other built in “relationship queries”. But you can add similar to tags, alternative tags, fields, list field, just field names for example a field named after a tiddler title, with the value representing a relationship type or list of relationships.
Not withstanding the above comments I see value in developing a formalisation as you have to assist people have a deeper look at their own data.
I tried to dive into your links and here’s what I think. I don’t know how adequately I understood your idea, but it seems to me that we are really concerned with the same problem and I think that we approach it from different sides. You look at the problem from above, and I from below, I go from the analysis of the structure. To better understand my accents, I can suggest watching this chat. It is in Russian, but I think it is not a problem to translate. ChatGPT - Комментарий о DAWG
Maybe this somehow demonstrates my direction. I am a long-time user of Tiddlymap. I like the plugin. But I am a perfectionist and try to get rid of everything unnecessary! ChatGPT - Комментарий о DAWG
TiddlyWiki has being used for visualising and linking data and relationships since it was first created. Many of the concepts in your model have being discussed and implemented multiple times in similar ways. This is one of tiddlywikis strengths, one can similtaniously represent the same data via multiple relationships, contexts and views. Even nativly.
The recent inclusion of the transcludes Operator alongside backtranscludes, links, backlinks, each (via field existence), listed, tagging and other built in “relationship queries”. But you can add similar to tags, alternative tags, fields, list field, just field names for example a field named after a tiddler title, with the value representing a relationship type or list of relationships.
Not withstanding the above comments I see value in developing a formalisation as you have to assist people have a deeper look at their own data.
Here! I understand all this! And I see! I have been using Tiddlywiki for over ten years, but as a user. I consider it the number one system in the programming world! But! My main problem is that I am not a programmer. But I am a former mathematician and, by the way, I consider myself a good formalizer. Just recently I decided to delve deeper into the topic and use Tiddlywiki to the fullest. And along the way, perhaps, I will start programming, although already at an advanced age. Our ways are inscrutable! I understand that if you want to do something, do it yourself and show it! But for now I can’t do this and I see that there are things that someone else can do in a couple of days, and it will take me who knows how much time. And now I want to understand - is Tiddlywiki enough for me and what is even unnecessary in it … Should I design my own system or not.
My goal was to automate the listing of tiddlers in some way near to the current one. I wanted to do this based on the internal structure of the wiki (transclusions, tags, links, etc.) You say you have a mathematical background. The idea was to create a metric, or something that acted much like one, even if it occasionally violated the triangle inequality. With that, I should be able to easily list, say, the ten nearest tiddlers. Or, to your goal, we should be able to show a graph of the neighborhood.
The biggest question for me was the determination and the weighing of the different factors that might go into such a metric.
I suppose what I am saying is with a view template and some lists and filters you can list titles that represents all the relationships on your suggested graph and display them on each tiddler.
a number of solutions people have shared may be found in the community already.
once you have this logical representation you could look at presenting it with a diagram.
Of course, you can do everything manually, especially in tiddlywink. The point is to do it automatically.
ср, 30 июл. 2025 г. в 06:24, Anthony Muscio via Talk TW <noreply@talk.tiddlywiki.org>:
I am refering to automaticaly. Then perhaps feed the titles into Introducing TW5-Graph, Tiddlymap's spiritual successor!
Now that I’m seeing what you’re trying to achieve, I’m sure that TW5-Graph can provide a solution, though it would require some macros to do so.
If I understand what you’re describing, it sounds like you want something like the Live Graph that both TiddlyMap and TW5-Graph has, but instead of edge labels, you want to splice connections so you can have a node representing the connecting in between them. Right?
Live Graph isn’t a true DAG, and I know you say what you’re after is a DAG, but one of your examples isn’t actually a DAG either, so I’m not 100% what you’re after. But I’m sure some variant of a Live View Template could work.