{
  "definitions": [
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "tools/core/runners/surface.runner.ts",
          "name": "runSurfaceRaise",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-surface-runner-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/runners/surface.runner.ts",
            "label": "tools/core/runners/surface.runner.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/runners/surface.runner.ts.md",
            "ref": "anatomy:file-coordination-tools-core-runners-surface-runner-ts"
          }
        },
        {
          "file": "tools/core/runners/surface.runner.ts",
          "name": "runSurfaceRaise",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-surface-runner-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/runners/surface.runner.ts",
            "label": "tools/core/runners/surface.runner.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/runners/surface.runner.ts.md",
            "ref": "anatomy:file-coordination-tools-core-runners-surface-runner-ts"
          }
        }
      ],
      "exported": true,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 36,
      "name": "declaredSubjects",
      "signature": "export const declaredSubjects = function declaredSubjects(): readonly string[] {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "config/surface.config.ts",
          "name": "seededLifetimeOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-config-surface-config-ts",
            "json": "https://banes-lab.com/json/source/coordination/config/surface.config.ts",
            "label": "config/surface.config.ts",
            "markdown": "https://banes-lab.com/source/coordination/config/surface.config.ts.md",
            "ref": "anatomy:file-coordination-config-surface-config-ts"
          }
        },
        {
          "file": "tools/core/runners/surface.runner.ts",
          "name": "declaredSubjects",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-surface-runner-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/runners/surface.runner.ts",
            "label": "tools/core/runners/surface.runner.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/runners/surface.runner.ts.md",
            "ref": "anatomy:file-coordination-tools-core-runners-surface-runner-ts"
          }
        },
        {
          "file": "tools/core/runners/surface.runner.ts",
          "name": "declaredSubjects",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-surface-runner-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/runners/surface.runner.ts",
            "label": "tools/core/runners/surface.runner.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/runners/surface.runner.ts.md",
            "ref": "anatomy:file-coordination-tools-core-runners-surface-runner-ts"
          }
        },
        {
          "file": "tools/core/strings/surface.strings.ts",
          "name": "contractBlockMissing",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-surface-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/surface.strings.ts",
            "label": "tools/core/strings/surface.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/surface.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-surface-strings-ts"
          }
        },
        {
          "file": "tools/core/strings/surface.strings.ts",
          "name": "subjectUndeclared",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-surface-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/surface.strings.ts",
            "label": "tools/core/strings/surface.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/surface.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-surface-strings-ts"
          }
        },
        {
          "file": "tools/core/strings/surface.strings.ts",
          "name": "surfaceExists",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-surface-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/surface.strings.ts",
            "label": "tools/core/strings/surface.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/surface.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-surface-strings-ts"
          }
        },
        {
          "file": "tools/core/strings/surface.strings.ts",
          "name": "surfaceRaised",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-surface-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/surface.strings.ts",
            "label": "tools/core/strings/surface.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/surface.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-surface-strings-ts"
          }
        },
        {
          "file": "tools/core/strings/surface.strings.ts",
          "name": "surfaceRehearsed",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-surface-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/surface.strings.ts",
            "label": "tools/core/strings/surface.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/surface.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-surface-strings-ts"
          }
        },
        {
          "file": "tools/core/strings/surface.strings.ts",
          "name": "templateFileMissing",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-surface-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/surface.strings.ts",
            "label": "tools/core/strings/surface.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/surface.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-surface-strings-ts"
          }
        },
        {
          "file": "tools/core/strings/surface.strings.ts",
          "name": "templateSeedsNothing",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-surface-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/surface.strings.ts",
            "label": "tools/core/strings/surface.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/surface.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-surface-strings-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "tools/core/coordinators/invocation.coordinator.ts",
          "name": "surfaceRaise",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-coordinators-invocation-coordinator-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/coordinators/invocation.coordinator.ts",
            "label": "tools/core/coordinators/invocation.coordinator.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/coordinators/invocation.coordinator.ts.md",
            "ref": "anatomy:file-coordination-tools-core-coordinators-invocation-coordinator-ts"
          }
        }
      ],
      "exported": true,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 50,
      "name": "runSurfaceRaise",
      "signature": "export const runSurfaceRaise = function runSurfaceRaise(request: SurfaceRequest): SurfaceOutcome {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 18,
      "name": "BANNER",
      "signature": "const BANNER = \"═\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 20,
      "name": "LIVE_SECTION_LEAD",
      "signature": "const LIVE_SECTION_LEAD = \"**A surface raised from this template\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "interface_declaration",
      "line": 22,
      "name": "SurfaceRequest",
      "signature": "interface SurfaceRequest {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "interface_declaration",
      "line": 31,
      "name": "SurfaceOutcome",
      "signature": "interface SurfaceOutcome {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 40,
      "name": "raisedFrom",
      "signature": "export const raisedFrom = function raisedFrom(template: string): string {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 41,
      "name": "lines",
      "signature": "const lines = template.split(\"\\n\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 42,
      "name": "live",
      "signature": "const live = lines.findIndex((line) => line.startsWith(LIVE_SECTION_LEAD));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 43,
      "name": "seeded",
      "signature": "const seeded = live === -1 ? lines : lines.slice(0, live);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 44,
      "name": "banner",
      "signature": "const banner = seeded.findIndex((line) => line.startsWith(BANNER));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 45,
      "name": "out",
      "signature": "const out = banner === -1 ? [] : seeded.slice(banner);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 51,
      "name": "subject",
      "signature": "const subject = request.subject.trim();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 64,
      "name": "templatePath",
      "signature": "const templatePath = resolve(request.repoRoot, surfacePath(request.templateSlot));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 69,
      "name": "target",
      "signature": "const target = `${surfacePath(request.rootSlot)}/${subject}.${request.concern}.md`;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 74,
      "name": "template",
      "signature": "const template = readFileSync(templatePath, \"utf8\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 75,
      "name": "carried",
      "signature": "const carried = raisedFrom(template);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 85,
      "name": "outcome",
      "signature": "const outcome = writeRepair({ declared: \"whole\", repoRoot: request.repoRoot }, target, carried);"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-surface-runner-ts",
  "language": "typescript",
  "layer": "product",
  "name": "surface.runner.ts",
  "path": "tools/core/runners/surface.runner.ts",
  "ref": "anatomy:file-coordination-tools-core-runners-surface-runner-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-core-runners",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-runners",
          "label": "tools/core/runners",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-runners.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-runners"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/coordination#file-coordination-config-surface-config-ts",
          "json": "https://banes-lab.com/json/source/coordination/config/surface.config.ts",
          "label": "config/surface.config.ts",
          "markdown": "https://banes-lab.com/source/coordination/config/surface.config.ts.md",
          "ref": "anatomy:file-coordination-config-surface-config-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-surface-strings-ts",
          "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/surface.strings.ts",
          "label": "tools/core/strings/surface.strings.ts",
          "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/surface.strings.ts.md",
          "ref": "anatomy:file-coordination-tools-core-strings-surface-strings-ts"
        }
      ],
      "relation": "uses"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-coordinators-invocation-coordinator-ts",
          "json": "https://banes-lab.com/json/source/coordination/tools/core/coordinators/invocation.coordinator.ts",
          "label": "tools/core/coordinators/invocation.coordinator.ts",
          "markdown": "https://banes-lab.com/source/coordination/tools/core/coordinators/invocation.coordinator.ts.md",
          "ref": "anatomy:file-coordination-tools-core-coordinators-invocation-coordinator-ts"
        }
      ],
      "relation": "used-by"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-config",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-config",
          "label": "config",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-config.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-config"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-core-coordinators",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-coordinators",
          "label": "tools/core/coordinators",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-coordinators.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-coordinators"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-core-runners",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-runners",
          "label": "tools/core/runners",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-runners.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-runners"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-core-strings",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-strings",
          "label": "tools/core/strings",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-strings.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-strings"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "runner",
    "subject": "surface",
    "variant": null
  },
  "stats": {
    "bytes": 3044,
    "callable": 3,
    "definitions": 18,
    "edges": 10,
    "exported": 14,
    "files": 1,
    "findings": {},
    "flows": {
      "leaf": 1,
      "relay": 1,
      "isolated": 16
    },
    "lines": {
      "blank": 18,
      "code": 73,
      "total": 91
    }
  },
  "summary": "73 lines of code and 18 definitions.",
  "text": "https://banes-lab.com/source/coordination/tools/core/runners/surface.runner.ts.txt",
  "tree": "coordination",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-sweep-runner-ts",
      "json": "https://banes-lab.com/json/source/coordination/tools/core/runners/sweep.runner.ts",
      "label": "tools/core/runners/sweep.runner.ts",
      "markdown": "https://banes-lab.com/source/coordination/tools/core/runners/sweep.runner.ts.md",
      "ref": "anatomy:file-coordination-tools-core-runners-sweep-runner-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-role-runner-ts",
      "json": "https://banes-lab.com/json/source/coordination/tools/core/runners/role.runner.ts",
      "label": "tools/core/runners/role.runner.ts",
      "markdown": "https://banes-lab.com/source/coordination/tools/core/runners/role.runner.ts.md",
      "ref": "anatomy:file-coordination-tools-core-runners-role-runner-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/coordination/tools/core/runners",
    "label": "tools/core/runners",
    "markdown": "https://banes-lab.com/api/source/coordination/tools/core/runners.md",
    "ref": "api:source/coordination/tools/core/runners"
  }
}
