Phase 05: CLI Scaffolding - Implementation decisions documented - Phase boundary established
3.2 KiB
3.2 KiB
Phase 5: CLI Scaffolding - Context
Gathered: 2026-02-04 Status: Ready for planning
## Phase BoundaryProvide developer tools for rapid project setup: commands to scaffold plugins, themes, components, controllers, models, and migrations. Generated scaffolds follow project conventions and are immediately usable.
## Implementation DecisionsCommand Design
- Structure: Noun-verb pattern:
summer plugin create,summer theme create, etc. - Executable name:
summer - Naming format: Author.Name dot notation for plugins, themes, components
summer plugin create Acme.Blogsummer theme create Acme.Corporatesummer component create Acme.Blog MyComponent(explicit plugin required)
- No shorthand aliases — keep commands explicit
- --dry-run option — show what would be created without creating
- No --force option — error if target exists, user deletes manually
- Version output: Include Scala/JVM info:
SummerCMS 1.0.0 (Scala 3.x, JVM 21) - Color output: Colors by default,
--no-colorto disable
Output & Feedback
- During scaffolding: Progress bar for larger scaffolds
- After completion: Actionable next steps (what to edit, what to run)
- Error style: Concise with suggestion (error message + tip to fix)
- Verbosity:
-vfor verbose,-qfor quiet
Generated Structure
- Plugin scaffold: Standard structure — Plugin.scala, manifest, empty directories for models/, controllers/, components/
- Theme scaffold: Choice via
--templateflag (--template=blankor--template=starter) - Component scaffold: Component class + default partial + component.yaml
- Controller scaffold: Full backend resource like WinterCMS — controller class, fields.yaml, columns.yaml, view partials
- Model scaffold: Model class + migration together (like WinterCMS)
- Migration scaffold: Standalone
summer migration createcommand available - Migration naming: Timestamp prefix:
20260204_120000_create_posts_table.scala - File naming: PascalCase for Scala classes
- Directory structure:
- Plugins:
plugins/author/pluginname/(lowercase) - Themes:
themes/author/themename/(lowercase)
- Plugins:
- Inline guidance: TODO comments showing where to add code
Interactive Mode
- Missing args: Prompt interactively when required arguments missing
- Wizard mode:
--wizardflag for guided scaffold creation - No confirmation: Create immediately (use
--dry-runfor preview) - CI environments:
--no-interactionflag to disable prompts (error on missing args)
Claude's Discretion
- Config file detection approach (follow WinterCMS patterns)
- Help output format and level of detail
- Input validation behavior during prompts
- Exact progress bar implementation
- "Full backend resource just like WinterCMS" — controller scaffold includes everything needed for admin CRUD
- "Model + migration just like WinterCMS" — model scaffolding creates both together
None — discussion stayed within phase scope
Phase: 05-cli-scaffolding Context gathered: 2026-02-04