Skip to content

docs: one page for a coding assistant, and a copy-page control on every page - #15

Merged
AlexeyShalaev merged 2 commits into
masterfrom
docs/copy-page-and-agents
Sep 6, 2026
Merged

docs: one page for a coding assistant, and a copy-page control on every page#15
AlexeyShalaev merged 2 commits into
masterfrom
docs/copy-page-and-agents

Conversation

@AlexeyShalaev

Copy link
Copy Markdown
Member

Three parts, one of which is real work and two of which are the same files every other
repository in the organisation is getting.

The control. A "Copy page" split button above every docs page: it copies the page's
Markdown, or opens it in ChatGPT / Claude / Perplexity. It works because
scripts/emit_markdown.py runs after the build and writes every docs/<path>.md next to
the HTML it built, so each page has a plain-text twin one URL away —
/guide/resilience/ and /guide/resilience.md. The Docs workflow gained that one step.
docs/reference/index.md declines the control with copy_page: false: its Markdown is
instructions to mkdocstrings, not the API, so a twin would hand a model four lines of
directives instead of a reference.

The page. docs/agents.md, in the nav as "For AI agents": the whole library on one
page for a coding assistant — the facts table, the mental model, the public API in tables,
twenty rules that hold or break the code, seven WRONG/RIGHT pairs, the error hierarchy, and
a map of every page of the site with a read it when. The rules are the point, and they
are the ones that are true here: who owns a channel and who closes it, that the pool never
closes an idle channel because gRPC core parks it, that a timeout is the budget of the
whole call rather than of an attempt, that DEFAULT_RETRYABLE_CODES is two codes and
idempotent_methods is the only real guard, that fail_threshold has to exceed
max_attempts, that nothing propagates a deadline until the caller calls use_budget, and
that the chain is part of the pool key so it has to be built once per target. Every name on
it was checked against the installed package: 57 of the 58 top-level names resolve directly,
HealthChecker resolves to the ImportError naming [health] exactly as the page says,
and the 18 submodule-only names the page routes elsewhere all resolve there.

The rule. CONTRIBUTING.md gets a section saying the page is part of the public API and
goes stale in the same pull request that changes it, and the pull request template's
documentation line now names it. A stale agents page is worse than none — it teaches a model
an API that no longer exists.

To see it: the Docs workflow deploys on merge, and the page lands at
https://bedrock-python.github.io/grpc-client-kit/agents/ with the control on every page
above it.

docs/assets/stylesheets/copy-page.css, docs/assets/javascripts/copy-page.js,
overrides/main.html and scripts/emit_markdown.py are byte-identical across the
organisation, so they can be updated in one sweep; nothing in them is repository-specific.

Verified locally: zensical build --clean says "No issues found", emit_markdown.py writes
14 pages with 1 declined, make check is clean (ruff, ruff format, mypy on 25 files), and
uv.lock is untouched.

Three things worth a separate look, all pre-existing and none touched here:

  • docs/guide/health.md says the factory "does not forward options or compression"
    to the health checker. It does — factory.py passes both, with the comment explaining why.
  • docs/guide/health.md also says every probe asks for the overall server status, and that
    HealthCheckerNotRunningError lives in grpc_client_kit.health and needs the [health]
    extra. HealthChecker has taken a service argument since 0.1.0 and the factory forwards
    it, and the error lives in grpc_client_kit.errors precisely so that catching it needs no
    extra — its own docstring says so.
  • docs/guide/resilience.md and docs/guide/deadlines.md both say there is no settings
    block for the wait-for-ready and deadline-budget layers. There is;
    docs/guide/configuration.md documents it correctly and the factory reads both with
    getattr.

@AlexeyShalaev
AlexeyShalaev merged commit d4a1347 into master Sep 6, 2026
6 checks passed
@AlexeyShalaev
AlexeyShalaev deleted the docs/copy-page-and-agents branch September 6, 2026 17:28
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.

1 participant