원클릭으로
adv-slop-detection
AI-generated code quality detection via AST, regex, and heuristic analysis
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
AI-generated code quality detection via AST, regex, and heuristic analysis
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Architecture inconsistency detection via deterministic tools, research fallback, and AI heuristic
Backend technology stack evaluation — choose boring technology scaled by project context. Use when selecting languages, databases, async infra, or API styles for new or existing backends.
Competitive intelligence research methodology for source code and public information comparison
Improvement-discovery methodology for current-state, LBP, and external landscape analysis
Backlog reconciliation, bug priority assignment, and ROADMAP.md regeneration methodology
Codebase reconnaissance skill for mapping structure, hotspots, and risks
| name | adv-slop-detection |
| description | AI-generated code quality detection via AST, regex, and heuristic analysis |
| keywords | ["slop","quality","ai-code","code-smells","detection","technical-debt","cleanup"] |
| metadata | {"priority":"medium","source":"slop-smells.yaml"} |
Reusable methodology for /adv-slop-scan and hardening flows. Detect AI-generated quality issues with deterministic checks first, heuristic scanners second. Command owns orchestration, state mutation, and gate flow; skill gives read-only method.
Canonical source: slop-smells.yaml owns smell IDs and definitions. Reference it; do not fork catalog here.
| Doc | Use |
|---|---|
CATEGORIES.md | Phase 1 thresholds, AST tools, regex/signal layer, confidence defaults, Phase 2 scanner buckets |
STRUCTURAL_CORRECTNESS.md | QUAL-012 boundary rules and false-positive controls |
DEAD_CODE.md | MAINT-003 deletion_candidate subtypes, detector tools, safety, and fallback behavior |
Core Phase 1 categories: debug artifacts, type evasion, incomplete work, error suppression, hardcoded environment, AI signatures, security smells, defensive overkill, dead code/deletion candidates, structural-correctness bypass.
Preferred tools:
Fallbacks are allowed only with lower confidence and explicit detectionMethod: "degraded".
Default thresholds from features.slop_scan:
| Key | Default |
|---|---|
nesting_depth_threshold | 4 |
defensive_guard_threshold | 3 |
complexity_threshold | 10 |
ast_timeout_ms | 10000 |
Deprecated aliases (nesting_depth, defensive_guard, complexity) may be accepted with warnings, but canonical docs/config/schema use only the threshold-suffixed names above.
bin/adv slop-scan [path] --json emits slop_scan_report.v1; deterministic Phase 1 facts and detector coverage come from that typed report. Semgrep/security-gate overlap is reported as externally_covered, not duplicated as local findings.
Deletion candidates are MAINT-003 deletion_candidate findings. Subtypes: unused dependency, unused export, unused file, unreachable branch, uncallable private symbol, impossible feature-flag path.
Deletion safety: do not auto-delete. Heuristic-only/text-only unused-code guesses are not removal proof. Uncertain deletion candidates → low-confidence / user-review + non-blocking actionability unless structural source/tool evidence proves safe review.
AI-assisted semantic detection uses first-level explore scanners only. Phase 1 owns syntax and simple pattern signals; Phase 2 looks for semantic problems, duplication, regressions, and contextual false positives.
Scanner buckets: Hallucination, Structure, Quality, Documentation, Dependency, Maintainability, AI-Specific, Performance, Test.
Cap each file at 3 scanners. Priority: Hallucination, Structure, Quality; add only strongest specialized bucket.
Every scanner prompt includes workdir, active change context, affected files, task evidence summary, smell definitions, file list, novelty check, category focus, and JSON findings schema.
Mandatory bans for scanner workers:
/adv-* slash commands.Timeout → TIMEOUT; failure → INCOMPLETE; all fail → report deterministic findings only and suggest --phase 1 or retry.
Each finding includes: id, name, severity, file, line, description, fix, confidence, detectionMethod, grouping, actionability, phase. Add nestingDepth and complexity when relevant.
| Level | Criteria |
|---|---|
| CRITICAL | Security/data-loss risk or authoritative-but-wrong logic, e.g. HALLU-006, QUAL-001, QUAL-003 |
| HIGH | Silent failures, context amnesia, e.g. QUAL-002, QUAL-012, STRUCT-002 |
| MEDIUM | Maintainability debt, e.g. STRUCT-004, QUAL-006 |
| LOW | Style/minor inefficiency, e.g. STRUCT-003 |
High/medium confidence + source evidence → actionable/blocking. Low confidence or fixture/context uncertainty → low-confidence/non_blocking. Deletion/protected-surface uncertainty → user-review/review_required.
Cross-scanner label mapping: slop scan keeps severity labels CRITICAL|HIGH|MEDIUM|LOW; architecture scan uses review-style labels blocker|major|minor|nit. Treat CRITICAL≈blocker, HIGH≈major, MEDIUM≈minor, and LOW≈nit when comparing scanner reports, but keep each scanner's native labels in its own output schema.
file:line + smell ID; prefer richer Phase 2 description.Text report includes SLOP SCAN REPORT, scope, languages, prominent coverage warnings, severity summary, category summary, detector coverage, findings, and evidence fields. No findings → [OK] No slop detected. only when important detector coverage is complete.
Text report includes a scanner coverage summary for skipped, failed, timed-out, unavailable, externally_covered, and degraded detectors. JSON report includes scope, summary.bySeverity, summary.byCategory, findings[] with diagnostic fields, coverage.detectors[], and coverage.falsePositiveProtections.
Context Boundary: context packets are orientation only, not finding locations. Do not report against ADV change summaries, task evidence, examples, fixture descriptions, exa/context7 snippets, or archived notes unless the referenced source file itself contains the smell.
Source Evidence Requirement: Every finding must cite a target source file via file:line or scoped source evidence. No evidence → omit or mark confidence: low. Low-confidence findings are non-blocking by default.
Confidence anchors: AST-backed structural findings default to confidence: high; Regex-only defensive-overkill findings default to confidence: medium; Required degraded/failed/timed-out/unavailable/applicable-skipped detector coverage fails with SLOP_SCAN_DEGRADED instead of becoming a low-confidence fallback finding; AI-signature findings default to confidence: low unless paired with concrete maintainability/security impact.
Report QUAL-012 structural_correctness_bypass when Heuristic/fuzzy/LLM decisions owning correctness boundaries decide security, persistence, workflow state, gate completion, spec compliance, or input recognition/classification. Evidence must cite boundary + missing structural guard.
Coverage output uses coverage.detectors[] with states run, skipped, degraded, failed, timed_out, unavailable, and externally_covered, plus coverage.falsePositiveProtections.
The command derives a mandatory rewrite assessment after aggregation and before report assembly. Skill owns the evidence rules:
file:line).No definite conclusion from scan evidence.SLOP_SCAN_DEGRADED) forces status: "indeterminate" — never a no-change conclusion.DEAD_CODE.md are unchanged.rewriteAssessment JSON only; does not extend slop_scan_report.v1.slop-smells.yaml.