Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,65 @@ Work paragraph by paragraph, always starting by making a TODO list that includes
Fix spelling, grammar, and other minor problems without asking the user. Label any unclear, confusing, or ambiguous sentences with a FIXME comment.

Only report what you have changed.


## Release process

### 1. Update local R packages
Before starting, make sure all local packages are up to date to avoid masking
failures that will show up in CI:
```r
update.packages(ask = FALSE)
```

### 2. Run local tests and R CMD check
Confirm the package is in a green state before making any release changes:
```r
devtools::test()
devtools::check()
```
`devtools::test()` gives faster feedback on failures. `devtools::check()` must
be `0 errors | 0 warnings | 0 notes` before submitting to CRAN.

### 3. Update version in DESCRIPTION

Remove the dev version number, bump the remaining number, usually by the minor
version, unless there are a lot of significant changes

### 4. Submit to win-builder
```r
devtools::check_win_devel()
```
Address any new NOTEs/WARNINGs.

### 5. Prepare cran-comments.md

Populate the three sections using:

- **R CMD checks on GitHub**: `cranjobs::github_action_run("R-CMD-check.yaml")`
- **R CMD check results**: from `devtools::check()` above

Template:
```markdown
## Submission

- <bullet points matching NEWS.md entries for this release>

## R CMD checks on GitHub

- <output of cranjobs::github_action_run()>

## R CMD check results

0 errors ✔ | 0 warnings ✔ | 0 notes ✔
```

### 6. Submit to CRAN
```r
devtools::submit_cran()
```

## Common issues to watch for

- **Undocumented exported functions**: add a roxygen title + `@keywords internal` to stub methods
- **Broken URLs in docs**: R CMD check on win-builder validates URLs; fix dead links before submission
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: lang
Title: Translates R Help Documentation using Large Language Models
Version: 0.1.1.9000
Version: 0.1.2
Authors@R: c(
person("Edgar", "Ruiz", , "edgar@posit.co", role = c("aut", "cre")),
person("Posit Software, PBC", role = c("cph", "fnd"),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# lang 0.1.1.9000
# lang 0.1.2

## Bug fixes

Expand Down
49 changes: 35 additions & 14 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,45 @@
## Resubmission
## Submission

- Replaced `\donttest{}` examples with `\dontrun{}` and added comments
explaining they require an interactive session with a local LLM provider.
This implements the suggestion by Uwe Ligges.
We recognize this resubmission comes sooner than the usual one-month waiting
period following our previous release (0.1.1). We are submitting early because
the bug fixed in this version is user-visible and significant enough that it
has a high probability of discouraging adoption of the package.

- This is a new package
The issue stems from an inherent unpredictability in local LLMs: when the
context summary injected into the translation prompt is much longer than the
field being translated, some local models paraphrase the context rather than
translate the input. For short fields (10 words or fewer) this happened
consistently, producing output that was clearly wrong and immediately apparent
to users. There was no workaround available to users short of disabling context
summaries entirely, a feature that was the main addition in 0.1.1.

- Description: Use an 'LLM' to translate a function's help documentation on the fly.
It overrides the `?` and `help()` functions in your R session. If you are
using 'RStudio' or 'Positron', the translated help page will appear in the usual
'Help' pane.
We are aware that the win-builder check flags a NOTE for "Days since last
update: 5", which is a direct consequence of this early resubmission and the
very reason for this explanatory note. We apologize for the rapid turnaround
and appreciate CRAN's consideration.

### Bug fixes

- When the input is 10 words or fewer, the context summary is now omitted from
the translation prompt. Local LLMs can get confused by a context summary that
is much longer than the field being translated, causing them to paraphrase
the context instead of translating the input.

## R CMD checks on GitHub

- Ubuntu 24.04.3 LTS (x86_64, linux-gnu), R version 4.5.1 (2025-06-13)
- Ubuntu 24.04.3 LTS (x86_64, linux-gnu), R version 4.4.3 (2025-02-28)
- Ubuntu 24.04.3 LTS (x86_64, linux-gnu), R Under development (unstable) (2025-10-18 r88943)
- macOS Sequoia 15.6.1 (aarch64, darwin20), R version 4.5.1 (2025-06-13)
- Windows Server 2022 x64 (build 26100) (x86_64, mingw32), R version 4.5.1 (2025-06-13 ucrt)
- Windows Server x64 (build 26100) (x86_64, mingw32), R version 4.2.3 (2023-03-15 ucrt)
- Ubuntu 24.04.4 LTS (x86_64, linux-gnu), R Under development (unstable) (2026-06-06 r90114)
- Windows Server 2022 x64 (build 26100) (x86_64, mingw32), R version 4.6.0 (2026-04-24 ucrt)
- Ubuntu 24.04.4 LTS (x86_64, linux-gnu), R version 4.5.3 (2026-03-11)
- macOS Sequoia 15.7.7 (aarch64, darwin23), R version 4.6.0 (2026-04-24)
- Ubuntu 24.04.4 LTS (x86_64, linux-gnu), R version 4.6.0 (2026-04-24)

## R CMD check results

### Local

0 errors ✔ | 0 warnings ✔ | 0 notes ✔

### win-builder

0 errors ✔ | 0 warnings ✔ | 1 note ✖ (Days since last update: 5 — addressed in submission note above)
Loading