lewibs/dark-factory/detect-drift

Claude Code and agent skill by lewibs/dark-factory

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Audit parity between docs/docs/ system documentation and actual implementation. Detects stale references, undocumented flows, and broken behavioral claims. Use when validating whether documented systems match implemented code.

Install

npx vskill@latest install lewibs/dark-factory/detect-drift

SKILL.md

The same SKILL.md was published earlier as lewibs/dark-factory/detect-drift.

Required

Use this skill whenever drift may exist between docs/docs/ system documentation and code.

  1. Determine audit target:
  • Docs audit: targets docs/docs/*.md — checks documented system behavior against code.
  • A specific doc file can be targeted instead of the full directory.
  1. Build inventory and baseline checklist artifacts.
  • Enumerate all files in docs/docs/*.md. Check that each documented system still exists in the codebase.
  • Generate checklists:
  • python ~/.dark-factory/agents/documentation/skills/detect-drift/scripts/generate_checklists.py
  • Review:
  • tmp/drift-checklists/DRIFT-SUMMARY.md
  • tmp/drift-checklists/docs/*.md
  • Temporary artifact rule: files under tmp/drift-checklists/ are process-only. Delete them after reporting findings.
  1. Validate references (docs -> code).
  • For each doc, inspect:
  • ### Flow: <file.function>, <test-path|N/A> headings
  • Core files lists
  • Mermaid node file references
  • Confirm referenced files exist.
  • Flag broken paths and stale renamed/deleted references.
  1. Validate test mapping for each flow (docs -> tests).
  • For every flow row/heading with a concrete test path, confirm the test file exists.
  • Confirm at least one test in that file is relevant to the documented flow.
  • If a flow is N/A, treat as acceptable only when the doc explicitly justifies it.
  1. Validate code-to-doc parity with a second agent (code -> docs).
  • Spawn a second agent dedicated to code-first discovery.
  • Primary agent responsibility: doc-first verification (steps 2-4).
  • Second agent responsibility:
  • scan changed and adjacent code paths,
  • identify major implemented flows not represented in any doc,
  • report missing coverage and suggested owning doc.
  • Merge findings and de-duplicate before final report.
  1. Validate docs do not over-claim implementation.
  • If a doc claims a system behavior, verify the code matches.
  • Flag behavior documented as implemented when code is absent or materially different.
  1. Produce a structured findings report.
  • Severity levels: Critical, Major, Minor, Nitpick.
  • Include exact path:line references in docs/tests/code.
  • Include matrix buckets:
  • extra: doc entries that have no valid code/test target (stale or deleted)
  • missing: implemented flows/surfaces not represented in any doc
  • different: doc and code both exist but contract or test mapping diverges
  • wrong: ownership or boundary claims attached to the wrong doc
  1. Resolve or document deferrals.
  • Fix straightforward drift immediately when requested.
  • For deferred items, add explicit TODOs with owning doc and file targets.
  1. Cleanup generated artifacts.
  • After providing the findings summary, delete generated checklist files:
  • rm -rf tmp/drift-checklists

Context

This skill is a bidirectional contract audit:

  • Docs -> Code: ensure documented flows/files/tests are real.
  • Code -> Docs: ensure major implemented flows are documented.
  • Docs -> Checklist Artifacts: create actionable audit lists per doc.

The goal is to prevent silent drift between source-of-truth documentation and actual implementation.

Checklist Generation

  • Generator: agents/documentation/skills/detect-drift/scripts/generate_checklists.py
  • Templates:
  • agents/documentation/skills/detect-drift/templates/plan-checklist-template.md
  • Output (temporary):
  • tmp/drift-checklists/DRIFT-SUMMARY.md
  • tmp/drift-checklists/docs/*.md

Troubleshooting

  • Doc references deleted files:
  1. Update paths to new locations or mark as intentionally deleted migration history.
  2. Remove temporary refactor tables when migration is complete.
  • Tests exist but do not exercise documented flow:
  1. Add/adjust tests or narrow doc claims.
  2. Do not keep broad claims without executable coverage.
  • Code has major undocumented behavior:
  1. Add flow rows/types to the owning doc.
  2. If ownership is unclear, define ownership first, then document.
  • Second agent cannot be used:
  1. Continue with local code-first pass.
  2. Mark report as single-agent audit and note reduced confidence.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository forks
1
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/lewibs/dark-factory/detect-drift/badge)](https://verified-skill.com/skills/lewibs/dark-factory/detect-drift)

Something wrong with this skill or its page? Tell us.