Skip to content

fix(init): migrate pre-v0.10 Claude instruction blocks - #4425

Open
axelray-dev wants to merge 1 commit into
rtk-ai:developfrom
axelray-dev:fix/init-remove-legacy-claude-block-4423
Open

axelray-dev wants to merge 1 commit into
rtk-ai:developfrom
axelray-dev:fix/init-remove-legacy-claude-block-4423

Conversation

@axelray-dev

@axelray-dev axelray-dev commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

rtk init now recognizes and removes the complete legacy Claude instruction blocks written by rtk v0.9.0 through v0.9.4 before installing the current @RTK.md reference.

The migration matches the exact historical templates, preserves surrounding user content, and leaves unrelated or malformed instruction blocks untouched.

Fixes #4423

Validation

  • cargo fmt --all --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test --bin rtk hooks::init -- --nocapture (313 passed)
  • GitHub CI passed on Linux, macOS, and Windows, including the security scans and benchmark job

@rtk-wshm-sync-bot rtk-wshm-sync-bot Bot added bug Something isn't working init migration labels Oct 3, 2026
@rtk-wshm-sync-bot

Copy link
Copy Markdown

wshm · Automated triage by AI

📊 Automated PR Analysis

🐛 Type bug-fix
🟡 Risk medium

Summary

This PR fixes rtk's CLAUDE.md migration logic to also detect and remove legacy RTK instruction blocks written by pre-v0.10 versions (v0.9.0-v0.9.3 and v0.9.4), which lacked proper markers or closing markers. It adds SHA256-based detection of these legacy templates while preserving unrelated malformed marker blocks, and applies the fix consistently across patch, uninstall, and default-mode init paths.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Linked issues: #4423


Analyzed automatically by wshm · This is an automated analysis, not a human review.

@axelray-dev
axelray-dev marked this pull request as ready for review October 3, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working init migration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rtk init -g leaves a pre-v0.10 CLAUDE.md RTK block in place and adds @RTK.md next to it

1 participant