pisan-labs

Edit Graph Lab — Development skill for Claude Code

Development community

Diff as a shortest-path search: animate Myers' O(ND) algorithm across the edit graph with its V array, turn the path into a unified diff, and compare LCS, Myers, patience and histogram diff on the sam.

How to install Edit Graph Lab

This entry records only its repository, not the path inside it, so there is no exact command to give. Open pisan-labs/edit-graph-lab and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Edit Graph Lab does

Diff as a shortest-path search: animate Myers' O(ND) algorithm across the edit graph with its V array, turn the path into a unified diff, and compare LCS, Myers, patience and histogram diff on the same input. Built with Claude Code.

Alternatives in Development

  • Market Sizing — Estimate TAM, SAM, SOM with top-down and bottom-up approaches 7.8k ★
  • JWT Scan — JWT attack toolkit (offline) — alg:none forgery, RS256→HS256 algorithm confusion, weak-secret crack, static cl 4.5k ★
  • Mcpx — MCPX 是运行在开发环境中的 MCP Runtime(网关) 370 ★

README

Edit Graph Lab

Students run diff every day but rarely see that it is a shortest-path search. Edit Graph Lab takes two short texts (lines or characters), draws the edit graph as a grid with a diagonal wherever the two texts share a token, and animates Myers' O(ND) algorithm as its furthest-reaching d-paths spread across it, with the V array filling in beside the grid. The final path is turned into a unified diff, and hovering a hunk lights up its stretch of the path. A comparison view runs the LCS dynamic program, Myers, patience and histogram diff on the same input and outlines where they choose different (equally short or longer but more readable) hunks. An exercise generator writes questions whose answers come from the reference implementations and exports them as Markdown or QTI 1.2.

Live: [edit-graph-lab.hintwise.org](https://edit-graph-lab.hintwise.org)

![Myers' algorithm on ABCABBA and CBABAC: furthest-reaching paths spread across the edit graph step by step while the V array fills in, then the Compare tab shows the LCS, Myers, patience and histogram diffs and the LCS table](demo.gif)

Built from idea 2026-10-11 n2 in [`pisanuw/daily-project-ideas`](https://github.com/pisanuw/daily-project-ideas).

![Bram Cohen's frobnitz example: the Myers path on the edit graph, the V array for all 21 steps, and the resulting unified diff](desktop.png)

What it does

  1. Edit graph. Columns are the tokens of A (x axis), rows the tokens of B (y axis). A step right deletes, a step down inserts, a diagonal keeps a shared token for free. Labels show blank lines as ⏎ and spaces as ·. The graph is drawn for up to 160 tokens per side.
  2. Myers, step by step. Forward greedy Myers (1986) in the quadratic-space form, so every step can be replayed. Step, play, or drag the slider through d = 0 … D. Paths found at step d are coloured by d, the current step is drawn thicker, and the solution path appears when the search reaches the corner. The V arr