Repository navigation
Description
User Story
As a developer running rtk init, I want the generated RTK.md to contain
only content that's useful every session, so that the always-loaded context
rtk init installs into my Claude Code config doesn't carry one-time setup
instructions and dead references on every single session.
Background
rtk init installs ~/.claude/RTK.md from the template at
hooks/claude/rtk-awareness.md, and users
are expected to @RTK.md-import it into their global CLAUDE.md — meaning
its full contents are loaded into context on every session, not just once.
claude doctor surfaced two issues with this template:
-
"Installation Verification" section is one-time content in an
always-loaded file (lines 14–22):## Installation Verification ```bash rtk --version # Should show: rtk X.Y.Z rtk gain # Should work (not "command not found") which rtk # Verify correct binary ``` ⚠️ **Name collision**: If `rtk gain` fails, you may have reachingforthejack/rtk (Rust Type Kit) installed instead.This is useful exactly once — right after install, to confirm
rtkis on
PATHand isn't shadowed by the unrelatedreachingforthejack/rtk(Rust
Type Kit) package. It has no relevance to any session after that, but
because it lives in the always-importedRTK.md, every session pays the
token cost of loading it. -
Dangling reference to a nonexistent section (line 29):
Refer to CLAUDE.md for full command reference.The generated
CLAUDE.mdhas no "full command reference" section for RTK
— this line points at content that doesn't exist, so it's dead weight at
best and misleading at worst.
Both were confirmed directly against the source template in this repo
(hooks/claude/rtk-awareness.md), copied via src/hooks/init.rs — this
isn't local drift in one user's file, it's present in what rtk init ships
today.
Proposed Change
- Remove the "Installation Verification" section from
hooks/claude/rtk-awareness.md(and any other RTK.md templates that carry
it, e.g.hooks/codex/, if applicable).- Alternative worth considering instead of outright deletion: move this
content toINSTALL.md, or print it as part ofrtk init's own command
output, so the verification steps are still discoverable right after
install without living in the always-loaded file. Leaving the exact
approach to maintainer judgment.
- Alternative worth considering instead of outright deletion: move this
- Remove the dangling "Refer to CLAUDE.md for full command reference." line
(line 29), or replace it with an accurate pointer if such a reference
section is intended to exist elsewhere.
Acceptance Criteria
-
hooks/claude/rtk-awareness.mdno longer contains the "Installation
Verification" section (or it has been relocated out of the
always-loaded template, per maintainer preference). - The dangling "Refer to CLAUDE.md for full command reference." line is
removed or corrected. - A fresh
rtk initregenerates~/.claude/RTK.mdwithout the removed
section/line. - No other docs (README variants,
hooks/*/README.md, etc.) reference
the removed section in a way that would also go stale.
Activity
pszymkowiak commentedon Jul 30, 2026
🔍 Automated Triage
docslowSummary
RTK.md template (hooks/claude/rtk-awareness.md) includes one-time install-verification content and a dangling 'refer to CLAUDE.md' reference that add token cost to every session; trim/relocate the section and fix or remove the dead reference.
📁 Relevant files
hooks/claude/rtk-awareness.mdhooks/codex/src/hooks/init.rsTriaged automatically by wshm · This is an automated analysis, not a human review.
koi-lee commentedon Aug 1, 2026
I would like to take this, but I found conflicting current state and want to avoid duplicating work.
PR #3322 implemented the acceptance criteria and was closed with the note that it duplicated #3308. However, #3308 is not accessible as either an issue or PR, current
developstill contains both the one-time verification block and the danglingCLAUDE.mdreference, and #3306 remains open with no linked active PR.Is #3306 available for a new PR using the same narrow scope (Claude/Codex awareness templates plus a regression test), or is another change pending elsewhere?
HetCreep commentedon Aug 11, 2026
Reinforcing this from the delivery side rather than the template's content: on my machine the fixed template never arrives at all, so a corrected
rtk-awareness.mdwould not reach an existing install.Measured here:
rtk --version0.45.0(current release)~/.claude/RTK.mdmtime2026-06-11a1673f7,2026-07-22(docs: scope savings claims to bash output), first in the0.44.0-rclineThe installed file still carries the pre-
a1673f7wording:So the file predates the template change by about six weeks and has not moved since, even though the binary is two minor versions further on.
The write logic itself is fine —
src/hooks/init.rs:1163doeswhich would replace it correctly. It just only ever runs inside
rtk init, and upgrading the binary does not re-runinit. The practical effect is that~/.claude/RTK.mdpins to whatever release first installed it and then drifts silently — and because it is@RTK.md-imported intoCLAUDE.md, that stale copy is loaded into every session.That matters for this issue and for #2734 specifically: even once the one-time-setup block and the circular
Refer to CLAUDE.mdline are fixed in the template, existing installs keep the old text indefinitely unless the user happens to re-runrtk init— and nothing tells them to.Two cheap options, either would close the gap:
RTK.md is from an older release — run \rtk init`` when it differs;write_if_changed, which is already idempotent and already prints nothing when the file matches.Happy to test either against this install.
Filed with Claude Code; every figure above is from this machine.
karldreher commentedon Sep 16, 2026
Reasonably accomplished with closure of #3186.