13 KiB
phase, plan, subsystem, tags, requires, provides, affects, 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 | 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 | 01 | docs |
|
|
|
|
|
63bcbc31b0 |
dc6a03c714 |
|
|
|
|
|
|
15min | 2026-09-30 | complete |
Phase 11.1 Plan 01: Docs generator tracer Summary
summer docs:build renders docs/ and all 22 module READMEs through goldmark and html/template into HTML, .md siblings, llms.txt, llms-full.txt and a search index. Go fences with src= are byte-checked copies of tested source, and summer docs:sync refreshes them.
Performance
- Duration: 15 min
- Started: 2026-09-30T19:12:22Z
- Completed: 2026-09-30T19:27:06Z
- Tasks: 3
- Files modified: 18
Accomplishments
internal/docsiteis a stdlib and goldmark generator. It decodessite.yamland frontmatter strictly with goccy/go-yamlDisallowUnknownField, reports problems in the UI-SPECfile:line: rule: messagewording, renders every page in memory and writes nothing when a problem exists.- Module discovery reads
modules/at run time. Each directory with non-test Go files becomesapi/<name>from its README, and a directory with no README is areadme:problem. The real tree builds 24 pages: the index, installation and 22 API pages. - Heading anchors come from a single GitHub-compatible
parser.IDsimplementation (slugIDs). Links to.mdpages and tomodules/<m>/README.mdare rewritten to.htmlURLs in the HTML output and to.mdURLs in the raw output.search-index.jsonhas one entry per H2. - A
src=reference can name a whole file, a Go declaration, an Example body with its// Output:line, or adocs:start/docs:endregion. The path must stay inside the root: it must be relative and clean, must not follow a symlink out of the root, and must not point at a dotfile, a.envfile or a nested go.mod module. The referenced code must also run undergo test: Examples need// Output:,_test.gofragments must be reachable from a Test or Example, and non-test sources need a package with tests. bonfire.ExampleCallis shown indocs/setup/installation.md. Its fence body was written bydocs:sync.
Task Commits
- Task 1: Tracer:
summer docs:buildwith every output -6dacddc(feat) - Task 2: Every module as an API reference page, shared heading IDs, rewritten links, search entries -
e433dcf(feat) - Task 3: Verified snippets,
summer docs:sync, first Example -dc6a03c(feat)
Plan metadata: see the docs(11.1-01) commit that adds this file
Files Created/Modified
internal/docsite/docsite.go: Options, Problem, Result, Check, Build, the output guard and the file writerinternal/docsite/load.go: site.yaml and frontmatter decoding, the page walk, README ingestion, reading order and Pagesinternal/docsite/render.go: the goldmark pipeline, slugIDs, link rewriting, fence annotation and rendering, plain-text extraction and the fence scannerinternal/docsite/emit.go: the page template, .md siblings, llms.txt, llms-full.txt, search-index.json and assetsinternal/docsite/snippet.go: Ref, ParseSrc, Extract, the confinement and run rules, the drift check and Syncinternal/docsite/theme/templates/page.html,theme/assets/site.css: the tracer shell (sidebar and content) and the light tokenscmd/summer/docs.go: thedocs:buildanddocs:synccommandscmd/summer/docs_test.go: TestDocsTree, TestDocsBuildRealTree, TestEveryModuleInSidebar and TestDocsAIOutputsInSyncinternal/docsite/docsite_test.go: TestSlugIDs, TestReadmeIngestion, TestSnippetForms, TestSnippetConfinement and TestSyncRewritesDriftmodules/bonfire/example_test.go: ExampleCalldocs/site.yaml,docs/index.md,docs/setup/installation.md: the first contentcmd/summer/main.goandmain_test.go(registration, want list and help flags),.gitignore(/site/),README.md(adocs/layout row and a docs:build/docs:sync paragraph in Development)
Decisions Made
See key-decisions in the frontmatter. The most visible is the exported docsite.Pages, an addition to the planned interface that does not break it.
Deviations from Plan
Auto-fixed Issues
1. [Rule 3 - Blocking] api section added to site.yaml in Task 2, not Task 1
- Found during: Task 1
- Issue: With
apilisted in site.yaml before README ingestion existed (Task 2), the empty-section rule failedTestDocsTree. That would have brokengo testat the Task 1 commit. - Fix: Task 1 lists only
setup. Task 2 addsapiin the same change as its first pages, which is the rule the build enforces. - Files modified: docs/site.yaml
- Commit:
6dacddc,e433dcf
2. [Rule 1 - Bug] Code-block renderer priority
- Found during: Task 3
- Issue: At priority 2000 the custom fence renderer never replaced goldmark's default, because goldmark registers lower priority values last. No
<figure class="code">was emitted. - Fix: Priority 100, with a comment explaining it.
- Files modified: internal/docsite/render.go
- Commit:
dc6a03c
3. [Scope note] Snippet check wired in load.go
- Task 3 lists docsite.go and render.go. The call to
checkSnippetssits inassemblein load.go, where the rest of the load pipeline already lives. There is no behaviour difference.
4. [Content] installation.md links the bonfire README
- The "Check your install" section links
../../modules/bonfire/README.md, so the real tree exercises guide-to-README link rewriting.
Total deviations: 2 auto-fixed (1 blocking, 1 bug), 2 notes. Impact: none on scope. Every planned output, test and acceptance criterion is met.
Issues Encountered
gofmt -llistsinternal/build/registry.go. This was already the case before this plan, so it was left alone.- The GSD HEAD assertion treats
masteras protected. The project runs withbranching_strategy: none, and all earlier phase commits are on master, so this plan's commits are on master too. Settinggit.allow_default_branch_commits: truewould make that explicit.
Verification
go vet ./...is green, and so isgo test -short ./...across the repository.go test ./internal/docsite ./cmd/summer ./modules/bonfire -count=1is green.ExampleCallreports--- PASS.go run ./cmd/summer docs:build --out <tmp>writes 24 pages.docs:syncreports all snippets up to date. A drifted scratch copy fails--checkwithsnippet: body differs from modules/bonfire/example_test.go#ExampleCall (run: summer docs:sync).- The built output contains no consuming-application names. Its only absolute URL is the source_url caption link to the framework's own forge, and it has no third-party asset origins.
go.modis unchanged.
User Setup Required
None. No external service configuration is required.
Next Phase Readiness
Plan 11.1-02 can replace page.html with the full theme, reuse headingIDs/slugIDs for the anchor checker and docsite.Pages for the tree checks, and add docs:serve. The Commands option field is still to be added by 11.1-02, as planned.
Self-Check: PASSED
All 14 created files exist. Commits 6dacddc, e433dcf and dc6a03c are in the log.
Phase: 11.1-summercms-documentation-for-humans-and-ai-agents Completed: 2026-09-30