Skip to content

Commit 591d2fd

Browse files
authored
Fix typos and improve documentation clarity (#275)
* Fixes typo * Removes duplicated docstring placement instruction * Update from user feedback
1 parent 383c9be commit 591d2fd

File tree

3 files changed

+11
-20
lines changed

3 files changed

+11
-20
lines changed

chatmodes/clojure-interactive-programming.chatmode.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ Before ANY file modification:
8181
#### Example: Bug Fix Workflow
8282

8383
```clojure
84-
(require '[namespace.with.issue :as issue])
85-
(require '[clojure.repl :refer [source]])
84+
(require '[namespace.with.issue :as issue] :reload)
85+
(require '[clojure.repl :refer [source]] :reload)
8686
;; 1. Examine the current implementation
8787
;; 2. Test current behavior
8888
(issue/problematic-function test-data)
@@ -99,16 +99,16 @@ Before ANY file modification:
9999

100100
```clojure
101101
;; 1. Run the failing test
102-
(require '[clojure.test :refer [test-vars]])
102+
(require '[clojure.test :refer [test-vars]] :reload)
103103
(test-vars [#'my.namespace-test/failing-test])
104104
;; 2. Extract test data from the test
105-
(require '[my.namespace-test :as test])
105+
(require '[my.namespace-test :as test] :reload)
106106
;; Look at the test source
107107
(source test/failing-test)
108108
;; 3. Create test data in REPL
109109
(def test-input {:id 123 :name \"test\"})
110110
;; 4. Run the function being tested
111-
(require '[my.namespace :as my])
111+
(require '[my.namespace :as my] :reload)
112112
(my/process-data test-input)
113113
;; => Unexpected result!
114114
;; 5. Debug step by step

instructions/clojure.instructions.md

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ applyTo: '**/*.{clj,cljs,cljc,bb,edn.mdx?}'
77

88
## Code Evaluation Tool usage
99

10+
“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.
11+
12+
- Always stay inside Calva's REPL instead of launching a second one from the terminal.
13+
- If there is no REPL connection, ask the user to connect the REPL instead of trying to start and connect it yourself.
14+
1015
### JSON Strings in REPL Tool Calls
1116
Do not over-escape JSON arguments when invoking REPL tools.
1217

@@ -189,21 +194,7 @@ Rich Comment Forms `(comment ...)` serve a different purpose than direct REPL ev
189194
- **Exploration preservation** - Keep useful REPL discoveries in the codebase
190195
- **Example scenarios** - Demonstrate edge cases and typical usage
191196

192-
### Docstrings in `defn`
193-
Docstrings belong immediately after the function name and before the argument vector.
194-
195-
```clojure
196-
(defn my-function
197-
"This function does something."
198-
[arg1 arg2]
199-
;; function body
200-
)
201-
```
202-
203-
- Define functions before they are used—prefer ordering over `declare` except when truly necessary.
204-
205197
### RCF Patterns
206-
207198
RCF = Rich Comment Forms.
208199

209200
When files are loaded code in RCFs is not evaluated, making them perfect for documenting example usage, since humans easily can evaluate the code in there at will.

prompts/remember-interactive-programming.prompt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: 'A micro-prompt that reminds the agent that it is an interactive pr
33
title: 'Interactive Programming Nudge'
44
---
55

6-
Remember that you are an interactive programmer with the system itself as your source of thruth. You use the REPL to explore the current system and to modify the current system in order to understand what changes need to be made.
6+
Remember that you are an interactive programmer with the system itself as your source of truth. You use the REPL to explore the current system and to modify the current system in order to understand what changes need to be made.
77

88
Remember that the human does not see what you evaluate with the tool:
99
* If you evaluate a large amount of code: describe in a succinct way what is being evaluated.

0 commit comments

Comments
 (0)