Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

drift-analysis漂移分析

Agent Skill

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

总安装

1,067

周安装

44

GitHub Stars

769

下载量

348
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/avifenesh/agentsys --skill drift-analysis

简介

drift-analysis 用于分析项目状态、检测计划偏离并生成优先级重建方案,基于纯 JavaScript 收集数据。

  • 通过扫描 GitHub 状态、文档与代码库,结合大模型进行深度语义分析,识别计划漂移与实施偏差。
  • 适用于监控开发进度与规格对齐,帮助团队及时发现范围蔓延或缺失功能,提升项目可控性。
  • 需注意 Opus 调用成本与上下文长度限制,建议在关键节点启用以避免过度消耗计算资源。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Drift Analysis

Knowledge and patterns for analyzing project state, detecting plan drift, and creating prioritized reconstruction plans.

Architecture Overview

/drift-detect
        │
        ├─→ collectors.js (pure JavaScript)
        │   ├─ scanGitHubState()
        │   ├─ analyzeDocumentation()
        │   └─ scanCodebase()
        │
        └─→ plan-synthesizer (Opus)
            └─ Deep semantic analysis with full context

Data collection: Pure JavaScript (no LLM overhead) Semantic analysis: Single Opus call with complete context

Drift Detection Patterns

Types of Drift

Plan Drift: When documented plans diverge from actual implementation

  • PLAN.md items remain unchecked for extended periods
  • Roadmap milestones slip without updates
  • Sprint/phase goals not reflected in code changes

Documentation Drift: When documentation falls behind implementation

  • New features exist without corresponding docs
  • README describes features that don't exist
  • API docs don't match actual endpoints

Issue Drift: When issue tracking diverges from reality

  • Stale issues that no longer apply
  • Completed work without closed issues
  • High-priority items neglected

Scope Drift: When project scope expands beyond original plans

  • More features documented than can be delivered
  • Continuous addition without completion
  • Ever-growing backlog with no pruning

Detection Signals

HIGH-CONFIDENCE DRIFT INDICATORS:
- Milestone 30+ days overdue with open issues
- PLAN.md < 30% completion after 90 days
- 5+ high-priority issues stale > 60 days
- README features not found in codebase

MEDIUM-CONFIDENCE INDICATORS:
- Documentation files unchanged for 180+ days
- Draft PRs open > 30 days
- Issue themes don't match code activity
- Large gap between documented and implemented features

LOW-CONFIDENCE INDICATORS:
- Many TODOs in codebase
- Stale dependencies
- Old git branches not merged

Prioritization Framework

Priority Calculation

function calculatePriority(item, weights) {
  let score = 0;

  // Severity base score
  const severityScores = {
    critical: 15,
    high: 10,
    medium: 5,
    low: 2
  };
  score += severityScores[item.severity] || 5;

  // Category multiplier
  const categoryWeights = {
    security: 2.0,    // Security issues get 2x
    bugs: 1.5,        // Bugs get 1.5x
    infrastructure: 1.3,
    features: 1.0,
    documentation: 0.8
  };
  score *= categoryWeights[item.category] || 1.0;

  // Recency boost
  if (item.createdRecently) score *= 1.2;

  // Stale penalty (old items slightly deprioritized)
  if (item.daysStale > 180) score *= 0.9;

  return Math.round(score);
}

Time Bucket Thresholds

BucketCriteriaMax Items
Immediateseverity=critical OR priority >= 155
Short-termseverity=high OR priority >= 1010
Medium-termpriority >= 515
Backlogeverything else20

Priority Weights (Default)

security: 10     # Security issues always top priority
bugs: 8          # Bugs affect users directly
features: 5      # New functionality
documentation: 3 # Important but not urgent
tech-debt: 4     # Keeps codebase healthy

Cross-Reference Patterns

Document-to-Code Matching

// Fuzzy matching for feature names
function featureMatch(docFeature, codeFeature) {
  const normalize = s => s
    .toLowerCase()
    .replace(/[-_\s]+/g, '')
    .replace(/s$/, ''); // Remove trailing 's'

  const docNorm = normalize(docFeature);
  const codeNorm = normalize(codeFeature);

  return docNorm.includes(codeNorm) ||
         codeNorm.includes(docNorm) ||
         levenshteinDistance(docNorm, codeNorm) < 3;
}

Common Mismatches

Documented AsImplemented As
"user authentication"auth/, login/, session/
"API endpoints"routes/, api/, handlers/
"database models"models/, entities/, schemas/
"caching layer"cache/, redis/, memcache/
"logging system"logger/, logs/, telemetry/

Output Templates

Drift Report Section

## Drift Analysis

### {drift_type}
**Severity**: {severity}
**Detected In**: {source}

{description}

**Evidence**:
{evidence_items}

**Recommendation**: {recommendation}

Gap Report Section

## Gap: {gap_title}

**Category**: {category}
**Severity**: {severity}

{description}

**Impact**: {impact_description}

**To Address**:
1. {action_item_1}
2. {action_item_2}

Reconstruction Plan Section

## Reconstruction Plan

### Immediate Actions (This Week)
{immediate_items_numbered}

### Short-Term (This Month)
{short_term_items_numbered}

### Medium-Term (This Quarter)
{medium_term_items_numbered}

### Backlog
{backlog_items_numbered}

Best Practices

When Analyzing Drift

  1. Compare timestamps, not just content

- When was the doc last updated vs. last code change? - Are milestones dated realistically?

  1. Look for patterns, not individual items

- One stale issue isn't drift; 10 stale issues is a pattern - One undocumented feature isn't drift; 5 undocumented features is

  1. Consider context

- Active development naturally has some drift - Mature projects should have minimal drift - Post-launch projects often have documentation lag

  1. Weight by impact

- User-facing drift matters more than internal - Public API drift matters more than implementation details

When Creating Plans

  1. Be actionable, not exhaustive

- Top 5 immediate items, not top 50 - Each item should be completable in reasonable time

  1. Group related items

- "Update authentication docs" not "Update login page docs" + "Update signup docs"

  1. Include success criteria

- How do we know this drift item is resolved?

  1. Balance categories

- All security first, but don't ignore everything else - Mix quick wins with important work

Data Collection (JavaScript)

The collectors.js module extracts data without LLM overhead:

GitHub Data

  • Open issues categorized by labels
  • Open PRs with draft status
  • Milestones with due dates
  • Stale items (> 90 days inactive)
  • Theme analysis from titles

Documentation Data

  • Parsed README, PLAN.md, CLAUDE.md, CHANGELOG.md
  • Checkbox completion counts
  • Section analysis
  • Feature lists

Code Data

  • Directory structure
  • Framework detection
  • Test framework presence
  • Health indicators (CI, linting, tests)

Semantic Analysis (Opus)

The plan-synthesizer receives all collected data and performs:

  1. Cross-referencing: Match documented features to implementation
  2. Drift identification: Find divergence patterns
  3. Gap analysis: Identify what's missing
  4. Prioritization: Context-aware ranking
  5. Report generation: Actionable recommendations

Example Input/Output

Collected Data (from collectors.js)

{
  "github": {
    "issues": [...],
    "categorized": { "bugs": [...], "features": [...] },
    "stale": [...]
  },
  "docs": {
    "files": { "README.md": {...}, "PLAN.md": {...} },
    "checkboxes": { "total": 15, "checked": 3 }
  },
  "code": {
    "frameworks": ["Express"],
    "health": { "hasTests": true, "hasCi": true }
  }
}

Analysis Output (from plan-synthesizer)

# Reality Check Report

## Executive Summary
Project has moderate drift: 8 stale priority issues and 20% plan completion.
Strong code health (tests + CI) but documentation lags implementation.

## Drift Analysis
### Priority Neglect
**Severity**: high
8 high-priority issues inactive for 60+ days...

## Prioritized Plan
### Immediate
1. Close #45 (already implemented)
2. Update README API section...

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

33.15%
按下载量换算115

Claude

30.45%
按下载量换算106

Cursor

19.37%
按下载量换算67

Gemini CLI

8.51%
按下载量换算30

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills