视觉画布设计
canvas-design
基于设计原则创作静态视觉作品,用于海报与品牌图形。
doc-drift-detector【文档与办公】Detect documentation drift against code changes, score staleness, validate API docs via AST parsing, and audit link integrity. Use when docs fall out of sync with code, preparing releases, running CI doc gates, or auditing doc accuracy.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
The agent detects documentation drift by mapping code directories to their docs, comparing git modification histories, extracting Python function signatures via AST, validating every markdown link and anchor, and scoring freshness on a weighted 0-100 scale. All four CLI tools use the Python standard library only.
[AUTO]/[SEMI]/[MANUAL] for fix routing.Before running detection, confirm these inputs. If any is unknown or vague, ASK — do not assume:
drift_analyzer.py vs doc_staleness_scorer.py vs api_doc_validator.py vs link_checker.py)--min-severity/--threshold and the exit-code gate)Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.
| Tool | Purpose | Command |
|---|---|---|
drift_analyzer.py | Full drift analysis between code and docs | python scripts/drift_analyzer.py <repo> --min-severity high --json |
doc_staleness_scorer.py | Score documentation freshness 0-100 | python scripts/doc_staleness_scorer.py <repo> --threshold 60 |
api_doc_validator.py | Validate API docs against Python source (AST) | python scripts/api_doc_validator.py <src> <docs> --recursive |
link_checker.py | Audit all markdown links and anchors | python scripts/link_checker.py <repo> --broken-only |
All tools: Python 3.8+ stdlib only, --json and --help, non-zero exit codes for CI, any OS.
Load the reference that matches the task — keep this file lean and pull detail on demand:
| Asset | Description |
|---|---|
| Drift Report Template | Template for drift analysis reports |
| Sample Drift Data | Sample JSON for testing and demonstration |
Covers:
Does NOT cover:
--check-external performs one-shot HEAD requests but does not provide continuous monitoring; use the senior-devops skill for uptime dashboards[AUTO], [SEMI], or [MANUAL] but do not generate replacement text; use the code-reviewer skill for AI-assisted doc suggestions| Skill | Integration | Data Flow |
|---|---|---|
| code-reviewer | Include drift report in PR review comments | drift_analyzer.py --json output feeds into review checklists as a documentation health section |
| senior-devops | Add staleness gate to CI/CD pipelines | doc_staleness_scorer.py --threshold 50 returns exit code 1 on failure, blocking deploys |
| senior-qa | Documentation quality as part of QA acceptance | link_checker.py --json output merges into QA dashboards alongside test coverage metrics |
| senior-fullstack | Validate generated project docs post-scaffold | Run api_doc_validator.py against scaffolded docs/ directory to confirm generated API docs match source |
| senior-secops | Audit security documentation currency | drift_analyzer.py --scope security/ detects when security docs fall behind policy changes |
| senior-architect | Architecture decision record (ADR) freshness | doc_staleness_scorer.py --required-sections "Status,Context,Decision,Consequences" validates ADR completeness |