Tasks completed: 3/3 - Prove and create the compiling Winter-shaped plugin path - Generate model, migration, and command slices - Generate jobs and admin controllers, then enforce model imports SUMMARY: .planning/phases/04-cli-scaffolding-i18n-and-mail/04-01-SUMMARY.md Co-authored-by: Cursor <cursoragent@cursor.com>
6.8 KiB
phase, plan, subsystem, tags, requires, provides, affects, tech-stack, key-files, key-decisions, patterns-established, requirements-completed, duration, completed
| phase | plan | subsystem | tags | requires | provides | affects | tech-stack | key-files | key-decisions | patterns-established | requirements-completed | duration | completed | |||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 04-cli-scaffolding-i18n-and-mail | 01 | cli |
|
|
|
|
|
|
|
|
|
11 min | 2026-09-18 |
Phase 4 Plan 01: CLI scaffolding Summary
Six summer make:* commands emit Winter-shaped, vet-clean plugin artifacts wired through registry.gen.go, and summer build rejects models/ sibling imports by plugin ID, file, and path
Performance
- Duration: 11 min
- Started: 2026-09-18T11:29:54Z
- Completed: 2026-09-18T11:41:29Z
- Tasks: 3
- Files modified: 14
Accomplishments
make:pluginnow scaffolds the Winter directory shape: rootplugin.go/routes.go, leafdoc.gopackages, embeddableconfig/,lang/en/, andviews/mail/assets, plus emptyregistry.gen.goaccessorsmake:model,make:migration,make:command,make:job, andmake:admin-controllerwrite compiling stubs, infer plugin ID fromplugin.go, refuse duplicates, and refresh sorted registry slices without touching handwrittenplugin.gosummer buildinspects each manifest plugin'smodels/imports beforego buildand fails when a sibling package is imported
Task Commits
Each task was committed atomically:
- Task 1: Prove and create the compiling Winter-shaped plugin path -
1edf9d7(feat) - Task 2: Generate model, migration, and command slices -
d8c5650(feat) - Task 3: Generate jobs and admin controllers, then enforce model imports -
c87bbc3(feat)
Plan metadata: (this commit)
Files Created/Modified
pact/capabilities.go- Job, AdminController, HasLang, HasMailTemplates contractsinternal/build/stubs/plugin.tmpl- named templates for plugin.go, routes.go, leaf doc.go, go.modinternal/build/stubs/registry.tmpl- generated registry accessorsinternal/build/stubs/artifacts.tmpl- model, migration, command, job, admin controller, YAML templatesinternal/build/scaffold.go- template-driven MakePlugin Winter layoutinternal/build/registry.go- deterministic atomic registry.gen.go generation and scaninternal/build/artifact.go- MakeModel/Migration/Command/Job/AdminControllerinternal/build/leaf.go- models sibling-import enforcementinternal/build/build.go- runs the leaf check before go buildcmd/summer/main.go- five new make commands plus --no-migrationbonfire/command.go,bonfire/root.go- Bare flags so --no-migration needs no valueinternal/build/build_test.go- smoke, core artifacts, all-six, and leaf rejection tests
Decisions Made
- Registry ownership stays in generated files marked
Code generated by summer make; handwrittenplugin.gois never rewritten and existing plugins receive an accessor hint - Model tables are
{vendor}_{plugin}_{plural_snake}with timestamps and an explicit gormigrate create/drop migration;--no-migrationomits only that file - Job stubs implement
pact.JobArgs.Kindandpact.Job.Workwith an unexpected-type error and no River import - Admin stubs implement ID/ModelName/ConfigDir and write
controllers/<name>/fields.yamlpluscolumns.yaml
Deviations from Plan
Auto-fixed Issues
1. [Rule 3 - Blocking] Bare flag support for --no-migration
- Found during: Task 2 (make:model --no-migration)
- Issue: bonfire only registered cobra string flags, so
--no-migrationrequired a value and could not match D-13 - Fix: Added
Flag.Bareand cobraNoOptDefVal=trueso--no-migrationis a valueless true flag - Files modified:
bonfire/command.go,bonfire/root.go,cmd/summer/main.go - Verification:
TestScaffoldCoreArtifactsomits only the model migration;go test ./bonfirestill green - Committed in:
d8c5650(Task 2 commit)
2. [Rule 2 - Missing Critical] Artifact helpers live in artifact.go
- Found during: Task 2
- Issue: Plan listed Make* work on
scaffold.go; adding five generators there would bury path validation and registry refresh - Fix: Keep MakePlugin in
scaffold.goand put make:model/migration/command/job/admin-controller ininternal/build/artifact.go - Files modified:
internal/build/artifact.go - Verification: All make tests pass through the exported Make* APIs used by cmd/summer
- Committed in:
d8c5650/c87bbc3
Total deviations: 2 auto-fixed (1 blocking, 1 missing critical)
Impact on plan: No behavior divergence from D-10–D-17. Bare flags were required for the documented --no-migration UX.
Issues Encountered
None
User Setup Required
None - no external service configuration required.
Next Phase Readiness
Ready for 04-02 (phrasebook / i18n). Generated plugins already implement pact.HasLang and pact.HasMailTemplates with embeddable assets. Unit-test coverage remains the last plan (04-04).
Verification
go test ./internal/build ./cmd/summer -run 'TestScaffoldPluginSmoke|TestScaffoldCoreArtifacts|TestScaffoldAllArtifacts|TestModelsLeaf|TestToolCommandNames' -short -count=1— PASSgo vet ./... && go test ./...— PASS
Self-Check: PASSED
Phase: 04-cli-scaffolding-i18n-and-mail Completed: 2026-09-18