content: [term.C]
  alias = "context"
  
  # For graphing we need to build the pipeline through the traverse call but we
  # have the "graph-symbols" group automatically add the graphing steps.
  [term.calls-to]
  [[term.calls-to.group.graph-symbols-default]]
  command = "search-identifiers"
  args.positional = "$0"
  args.exact-match = true
  [[term.calls-to.group.graph-symbols-default]]
  command = "crossref-lookup"
  args.exact-match = true
  [[term.calls-to.group.graph-traverse]]
  command = "traverse"
  args.edge = "uses"
  
  [term.calls-to-sym]
  [[term.calls-to-sym.group.graph-symbols-default]]
  command = "crossref-lookup"
  args.positional = "$0"
  [[term.calls-to-sym.group.graph-traverse]]
  command = "traverse"
  args.edge = "uses"
  
  
  [term.calls-between]
  [[term.calls-between.group.graph-symbols-default]]
  command = "search-identifiers"
  args.positional = "$0"
  args.exact-match = true
  [[term.calls-between.group.graph-symbols-default]]
  command = "crossref-lookup"
  args.exact-match = true
  args.methods = true
  [[term.calls-between.group.graph-traverse]]
  command = "traverse"
  args.edge = "uses"
  args.paths-between = true
  
  
  [term.calls-between-source]
  [[term.calls-between-source.group.graph-symbols-source]]
  command = "search-identifiers"
  args.positional = "$0"
  args.exact-match = true
  [[term.calls-between-source.group.graph-symbols-source]]
  command = "crossref-lookup"
  args.exact-match = true
  args.methods = true
  [[term.calls-between-source.group.graph-traverse]]
  command = "traverse"
  args.edge = "uses"
  args.paths-between = true
  
  [term.calls-between-target]
  [[term.calls-between-target.group.graph-symbols-target]]
  command = "search-identifiers"
  args.positional = "$0"
  args.exact-match = true
  [[term.calls-between-target.group.graph-symbols-target]]
  command = "crossref-lookup"
  args.exact-match = true
  args.methods = true
  [[term.calls-between-target.group.graph-traverse]]
  command = "traverse"
  args.edge = "uses"
  args.paths-between = true
  
  [term.calls-from]
  [[term.calls-from.group.graph-symbols-default]]
  command = "search-identifiers"
  args.positional = "$0"
  args.exact-match = true
  [[term.calls-from.group.graph-symbols-default]]
  command = "crossref-lookup"
  args.exact-match = true
  [[term.calls-from.group.graph-traverse]]
  command = "traverse"
  args.edge = "callees"
  
  
  # "inheritance-diagram" is a quick hack to show the full transitive overrides/
  # overriddenBy relationship.
  [term.inheritance-diagram]
  [[term.inheritance-diagram.group.graph-symbols-default]]
  command = "search-identifiers"
  args.positional = "$0"
  args.exact-match = true
  [[term.inheritance-diagram.group.graph-symbols-default]]
  command = "crossref-lookup"
  args.exact-match = true
  [[term.inheritance-diagram.group.graph-traverse]]
  command = "traverse"
  args.edge = "inheritance"
  
  # "class-diagram" currently tries to show the relationship between a given
  # class and other classes exclusively via fields, but it would be good to also:
  # - Traverse IPC communication relationships
  # - Be more intentional/explicit about inheritance; we may do something.
  [term.class-diagram]
  [[term.class-diagram.group.graph-symbols-default]]
  command = "search-identifiers"
  args.positional = "$0"
  args.exact-match = true
  args.types-only = true
  [[term.class-diagram.group.graph-symbols-default]]
  command = "crossref-lookup"
  args.exact-match = true
  [[term.class-diagram.group.graph-traverse]]
  command = "traverse"
  args.edge = "class"
  
  [term.fmus-through-depth]
  [[term.fmus-through-depth.group.graph-traverse]]
  command = "traverse"
  args.traverse-field-member-uses = "$0"
  
  [term.hier]
  [[term.hier.group.graph-render]]
  command = "graph"
  args.hier = "$0"
  
  [term.colorize-callees]
  [[term.colorize-callees.group.graph-render]]
  command = "graph"
  args.colorize-callees = "$0"
  
  [term.graph-debug]
  [[term.graph-debug.group.graph-render]]
  command = "graph"
  args.debug = true
  
  [term.graph-format]
  [[term.graph-format.group.graph-render]]
  command = "graph"
  priority = 1
  args.format = "$0"
  
  [term.graph-layout]
  [[term.graph-layout.group.graph-render]]
  command = "graph"
  priority = 1
  args.layout = "$0"
  
  # This previously was doing a broken thing to try and avoid creating a weird
  # situation if this was specified before "calls-to", but it didn't actually do
  # what it thought it was doing because the earlier stages were not actually
  # associated with "term.depth" but instead "term.calls-to".  Noting this here
  # in case that somehow was doing something important and this breaks things...
  [term.depth]
  [[term.depth.group.graph-traverse]]
  command = "traverse"
  args.max-depth = "$0"
  
  # We enforce a range in our clap definition, so this is fine to expose.
  [term.node-limit]
  [[term.node-limit.group.graph-traverse]]
  command = "traverse"
  args.node-limit = "$0"
  
  # We enforce a range in our clap definition, so this is fine to expose.
  [term.paths-between-node-limit]
  [[term.paths-between-node-limit.group.graph-traverse]]
  command = "traverse"
  args.paths-between-node-limit = "$0"
  
  # This is an opt-out for the heuristic that ignores uses with a ton of paths.
  # We do not enforce a range limit on this because the node-limit ends up
  # dominating.
  [term.path-limit]
  [[term.path-limit.group.graph-traverse]]
  command = "traverse"
  args.skip-uses-at-path-count = "$0"
  
  [term.context]
  [[term.context.group.display]]
  command = "augment-results"
  args.before = "$0"
  args.after = "$0"
  
  [term.field-layout]
  [[term.field-layout.group.semantic-lookup]]
  command = "search-identifiers"
  args.positional = "$0"
  args.exact-match = true
  [[term.field-layout.group.semantic-lookup]]
  command = "crossref-lookup"
  args.exact-match = true
  [[term.field-layout.group.semantic-format]]
  command = "format-symbols"
  args.mode = "field-layout"
  
  # The default term is what gets applied to things without a term.  It can also
  # be explicitly referenced by other terms.
  [term.default]
  [[term.default.expand]]
  term = "file"
  [[term.default.expand]]
  term = "idprefix"
  [[term.default.expand]]
  term = "text"
  
  [term.file]
  [[term.file.group.file-search]]
  command = "search-files"
  args.positional = "$0"
  
  [term.id]
  # We can't do this and `idprefix` in the same command and it's not clear it's
  # worth the effort to support both simultaneously.
  conflicts = ["idprefix"]
  [[term.id.group.semantic-search]]
  command = "search-identifiers"
  args.positional = "$0"
  args.exact-match = true
  [[term.id.group.semantic-search]]
  command = "crossref-lookup"
  args.exact-match = true
  [[term.id.group.semantic-search]]
  command = "crossref-expand"
  
  [term.idprefix]
  [[term.idprefix.group.semantic-search]]
  command = "search-identifiers"
  args.positional = "$0"
  args.exact-match = false
  [[term.idprefix.group.semantic-search]]
  command = "crossref-lookup"
  [[term.idprefix.group.semantic-search]]
  command = "crossref-expand"
  
  [term.pathre]
  [[term.pathre.group.file-search]]
  command = "search-files"
  args.pathre = "$0"
  ## TODO: Implement filtering crossref output by path
  ## does this really want to be its own stage, or just part of crossref-lookup?
  ## I guess this may need to come after crossref-expand, so then it would want
  ## to be its own command.
  #[[term.pathre.group.semantic-search]]
  #command = "filter-crossref"
  #args.pathre = "$0"
  [[term.pathre.group.text-search]]
  command = "search-text"
  args.pathre = "$0"
  
  [term.p]
  alias = "path"
  
  [term.path]
  [[term.path.expand]]
  term = "pathre"
  transforms = ["path_glob"]
  
  [term.re]
  [[term.re.group.text-search]]
  command = "search-text"
  args.re = "$0"
  
  [term.show-cols]
  [[term.show-cols.group.semantic-format]]
  command = "format-symbols"
  args.show-cols = "$0"
  
  [term.hide-cols]
  [[term.hide-cols.group.semantic-format]]
  command = "format-symbols"
  args.hide-cols = "$0"
  
  [term.sym]
  alias = "symbol"
  
  [term.symbol]
  [[term.symbol.group.semantic-search]]
  command = "search-identifiers"
  # TODO: implement this
  args.add-sym = "$0"
  [[term.symbol.group.semantic-search]]
  command = "crossref-lookup"
  [[term.symbol.group.semantic-search]]
  command = "crossref-expand"
  
  [term.text]
  [[term.text.expand]]
  term = "re"
  transforms = ["regexp_escape"]
  
  [group.file-search]
  output = "file-search"
  junction = "compile"
  
  [group.semantic-search]
  output = "semantic-search"
  junction = "compile"
  
  [group.text-search]
  output = "text-search"
  junction = "compile"
  
  [junction.compile]
  command = "compile-results"
  output = "compiled"
  next = "display"
  
  [group.display]
  output = "result"
  [[group.display.commands]]
  command = "augment-results"
  
  [group.graph-symbols-source]
  output = "source"
  junction = "graph-fuse-symbols"
  
  [group.graph-symbols-target]
  output = "target"
  junction = "graph-fuse-symbols"
  
  [group.graph-symbols-default]
  output = "default"
  junction = "graph-fuse-symbols"
  
  [junction.graph-fuse-symbols]
  command = "fuse-crossrefs"
  output = "fused-symbols"
  next = "graph-traverse"
  
  [group.graph-traverse]
  output = "graph"
  next = "graph-render"
  
  [group.graph-render]
  output = "result"
  [[group.graph-render.commands]]
  command = "graph"
  args.format = "mozsearch"
  
  [group.semantic-lookup]
  output = "semantic-lookup"
  next = "semantic-filter"
  
  [group.semantic-filter]
  output = "semantic-filter"
  next = "semantic-format"
  
  [group.semantic-format]
  output = "result"
  