fix(docs): clean some docs + disclaimer
This commit is contained in:
@@ -52,7 +52,7 @@ PRs target the **`develop`** branch, not `main`. All commits require a DCO sign-
|
||||
|
||||
rtk routes CLI commands via a Clap `Commands` enum in `main.rs` to specialized filter modules in `src/cmds/*/`, each executing the underlying command and compressing output. Token savings are tracked in SQLite via `src/core/tracking.rs`.
|
||||
|
||||
For full details see [ARCHITECTURE.md](../ARCHITECTURE.md) and [docs/TECHNICAL.md](../docs/TECHNICAL.md). Module responsibilities are documented in each folder's `README.md` and each file's `//!` doc header.
|
||||
For full details see [ARCHITECTURE.md](../docs/contributing/ARCHITECTURE.md) and [docs/contributing/TECHNICAL.md](../docs/contributing/TECHNICAL.md). Module responsibilities are documented in each folder's `README.md` and each file's `//!` doc header.
|
||||
|
||||
## Key Conventions
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@ cargo generate-rpm # RPM package (needs cargo-generate-rpm, after rel
|
||||
rtk uses a **command proxy architecture**: `main.rs` routes CLI commands via a Clap `Commands` enum to specialized filter modules in `src/cmds/*/`, each of which executes the underlying command and compresses its output. Token savings are tracked in SQLite via `src/core/tracking.rs`.
|
||||
|
||||
For the full architecture, component details, and module development patterns, see:
|
||||
- [ARCHITECTURE.md](ARCHITECTURE.md) — System design, module organization, filtering strategies, error handling
|
||||
- [docs/TECHNICAL.md](docs/TECHNICAL.md) — End-to-end flow, folder map, hook system, filter pipeline
|
||||
- [ARCHITECTURE.md](docs/contributing/ARCHITECTURE.md) — System design, module organization, filtering strategies, error handling
|
||||
- [docs/contributing/TECHNICAL.md](docs/contributing/TECHNICAL.md) — End-to-end flow, folder map, hook system, filter pipeline
|
||||
|
||||
Module responsibilities are documented in each folder's `README.md` and each file's `//!` doc header. Browse `src/cmds/*/` to discover available filters.
|
||||
|
||||
|
||||
+5
-5
@@ -7,7 +7,7 @@
|
||||
- [Report an Issue](../../issues/new)
|
||||
- [Open Pull Requests](../../pulls)
|
||||
- [Start a Discussion](../../discussions)
|
||||
- [Technical Documentation](docs/TECHNICAL.md) — Architecture, end-to-end flow, folder map, how to write tests
|
||||
- [Technical Documentation](docs/contributing/TECHNICAL.md) — Architecture, end-to-end flow, folder map, how to write tests
|
||||
|
||||
---
|
||||
|
||||
@@ -203,7 +203,7 @@ your branch --> develop (review + CI + integration testing) --> version branch -
|
||||
|
||||
Every change **must** include tests. We follow **TDD (Red-Green-Refactor)**: write a failing test first, implement the minimum to pass, then refactor.
|
||||
|
||||
For how to write tests (fixtures, snapshots, token savings verification), see [docs/TECHNICAL.md — Testing](docs/TECHNICAL.md#testing).
|
||||
For how to write tests (fixtures, snapshots, token savings verification), see [docs/contributing/TECHNICAL.md — Testing](docs/contributing/TECHNICAL.md#testing).
|
||||
|
||||
### Test Types
|
||||
|
||||
@@ -242,12 +242,12 @@ Every change **must** include documentation updates. Use this table to find whic
|
||||
| New Rust filter (`src/cmds/`) | Ecosystem `README.md` (e.g., `src/cmds/git/README.md`), [README.md](README.md) command list, [CHANGELOG.md](CHANGELOG.md) |
|
||||
| New TOML filter (`src/filters/`) | [src/filters/README.md](src/filters/README.md) if naming conventions change, [README.md](README.md) command list, [CHANGELOG.md](CHANGELOG.md) |
|
||||
| New rewrite pattern | `src/discover/rules.rs` — see [Adding a New Command Filter](src/cmds/README.md#adding-a-new-command-filter) |
|
||||
| Core infrastructure (`src/core/`) | [src/core/README.md](src/core/README.md), [docs/TECHNICAL.md](docs/TECHNICAL.md) if flow changes |
|
||||
| Core infrastructure (`src/core/`) | [src/core/README.md](src/core/README.md), [docs/contributing/TECHNICAL.md](docs/contributing/TECHNICAL.md) if flow changes |
|
||||
| Hook system (`src/hooks/`) | [src/hooks/README.md](src/hooks/README.md), [hooks/README.md](hooks/README.md) for agent-facing docs |
|
||||
| Architecture or design change | [ARCHITECTURE.md](ARCHITECTURE.md), [docs/TECHNICAL.md](docs/TECHNICAL.md) |
|
||||
| Architecture or design change | [ARCHITECTURE.md](docs/contributing/ARCHITECTURE.md), [docs/contributing/TECHNICAL.md](docs/contributing/TECHNICAL.md) |
|
||||
| Bug fix or breaking change | [CHANGELOG.md](CHANGELOG.md) |
|
||||
|
||||
**Navigation**: [CONTRIBUTING.md](CONTRIBUTING.md) (you are here) → [docs/TECHNICAL.md](docs/TECHNICAL.md) (architecture + flow) → each folder's `README.md` (implementation details).
|
||||
**Navigation**: [CONTRIBUTING.md](CONTRIBUTING.md) (you are here) → [docs/contributing/TECHNICAL.md](docs/contributing/TECHNICAL.md) (architecture + flow) → each folder's `README.md` (implementation details).
|
||||
|
||||
Keep documentation concise and practical -- examples over explanations.
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# Disclaimer
|
||||
|
||||
## No Warranty
|
||||
|
||||
This software is provided "AS IS", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. The entire risk as to the quality and performance of the software is with you.
|
||||
|
||||
## Limitation of Liability
|
||||
|
||||
In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software. This includes, without limitation, any direct, indirect, incidental, special, exemplary, or consequential damages (including but not limited to loss of data, loss of profits, or business interruption).
|
||||
|
||||
## Precompiled Binaries
|
||||
|
||||
Precompiled binaries are provided solely for convenience and are covered by the same license as the source code (Apache License 2.0). They are provided without warranties or conditions of any kind. You are responsible for verifying the integrity and suitability of any binary before use. Always verify checksums when available.
|
||||
|
||||
## Third-Party Dependencies
|
||||
|
||||
This software incorporates third-party open-source components, each governed by their respective licenses. The authors make no representations or warranties regarding these dependencies and accept no liability for any issues arising from their use.
|
||||
|
||||
## Use at Your Own Risk
|
||||
|
||||
This software interacts with your development environment, file system, and external commands. It is your responsibility to ensure that its use is appropriate for your environment and complies with any applicable policies, regulations, or agreements. The authors are not responsible for any unintended side effects resulting from its use.
|
||||
|
||||
## Telemetry
|
||||
|
||||
This software collects anonymous, aggregate usage metrics by default and can be disabled at any time. No personally identifiable information, source code, file paths, command arguments, or secrets are collected. See the README for full details and opt-out instructions.
|
||||
|
||||
---
|
||||
|
||||
See [LICENSE](LICENSE) for the full terms of the Apache License 2.0 under which this software is distributed.
|
||||
@@ -18,7 +18,7 @@
|
||||
<a href="https://www.rtk-ai.app">Website</a> •
|
||||
<a href="#installation">Install</a> •
|
||||
<a href="docs/TROUBLESHOOTING.md">Troubleshooting</a> •
|
||||
<a href="ARCHITECTURE.md">Architecture</a> •
|
||||
<a href="docs/contributing/ARCHITECTURE.md">Architecture</a> •
|
||||
<a href="https://discord.gg/RySmvNF5kF">Discord</a>
|
||||
</p>
|
||||
|
||||
@@ -466,7 +466,7 @@ brew uninstall rtk # If installed via Homebrew
|
||||
|
||||
- **[TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md)** - Fix common issues
|
||||
- **[INSTALL.md](INSTALL.md)** - Detailed installation guide
|
||||
- **[ARCHITECTURE.md](ARCHITECTURE.md)** - Technical architecture
|
||||
- **[ARCHITECTURE.md](docs/contributing/ARCHITECTURE.md)** - Technical architecture
|
||||
- **[SECURITY.md](SECURITY.md)** - Security policy and PR review process
|
||||
- **[AUDIT_GUIDE.md](docs/AUDIT_GUIDE.md)** - Token savings analytics guide
|
||||
|
||||
@@ -501,3 +501,7 @@ Join the community on [Discord](https://discord.gg/RySmvNF5kF).
|
||||
## License
|
||||
|
||||
MIT License - see [LICENSE](LICENSE) for details.
|
||||
|
||||
## Disclaimer
|
||||
|
||||
See [DISCLAIMER.md](DISCLAIMER.md).
|
||||
|
||||
+6
-2
@@ -18,7 +18,7 @@
|
||||
<a href="https://www.rtk-ai.app">Sitio web</a> •
|
||||
<a href="#instalacion">Instalar</a> •
|
||||
<a href="docs/TROUBLESHOOTING.md">Solucion de problemas</a> •
|
||||
<a href="ARCHITECTURE.md">Arquitectura</a> •
|
||||
<a href="docs/contributing/ARCHITECTURE.md">Arquitectura</a> •
|
||||
<a href="https://discord.gg/RySmvNF5kF">Discord</a>
|
||||
</p>
|
||||
|
||||
@@ -146,7 +146,7 @@ rtk discover # Descubrir ahorros perdidos
|
||||
|
||||
- **[TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md)** - Resolver problemas comunes
|
||||
- **[INSTALL.md](INSTALL.md)** - Guia de instalacion detallada
|
||||
- **[ARCHITECTURE.md](ARCHITECTURE.md)** - Arquitectura tecnica
|
||||
- **[ARCHITECTURE.md](docs/contributing/ARCHITECTURE.md)** - Arquitectura tecnica
|
||||
|
||||
## Contribuir
|
||||
|
||||
@@ -157,3 +157,7 @@ Unete a la comunidad en [Discord](https://discord.gg/RySmvNF5kF).
|
||||
## Licencia
|
||||
|
||||
Licencia MIT - ver [LICENSE](LICENSE) para detalles.
|
||||
|
||||
## Descargo de responsabilidad
|
||||
|
||||
Ver [DISCLAIMER.md](DISCLAIMER.md).
|
||||
|
||||
+6
-2
@@ -18,7 +18,7 @@
|
||||
<a href="https://www.rtk-ai.app">Site web</a> •
|
||||
<a href="#installation">Installer</a> •
|
||||
<a href="docs/TROUBLESHOOTING.md">Depannage</a> •
|
||||
<a href="ARCHITECTURE.md">Architecture</a> •
|
||||
<a href="docs/contributing/ARCHITECTURE.md">Architecture</a> •
|
||||
<a href="https://discord.gg/RySmvNF5kF">Discord</a>
|
||||
</p>
|
||||
|
||||
@@ -184,7 +184,7 @@ mode = "failures"
|
||||
|
||||
- **[TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md)** - Resoudre les problemes courants
|
||||
- **[INSTALL.md](INSTALL.md)** - Guide d'installation detaille
|
||||
- **[ARCHITECTURE.md](ARCHITECTURE.md)** - Architecture technique
|
||||
- **[ARCHITECTURE.md](docs/contributing/ARCHITECTURE.md)** - Architecture technique
|
||||
|
||||
## Contribuer
|
||||
|
||||
@@ -195,3 +195,7 @@ Rejoignez la communaute sur [Discord](https://discord.gg/RySmvNF5kF).
|
||||
## Licence
|
||||
|
||||
Licence MIT - voir [LICENSE](LICENSE) pour les details.
|
||||
|
||||
## Avertissement
|
||||
|
||||
Voir [DISCLAIMER.md](DISCLAIMER.md).
|
||||
|
||||
+6
-2
@@ -18,7 +18,7 @@
|
||||
<a href="https://www.rtk-ai.app">ウェブサイト</a> •
|
||||
<a href="#インストール">インストール</a> •
|
||||
<a href="docs/TROUBLESHOOTING.md">トラブルシューティング</a> •
|
||||
<a href="ARCHITECTURE.md">アーキテクチャ</a> •
|
||||
<a href="docs/contributing/ARCHITECTURE.md">アーキテクチャ</a> •
|
||||
<a href="https://discord.gg/RySmvNF5kF">Discord</a>
|
||||
</p>
|
||||
|
||||
@@ -146,7 +146,7 @@ rtk discover # 見逃した節約機会を発見
|
||||
|
||||
- **[TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md)** - よくある問題の解決
|
||||
- **[INSTALL.md](INSTALL.md)** - 詳細インストールガイド
|
||||
- **[ARCHITECTURE.md](ARCHITECTURE.md)** - 技術アーキテクチャ
|
||||
- **[ARCHITECTURE.md](docs/contributing/ARCHITECTURE.md)** - 技術アーキテクチャ
|
||||
|
||||
## コントリビュート
|
||||
|
||||
@@ -157,3 +157,7 @@ rtk discover # 見逃した節約機会を発見
|
||||
## ライセンス
|
||||
|
||||
MIT ライセンス - 詳細は [LICENSE](LICENSE) を参照。
|
||||
|
||||
## 免責事項
|
||||
|
||||
詳細は [DISCLAIMER.md](DISCLAIMER.md) を参照。
|
||||
|
||||
+6
-2
@@ -18,7 +18,7 @@
|
||||
<a href="https://www.rtk-ai.app">웹사이트</a> •
|
||||
<a href="#설치">설치</a> •
|
||||
<a href="docs/TROUBLESHOOTING.md">문제 해결</a> •
|
||||
<a href="ARCHITECTURE.md">아키텍처</a> •
|
||||
<a href="docs/contributing/ARCHITECTURE.md">아키텍처</a> •
|
||||
<a href="https://discord.gg/RySmvNF5kF">Discord</a>
|
||||
</p>
|
||||
|
||||
@@ -146,7 +146,7 @@ rtk discover # 놓친 절약 기회 발견
|
||||
|
||||
- **[TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md)** - 일반적인 문제 해결
|
||||
- **[INSTALL.md](INSTALL.md)** - 상세 설치 가이드
|
||||
- **[ARCHITECTURE.md](ARCHITECTURE.md)** - 기술 아키텍처
|
||||
- **[ARCHITECTURE.md](docs/contributing/ARCHITECTURE.md)** - 기술 아키텍처
|
||||
|
||||
## 기여
|
||||
|
||||
@@ -157,3 +157,7 @@ rtk discover # 놓친 절약 기회 발견
|
||||
## 라이선스
|
||||
|
||||
MIT 라이선스 - 자세한 내용은 [LICENSE](LICENSE)를 참조하세요.
|
||||
|
||||
## 면책 조항
|
||||
|
||||
자세한 내용은 [DISCLAIMER.md](DISCLAIMER.md)를 참조하세요.
|
||||
|
||||
+6
-2
@@ -18,7 +18,7 @@
|
||||
<a href="https://www.rtk-ai.app">官网</a> •
|
||||
<a href="#安装">安装</a> •
|
||||
<a href="docs/TROUBLESHOOTING.md">故障排除</a> •
|
||||
<a href="ARCHITECTURE.md">架构</a> •
|
||||
<a href="docs/contributing/ARCHITECTURE.md">架构</a> •
|
||||
<a href="https://discord.gg/RySmvNF5kF">Discord</a>
|
||||
</p>
|
||||
|
||||
@@ -154,7 +154,7 @@ rtk discover # 发现遗漏的节省机会
|
||||
|
||||
- **[TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md)** - 解决常见问题
|
||||
- **[INSTALL.md](INSTALL.md)** - 详细安装指南
|
||||
- **[ARCHITECTURE.md](ARCHITECTURE.md)** - 技术架构
|
||||
- **[ARCHITECTURE.md](docs/contributing/ARCHITECTURE.md)** - 技术架构
|
||||
|
||||
## 贡献
|
||||
|
||||
@@ -165,3 +165,7 @@ rtk discover # 发现遗漏的节省机会
|
||||
## 许可证
|
||||
|
||||
MIT 许可证 - 详见 [LICENSE](LICENSE)。
|
||||
|
||||
## 免责声明
|
||||
|
||||
详见 [DISCLAIMER.md](DISCLAIMER.md)。
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
# RTK Roadmap -
|
||||
|
||||
Stability & Reliability
|
||||
|
||||
Critical Fixes: Resolve bugs and stabilize Vitest/pnpm support.
|
||||
|
||||
Fork Strategy: Establish the fork as the new standard if upstream remains inactive.
|
||||
|
||||
Pro Tooling: Add a configuration file (TOML) and structured logging.
|
||||
|
||||
Easy Install: Launch a Homebrew formula and pre-compiled binaries for one-click setup.
|
||||
|
||||
Early Adoption: Prove token savings on real projects to onboard the first 5 teams.
|
||||
|
||||
---
|
||||
@@ -1,6 +1,6 @@
|
||||
# rtk Architecture Documentation
|
||||
|
||||
> **Deep reference** for RTK's system design, filtering taxonomy, performance characteristics, and architecture decisions. For a guided tour of the end-to-end flow, start with [docs/TECHNICAL.md](docs/TECHNICAL.md).
|
||||
> **Deep reference** for RTK's system design, filtering taxonomy, performance characteristics, and architecture decisions. For a guided tour of the end-to-end flow, start with [TECHNICAL.md](TECHNICAL.md).
|
||||
|
||||
**rtk (Rust Token Killer)** is a high-performance CLI proxy that minimizes LLM token consumption through intelligent output filtering and compression.
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
## System Overview
|
||||
|
||||
> For the proxy pattern diagram and key components table, see [docs/TECHNICAL.md](docs/TECHNICAL.md#2-architecture-overview).
|
||||
> For the proxy pattern diagram and key components table, see [TECHNICAL.md](TECHNICAL.md#2-architecture-overview).
|
||||
|
||||
### Design Principles
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
### Hook Architecture (v0.9.5+)
|
||||
|
||||
> For the hook interception diagram and agent-specific JSON formats, see [docs/TECHNICAL.md](docs/TECHNICAL.md#32-hook-interception-command-rewriting) and [hooks/README.md](hooks/README.md).
|
||||
> For the hook interception diagram and agent-specific JSON formats, see [TECHNICAL.md](TECHNICAL.md#32-hook-interception-command-rewriting) and [hooks/README.md](hooks/README.md).
|
||||
|
||||
Two hook strategies:
|
||||
|
||||
@@ -159,7 +159,7 @@ Database: ~/.local/share/rtk/history.db
|
||||
|
||||
### Module Map
|
||||
|
||||
> For the full file-level module tree, see [docs/TECHNICAL.md](docs/TECHNICAL.md#4-folder-map) and each folder's README.
|
||||
> For the full file-level module tree, see [TECHNICAL.md](TECHNICAL.md#4-folder-map) and each folder's README.
|
||||
|
||||
**Token savings by ecosystem:**
|
||||
|
||||
@@ -1034,7 +1034,7 @@ Overhead Sources:
|
||||
|
||||
## Resources
|
||||
|
||||
- **[docs/TECHNICAL.md](docs/TECHNICAL.md)**: Guided tour of end-to-end flow
|
||||
- **[TECHNICAL.md](TECHNICAL.md)**: Guided tour of end-to-end flow
|
||||
- **[CONTRIBUTING.md](CONTRIBUTING.md)**: Design philosophy, contribution workflow, checklist
|
||||
- **CLAUDE.md**: Quick reference for AI agents (dev commands, build verification)
|
||||
- **README.md**: User guide, installation, examples
|
||||
@@ -3,7 +3,7 @@
|
||||
> **Start here** for a guided tour of how RTK works end-to-end.
|
||||
>
|
||||
> - [CONTRIBUTING.md](../CONTRIBUTING.md) — Design philosophy, PR process, branch naming, testing requirements
|
||||
> - [ARCHITECTURE.md](../ARCHITECTURE.md) — Deep reference: filtering taxonomy, performance benchmarks, architecture decisions
|
||||
> - [ARCHITECTURE.md](ARCHITECTURE.md) — Deep reference: filtering taxonomy, performance benchmarks, architecture decisions
|
||||
> - Each folder has its own `README.md` with implementation details and file descriptions
|
||||
|
||||
---
|
||||
@@ -1,102 +0,0 @@
|
||||
# How a TOML filter goes from file to execution
|
||||
|
||||
This document explains what happens between "I created `src/filters/my-tool.toml`" and "RTK filters the output of `my-tool`".
|
||||
|
||||
## Build pipeline
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
A[["📄 src/filters/my-tool.toml\n(new file)"]] --> B
|
||||
|
||||
subgraph BUILD ["🔨 cargo build"]
|
||||
B["build.rs\n① ls src/filters/*.toml\n② sort alphabetically\n③ concat → schema_version = 1 + all files"] --> C
|
||||
C{"TOML valid?\nDuplicate names?"} -->|"❌ panic! (build fails)"| D[["🛑 Error message\npoints to bad file"]]
|
||||
C -->|"✅ ok"| E[["OUT_DIR/builtin_filters.toml\n(generated file)"]]
|
||||
E --> F["rustc\ninclude_str!(concat!(env!(OUT_DIR),\n'/builtin_filters.toml'))"]
|
||||
F --> G[["🦀 rtk binary\nBUILTIN_TOML embedded"]]
|
||||
end
|
||||
|
||||
subgraph TESTS ["🧪 cargo test"]
|
||||
H["test_builtin_filter_count\nassert_eq!(filters.len(), N)"] -->|"❌ count wrong"| I[["FAIL\n'Expected N, got N+1'\nUpdate the count'"]]
|
||||
J["test_builtin_all_expected_\nfilters_present\nassert!(names.contains('my-tool'))"] -->|"❌ name missing"| K[["FAIL\n'my-tool is missing—\nwas its .toml deleted?'"]]
|
||||
L["test_builtin_all_filters_\nhave_inline_tests\nassert!(tested.contains(name))"] -->|"❌ no tests"| M[["FAIL\n'Add tests.my-tool\nentries'"]]
|
||||
end
|
||||
|
||||
subgraph VERIFY ["✅ rtk verify"]
|
||||
N["runs [[tests.my-tool]]\ninput → filter → compare expected"]
|
||||
N -->|"❌ mismatch"| O[["FAIL\nshows actual vs expected"]]
|
||||
N -->|"✅ pass"| P[["60/60 tests passed"]]
|
||||
end
|
||||
|
||||
G --> H
|
||||
G --> J
|
||||
G --> L
|
||||
G --> N
|
||||
|
||||
subgraph RUNTIME ["⚡ rtk my-tool --verbose"]
|
||||
Q["Claude Code hook\nmy-tool ... → rtk my-tool ..."] --> R
|
||||
R["TomlFilterRegistry::load()\n① .rtk/filters.toml (project)\n② ~/.config/rtk/filters.toml (user)\n③ BUILTIN_TOML (binary)\n④ passthrough"] --> S
|
||||
S{"match_command\n'^my-tool\\b'\nmatches?"} -->|"No match"| T[["exec raw\n(passthrough)"]]
|
||||
S -->|"✅ match"| U["exec command\ncapture stdout"]
|
||||
U --> V
|
||||
|
||||
subgraph PIPELINE ["8-stage filter pipeline"]
|
||||
V["strip_ansi"] --> W["replace"]
|
||||
W --> X{"match_output\nshort-circuit?"}
|
||||
X -->|"✅ pattern matched"| Y[["emit message\nstop pipeline"]]
|
||||
X -->|"no match"| Z["strip/keep_lines"]
|
||||
Z --> AA["truncate_lines_at"]
|
||||
AA --> AB["tail_lines"]
|
||||
AB --> AC["max_lines"]
|
||||
AC --> AD{"output\nempty?"}
|
||||
AD -->|"yes"| AE[["emit on_empty"]]
|
||||
AD -->|"no"| AF[["print filtered\noutput + exit code"]]
|
||||
end
|
||||
end
|
||||
|
||||
G --> Q
|
||||
|
||||
style BUILD fill:#1e3a5f,color:#fff
|
||||
style TESTS fill:#1a3a1a,color:#fff
|
||||
style VERIFY fill:#2d1b69,color:#fff
|
||||
style RUNTIME fill:#3a1a1a,color:#fff
|
||||
style PIPELINE fill:#4a2a00,color:#fff
|
||||
style D fill:#8b0000,color:#fff
|
||||
style I fill:#8b0000,color:#fff
|
||||
style K fill:#8b0000,color:#fff
|
||||
style M fill:#8b0000,color:#fff
|
||||
style O fill:#8b0000,color:#fff
|
||||
```
|
||||
|
||||
## Step-by-step summary
|
||||
|
||||
| Step | Who | What happens | Fails if |
|
||||
|------|-----|--------------|----------|
|
||||
| 1 | Contributor | Creates `src/filters/my-tool.toml` | — |
|
||||
| 2 | `build.rs` | Concatenates all `.toml` files alphabetically | TOML syntax error, duplicate filter name |
|
||||
| 3 | `rustc` | Embeds result in binary via `BUILTIN_TOML` const | — |
|
||||
| 4 | `cargo test` | 3 guards check count, names, inline test presence | Count not updated, name not in list, no `[[tests.*]]` |
|
||||
| 5 | `rtk verify` | Runs each `[[tests.my-tool]]` entry | Filter logic doesn't match expected output |
|
||||
| 6 | Runtime | Hook rewrites command, registry looks up filter, pipeline runs | No match → passthrough (not an error) |
|
||||
|
||||
## Filter lookup priority at runtime
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
CMD["rtk my-tool args"] --> P1
|
||||
P1{"1. .rtk/filters.toml\n(project-local)"}
|
||||
P1 -->|"✅ match"| WIN["apply filter"]
|
||||
P1 -->|"no match"| P2
|
||||
P2{"2. ~/.config/rtk/filters.toml\n(user-global)\n(macOS alt: ~/Library/Application Support/rtk/filters.toml)"}
|
||||
P2 -->|"✅ match"| WIN
|
||||
P2 -->|"no match"| P3
|
||||
P3{"3. BUILTIN_TOML\n(binary)"}
|
||||
P3 -->|"✅ match"| WIN
|
||||
P3 -->|"no match"| P4[["exec raw\n(passthrough)"]]
|
||||
```
|
||||
|
||||
First match wins. A project filter with the same name as a built-in shadows the built-in and triggers a warning:
|
||||
|
||||
```
|
||||
[rtk] warning: filter 'make' is shadowing a built-in filter
|
||||
```
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 239 KiB |
@@ -429,4 +429,4 @@ print(f'rtk estimate: {len(text) // 4}')
|
||||
|
||||
- [README.md](../README.md) - Full rtk documentation
|
||||
- [CLAUDE.md](../CLAUDE.md) - Claude Code integration guide
|
||||
- [ARCHITECTURE.md](../ARCHITECTURE.md) - Technical architecture
|
||||
- [ARCHITECTURE.md](../contributing/ARCHITECTURE.md) - Technical architecture
|
||||
@@ -1,6 +1,6 @@
|
||||
# Analytics
|
||||
|
||||
> See also [docs/TECHNICAL.md](../../docs/TECHNICAL.md) for the full architecture overview
|
||||
> See also [docs/contributing/TECHNICAL.md](../../docs/contributing/TECHNICAL.md) for the full architecture overview
|
||||
|
||||
## Scope
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Cloud and Infrastructure
|
||||
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/TECHNICAL.md](../../../docs/TECHNICAL.md)
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/contributing/TECHNICAL.md](../../../docs/contributing/TECHNICAL.md)
|
||||
|
||||
## Specifics
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# .NET Ecosystem
|
||||
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/TECHNICAL.md](../../../docs/TECHNICAL.md)
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/contributing/TECHNICAL.md](../../../docs/contributing/TECHNICAL.md)
|
||||
|
||||
## Specifics
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Git and VCS
|
||||
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/TECHNICAL.md](../../../docs/TECHNICAL.md)
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/contributing/TECHNICAL.md](../../../docs/contributing/TECHNICAL.md)
|
||||
|
||||
## Specifics
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Go Ecosystem
|
||||
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/TECHNICAL.md](../../../docs/TECHNICAL.md)
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/contributing/TECHNICAL.md](../../../docs/contributing/TECHNICAL.md)
|
||||
|
||||
## Specifics
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# JavaScript / TypeScript / Node
|
||||
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/TECHNICAL.md](../../../docs/TECHNICAL.md)
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/contributing/TECHNICAL.md](../../../docs/contributing/TECHNICAL.md)
|
||||
|
||||
## Specifics
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Python Ecosystem
|
||||
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/TECHNICAL.md](../../../docs/TECHNICAL.md)
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/contributing/TECHNICAL.md](../../../docs/contributing/TECHNICAL.md)
|
||||
|
||||
## Specifics
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Ruby on Rails
|
||||
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/TECHNICAL.md](../../../docs/TECHNICAL.md)
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/contributing/TECHNICAL.md](../../../docs/contributing/TECHNICAL.md)
|
||||
|
||||
## Specifics
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Rust Ecosystem
|
||||
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/TECHNICAL.md](../../../docs/TECHNICAL.md)
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/contributing/TECHNICAL.md](../../../docs/contributing/TECHNICAL.md)
|
||||
|
||||
## Specifics
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# System and Generic Utilities
|
||||
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/TECHNICAL.md](../../../docs/TECHNICAL.md)
|
||||
> Part of [`src/cmds/`](../README.md) — see also [docs/contributing/TECHNICAL.md](../../../docs/contributing/TECHNICAL.md)
|
||||
|
||||
## Specifics
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# Core Infrastructure
|
||||
|
||||
> See also [docs/TECHNICAL.md](../../docs/TECHNICAL.md) for the full architecture overview
|
||||
> See also [docs/contributing/TECHNICAL.md](../../docs/contributing/TECHNICAL.md) for the full architecture overview
|
||||
|
||||
## Scope
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Discover — History Analysis & Command Rewrite
|
||||
|
||||
> Full rewrite pipeline diagram: [docs/TECHNICAL.md](../../docs/TECHNICAL.md#32-hook-interception-command-rewriting)
|
||||
> Full rewrite pipeline diagram: [docs/contributing/TECHNICAL.md](../../docs/contributing/TECHNICAL.md#32-hook-interception-command-rewriting)
|
||||
|
||||
## What This Module Does
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Built-in Filters
|
||||
|
||||
> See also [docs/TECHNICAL.md](../../docs/TECHNICAL.md) for the full architecture overview
|
||||
> See also [docs/contributing/TECHNICAL.md](../../docs/contributing/TECHNICAL.md) for the full architecture overview
|
||||
|
||||
Each `.toml` file in this directory defines one filter and its inline tests.
|
||||
Files are concatenated alphabetically by `build.rs` into a single TOML blob embedded in the binary.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# Hook System
|
||||
|
||||
> See also [docs/TECHNICAL.md](../../docs/TECHNICAL.md) for the full architecture overview | [hooks/](../../hooks/README.md) for deployed hook artifacts
|
||||
> See also [docs/contributing/TECHNICAL.md](../../docs/contributing/TECHNICAL.md) for the full architecture overview | [hooks/](../../hooks/README.md) for deployed hook artifacts
|
||||
|
||||
## Scope
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# Learn — CLI Correction Detection
|
||||
|
||||
> See also [docs/TECHNICAL.md](../../docs/TECHNICAL.md) for the full architecture overview
|
||||
> See also [docs/contributing/TECHNICAL.md](../../docs/contributing/TECHNICAL.md) for the full architecture overview
|
||||
|
||||
## Purpose
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Parser Infrastructure
|
||||
|
||||
> See also [docs/TECHNICAL.md](../../docs/TECHNICAL.md) for the full architecture overview
|
||||
> See also [docs/contributing/TECHNICAL.md](../../docs/contributing/TECHNICAL.md) for the full architecture overview
|
||||
|
||||
## Overview
|
||||
|
||||
|
||||
Reference in New Issue
Block a user