diff that makes you go "yummers"

README.md

prime-meat #

Reading diff generator and viewer extension for Prime Agent powered by meat with DeepSeek Flash support.

Requirements #

Requires our fork of Prime Agent on the minimal-runtime-extensions branch:

  • Repository: git@knot.gaze.systems:did:plc:hyjzca276ph4himqf5dy5vim
  • Provides the native display kernel protocol (CONTENT_DISPLAY_MIME), full-width syntax-highlighted diff rendering with 50% luminance dimmed deletions, wrapped card headers, and the display Python skill.

Features #

  • Vendored Meat Engine (meat/):

    • DeepSeek Chat Completions backend (deepseek-flash) with up to 65k token reasoning headroom for large multi-file diffs.
    • Automatic credential discovery from Prime Agent's ~/.prime/agent/auth.json (or DEEPSEEK_API_KEY).
    • Ephemeral cache in ~/.meat keyed by rubric + diff sha (sub-50ms repeat reads).
  • Slash Command (/meat):

    • /meat: Abridge working-tree changes (-w), or HEAD if clean.
    • /meat -staged: Abridge staged changes.
    • /meat <rev>: Abridge a specific commit or range (e.g. HEAD~1, main...HEAD).
    • Displays a clean reading diff with senior-level summary and elision statistics directly in Prime.
  • Agent Tool (meat):

    • LLM tool for inspecting and generating reading diffs without dumping raw diff text into session context.
  • Python Skill (meat):

    • Pre-imported in Prime's IPython kernel:
      import meat
      
      # Abridge working tree and display directly to user:
      res = await meat.worktree()
      await res.display()
      
      # Abridge a commit:
      res = await meat.diff("HEAD~1")
      await res.display()
      
      # Inspect programmatically (e.g. in review-fanout subagents):
      res = await meat.worktree()
      print(res.summary)
      print(res.smart_diff)
      
      # Present any reading diff to the user:
      await res.display()
      

Installation #

git clone git@knot.gaze.systems:did:plc:vt5hyxlqexvgpurzoq7qlcai prime-meat
cd prime-meat

# Build the Go binary to ~/.local/bin/meat
npm run build:meat

# Register in Prime Agent
prime-agent package install .