{
  "definitions": [
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/core/factories/binding.factory.ts",
          "name": "misSectioned",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-factories-binding-factory-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/factories/binding.factory.ts",
            "label": "tools/core/factories/binding.factory.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/factories/binding.factory.ts.md",
            "ref": "anatomy:file-coordination-tools-core-factories-binding-factory-ts"
          }
        },
        {
          "file": "tools/core/factories/binding.factory.ts",
          "name": "unresolvedSlot",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-factories-binding-factory-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/factories/binding.factory.ts",
            "label": "tools/core/factories/binding.factory.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/factories/binding.factory.ts.md",
            "ref": "anatomy:file-coordination-tools-core-factories-binding-factory-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "tools/rules/binding.rule.ts",
          "name": "consumerFindings",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-binding-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/binding.rule.ts",
            "label": "tools/rules/binding.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/binding.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-binding-rule-ts"
          }
        }
      ],
      "exported": false,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 78,
      "name": "undeclaredFinding",
      "signature": "const undeclaredFinding = function undeclaredFinding(path: string, slot: Slot, declared: Declared): Finding[] {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/core/factories/binding.factory.ts",
          "name": "unhonored",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-factories-binding-factory-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/factories/binding.factory.ts",
            "label": "tools/core/factories/binding.factory.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/factories/binding.factory.ts.md",
            "ref": "anatomy:file-coordination-tools-core-factories-binding-factory-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "tools/rules/binding.rule.ts",
          "name": "consumerFindings",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-binding-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/binding.rule.ts",
            "label": "tools/rules/binding.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/binding.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-binding-rule-ts"
          }
        }
      ],
      "exported": false,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 99,
      "name": "unstated",
      "signature": "const unstated = (slot: Slot): Finding[] => {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "tools/rules/binding.rule.ts",
          "name": "honoredIn",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-binding-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/binding.rule.ts",
            "label": "tools/rules/binding.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/binding.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-binding-rule-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 43,
      "name": "blocksOf",
      "signature": "const blocksOf = function blocksOf(lines: readonly string[]): string[] {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/core/analyzers/binding.analyzer.ts",
          "name": "slotsIn",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-analyzers-binding-analyzer-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/analyzers/binding.analyzer.ts",
            "label": "tools/core/analyzers/binding.analyzer.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/analyzers/binding.analyzer.ts.md",
            "ref": "anatomy:file-coordination-tools-core-analyzers-binding-analyzer-ts"
          }
        },
        {
          "file": "tools/rules/binding.rule.ts",
          "name": "blocksOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-binding-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/binding.rule.ts",
            "label": "tools/rules/binding.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/binding.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-binding-rule-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 59,
      "name": "honoredIn",
      "signature": "const honoredIn = function honoredIn(lines: readonly string[], states: ReadonlyMap<string, Resolution>): Set<string> {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/rules/binding.rule.ts",
          "name": "undeclaredFinding",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-binding-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/binding.rule.ts",
            "label": "tools/rules/binding.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/binding.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-binding-rule-ts"
          }
        },
        {
          "file": "tools/rules/binding.rule.ts",
          "name": "unstated",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-binding-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/binding.rule.ts",
            "label": "tools/rules/binding.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/binding.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-binding-rule-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 92,
      "name": "consumerFindings",
      "signature": "const consumerFindings = function consumerFindings(path: string, source: string, declared: Declared): Finding[] {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/core/analyzers/binding.analyzer.ts",
          "name": "slotStates",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-analyzers-binding-analyzer-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/analyzers/binding.analyzer.ts",
            "label": "tools/core/analyzers/binding.analyzer.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/analyzers/binding.analyzer.ts.md",
            "ref": "anatomy:file-coordination-tools-core-analyzers-binding-analyzer-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 29,
      "name": "declaredIn",
      "signature": "const declaredIn = function declaredIn(rendered: string): Declared {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/core/generators/binding.generator.ts",
          "name": "writeBinding",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-generators-binding-generator-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/generators/binding.generator.ts",
            "label": "tools/core/generators/binding.generator.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/generators/binding.generator.ts.md",
            "ref": "anatomy:file-coordination-tools-core-generators-binding-generator-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 111,
      "name": "healBinding",
      "signature": "const healBinding = function healBinding(context: RuleContext, rendered: string, fix: boolean): string[] {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "interface_declaration",
      "line": 11,
      "name": "SlotKey",
      "signature": "interface SlotKey {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 16,
      "name": "slotKey",
      "signature": "const slotKey = function slotKey(name: string): SlotKey | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 17,
      "name": "body",
      "signature": "const body = name.slice(1, -1);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 18,
      "name": "dot",
      "signature": "const dot = body.indexOf(\".\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "interface_declaration",
      "line": 22,
      "name": "Declared",
      "signature": "interface Declared {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 31,
      "name": "keyed",
      "signature": "const keyed = names.flatMap((name) => {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 44,
      "name": "blocks",
      "signature": "const blocks: string[] = [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 45,
      "name": "held",
      "signature": "let held: string[] = [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "type_alias_declaration",
      "line": 72,
      "name": "Slot",
      "signature": "type Slot = ReturnType<typeof slotsIn>[number];"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 74,
      "name": "firstOf",
      "signature": "const firstOf = function firstOf(slots: readonly Slot[]): Set<Slot> {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 79,
      "name": "parsed",
      "signature": "const parsed = slotKey(slot.name);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 84,
      "name": "elsewhere",
      "signature": "const elsewhere = declared.byKey.get(parsed.key);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 93,
      "name": "lines",
      "signature": "const lines = source.split(\"\\n\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 94,
      "name": "honored",
      "signature": "const honored = honoredIn(lines, declared.states);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 95,
      "name": "slots",
      "signature": "const slots = slotsIn(source);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 96,
      "name": "firstSeen",
      "signature": "const firstSeen = firstOf(slots);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 97,
      "name": "firstUnmentioned",
      "signature": "const firstUnmentioned = firstOf(slots.filter((slot) => !enumeratesVocabulary(lines[slot.line - 1] ?? \"\")));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 100,
      "name": "state",
      "signature": "const state = declared.states.get(slot.name);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 101,
      "name": "open",
      "signature": "const open = state !== undefined && state !== \"RESOLVED\" && !honored.has(slot.name);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 112,
      "name": "onDisk",
      "signature": "const onDisk = context.exists(BINDING_PATH) ? context.read(BINDING_PATH) : null;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 121,
      "name": "rule",
      "signature": "export const rule: RuleDeclaration = {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 122,
      "name": "check",
      "signature": "check(context: RuleContext, fix: boolean): RuleResult {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 123,
      "name": "rendered",
      "signature": "const rendered = renderBinding();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 124,
      "name": "healed",
      "signature": "const healed = healBinding(context, rendered, fix);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 125,
      "name": "drift",
      "signature": "const drift = healed.length > 0 ? [drifted(BINDING_PATH)] : [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 131,
      "name": "declared",
      "signature": "const declared = declaredIn(rendered);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 132,
      "name": "scoped",
      "signature": "const scoped = underRoots(context.paths, SLOT_CONSUMERS);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 133,
      "name": "findings",
      "signature": "const findings = ["
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 139,
      "name": "names",
      "signature": "const names = [...declared.names].toSorted((left, right) => left.localeCompare(right, \"en\"));"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-binding-rule-ts",
  "language": "typescript",
  "layer": "domain",
  "name": "binding.rule.ts",
  "path": "tools/rules/binding.rule.ts",
  "ref": "anatomy:file-coordination-tools-rules-binding-rule-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-rules",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-rules",
          "label": "tools/rules",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-rules.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-rules"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-analyzers-binding-analyzer-ts",
          "json": "https://banes-lab.com/json/source/coordination/tools/core/analyzers/binding.analyzer.ts",
          "label": "tools/core/analyzers/binding.analyzer.ts",
          "markdown": "https://banes-lab.com/source/coordination/tools/core/analyzers/binding.analyzer.ts.md",
          "ref": "anatomy:file-coordination-tools-core-analyzers-binding-analyzer-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-factories-binding-factory-ts",
          "json": "https://banes-lab.com/json/source/coordination/tools/core/factories/binding.factory.ts",
          "label": "tools/core/factories/binding.factory.ts",
          "markdown": "https://banes-lab.com/source/coordination/tools/core/factories/binding.factory.ts.md",
          "ref": "anatomy:file-coordination-tools-core-factories-binding-factory-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-generators-binding-generator-ts",
          "json": "https://banes-lab.com/json/source/coordination/tools/core/generators/binding.generator.ts",
          "label": "tools/core/generators/binding.generator.ts",
          "markdown": "https://banes-lab.com/source/coordination/tools/core/generators/binding.generator.ts.md",
          "ref": "anatomy:file-coordination-tools-core-generators-binding-generator-ts"
        }
      ],
      "relation": "uses"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-core-analyzers",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-analyzers",
          "label": "tools/core/analyzers",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-analyzers.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-analyzers"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-core-factories",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-factories",
          "label": "tools/core/factories",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-factories.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-factories"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-core-generators",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-generators",
          "label": "tools/core/generators",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-generators.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-generators"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-rules",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-rules",
          "label": "tools/rules",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-rules.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-rules"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "rule",
    "subject": "binding",
    "variant": null
  },
  "stats": {
    "bytes": 5971,
    "callable": 10,
    "definitions": 36,
    "edges": 9,
    "exported": 9,
    "files": 1,
    "findings": {},
    "flows": {
      "relay": 2,
      "leaf": 1,
      "entry": 4,
      "isolated": 29
    },
    "lines": {
      "blank": 22,
      "code": 131,
      "total": 153
    }
  },
  "summary": "131 lines of code and 36 definitions.",
  "text": "https://banes-lab.com/source/coordination/tools/rules/binding.rule.ts.txt",
  "tree": "coordination",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-blocking-rule-ts",
      "json": "https://banes-lab.com/json/source/coordination/tools/rules/blocking.rule.ts",
      "label": "tools/rules/blocking.rule.ts",
      "markdown": "https://banes-lab.com/source/coordination/tools/rules/blocking.rule.ts.md",
      "ref": "anatomy:file-coordination-tools-rules-blocking-rule-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-agenda-rule-ts",
      "json": "https://banes-lab.com/json/source/coordination/tools/rules/agenda.rule.ts",
      "label": "tools/rules/agenda.rule.ts",
      "markdown": "https://banes-lab.com/source/coordination/tools/rules/agenda.rule.ts.md",
      "ref": "anatomy:file-coordination-tools-rules-agenda-rule-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/coordination/tools/rules",
    "label": "tools/rules",
    "markdown": "https://banes-lab.com/api/source/coordination/tools/rules.md",
    "ref": "api:source/coordination/tools/rules"
  }
}
