catalog / engines

Diff Engine

Compute and apply differences between two texts.

15 capabilities 1 sections reference specification

Build against it

# give your agent the catalog — no account, no install
claude mcp add provespec -- npx -y provespec-mcp

# then, from any agent session
spec_get(slug: "diff")                → the capability tree
spec_checklist(slug: "diff")          → the questions to answer
spec_grade(slug: "diff", grades: [...])  → parity % + the gap list

# or just fetch it
curl https://provespec.com/catalog/diff/spec.json

Grade every capability below as yes · partial · no · na, with a file reference as evidence. Whatever you leave ungraded counts as missing — the gap list is the work queue.

Or just paste this to your agent

Use the ProveSpec MCP server. Fetch the "diff" spec with
spec_get, then walk spec_checklist and grade this repository against it —
one verdict per capability, each with a file reference as the note.
Call spec_grade with the results and give me the gap list as the plan.

If the server is not registered, add it first:
  claude mcp add provespec -- npx -y provespec-mcp

The specification

AI 15

Core
  • Line-level diff of two texts the LCS-shaped result
  • Character or word-level diff for intra-line detail
  • Minimal edit script insert/delete/equal Myers or equivalent
Output
  • Unified diff format @@ -a,b +c,d @@ with configurable context
  • Side-by-side alignment data rows paired for display
  • Structured hunks programmatic access, not just text
Patch
  • Apply a patch to a text
  • Detect and report conflicts with the failing hunk
  • Fuzzy application with offset search
Merge
  • Three-way merge base, ours, theirs
  • Conflict markers in the merged output <<<<<<< …
Options
  • Ignore whitespace and case
  • Detect moved blocks
Correctness
  • Applying a diff reproduces the target exactly the round-trip property
Performance
  • Linear-ish on large similar files no quadratic blow-up on realistic input
Download spec.json All 53 specs