From 1550dac942518a78b098aed9312feb67ec772254 Mon Sep 17 00:00:00 2001 From: Christoph Schmatzler Date: Wed, 17 Dec 2025 15:56:20 +0000 Subject: [PATCH] deslop --- profiles/neovim/plugins/jj-diffconflicts.nix | 17 +++++++++-------- profiles/opencode.nix | 19 +++++++++++++++++++ 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/profiles/neovim/plugins/jj-diffconflicts.nix b/profiles/neovim/plugins/jj-diffconflicts.nix index 688eba8..70175e4 100644 --- a/profiles/neovim/plugins/jj-diffconflicts.nix +++ b/profiles/neovim/plugins/jj-diffconflicts.nix @@ -1,13 +1,14 @@ {pkgs, ...}: { programs.nixvim.extraPlugins = [ (pkgs.vimUtils.buildVimPlugin { - name = "jj-diffconflicts"; - src = pkgs.fetchFromGitHub { - owner = "rafikdraoui"; - repo = "jj-diffconflicts"; - rev = "main"; - hash = "sha256-FXsLSYy+eli8VArUL8ZOiPtyOk4Q8TUYwobEefZPRII="; - }; - }) + name = "jj-diffconflicts"; + src = + pkgs.fetchFromGitHub { + owner = "rafikdraoui"; + repo = "jj-diffconflicts"; + rev = "main"; + hash = "sha256-FXsLSYy+eli8VArUL8ZOiPtyOk4Q8TUYwobEefZPRII="; + }; + }) ]; } diff --git a/profiles/opencode.nix b/profiles/opencode.nix index 26a9ec5..e5696fa 100644 --- a/profiles/opencode.nix +++ b/profiles/opencode.nix @@ -18,6 +18,25 @@ disabled = true; }; }; + command = { + deslop = { + description = "Remove AI code slop"; + template = '' + Check the diff against main/master, and remove all AI generated slop introduced in this branch. + Use jj if available, otherwise git. + + This includes: + + - Extra comments that a human wouldn't add or is inconsistent with the rest of the file + - Extra defensive checks or try/catch blocks that are abnormal for that area of the codebase (especially if called by trusted / validated codepaths) + - Casts to any to get around type issues + - Any other style that is inconsistent with the file + - Unnecessary emoji usage + + Report at the end with only a 1-3 sentence summary of what you changed + ''; + }; + }; }; }; home.sessionVariables = {