advise
Critical thinking analysis - validates alignment, challenges assumptions, identifies risks
Comprehensive quality audit - code quality, documentation, coverage, security
$ npx -y skills add akaszubski/autonomous-dev --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/auditContext preview
What this command does when you run it.
Comprehensive quality audit - code quality, documentation, coverage, security
name: audit description: Comprehensive quality audit - code quality, documentation, coverage, security argument-hint: Optional flags - --quick, --security, --docs, --code, --claude, --tests, --genai allowed-tools: [Task, Read, Grep, Glob] disable-model-invocation: true user-invocable: true user_facing: true
Run automated quality checks and generate a comprehensive report. Catches issues early before they accumulate.
ARGUMENTS: {{ARGUMENTS}}
Parse the ARGUMENTS for optional flags:
If no flags provided, run full audit (all categories).
Invoke the reviewer agent to analyze code patterns (bare except, print statements, broad exceptions).
Invoke the doc-master agent to validate documentation consistency (component counts, cross-references, drift detection).
Invoke the test-coverage-auditor agent to analyze test coverage (module coverage, gaps, uncovered code).
Invoke the security-auditor agent to scan for vulnerabilities (hardcoded secrets, shell=True, path traversal, OWASP checks).
When `--genai` is passed (or as part of full audit), perform GenAI test analysis:
**STEP 1: Detect GenAI infrastructure** Check if `tests/genai/conftest.py` exists.
**STEP 2: Discover functional test gaps** Use an Explore agent to scan the codebase and identify what SHOULD have GenAI functional tests but doesn't:
| Scan For | Test Category | Example Test | |----------|--------------|--------------| | API routes (`**/routes/*.py`, `**/views.py`) | API quality | Error messages helpful, schemas consistent | | Config files (`**/config*.py`, `**/*_config.py`) | Config sanity | Defaults reasonable, ranges valid | | Schema/model files (`**/schemas/*.py`, `**/models.py`) | Schema quality | Types sensible, required fields present | | Business logic (`**/engine*.py`, `**/service*.py`) | Domain correctness | Rules make sense, edge cases handled | | Validators (`**/valid*.py`) | Validation quality | Error messages clear, rules complete |
**STEP 3: Generate functional tests** For each gap found, invoke test-master agent to write GenAI functional tests in `tests/genai/test_<category>.py`. Tests must use the hybrid pattern: 1. Deterministic extraction (grep/regex/AST) 2. GenAI semantic judgment via `genai.judge()`
**STEP 4: Run and validate**
GENAI_TESTS=true pytest tests/genai/ -v --no-cov 2>&1 | tail -20
Report: total tests, pass/fail, any flaky tests that need threshold tuning.
When `--test-tracing` is passed (or as part of full audit), perform test-to-issue tracing:
**STEP 1: Scan test references**
import sys, os as _os
for _p in ('.claude/lib', 'plugins/autonomous-dev/lib', _os.path.expanduser('~/.claude/lib')):
if _os.path.isdir(_p):
sys.path.insert(0, _p)
break
from test_issue_tracer import TestIssueTracer
tracer = TestIssueTracer(Path('.'))
report = tracer.analyze()**STEP 2: Display report** Output `report.format_table()` as markdown. The report includes:
**STEP 3: Summary** This is informational only — it does NOT block the audit. Include findings in the overall audit report.
Supported reference patterns: `TestIssue(\d+)`, `test_issue_(\d+)`, docstring `#(\d+)`, `# Issue: #(\d+)`, `GH-(\d+)`, `@pytest.mark.issue(\d+)`.
Use the doc-master agent to compile all findings into a report at `docs/sessions/AUDIT_REPORT_<timestamp>.md`
---
| Category | Agent | Checks | |----------|-------|--------| | Code Quality | reviewer | Bare excepts, print statements, broad exceptions | | Documentation | doc-master | Component counts, cross-refs, drift | | Test Coverage | test-coverage-auditor | Module coverage, gaps | | Security | security-auditor | Secrets, shell=True, path traversal | | GenAI UAT | test-master | Functional semantic tests, config/API/domain validation |
**Time**:
---
# Full comprehensive audit /audit # Quick code quality scan only /audit --quick # Security-focused audit /audit --security # Documentation alignment only /audit --docs # Code quality scan only /audit --code # CLAUDE.md structure validation (replaces /audit-claude) /audit --claude # Test coverage analysis (replaces /audit-tests) /audit --tests /audit --tests --layer unit # GenAI UAT retrofit - scaffold + generate functional tests /audit --genai
---
Generates a report at `docs/sessions/AUDIT_REPORT_<timestamp>.md`
The report includes:
---
Regular audits prevent:
**Recommendation**: Run weekly on m
A harness that wraps Claude Code with enforcement, specialist agents, and alignment gates to deliver consistent, production-grade software engineering outcomes.
Repo: akaszubski/autonomous-dev
Critical thinking analysis - validates alignment, challenges assumptions, identifies risks
Autonomous experiment loop — hypothesize, modify, benchmark, commit or revert
Create GitHub issue with automated research (--quick for fast mode)
Autonomous queue drainer — picks the top /triage cluster, applies safety gates, drains via /implement --issues, pushes, deploys.
Governance, Observability, Audit — autonomous infra-health observer for autonomous-dev itself. Subcommands: start | stop | status.