{
  "definitions": [
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/aggregators/concern.aggregator.ts",
          "name": "concernControls",
          "source": {
            "href": "https://banes-lab.com/anatomy/quality#file-quality-core-aggregators-concern-aggregator-ts",
            "json": "https://banes-lab.com/json/source/quality/core/aggregators/concern.aggregator.ts",
            "label": "core/aggregators/concern.aggregator.ts",
            "markdown": "https://banes-lab.com/source/quality/core/aggregators/concern.aggregator.ts.md",
            "ref": "anatomy:file-quality-core-aggregators-concern-aggregator-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 89,
      "name": "tallyConcerns",
      "signature": "const tallyConcerns = function tallyConcerns("
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/aggregators/concern.aggregator.ts",
          "name": "concernControls",
          "source": {
            "href": "https://banes-lab.com/anatomy/quality#file-quality-core-aggregators-concern-aggregator-ts",
            "json": "https://banes-lab.com/json/source/quality/core/aggregators/concern.aggregator.ts",
            "label": "core/aggregators/concern.aggregator.ts",
            "markdown": "https://banes-lab.com/source/quality/core/aggregators/concern.aggregator.ts.md",
            "ref": "anatomy:file-quality-core-aggregators-concern-aggregator-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 122,
      "name": "controlOf",
      "signature": "const controlOf = function controlOf(tally: ConcernTally): ConcernControl {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/aggregators/concern.aggregator.ts",
          "name": "controlOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/quality#file-quality-core-aggregators-concern-aggregator-ts",
            "json": "https://banes-lab.com/json/source/quality/core/aggregators/concern.aggregator.ts",
            "label": "core/aggregators/concern.aggregator.ts",
            "markdown": "https://banes-lab.com/source/quality/core/aggregators/concern.aggregator.ts.md",
            "ref": "anatomy:file-quality-core-aggregators-concern-aggregator-ts"
          }
        },
        {
          "file": "core/aggregators/concern.aggregator.ts",
          "name": "tallyConcerns",
          "source": {
            "href": "https://banes-lab.com/anatomy/quality#file-quality-core-aggregators-concern-aggregator-ts",
            "json": "https://banes-lab.com/json/source/quality/core/aggregators/concern.aggregator.ts",
            "label": "core/aggregators/concern.aggregator.ts",
            "markdown": "https://banes-lab.com/source/quality/core/aggregators/concern.aggregator.ts.md",
            "ref": "anatomy:file-quality-core-aggregators-concern-aggregator-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 136,
      "name": "concernControls",
      "signature": "export const concernControls = function concernControls("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "interface_declaration",
      "line": 7,
      "name": "ConcernTally",
      "signature": "interface ConcernTally {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "type_alias_declaration",
      "line": 15,
      "name": "KnobLookup",
      "signature": "type KnobLookup = (tool: string, ruleId: string) => RuleKnob[];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 17,
      "name": "PRIMARY_RANK",
      "signature": "const PRIMARY_RANK = new Map(PRIMARY_KNOBS.map((knob, rank) => [knob, rank]));"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 19,
      "name": "numericDefault",
      "signature": "const numericDefault = function numericDefault(value: unknown): number | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 23,
      "name": "text",
      "signature": "const text = typeof value === \"string\" ? value : \"\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 24,
      "name": "digits",
      "signature": "let digits = \"\";"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 34,
      "name": "bridgedKnob",
      "signature": "const bridgedKnob = function bridgedKnob(knob: ConceptKnob | undefined): string | null {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 41,
      "name": "bridgeKnobs",
      "signature": "const bridgeKnobs = function bridgeKnobs("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 49,
      "name": "toolKnob",
      "signature": "const toolKnob = knobConcept.tools[tool];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 50,
      "name": "knobName",
      "signature": "const knobName = bridgedKnob(toolKnob);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 53,
      "name": "knob",
      "signature": "const knob: RuleKnob = { default: numericDefault(toolKnob?.default), knob: knobName, threshold: true };"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 61,
      "name": "knobLookup",
      "signature": "export const knobLookup = function knobLookup("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 66,
      "name": "bridge",
      "signature": "const bridge = bridgeKnobs(rules, knobConcepts);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 68,
      "name": "key",
      "signature": "const key = `${tool}:${ruleId}`;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 69,
      "name": "own",
      "signature": "const own = ruleKnobs[key] ?? [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 70,
      "name": "seen",
      "signature": "const seen = new Set(own.map((knob) => knob.knob));"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 75,
      "name": "primaryThreshold",
      "signature": "const primaryThreshold = function primaryThreshold(knobs: readonly RuleKnob[]): { def: number; knob: string } | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 76,
      "name": "candidates",
      "signature": "const candidates = knobs"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 84,
      "name": "[primary]",
      "signature": "const [primary] = candidates;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 85,
      "name": "def",
      "signature": "const def = primary ? numericDefault(primary.default) : null;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 93,
      "name": "byConcern",
      "signature": "const byConcern = new Map<string, ConcernTally>();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 95,
      "name": "concern",
      "signature": "const concern = stringField(rule, \"concern\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 97,
      "name": "tool",
      "signature": "const tool = stringField(rule, \"tool\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 98,
      "name": "tally",
      "signature": "const tally = byConcern.get(concern) ?? {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 105,
      "name": "knobs",
      "signature": "const knobs = knobsFor(tool, rule.ruleId);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 111,
      "name": "threshold",
      "signature": "const threshold = primaryThreshold(knobs);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 123,
      "name": "control",
      "signature": "const control: ConcernControl = { rules: tally.rules, severity: \"error\", tools: tally.tools.size, value: true };"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 125,
      "name": "sorted",
      "signature": "const sorted = tally.thresholdDefaults.toSorted((a, b) => a - b);"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/quality#file-quality-core-aggregators-concern-aggregator-ts",
  "language": "typescript",
  "layer": "processing",
  "name": "concern.aggregator.ts",
  "path": "core/aggregators/concern.aggregator.ts",
  "ref": "anatomy:file-quality-core-aggregators-concern-aggregator-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/quality#folder-quality-core-aggregators",
          "json": "https://banes-lab.com/json/anatomy/quality/folder-quality-core-aggregators",
          "label": "core/aggregators",
          "markdown": "https://banes-lab.com/anatomy/quality/folder-quality-core-aggregators.md",
          "ref": "chapter:/anatomy/quality#folder-quality-core-aggregators"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/quality#folder-quality-core-aggregators",
          "json": "https://banes-lab.com/json/anatomy/quality/folder-quality-core-aggregators",
          "label": "core/aggregators",
          "markdown": "https://banes-lab.com/anatomy/quality/folder-quality-core-aggregators.md",
          "ref": "chapter:/anatomy/quality#folder-quality-core-aggregators"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "aggregator",
    "subject": "concern",
    "variant": null
  },
  "stats": {
    "bytes": 5729,
    "callable": 8,
    "definitions": 31,
    "edges": 2,
    "exported": 6,
    "files": 1,
    "findings": {},
    "flows": {
      "leaf": 2,
      "entry": 1,
      "isolated": 28
    },
    "lines": {
      "blank": 11,
      "code": 132,
      "total": 143
    }
  },
  "summary": "132 lines of code and 31 definitions.",
  "text": "https://banes-lab.com/source/quality/core/aggregators/concern.aggregator.ts.txt",
  "tree": "quality",
  "siblings": {
    "next": null,
    "previous": {
      "href": "https://banes-lab.com/anatomy/quality#file-quality-core-aggregators-catalog-aggregator-ts",
      "json": "https://banes-lab.com/json/source/quality/core/aggregators/catalog.aggregator.ts",
      "label": "core/aggregators/catalog.aggregator.ts",
      "markdown": "https://banes-lab.com/source/quality/core/aggregators/catalog.aggregator.ts.md",
      "ref": "anatomy:file-quality-core-aggregators-catalog-aggregator-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/quality/core/aggregators",
    "label": "core/aggregators",
    "markdown": "https://banes-lab.com/api/source/quality/core/aggregators.md",
    "ref": "api:source/quality/core/aggregators"
  }
}
