Skip to content

fix(doctor): name the DEFAULT_LOAD fix and share the wiring criteria - #346

Merged
stackbilt-admin merged 1 commit into
mainfrom
auto/bugfix/issue-241
Oct 15, 2026
Merged

stackbilt-admin merged 1 commit into
mainfrom
auto/bugfix/issue-241

Conversation

@stackbilt-admin

Copy link
Copy Markdown
Member

Refs #241

Summary

  • charter doctor's adf required wiring warning now names the remedy: "move core.adf from ON_DEMAND to DEFAULT_LOAD in .ai/manifest.adf" when the module is registered on-demand, or "add state.adf to DEFAULT_LOAD in .ai/manifest.adf (or run: charter adf create state.adf --load default)" when it isn't registered at all. The JSON payload keeps its name/status/details shape; the remedy is in details, like the other checks.
  • The required-wiring rule now lives in packages/cli/src/commands/adf-wiring.ts (classifyModuleLoad, isRequiredDefaultLoad, findMissingDefaultLoad, formatMissingDefaultLoad). doctor and bootstrap's orphan registration both call it, which removes bootstrap's duplicate DEFAULT_LOAD_MODULES set. Behavior doesn't change.
  • The rule is filename-only: core.adf and state.adf are required in DEFAULT_LOAD. Module content isn't consulted. The issue guessed at content signals, but the code doesn't use any.

adf migrate doesn't use this rule yet. That lands with #239, because migrate doesn't register modules in manifest.adf at all today.

Tests

  • Unit tests for the helper, covering both outcomes and path normalization.
  • An integration test that checks doctor's exact hint text for both the ON_DEMAND and the unregistered case.
  • pnpm test: 995 passed. The 5 failures are the known Windows-only ones. pnpm typecheck is clean.

Implemented via constellation-loop.

🤖 Generated with Claude Code

@stackbilt-admin
stackbilt-admin merged commit a09936f into main Oct 15, 2026
5 checks passed
@stackbilt-admin
stackbilt-admin deleted the auto/bugfix/issue-241 branch October 15, 2026 23:59
stackbilt-admin added a commit that referenced this pull request Oct 16, 2026
adf migrate created new .ai modules but never registered them, so no agent knew to load them and doctor failed until someone hand-edited manifest.adf and the CLAUDE.md module index. Migrate now places each new module with the shared DEFAULT_LOAD rule from #346, infers ON_DEMAND triggers from the heading keywords that routed content there (recorded by @stackbilt/adf as RoutingTrace.headingKeyword), and writes it through one append-only manifest writer before the pointer and module index are rewritten. The writer inserts text rather than reformatting, and re-parses the result before writing, so hand-edited manifests keep every other byte. Bootstrap's two orphan writers, one of which spliced lines without deduping, now use the same writer.

Closes #239
Closes #241

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants