v2026.5.1 — Hotfix: aiwg doctor module resolution
Hotfix release
A user-reported bug landed within hours of 2026.5.0 cutting:
$ aiwg --version # works
$ aiwg --help # works
$ aiwg doctor # Cannot find module 'src/channel/manager.mjs'
Root cause
Three scripts under tools/cli/ imported from ../../src/channel/manager.mjs (the source tree). The npm package only ships dist/, not src/. Local dev worked because both directories existed; npm-installed users only had dist/.
Fixed
tools/cli/doctor.mjs— import now resolves../../dist/src/channel/manager.mjs.aiwg doctorworks on npm-installed AIWG.tools/cli/version.mjs— same fix (used byaiwg sync;aiwg --versionwas unaffected because that path is special-cased inbin/aiwg.mjs).tools/cli/update.mjs— same fix.tools/cli/validate-writing.mjs— replaced the fragileNODE_ENV === 'production'gate (which didn't fire onnpm install -g aiwgbecause NODE_ENV isn't set) with anexistsSync(distPath)check.
Audit
Other tools/ scripts that import from src/ were checked — tools/writing/writing-validator.mjs and tools/plugin/*-cli.mjs already had correct fallback logic. A shared _resolve-impl.mjs helper to consolidate the resolution across all tools/ scripts is tracked in #1250.
Install
# Default — gets the hotfix
npm install -g aiwg
# Or explicit
npm install -g aiwg@2026.5.1Verification
aiwg doctor runs all 31 checks green after install. Total time from bug-report to verified-fixed live release: ~15 minutes.