Skip to content

v2026.5.1 — Hotfix: aiwg doctor module resolution

Choose a tag to compare

@jmagly jmagly released this 11 May 03:27
8e660df

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 doctor works on npm-installed AIWG.
  • tools/cli/version.mjs — same fix (used by aiwg sync; aiwg --version was unaffected because that path is special-cased in bin/aiwg.mjs).
  • tools/cli/update.mjs — same fix.
  • tools/cli/validate-writing.mjs — replaced the fragile NODE_ENV === 'production' gate (which didn't fire on npm install -g aiwg because NODE_ENV isn't set) with an existsSync(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.1

Verification

aiwg doctor runs all 31 checks green after install. Total time from bug-report to verified-fixed live release: ~15 minutes.

Full changelog

See CHANGELOG.md § 2026.5.1.