Skip to content

adf context --bundle fails with 'Module not found: core.adf' (path joined twice) #439

Done

Description

@stackbilt-admin

Problem

charter adf context --files ... --bundle exits 2. The file reader passed to bundleModules joins aiDir onto the module path (adf-context.ts:90), but the bundler already resolves module paths against its base path, so the read targets a doubled path.

The file-aware context command is the natural place for a file-seeded preflight answer, and its documented --bundle mode doesn't work.

Reproduction (pinned 5412100)

charter adf context --files packages/adf/src/manifest.ts --keywords ADF --bundle --format json
# charter: Bundle error (core.adf): Module not found: core.adf   (exit 2)

Without --bundle, the same command resolves core.adf, state.adf, adf-dev.adf.

Acceptance

  • The command above exits 0 and emits the merged document.
  • A regression test covers adf context --bundle with --files and with --keywords, with default and custom --ai-dir.

Works on its own. Part of #437.

Activity

  1. added
    bug
    area:adf
    priority:p0
    epic:preflight
    on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:adfbugepic:preflightpriority:p0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions