All commands

Harness Component — Command

Ai Hygiene Audit

Audit codebase for AI-generated code quality issues (vibe coding, Tab bloat, slop)

Runtimeuniversal
Intentbuild

Definition

AI Hygiene Audit Command

Detect AI-specific code quality issues that traditional bloat detection misses.

When To Use

Use this command when you need to:

  • Suspected AI-generated code quality issues
  • Before major releases to check for hidden debt
  • Reviewing PRs with suspected AI generation
  • After rapid AI-assisted development sprints

When NOT To Use

  • Quick fixes that don't need structured workflow
  • Already know the specific issue - fix it directly

Why This Exists

AI coding creates different problems than human coding:

  • 2024: First year copy > refactor in git history (GitClear)
  • Tab-completion bloat: Similar code repeated instead of abstracted
  • Happy path bias: Tests verify success, miss failures
  • Slop: Documentation that sounds right but lacks depth

Usage

# Full AI hygiene audit
/ai-hygiene-audit

# Focus on specific area
/ai-hygiene-audit --focus git          # Git history patterns
/ai-hygiene-audit --focus duplication  # Tab-completion bloat
/ai-hygiene-audit --focus tests        # Happy-path-only detection
/ai-hygiene-audit --focus docs         # Documentation slop
/ai-hygiene-audit --focus code-debt    # Code-level AI debt signals

# Generate report file
/ai-hygiene-audit --report ai-hygiene-report.md

# Set pass/fail threshold (0-100)
/ai-hygiene-audit --threshold 70

Options

OptionDescriptionDefault
--focus <area>Limit to: git, duplication, tests, docs, deps, code-debtall
--report <file>Save detailed report to filestdout
--threshold <score>Fail if hygiene score below thresholdnone
--jsonOutput structured JSON for CI integrationfalse

What It Detects

Git History Patterns

  • Massive single commits: 500+ line additions (vibe coding signature)
  • Refactoring deficit: <5% of commits involve refactoring
  • Churn spikes: Code revised within 2 weeks of creation

Duplication (Tab-Comp

View full source (5,352 chars) on GitHub

More from athola/claude-night-market