{
  "definitions": [
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/core/runners/task.runner.ts",
          "name": "isDeclared",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-task-runner-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/runners/task.runner.ts",
            "label": "tools/core/runners/task.runner.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/runners/task.runner.ts.md",
            "ref": "anatomy:file-coordination-tools-core-runners-task-runner-ts"
          }
        },
        {
          "file": "tools/core/strings/task.strings.ts",
          "name": "contractMissing",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-task-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/task.strings.ts",
            "label": "tools/core/strings/task.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/task.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-task-strings-ts"
          }
        },
        {
          "file": "tools/core/strings/task.strings.ts",
          "name": "idTaken",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-task-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/task.strings.ts",
            "label": "tools/core/strings/task.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/task.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-task-strings-ts"
          }
        },
        {
          "file": "tools/core/strings/task.strings.ts",
          "name": "noTaskRows",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-task-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/task.strings.ts",
            "label": "tools/core/strings/task.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/task.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-task-strings-ts"
          }
        },
        {
          "file": "tools/core/strings/task.strings.ts",
          "name": "planMissing",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-task-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/task.strings.ts",
            "label": "tools/core/strings/task.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/task.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-task-strings-ts"
          }
        },
        {
          "file": "tools/core/strings/task.strings.ts",
          "name": "rowAppended",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-task-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/task.strings.ts",
            "label": "tools/core/strings/task.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/task.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-task-strings-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "tools/core/coordinators/invocation.coordinator.ts",
          "name": "task",
          "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": 62,
      "name": "runTask",
      "signature": "export const runTask = function runTask(request: TaskRequest): TaskOutcome {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "tools/core/runners/task.runner.ts",
          "name": "runTask",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-task-runner-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/runners/task.runner.ts",
            "label": "tools/core/runners/task.runner.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/runners/task.runner.ts.md",
            "ref": "anatomy:file-coordination-tools-core-runners-task-runner-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 37,
      "name": "isDeclared",
      "signature": "const isDeclared = function isDeclared(source: string, id: string): boolean {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 16,
      "name": "TASK_MARKER",
      "signature": "const TASK_MARKER = \"- [ ] \";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 18,
      "name": "PLACEHOLDER",
      "signature": "const PLACEHOLDER = \"<unwritten>\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 20,
      "name": "OWNER_MARKER",
      "signature": "const OWNER_MARKER = \"*owner:*\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 22,
      "name": "FIELD_DIVIDER",
      "signature": "const FIELD_DIVIDER = \" · \";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "interface_declaration",
      "line": 24,
      "name": "TaskRequest",
      "signature": "interface TaskRequest {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "interface_declaration",
      "line": 32,
      "name": "TaskOutcome",
      "signature": "interface TaskOutcome {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 50,
      "name": "lastTaskLine",
      "signature": "const lastTaskLine = function lastTaskLine(lines: readonly string[]): number {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 53,
      "name": "index",
      "signature": "for (let index = 0; index < lines.length; index += 1) {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 63,
      "name": "absolute",
      "signature": "const absolute = resolve(request.repoRoot, request.target);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 73,
      "name": "source",
      "signature": "const source = readFileSync(absolute, \"utf8\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 79,
      "name": "lines",
      "signature": "const lines = source.split(\"\\n\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 80,
      "name": "at",
      "signature": "const at = lastTaskLine(lines);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 85,
      "name": "template",
      "signature": "const template = resolve(request.repoRoot, PLANNING_TEMPLATE);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 86,
      "name": "markers",
      "signature": "const markers = existsSync(template) ? readRowMarkers(readFileSync(template, \"utf8\")) : [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 91,
      "name": "fields",
      "signature": "const fields = markers"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 95,
      "name": "row",
      "signature": "const row = `${TASK_MARKER}${request.id.trim()} ${request.statement.trim()}. ${fields}`;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 96,
      "name": "written",
      "signature": "const written = [...lines.slice(0, at + 1), row, ...lines.slice(at + 1)];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 98,
      "name": "outcome",
      "signature": "const outcome = writeRepair({ declared: \"whole\", repoRoot: request.repoRoot }, request.target, written.join(\"\\n\"));"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-task-runner-ts",
  "language": "typescript",
  "layer": "product",
  "name": "task.runner.ts",
  "path": "tools/core/runners/task.runner.ts",
  "ref": "anatomy:file-coordination-tools-core-runners-task-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-tools-core-strings-task-strings-ts",
          "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/task.strings.ts",
          "label": "tools/core/strings/task.strings.ts",
          "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/task.strings.ts.md",
          "ref": "anatomy:file-coordination-tools-core-strings-task-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-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": "task",
    "variant": null
  },
  "stats": {
    "bytes": 3101,
    "callable": 3,
    "definitions": 20,
    "edges": 6,
    "exported": 11,
    "files": 1,
    "findings": {},
    "flows": {
      "relay": 1,
      "leaf": 1,
      "isolated": 18
    },
    "lines": {
      "blank": 23,
      "code": 81,
      "total": 104
    }
  },
  "summary": "81 lines of code and 20 definitions.",
  "text": "https://banes-lab.com/source/coordination/tools/core/runners/task.runner.ts.txt",
  "tree": "coordination",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-venue-runner-ts",
      "json": "https://banes-lab.com/json/source/coordination/tools/core/runners/venue.runner.ts",
      "label": "tools/core/runners/venue.runner.ts",
      "markdown": "https://banes-lab.com/source/coordination/tools/core/runners/venue.runner.ts.md",
      "ref": "anatomy:file-coordination-tools-core-runners-venue-runner-ts"
    },
    "previous": {
      "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"
    }
  },
  "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"
  }
}
