Skip to content

ai-eng update orphans ~300 stale skill files on consumer disks #669

Description

@soydachi

Split out of spec-201 (autopilot Phase 5 review). Documented in the CHANGELOG and surfaced by a new doctor WARN; the removal sweep was deliberately not built, because deleting files in consumer repos needs its own spec with backup/rollback.

Defect

spec-201 collapsed four redundant skill trees to two. A consumer upgrading from 0.13.0 keeps the deleted trees on disk:

  • 137 .github/skills
  • 137 .codex/skills
  • 19 .codex/agents
  • plus .opencode/skills, templates/.cursor/skills

Both Copilot and Codex natively discover the old and new trees, so they read two divergent copies of every skill, and the stale ones still cross-reference .codex/agents/.

Two independent causes

src/ai_engineering/updater/service.py:759-780 - _detect_orphan_files:

  1. Sweeps only disabled providers, so an active copilot/codex install is never visited.
  2. Enumerates destinations from the current _SURFACE_TREE_MAPS, which no longer names any retired path - so _provider_tree_orphans cannot reach them even for a disabled provider.

Verified on a simulated 0.13.0 tree: with active=['claude-code','github-copilot','codex'], the sweep flags only .cursor/skills and .opencode/skills (disabled), and never .github/skills, .codex/skills, .codex/agents.

RK-14's stated mitigation (a doctor version check) never shipped.

Acceptance

  • A retired-trees constant, versioned so future collapses extend it.
  • A removal step wired into the existing backup/rollback machinery in the updater.
  • Tests covering an upgrading consumer with each provider combination.
  • The new retired-surface-trees-present doctor WARN becomes fixable (--fix) once removal exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working correctly

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions