with one click
adv-audit
Spec/implementation drift audit methodology for ADV capabilities
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Spec/implementation drift audit methodology for ADV capabilities
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Architecture inconsistency detection via deterministic tools, research fallback, and AI heuristic
AI-generated code quality detection via AST, regex, and heuristic analysis
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
| name | adv-audit |
| description | Spec/implementation drift audit methodology for ADV capabilities |
| keywords | ["adv","audit","specs","drift","quality-gates","orphan-code","conformance"] |
| metadata | {"priority":"medium","source":"adv-audit-command"} |
Methodology for /adv-audit: compare specs with implementation, detect drift/conflicts/orphans, and produce objective quality-gate result. Skill is read-only guidance; command owns sub-agent dispatch and metadata writes.
capability optional.--all default when no capability.--json for structured output.--strict for zero-tolerance gates.| Doc | Use |
|---|---|
REPORT_SCHEMA.md | Worker packet, finding schema, text/JSON report shape |
| Metric | Threshold |
|---|---|
HIGH drift (MUST/SHALL violations) | 0 |
MEDIUM drift (SHOULD violations) | ≤3 |
| Orphaned code | ≤3 files |
| Spec conflicts | 0 |
| Coverage | ≥80% |
| CRITICAL ambiguity | 0 |
| HIGH ambiguity | ≤3 |
All drift/conflict/orphan/ambiguity thresholds → 0. Coverage → 100%.
clarify_enforcement | Behavior |
|---|---|
off | Skip ambiguity detection |
advisory | Include findings in report; do not affect health status |
strict | Enforce CRITICAL=0 and HIGH thresholds |
Extract requirement ID/title, normative language (MUST, SHALL, SHOULD, MAY), Given/When/Then scenarios, file/code refs, and malformed/ambiguous requirement smells.
Inline pure-function scan using runSpecAmbiguityChecks(markdown, capability) with B/F/S/Q/E taxonomy:
| Category | Focus | Example trigger |
|---|---|---|
| B — Boundaries | Vague scope without explicit in/out | "handle all edge cases" |
| F — Functional | Vague behavioral terms, missing scenarios | "appropriate behavior" |
| S — Completion Signals | Subjective success criteria | "fast response" without threshold |
| Q — Quality Attributes | Unquantified NFR claims | "scalable" without metric |
| E — Error Handling | Failure potential without failure scenarios | Describes retry without timeout/fallback |
Severity: CRITICAL | HIGH | MEDIUM | LOW. Each finding includes verbatim specText, issue, and fix.
Skipped when clarify_enforcement: 'off'. Advisory mode includes findings without affecting gates. Strict mode enforces thresholds.
Verify file refs exist, build bidirectional spec↔code map, calculate coverage:
coverage = mapped_requirements / total_requirements
Identify unmapped specs and implementation files with no spec anchor.
Cross-reference specs for contradictions, overlapping ownership, stale refs, terminology mismatch, and mutually exclusive scenarios.
Compare requirements to code/tests. Detect constraint drift, missing implementation, test/spec mismatch, and normative violations.
| Severity | Meaning |
|---|---|
| HIGH | MUST/SHALL violation |
| MEDIUM | SHOULD violation |
| LOW | MAY or low-risk inconsistency |
| REVIEW | needs human judgment |
Source file is orphan candidate when >50 lines and not mapped to any spec.
Exclude config, types-only files, generated files, test utilities, and fixtures. Categorize as undocumented feature, dead code, or infrastructure.
Aggregate drift by severity, conflicts, unmapped specs, orphan files, malformed specs, and coverage.
Also aggregate ambiguity findings by severity when enabled.
| Health | Criteria |
|---|---|
| ALIGNED | all quality gates pass |
| DRIFT_DETECTED | any gate fails, but no HIGH drift/conflict/ambiguity |
| MAJOR_DRIFT | HIGH drift, conflicts, or CRITICAL ambiguity present |
Ambiguity-promoted health:
clarify_enforcement: 'advisory' → findings in report only, no health promotionquestion.question only for explicit remediation/debt-priority choices.