Skip to content

install and remove facet command - #415

Draft
maxnorm wants to merge 14 commits into
Perfect-Abstractions:mainfrom
maxnorm:cli/add-rm-facets
Draft

maxnorm wants to merge 14 commits into
Perfect-Abstractions:mainfrom
maxnorm:cli/add-rm-facets

Conversation

@maxnorm

@maxnorm maxnorm commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add facet configuration commands ahead of deployment: compose install / i registers facets; compose remove / rm unregisters them. Both update compose.json only.

Changes Made

  • Support direct, interactive, and manifest-based facet changes.
  • Store batch manifests under compose/facet-batches/.
  • Validate candidate facets for compilation, selector collisions, and virtual storage compatibility before saving.
  • Preserve source files and compose.lock; do not broadcast transactions.
  • Update CLI documentation and add a changeset.

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 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 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.

Make sure to follow the contributing guidelines.

Additional Notes

Generated deployment scripts remain snapshots from init; deployment-flow work will need consume the updated compose.json for the new deployment script generation

@netlify

netlify Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

👷 Deploy request for compose-diamonds pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 140bf88

@changeset-bot

changeset-bot Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 140bf88

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@perfect-abstractions/compose-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

CLI Coverage

Commit: 140bf88

Metric Coverage Covered/Total
Lines 75% 2559/3416
Functions 77% 530/686
Branches 64% 1493/2325

@maxnorm maxnorm changed the title start: install and remove facet command install and remove facet command Oct 13, 2026
@0x76agabond

0x76agabond commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Hey @maxnorm, I like how you structured this. Keeping facet configuration separate from deployment makes sense.

Should we add a warning when removing a required facet from the selected preset? Removal can remain allowed, but users should know the resulting composition may no longer implement the full standard.

Copy locally imported facet dependencies into the same relative folder
structure they have under their facet's source directory, so relative
imports such as ./libraries/LibFee.sol keep resolving after install.
Applies the shared planImportClosureTargets helper to both the
install pipeline and init scaffolding.

This branch has not been deployed

No deployments
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