{"id":51102991,"url":"https://github.com/robzolkos/pi-slopchop","last_synced_at":"2026-06-24T12:30:51.582Z","repository":{"id":353866587,"uuid":"1220318541","full_name":"robzolkos/pi-slopchop","owner":"robzolkos","description":"Terminal code review and annotation workflow for Pi","archived":false,"fork":false,"pushed_at":"2026-06-18T12:48:40.000Z","size":359,"stargazers_count":48,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-06-18T14:27:42.137Z","etag":null,"topics":["annotation-tool","diff-review","pi","pi-coding-agent","pi-extension","pi-package"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robzolkos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-24T19:20:25.000Z","updated_at":"2026-06-18T12:48:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/robzolkos/pi-slopchop","commit_stats":null,"previous_names":["robzolkos/pi-slopchop"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/robzolkos/pi-slopchop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robzolkos%2Fpi-slopchop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robzolkos%2Fpi-slopchop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robzolkos%2Fpi-slopchop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robzolkos%2Fpi-slopchop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robzolkos","download_url":"https://codeload.github.com/robzolkos/pi-slopchop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robzolkos%2Fpi-slopchop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34733255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["annotation-tool","diff-review","pi","pi-coding-agent","pi-extension","pi-package"],"created_at":"2026-06-24T12:30:50.938Z","updated_at":"2026-06-24T12:30:51.576Z","avatar_url":"https://github.com/robzolkos.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pi-slopchop\n\n`/slopchop` and `/diff` open a terminal-native review and annotation surface for Pi.\n\nIt is inspired by Mario Zechner's [pi-diff-review](https://github.com/badlogic/pi-diff-review).\n\nIt lets you stop after an agent turn, walk the diff inside Pi, add fast line/file/whole-change annotations, and send that feedback back to the agent as a clean prompt in the editor.\n\nThe goal is simple: keep terminal-based review within Pi, keep annotations precise, and make it easy to separate **things that should change** from **things you want explained or discussed**.\n\n## Summary\n\nUse `/slopchop` or `/diff` when you want to review and annotate work before sending the agent another turn.\n\nIt supports three review scopes:\n\n- `git diff`\n- `last commit`\n- `all files`\n\nInside the review UI you can:\n\n- move through files and hunks quickly\n- review changes in unified or side-by-side diff view\n- annotate **added** and **deleted** lines, including multiline ranges on one diff side\n- leave **file-level** annotations\n- leave a **whole-change** note\n- mark feedback as either:\n  - `FIX` — the agent should change something\n  - `DISCUSS` — the agent should explain, justify, or propose, without editing code just to satisfy the comment\n- drill into changed git submodules and review the exact nested commit range\n- insert the resulting review prompt into Pi’s editor\n\nThe review UI does **not** auto-send the prompt. It stages the next message for you.\n\n## Quickstart\n\n### Install\n\n```bash\npi install npm:pi-slopchop\n```\n\nThen restart Pi or run `/reload`.\n\n### Run it\n\nInside a git repo in Pi:\n\n```text\n/slopchop\n```\n\nYou can also use the shorter command:\n\n```text\n/diff\n```\n\nOr use the global shortcut, which defaults to:\n\n```text\nalt+s\n```\n\nConfigure the shortcut with `globalShortcut` in `~/.pi/agent/extensions/slopchop.json`, then restart Pi or run `/reload`.\n\n### Basic flow\n\n1. Run `/slopchop` or `/diff`\n2. Pick a scope:\n   - `git diff` — review your current uncommitted working tree changes against `HEAD`\n   - `last commit` — review the most recent commit against its parent\n   - `all files` — review files changed on the current branch compared with the default branch; if there are no changed scopes, falls back to current file contents\n\n   By default, the review UI opens the first scope that makes sense for the repo in this order:\n   - `git diff` if there are uncommitted changes\n   - otherwise `all files` if the current branch differs from the default branch\n   - otherwise `last commit` if there is a reviewable last commit\n   - otherwise `all files` as a current-file fallback\n\n   In the branch-level `all files` scope, files are ordered for review priority: changed files referenced by more other changed files come first, then modified/renamed before added before deleted, then source files before tests/docs/changesets, then path order. The navigator can filter to files related to the active file with `r`. In related mode, `→` means the active file references that file, `←` means that file references the active file, and `↔` means both. Press `r` again to return to all files.\n\n   Changed submodules appear as normal review rows with a `↗` marker. Press `Enter` or `→` to review the exact nested commit range, and press `b` to return to the parent review. File-level comments on the parent submodule row are included in the final prompt.\n3. Move to the file and line you care about; press `v` when you want side-by-side diff view\n4. Add annotations:\n   - `f` for a line annotation with `FIX` preselected\n   - `d` or `c` for a line annotation with `DISCUSS` preselected\n   - `l` for a file annotation\n   - `a` for a whole-change note\n5. Press `s` to insert the review prompt into the editor\n6. Read it, tweak it if you want, then send it normally\n\n### Fastest path\n\nIf you want speed, use template shortcuts on a selected diff line:\n\n- press `t`\n- press a shortcut key from the right panel\n\nThat creates a templated annotation instantly. If you want to refine it afterwards, press `e` on that same line.\n\n## Deep dive\n\n### Annotation model\n\nThe review UI treats feedback as one of three scopes:\n\n#### Line comments\n\nUse these for precise feedback tied to a specific added or deleted line. Hold `Shift+↑↓` in the diff to extend the selection into a multiline range on the same diff side.\n\nExamples:\n\n- `Why was this deleted?`\n- `What is this code doing?`\n- `Consider a clearer name here.`\n\n#### File comments\n\nUse these when the feedback applies to the whole file change rather than one line.\n\nExamples:\n\n- `Explain this file-level refactor.`\n- `This file now does too much.`\n\n#### Whole-change note\n\nUse this when the feedback is about the change as a whole.\n\nExamples:\n\n- `Explain this entire diff to me.`\n- `What is the overall intention behind this change?`\n\n### FIX vs DISCUSS\n\nThis distinction is central to how `/slopchop` works.\n\n#### FIX\n\nUse `FIX` when you want the next agent turn to change something.\n\nExamples:\n\n- rename this\n- simplify this\n- add tests for this\n- restore this deleted line\n\n#### DISCUSS\n\nUse `DISCUSS` when you want explanation, rationale, tradeoffs, or a proposal.\n\nExamples:\n\n- why was this deleted?\n- what is this code doing?\n- explain this change to me\n- is this approach intentional?\n\nWhen the review UI generates the prompt, it uses different wording depending on whether your review is:\n\n- `DISCUSS` only\n- `FIX` only\n- mixed `FIX` + `DISCUSS`\n\nThat keeps pure discussion prompts strict, and avoids unnecessary instructions when you only want changes.\n\n### Navigation and commenting\n\n#### Global\n\n- `1 / 2 / 3` — switch scope\n- mouse wheel — scroll the pane under the cursor\n- `Tab` / `Shift+Tab` — cycle focus forward / backward\n- `/` — search files in the navigator\n- `?` — toggle help in the right sidebar\n- `w` — toggle wrapping\n- `v` — toggle unified / side-by-side diff view\n- `u` — toggle unchanged context in diff scopes\n- `h` — hide/show the comments pane\n- `s` — insert the generated prompt into the editor\n- `Esc` — request review exit; confirms before discarding draft feedback\n- `Ctrl+C` — request review exit with the same confirmation flow\n\n#### Navigator\n\n- `↑↓` or `j/k` — move between files\n- `Ctrl+d` / `Ctrl+u` — move down / up by half a pane\n- `gg / G` — jump to the top / bottom\n- `r` — toggle related-files filter in `all files` scope\n- file rows show change counts as `+added -deleted`\n- `Enter` — move focus to diff, or open the selected changed submodule\n- `→` — open the selected changed submodule when available\n\n#### Diff\n\n- `↑↓` or `j/k` — move between selectable added/deleted lines\n- `Shift+↑↓` — extend the selection into a multiline range on the current side\n- `← / →` — choose the old/deleted or new/added side on replacement rows in side-by-side view\n- `Ctrl+d` / `Ctrl+u` — move down / up by half a pane\n- `gg / G` — jump to the top / bottom\n- `n / p` — next / previous hunk\n- `Enter` / `→` — open the selected changed submodule when available\n- `b` — return to the parent review when inside a submodule\n- `o` — open the selected source location in `$EDITOR`, then return to the review UI when the editor exits\n- `f` — line comment, default `FIX`\n- `d` or `c` — line comment, default `DISCUSS`\n- `e` — edit the existing line comment on the selected line\n- `x` — delete the existing line comment on the selected line\n- `l` — file comment\n- `a` — whole-change note\n- `t` — open template shortcut mode for the selected line\n\nOpening a source location in `$EDITOR` returns you to the review UI when the editor exits and keeps your draft feedback available for submission.\n\nSide-by-side diff view keeps review in one Diff panel. The left column shows deleted/old lines, the right column shows added/new lines, and replacement rows align old and new text on the same visual row. The active side is shown with the selected cell highlight, the active column header, and the selected-side status text. Line comments attach to the selected side and line number.\n\nLine comment markers in the diff gutter:\n\n- `●` = `FIX`\n- `◆` = `DISCUSS`\n\n#### Comments panel\n\n- `↑↓` or `j/k` — move through saved comments\n- `Ctrl+d` / `Ctrl+u` — move down / up by half a pane\n- `gg / G` — jump to the top / bottom\n- `e` or `Enter` — edit selected comment\n- `d` — delete selected comment\n\n#### Editor\n\n- `Tab` — toggle `FIX` / `DISCUSS`\n- `Enter` — save\n- `Shift+Enter` — newline\n- `Esc` — cancel editor\n\n### Template shortcut mode\n\nTemplate shortcut mode is for very fast line comments.\n\nWhen you press `t` on a selected diff line:\n\n- the right sidebar switches to a shortcut panel\n- shortcuts are grouped under `DISCUSS` and `FIX`\n- pressing one shortcut key applies that comment immediately\n\nThis is designed for repetitive review patterns like:\n\n- explain this\n- why was this added?\n- why was this deleted?\n- what problem is this solving?\n- simplify this\n- add tests\n\nIf you want to refine the templated text after applying it, press `e` on that line.\n\n### Shortcut configuration\n\nOptional user-level config file:\n\n- `~/.pi/agent/extensions/slopchop.json`\n\nExample:\n\n```json\n{\n  \"version\": 1,\n  \"globalShortcut\": \"ctrl+alt+r\",\n  \"builtins\": {\n    \"disable\": [\"restore-deleted\"]\n  },\n  \"shortcuts\": [\n    {\n      \"id\": \"trace-added\",\n      \"key\": \"x\",\n      \"label\": \"trace\",\n      \"intent\": \"discuss\",\n      \"side\": \"added\",\n      \"text\": \"Explain how execution reaches this line.\"\n    }\n  ]\n}\n```\n\n#### Fields\n\n- `version` — schema version, currently `1`\n- `globalShortcut` — global Pi shortcut that opens the review UI, defaults to `alt+s`. Use Pi key identifiers such as `alt+s`, `ctrl+alt+r`, `shift+f5`, or `f5`. Single printable characters require a modifier, so normal typing stays in the editor. Bare special keys such as `f5`, `home`, and `pageUp` are supported. Escape is supported as `escape` or `esc` without modifiers. The shortcut is registered when the extension loads; restart Pi or run `/reload` after changing it. If the configured shortcut is invalid, slopchop uses `alt+s` and shows a config warning.\n- `builtins.disable` — built-in shortcut ids to turn off\n- `shortcuts` — your custom shortcuts\n\nEach shortcut has:\n\n- `id` — stable identifier\n- `key` — one-character trigger after opening template shortcut mode with `t`\n- `label` — short label shown in the UI\n- `intent` — `fix` or `discuss`\n- `side` — `added`, `deleted`, or `both`\n- `text` — the comment text to apply\n\n### Prompt generation\n\nWhen you submit, `/slopchop` builds a prompt that matches the kind of review you created.\n\nIt groups feedback naturally into sections like:\n\n- review-wide note\n- file comments\n- line comments\n\nand uses stricter instructions when `DISCUSS` items are present, so the model is less likely to turn explanatory comments into accidental edits.\n\n### What it is good at\n\n`/slopchop` is especially good when you want to:\n\n- pause after an agent turn and inspect the change carefully\n- ask for explanation without losing the exact line you are looking at\n- separate actionable change requests from discussion\n- review deleted lines, not just added ones\n- stay inside Pi instead of switching to a browser or external review tool\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobzolkos%2Fpi-slopchop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobzolkos%2Fpi-slopchop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobzolkos%2Fpi-slopchop/lists"}