You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduced pipeline/context architecture: ComposeContext carries params, config, state, and status through typed pipelines (EntryPipeline, InitPipeline, InfoPipeline, CatalogPipeline). Each step returns the updated context (cli/src/context/types.ts, cli/src/pipelines/)
Added bases catalog: declarative JSON configs per standard (cli/bases/*.json: erc20, erc721, erc1155, erc6909, counter, owner, accesscontrol, diamond, libraries). Each base defines required and optional facets with paths, constructor calls, and ERC-165 registrations
Added catalog command: lists all available bases from the catalog
Added info command: scans compose.json, reads facet source files, and displays a tree-view of diamonds, facets, selectors, and storage slots (cli/src/modules/info/)
Added validation module: detects missing/extra selector exports, 4-byte selector collisions across facets, and incompatible storage layout identifier collisions (cli/src/modules/validation/)
Added Solidity source parsing: extracts contract bodies, functions, exported selector signatures, and diamond storage layouts from .sol files (cli/src/utils/solidityText.ts, cli/src/utils/soliditySources.ts)
Added framework adapters: IFrameworkAdapter interface with Foundry and Hardhat implementations for project init, config writing, and path resolution (cli/src/adapters/)
Added scaffolding module: copies facets with import closure resolution, writes compose.json, validates local facet files (cli/src/modules/scaffolding/)
Added diamond/deploy/test generation: auto-generates Diamond.sol, framework-specific deploy scripts, and test boilerplate (cli/src/modules/diamondGeneration/, deployGeneration/, testGeneration/)
Added dependency resolver: resolves hashing and framework adapters at runtime (cli/src/resolver/)
Converted to TypeScript: added tsconfig.json, builds to dist/, entry point is now bin/compose.js � dist/index.js. Removed old JS tests and build:templates script
Updated CI: cli.yml now runs TypeScript build, removed integration tests and Node 20 smoke test (unsupported by Hardhat 3), smoke tests now use --base counter instead of --template default
Checklist
Before submitting this PR, please ensure:
Code follows the Solidity feature ban - No inheritance, constructors, modifiers, public/private variables, external library functions, using for directives, or selfdestruct
Code matches the codebase style - Consistent formatting, documentation, and patterns (e.g. ERC20Facet.sol)
Code is formatted with forge fmt
Existing tests pass - Run tests to be sure existing tests pass.
New tests are optional - If you don't provide tests for new functionality or changes then please create a new issue so this can be assigned to someone.
All tests pass - Run forge test and ensure everything works
Documentation updated - If applicable, update relevant documentation
Changesets — If this PR changes publishable packages (src/, cli/), changeset-bot will comment if a release note might be needed. You can add one when convenient or defer to maintainers.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rewrite the Compose CLI from JavaScript to TypeScript with a modular pipeline/context architecture.
Special thank you to our new maintainer @0x76agabond for his major contribution of helping design and build the new CLI version.
Changes Made
Rewrote CLI entrypoint and argument parsing: replaced
minimistwithcommander, added positional[project-name]argument, per-command flags (--framework,--base,--ownership,--toolbox,--yes, etc.) (cli/src/comander.ts,cli/src/index.ts)Introduced pipeline/context architecture:
ComposeContextcarries params, config, state, and status through typed pipelines (EntryPipeline,InitPipeline,InfoPipeline,CatalogPipeline). Each step returns the updated context (cli/src/context/types.ts,cli/src/pipelines/)Added bases catalog: declarative JSON configs per standard (
cli/bases/*.json:erc20,erc721,erc1155,erc6909,counter,owner,accesscontrol,diamond,libraries). Each base definesrequiredandoptionalfacets with paths, constructor calls, and ERC-165 registrationsAdded
catalogcommand: lists all available bases from the catalogAdded
infocommand: scanscompose.json, reads facet source files, and displays a tree-view of diamonds, facets, selectors, and storage slots (cli/src/modules/info/)Added validation module: detects missing/extra selector exports, 4-byte selector collisions across facets, and incompatible storage layout identifier collisions (
cli/src/modules/validation/)Added Solidity source parsing: extracts contract bodies, functions, exported selector signatures, and diamond storage layouts from
.solfiles (cli/src/utils/solidityText.ts,cli/src/utils/soliditySources.ts)Added framework adapters:
IFrameworkAdapterinterface with Foundry and Hardhat implementations for project init, config writing, and path resolution (cli/src/adapters/)Added scaffolding module: copies facets with import closure resolution, writes
compose.json, validates local facet files (cli/src/modules/scaffolding/)Added diamond/deploy/test generation: auto-generates
Diamond.sol, framework-specific deploy scripts, and test boilerplate (cli/src/modules/diamondGeneration/,deployGeneration/,testGeneration/)Added dependency resolver: resolves hashing and framework adapters at runtime (
cli/src/resolver/)Converted to TypeScript: added
tsconfig.json, builds todist/, entry point is nowbin/compose.js�dist/index.js. Removed old JS tests andbuild:templatesscriptUpdated CI:
cli.ymlnow runs TypeScript build, removed integration tests and Node 20 smoke test (unsupported by Hardhat 3), smoke tests now use--base counterinstead of--template defaultChecklist
Before submitting this PR, please ensure:
Code follows the Solidity feature ban - No inheritance, constructors, modifiers, public/private variables, external library functions,
using fordirectives, orselfdestructCode follows Design Principles - Readable, uses diamond storage, favors composition over inheritance
Code matches the codebase style - Consistent formatting, documentation, and patterns (e.g. ERC20Facet.sol)
Code is formatted with
forge fmtExisting tests pass - Run tests to be sure existing tests pass.
New tests are optional - If you don't provide tests for new functionality or changes then please create a new issue so this can be assigned to someone.
All tests pass - Run
forge testand ensure everything worksDocumentation updated - If applicable, update relevant documentation
Changesets — If this PR changes publishable packages (
src/,cli/), changeset-bot will comment if a release note might be needed. You can add one when convenient or defer to maintainers.Make sure to follow the contributing guidelines.
Additional Notes
cli/test/) was removed as part of the rewrite. The new CLI has no unit tests yet � this should be tracked as follow-up work.cli/.gitmodulesfile was removed; the CLI no longer requires the forge-std submodule at build time.cli/index.jsis deleted; the new entry point iscli/bin/compose.jswhich loadsdist/index.js.