           :reaction (fn [workspace old]
                       (let [old (:ws-behaviors old)
                             old (when-not (empty? old)
-                                  (reader/read-string old))
+                                  (parse-behaviors (reader/read-string old) "workspace.behaviors"))
                             neue (:ws-behaviors @workspace)
                             neue (when-not (empty? neue)
-                                   (reader/read-string neue))]
+                                   (parse-behaviors (reader/read-string neue) "workspace.behaviors"))]
                         (when old
                           (apply-diff (reverse-diff old))
                           (refresh-diffed old))

         (sort-by first)
         (vec))))

(defn parse-file [file]
  (let [behs (-> (files/open-sync file)
                 :content
                 (safe-read file))]
    (cond
     (map? behs) behs
     (vector? behs) (flat-behaviors->map behs)
     :else (console/error (str "Invalid behaviors file: " file ". Behaviors must be either a vector or a map.")))))

(defn pprint-flat-behaviors [flat]
  (-> (reduce (fn [result cur]

                              ))
        ws-diff (:ws-behaviors @workspace/current-ws)
        final (if (and ws-diff (not (empty? ws-diff)))
                (behavior-diff (parse-behaviors (safe-read ws-diff "workspace.behaviors")
                                                "workspace.behaviors")
                               final)
                final)]
    (reset! object/negated-tags (or (:- final) {}))
    (reset! object/tags (or (:+ final) {}))))
