Skip to main content
← Back to list
01Issue
FeatureOpenSwamp CLI
AssigneesNone

#326 Detect stale skill directories and prompt for repo upgrade

Opened by stack72 · 5/11/2026

Problem

When a user upgrades the swamp CLI binary but doesn't run `swamp repo upgrade`, the repo retains the old skill directory structure (e.g. `swamp-extension-model`, `swamp-extension-vault`, `swamp-data-query`). The new CLI works fine at runtime, but the AI agent sees stale skill descriptions with overlapping triggers, which degrades routing accuracy.

There's no feedback loop telling the user their repo skills are out of date.

Proposed solution

Add a lightweight staleness check that detects superseded skill directories. Two options for where to surface it:

Option A: Warning on CLI startup (preferred)

During `resolveDatastoreForRepo` or similar early CLI path, check if any `SUPERSEDED_SKILLS` directories exist in the tool's skills dir. If so, emit a stderr warning:

``` swamp-warning: skill directory "swamp-extension-model" is superseded — run "swamp repo upgrade" to update skills ```

This is low-cost (a few `stat` calls) and immediately visible. The `SUPERSEDED_SKILLS` constant already exists in `repo_service.ts`.

Option B: `swamp doctor skills` subcommand

Add a new doctor check that validates the skills directory matches the current binary's expectations. Would catch superseded dirs, missing skills, and stale content (checksum mismatch).

More comprehensive but requires the user to run it proactively.

Context

PR #1364 consolidated 16 skills into 11 and added `removeSupersededSkills()` to `applyToolScaffolding` so `swamp repo upgrade` cleans up. But users who don't upgrade their repo won't benefit from the cleanup.

The superseded directories are: `swamp-extension-model`, `swamp-extension-vault`, `swamp-extension-driver`, `swamp-extension-datastore`, `swamp-extension-quality`, `swamp-data-query`.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED

Open

5/11/2026, 11:29:40 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.