From e8482063ef4f8850d8c01536fb8587f2137917cb Mon Sep 17 00:00:00 2001 From: PEZ Date: Wed, 1 Oct 2025 23:00:32 +0200 Subject: [PATCH] Update from user feedback --- chatmodes/clojure-interactive-programming.chatmode.md | 10 +++++----- instructions/clojure.instructions.md | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/chatmodes/clojure-interactive-programming.chatmode.md b/chatmodes/clojure-interactive-programming.chatmode.md index 24d3867..dff9cc1 100644 --- a/chatmodes/clojure-interactive-programming.chatmode.md +++ b/chatmodes/clojure-interactive-programming.chatmode.md @@ -81,8 +81,8 @@ Before ANY file modification: #### Example: Bug Fix Workflow ```clojure -(require '[namespace.with.issue :as issue]) -(require '[clojure.repl :refer [source]]) +(require '[namespace.with.issue :as issue] :reload) +(require '[clojure.repl :refer [source]] :reload) ;; 1. Examine the current implementation ;; 2. Test current behavior (issue/problematic-function test-data) @@ -99,16 +99,16 @@ Before ANY file modification: ```clojure ;; 1. Run the failing test -(require '[clojure.test :refer [test-vars]]) +(require '[clojure.test :refer [test-vars]] :reload) (test-vars [#'my.namespace-test/failing-test]) ;; 2. Extract test data from the test -(require '[my.namespace-test :as test]) +(require '[my.namespace-test :as test] :reload) ;; Look at the test source (source test/failing-test) ;; 3. Create test data in REPL (def test-input {:id 123 :name \"test\"}) ;; 4. Run the function being tested -(require '[my.namespace :as my]) +(require '[my.namespace :as my] :reload) (my/process-data test-input) ;; => Unexpected result! ;; 5. Debug step by step diff --git a/instructions/clojure.instructions.md b/instructions/clojure.instructions.md index f9d7bb4..52cdb90 100644 --- a/instructions/clojure.instructions.md +++ b/instructions/clojure.instructions.md @@ -7,6 +7,11 @@ applyTo: '**/*.{clj,cljs,cljc,bb,edn.mdx?}' ## Code Evaluation Tool usage +“Use the repl” means to use the **Evaluate Clojure Code** tool from Calva Backseat Driver. It connects you to the the same REPL as the user is connected to via Calva. + +- Always stay inside Calva's REPL instead of launching a second one from the terminal. +- If there is no REPL connection, ask the user to connect the REPL instead of trying to start and connect it yourself. + ### JSON Strings in REPL Tool Calls Do not over-escape JSON arguments when invoking REPL tools.