agentsclimarketplace

Map flow

Skill brentzo/ren-atlas-skills/skills/map-flow

Deep-maps how a specific capability or feature flows across files and projects — e.g. "how does checkout flow between the web app and the payments service". Traces entry points → calls → cross-project hops → external SDKs/DBs at file/function granularity, and writes a deep-dive note with one or more Mermaid diagrams (sequenceDiagram, flowchart, and/or classDiagram — the model chooses what fits, and may emit several) plus file:line evidence. Writes to Architecture/flows/, links back to project notes via wikilinks, and never touches the system canvas. Records .atlas/flows/<slug>.json so refresh-vault can flag the flow stale when its traced files change. Use for feature/flow deep dives and "how does X work across A and B" questions — distinct from map-project (project topology). Can run standalone.From its SKILL.md

Install
npx -y skills add brentzo/ren-atlas-skills --skill map-flow

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

10.2 KB, as published. Nobody here has run it

map-flow

Trace one capability end-to-end across files and project boundaries, and persist it as a self-contained deep-dive note. This is a different granularity from the rest of the atlas: the topology skills treat each project as a single node; map-flow goes inside projects to follow a feature's call sequence.

It never bloats the system view. A flow is always its own file under Architecture/flows/, linked back to the project notes — never an addition to System.excalidraw.md / System.canvas / _index.md's generated region.

Read first

Inputs

  • A capability/feature — e.g. "checkout", "magic-link login", "payout settlement".
  • Spans (optional) — the projects/dirs it crosses (e.g. apps/web/src/checkout, services/payments). If omitted, discover them by grepping the capability keywords across the manifest's project roots.
  • Vault — resolve per vault-resolution (explicit arg > ATLAS_VAULT > recorded in memory > ask).
  • manifest.json / graph.json (optional, under .atlas/) — if present, use them to map participants to project ids (for correct [[wikilinks]]) and to anchor known edges. map-flow works without them by inferring from paths.

Procedure

1. Resolve the trace scope

  • Grep the capability's keywords (e.g. checkout|cart|payment) across the named spans — or across all project roots if spans weren't given — to find the participating files.
  • Identify the participants (these become diagram lifelines / nodes): the UI/facade, the service layer, any SDK, the HTTP/gateway hop, the target project's handler/endpoint, and external systems (the third-party SDK, DB, queue). Map each participant to a project id via the manifest where possible, so you can wikilink it.

2. Trace the interaction

Walk the actual call path and record an ordered list of steps:

  • Start at the entry point (UI action or facade method).
  • Follow calls within the project to the cross-project hop. For HTTP: find the client call (e.g. http.service + route) and resolve the route to the target project's endpoint via its api-spec.yaml / controller / router. For SDKs: find the SDK launch + result handling. For queues: producer subject → consumer.
  • Continue into the target project's handler, then out to externals (SDK verify, DB read/write).
  • For each step capture: from → to, mechanism (method call / HTTP route / SDK call / DB op), payload or purpose, sync/async, and file:line evidence. Note branches, error paths, and meaningful return values.

Stay scoped to this capability — do not expand into a whole-project map.

3. Choose the diagram(s) — your call, and you may emit several

Pick the form(s) that explain this flow best. You are not capped to one diagram. Use the heuristic, then decide:

  • sequenceDiagram — default for request/response call traces. Lifelines = participants; ordered messages + returns. Best for "how does X work".
  • flowchart — for branchy / multi-stage / state-machine flows (decisions, parallel paths, retries).
  • classDiagram — for the data shapes exchanged (DTOs, entities, the SDK result payload) when the contract is the point.

Heuristic: mostly calls → sequence; mostly branches/stages → flowchart; the question is about data shapes/contracts → class. A flow is often clearest as two: e.g. a sequenceDiagram for the call flow plus a classDiagram for the request/response payload. Emit as many as genuinely add clarity, each under its own heading; drop any that would be redundant. Record which you chose (and why) in the note and the .json.

Apply the design-system colors and the mermaid-syntax pre-emit checklist to each.

4. Write the flow note — Architecture/flows/<slug>/<slug>.md

<slug> = kebab-case of the capability (e.g. checkout). Each flow gets its own folder flows/<slug>/ holding the note and all its diagram canvases (see vault-layout) — so a multi-diagram flow doesn't clutter flows/.

Frontmatter:

---
type: flow
capability: <capability>
spans: [<project ids…>]
relates: ["[[<project-a>]]", "[[<project-b>]]"]
generatedAt: <ISO timestamp>
---

Body, inside <!-- atlas:generated:start --> / <!-- atlas:generated:end --> markers (same contract as the other skills):

  • # <Capability> flow
  • One-paragraph summary of what the flow does end-to-end.
  • Participants — wikilinks to project notes ([[<project-a>]], [[<project-b>]]) + externals as plain text.
  • The diagram(s), each under its own heading in a ```mermaid block.
  • Trace — the ordered steps with file:line evidence.
  • Optional "Make editable" line: convert a diagram via the in-plugin Mermaid to Excalidraw (works for sequence/class too).

After the closing marker, leave a ## Notes heading for the human. Also wikilink [[_index]] so the flow is reachable from the map-of-content (Obsidian backlinks then surface this flow on every participant note automatically — no need to edit those notes).

5. Index + persistence

  • Architecture/flows/_flows.md — a map-of-content (stays at flows/ root, not inside a flow folder) listing every [[<slug>]] with its capability + spans. Maintain idempotently (inside generated markers).
  • <vault>/Architecture/.atlas/flows/<slug>.json:
    { "version": "1", "slug": "checkout", "capability": "Checkout",
      "spans": ["<project-a>", "<project-b>"], "participants": ["<project-a>","gateway","<project-b>","<external>"],
      "diagrams": ["sequenceDiagram", "classDiagram"],
      "sourceFiles": ["/abs/path/checkout.facade.ts", "/abs/path/payment/service.go", "..."],
      "fingerprint": "<hash of sourceFiles' content/mtime>", "generatedAt": "<ISO>" }
    
    refresh-vault reads this: if any sourceFile changed, it flags the flow stale (it does not auto-rewrite — flows are curated).
  • Optionally link _index.md → [[flows/_flows]] inside a separate <!-- atlas:flows:start --> … <!-- atlas:flows:end --> block (idempotent). Do not touch the atlas:generated region that write-excalidraw owns.

Canvas (optional) — hand-authored

The embedded Mermaid renders natively in Obsidian (read mode). For an editable Excalidraw of a flow, hand-author it to the strict specs — the same way write-excalidraw does, but using the layout section that matches the diagram form you chose:

  • sequenceDiagram → layout-algorithms.md §5 (sequence) — participant columns, dashed lifelines, timed message rows, self-loops.
  • flowchart → §1 (layered) + edge routing.
  • classDiagram → §6 (class) — compartment boxes, semantic relation arrowheads.
  • mindmap → §7 (mindmap) — central root + radial branches.

Encode with the element schemas and mandatory binding rules in write-excalidraw/reference/excalidraw-format.md (reciprocal binding, bound labels, stable ids), color per design-system.md, and run the collision check before writing. Write each into the flow's folder: <vault>/Architecture/flows/<slug>/<slug>.<diagram>.excalidraw.md (e.g. flows/checkout/checkout.sequenceDiagram.excalidraw.md).

Overwrite policy: running map-flow writes its note + canvases — create if absent, rebuild in place if present (note in the report if a rebuild replaced possible manual edits). Never delete a file. refresh-vault is the conservative path that flags a hand-edited flow canvas stale instead of rebuilding it.

Guardrails

  • Every [[wikilink]] must resolve to a vault note — a project id, a flow <slug>, [[_index]], or [[flows/_flows]], and nothing else. Externals (SDKs, DBs, queues, SaaS) are plain text. A "see also" whose target is not a vault note — a memory-note slug, a doc filename, a ticket id — is also plain text, never a [[link]]: an unresolved wikilink becomes a phantom graph node that spawns an empty placeholder file when clicked. See vault-layout → "Every wikilink MUST resolve".
  • Never write or modify System.excalidraw.md, System.canvas, or _index.md's atlas:generated region.
  • Running map-flow writes/updates the flow note — rewrite only between the atlas:generated markers (preserving the human ## Notes section), exactly like the other generated notes. The .atlas/flows/<slug>.json is machine state and is rewritten freely. Never delete a note or canvas.
  • Evidence is mandatory — every step cites file:line, so the trace is auditable and refresh-vault can re-anchor it.
  • Keep each diagram within readable bounds; if a flow is huge, split it (e.g. a high-level sequence + a focused sub-flow) rather than one wall of arrows.

Done & handoff

Report: the flow note path, the diagram type(s) chosen and why, the participants, the number of traced steps, and the .atlas/flows/<slug>.json written. Note that backlinks now surface this flow on the participant project notes, and refresh-vault will flag it stale if its sourceFiles change.

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.