Skip to content

Commit 2a2f510

Browse files
IMNMVclaude
andcommitted
README: document editor tools and suggest_edit accurately
Bump the release entry to clauder-mcp 0.14.4. Drop the unverified claim that showEditSuggestion() arrives in RStudio 2026.01.0; the tool checks the installed rstudioapi at runtime, so describe it that way. Refresh the feature list entries for get_active_document, modify_code_section and insert_text, which still described the pre-fix behaviour, and add the missing suggest_edit entry. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 87e086a commit 2a2f510

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ claudeAddin()
5050
<details>
5151
<summary><b>Recent Updates</b> (click to expand)</summary>
5252

53-
- **Editor tools fixed, plus approve-before-apply edits (R 0.12.5 / clauder-mcp 0.14.3).** From two user reports. `modify_code_section` and `insert_text` now save to disk by default and report `saved_to_disk`, so an agent no longer believes it wrote a file when the change sat unsaved in the buffer. Bounded replacements may change the line count (the old equality constraint is gone). Both tools accept a `path` to target a specific file, open and focus it, and refuse to edit a different document instead of failing silently. `get_active_document` now reports the path, the document id, and whether the buffer differs from disk, so buffer state and file state stop being confused for each other. New `suggest_edit` tool: the agent proposes a change and waits for the user to approve it, using `rstudioapi::showEditSuggestion()` on RStudio 2026.01.0 and newer, and otherwise staging the edit unsaved so the user accepts by saving or rejects with undo.
53+
- **Editor tools fixed, plus approve-before-apply edits (R 0.12.5 / clauder-mcp 0.14.4).** From two user reports. `modify_code_section` and `insert_text` now save to disk by default and report `saved_to_disk`, so an agent no longer believes it wrote a file when the change sat unsaved in the buffer. Bounded replacements may change the line count (the old equality constraint is gone). Both tools accept a `path` to target a specific file, open and focus it, and refuse to edit a different document instead of failing silently. `get_active_document` now reports the path, the document id, and whether the buffer differs from disk, so buffer state and file state stop being confused for each other. New `suggest_edit` tool: the agent proposes a change and waits for the user to approve it, using `rstudioapi::showEditSuggestion()` when the installed rstudioapi provides it, and otherwise staging the edit unsaved so the user accepts by saving or rejects with undo.
5454

5555
- **Reviewer Zero now reasons, not just reconciles (R 0.12.4).** Added a mandatory Pass 5 (content reasoning) to the base auditing protocol. The deterministic tools (reconcile_values, verify_references, check_cross_references, probe_scripts) find numeric, reference, cross-reference, and code defects, but they do not reason about meaning, and a manuscript can clear every one of them and still be wrong. Pass 5 is a gated, equal-weight pass with eight checks the tools cannot do: instrument and source attribution, whether each reported test is computable from the data that exists, whether each cited figure or table actually contains the claimed evidence, magnitude wording, convergence across studies, causal and generality framing, data existence for descriptive claims, and supplement and appendix integration (every supplement cited, and no body claim resting on an uncited one). In a controlled benchmark on a synthetic manuscript with a known defect set, this raised detection from below a native-tools baseline (16.8 of 24) to clearly above it (21.3 of 24), recovering exactly the reasoning defects the old tool-led protocol was missing, with no rise in false positives.
5656

@@ -144,10 +144,11 @@ ClaudeR empowers your AI assistant with a suite of tools to interact with your R
144144
- **`check_cross_references`**: Deterministic internal-reference integrity: flags dangling mentions ("see Table 4" with no Table 4) and tables/figures never referenced in the text.
145145
- **`annotate_manuscript`** (R function, used by the audit protocols): writes findings into a copy of a `.docx` as native, anchored Word comments, so authors can accept/dismiss the audit inside Word.
146146
- **`reconcile_values`**: The audit backbone. Extracts every numeric value from a manuscript and reconciles each against the numbers your code actually produced (logs, outputs, tables), respecting displayed precision, commas, percents, scientific notation, and `< .001` thresholds. Returns a per-value registry so nothing can be silently skipped.
147-
- **`get_active_document`**: Get the content of the active document in RStudio.
147+
- **`get_active_document`**: Read the focused editor buffer. Returns the content, the file path, and whether the buffer has unsaved changes, so buffer state and disk state are never confused.
148148
- **`get_r_info`**: Get information about the R environment.
149-
- **`modify_code_section`**: Modify a specific section of code in the active document.
150-
- **`insert_text`**: Insert text at the current cursor position or a specific line/column in the active document.
149+
- **`modify_code_section`**: Regex find-and-replace in an editor document. Handles multi-line patterns, allows the replacement to change the line count, preserves literal backslashes, saves to disk by default, and accepts a `path` to target a specific file.
150+
- **`insert_text`**: Insert text at the cursor or a specific line/column. Saves to disk by default; accepts a `path` to target a specific file.
151+
- **`suggest_edit`**: Propose an edit for the user to approve instead of applying it. Uses `rstudioapi::showEditSuggestion()` when available, otherwise stages the change in the editor unsaved so the user accepts by saving or rejects with undo.
151152
- **`get_viewer_content`**: Read HTML content from the viewer pane (plotly, DT, leaflet widgets) with pagination support.
152153
- **`clean_error_log`**: Clean a session log by removing error blocks and their duplicate predecessors, leaving only working code and the fixes that followed.
153154
- **`search_project_code`**: Search for a regex pattern across project source files (.R, .Rmd, .qmd). Returns file, line number, and snippet.

0 commit comments

Comments
 (0)