Mermaid Mapper
Extract structural relationships from source into Mermaid-compatible edges. Follow references/mermaid-conventions.md.
When to use
- "Make a Mermaid chart for this file" or the current file.
- Map one named class or a small explicit set of types.
- Workflow Boss assigned this file and type list as one scoutmap row.
Inputs
- File path (absolute or repo-relative) to the compilation unit.
- Types to map: explicit list, or "all non-excluded classes in this file" when the user wants the whole file and scope is clear.
- Optional: inventory of known type names (for example from scoutmap) to judge cross-file references plausibly.
Instructions
- Read the file. Inspect only the requested types (or the agreed in-file scope).
- For each mapped type, extract relationships that matter for architecture:
- Inheritance: base class (use
--|>). - Composition / dependency: references to other mapped or noteworthy types via fields, properties, constructor parameters (use
-->).
- Inheritance: base class (use
- Do not emit edges for primitives,
string, framework-only types, or trivial constants. - Omit records and structs unless the user or assignment explicitly included them.
- Collections: emit an edge only when the element type is itself a mapped or explicitly relevant type.
- Prefer facts visible in declarations; do not infer hidden runtime dependencies.
Output contract
- Return only edge lines, one per line, using the syntax in references/mermaid-conventions.md.
- No
graph TD, no markdown fences, no explanatory text. - Optional deterministic subgraphs only if explicitly allowed and unambiguous from the file.
Workflow partial files
When running as a workflow worker, write the same edge-only content to the partial path the Boss specifies (for example documentation/workflows/mermaid_mapper/partials/partial_0001.md).
Standalone examples
- Map
ResourceViewModeland types it references inResourceViewModels.cs. - Map every in-scope class in the current buffer's file for a quick diagram.
- Map relationships starting from
UnitViewModelonly.