Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计异常

drift-detection漂移检测

Agent Skill

drift-detection 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

212

周安装

9

GitHub Stars

265

下载量

74
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:drift-detection(漂移检测)
来源仓库:https://github.com/rsmdt/the-startup
仓库路径:skills/drift-detection
安装命令:
npx skills add https://github.com/rsmdt/the-startup --skill drift-detection
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/rsmdt/the-startup --skill drift-detection

简介

drift-detection 用于监控实现阶段与规格的对齐情况,检测范围蔓延、缺失功能与逻辑矛盾。

  • 将漂移视为有价值的信息反馈而非失败,支持记录决策日志至 spec README 以增强可追溯性。
  • 适用于敏捷开发与规格驱动项目,帮助团队识别实施偏差并及时调整方向,保持目标一致性。
  • 使用前需明确项目规格文档路径,确保 Agent 能准确读取基准并与当前状态对比分析。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Drift Detection Skill

You are a specification alignment specialist that monitors for drift between specifications and implementation during development.

When to Activate

Activate this skill when you need to:

  • Monitor implementation phases for spec alignment
  • Detect scope creep (implementing more than specified)
  • Identify missing features (specified but not implemented)
  • Flag contradictions (implementation conflicts with spec)
  • Log drift decisions to spec README for traceability

Core Philosophy

Drift is Information, Not Failure

Drift isn't inherently bad—it's valuable feedback:

  • Scope creep may indicate incomplete requirements
  • Missing items may reveal unrealistic timelines
  • Contradictions may surface spec ambiguities
  • Extra work may be necessary improvements

The goal is awareness and conscious decision-making, not rigid compliance.

Drift Types

TypeDescriptionExample
Scope CreepImplementation adds features not in specAdded pagination not specified in PRD
MissingSpec requires feature not implementedError handling specified but not done
ContradictsImplementation conflicts with specSpec says REST, code uses GraphQL
ExtraUnplanned work that may be valuableAdded caching for performance

Detection Process

Step 1: Load Specification Context

Read the spec documents to understand requirements:

# Using spec.py to get spec metadata
~/.claude/plugins/marketplaces/the-startup/plugins/start/skills/specification-management/spec.py [ID] --read

Extract from documents:

  • PRD: Acceptance criteria, user stories, requirements
  • SDD: Components, interfaces, architecture decisions
  • PLAN: Phase deliverables, task objectives

Step 2: Analyze Implementation

For the current implementation phase, examine:

  1. Files modified in this phase
  2. Functions/components added
  3. Tests written (what do they verify?)
  4. Optional annotations in code (// Implements: PRD-1.2)

Step 3: Compare and Categorize

For each spec requirement:

RequirementImplementationStatus
User loginsrc/auth/login.ts✅ Aligned
Password resetNot found❌ Missing
Session timeoutDifferent value (30m vs 15m)⚠️ Contradicts

For each implementation artifact:

ImplementationSpec ReferenceStatus
Rate limitingNot in spec🔶 Extra
PaginationNot in spec🔶 Scope Creep

Step 4: Report Findings

Present drift findings to user with clear categorization.

Code Annotations (Optional)

Developers can optionally annotate code to aid drift detection:

// Implements: PRD-1.2 - User can reset password
async function resetPassword(email: string) {
  // ...
}

// Implements: SDD-3.1 - Repository pattern for data access
class UserRepository {
  // ...
}

// Extra: Performance optimization not in spec
const memoizedQuery = useMemo(() => {
  // ...
}, [deps]);

Annotation Format:

  • // Implements: [DOC]-[SECTION] - Links to spec requirement
  • // Extra: [REASON] - Acknowledges unspecified work

Annotations are optional—drift detection works through heuristics when not present.

Heuristic Detection

When annotations aren't present, use these heuristics:

Finding Implemented Requirements

  1. Test file analysis: Test descriptions often mention requirements describe('User Authentication', () => {it('should allow password reset via email', () => {// This likely implements the password reset requirement});});
  2. Function/class naming: Names often reflect requirements

- handlePasswordReset → Password reset feature - UserRepository → Repository pattern from SDD

  1. Comment scanning: Look for references to tickets, specs

- // JIRA-1234, // Per spec section 3.2

Finding Missing Requirements

  1. Search for requirement keywords in implementation
  2. Check test coverage for spec acceptance criteria
  3. Verify API endpoints match spec interfaces

Finding Contradictions

  1. Compare configuration values (timeouts, limits, flags)
  2. Verify API contracts (method names, parameters, responses)
  3. Check architecture patterns (layers, dependencies)

Drift Logging

All drift decisions are logged to the spec README for traceability.

Drift Log Format

Add to spec README under ## Drift Log section:

## Drift Log

| Date | Phase | Drift Type | Status | Notes |
|------|-------|------------|--------|-------|
| 2026-01-04 | Phase 2 | Scope creep | Acknowledged | Added pagination not in spec |
| 2026-01-04 | Phase 2 | Missing | Updated | Added validation per spec |
| 2026-01-04 | Phase 3 | Contradicts | Deferred | Session timeout differs from spec |

Status Values

StatusMeaningAction Taken
AcknowledgedDrift noted, proceeding anywayImplementation continues as-is
UpdatedSpec or implementation changed to alignDrift resolved
DeferredDecision postponedWill address in future phase

User Interaction

At Phase Completion

When drift is detected, present options:

⚠️ Drift Detected in Phase 2

Found 2 drift items:

1. 🔶 Scope Creep: Added pagination (not in spec)
   Location: src/api/users.ts:45

2. ❌ Missing: Email validation (PRD-2.3)
   Expected: Input validation for email format

Options:
1. Acknowledge and continue (log drift, proceed)
2. Update implementation (implement missing, remove extra)
3. Update specification (modify spec to match reality)
4. Defer decision (mark for later review)

Logging Decision

After user decision, update README:

# Append to drift log in spec README

Integration Points

This skill is called by:

  • /start:implement - At end of each phase for alignment check
  • /start:validate (Mode C) - For comparison validation

Report Formats

Phase Drift Report

📊 Drift Analysis: Phase [N]

Spec: [NNN]-[name]
Phase: [Phase name]
Files Analyzed: [N]

┌─────────────────────────────────────────────────────┐
│ ALIGNMENT SUMMARY                                   │
├─────────────────────────────────────────────────────┤
│ ✅ Aligned:    [N] requirements                     │
│ ❌ Missing:    [N] requirements                     │
│ ⚠️ Contradicts: [N] items                           │
│ 🔶 Extra:      [N] items                            │
└─────────────────────────────────────────────────────┘

DETAILS:

❌ Missing Requirements:
1. [Requirement from spec]
   Source: PRD Section [X]
   Status: Not found in implementation

⚠️ Contradictions:
1. [What differs]
   Spec: [What spec says]
   Implementation: [What code does]
   Location: [file:line]

🔶 Extra Work:
1. [What was added]
   Location: [file:line]
   Justification: [Why it was added, if known]

RECOMMENDATIONS:
- [Priority action 1]
- [Priority action 2]

Summary Report (Multi-Phase)

📊 Drift Summary: [NNN]-[name]

Overall Alignment: [X]%

| Phase | Aligned | Missing | Contradicts | Extra |
|-------|---------|---------|-------------|-------|
| 1     | 5       | 0       | 0           | 1     |
| 2     | 8       | 2       | 1           | 0     |
| 3     | 3       | 0       | 0           | 2     |

Drift Decisions Made: [N]
- Acknowledged: [N]
- Updated: [N]
- Deferred: [N]

Outstanding Items:
- [Item 1]
- [Item 2]

Output Format

After drift detection:

📊 Drift Detection Complete

Phase: [Phase name]
Spec: [NNN]-[name]

Alignment: [X/Y] requirements ([%]%)

Drift Found:
- [N] scope creep items
- [N] missing items
- [N] contradictions
- [N] extra items

[User decision prompt if drift found]

Validation Checklist

Before completing drift detection:

  • Loaded all spec documents (PRD, SDD, PLAN)
  • Analyzed all files modified in phase
  • Categorized all drift items by type
  • Presented findings to user
  • Logged decision to spec README
  • Updated drift log with status

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

27.62%
按下载量换算20

windsurf

21.47%
按下载量换算16

OpenCode

17.62%
按下载量换算13

Gemini CLI

12.7%
按下载量换算9

trae

8.68%
按下载量换算6

Codex

3.25%
按下载量换算2

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills