Six plans (tracer generator, site UX and checkers, content A, content B, acme/blog walkthrough, unit tests). SC4/DOCS-04 narrowed to docs/ pages per D-18; README Go fence conversion logged as a todo.
31 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, requirements, assumption_delta_decision, user_setup, estimate, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | requirements | assumption_delta_decision | user_setup | estimate | must_haves | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 11.1-summercms-documentation-for-humans-and-ai-agents | 04 | execute | 4 |
|
|
true |
|
no-change |
|
|
Purpose: complete D-08's section list and the D-09 concept map links. Per the Phase 11 summaries, the module names are conga, lighthouse (with lighthouse/centrifugo), flare, beachcomber (with beachcomber/typesense) and tide; the identifier checker stays the source of truth at execution time.
Output: 31 pages, three new site.yaml sections, example_test.go files for 17 packages, four test-only harness exports, and the updated concept map and required-pages test.
<execution_context>
@/.claude/gsd-core/workflows/execute-plan.md
@/.claude/gsd-core/templates/summary.md
</execution_context>
Authoring rules (same as plan 11.1-03; the checkers enforce them): strict frontmatter with one-sentence descriptions of at most 160 characters; first body line # <title>; ASCII headings without links or code; identifiers as backticked pkg.Ident spans; module links by README path; Go fences written empty with src= and filled by go run ./cmd/summer docs:sync; neutral names (acme, blog); Winter tone; describe APIs as they are. Stage only each task's files.
Database-bound snippets (D-07 "compiled and run"): when the code needs Postgres, write it as a helper function in the module's example_test.go (external <m>_test package) wrapped in // docs:start <name> / // docs:end <name>, and call the helper from a TestDocs<Name> test in the same file. The test gets a database from the module's existing internal harness through a new export_docs_test.go in the internal package (Go's export_test pattern: an exported test-only wrapper around lagoonDB/dedicatedDB, migratedDB, testApp and similar, read from modules//postgres_test.go). It skips under testing.Short() like the module's other database tests and fails, not skips, when Docker is missing in a full run (the harness TestMain already behaves this way). Prefer runnable Examples with the memory, log or null drivers where they exist (lighthouse memory driver, postcard memory driver, beachcomber null engine).
Files gap plan 11-08 changed (modules/lagoon/transaction.go, transaction_test.go, README.md, modules/cabana/crud.go, relation.go, modules/beachcomber/sync_test.go) are read-only for this plan.
Earlier phase gates also scan some of these module directories: scripts/check-phase10.sh --hygiene greps modules/boardwalk, modules/cabana and modules/phrasebook, and scripts/check-phase11.sh --hygiene greps modules/conga, modules/lighthouse, modules/flare and modules/beachcomber, both for application names and Polish catalogue words (see APPNAME_RE in scripts/check-phase11.sh). Example text in those directories uses acme/blog vocabulary only; a Polish plural example in phrasebook uses words such as post, posty, postów.
Task 1: Tracer: the Jobs page shows a dispatched job that really runs, and the concept map links it .planning/phases/11-jobs-realtime-and-search-infrastructure/11-08-SUMMARY.md exists (lagoon transaction and after-commit changes committed) docs/site.yaml, docs/services/jobs.md, modules/conga/example_test.go, modules/conga/export_docs_test.go, docs/setup/coming-from-wintercms.md, cmd/summer/docs_test.go - modules/conga/README.md and `go doc -all ./modules/conga` - modules/conga/postgres_test.go (TestMain, adminDB, migratedDB, testApp) and modules/conga/manager_test.go (how Dispatch is exercised) - .planning/phases/11-jobs-realtime-and-search-infrastructure/11-01-SUMMARY.md and 11-02-SUMMARY.md - .planning/phases/11-jobs-realtime-and-search-infrastructure/11-CONTEXT.md (the job manager, workers and scheduler decisions) - docs/setup/coming-from-wintercms.md (queued jobs row) Prove the database-bound snippet path end to end on one Services page before the bulk.docs/site.yaml: addservices("Services") afterplugins(and beforeconsole), in the same change as its first page.modules/conga/export_docs_test.go(packageconga): export test-only wrappers over the existing harness (for examplefunc DocsApp(t *testing.T) (*backpack.App, *gorm.DB)built frommigratedDBandtestApp).modules/conga/example_test.go(packageconga_test): a runnableExamplefor declaring a typed job withconga.Job(no database needed), ending with// Output:; and a region helper (for exampledocs:start dispatch) that dispatches a job inside a transaction and reads itssummer_jobsstatus, called fromTestDocsDispatch, which uses the exported harness, skips under-short, and asserts the job completes.docs/services/jobs.md(order 110): declaring jobs, registering them throughpact.HasJobs, dispatching in the caller's transaction, thesummer_jobsrecord and its statuses (in queue, in progress, complete, error, stopped), progress and cancellation, workers inserveversusqueue:work --queue,queue.work_in_serve,queue:clear, and a link to Plugins, Scheduling. Twogo src=modules/conga/example_test.go#...fences filled bysummer docs:sync.docs/setup/coming-from-wintercms.md: link the queued-jobs row to../services/jobs.md.TestDocsRequiredPages: appendservices/jobs. go vet ./... && go test ./modules/conga -run '^(Example.*|TestDocsDispatch)$' -count=1 -v && go test ./cmd/summer -run '^(TestDocsTree|TestDocsRequiredPages)$' -count=1 -v <fails_when>non-zero exit, a "--- FAIL" or "--- SKIP: TestDocsDispatch" line, or "no tests to run"</fails_when> <acceptance_criteria>go test ./modules/conga -run '^TestDocsDispatch$' -count=1 -vprints--- PASS: TestDocsDispatch(Docker available, not -short).grep -c 'src=modules/conga/example_test.go#' docs/services/jobs.mdprints at least 2.grep -n 'services/jobs.md' docs/setup/coming-from-wintercms.mdfinds a match.grep -n '// docs:start' modules/conga/example_test.gofinds a match.go run ./cmd/summer docs:build --checkexits 0. </acceptance_criteria> The Jobs page is live in a new Services section with one runnable Example and one database-backed region that a test runs, and the concept map points to it.
docs/site.yaml: adddatabase("Database") beforeservices.- Database pages (orders 10-70), each with at least one verified Go fence:
models.md: GORM structs with lagoon helpers, mass assignment withlagoon.Filland its allow-list, hidden fields in serialization, lifecycle hooks, the models-leaf rule.migrations.md: gormigrate migrations per plugin throughpact.HasMigrations,migrate,migrate:rollback --plugin,migrate:status, ordering by file name,make:migration.queries-and-pagination.md:lagoon.OrderBywith a caller allow-list,lagoon.Paginateand its response shape.relations.md: GORM associations, join tables withlagoon.RegisterJoinTable, soft-delete cascades.casts-and-validation.md: JSON columns, encrypted columns and the application key,lagoon.Validatewith Laravel-style rule strings.attachments.md:attachfile attachments on models, blob keys, thumbnails, deletion after commit.transactions.md:lagoon.Transaction,lagoon.AfterCommit(runs after commit; skipped with a warning inside a foreign plain*sql.Tx; a nestedlagoon.Transactionover a root handle fails),lagoon.OnDatabasefor boot-time work, and why side effects (broadcasts, search sync) wait for commit. Database-bound snippets follow the region-plus-TestDocs*rule withmodules/lagoon/export_docs_test.goexposing the lagoon harness; pure helpers (Validate, OrderBy allow-list checks, Fill) are runnable Examples.
- Services pages (orders 10-80):
configuration.md:compasslayering, per-environment dirs,SUMMER_overrides, plugin defaults, dot-path access,compass.Config.Persist; runnable Example over a temp config dir.events.md:festival.Buslisteners, priorities, stop-when-handled, collected results; reuse the festival region from plan 11.1-03 or add one.routing.md: routes frompact.HasRoutes, groups and auth groups, constraints (surf.Where,surf.WhereInstyle), named middleware, body limits, CORS, recovery,route:list, JSON responses withwire; runnable Examples withhttptest.rate-limiting.md: throttle buckets, named buckets fromsurf.BucketProvider, trusted proxies and client IP.authentication.md:bouncerJWT minting and verification, guards, the blacklist, password hashing; runnable Example that mints and verifies with a test-only secret.oauth-server.md:wristbandmetadata, dynamic client registration, authorization code with PKCE, consent, refresh rotation over application storage. Do not quote the default resource URL; tell the application to set it. Snippets only frommodules/wristband/example_test.go.mail.md:postcardtemplates and layouts in plugins, drivers memory/log/smtp, mandatory STARTTLS by default with plain SMTP as an explicit development-only opt-in; runnable Example with the memory driver.localization.md:phrasebookcatalogs, fallback order,:nameinterpolation, CLDR plurals, request locale intowel; runnable Example.
- Append the 15 page URLs to
TestDocsRequiredPages. - Run
go run ./cmd/summer docs:syncandgo run ./cmd/summer docs:build --check; fix every problem in the pages. go vet ./... && go test ./modules/lagoon/... ./modules/compass ./modules/surf ./modules/wire ./modules/bouncer ./modules/wristband ./modules/postcard ./modules/phrasebook -run '^(Example|TestDocs)' -count=1 && go test ./cmd/summer -run '^(TestDocsTree|TestDocsRequiredPages|TestDocsAIOutputsInSync)$' -count=1 <fails_when>non-zero exit, a "--- FAIL" line, or "no tests to run"</fails_when> <acceptance_criteria>ls docs/database/*.md | wc -lprints 7 andls docs/services/*.md | wc -lprints 9.grep -l '// Output:' modules/lagoon/example_test.go modules/compass/example_test.go modules/surf/example_test.go modules/wire/example_test.go modules/bouncer/example_test.go modules/wristband/example_test.go modules/postcard/example_test.go modules/phrasebook/example_test.go | wc -lprints 8.grep -n 'lagoon.AfterCommit' docs/database/transactions.mdfinds a match.grep -c 'src=modules/wristband/' docs/services/oauth-server.mdprints at least 1 and! grep -n 'src=modules/wristband/server.go\|src=modules/wristband/stores.go\|src=modules/wristband/client_issue.go' docs/services/oauth-server.md(no match).grep -n 'STARTTLS' docs/services/mail.mdfinds a match.go run ./cmd/summer docs:build --checkexits 0 andscripts/check-phase11.1.sh --forbiddenpasses. </acceptance_criteria> Database and the core Services pages are in the sidebar with running examples, the transaction page matches the 11-08 behaviour, and the real-tree checks and the forbidden-name gate pass.
docs/site.yaml: addbackend("Backend") afterpluginsand beforedatabase, so the final order is setup, architecture, plugins, backend, database, services, console, api. MakeTestDocsRequiredPagesalso assert this exact section order.- Backend pages (orders 10-80):
admin-controllers.md(pact.AdminController, config_form.yaml and config_list.yaml, the JSON admin API, hooks, toolbar actions,make:admin-controller),forms.md(fields.yaml, field types, options providers, spans, read-only and context fields),lists-and-filters.md(columns.yaml, sorting, pagination options, filter scopes),relation-manager.md,users-and-permissions.md(admin JWT and cookie auth, permissions,admin:create,admin:reset-password),settings.md(pact.SettingsItemsettings pages),partials-and-widgets.md(server-rendered partials, client assets, widget and toolbar actions from Phase 10.1),admin-spa.md(boardwalk, thebackend.uriprefix, OpenAPI-generated types). YAML examples useyaml src=references to real cabana test fixtures where one exists; Go snippets come frommodules/cabana/example_test.go(schema compilation or controller declaration that runs without a database). - Services pages (orders 90-160):
storage.md(upload buckets, bucket URLs,attachlink),outbound-http.md(fetchguardprivate-address blocking, host, size and timeout limits),realtime.md(lighthousedrivers andrealtime.driver, channel naming rules, the authorizer registry,lighthouse.Mountwith surfaces, model broadcasts enqueued in the write transaction and published after commit,lighthouse.WithoutBroadcastingandEmit, the Centrifugo driver's token and subscribe routes,websockets:health),push.md(flareWeb Push with VAPID, https-only allowlisted hosts, no redirects,websockets:generate-vapid-keys,websockets:test-push),search.md(beachcomberSearchable models, engines andsearch.driver, after-commit sync gated by a kill-switch,SearchIDsresults as candidates that the application re-checks in SQL, the Typesense engine),parity-testing.md(tiderecord and replay, normalized diffs, broadcast goldens, theparity:*commands),frontend-and-ajax.md(title "Frontend and AJAX (not provided)": SummerCMS is headless; CMS pages, themes, layouts, components, the AJAX framework and Snowboard are not provided; build the frontend as a separate application against the JSON API and realtime channels; link routing, authentication and realtime). Realtime and search snippets are runnable Examples on the memory driver and null engine; database-bound broadcast or sync snippets use the region-plus-TestDocs*rule withexport_docs_test.goin lighthouse and beachcomber. docs/setup/coming-from-wintercms.md: link every row whose topic now has a guide page (models, migrations, backend controllers, forms and lists, routes, middleware, config, lang, events, mail, settings, broadcasting, search, HTTP client) and point the Not provided rows at../services/frontend-and-ajax.md.docs/index.md: add the Backend, Database and Services entry points.- Append the 15 page URLs to
TestDocsRequiredPages. - Run
go run ./cmd/summer docs:syncandgo run ./cmd/summer docs:build --check; fix every problem in the pages. go vet ./... && go test ./modules/cabana ./modules/fetchguard ./modules/lighthouse/... ./modules/flare ./modules/beachcomber/... ./modules/tide -run '^(Example|TestDocs)' -count=1 && go test ./cmd/summer -run '^(TestDocsTree|TestDocsRequiredPages|TestDocsAIOutputsInSync|TestDocsBuildRealTree)$' -count=1 <fails_when>non-zero exit, a "--- FAIL" line, or "no tests to run"</fails_when> scripts/check-phase11.1.sh --docs && scripts/check-phase11.1.sh --forbidden && scripts/check-phase10.sh --hygiene && scripts/check-phase11.sh --hygiene <fails_when>non-zero exit or a line starting "refuse:"</fails_when> <acceptance_criteria>ls docs/backend/*.md | wc -lprints 8 andls docs/services/*.md | wc -lprints 16.grep -n 'Snowboard' docs/services/frontend-and-ajax.mdfinds a match.grep -c 'frontend-and-ajax.md' docs/setup/coming-from-wintercms.mdprints at least 1.grep -n 'WithoutBroadcasting' docs/services/realtime.mdfinds a match andgrep -n 'SearchIDs' docs/services/search.mdfinds a match.go test ./cmd/summer -run '^TestDocsRequiredPages$' -count=1 -vprints--- PASS: TestDocsRequiredPageswith the section-order assertion.go run ./cmd/summer docs:build --checkexits 0. </acceptance_criteria> All eight D-08 sections are in the sidebar in Winter order, the Phase 11 services are documented as shipped with running examples, the not-provided frontend is explicit, and the concept map links every guide.
<threat_model>
Trust Boundaries
| Boundary | Description |
|---|---|
| docs pages → operators | Operators copy security-relevant configuration (mail TLS, push hosts, search re-gating, OAuth resource) from these pages |
| module sources → published snippets | src= copies publish source text, including comments |
STRIDE Threat Register
| Threat ID | Category | Component | Severity | Disposition | Mitigation Plan |
|---|---|---|---|---|---|
| T-11.1-13 | Information disclosure (policy) | docs/services/oauth-server.md snippets | medium | mitigate | Snippets only from modules/wristband/example_test.go (acceptance grep forbids src= into wristband server.go, stores.go, client_issue.go); forbidden-name check over outputs |
| T-11.1-14 | Tampering (misconfiguration) | docs/services mail, push, search, realtime pages | medium | mitigate | Pages state the shipped secure defaults (STARTTLS, allowlisted https push hosts, SQL re-gate of SearchIDs, secret-checked subscribe proxy) and mark insecure options development-only; safety prohibition reviewed at verify |
| T-11.1-15 | Denial of service (test isolation) | export_docs_test.go harness wrappers | low | mitigate | Wrappers reuse each module's dedicated-database harness; no shared or developer database is touched |
| T-11.1-SC | Tampering | npm/pip/cargo/go installs | high | accept | This plan adds no module or package |
| </threat_model> |
<success_criteria>
- SC1: all Winter-mirroring sections present with every framework module reachable from the sidebar.
- SC4: every Go example in these pages is compiled and run by
go test ./.... - SC5 (partial): the concept map links every guide page and the not-provided page. </success_criteria>
Artifacts this phase produces
- Pages:
docs/database/{models,migrations,queries-and-pagination,relations,casts-and-validation,attachments,transactions}.md,docs/backend/{admin-controllers,forms,lists-and-filters,relation-manager,users-and-permissions,settings,partials-and-widgets,admin-spa}.md,docs/services/{configuration,events,routing,rate-limiting,authentication,oauth-server,mail,localization,storage,outbound-http,jobs,realtime,push,search,parity-testing,frontend-and-ajax}.md. - site.yaml sections:
backend,database,services(final order setup, architecture, plugins, backend, database, services, console, api). - Examples and docs tests in
modules/{conga,lagoon,lagoon/attach,compass,surf,wire,bouncer,wristband,postcard,phrasebook,cabana,fetchguard,lighthouse,flare,beachcomber,tide}/example_test.go;TestDocs*database-backed snippet tests; test-only harness exportsmodules/{conga,lagoon,lighthouse,beachcomber}/export_docs_test.go. - Updated
docs/setup/coming-from-wintercms.md,docs/index.md,TestDocsRequiredPageswith the section-order assertion.