Commit Graph

16 Commits

Author SHA1 Message Date
Adrien Eppling a53373191d feat(recall): content-addressed recall store with selectable [retriever] mode
sqlite (default) queried by 'rtk recall'; tee (legacy files) and disabled modes retained.
2026-09-08 14:12:15 +02:00
Adrien Eppling 280d0918b5 Merge origin/develop into fix/pipe-safe-consummer-and-slim-instructions
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UAVhpAvWDmsEWuLehm9RAo
2026-09-07 18:29:15 +02:00
Adrien Eppling 148e0d443e fix(rewrite): PipelineSafety enum, quote-aware consumer args, fd-dup redirects, stage rewrite consolidation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UAVhpAvWDmsEWuLehm9RAo
2026-09-07 14:44:15 +02:00
Nicolas Le Cam 8722378a22 Merge pull request #3212 from rtk-ai/fix/copilot-parity-omit-permission-decision
fix(hooks): stop Copilot from silently deciding permission on unconfigured commands
2026-08-02 19:55:12 +02:00
Takayuki Maeda 5269df7d50 refactor: replace lazy_static with LazyLock 2026-07-28 02:17:04 +09:00
Nicolas Le Cam b754b85009 fix(hooks): drop redundant camelCase preToolUse entry from Copilot hook config
rtk init --copilot registered both a PascalCase PreToolUse entry and a
camelCase preToolUse entry in the same rtk-rewrite.json, on the assumption
that VS Code Copilot Chat needs the former and Copilot CLI needs the latter.

Live testing showed Copilot CLI treats PreToolUse/preToolUse as two
independent, sequentially-run hooks — a redundant second `rtk hook copilot`
process spawn per tool call, chaining the first hook's rewrite into the
second's input (confirmed via raw stdin capture, and confirmed independent
of declaration order in the file). Also confirmed Copilot CLI honors the
PascalCase-only schema perfectly well on its own, receiving the same
tool_name/tool_input.command shape either way — so the camelCase entry buys
nothing for Copilot CLI, while adding process overhead and an extra,
harder-to-reason-about execution path.

Drop the camelCase preToolUse entry, keeping the single PascalCase
PreToolUse entry shared by both hosts. Existing installs are not upgraded
automatically — re-running `rtk init --copilot` / `rtk init --global
--copilot` overwrites the old dual-schema file with the new one
(write_if_changed overwrites unconditionally on content diff), verified
by test_copilot_init_upgrades_old_dual_schema_install and
test_copilot_global_install_upgrades_old_dual_schema_install, which seed
the old dual-schema content and assert it gets replaced.
2026-07-27 13:59:47 +02:00
Takayuki Maeda ca418939c3 Merge pull request #3128 from TaKO8Ki/fix/pipe-rewrite-safety 2026-07-23 23:33:15 +09:00
Takayuki Maeda 1c5a23c64a fix(rewrite): keep pipeline-final wc commands raw 2026-07-23 16:42:37 +09:00
Adrien Eppling 3f009d188c docs: revert internal and low-value files, drop the two-estimator table
Restore to develop the files where the rescoping added noise without
helping a reader: all of .claude/, the src/ module READMEs that only
described their own filters, ARCHITECTURE.md, TELEMETRY.md, quick-start,
configuration and troubleshooting.

Also drop the "Two estimators, one caveat" table from savings-explained.md.
The page already states that rtk gain estimates bytes/4 and ships no
tokenizer; enumerating the test-side estimator was detail no reader needs.

The user-facing surface keeps the rescoping: READMEs in seven languages,
the guide, hooks, and the analytics and usage pages.
2026-07-22 19:02:16 +02:00
Adrien Eppling b1047583c6 docs: lower the filter gate to 20% and trim redundant explainer links
The documented release blocker was ">=60% savings", but the code never
enforced that. 23 of the 63 threshold assertions in src/ already sit below
60% (15, 20, 30, 40 and 50% appear across aws, gh, git, glab and mvn), so
the gate was aspirational rather than real.

Set the floor to 20%, pointing at the existing "Correctness VS Token
Savings" section for the reasoning rather than restating it: a modest, safe
reduction beats an aggressive one that drops information the agent needed.

Descriptive "60-90%" ranges are left alone where they report what filters
actually achieve. Only requirement statements moved to the 20% floor.

Also reduce links to savings-explained.md down to one per file, and only
from root docs and user-facing pages. Removed from docs/contributing/ and
.claude/rules/, where the surrounding text already carries the caveat.
2026-07-22 18:44:50 +02:00
Adrien Eppling a1673f7428 docs: scope savings claims to bash output and document the estimator
RTK was documented as delivering "60-90% token savings", which reads as a
cost reduction. What RTK actually reduces is bash output bytes. Those are
one contributor to input tokens, which are themselves only part of a bill
that also counts output tokens, so the reduction dilutes at every step.

- add docs/guide/resources/savings-explained.md as the canonical explainer:
  the savings chain, both estimators, and what RTK does not reduce
- rescope the headline claim across README (7 languages), the guide, hook
  rules, agent definitions and module READMEs
- relabel per-command tables as bash output reduction, keeping every figure
- document that reported tokens are estimates: rtk gain uses bytes/4
  (src/core/tracking.rs), filter tests use split_whitespace().count().
  Neither is a real tokenizer, so ratios hold but absolute counts do not

Remove figures that had no source: the $3/Mtok constant and its $36
example, the +/-10% tokenization accuracy claim, the 99.5% hook-install
figure, the invented session tables in README and INSTALL, and the 30-50%
parser range.

CHANGELOG is untouched. Shipped release notes stay as a historical record.
2026-07-22 18:33:54 +02:00
Takayuki Maeda 297d664f24 docs: explain safe pipeline rewriting 2026-07-22 04:44:47 +09:00
Nicolas Le Cam bd10b002d0 Follow up on #2609:
- Fix documentation, Cursor now uses native rust binary hook
- Fix rtk-rewrite.sh shell script to fail on any exit code except 0 and 3
- Test that "continue": true is also present for "permission": "ask" and sync shell rewrite hook
2026-06-30 22:18:39 +02:00
Nicolas Le Cam 84616d131d fix(grep): stabilize argument parsing 2026-06-10 23:38:54 +02:00
aesoft a724375650 docs(contributing): coding practices v1 2026-04-18 17:26:12 +02:00
aesoft deda44f736 fix(docs): clean some docs + disclaimer 2026-04-02 21:33:38 +02:00