how do meat.dev werk and what do it do
meat.md
105 lines 3.7 kB view raw view code

Meat turns a normal Git diff into a shorter reading diff containing the changes a human should focus on.

It aims to remove mechanical noise—imports, repetitive plumbing, generated code, obvious field copying—while retaining behavioral changes, architecture, algorithms, data flow, compatibility concerns, and meaningful tests.

┌──────────────────┐
│ Unified Git diff │
└────────┬─────────┘
         ▼
┌──────────────────────────┐
│ Meat rubric + LLM        │
│ • inspect relevant files │
│ • grep repository        │
│ • propose elisions       │
└────────┬─────────────────┘
         ▼
┌──────────────────────────┐
│ Meat validates the plan │
│ against original lines   │
└────────┬─────────────────┘
         ▼
┌─────────────────────────┐
│ Mechanically generated  │
│ reading diff            │
└─────────────────────────┘

What the model does#

Meat numbers the physical lines of the original diff and asks the model to submit an edit plan using three operations:

  • Remove: Completely omit an unimportant range.
  • Fold: Replace several similar lines with one ... line.
  • Replace: Elide part of a long line with ....

For example:

+user.Name = row.name
+user.Email = row.email
+user.Address = row.address
+user.Phone = row.phone

might become:

+user.Name = row.name
+...

Or:

+return fmt.Errorf("failed to update account %s for organization %s", accountID, orgID)

might become:

+return fmt.Errorf(...)

The model can use Meat’s read-only tools to:

  • Read related repository files.
  • Run git grep.
  • Preview its proposed reading diff.
  • Submit the final edit plan.

Invalid plans are rejected with feedback so the model can correct them.

Important safety property#

The model does not write the displayed diff. It only identifies original line ranges and substrings.

Meat then validates and mechanically applies that plan to the immutable input. This prevents the model from inventing code or silently rewriting retained lines.

That guarantees provenance, but not judgment: Meat can still make a poor decision about which real lines are important.

Output#

meat.Abridge returns:

  • SmartDiff: the shortened reading diff.
  • Summary: a one-line description of the semantic change.
  • Input and output token counts.

The result looks like a unified diff, but it is not an applicable patch. Removed and folded lines leave the original hunk counts stale. It is designed for reading and navigation only.

Large diffs#

Around 400 KiB per model run, Meat splits the diff at file and hunk boundaries, processes chunks sequentially, then merges the reading diffs and summaries. Total accepted input is capped around 4 MiB.

What Meat is not#

Meat does not primarily:

  • Produce a code-review report.
  • Leave comments on individual lines.
  • Declare the change correct or incorrect.
  • Detect every bug or security issue.
  • Modify the working tree.

It is best understood as an AI-directed diff compressor: it preserves the semantic center of a change while hiding details that are less valuable to a human reviewer.