{
  "definitions": [
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/core/predicates/comment.predicate.ts",
          "name": "isAttribution",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-predicates-comment-predicate-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/predicates/comment.predicate.ts",
            "label": "tools/core/predicates/comment.predicate.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/predicates/comment.predicate.ts.md",
            "ref": "anatomy:file-coordination-tools-core-predicates-comment-predicate-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "tools/core/steps/source.step.ts",
          "name": "cleanedFile",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-steps-source-step-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/steps/source.step.ts",
            "label": "tools/core/steps/source.step.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/steps/source.step.ts.md",
            "ref": "anatomy:file-coordination-tools-core-steps-source-step-ts"
          }
        }
      ],
      "exported": true,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 20,
      "name": "isVendored",
      "signature": "export const isVendored = function isVendored(spans: readonly CommentSpan[]): boolean {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/core/steps/source.step.ts",
          "name": "isVendored",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-steps-source-step-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/steps/source.step.ts",
            "label": "tools/core/steps/source.step.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/steps/source.step.ts.md",
            "ref": "anatomy:file-coordination-tools-core-steps-source-step-ts"
          }
        },
        {
          "file": "tools/core/writers/repair.writer.ts",
          "name": "writeRepair",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-writers-repair-writer-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/writers/repair.writer.ts",
            "label": "tools/core/writers/repair.writer.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/writers/repair.writer.ts.md",
            "ref": "anatomy:file-coordination-tools-core-writers-repair-writer-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 108,
      "name": "cleanedFile",
      "signature": "const cleanedFile = function cleanedFile("
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/core/resolvers/artifact.resolver.ts",
          "name": "resolveArtifactRoots",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-resolvers-artifact-resolver-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/resolvers/artifact.resolver.ts",
            "label": "tools/core/resolvers/artifact.resolver.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/resolvers/artifact.resolver.ts.md",
            "ref": "anatomy:file-coordination-tools-core-resolvers-artifact-resolver-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 25,
      "name": "codeFiles",
      "signature": "export const codeFiles = function codeFiles(repoRoot: string): string[] {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/core/reporters/rule.reporter.ts",
          "name": "writeRuleReport",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-reporters-rule-reporter-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/reporters/rule.reporter.ts",
            "label": "tools/core/reporters/rule.reporter.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/reporters/rule.reporter.ts.md",
            "ref": "anatomy:file-coordination-tools-core-reporters-rule-reporter-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 63,
      "name": "cleanStage",
      "signature": "export const cleanStage = function cleanStage(options: StepOptions): StepOutcome {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 16,
      "name": "CODE_EXTENSIONS",
      "signature": "export const CODE_EXTENSIONS: readonly string[] = slotList(\"convention\", \"code_extensions\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 18,
      "name": "CODE_ROOTS",
      "signature": "const CODE_ROOTS = [SURFACE_ROOT];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 21,
      "name": "[leading]",
      "signature": "const [leading] = spans;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 26,
      "name": "taxonomy",
      "signature": "const taxonomy = loadTaxonomy();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 27,
      "name": "roots",
      "signature": "const roots: string[] = [...Object.keys(taxonomy.containers), ...Object.keys(taxonomy.specialContainers)];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 40,
      "name": "seen",
      "signature": "const seen = new Set<string>();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 41,
      "name": "out",
      "signature": "const out: string[] = [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 49,
      "name": "relative",
      "signature": "const relative = toPosix(repoRoot, file);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 61,
      "name": "INVARIANT",
      "signature": "const INVARIANT = \"authored code carries no comments\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 71,
      "name": "cleaned",
      "signature": "const cleaned = cleanSources(options.repoRoot, options.fix, options.scope);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 106,
      "name": "UNTOUCHED",
      "signature": "const UNTOUCHED = { file: null, refused: false } as const;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 114,
      "name": "source",
      "signature": "const source = readFileSync(resolve(repoRoot, path), \"utf8\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 115,
      "name": "spans",
      "signature": "const spans = commentsOf(path, source);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 120,
      "name": "result",
      "signature": "const result = stripComments(source, spans);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 125,
      "name": "rewrites",
      "signature": "const rewrites = apply && result.text !== source;"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 133,
      "name": "cleanSources",
      "signature": "export const cleanSources = function cleanSources(repoRoot: string, apply: boolean, declared = \"\"): CleanResult {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 134,
      "name": "paths",
      "signature": "const paths = codeFiles(repoRoot);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 135,
      "name": "outcomes",
      "signature": "const outcomes = paths.map((path) => ({ path, ...cleanedFile(repoRoot, path, apply, declared) }));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 136,
      "name": "files",
      "signature": "const files = outcomes.flatMap((outcome) => (outcome.file === null ? [] : [outcome.file]));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 137,
      "name": "refused",
      "signature": "const refused = outcomes.filter((outcome) => outcome.refused).map((outcome) => outcome.path);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 138,
      "name": "removed",
      "signature": "const removed = files.reduce((sum, file) => sum + file.removed, 0);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 139,
      "name": "kept",
      "signature": "const kept = files.reduce((sum, file) => sum + file.kept, 0);"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-steps-source-step-ts",
  "language": "typescript",
  "layer": "application",
  "name": "source.step.ts",
  "path": "tools/core/steps/source.step.ts",
  "ref": "anatomy:file-coordination-tools-core-steps-source-step-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-core-steps",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-steps",
          "label": "tools/core/steps",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-steps.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-steps"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-predicates-comment-predicate-ts",
          "json": "https://banes-lab.com/json/source/coordination/tools/core/predicates/comment.predicate.ts",
          "label": "tools/core/predicates/comment.predicate.ts",
          "markdown": "https://banes-lab.com/source/coordination/tools/core/predicates/comment.predicate.ts.md",
          "ref": "anatomy:file-coordination-tools-core-predicates-comment-predicate-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-reporters-rule-reporter-ts",
          "json": "https://banes-lab.com/json/source/coordination/tools/core/reporters/rule.reporter.ts",
          "label": "tools/core/reporters/rule.reporter.ts",
          "markdown": "https://banes-lab.com/source/coordination/tools/core/reporters/rule.reporter.ts.md",
          "ref": "anatomy:file-coordination-tools-core-reporters-rule-reporter-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-resolvers-artifact-resolver-ts",
          "json": "https://banes-lab.com/json/source/coordination/tools/core/resolvers/artifact.resolver.ts",
          "label": "tools/core/resolvers/artifact.resolver.ts",
          "markdown": "https://banes-lab.com/source/coordination/tools/core/resolvers/artifact.resolver.ts.md",
          "ref": "anatomy:file-coordination-tools-core-resolvers-artifact-resolver-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-writers-repair-writer-ts",
          "json": "https://banes-lab.com/json/source/coordination/tools/core/writers/repair.writer.ts",
          "label": "tools/core/writers/repair.writer.ts",
          "markdown": "https://banes-lab.com/source/coordination/tools/core/writers/repair.writer.ts.md",
          "ref": "anatomy:file-coordination-tools-core-writers-repair-writer-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-core-reporters",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-reporters",
          "label": "tools/core/reporters",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-reporters.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-reporters"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-core-resolvers",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-resolvers",
          "label": "tools/core/resolvers",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-resolvers.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-resolvers"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-core-steps",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-steps",
          "label": "tools/core/steps",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-steps.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-steps"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-core-writers",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-writers",
          "label": "tools/core/writers",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-writers.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-writers"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "step",
    "subject": "source",
    "variant": null
  },
  "stats": {
    "bytes": 5375,
    "callable": 5,
    "definitions": 26,
    "edges": 5,
    "exported": 18,
    "files": 1,
    "findings": {},
    "flows": {
      "relay": 1,
      "entry": 3,
      "isolated": 22
    },
    "lines": {
      "blank": 21,
      "code": 121,
      "total": 142
    }
  },
  "summary": "121 lines of code and 26 definitions.",
  "text": "https://banes-lab.com/source/coordination/tools/core/steps/source.step.ts.txt",
  "tree": "coordination",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-steps-typecheck-step-ts",
      "json": "https://banes-lab.com/json/source/coordination/tools/core/steps/typecheck.step.ts",
      "label": "tools/core/steps/typecheck.step.ts",
      "markdown": "https://banes-lab.com/source/coordination/tools/core/steps/typecheck.step.ts.md",
      "ref": "anatomy:file-coordination-tools-core-steps-typecheck-step-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-steps-snapshot-step-ts",
      "json": "https://banes-lab.com/json/source/coordination/tools/core/steps/snapshot.step.ts",
      "label": "tools/core/steps/snapshot.step.ts",
      "markdown": "https://banes-lab.com/source/coordination/tools/core/steps/snapshot.step.ts.md",
      "ref": "anatomy:file-coordination-tools-core-steps-snapshot-step-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/coordination/tools/core/steps",
    "label": "tools/core/steps",
    "markdown": "https://banes-lab.com/api/source/coordination/tools/core/steps.md",
    "ref": "api:source/coordination/tools/core/steps"
  }
}
