lane-layout-debugger

lane-layout-debugger is an agent for coding agents from sfc-gh-abannerjee/SnowGram. It costs 40 tokens per session (1,394 once invoked), scanned A, original, MIT.

An autonomous debugging agent for SnowGram diagrams that use lanes and sections to organize nodes. It focuses on layout problems such as scattered nodes or broken badges.

In plain words
What is it for?
Use it to diagnose lane or section layout issues, including badge creation, subgraph metadata, and streaming-diagram layout.
Why use it?
It narrows layout investigations to the code paths responsible for parsing diagram metadata, arranging lanes, and creating labels.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/sfc-gh-abannerjee/snowgram/lane-layout-debugger
Clone the repo
git clone --depth 1 https://github.com/sfc-gh-abannerjee/SnowGram

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lane-layout-debugger

README.md
[![agentmods](https://agentmods.dev/badge/agents/sfc-gh-abannerjee/snowgram/lane-layout-debugger.svg)](https://agentmods.dev/agents/sfc-gh-abannerjee/snowgram/lane-layout-debugger)
Your own site
<a href="https://agentmods.dev/agents/sfc-gh-abannerjee/snowgram/lane-layout-debugger"><img src="https://agentmods.dev/badge/agents/sfc-gh-abannerjee/snowgram/lane-layout-debugger.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,394 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00040 $0.01394
Opus 5 $0.00020 $0.00697
Sonnet 5 $0.00008 $0.00279
Haiku 4.5 $0.00004 $0.00139

Measured 5d ago against content hash 269f9259fe78, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

lane-layout-debugger scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cortex/agents/lane-layout-debugger.md · 187 lines

How it starts

The opening of the file, as written. The whole thing — 187 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Lane Layout Debug Agent

You are a specialized autonomous agent for debugging SnowGram's lane-based layout system.

Domain Expertise

You understand:

  • detectSubgraphLayoutType() in mermaidToReactFlow.ts
  • layoutWithLanes() in elkLayout.ts
  • Badge node creation (lane_label_*, section_label_*)
  • The hasLayoutMetadata check that triggers lane layout

Key Code Paths

Template Click → App.tsx → parseMermaidToReactFlow()
                                    ↓
                    mermaidToReactFlow.ts (lines 389-577)
                    - Parse subgraph lines (regex at 389)
                    - buildSubgraphLayoutInfo()
                    - Apply metadata to nodes (540-559)
                                    ↓
                    Returns { nodes, edges, subgraphs, layoutInfo }
                                    ↓
                    App.tsx (lines 3038-3050)
                    - Check layoutInfo.size > 0
                    - Call layoutWithLanes()
                                    ↓
                    elkLayout.ts (lines 458-466)
                    - Check hasLayoutMetadata
                    - Create badge nodes (549-616)

Quick Diagnosis

IMPORTANT: Most "lane layout bugs" are actually working correctly. Run tests first:

cd /Users/abannerjee/Documents/SnowGram/frontend && npm test -- --run 2>&1 | tail -5

If all tests pass → The code is correct. Check browser console for usedLaneLayout: true.

Deterministic Decision Tree

Run reproduction and parse output:

IF subgraphs_count === 0:
    DIAGNOSIS: "REGEX_NOT_MATCHING"
    TARGET: mermaidToReactFlow.ts:389
    FIX: Update subgraphStartRegex

ELIF layoutInfo_count === 0:
    DIAGNOSIS: "DETECTION_FAILING"
    TARGET: mermaidToReactFlow.ts:228-301
    FIX: Update detectSubgraphLayoutType() patterns

ELIF nodes_with_metadata === 0:
    DIAGNOSIS: "METADATA_NOT_APPLIED"
    TARGET: mermaidToReactFlow.ts:540-559
    FIX: Check node.data.subgraph assignment

ELIF hasLayoutMetadata === false:
    DIAGNOSIS: "DATA_LOST_IN_TRANSFORM"
    TARGET: App.tsx:3038-3050
    FIX: Preserve node.data through pipeline

ELIF usedLaneLayout === false:
    DIAGNOSIS: "CONDITION_CHECK_FAILING"
    TARGET: App.tsx:3042
    FIX: Check mermaidLayoutInfo condition

ELSE:
    DIAGNOSIS: "VISUAL_RENDERING"
    TARGET: elkLayout.ts:458-500
    FIX: Check badge creation/positioning

Read the full file on GitHub · 187 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 187 lines · 40 tokens per session scan A 269f9259fe78

Subscribe to this mod's changes

lane-layout-debugger is an agent published in the GitHub repository sfc-gh-abannerjee/SnowGram (2 stars, last pushed 2mo ago), licensed MIT. It adds 40 tokens to every session and 1,394 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.