feat(sbt): add SBT (Scala Build Tool) support#752
Open
randomBrainstormer wants to merge 1 commit intortk-ai:developfrom
Open
feat(sbt): add SBT (Scala Build Tool) support#752randomBrainstormer wants to merge 1 commit intortk-ai:developfrom
randomBrainstormer wants to merge 1 commit intortk-ai:developfrom
Conversation
Adds `rtk sbt` command with three subcommands:
- `rtk sbt test` — ScalaTest output filtering (90% token reduction):
compact single-line on pass, failure details on fail
- `rtk sbt compile` — Strips SBT noise, keeps errors (75% token reduction):
success summary with source count + time
- `rtk sbt run` — Light filtering, strips SBT preamble, keeps program output
- `rtk sbt <other>` — Passthrough for unsupported subcommands
Implementation follows the established go_cmd.rs pattern with lazy_static
regex, tee output recovery on failure, and exit code propagation for CI/CD.
Includes 3 real-output fixtures (pass, fail, compile error) and 11 unit tests
with token savings assertions. Discovery rules updated with 80% savings estimate.
Signed-off-by: Ivan Severino <4858703+randomBrainstormer@users.noreply.github.com>
fd6de19 to
f6c44ec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rtk sbt test— ScalaTest output filtering with 90% token reduction (compact single-line on pass, failure details on fail)rtk sbt compile— strips SBT noise, keeps errors with 75% token reduction (source count + time on success)rtk sbt run— light filtering, strips SBT preamble, passes through program outputrtk sbt <other>— passthrough for any unsupported subcommandImplementation
Follows the established
go_cmd.rspattern:lazy_static!regex for noise/summary/error line detectioncrate::tee::tee_and_hintfor full output recovery on failuresrc/discover/rules.rs) with 80% savings estimateTest plan
sbt_test_pass.txt,sbt_test_fail.txt,sbt_compile_error.txtcargo fmt --all --check— cleancargo clippy --all-targets— cleancargo test --all— 990 passed, 0 failedrtk sbt testin a real Scala project — pending, will validate on a Scala workspaceDocumentation
README.md— addedrtk sbtto build commands section and command rewrite tableCHANGELOG.md— added entry under[Unreleased]Signed-off-by: Ivan Severino 4858703+randomBrainstormer@users.noreply.github.com