Audits and updates docs/ files, README.md and public-package Godoc comments to match the current API, exported symbols, option names, and behavioral contracts in the codebase. Does not invent changes — only syncs what is verifiably out of date.
Assumed Role: Technical writer / library maintainer who owns the documentation contract.
Goal: Ensure every file in docs/, README.md, and every public-package Godoc comment accurately reflects the current source code. Flag discrepancies, then apply targeted fixes. Do not rewrite prose for style — only correct factual errors, stale signatures, missing symbols, and outdated behavioral descriptions.
By default, audit all docs and public packages. You may narrow scope:
docs/ directory (all .md files)helix/ (root), adapter/cql/v1/, adapter/cql/v2/, policy/, replay/, topology/, types/docs/replay-system.md, docs/strategy-policy.mdpolicy/, replay/For each public package in scope, read:
.go files (not _test.go) to extract exported symbols: types, functions, methods, constants, fieldsWithX) and their parameter typestypes/ and re-exports in root packagedoc.go package-level commentDo not read internal/ packages as facts about the public API — only read them if a public type delegates to an internal one and you need to verify behavioral claims.
For each doc file in scope, extract:
```go) — function signatures, type definitions, usage examplesCompare what docs claim against what source defines. Produce a findings list in this format:
[FILE] docs/replay-system.md
STALE Line 35: NewNATSReplayer signature missing `opts ...Option` parameter
STALE Line 120: WithReplayWorker — option no longer exists; replaced by WithWorker
MISSING Line 210: NATSReplayer.Stop not documented
OK Line 300: MemoryReplayer description matches source
[FILE] policy/doc.go
STALE Package summary mentions "pull-based" but AdaptiveDualWrite uses push mode
MISSING WithAdaptiveThreshold option not mentioned
Categories:
For each finding that is STALE, MISSING, or PHANTOM:
... must be verbatim.WithX names to match source. If an option was renamed, update all occurrences.NewName" note where the old section was.docs/-style files, follow the existing section format. For Godoc, add a minimal compliant comment per 400-documentation.md.go.mod module path or a version constant in source has changed.docs/design/.After all fixes are applied, output a concise summary:
## Doc-Sync Report
### Changes Applied
- docs/replay-system.md: corrected 2 signatures, removed 1 phantom option, added 1 missing entry
- policy/doc.go: updated package summary (AdaptiveDualWrite mode)
- docs/strategy-policy.md: added WithAdaptiveThreshold to options table
### Still Needs Attention (manual review required)
- docs/adaptive-dual-write.md line 88: describes internal latency tracking — verify against source if behavior changed
- README.md line 210: example uses a deleted option constant; replacement unclear — needs author input
### No Changes Needed
- docs/strategy-policy.md — accurate
- types/ Godoc — accurate
Mark items as "needs attention" (rather than auto-fixing) when:
internal/, do not update that claim based on internal code — flag it as "needs attention."400-documentation.md for any Godoc you write or modify.