anchor.diff:                         "account_name" account-name))
       uuid))
   
  -(defun add-action (scene-id &key character action dialogue timestamp)
  +(defun add-action (scene-id actor action-txt &key (timestamp (get-universal-time)))
     (ensure-doc (get-uuid)
  -              (mkdoc "type" "scene-action"
  +              (mkdoc "type" "scene-entry"
  +                     "entry_type" "action"
                        "scene_id" scene-id
  -                     "character" character
  -                     "action" action
  +                     "actor" actor
  +                     "action" action-txt
  +                     "timestamp" timestamp)))
  +
  +(defun add-dialogue (scene-id actor dialogue parenthetical &key (timestamp (get-universal-time)))
  +  (ensure-doc (get-uuid)
  +              (mkdoc "type" "scene-entry"
  +                     "entry_type" "dialogue"
  +                     "scene_id" scene-id
  +                     "actor" actor
                        "dialogue" dialogue
  +                     "parenthetical" parenthetical
                        "timestamp" timestamp)))
   
   (defun scene-id (scene)
  
positive.code: (defun find-scenes-by-account-name (account-name)
    (view-query-value "scene" "by_account_name" account-name nil))
  
  (defun find-scene-with-actions (scene-id)
    (when-let ((results (doc-val (query-view *db* "scene" "full_by_id"
                                             :startkey (list scene-id)
                                             :endkey (list scene-id 2))
                                 "rows")))
      (mapcar (rcurry #'doc-val "value") results)))
  
  (defun find-scene-actions (scene-id)
    (view-query-value "scene" "actions_by_scene_id" scene-id nil))
  
negative.code:                                            (couchfun (doc &aux (type (hashget doc "type")))
                                               (cond ((string= type "scene")
                                                      (emit (list (hashget doc "_id") 0) doc))
                                                     ((string= type "scene-untry")
                                                      (emit (list (hashget doc "scene_id")
                                                                  1
                                                                  (hashget doc "timestamp"))
                                                            doc))
                                                     (t nil))))
                                      "entries_by_scene_id"
                                      (mkdoc "map"
                                             (mapfun doc "scene-entry"
                                               (emit (hashget doc "scene_id")
                                                     doc)))
                                      "rating_by_scene_id"
  