Skip to content

docs: rewrite documentation to match current code#99

Merged
basilebong merged 3 commits into
mainfrom
feat/snapshot-docs
Jun 19, 2026
Merged

docs: rewrite documentation to match current code#99
basilebong merged 3 commits into
mainfrom
feat/snapshot-docs

Conversation

@LukasPoque

Copy link
Copy Markdown
Member

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

  • LiveKitDriverLiveKitRuntime everywhere (the old name ImportErrors).
  • SDK README: dropped the SDK-does-OpenAI-TTS claim (TTS is server-side; the SDK reads only XRAY_OTLP_ENDPOINT); slimmed to a PyPI stub → docs/sdk-python.md.
  • README: replay context propagates via the JWT xray attribute (not "room metadata"); dead docs/SDK.md/docs/WIRE.md links repointed; agent OTLP env is XRAY_OTLP_ENDPOINT.
  • architecture: storage ERD corrected (analysis_step, 14 failure_reasons, recording_started_at, 13 tables, hash over {turns, judges}); gen_ai.operation.name dispatch; provider-selectable judge.
  • integrate: LiveKitRuntime import; gen_ai operation names; full xray.db table list.
  • CONTRIBUTING: removed the obsolete src/adapters/ section → real extension points; fixed uv-pinning + docker:smoke claims.
  • spec 0001: as-built monotonic-cursor attribution windows (fed turn_end_ms); real no-anchor error message.
  • typed-boundaries rule: replay-create example → real snake_case wire shape.

New

  • docs/sdk-python.md, docs/wire-contract.md, docs/index.md, docs/_config.ymldocs/ 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)

Enable the docs site

Settings → Pages → Deploy from a branch → main/docs.

@LukasPoque LukasPoque force-pushed the feat/snapshot-docs branch from 1444638 to be9f889 Compare June 16, 2026 10:51
@LukasPoque LukasPoque changed the base branch from main to feat/metrics-eval June 16, 2026 10:51
@LukasPoque LukasPoque force-pushed the feat/snapshot-docs branch from be9f889 to 78eedcd Compare June 16, 2026 10:55
@LukasPoque LukasPoque requested a review from basilebong June 16, 2026 11:01
Base automatically changed from feat/metrics-eval to main June 17, 2026 08:48
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.
@basilebong basilebong force-pushed the feat/snapshot-docs branch from 78eedcd to a6a1b39 Compare June 17, 2026 08:52
basilebong and others added 2 commits June 17, 2026 11:08
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>

@basilebong basilebong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@basilebong basilebong merged commit 00e6ba8 into main Jun 19, 2026
7 checks passed
@basilebong basilebong deleted the feat/snapshot-docs branch June 19, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants