Fork me on GitHub

A second idea @bmaddy , if it fits your project, would be to create a UI for building rules, perhaps presenting a searchable list of Fact records to users, along with their available fields, and allow them to pick the facts and fields they want to match on, plus the Boolean expression combinations.


That’s definitely not a small project, but might greatly raise the accessibility for non-developers to write facts with, while providing guardrails to help them.


@futuro Yeah, a UI would be nice, but that's way off in the future. At the moment, we're not entirely sure we'll have users writing actual rules yet. We'll see what happens. Good ideas though!


I think I've asked this before, but I cannot retrieve the history too far back of this channel... What is the best way to capture the chain of facts and rules that caused a fact to be produced in a session? I don't need a full-blown GUI, and honestly would just be able to get a data structure I can manipulate myself...


So, for instance, if I have a session with a rule that has something like "P => Q" and I insert a fact P into the session, and query for the fact Q, which should be present, I'd like to be able to take Q and inspect the session and see the presence of fact P and the rule "P => Q". But, you know, with more complex rules and such. Is this readily available?


I've looked at , but I can't get the shopping.clj example to work -- launches a web page, but with no session and nothing to look at, as far as I can tell. But again, I really don't want the gui, I just want to be able to inspect a session for the chain of facts and rules that lead to other facts being present in the system...


It should also make sense in simple cases. As in the prior case, if P is an inserted fact, and I want to see how I got P, I should just see "P" with no rules, as it was inserted a priori...


As far as I know the clara-tools project isn’t really maintained anymore. From what you describe though I think you can probably accomplish what you’re looking for in a non-GUI environment with session inspection, particularly the :fact->explanations key.


The fact-graph functionality might also be of use, though note that this is basically just another view over the information returned by session inspection.


Thanks! I think session-inspection is exactly what I need at this point of what I think are my simple needs.