# configuration/strings/report.strings.ts

> 73 lines of code and 27 definitions.

Tree: GovLab Patterns
Language: typescript
Layer: product
Canonical: https://banes-lab.com/anatomy/patterns#file-patterns-configuration-strings-report-strings-ts
Source text: https://banes-lab.com/source/patterns/configuration/strings/report.strings.ts.txt

Listed in [configuration/strings](https://banes-lab.com/api/source/patterns/configuration/strings.md), after [configuration/strings/pattern.strings.ts](https://banes-lab.com/source/patterns/configuration/strings/pattern.strings.ts.md) and before [configuration/strings/representation.strings.ts](https://banes-lab.com/source/patterns/configuration/strings/representation.strings.ts.md).

## Definitions

- `healNote` (lexical_declaration, line 57, exported)
- `moduleWritten` (lexical_declaration, line 61, exported)
- `writeSummary` (lexical_declaration, line 65, exported)
- `moduleDrift` (lexical_declaration, line 69, exported)
- `healedModules` (lexical_declaration, line 73, exported)
- `rewrittenModules` (lexical_declaration, line 77, exported)
- `driftModules` (lexical_declaration, line 81, exported)
- `modulesClean` (lexical_declaration, line 85, exported)
- `svgCollection` (lexical_declaration, line 89, exported)
- `masterWritten` (lexical_declaration, line 93, exported)
- `unreadableManifest` (lexical_declaration, line 97, exported)
- `REPORT_HEADINGS` (lexical_declaration, line 1, exported)
- `NESTED_COLUMNS` (lexical_declaration, line 8, exported)
- `SYMBOL_COLUMNS` (lexical_declaration, line 10, exported)
- `SYNTAX_COLUMNS` (lexical_declaration, line 12, exported)
- `NO_DEFINITIONS` (lexical_declaration, line 14, exported)
- `RARE_ROW` (lexical_declaration, line 16, exported)
- `DEPTH_PREFIX` (lexical_declaration, line 18, exported)
- `INSPECT_HINT` (lexical_declaration, line 20, exported)
- `nestedCount` (lexical_declaration, line 22, exported)
- `summaryLine` (lexical_declaration, line 26, exported)
- `nestedTip` (lexical_declaration, line 30, exported)
- `pageLabel` (lexical_declaration, line 34, exported)
- `REPORT_ARGV_SUMMARY` (lexical_declaration, line 38, exported)
- `REPORT_FLAGS` (lexical_declaration, line 41, exported)
- `MODULE_POSITIONAL` (lexical_declaration, line 48, exported)
- `HEAL_NOTES` (lexical_declaration, line 50, exported)

## Contained in

- [configuration/strings](https://banes-lab.com/anatomy/patterns/folder-patterns-configuration-strings.md)

## Used by

- [core/coordinators/report.coordinator.ts](https://banes-lab.com/source/patterns/core/coordinators/report.coordinator.ts.md)
- [core/loaders/package.loader.ts](https://banes-lab.com/source/patterns/core/loaders/package.loader.ts.md)
- [core/persistence/report.persistence.ts](https://banes-lab.com/source/patterns/core/persistence/report.persistence.ts.md)
- [runtime/entrypoints/report.entrypoint.ts](https://banes-lab.com/source/patterns/runtime/entrypoints/report.entrypoint.ts.md)

## Linked from

- [core/coordinators](https://banes-lab.com/anatomy/patterns/folder-patterns-core-coordinators.md)
- [core/loaders](https://banes-lab.com/anatomy/patterns/folder-patterns-core-loaders.md)
- [core/persistence](https://banes-lab.com/anatomy/patterns/folder-patterns-core-persistence.md)
- [runtime/entrypoints](https://banes-lab.com/anatomy/patterns/folder-patterns-runtime-entrypoints.md)

## Source

```typescript
export const REPORT_HEADINGS = {
    distribution: "Syntax invariants &amp; variants",
    findings: "Findings",
    nested: "Nested concerns &middot; drill down",
    symbols: "Definitions &middot; call flow",
} as const;

export const NESTED_COLUMNS: readonly string[] = ["concern", "nodes", "defs", "flagged"];

export const SYMBOL_COLUMNS: readonly string[] = ["definition", "flow", "in", "out", "dependents"];

export const SYNTAX_COLUMNS: readonly string[] = ["syntax kind", "frequency", "n"];

export const NO_DEFINITIONS = "No definitions here.";

export const RARE_ROW = "rare (once)";

export const DEPTH_PREFIX = "depth ";

export const INSPECT_HINT = String.raw`click a hex to inspect \u00b7 scroll to zoom \u00b7 drag to pan \u00b7 double-click to reset`;

export const nestedCount = function nestedCount(count: number): string {
    return ` &middot; ${count} nested concerns`;
};

export const summaryLine = function summaryLine(definitions: number, flagged: number, nested: string): string {
    return `${definitions} definitions &middot; ${flagged} findings${nested}`;
};

export const nestedTip = function nestedTip(rel: string, count: number, defs: number, findings: number): string {
    return `${rel}  ·  ${count} nodes  ·  ${defs} defs  ·  ${findings} findings`;
};

export const pageLabel = function pageLabel(title: string, rel: string): string {
    return `${title} / ${rel}`;
};

export const REPORT_ARGV_SUMMARY =
    "Generate, or with --check verify and heal, every module's report artifacts, SVG collection and master findings.";

export const REPORT_FLAGS = {
    all: "cover every discovered module instead of one",
    check: "verify the written artifacts against a fresh generation and heal drift",
    fast: "skip the cross-module context when reporting one module",
    ignore: "extra folder names to prune, as a comma-separated list",
} as const;

export const MODULE_POSITIONAL = "the module folder to report on, the working folder when absent";

export const HEAL_NOTES = {
    clean: "up to date",
    drift: "drift",
    healed: "self-healed",
    rewritten: "regenerated",
} as const;

export const healNote = function healNote(note: string): string {
    return `[hex] ${note}\n`;
};

export const moduleWritten = function moduleWritten(title: string, count: number): string {
    return `[hex] ${title}: ${count} artifact(s)\n`;
};

export const writeSummary = function writeSummary(regenerated: number, total: number): string {
    return `[hex] regenerated ${regenerated}, skipped ${total - regenerated} of ${total} module(s)\n`;
};

export const moduleDrift = function moduleDrift(moduleDir: string): string {
    return `[hex] non-deterministic drift in ${moduleDir}: the generator produced differing output across clean re-parses\n`;
};

export const healedModules = function healedModules(names: readonly string[]): string {
    return `[hex] self-healed ${names.length} transient-parse module(s): ${names.join(", ")}\n`;
};

export const rewrittenModules = function rewrittenModules(names: readonly string[]): string {
    return `[hex] regenerated ${names.length} stale module(s): ${names.join(", ")}\n`;
};

export const driftModules = function driftModules(names: readonly string[]): string {
    return `[hex] non-deterministic drift in ${names.length} module(s): ${names.join(", ")}. The generator produced differing output across clean re-parses\n`;
};

export const modulesClean = function modulesClean(total: number): string {
    return `[hex] ${total} module(s) up to date\n`;
};

export const svgCollection = function svgCollection(written: number, pruned: number, svgDir: string): string {
    return `[hex] svg collection: ${written} written, ${pruned} pruned, in ${svgDir}\n`;
};

export const masterWritten = function masterWritten(masterPath: string): string {
    return `[hex] master findings: ${masterPath}\n`;
};

export const unreadableManifest = function unreadableManifest(path: string, reason: string): string {
    return `[hex] skipping unreadable ${path}: ${reason}\n`;
};
```
