Effort: deep
migrations/114_skill_registry_canonical.py already gives every skill a
version and bundle_sha, but agent_skill_invocations does not record
which version produced each output. When a bundle author edits the SKILL.md
prompt, the citation/error rate can shift silently. Build a drift detector
that pins each invocation to a (skill_name, bundle_sha) pair, computes
per-version quality distributions, and raises an alert whenever a new
version's success or citation rate diverges meaningfully from the prior
version on a matched workload.
migrations/20260428_skill_invocations_version.sql addsbundle_sha TEXT and bundle_version TEXT columns toagent_skill_invocations, plus partial indexidx_asi_skill_sha ON agent_skill_invocations(skill_name, bundle_sha).
scidex/agora/skill_evidence.py:_log_invocation reads the currentbundle_sha + version from the registry (cached in-process for('', '') so queries can WHERE bundle_sha != ''.
scidex/forge/skill_drift.py:compute_drift(skill_name: str, current_sha: str, prior_sha: str,
window_days: int = 30) -> DriftResult. Uses Welch's t-test onis_drifted: bool (anyseverity enum (none/low/high).
q-skills-bundle-auto-discovery, compute_drift() is invokedskill_drift_events(id, skill_name, prior_sha, new_sha, severity,
stats_json, raised_at, ack_at, ack_by) table.
/forge/skills/drift lists all unacknowledged events,raised_at. POST /api/forge/skills/drift/{id}/ackseverity = 'high' writes a row to senate_alertslow only logs.
tests/test_skill_drift.py:is_drifted=False.severity=high.is_drifted=False even with bigpubmed_search with 100_log_invocation with a tiny in-process LRUfunctools.lru_cache(maxsize=128)) keyed on skill_name andscipy.stats (already a dependency viapydeseq2 skill). Wilson CI is a hand-rolled helper to avoid pullingstatsmodels solely for it.
templates/forge/base.html.numpy.random.RandomState(42) for determinism.q-skills-bundle-auto-discovery — surfaces the new SHA.q-skills-usage-telemetry — share the latency/citation-rate queryq-skills-cost-rationality — drift severity feeds the routing-cost20260428_skill_invocations_version.sql addsbundle_sha TEXT + bundle_version TEXT to agent_skill_invocations withidx_asi_skill_sha WHERE bundle_sha != ''. Backfill SQL sets('', ''). _log_invocation updated with 30-s lru_cache on_get_bundle_info(skill_name). All 5 call sites pass bundle_sha/bundle_version.scidex/forge/skill_drift.py implements compute_drift() with Welch's t-test onskill_drift_events extended with prior_sha, new_sha, stats_json,ack_at, ack_by. HTML /forge/skills/drift + POST ack endpoint added.senate_alerts table created (high-severity hook). 7 tests pass includingseverity=high drift event is written to DB.d7e1671cb.