Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
4d799b0
fix: remove all decorative emojis from CLI output (#687)
pszymkowiak Mar 18, 2026
56160d8
feat: OpenClaw plugin for transparent exec rewriting (#358)
aneym Mar 18, 2026
f16853a
feat: add Gemini CLI support via rtk init --gemini (#573)
ousamabenyounes Mar 18, 2026
7d04b48
feat(init): add Codex CLI support via AGENTS.md + RTK.md workflow (#…
Zacaria Mar 18, 2026
0800bbe
feat(copilot): add Copilot hook support (VS Code + CLI) (#605)
jeziellopes Mar 18, 2026
c3917e4
feat: add Cursor Agent support via --agent flag (#595)
moisei Mar 18, 2026
86d5069
feat: add Windsurf support via rtk init --agent windsurf (#695) (#697)
pszymkowiak Mar 18, 2026
d921cc4
feat: add Cline/Roo Code support via rtk init --agent cline (#701) (#…
pszymkowiak Mar 18, 2026
4020aa0
chore: merge master into develop (resolve emoji conflicts in Cursor s…
pszymkowiak Mar 18, 2026
5e1fc20
fix(skill/rtk-triage): increase PR/issue limit to 200 with pagination…
FlorianBruniaux Mar 19, 2026
3480ce5
fix(golangci-lint): add v2 compatibility with runtime version detection
apowis Mar 19, 2026
15bc0f8
feat(ruby): add Ruby on Rails support (rspec, rubocop, rake, bundle) …
navidemad Mar 19, 2026
4edc3fc
fix: increase signal in git diff, git log, and json filters (#621) (#…
pszymkowiak Mar 19, 2026
15d5beb
fix: preserve cargo test compile diagnostics
youbamj Mar 19, 2026
138e914
fix(ruby): use rails test for positional file args in rtk rake
Maimer Mar 19, 2026
53bc81e
fix(cicd): gete release like tag for pre-release
aeppling Mar 19, 2026
8657494
fix(cicd): missing doc
aeppling Mar 19, 2026
ec92c43
Merge pull request #741 from Maimer/pim_fix_rake_multiple_test_files
aeppling Mar 20, 2026
97b6878
Merge pull request #738 from youbamj/fix/cargo-test-compile-diagnostics
aeppling Mar 20, 2026
6aa5e90
fix(golangci): use resolved_command for version detection, move test …
apowis Mar 20, 2026
95a4961
Merge pull request #722 from apowis/fix/golangci-lint-v2-compatibility
aeppling Mar 20, 2026
200af43
Merge pull request #736 from rtk-ai/fix/issue-668/pre-release-tag
aeppling Mar 20, 2026
cadbb23
Fix trx injection for dotnet tests running with various Microsoft Tes…
danielmarbach Mar 20, 2026
f7b09fc
fix(formatter): show full error message for test failures (#690)
ousamabenyounes Mar 19, 2026
b4ccf04
fix(playwright): add tee_and_hint pass-through on failure (#690)
ousamabenyounes Mar 21, 2026
4a79e48
Add files via upload
aeppling Mar 21, 2026
da999c8
Update ci.yml
aeppling Mar 21, 2026
4b2179e
Update CONTRIBUTING.md
aeppling Mar 21, 2026
8eefef1
Merge pull request #746 from danielmarbach/dotnet-test
aeppling Mar 21, 2026
dff0d5a
Merge pull request #768 from rtk-ai/license-to-apache-2-0
aeppling Mar 21, 2026
fdeb09f
fix(gh): passthrough --comments flag in issue/pr view
mvanhorn Mar 21, 2026
dc6b026
Merge pull request #729 from ousamabenyounes/fix/test-failure-error-m…
aeppling Mar 21, 2026
75cd223
Merge pull request #775 from mvanhorn/osc/720-issue-pr-view-comments-…
aeppling Mar 21, 2026
1536667
fix(cicd): pre-release correct tag
aeppling Mar 21, 2026
3b94b60
fix(cicd): explicit fetch tag
aeppling Mar 21, 2026
4b52bfe
Merge pull request #778 from rtk-ai/cicd-wrong-prerelease-tag
aeppling Mar 21, 2026
2ef0690
fix(gh): skip compact_diff for --name-only/--stat flags in pr diff
mvanhorn Mar 21, 2026
0bb3eaf
Merge branch 'master' into develop
aeppling Mar 22, 2026
c576249
Merge pull request #773 from mvanhorn/osc/730-pr-diff-name-only-empty
aeppling Mar 22, 2026
af56573
fix: update Discord invite link (#711) (#786)
pszymkowiak Mar 23, 2026
0eecee5
fix: add telemetry documentation and init notice (#640) (#788)
pszymkowiak Mar 23, 2026
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
11 changes: 6 additions & 5 deletions .github/workflows/CICD.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,19 @@ Trigger: pull_request to develop or master

## Merge to develop — pre-release (cd.yml)

Trigger: push to develop | Concurrency: cancel-in-progress
Trigger: push to develop | workflow_dispatch (not master) | Concurrency: cancel-in-progress

```
┌──────────────────┐
│ push to develop │
│ OR dispatch │
└────────┬─────────┘
┌────────▼──────────────────┐
│ pre-release │
read Cargo.toml version │
tag = v{ver}-rc.{run}
safety: fail if exists
compute next version
from conventional commits
tag = v{next}-rc.{run}
└────────┬──────────────────┘
┌────────▼──────────────────┐
Expand All @@ -74,7 +75,7 @@ Trigger: push to develop | Concurrency: cancel-in-progress

## Merge to master — stable release (cd.yml)

Trigger: push to master | Concurrency: never cancelled
Trigger: push to master (only) | Concurrency: never cancelled

```
┌──────────────────┐
Expand Down
52 changes: 43 additions & 9 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CD

on:
workflow_dispatch:
push:
branches: [develop, master]

Expand All @@ -18,25 +19,59 @@ jobs:
# ═══════════════════════════════════════════════

pre-release:
if: github.ref == 'refs/heads/develop'
if: >-
github.ref == 'refs/heads/develop'
|| (github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/master')
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Compute pre-release tag
- name: Compute version from commits like release please
id: tag
run: |
VERSION=$(grep '^version = ' Cargo.toml | head -1 | cut -d'"' -f2)
TAG="v${VERSION}-rc.${{ github.run_number }}"
LATEST_TAG=$(git tag -l 'v[0-9]*.[0-9]*.[0-9]*' --sort=-version:refname | grep -v '-' | head -1)
if [ -z "$LATEST_TAG" ]; then
echo "::error::No stable release tag found"
exit 1
fi
LATEST_VERSION="${LATEST_TAG#v}"
echo "Latest release: $LATEST_TAG"

# ── Analyse conventional commits since that tag ──
COMMITS=$(git log "${LATEST_TAG}..HEAD" --format="%s")
HAS_BREAKING=$(echo "$COMMITS" | grep -cE '^[a-z]+(\(.+\))?!:' || true)
HAS_FEAT=$(echo "$COMMITS" | grep -cE '^feat(\(.+\))?:' || true)
HAS_FIX=$(echo "$COMMITS" | grep -cE '^fix(\(.+\))?:' || true)
echo "Commits since ${LATEST_TAG} — breaking=$HAS_BREAKING feat=$HAS_FEAT fix=$HAS_FIX"

# Safety: warn if this base version is already released
if git ls-remote --tags origin "refs/tags/v${VERSION}" | grep -q .; then
echo "::warning::v${VERSION} already released. Consider bumping Cargo.toml on develop."
# ── Compute next version (matches release-please observed behaviour) ──
# Pre-1.0 with bump-minor-pre-major: breaking → minor, feat → minor, fix → patch
IFS='.' read -r MAJOR MINOR PATCH <<< "$LATEST_VERSION"
if [ "$MAJOR" -eq 0 ]; then
if [ "$HAS_BREAKING" -gt 0 ] || [ "$HAS_FEAT" -gt 0 ]; then
MINOR=$((MINOR + 1)); PATCH=0 # breaking or feat → minor
else
PATCH=$((PATCH + 1)) # fix only → patch
fi
else
if [ "$HAS_BREAKING" -gt 0 ]; then
MAJOR=$((MAJOR + 1)); MINOR=0; PATCH=0 # breaking → major
elif [ "$HAS_FEAT" -gt 0 ]; then
MINOR=$((MINOR + 1)); PATCH=0 # feat → minor
else
PATCH=$((PATCH + 1)) # fix → patch
fi
fi
VERSION="${MAJOR}.${MINOR}.${PATCH}"
TAG="v${VERSION}-rc.${{ github.run_number }}"

echo "Next version: $VERSION (from $LATEST_VERSION)"
echo "Pre-release tag: $TAG"

# Safety: fail if this exact tag already exists
if git ls-remote --tags origin "refs/tags/${TAG}" | grep -q .; then
Expand All @@ -45,7 +80,6 @@ jobs:
fi

echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "Pre-release tag: $TAG"

build-prerelease:
name: Build pre-release
Expand All @@ -64,7 +98,7 @@ jobs:
# ═══════════════════════════════════════════════

release-please:
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,6 @@ jobs:
- name: Run benchmark
run: ./scripts/benchmark.sh

# ─── DCO: develop PRs only ───

check:
name: check
if: github.base_ref == 'develop'
runs-on: ubuntu-latest
steps:
- uses: KineticCafe/actions-dco@v1

# ─── AI Doc Review: develop PRs only ───

Expand Down
36 changes: 36 additions & 0 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@ PYTHON ruff_cmd.rs ruff check/format 80%+ ✓
GO go_cmd.rs go test/build/vet 75-90% ✓
golangci_cmd.rs golangci-lint 85% ✓

RUBY rake_cmd.rs rake/rails test 85-90% ✓
rspec_cmd.rs rspec 60%+ ✓
rubocop_cmd.rs rubocop 60%+ ✓

NETWORK wget_cmd.rs wget 85-95% ✓
curl_cmd.rs curl 70% ✓

Expand Down Expand Up @@ -303,6 +307,7 @@ SHARED utils.rs Helpers N/A ✓
- **JS/TS Tooling**: 8 modules (modern frontend/fullstack development)
- **Python Tooling**: 3 modules (ruff, pytest, pip)
- **Go Tooling**: 2 modules (go test/build/vet, golangci-lint)
- **Ruby Tooling**: 3 modules (rake/minitest, rspec, rubocop) + 1 TOML filter (bundle install)

---

Expand Down Expand Up @@ -605,6 +610,37 @@ pub fn run(command: &GoCommand, verbose: u8) -> Result<()> {
- Different output format (JSON API vs text)
- Distinct use case (comprehensive linting vs single-tool diagnostics)

### Ruby Module Architecture

**Added**: 2026-03-15
**Motivation**: Ruby on Rails development support (minitest, RSpec, RuboCop, Bundler)

Ruby modules follow the standalone command pattern (like Python) with a shared `ruby_exec()` utility for auto-detecting `bundle exec`.

```
Module Strategy Output Format Savings
─────────────────────────────────────────────────────────────────────────
rake_cmd.rs STATE MACHINE Text parser 85-90%
Minitest output (rake test / rails test)
→ State machine: Header → Running → Failures → Summary
→ All pass: "ok rake test: 8 runs, 0 failures"
→ Failures: summary + numbered failure details

rspec_cmd.rs JSON/TEXT DUAL JSON → 60%+ 60%+
Injects --format json, parses structured results
→ Fallback to text state machine when JSON unavailable
→ Strips Spring, SimpleCov, DEPRECATION, Capybara noise

rubocop_cmd.rs JSON PARSING JSON API 60%+
Injects --format json, groups by cop/severity
→ Skips JSON injection in autocorrect mode (-a, -A)

bundle-install.toml TOML FILTER Text rules 90%+
→ Strips "Using" lines, short-circuits to "ok bundle: complete"
```

**Shared**: `ruby_exec(tool)` in utils.rs auto-detects `bundle exec` when `Gemfile` exists. Used by rake_cmd, rspec_cmd, rubocop_cmd.

### Format Strategy Decision Tree

```
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ All notable changes to rtk (Rust Token Killer) will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Bug Fixes

* **ruby:** use `rails test` instead of `rake test` when positional file args are passed — `rake test` ignores positional files and only supports `TEST=path`

### Features

* **ruby:** add RSpec test runner filter with JSON parsing and text fallback (60%+ reduction)
* **ruby:** add RuboCop linter filter with JSON parsing, grouped by cop/severity (60%+ reduction)
* **ruby:** add Minitest filter for `rake test` / `rails test` with state machine parser (85-90% reduction)
* **ruby:** add TOML filter for `bundle install/update` — strip `Using` lines (90%+ reduction)
* **ruby:** add `ruby_exec()` shared utility for auto-detecting `bundle exec` when Gemfile exists
* **ruby:** add discover/rewrite rules for rake, rails, rspec, rubocop, and bundle commands

### Bug Fixes

* **cargo:** preserve compile diagnostics when `cargo test` fails before any test suites run
## [0.31.0](https://github.com/rtk-ai/rtk/compare/v0.30.1...v0.31.0) (2026-03-19)


Expand Down
14 changes: 13 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,11 @@ rtk gain --history | grep proxy
| pip_cmd.rs | pip/uv package manager | JSON parsing, auto-detect uv (70-85% reduction) |
| go_cmd.rs | Go commands | NDJSON for test, text for build/vet (80-90% reduction) |
| golangci_cmd.rs | golangci-lint | JSON parsing, group by rule (85% reduction) |
| rake_cmd.rs | Minitest via rake/rails test | State machine text parser, failures only (85-90% reduction) |
| rspec_cmd.rs | RSpec test runner | JSON injection + text fallback, failures only (60%+ reduction) |
| rubocop_cmd.rs | RuboCop linter | JSON injection, group by cop/severity (60%+ reduction) |
| tee.rs | Full output recovery | Save raw output to file on failure, print hint for LLM re-read |
| utils.rs | Shared utilities | Package manager detection, common formatting |
| utils.rs | Shared utilities | Package manager detection, ruby_exec, common formatting |
| discover/ | Claude Code history analysis | Scan JSONL sessions, classify commands, report missed savings |

## Performance Constraints
Expand Down Expand Up @@ -392,6 +395,15 @@ pub fn execute_with_filter(cmd: &str, args: &[&str]) -> Result<()> {
- **Architecture**: Standalone Python commands (mirror lint/prettier), Go sub-enum (mirror git/cargo)
- **Patterns**: JSON for structured output (ruff check, golangci-lint, pip), NDJSON streaming (go test), text state machine (pytest), text filters (go build/vet, ruff format)

### Ruby on Rails Support (2026-03-15)
- **Ruby Commands**: 3 modules for Ruby/Rails development
- `rtk rspec`: RSpec test runner with JSON injection (`--format json`), text fallback (60%+ reduction)
- `rtk rubocop`: RuboCop linter with JSON injection, group by cop/severity (60%+ reduction)
- `rtk rake test`: Minitest filter via rake/rails test, state machine parser (85-90% reduction)
- **TOML Filter**: `bundle-install.toml` for bundle install/update — strips `Using` lines (90%+ reduction)
- **Shared Infrastructure**: `ruby_exec()` in utils.rs auto-detects `bundle exec` when Gemfile exists
- **Hook Integration**: Rewrites `rspec`, `rubocop`, `rake test`, `rails test`, `bundle exec` variants

## Testing Strategy

### TDD Workflow (mandatory)
Expand Down
13 changes: 7 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,16 @@ Every change **must** include tests. See [Testing](#testing) below.

Every change **must** include documentation updates. See [Documentation](#documentation) below.

### Developer Certificate of Origin (DCO)
### Contributor License Agreement (CLA)

All contributions must be signed off (git commit -s) to certify
you have the right to submit the code under the project's license.
All contributions require signing our [Contributor License Agreement (CLA)](CLA.md) before being merged.

Expected format: Signed-off-by: Your Name your@email.com
https://developercertificate.org/
By signing, you certify that:
- You have authored 100% of the contribution, or have the necessary rights to submit it.
- You grant **rtk-ai** and **rtk-ai Labs** a perpetual, worldwide, royalty-free license to use your contribution — including in commercial products such as **rtk Pro** — under the [Apache License 2.0](LICENSE).
- If your employer has rights over your work, you have obtained their permission.

By signing off, you agree to the DCO.
**This is automatic.** When you open a Pull Request, [CLA Assistant](https://cla-assistant.io) will post a comment asking you to sign. Click the link in that comment to sign with your GitHub account. You only need to sign once.

### 5. Merge into `develop`

Expand Down
Loading
Loading