{
  "definitions": [
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "tools/rules/placement.rule.ts",
          "name": "check",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-placement-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/placement.rule.ts",
            "label": "tools/rules/placement.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/placement.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-placement-rule-ts"
          }
        },
        {
          "file": "tools/rules/placement.rule.ts",
          "name": "check",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-placement-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/placement.rule.ts",
            "label": "tools/rules/placement.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/placement.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-placement-rule-ts"
          }
        },
        {
          "file": "tools/rules/placement.rule.ts",
          "name": "check",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-placement-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/placement.rule.ts",
            "label": "tools/rules/placement.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/placement.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-placement-rule-ts"
          }
        },
        {
          "file": "tools/rules/placement.rule.ts",
          "name": "check",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-placement-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/placement.rule.ts",
            "label": "tools/rules/placement.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/placement.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-placement-rule-ts"
          }
        },
        {
          "file": "tools/rules/placement.rule.ts",
          "name": "check",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-placement-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/placement.rule.ts",
            "label": "tools/rules/placement.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/placement.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-placement-rule-ts"
          }
        }
      ],
      "exported": true,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 136,
      "name": "pathsOn",
      "signature": "const pathsOn = (route: PlacementRoute): string[] =>"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "tools/rules/placement.rule.ts",
          "name": "placementOutcome",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-placement-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/placement.rule.ts",
            "label": "tools/rules/placement.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/placement.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-placement-rule-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 83,
      "name": "placementFinding",
      "signature": "const placementFinding = function placementFinding("
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/rules/placement.rule.ts",
          "name": "pathsOn",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-placement-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/placement.rule.ts",
            "label": "tools/rules/placement.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/placement.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-placement-rule-ts"
          }
        },
        {
          "file": "tools/rules/placement.rule.ts",
          "name": "pathsOn",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-placement-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/placement.rule.ts",
            "label": "tools/rules/placement.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/placement.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-placement-rule-ts"
          }
        },
        {
          "file": "tools/rules/placement.rule.ts",
          "name": "pathsOn",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-placement-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/placement.rule.ts",
            "label": "tools/rules/placement.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/placement.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-placement-rule-ts"
          }
        },
        {
          "file": "tools/rules/placement.rule.ts",
          "name": "pathsOn",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-placement-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/placement.rule.ts",
            "label": "tools/rules/placement.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/placement.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-placement-rule-ts"
          }
        },
        {
          "file": "tools/rules/placement.rule.ts",
          "name": "pathsOn",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-placement-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/placement.rule.ts",
            "label": "tools/rules/placement.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/placement.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-placement-rule-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "method_definition",
      "line": 133,
      "name": "check",
      "signature": "check(context: RuleContext): RuleResult {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/core/predicates/placement.predicate.ts",
          "name": "isImmutable",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-predicates-placement-predicate-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/predicates/placement.predicate.ts",
            "label": "tools/core/predicates/placement.predicate.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/predicates/placement.predicate.ts.md",
            "ref": "anatomy:file-coordination-tools-core-predicates-placement-predicate-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 73,
      "name": "earlyRoute",
      "signature": "const earlyRoute = function earlyRoute(path: string, board: string): PlacementRoute | null {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/rules/placement.rule.ts",
          "name": "placementFinding",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-placement-rule-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/rules/placement.rule.ts",
            "label": "tools/rules/placement.rule.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/rules/placement.rule.ts.md",
            "ref": "anatomy:file-coordination-tools-rules-placement-rule-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 113,
      "name": "placementOutcome",
      "signature": "const placementOutcome = function placementOutcome(path: string, data: TaxonomyData, board: string): PlacementOutcome {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 14,
      "name": "folderForTag",
      "signature": "const folderForTag = function folderForTag(tag: string, data: TaxonomyData): string | null {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 18,
      "name": "remediate",
      "signature": "const remediate = function remediate(code: string, path: string, name: string, data: TaxonomyData): Remediation {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 20,
      "name": "{ parsed }",
      "signature": "const { parsed } = parseFilename(name, data);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 22,
      "name": "folder",
      "signature": "const folder = folderForTag(parsed.concern, data);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 44,
      "name": "decideBy",
      "signature": "const decideBy: Record<string, string> = {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 63,
      "name": "PLACEMENT_ROUTES",
      "signature": "export const PLACEMENT_ROUTES = [\"boundary\", \"immutable\", \"outside\", \"reached\", \"upstream\"] as const;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "type_alias_declaration",
      "line": 65,
      "name": "PlacementRoute",
      "signature": "type PlacementRoute = (typeof PLACEMENT_ROUTES)[number];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "interface_declaration",
      "line": 67,
      "name": "PlacementOutcome",
      "signature": "interface PlacementOutcome {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 90,
      "name": "verdict",
      "signature": "const verdict = checkPlacement(root, segments, data, name);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 95,
      "name": "remediation",
      "signature": "const remediation = remediate(verdict.code ?? \"\", path, name, data);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 114,
      "name": "early",
      "signature": "const early = earlyRoute(path, board);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 119,
      "name": "governed",
      "signature": "const governed = governedPath(path, data);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 124,
      "name": "name",
      "signature": "const name = basename(path);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 132,
      "name": "rule",
      "signature": "export const rule: RuleDeclaration = {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 134,
      "name": "board",
      "signature": "const board = surfacePath(\"board\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 135,
      "name": "outcomes",
      "signature": "const outcomes = context.paths.map((path) => placementOutcome(path, context.taxonomy, board));"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-placement-rule-ts",
  "language": "typescript",
  "layer": "domain",
  "name": "placement.rule.ts",
  "path": "tools/rules/placement.rule.ts",
  "ref": "anatomy:file-coordination-tools-rules-placement-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-predicates-placement-predicate-ts",
          "json": "https://banes-lab.com/json/source/coordination/tools/core/predicates/placement.predicate.ts",
          "label": "tools/core/predicates/placement.predicate.ts",
          "markdown": "https://banes-lab.com/source/coordination/tools/core/predicates/placement.predicate.ts.md",
          "ref": "anatomy:file-coordination-tools-core-predicates-placement-predicate-ts"
        }
      ],
      "relation": "uses"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-core-predicates",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-predicates",
          "label": "tools/core/predicates",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-predicates.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-predicates"
        },
        {
          "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": "placement",
    "variant": null
  },
  "stats": {
    "bytes": 6710,
    "callable": 7,
    "definitions": 21,
    "edges": 7,
    "exported": 6,
    "files": 1,
    "findings": {},
    "flows": {
      "leaf": 2,
      "entry": 3,
      "isolated": 16
    },
    "lines": {
      "blank": 18,
      "code": 140,
      "total": 158
    }
  },
  "summary": "140 lines of code and 21 definitions.",
  "text": "https://banes-lab.com/source/coordination/tools/rules/placement.rule.ts.txt",
  "tree": "coordination",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-purity-rule-ts",
      "json": "https://banes-lab.com/json/source/coordination/tools/rules/purity.rule.ts",
      "label": "tools/rules/purity.rule.ts",
      "markdown": "https://banes-lab.com/source/coordination/tools/rules/purity.rule.ts.md",
      "ref": "anatomy:file-coordination-tools-rules-purity-rule-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-rules-literal-rule-ts",
      "json": "https://banes-lab.com/json/source/coordination/tools/rules/literal.rule.ts",
      "label": "tools/rules/literal.rule.ts",
      "markdown": "https://banes-lab.com/source/coordination/tools/rules/literal.rule.ts.md",
      "ref": "anatomy:file-coordination-tools-rules-literal-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"
  }
}
