Problem
LEGACY_SKILL_NAMES in src/cli/plugins.ts is a 197-entry append-only array tracking every skill rename/removal since v1. It grows with each refactor and will only get larger as rules accumulate their own LEGACY_RULE_NAMES.
Proposed Solution
Replace the static array with a manifest-based sweep during devflow init (or uninstall):
- Read the current manifest's installed skill list
- Scan
~/.claude/skills/devflow:*/ for all installed skill directories
- Remove any directory not in the current manifest's skill set
- Same pattern for
~/.claude/rules/devflow/*.md and ~/.claude/agents/devflow/*.md
This eliminates the need for LEGACY_SKILL_NAMES, LEGACY_RULE_NAMES, and any future legacy arrays entirely — the manifest is the source of truth for what should exist.
Considerations
- Must handle partial installs (single-plugin reinstall shouldn't wipe skills from other plugins)
- Should log what it removes for transparency
- Could run as a migration or as part of normal init flow
- The current array approach is harmless (~4KB, runs once during uninstall) — this is a cleanliness improvement, not urgent
Scope
- Remove
LEGACY_SKILL_NAMES array
- Remove
LEGACY_RULE_NAMES array
- Add manifest-based sweep to init/uninstall flow
- Add tests for the sweep logic
Problem
LEGACY_SKILL_NAMESinsrc/cli/plugins.tsis a 197-entry append-only array tracking every skill rename/removal since v1. It grows with each refactor and will only get larger as rules accumulate their ownLEGACY_RULE_NAMES.Proposed Solution
Replace the static array with a manifest-based sweep during
devflow init(or uninstall):~/.claude/skills/devflow:*/for all installed skill directories~/.claude/rules/devflow/*.mdand~/.claude/agents/devflow/*.mdThis eliminates the need for
LEGACY_SKILL_NAMES,LEGACY_RULE_NAMES, and any future legacy arrays entirely — the manifest is the source of truth for what should exist.Considerations
Scope
LEGACY_SKILL_NAMESarrayLEGACY_RULE_NAMESarray