Skip to content

feat: git output compression — compact status/diff/log/push #429

@bug-ops

Description

@bug-ops

Parent

Epic: #426

Summary

Compress git command outputs to compact summaries preserving only actionable information.

Expected Savings

80-99% depending on command.

Behavior

git status

# Before (15 lines):
On branch feat/m26/filters
Changes staged: 3 files
Changes not staged: 2 files
Untracked: 1 file
...full file listing...

# After (compact):
feat/m26/filters | staged: 3 | modified: 2 | untracked: 1
  M crates/zeph-tools/src/shell.rs
  M crates/zeph-tools/src/filter.rs
  A crates/zeph-tools/src/filters/mod.rs
  ?? new_file.rs

git diff

# Before: full hunks with context
# After: per-file +added/-removed counts + changed function signatures
src/shell.rs | +15 -3
src/filter.rs | +120 -0 (new)

git push/pull

# Before: 10-15 lines of negotiation, compression, progress
# After:
ok main → origin/main (3 commits, +45/-12)

git log

# Before: full commit messages with metadata
# After: one-line-per-commit (hash + first line)

Implementation

  • GitOutputFilter matching git status|diff|log|push|pull|fetch
  • Sub-parsers per git subcommand
  • Regex-based extraction of stats and file lists

Acceptance Criteria

  • git status → compact format with file list
  • git diff → per-file stats
  • git push/pull → one-line result
  • git log → one-line-per-commit (already default with --oneline, but compress verbose format)
  • Unit tests with real output samples

Metadata

Metadata

Assignees

No one assigned

    Labels

    M26Milestone 26: Smart tool output filteringP1Important prioritysize/Mtoken-savingsToken economy improvementstoolsTool execution and MCP integration

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions