Parent issue
This issue is part of:
Support safe multi-module application from the Seed4J CLI
Dependencies
This issue should reuse the infrastructure introduced by:
- Add a read-only plan for applying multiple modules
- Apply multiple modules after successful preflight validation
Goal
Allow users to discover and apply the presets provided by Seed4J through the CLI.
Preset definitions must remain owned by the Seed4J core. The CLI must not maintain a duplicated hardcoded list of preset modules.
Proposed commands
List available presets:
Preview a preset:
seed4j preset apply java-library-with-maven \
--project-path . \
--plan
Apply a preset:
seed4j preset apply java-library-with-maven \
--project-path .
Required module properties should be accepted using the same options and resolution rules as multi-module application.
Example:
seed4j preset apply java-library-with-maven \
--project-path . \
--project-name "Sample library" \
--base-name sampleLibrary \
--node-package-manager npm \
--package-name com.mycompany.sample \
--plan
Source of truth
The CLI must retrieve presets from the Seed4J application or domain APIs.
It must not:
- duplicate preset names;
- duplicate preset descriptions;
- duplicate the module list belonging to a preset;
- assume that the current preset collection will remain unchanged.
Changes to Seed4J presets should become available to the CLI without requiring a corresponding hardcoded CLI change.
Plan behavior
Preset plan mode must reuse the multi-module planner.
The output should show:
- preset name;
- preset description, when available;
- modules included in the preset;
- deterministic execution order;
- dependency validation;
- resolved properties;
- missing required properties;
- confirmation that no changes were applied.
Example structure:
Plan for preset: java-library-with-maven
Modules:
- init
- maven-java
- maven-wrapper
- java-library
Execution order:
...
Dependency validation:
...
Resolved parameters:
...
No changes were applied.
Apply behavior
Applying a preset must:
- resolve the preset from the Seed4J source of truth;
- convert its modules into the same model used by multi-module application;
- run the complete preflight validation;
- block execution when the plan is invalid;
- apply the validated modules in deterministic order;
- follow the same commit and partial-failure semantics as
apply-set;
- report progress and results per module.
Error behavior
An unknown preset must produce:
- a clear error message;
- a non-zero exit code;
- no project mutation;
- a list of available presets or guidance to run
seed4j preset list.
Acceptance criteria
Out of scope
- Creating custom presets from the CLI.
- Saving a module set as a new preset.
- Editing Seed4J preset definitions.
- Loading presets from local files.
- Loading presets from external URLs.
Parent issue
This issue is part of:
Dependencies
This issue should reuse the infrastructure introduced by:
Goal
Allow users to discover and apply the presets provided by Seed4J through the CLI.
Preset definitions must remain owned by the Seed4J core. The CLI must not maintain a duplicated hardcoded list of preset modules.
Proposed commands
List available presets:
Preview a preset:
seed4j preset apply java-library-with-maven \ --project-path . \ --planApply a preset:
seed4j preset apply java-library-with-maven \ --project-path .Required module properties should be accepted using the same options and resolution rules as multi-module application.
Example:
Source of truth
The CLI must retrieve presets from the Seed4J application or domain APIs.
It must not:
Changes to Seed4J presets should become available to the CLI without requiring a corresponding hardcoded CLI change.
Plan behavior
Preset plan mode must reuse the multi-module planner.
The output should show:
Example structure:
Apply behavior
Applying a preset must:
apply-set;Error behavior
An unknown preset must produce:
seed4j preset list.Acceptance criteria
seed4j preset listdisplays the presets currently provided by Seed4J.Out of scope