From dev-team-kit-fv
Runs drift sensors across the codebase to detect dead code, large files, stale todos, outdated deps, doc-code mismatch, and missing test files. Supports --only, --threshold-lines, --format flags.
How this command is triggered — by the user, by Claude, or both
Slash command
/dev-team-kit-fv:drift-scan [--only sensor1,sensor2] [--threshold-lines 500] [--format markdown|json]This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# /drift-scan — Continuous Drift Detection **Objetivo:** detectar **drift gradual** que os hooks no change-time (PreToolUse, PostToolUse) não pegam. Rodar contra todo o codebase periodicamente. Inspirado em Birgitta Böckeler (Thoughtworks) — _"continuous drift sensors that monitor what gradually accumulates: dead code, dependency staleness, test coverage degradation"_. Ver `docs/inspiration/harness-engineering.md`. ## Sensores disponíveis | Sensor | O que detecta | Custo | |---|---|---| | `large-files` | Arquivos > 400 linhas (configurável) | s | | `dead-code` | Arquivos com exports sem...
Objetivo: detectar drift gradual que os hooks no change-time (PreToolUse, PostToolUse) não pegam. Rodar contra todo o codebase periodicamente.
Inspirado em Birgitta Böckeler (Thoughtworks) — "continuous drift sensors that monitor what gradually accumulates: dead code, dependency staleness, test coverage degradation". Ver docs/inspiration/harness-engineering.md.
| Sensor | O que detecta | Custo |
|---|---|---|
large-files | Arquivos > 400 linhas (configurável) | s |
dead-code | Arquivos com exports sem importadores detectados | s-min |
stale-todos | TODOs/FIXMEs > 90 dias (via git blame) | min |
dep-staleness | Deps com major version atrasada (npm outdated) | min |
doc-code-drift | Docs referenciando arquivos que não existem mais | s |
test-coverage | Arquivos sem teste correspondente | s |
/drift-scan # full scan, todos os sensores
/drift-scan --only large-files,stale-todos # apenas 2 sensores
/drift-scan --threshold-lines 500 # threshold custom
/drift-scan --format json # output JSON
Rode o script e mostre o output:
node "${CLAUDE_PLUGIN_ROOT}/scripts/drift-scan.mjs" $ARGUMENTS
Após o output, interprete os 3 maiores insights:
| Finding | Próximo comando |
|---|---|
Muitos large-files | /simplify ou /run-program refactor-safely |
Muitos dead-code | Revisão manual (sensor pode ter false positives) — verificar dynamic imports antes de deletar |
Muitos stale-todos | /auto pra resolver os críticos ou converter em issues |
dep-staleness com major bumps | /run-program refactor-safely por dep |
doc-code-drift | /auto para atualizar docs ou deletar referências |
| Pouca cobertura | Skill 05 (/test) ou skill 37 (TDD) |
Caveats importantes:
import(varName)) não são detectados → sensor pode marcar como dead falsamenteSempre revisar manualmente antes de deletar.
coverage-quality (mutation testing summary)bundle-size-drift (compara bundle vs último release).bot/drift-history.jsonl pra comparações temporais/schedule weekly /drift-scanscripts/drift-scan.mjs — enginedocs/inspiration/harness-engineering.md — Birgitta Böckelerpolicies/harness-categories.md — sensors categorizadospolicies/quality-gates.md — gates derivados/savings — perspectiva de savings (complementar)npx claudepluginhub felvieira/claude-skills-fv --plugin dev-team-kit-fv/candySpawns 5 parallel agents to hunt dead code, broken logic, and security risks across the codebase, reporting only high-impact findings in strict format.
/code-reviewRuns enabled review agents on target files or git changes after lint/type-check/semgrep gates, producing a structured summary or JSON.
/full-reviewOrchestrates phased multi-dimensional code reviews across architecture, security, performance, testing, and best practices using subagents. Produces structured reports in .full-review/. Accepts target and optional flags.
/dead-codeReports unreachable files, unused exports, and zombie packages tiered by confidence using Repowise's graph-reachability analysis. Supports filtering by path, confidence level, and kind.
/tech-reviewPerforms a technical health check on a component, module, or full codebase — evaluating architecture, debt, patterns, dependencies, test coverage, and risks. Supports --focus and --deep flags.
/auditRuns mechanical verification and comprehensive audit of the codebase. Invokes audit skill with provided arguments for customized checks.