 
 (.add-facts kn "know" "agg-over" #js ["rule-id" "in-var" "agg-fun" "out-var"] #js [#js ["concat-overlap" "zz" "str" "ww"]])
 
+(.add-facts kn "know" "clauses" #js ["rule-id" "when|know|remember|forget" "clause-id" "name"] #js [#js ["limit-overlap" "when" "limit-get-foos" "foo"]
+                                                                                                    #js ["limit-overlap" "when" "limit-some-interval" "interval"]
+                                                                                                    #js ["limit-overlap" "remember" "limit-rem-frep" "frep"]])
+
+(.add-facts kn "know" "clause-fields" #js ["clause-id" "constant|variable" "key" "val"] #js [#js ["limit-get-foos" "variable" "x" "xx"]
+                                                                                             #js ["limit-get-foos" "variable" "y" "yy"]
+                                                                                             #js ["limit-some-interval" "variable" "lo" "xx"]
+                                                                                             #js ["limit-some-interval" "variable" "hi" "yy"]
+                                                                                             #js ["limit-some-interval" "variable" "in" "zz"]
+                                                                                             #js ["limit-rem-frep" "variable" "x" "xx"]
+                                                                                             #js ["limit-rem-frep" "variable" "o" "ord"]
+                                                                                             #js ["limit-rem-frep" "variable" "z" "zz"]])
+
+
+(.add-facts kn "know" "has-agg" #js ["rule-id" "limit-variable|constant" "limit" "ordinal" "ascending|descending"] #js [#js ["limit-overlap" "constant" 3 "ord" "descending"]])
+
 
 (def flows (compile kn))
 

(.get-or-create-index kn "know" "frip" #js ["x" "w"])

(.get-or-create-index kn "know" "frop" #js ["x" "o" "z" "w"])
)

    (Flows. (clj->js (map first @rule->flow)) (clj->js @rule->flow) #js {} (clj->js @kind->name->rules) (clj->js @name->transient?))))

;; TESTS

(comment
(enable-console-print!)

