Skip to content

discover: 'Already using RTK: 0' — counter ignores contextcrawler prefix #81

Closed

Description

@thehoff

Symptom

contextcrawler discover always reports:

Already using RTK: 0 commands (0.0%)

even when the PreToolUse hook is installed and rewriting transparently.

Root cause

src/discover/mod.rs:172:

if part.trim().starts_with("rtk ") {
    already_rtk += 1;
}

Only matches the legacy rtk prefix. Post-rebrand the wrapped command starts with contextcrawler , which falls through IGNORED_PREFIXES (rules.rs:920) as Classification::Ignored but never increments the counter.

Fix

let t = part.trim();
if t.starts_with("rtk ") || t.starts_with("contextcrawler ") {
    already_rtk += 1;
}

Note

This counter is also affected by #2 (the inflated MISSED SAVINGS section) — even with this fix, the source-of-truth for "already RTK" is the runtime tracking DB, not the JSONL transcript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions