audit_codebase_quality
Run a read-only AST code quality audit to detect code smells, complexity, duplication, and exposed credentials, then return severity-rated remediation steps.
Instructions
Performs an AST static code smell audit, cyclomatic complexity check, copy-paste duplicity scan, and 100% Zero-Leak security audit for exposed credentials.
Behavior:
Read-only: Evaluates AST nodes and regex patterns; does not modify or delete files.
Idempotent: Produces consistent quality diagnostics for the same code.
100% Offline: Fully private local analysis; zero external requests.
Usage Guidelines:
When to use: Run as a pre-commit or pre-PR code health audit to identify complex routines (> 30 lines, > 5 args), missing docstrings, architectural boundary violations, and hardcoded secrets.
Sibling Routing: If you only need to verify zero hardcoded secrets/API keys, use 'verify_zero_leak_security'. If you only want unused function detection, use 'find_dead_code'. If you only want duplicate logic blocks, use 'find_code_duplicity'.
Returns: Comprehensive diagnostic Markdown report with severity ratings (T-001 Security, T-002 Boundaries, T-003 Contracts, T-004 Complexity), line numbers, and actionable remediation steps.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No | Optional path to a specific file to audit. If empty, audits all code files in the workspace. | |
| project_root | No | Root directory of the repository to audit (default: current directory). | . |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |