Skip to content

feat: add configurable auto-simplify threshold and improve change detection#26

Open
kostyay wants to merge 2 commits intomainfrom
feat/configurable-simplify-threshold
Open

feat: add configurable auto-simplify threshold and improve change detection#26
kostyay wants to merge 2 commits intomainfrom
feat/configurable-simplify-threshold

Conversation

@kostyay
Copy link
Owner

@kostyay kostyay commented Mar 5, 2026

  • Add SimplifySettings interface with minChangedLines threshold, persisted in $PI_CODING_AGENT_DIR/simplify.json with sensible defaults (10 lines minimum)
  • Implement readSettings() to load configuration with fallback to defaults when file is missing or malformed
  • Add countChangedLines() to accurately measure added + removed lines using git diff --numstat and wc -l for untracked files
  • Replace HEAD snapshot tracking with dirty file set snapshots for more reliable change detection — tracks which files were dirty at agent turn start
  • Add wasAborted() helper to skip auto-simplify when agent run fails or is cancelled
  • Update auto-simplify proposal logic to only trigger when changed lines exceed configured threshold and files are newly modified
  • Refactor imports to use existsSync, extname, and join utilities for cleaner path/file handling
  • Replace manual file extension parsing with extname() utility function
  • Update README descriptions for simplify, status-bar, and sandbox extensions to reflect new capabilities

@kostyay kostyay changed the title WIP feat: add configurable auto-simplify threshold and improve change detection Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant