Skip to content

Make init --with composition independent of argument order - #342

Merged
jimhoyd merged 1 commit into
mainfrom
feat/init-with-order-independent
Sep 20, 2026
Merged

jimhoyd merged 1 commit into
mainfrom
feat/init-with-order-independent

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

Refs #337 (does not close it).

What

  • --with is an unordered set. Core sorts names for the scaffold request, then orders host setup, activation entries, routes and README sections by the scaffolds' declared contract: optional provides, requires, after, conflicts on ScaffoldResult (Kahn, lexically smallest ready first). Every permutation emits the same site and revision.
  • A missing requirement, conflict or cycle refuses before the destination is created, naming the extensions (no flag-order advice).
  • store reads the pin as storeProjectSha256 (self-contained); after: ['ui.kit'] keeps the historical ui-then-store order. ui provides ui.kit; auth requires it; admin requires ui.kit and auth.service. Old order-based scaffold refusals removed.
  • No auth/UI auto-add, no policy inference, exact pins and core's no-build-time-import boundary unchanged. Old packages without the fields still work.
  • Docs, CLI help, llms-full.txt updated.

Tests

Fake-scaffold permutations, refusal-before-write (missing/conflict/cycle), real ui,auth,admin permutations and ui,auth,store vs store,auth,ui equivalence (same revision) in workspace integration.

Verification

npm ci, npm run verify (incl. verify:workspaces, audit:packages, workspace-integration) and check:docs pass locally.
Package sizes (unpacked / cap): core 2,150,255 / 2,355,200, 428 files / 440; ui 356,800 / 358,400 (unchanged); auth 827,638; admin 205,627; store 49,732. Caps untouched.

🤖 Generated with Claude Code

Treat --with as an unordered set. ScaffoldResult gains optional provides, requires, after and conflicts; core orders host setup, activation entries and README sections topologically (lexical tie-break) and refuses a missing requirement, conflict or cycle before writing, naming the extensions. Store reads the pin under its own identifier; ui, auth and admin declare their kit and service requirements.

Co-Authored-By: Claude Sonnet 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.

1 participant