원클릭으로
scan
Full-codebase documentation drift scan — find every doc that references code reality incorrectly
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Full-codebase documentation drift scan — find every doc that references code reality incorrectly
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Make a codebase agent-ready by scaffolding AGENTS.md, ARCHITECTURE.md, and docs/ structure. Analyzes codebase structure, generates documentation artifacts following progressive disclosure patterns, and audits existing artifacts for staleness and coherence. Use when improving a codebase for AI agent work.
Review pending drift warnings and fix affected documentation or dismiss false positives
Configure doc-sentinel drift detection for a project — detect docs root, watched files, and ignore patterns
This skill should be used to run an Agent-Ready Codebase Assessment — scoring a codebase across 8 dimensions with parallel agents, producing a weighted score (0-100), band rating, and improvement roadmap. Supports Ruby, Python, PHP, TypeScript, JavaScript, Go, Java, Scala, and Rust.
Audit codebase documentation for accuracy, completeness, and freshness. Compares docs against actual code structure, auto-fixes small discrepancies, reports structural changes. Works with any language/framework. Companion to agent-ready.
Use this skill when planning and designing gridfinity baseplates for 3D printing. This includes calculating optimal grid sizes from given measurements, determining how to slice large grids into printable chunks based on printer bed dimensions, and calculating padding requirements for non-exact fits. The skill handles both metric and imperial measurements and provides guidance for using gridfinity.perplexinglabs.com to generate the actual STL files.
| name | scan |
| description | Full-codebase documentation drift scan — find every doc that references code reality incorrectly |
| disable-model-invocation | true |
| allowed-tools | Read, Bash, Glob, Grep |
Deep scan that cross-references all documentation against the current state of the codebase. Unlike the hook (which checks only files changed in a commit), this scans everything.
This skill is read-only — it reports drift but does not modify files.
cat .doc-sentinel.json 2>/dev/null || echo "No config — using defaults"
Defaults if no config:
docs_root: docswatch_files: AGENTS.md, ARCHITECTURE.md, README.md, CLAUDE.mdignore_sources: *.test.*, *.spec.*, __tests__/**Collect all doc files:
# docs/ directory
find docs/ -name '*.md' -type f 2>/dev/null | sort
# Top-level docs
for f in AGENTS.md ARCHITECTURE.md CLAUDE.md README.md CHANGELOG.md; do
[ -f "$f" ] && echo "$f"
done
Plus any watch_files from config.
For each doc file, extract references to source code:
Search for paths that look like source file references:
# Extract paths from backticks, links, and code blocks
grep -oE '`[a-zA-Z0-9_./-]+\.(ts|js|py|rb|go|rs|java|tsx|jsx)`' "$doc_file"
grep -oE '\b(src|lib|app|packages)/[a-zA-Z0-9_./-]+' "$doc_file"
Extract shell commands documented in the file:
# Find code blocks with shell commands
grep -E '^\$|^pnpm |^npm |^yarn |^cargo |^go |^bundle |^python |^make ' "$doc_file"
grep -oE '(localhost|127\.0\.0\.1):[0-9]+' "$doc_file"
grep -oE ':[0-9]{4,5}\b' "$doc_file"
grep -oE '\$\{?[A-Z_][A-Z0-9_]*\}?' "$doc_file"
grep -oE '`[A-Z_][A-Z0-9_]*`' "$doc_file"
For each extracted reference, check if it still holds:
# For each extracted path
[ -f "$path" ] && echo "OK: $path" || echo "DRIFT: $path — file not found"
[ -d "$dir" ] && echo "OK: $dir" || echo "DRIFT: $dir — directory not found"
For package.json scripts:
# Check if documented npm/pnpm scripts exist
jq -r '.scripts | keys[]' package.json 2>/dev/null
Cross-reference ports mentioned in docs against:
docker-compose.yml / compose.yml port mappings.env / .env.example port variables# Check if documented env vars appear in source
grep -r "$ENV_VAR" src/ lib/ app/ --include='*.ts' --include='*.js' --include='*.py' -l 2>/dev/null
# CLAUDE.md should symlink to AGENTS.md (if using agent-ready convention)
[ -L "CLAUDE.md" ] && readlink CLAUDE.md || echo "Not a symlink"
For each doc file, compare modification dates:
# When was the doc last modified?
git log -1 --format="%ai" -- "$doc_file"
# When were its referenced source files last modified?
git log -1 --format="%ai" -- "$source_file"
Freshness scoring:
| Score | Label | Criteria |
|---|---|---|
| 0 | Fresh | Doc modified more recently than all referenced sources |
| 1 | Current | Doc modified within 7 days of source changes |
| 2 | Stale | Source changed 7-30 days after doc last updated |
| 3 | Very Stale | Source changed >30 days after doc last updated |
ADR files are exempt from freshness scoring — they are point-in-time records.
Output a structured drift report organized by severity:
# Documentation Drift Report
Generated: YYYY-MM-DD HH:MM
## Critical Drift (broken references)
| Doc | Reference | Issue |
|-----|-----------|-------|
| ARCHITECTURE.md | `src/old-module/` | Directory not found |
| AGENTS.md | `pnpm studio` | Script not in package.json |
## Stale References (code changed, doc not updated)
| Doc | Source File | Doc Last Updated | Source Last Updated | Freshness |
|-----|------------|------------------|---------------------|-----------|
| docs/api.md | src/routes/auth.ts | 2026-01-15 | 2026-04-01 | Very Stale |
## Warnings
| Doc | Issue |
|-----|-------|
| README.md | Port 3000 mentioned but compose.yml maps to 4000 |
| AGENTS.md | Env var `OLD_VAR` not found in source |
## Summary
- X critical drift(s) — broken paths, missing files
- Y stale reference(s) — code changed without doc updates
- Z warning(s) — potential inconsistencies
- N docs scanned, M references checked