17 KiB
phase, plan, subsystem, tags, requires, provides, affects, estimate_ref, actuals, plan_head_before, plan_head_after, tech-stack, key-files, key-decisions, patterns-established, requirements-completed, coverage, duration, completed, status
| phase | plan | subsystem | tags | requires | provides | affects | estimate_ref | actuals | plan_head_before | plan_head_after | tech-stack | key-files | key-decisions | patterns-established | requirements-completed | coverage | duration | completed | status | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 11.1-summercms-documentation-for-humans-and-ai-agents | 05 | docs |
|
|
|
|
tokens 110000, tasks 3, confidence low |
|
4e83d06025 |
4e05450f46 |
|
|
|
|
|
|
18min | 2026-09-30 | complete |
Phase 11.1 Plan 05: acme/blog porting walkthrough Summary
A compiled acme.blog plugin under docs/examples/blog, built from real summer make:* output, with a Post model behind a fill allow-list, two reversible migrations, a published-posts API route, an admin controller behind acme.blog.access_posts and a blog:publish command, all tested against an ICU pl-PL Postgres. docs/setup/porting-a-plugin.md walks a WinterCMS developer through it with PHP next to src= copies, and a scaffold-layout test pins the tree to the scaffolder.
Performance
- Duration: about 18 min
- Started: 2026-09-30T21:24:56Z
- Completed: 2026-09-30T21:42:43Z
- Tasks: 3
- Files modified: 37
Accomplishments
- Tracer: the scaffolder's
make:pluginandmake:modeloutput, copied into the root module with fixed migration timestamps, became a plugin that activates, keeps the app inBoot, readsacme.blog.per_pagefrom its embedded config and servesGET /api/blog/poststhroughlagoon.Paginateandwire.WriteJSON. - Admin, command, second migration:
controllers.PostsControllerservesmodels.Postbehindacme.blog.access_postswith WinterCMS-style form and list YAML embedded throughpact.AdminAssets;blog:publish <slug>publishes a post with a bound parameter;updates.AddPublishedAtadds and dropspublished_at. The route now lists published posts only. - Docker tier: a package
TestMainstarts testcontainers Postgres (and fails the full run without Docker); each test gets its ownTEMPLATE template0 ... ICU_LOCALE 'pl-PL'database. The tests migrate, roll back and re-apply, seed throughmodels.NewPost, call the route throughsurf.Assemble, and runblog:publishboth with the published handle and with one the command opens fromdatabase.dsn. - Scaffold pin:
TestScaffoldLayoutruns the five make functions foracme.blogin a copy ofexamples/helloand diffs the file set against the walkthrough (mutation-checked with a planted file). - Page: registration, model, migrations with an added column, routes, admin controller and console command sections, each PHP first; a "Scaffold it yourself" section with the exact commands and the go.mod a real plugin gets; "What the scaffolder leaves to you"; and a closing checklist. 20
src=fences (6 YAML), linked from the concept map and the index.
Task Commits
- Task 1: Tracer, the plugin with its model, migration and posts route:
41a3190(feat) - Task 2: Admin controller, publish command and published_at migration against Postgres:
dd82b8a(feat) - Task 3: Scaffold-layout test, make commands on the page, concept map and index links:
63290c6(feat) - Todos for the scaffolder gaps found while porting:
4e05450(docs)
Plan metadata: the docs(11.1-05) commit that adds this file
Files Created/Modified
See key-files in the frontmatter.
Decisions Made
See key-decisions in the frontmatter.
Deviations from Plan
Auto-fixed Issues
1. [Rule 3 - Blocking] The scaffolded plugin cannot boot an admin controller
- Found during: Task 2
- Issue: cabana refuses a plugin with admin controllers but no
AdminFS, the generated controller has no record source or permission, and adeletetoolbar button needsshowCheckboxes: true. The model also needsRulesbefore the admin API saves. - Fix:
plugin.goembedscontrollers/*/*.yaml models/*/*.yamland implementsAdminFS,PermissionsandNavigation; the controller implementsNewRecordandRequiredPermissions;models.PosthasRules; the list YAML setsshowCheckboxes. Logged inscaffold-admin-controller-incomplete.md. - Commit:
dd82b8a,4e05450
2. [Rule 3 - Blocking] A generated command cannot reach the database
- Found during: Task 2
- Issue: the registry only lists zero-argument command functions, and the generated main opens no database for plugin commands.
- Fix:
console.PublishCommand(withDB)takes the plugin'swithDB(published handle, elselagoon.OpenFromAppfor the command's duration, as the framework's migrate commands do);Plugin.Commandsappends it.registry.gen.gostays what the scaffolder regenerates. Logged inscaffold-generated-header-and-command-deps.md. - Commit:
dd82b8a,4e05450
3. [Rule 1 - Accuracy] published_at is not a form field
- Found during: Task 2
- Issue: the plan asked for a
published_atfield infields.yaml, but cabana forms have no date type (docs/backend/forms.md lists the supported types). - Fix: the form has title, slug and body;
published_atis adatetimelist column and is set byblog:publish. The page explains why. - Commit:
dd82b8a
4. [Rule 1 - Accuracy] docs/console/scaffolding.md claimed same-second migrations get consecutive timestamps
- Found during: Task 3 (probe:
make:modelthenmake:migrationin one second gave both files one timestamp, andregistry.gen.golisted the ALTER migration first) - Fix: the sentence now says only same-name migrations move to the next second; the porting page tells the developer to check
updates/.internal/buildis unchanged; the bug is logged inscaffold-same-second-migration-order.md. - Files modified: docs/console/scaffolding.md (beyond the plan's file list)
- Commit:
63290c6,4e05450
5. [Rule 2 - Safety] The route lists published posts only and answers through a DTO
- Found during: Task 2
- Issue: a public list of every post would expose drafts, and serialising the model would leak any column added later.
- Fix:
WHERE published_at IS NOT NULL, apostJSONtype withwire.Time, clampedpageandper_page;TestPostsRouteAgainstDatabaseasserts the draft is absent,created_atis not leaked andper_pageis clamped. - Commit:
dd82b8a
Other additions beyond the plan
models.NewPost, the Go form ofPost::make($input), gives the walkthrough a write path throughlagoon.Fillthat the page shows and the Docker tests use to seed.TestPublishCommandOpensDatabasecovers thelagoon.OpenFromAppbranch ofwithDB, which is how the command runs from./bin/acme.- The migrations section is ordered before the routes section, and "Adding a column" is its subsection, because the route filters on
published_at.
Total deviations: 5 auto-fixed (2 blocking, 2 accuracy, 1 safety). Impact: no framework code changed; three scaffolder gaps are logged as todos.
Issues Encountered
- A probe command in the scratch directory stalled on an interactive
rmalias; it was stopped and the scratch files removed. No repository file was affected.
Verification
go vet ./...clean;go test -short ./...green.- Full
go test ./... -count=1with Docker: all 35 packages with tests pass, no FAIL lines; every walkthrough Docker test reports PASS, not SKIP. go run ./cmd/summer docs:build --check: no problems;docs:sync: all snippets up to date.scripts/check-phase11.1.sh --docs,--forbiddenand--deps,scripts/check-phase10.sh --hygieneandscripts/check-phase11.sh --hygienepass.- Acceptance greps: no
docs/examples/blog/go.mod; 20src=docs/examples/blog/fences (6 YAML); 16summer make:mentions;lagoon.Fillin models/post.go and post_test.go;ICU_LOCALEin postgres_test.go;"blog:publish"in console/publish.go;RequiredPermissionsin controllers/posts.go;porting-a-plugin.mdlinked from coming-from-wintercms.md and index.md; no forbidden names under docs;git diff --name-only 9033d81 -- internal/buildis empty.
Known Stubs
None. views/mail/welcome.htm is the scaffolder's placeholder template, kept so the layout matches make:plugin; MailTemplates returns nil, so it is never registered or sent.
Threat Flags
None. The example adds a public read-only route and an admin controller behind a permission; both are covered by the plan's threat register (T-11.1-16, T-11.1-17).
User Setup Required
None.
Next Phase Readiness
Plan 11.1-06 (unit tests last) can cover the walkthrough packages as they are; every sub-package with code already has a _test.go. The three scaffolder todos are ready for a code phase that owns internal/build.
Self-Check: PASSED
All listed files exist. Commits 41a3190, dd82b8a, 63290c6 and 4e05450 are in the log.