How it works
you: "map this repo" → agent reads the code and writes .schemap/<slug>/map.json → schemap validate --json the agent repairs what the diagnostics name → schemap deliver → map.html + map.svg + a markdown snippet → agent pastes the snippet into your README, docs or PR when asked1. The agent writes facts
Section titled “1. The agent writes facts”The map is a typed JSON file: a kind, nodes with a type and a card, and edges between them. Optional groups, lanes, phases, views and notes add structure. There are no coordinates and no styling: the schema rejects them.
2. schemap validates
Section titled “2. schemap validates”Validation runs the Zod schema plus rules for references, kinds and semantics. Every problem is a diagnostic with a JSON pointer to the exact place and the fixes allowed there. The skill tells the agent to repair only what is named, and to stop and report if two rounds don’t reduce the errors.
3. schemap lays it out
Section titled “3. schemap lays it out”- Architecture and dataflow: a layered layout (ELK) with groups as boxes and orthogonal edges.
- Workflow and lifecycle: lanes as rows, columns follow the flow, loops route around the cards.
- Sequence: participants across the top, one row per message, in time order.
Cards wrap long text and grow to fit everything the node carries. There are no size limits.
4. schemap delivers
Section titled “4. schemap delivers”deliver embeds the laid-out map in the viewer template and writes:
map.html: the interactive viewer, about 80 KB, with everything inlined.map.svg: a static render with inline styles, light by default.
Output is deterministic: the same JSON gives byte-identical files, and deliver prints a sha256 receipt.