* refactor(tdd-bdd): extract horizontal-slicing anti-pattern into anti-patterns.md * refactor(jj-atomic): extract anti-patterns into anti-patterns.md; trim See also list * refactor(dev-r): split SKILL.md into package-loop.md and analysis-loop.md siblings * fix(dev-python): repair CLAUDE.md URL mismatch and tdd-bdd self-referential link * docs(dev-python): rewrite phase 4 to forbid horizontal slicing; inline Karpathy summary * docs(dev-r): inline Karpathy guardrails summary in phase 0
51 lines
1.1 KiB
Markdown
51 lines
1.1 KiB
Markdown
# dev-r — R-package loop
|
|
|
|
Detected by the presence of `DESCRIPTION` at the repo root. Apply
|
|
[`../r-style/SKILL.md`](../r-style/SKILL.md) at every implementation step.
|
|
|
|
## 1. Implement
|
|
|
|
- Code in `R/`, following [`/r-style`](../r-style/SKILL.md) (box, native
|
|
pipe, `\(x)`, snake_case).
|
|
- Add/update roxygen2 docs on every exported function.
|
|
|
|
## 2. Document
|
|
|
|
```bash
|
|
just document # devtools::document()
|
|
```
|
|
|
|
Fix all roxygen2 warnings.
|
|
|
|
## 3. Lint & style
|
|
|
|
```bash
|
|
just lint # lintr
|
|
just style-check # styler dry run
|
|
# if style-check fails:
|
|
just style
|
|
```
|
|
|
|
## 4. Test (TDD-BDD)
|
|
|
|
Hand to [`/tdd-bdd`](../tdd-bdd/SKILL.md), which loops red→green→refactor
|
|
**one scenario at a time** — never write all the tests upfront (see
|
|
[`../tdd-bdd/anti-patterns.md`](../tdd-bdd/anti-patterns.md)). Test
|
|
prologue follows [`../tdd-bdd/tests-r.md`](../tdd-bdd/tests-r.md). Run:
|
|
|
|
```bash
|
|
just test # devtools::test()
|
|
```
|
|
|
|
## 5. Full check
|
|
|
|
```bash
|
|
just check # devtools::check()
|
|
```
|
|
|
|
All notes, warnings, and errors resolved before commit.
|
|
|
|
## 6. Commit
|
|
|
|
Hand to [`/jj-atomic`](../../productivity/jj-atomic/SKILL.md).
|