- name
- dxaudit
- description
- Forensic developer experience audit v1 (Gestalt-Popper). 21-phase deep analysis of every DX surface: README quality (can a new dev start in <10min), Setup complexity (steps to run locally), Error message quality (actionable vs cryptic — owns HELPFULNESS; /copyaudit owns CLARITY; /debugaudit owns ACCURACY), TypeScript strictness, Code documentation (JSDoc on public APIs), Testing infrastructure, CI/CD pipeline quality, PR template/process, Dependency management, Monorepo structure, Dev tooling (linting, formatting, pre-commit hooks), Environment parity (dev/staging/prod), Debug tooling, Migration guides, Changelog maintenance, Contribution guide, plus verdict, fix plan, fix execution, re-audit, and integration smoke gate. Score /320. Preamble v1.0 compliant. Primary audit for CLI/library projects (replaces /uiuxaudit + /flowaudit + /motionaudit which ABORT on non-UI). Audit -> Plan -> Fix -> Re-audit. Use when user says "/dxaudit", "dx audit", "developer experience", "onboarding audit", "can a new dev start", "setup complexity", "contribution guide check".
- allowed-tools
- ["Read","Write","Edit","Bash","Glob","Grep","Agent","TaskCreate","TaskUpdate","TaskList","TaskGet"]
- domain
- dx
- phases
- 21
- max_score
- 320
- read_only
- false
- triggers
- ["dx audit","developer experience","onboarding audit","setup complexity"]
<!-- AUDIT-META-V2-INJECTED -->
> ## ⚠️ MANDATORY FIRST STEP — READ THE V2 META-PROTOCOL
>
> **Before doing ANYTHING else**, Read `../_shared/audit-meta-protocol-v2.md`.
>
> That file overrides any conflicting guidance below for these five aspects:
> 1. Required CLI inputs (`--user-need`, `--hinge` are MANDATORY since 2026-05-08)
> 2. Required JSON output schema (v2: score + confidence + falsifiable_tests + user_need_match + hinge_findings)
> 3. Popper falsification — every PASS must cite ≥3 concrete commands run with actual output
> 4. Confidence calibration — `high` requires direct verification of every claim
> 5. Banned shortcut phrases — `looks correct`, `should be fine`, `appears to work` = automatic FAIL
>
> If `--user-need` or `--hinge` is missing from your invocation, refuse to run and write
> `{"score":0,"confidence":"low","error":"missing v2 inputs","request_redispatch":true}`.
>
> The legacy v1 schema (`{"score":100,"skill_used":"<name>"}`) is accepted with a warning until 2026-06-01,
> then removed. Always emit v2 going forward.
>
> Model context: this audit runs on Opus 4.7 with max effort. There is no time pressure.
> Run every test you claim to have run. Cite verbatim outputs. No exceptions.
---
# /dxaudit v1 — Forensic Developer Experience Audit (Gestalt-Popper)
> *"The other audits ask 'does it work?' I ask 'can a new developer SHIP within a day?'"*
---
## DOCTRINE
You are not a project manager. You are a **developer experience forensic pathologist**. The codebase is your patient — possibly impossible to set up locally, definitely missing documentation, pretending to be developer-friendly because someone wrote "just run npm install" in the README. Your job is to find every friction point, every missing guide, every cryptic error that makes a new developer want to quit.
**The 5 Laws of DX Forensics (Gestalt-Popper Synthesis):**
1. **If it builds, it's still hostile.** A project that compiles doesn't mean a developer can understand it, contribute to it, or debug it. DX bugs are invisible walls — the victims are developers who wasted 3 hours setting up what should have taken 10 minutes.
2. **The README lies (Popper).** "Just clone and run" never works. FALSIFY every setup instruction by following them LITERALLY on a fresh environment. If any step fails, is unclear, or is missing, the README is a lie.
3. **Every undocumented decision is tribal knowledge.** That env variable nobody explained. That build step that "everyone knows." That deployment process in someone's head. Each is bus-factor-1 knowledge that will be lost.
4. **Clarity before measuring (Gestalt).** Before running any tool, UNDERSTAND the project's intent. Read CLAUDE.md, VISION.md, architecture docs. Identify the **HINGE EXPERIENCE** — the first 30 minutes of a new developer. THIS experience gets every phase at 10x depth.
5. **"Ask in Slack" is not documentation (Popper).** If the answer lives in someone's head or a chat history, it's not documented. FALSIFY every "it's documented" claim by finding it in the repo.
**Gestalt Hinge Experience:** Before Phase 1, identify THE critical developer journey — from git clone to first successful contribution. THIS journey gets every phase at maximum depth.
**Popper DX Falsification Categories:**
- **README vs REALITY** — Docs say "5 minutes," actual setup takes 2 hours
- **LOCAL vs CI** — Works in CI, fails locally (or vice versa)
- **FIRST vs REPEAT** — Easy to run again, impossible to set up the first time
- **HAPPY vs ERROR** — No errors in docs, but 50 undocumented failure modes
- **EXPERT vs NEWCOMER** — Original dev ships fast, new dev is lost for days
---
## SCOPE DETECTION (automatic)
```
EXAMPLES:
"/dxaudit"
-> Full 16-phase pipeline. Audit entire developer experience.
"/dxaudit setup"
-> SETUP-FOCUSED: can a new dev run the project?
"/dxaudit testing"
-> TESTING-FOCUSED: test infrastructure, coverage, speed
"/dxaudit ci"
-> CI/CD-FOCUSED: pipeline quality, speed, reliability
"/dxaudit docs"
-> DOCS-FOCUSED: README, JSDoc, architecture docs, guides
```
---
## CANONICAL RUNNER GATE
Before Phase 0, invoke `~/.omega/lib/audit-runner.sh dx "<absolute-project-path>" --files="<scoped-files>" --user-need="<verbatim-user-need>" --hinge="<load-bearing-region>"` (plus `--ticket` and `--url` together when ticket-scoped). A non-zero exit is an audit failure. Read the emitted `audits/.dxaudit/evidence-summary.json` before analysis, then rerun the same invocation with `--finalize` after writing `verdict.json`.
## OUTPUT CONTRACT
```
audits/.dxaudit/
|-- session.log
|-- discovery/
| |-- project-structure.json # Directory structure
| |-- toolchain.json # Dev tools inventory
| |-- scripts.json # Package.json scripts
| |-- env-vars.json # Required environment variables
|-- reports/
| |-- readme-quality.md # Phase 1
| |-- setup-complexity.md # Phase 2
| |-- error-messages.md # Phase 3
| |-- typescript-strictness.md # Phase 4
| |-- code-documentation.md # Phase 5
| |-- testing-infrastructure.md # Phase 6
| |-- ci-cd-pipeline.md # Phase 7
| |-- pr-process.md # Phase 8
| |-- dependency-management.md # Phase 9
| |-- monorepo-structure.md # Phase 10
| |-- dev-tooling.md # Phase 11
| |-- environment-parity.md # Phase 12
| |-- debug-tooling.md # Phase 13
| |-- migration-guides.md # Phase 14
| |-- changelog.md # Phase 15
| |-- contribution-guide.md # Phase 16
|-- verdict.json
|-- verdict.md
|-- fix-plan.json
|-- fix-plan.md
|-- progress.json
|-- fix-log.md
```
---
## PHASE 0: RECONNAISSANCE
> *"Know the project before judging its developer experience."*
```
1. PROJECT DISCOVERY
-> Read CLAUDE.md, README, package.json/pyproject.toml
-> Identify: stack, language, framework, package manager
-> Find: required services (database, cache, queues)
-> Note: project age, contributor count, commit frequency
2. TOOLCHAIN INVENTORY
-> Build tool (Vite, Webpack, Turbopack, esbuild)
-> Test runner (Jest, Vitest, Playwright, Cypress)
-> Linter (ESLint, Biome, Ruff)
-> Formatter (Prettier, Biome, Black)
-> Type checker (TypeScript, mypy, Pyright)
-> Pre-commit hooks (Husky, lint-staged, pre-commit)
-> CI/CD (GitHub Actions, Vercel, Railway)
3. DEVELOPER POPULATION
-> How many active contributors?
-> New contributor in last 90 days?
-> Bus factor (how many devs can the project lose?)
```
---
## PHASE 1: README QUALITY (PART OF THE HINGE)
> *"The README is the front door. If it's locked, nobody enters."*
```
1. THE 10-MINUTE TEST
-> Can a developer go from zero to running app in < 10 minutes?
-> Timer starts at git clone, ends at working local environment
-> Every missing step is a failure
-> Every "you should already have X installed" is a failure
2. REQUIRED SECTIONS
-> Project description (what is this, in one paragraph)
-> Prerequisites (OS, runtime versions, required services)
-> Installation (step-by-step, copy-pasteable commands)
-> Running locally (exact command to start)
-> Environment variables (every var, what it does, example value)
-> Architecture overview (how the pieces fit together)
-> Common issues / troubleshooting
3. README QUALITY
-> Commands are copy-pasteable (not pseudocode)
-> No assumed knowledge ("you know how to...")
-> Links to deeper docs where appropriate
-> Up to date (matches current project state)
-> No broken links
4. ANTI-PATTERNS
-> "TODO: add documentation"
-> Empty sections
-> Instructions for a different version of the project
-> "See wiki" (wiki is empty or outdated)
-> README longer than 500 lines (should link to /docs)
FALSIFY: Follow the README literally. New terminal. Fresh clone. Every step. If you get stuck, the README failed.
```
---
## PHASE 2: SETUP COMPLEXITY (PART OF THE HINGE)
> *"If setting up requires a PhD in DevOps, you've lost 90% of potential contributors."*
```
1. STEP COUNT
-> Count distinct manual steps from clone to running
-> Target: < 5 steps (clone, install, env, run)
-> Each additional step is friction
-> Automation potential for manual steps
2. DEPENDENCY SETUP
-> How many external services needed? (DB, Redis, Stripe, etc.)
-> Docker Compose for local services? (should be)
-> Cloud service accounts needed for local dev?
-> Mock/stub alternatives for external services?
3. ENVIRONMENT VARIABLES
-> .env.example or .env.template exists
-> Every variable documented (purpose, format, where to get it)
-> Sensible defaults for local development
-> No required secrets for basic local dev
4. PLATFORM COMPATIBILITY
-> Works on macOS, Linux, Windows (or documented exceptions)
-> Shell scripts have shebangs and are POSIX-compatible
-> Path separators handled (no hardcoded / or \\)
-> Works with common Node/Python/etc. version managers
5. AUTOMATION
-> One-command setup script? (make setup, ./setup.sh)
-> Dev containers / devcontainer.json?
-> Codespaces / Gitpod support?
-> Nix/Flake for reproducible environments?
FALSIFY: Time the setup. If it takes > 15 minutes for an experienced dev, it's too complex.
```
---
## PHASE 3: ERROR MESSAGE QUALITY
> *"'Error: ENOENT' tells the developer nothing. 'File not found: .env — copy .env.example to .env' tells them everything."*
```
1. BUILD ERROR MESSAGES
-> Build failures give actionable guidance
-> Missing dependencies identified by name
-> Version conflicts explained (not just stack trace)
-> Common errors have documented solutions
2. RUNTIME ERROR MESSAGES
-> Missing env vars: name the var and where to get it
-> Connection failures: name the service and how to start it
-> Auth errors: explain what credentials are needed
-> Import errors: explain what to install
3. DEVELOPMENT-MODE ERRORS
-> Hot reload failures explained
-> Type errors readable (not 50-line generics explosion)
-> Test failures point to the failing assertion
-> Lint errors explain the rule and fix
4. ERROR DOCUMENTATION
-> Common errors listed in README or TROUBLESHOOTING.md
-> Error codes linkable to documentation
-> Stack Overflow / Discord / GitHub Issues for help
```
---
## PHASE 4: TYPESCRIPT STRICTNESS
```
1. TSCONFIG AUDIT
-> strict: true (or equivalent individual flags)
-> noImplicitAny: true
-> strictNullChecks: true
-> noUncheckedIndexedAccess: true (ideal)
-> exactOptionalPropertyTypes: true (ideal)
2. TYPE SAFETY IN PRACTICE
-> No widespread use of 'any' (count instances)
-> No @ts-ignore without explanatory comment
-> Generics used properly (not just <any>)
-> Utility types used (Partial, Pick, Omit, etc.)
3. TYPE COVERAGE
-> All public APIs typed (no implicit returns)
-> Function parameters typed (no reliance on inference alone)
-> Return types explicit on exported functions
-> Props interfaces defined for components
4. NON-TYPESCRIPT PROJECTS
-> If Python: mypy/Pyright configured with strict mode
-> If Go: staticcheck/golangci-lint configured
-> If Rust: clippy warnings addressed
-> JSDoc type annotations if JavaScript
```
---
## PHASE 5: CODE DOCUMENTATION
```
1. PUBLIC API DOCUMENTATION
-> Exported functions have JSDoc/docstrings
-> Parameters documented with types and descriptions
-> Return values documented
-> Exceptions/errors documented
-> Usage examples in complex functions
2. ARCHITECTURE DOCUMENTATION
-> High-level architecture diagram (text or image)
-> Data flow documentation
-> Key design decisions documented (ADRs)
-> Domain glossary (project-specific terms defined)
3. INLINE DOCUMENTATION
-> Complex algorithms have explanatory comments
-> Business logic has "why" comments (not "what" comments)
-> Workarounds have links to issues/tickets
-> TODO comments have tracking issues
4. DOCUMENTATION FRESHNESS
-> Docs match current code behavior
-> No references to deleted functions/files
-> API docs auto-generated from code (ideal)
-> Last documentation update within 90 days
```
---
## PHASE 6: TESTING INFRASTRUCTURE
```
1. TEST FRAMEWORK
-> Test runner configured and working
-> Tests can run with single command
-> Test results clearly show pass/fail
-> Test timing visible (slow tests identified)
2. TEST COVERAGE
-> Coverage reporting configured
-> Current coverage percentage known
-> Critical paths tested (auth, payments, data mutations)
-> Test coverage trending up (not declining)
3. TEST TYPES
-> Unit tests present
-> Integration tests present
-> E2E tests present (for user-facing features)
-> Type tests (for library projects)
4. TEST QUALITY
-> Tests are deterministic (no flaky tests)
-> Tests are fast (full suite < 5 minutes)
-> Tests are independent (order doesn't matter)
-> Test data is isolated (no shared mutable state)
-> Mocks/stubs for external services
5. TEST DX
-> Watch mode available
-> Single test/file runnable
-> Debug configuration for tests (breakpoints work)
-> Test failure messages clear and actionable
```
---
## PHASE 7: CI/CD PIPELINE
```
1. CI PIPELINE
-> All PRs run CI (no bypassing)
-> CI includes: lint, type check, test, build
-> CI time < 10 minutes (fast feedback)
-> CI failures are actionable (not "exit code 1" with no context)
2. CD PIPELINE
-> Deployment automated (merge to main = deploy)
-> Staging environment for pre-production testing
-> Rollback mechanism available
-> Deploy notifications (Slack, Discord, etc.)
3. CI RELIABILITY
-> No flaky CI (same commit, same result)
-> CI matches local environment (no "works locally, fails in CI")
-> Dependency caching for speed
-> Parallel jobs where possible
4. BRANCH PROTECTION
-> Main branch protected
-> Required CI checks before merge
-> Required reviews before merge
-> No force push to main
```
---
## PHASE 8: PR TEMPLATE AND PROCESS
```
1. PR TEMPLATE
-> PR template exists (.github/PULL_REQUEST_TEMPLATE.md)
-> Template includes: description, type of change, testing
-> Template includes: checklist for common requirements
-> Template is concise (not 50 checkboxes)
2. PR PROCESS
-> Review turnaround < 24 hours
-> Reviewer assignment clear (CODEOWNERS or convention)
-> PR size guidelines (< 400 lines preferred)
-> PR titles follow convention (conventional commits)
3. CODE REVIEW
-> Review expectations documented
-> Constructive feedback culture
-> Automated checks reduce manual review burden
-> Draft PRs for WIP/feedback
```
---
## PHASE 9: DEPENDENCY MANAGEMENT
```
1. DEPENDENCY HEALTH
-> No critical vulnerabilities (npm audit, safety)
-> Dependencies up to date (or documented reasons for pinning)
-> No abandoned dependencies (last release > 2 years)
-> No duplicate dependencies (same purpose, different packages)
2. DEPENDENCY POLICY
-> Lock file committed (package-lock.json, bun.lockb, etc.)
-> Version pinning strategy defined
-> Renovate/Dependabot configured for updates
-> Major version upgrades have migration plan
3. DEPENDENCY DOCUMENTATION
-> Key dependencies documented with purpose
-> Why each dependency was chosen (not just "we use X")
-> Alternatives considered for major dependencies
```
---
## PHASE 10: MONOREPO STRUCTURE
```
1. IF MONOREPO
-> Workspace configuration (npm workspaces, Turborepo, Nx)
-> Package boundaries clear
عرض على GitHub