Skip to main content

Module pack_detection

Module pack_detection 

Source
Expand description

Skill-pack root detection (CH-16 skill-pack-bundling, docs/uar-next-fable.md §6.2).

Resolves which copy of the prometheus-skill-pack skill tree is active at startup, in precedence order, and records where it came from so operators can see which pack is live (§6.2’s “(pack_version, source, root_path)”).

Precedence (highest first):

  1. UAR_BUILTIN_SKILLS_DIR env override — existing behavior, unchanged.
  2. Developer sibling checkout — $PROMETHEUS_SKILL_SYSTEM_DIR or ../prometheus-skill-system, detected by .claude-plugin/plugin.json.
  3. Installed plugin — platform-install caches (today: ~/.claude/plugins/cache/*/*; other harnesses use different paths, see [INSTALLED_PLUGIN_SEARCH_ROOTS]). Prefers the highest semver-ish version among matches named "prometheus-skill-pack".
  4. Embedded submodule (crates/prometheus-skill-system/skills) — the guaranteed floor.
  5. Optional network fetch — NOT implemented. §6.2 scopes this as “only behind an explicit flag; never at first startup (local-first rule)”; fetching + verifying a release artifact is a separate, security- sensitive change, not a loader-detection change. resolve_skill_pack_root falls through past level 4 without attempting it.

Structs§

PackProvenance
Where the active skill-pack root came from, and its declared version.

Enums§

PackSource
Which precedence level produced the resolved skill-pack root.

Functions§

resolve_skill_pack_root
Resolve the active skill-pack root per the §6.2 precedence order.