docs: rewrite documentation to match current code#99
Merged
Conversation
1444638 to
be9f889
Compare
be9f889 to
78eedcd
Compare
d195f58 to
84457c9
Compare
Audit every doc against the codebase (trust-code-only) and fix drift: - Replace the non-existent LiveKitDriver with LiveKitRuntime across README, architecture, integrate, and CLAUDE. - SDK README: drop the inverted TTS narrative (TTS is server-side; the SDK reads no provider key) and slim it to a PyPI stub pointing at the new docs/sdk-python.md. - README: fix replay-context propagation (JWT `xray` attribute, not room metadata), repoint dead docs/SDK.md and docs/WIRE.md links, and fix the agent OTLP env var (XRAY_OTLP_ENDPOINT). - architecture: correct the storage ERD (analysis_step / failure_reason enums, recording_started_at, 13 tables, spec-based conversation hash), the gen_ai operation dispatch, and the judge provider set. - integrate: fix the LiveKitRuntime import, gen_ai operation names, and the xray.db table list. - CONTRIBUTING: replace the removed src/adapters section with the real extension points, and correct the uv-pinning and docker:smoke claims. - typed-boundaries rule: fix the replay-create example to the real snake_case wire shape. Add docs/sdk-python.md (SDK reference) and docs/wire-contract.md (OTLP contract), plus docs/index.md + docs/_config.yml so docs/ renders as a GitHub Pages site (deploy-from-branch, just-the-docs theme). Remove docs/specs/0001 (a dev-only design note); its still-relevant rationale is folded into architecture.md and wire-contract.md.
78eedcd to
a6a1b39
Compare
PR review follow-up: - architecture.md: the three ../.claude/rules/ links escape the GitHub Pages root (only /docs is served under baseurl /xray), so they 404 on the live site. Point them at the github.com/.../blob/main blob URL, matching how sdk/python/README.md links cross-tree docs. - integrate.md + README.md: quote `pip install "xray-py[livekit]"` so zsh doesn't glob the extras bracket (the rest of the docs already do). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Keep the prose docs in sync with the code without paying for AI-in-CI. Two artifacts, no CI changes, no new maintenance gate: - .claude/rules/docs-freshness.md — treats docs as untrusted, defines the coarse source→doc map (the couplings that drifted in the docs rewrite), and makes freshness a "fix in passing" + pre-PR obligation. Cross-links honesty.md (don't over-claim). Imported into CLAUDE.md's rules list. - .claude/commands/audit-docs.md — the verify-against-source audit method, invocable as /audit-docs. Stale-name grepping lives inside the audit (human-judged), not as a brittle standalone CI denylist. Deliberately no CI gate / pre-commit grep: an incomplete denylist gives false confidence and rots faster than the docs it guards. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Audited every doc against the actual code (comments/docstrings/markdown treated as untrusted) and brought them back in sync. Mostly minor drift dominated by one propagated naming bug; the SDK README had an inverted TTS story.
Fixed
LiveKitDriver→LiveKitRuntimeeverywhere (the old nameImportErrors).XRAY_OTLP_ENDPOINT); slimmed to a PyPI stub →docs/sdk-python.md.xrayattribute (not "room metadata"); deaddocs/SDK.md/docs/WIRE.mdlinks repointed; agent OTLP env isXRAY_OTLP_ENDPOINT.analysis_step, 14failure_reasons,recording_started_at, 13 tables, hash over{turns, judges});gen_ai.operation.namedispatch; provider-selectable judge.LiveKitRuntimeimport;gen_aioperation names; fullxray.dbtable list.src/adapters/section → real extension points; fixeduv-pinning +docker:smokeclaims.turn_end_ms); real no-anchor error message.New
docs/sdk-python.md,docs/wire-contract.md,docs/index.md,docs/_config.yml—docs/renders as a GitHub Pages site (deploy-from-branch, just-the-docs; nothing added to lockfile/CI).Method
Code-only audit, confirmed by an adversarial verification pass against source.
Follow-up (separate)
examples/.../driver/test_e2e.py— tracked in examples: test_e2e.py reads non-existent ReplayResult.status / .id #98.snapshot/xray.dbis at migration 0001 (already ticketed).Enable the docs site
Settings → Pages → Deploy from a branch →
main→/docs.