Mermaid aggregation
Combine partial mapper outputs into a single deliverable diagram.
When to use
- Final step of the mermaid-mapper workflow after all rows are validated.
- Rebuilding
mermaid.mdfrom archived partials without re-running scout or mapper. - Merging edge lists from ad-hoc mapper runs into one file.
Inputs
- Partials: paths under
documentation/workflows/mermaid_mapper/partials/and/or inline edge text from the user. - Optional: sort order (for example alphabetical by left-hand node).
Instructions
- Collect every accepted fragment. Strip empty lines and markdown fences if someone pasted fenced content by mistake.
- Concatenate all edge lines.
- Deduplicate: identical lines count once; treat direction as part of identity (
A --> Bdiffers fromB --> A). - Optionally sort lines for stable diffs (for example by source node name, then target).
- Emit one markdown file containing a single fenced block:
- First line inside the fence:
graph TD - Remaining lines: the edge lines only
- First line inside the fence:
Output contract
- Workflow: write
documentation/workflows/mermaid_mapper/mermaid.mdat the target repository root. - Standalone: output the same fenced block in chat or write a path the user gave.
Format reference
Wrapping and default direction match ../mermaid-mapper/references/mermaid-conventions.md.
This path assumes mermaid-aggregation and mermaid-mapper are co-located as siblings under the same skills/ parent. If deployed standalone, copy the conventions reference locally or load mermaid-mapper/references/mermaid-conventions.md from its installed location.
Standalone examples
- Combine
partial_0001.mdthroughpartial_0004.mdinto onemermaid.md. - Turn this list of edges into a fenced Mermaid block for the README.