10 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 | 07 | docs |
|
|
|
|
|
d9f187ae39 |
ce5dcec7e4 |
|
|
|
|
|
|
33 min | 2026-10-01 | complete |
Phase 11.1 Plan 07: Fail-closed docs checkers Summary
Docs checkers walk the goldmark AST, refuse nested and module-README src= fences, and accept a Go src= target only when go test ./... compiles and runs it.
Performance
- Duration: 33 min
- Started: 2026-10-01T06:19:48Z
- Completed: 2026-10-01T06:53:36Z
- Tasks: 5
- Files modified: 64
Accomplishments
collectFencesfinds every fenced code block the renderer parses, including fences inside callouts, blockquotes, and list items. Asrc=fence that is not a top-level block of a docs page fails Check, docs:build, and docs:sync, and sync writes nothing.- Captions are limited to top-level
src=fences of docs/ pages. A module READMEsrc=fence is refused withreadmeSrcMessageand is not extracted. A Go fence withoutsrc=in a README stays legal. - A
.gosrc=target must sit in the default build (build.ImportDironbuild.Default, plustestdataand_-prefixed directories) and inside aTestfunction or an Example with// Output:, or a function one of them calls.go doc -cmakes the identifier fallback case-sensitive.commandWordparses env prefixes, cobra-style flags,go run ./cmd/summer, andbin/{app}. - Eighteen planted fixtures and branch tests pin those holes.
internal/docsitecoverage is 94.1%.scripts/check-phase11.1.sh --allprintedphase11.1 all passed.
Task Commits
Each task was committed atomically:
- Task 1: AST fence discovery, nested src= refused, captions only on verified fences -
5b7e37f(fix) - Task 2: Go-lexer policy, README src= refusal, shell fences from the AST -
73c72af(fix) - Task 3: Proof of execution, go doc -c, command words -
efc3161(fix) - Task 4: Planted fixtures and unit tests -
9ba5530(test) - Task 5: Acceptance scanner and gate plants -
550fa06(test) - Task 5 planning: VALIDATION rows and README todo -
ce5dcec(docs)
Plan metadata: committed after this file.
Files Created/Modified
internal/docsite/fences.go- AST fence collection shared by check and sync.internal/docsite/snippet.go- nested and README refusals, build membership, test-graph roots.internal/docsite/check_policy.go- Go-lexer fences at every depth; unknown callouts from remaining blockquotes.internal/docsite/check_commands.go- shell fences from the AST;commandWord.internal/docsite/check_identifiers.go-go doc -c.internal/docsite/render.go- captions only on verified top-level docs fences;openFencerejects indent above 3 spaces.internal/docsite/highlight.go-goLangvia the chroma Go lexer.cmd/summer/phase11_1_acceptance_test.go- independentscanDocFencesand caption cross-check.scripts/check-phase11.1.sh- self-test plants and the new test names.docs/console/utilities.md,README.md- the top-level, alias, callout, and README rules.internal/docsite/testdata/violations/- 18 new plants (81 directories total).
Decisions Made
- Nested
src=fences are refused instead of extracted, because docs:sync cannot rewrite a line that still carries its container marker. - Module README code blocks stay rendered as written. A
src=there would claim a check that does not run, so it is refused, and the caption transformer skips README pages. - Reachability roots are the cmd/go
Testname rule plusgo/docExamples that have output. An Example without// Output:is not a root. commandWordtreats--helpand-has bool flags and consumes the next token for every other--nameor two-character-x, matching cobra'sstripFlags.
Deviations from Plan
Auto-fixed Issues
1. [Rule 1 - Bug] Drift fixture was a nested src= fence
- Found during: Task 1 (AST fence discovery)
- Issue:
TestSyncRewritesDriftplanted asrc=fence inside a list item. The new nested rule correctly refused it, so the test no longer reported drift. - Fix: Removed the list marker. The drifted fence is a two-space-indented top-level fence. The expected problem line moved from 13 to 11. Indent-preserving sync assertions still hold.
- Files modified:
internal/docsite/docsite_test.go - Commit:
5b7e37f
Total deviations: 1 auto-fixed (Rule 1). Impact: the drift test still pins body mismatch; nested fences are covered by the new plants instead of that fixture.
Tasks 2 and 3 needed no source fix on the real tree. go run ./cmd/summer docs:build --check printed docs:build: no problems found after each. No existing unit-test tree relied on an Example without output as a root.
Tracking
state.advance-plan at close-out read Plan: 1 of 7 (phase begin had reset the counter) and stepped it to 2 of 7. The position was set back to Plan: 7 of 7 before the last-plan advance, which waits until this summary exists.
DOCS-04 and DOCS-05 are listed in requirements-completed from the plan frontmatter. They were not ticked in REQUIREMENTS.md; re-verification does that.
Mutation checks
Recorded from scratch edits that were restored and not committed:
- Removing the nested branch of
checkFencesturnedTestPlantedViolations/snippet-callout-driftred (the test panicked infenceBodybecause a nested fence has no top-level line span). - Dropping
-cfromgoDocturnedTestPlantedViolations/identifier-wrong-casered (zero problems; the wrong-case span passed). - Treating every Example as a root turned
TestPlantedViolations/snippet-example-no-output-helperred (zero problems; the helper became reachable). - Renaming
TestCommandWordin a scratch copy madescripts/check-phase11.1.sh --namedexit 1 withrefuse: named tests did not pass ... TestCommandWord. The rename was restored.
Follow-up
The identifier index still reads build-ignored files. That hole is outside this plan and was not changed.
Authentication Gates
None.
Known Stubs
None.
Threat Flags
None. The checkers stay inside the plan's threat register (T-11.1-20 through T-11.1-25). No new endpoint, credential path, or dependency. git diff d9f187ae39d174d813309a7e9adc8ddc3cc7fe10 HEAD -- go.mod go.sum is empty.
Self-Check: PASSED
- FOUND: internal/docsite/fences.go
- FOUND: internal/docsite/fences_test.go
- FOUND: cmd/summer/phase11_1_acceptance_test.go
- FOUND: scripts/check-phase11.1.sh
- FOUND: .planning/phases/11.1-summercms-documentation-for-humans-and-ai-agents/11.1-VALIDATION.md
- FOUND:
5b7e37f - FOUND:
73c72af - FOUND:
efc3161 - FOUND:
9ba5530 - FOUND:
550fa06 - FOUND:
ce5dcec go test ./internal/docsite ./cmd/summer -count=1passed after Tasks 3 and 4.go test ./internal/docsitecoverage 94.1% (above 85%).scripts/check-phase11.1.sh --allprintedphase11.1 all passed.