Expand description
lean-ctx rules dedup — collapse duplicated lean-ctx guidance (#578).
A client should pay for lean-ctx rules exactly once per session. Older
installs (and parent-directory walks in monorepos) left full rule copies
in several auto-loaded files; doctor overhead detects the duplication,
this command repairs it:
- lean-ctx-OWNED dedicated rule files outside the canonical global
location (project/parent
.cursor/rules/lean-ctx.mdc,.claude/rules/lean-ctx.md, …) → deleted. .cursorruleslean-ctx blocks → removed when the canonical global Cursor mdc exists (Cursor auto-loads both; pointer lives in AGENTS.md).- Stale compression blocks in
.cursorrules→ removed under the same condition (the global mdc carries the block).
Only lean-ctx-owned files and lean-ctx-marked blocks are ever touched.
Unmarked user content is reported, never modified. Default is a dry-run
report; --apply executes with .bak backups for partial edits.
Functions§
- run
- CLI entry:
lean-ctx rules dedup [--apply].