mirror of
https://github.com/rtk-ai/rtk.git
synced 2026-09-19 07:33:17 +08:00
d5f8a94604
## Discover Registry Fixes
- Add `check` to cargo pattern (registry.rs:52)
- Add `("check", 80.0)` savings to cargo rule
- Wire `RtkStatus::Passthrough` for `cargo fmt` (0% savings, passthrough mode)
- Add `status: RtkStatus` field to `Classification::Supported`
- Extract status from subcommand rules in classify_command()
- Fix UTF-8 truncation bug in report.rs truncate_str() (panic on multi-byte chars)
## Tests (7 new)
- test_classify_cargo_check()
- test_classify_cargo_check_all_targets()
- test_classify_cargo_fmt_passthrough() → status = Passthrough
- test_classify_cargo_clippy_savings()
- test_patterns_rules_length_match() → assert PATTERNS.len() == RULES.len()
- test_registry_covers_all_cargo_subcommands() → coupling test
- test_registry_covers_all_git_subcommands() → coupling test
## RTK Init Rewrite
- Rewrite template in English with 32+ commands grouped by workflow
- Add version marker `<!-- rtk-instructions v2 -->` for idempotency
- Fix idempotency detection: use marker instead of French text
- Add tests:
- test_init_mentions_all_top_level_commands() → 15 key commands
- test_init_has_version_marker()
## Documentation
- CLAUDE.md: dual format (raw + rtk) for all dev commands
- CLAUDE.md: pre-commit gate uses rtk
- ~/.claude/CLAUDE.md: add Cargo section (80-90% savings)
## Verification
✅ 229 tests pass (7 new)
✅ 88 smoke tests pass
✅ cargo fmt + clippy clean
✅ All coupling tests enforce registry/Commands alignment
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>