Status: DRAFT for senior DX-engineer review. Derived from a requirements interview. This document defines what "done and good" means for the documentation rework before the site goes live at
vgi-python.query.farm.
A developer who has never used VGI can build and run a real worker fast. Everything on the site is optimized around that job-to-be-done; depth is available but never blocks the fast path.
The reader could be a Python developer new to DuckDB/Arrow, a DuckDB/SQL user newer to Python, or someone fluent in both. Therefore:
- The happy path is skimmable by experts (dense, copy-paste-ready).
- Newcomers are served by progressive disclosure: inline "New to Arrow? →" / "New to DuckDB extensions? →" callouts and links, not walls of prerequisite text.
- We never assume knowledge silently; we either explain briefly or link out.
Top-level navigation is reorganized into the four Diátaxis modes (this directly addresses the current "hard to orient" problem):
- Tutorial — one guided, end-to-end "build your first worker" path.
- How-to guides — task-oriented recipes ("Add a table function", "Run over HTTP with auth", "Persist aggregate state").
- Concepts — explanations: worker lifecycle (bind/init/process/finalize), transports, the Arrow data model, catalogs & ATTACH, parallel workers.
- API Reference — the existing auto-generated mkdocstrings pages.
The current 11 hand-written guides are re-homed into How-to vs Concepts (not left in a flat "Guides" bucket).
- All four function patterns: scalar, table, table-in-out, aggregate.
- Catalogs / ATTACH model — how functions are surfaced to DuckDB.
- State storage —
FunctionStoragebackends for stateful/aggregate functions. - Auth + HTTP transport — running a worker over HTTP with bearer/JWT auth.
- Filter pushdown & column statistics — optimizer integration for table functions.
- Transactor (transactional DB access)
- External storage / large-payload offload (S3/GCS)
- Observability (OpenTelemetry / Sentry)
- Sharding / meta-worker, cross-language client codegen, standalone secret service
These remain available in the auto-generated API reference but get no tutorial/how-to investment in v1.
An unfamiliar developer, working unaided from the docs, has both a custom scalar function AND a custom table function callable from DuckDB within ≤20 minutes.
- "Callable from DuckDB" =
SELECT my_cat.my_scalar(col) FROM treturns rows, andSELECT * FROM my_cat.my_table(args)returns rows. - Engine for the timed path: Haybarn (
uvx haybarn-cli) as the primary happy path; a stock-DuckDB variant (INSTALL vgi FROM community; LOAD vgi;) shown in a callout/tab for portability. - Every place a test participant gets stuck is logged and fixed before sign-off.
Each page must contain:
- Lead "what + who" line — one sentence at the top: what this page is and who it's for (reader self-orients in <10 s).
- Prerequisites stated — explicit assumed knowledge, prior steps, and required
extras (
vgi-python[http], etc.), with links. - At least one complete, runnable example — no elisions; covered by the CI example tests (see Quality Gates).
- "Next steps" links — a closing section pointing to the logical next page(s); no dead ends.
- 100% of Python code blocks are copy-paste runnable and CI-tested (e.g. via
pytest-examples, already a dev dependency). - The tutorial worker is built and queried end-to-end in an automated test.
- A broken example fails the build.
- Fresh-dev usability test — ≥1 developer unfamiliar with VGI completes the headline acceptance test (scalar + table from DuckDB, ≤20 min, unaided). All stumbling points resolved.
- Senior DX reviewer rubric — named senior DX engineer(s) score the site against a written checklist: orientation, scannability, completeness vs the in-scope list, correctness, navigation, and the per-page standard above. All must-fix items resolved before merge.
- Automated quality gates in CI:
mkdocs build --strictpasses with zero warnings (no broken links / refs).- All documentation examples execute successfully.
- Link check + prose/style lint pass.
- Diátaxis nav live (Tutorial / How-to / Concepts / API Reference); existing guides re-homed.
- Guided tutorial takes a reader from zero → scalar + table function queried from Haybarn, with the stock-DuckDB variant noted.
- How-to + runnable example exists for each in-scope topic (4 patterns + catalogs + state storage + auth/HTTP + pushdown/stats).
- Concept pages cover lifecycle, transports, Arrow model, catalogs, parallelism.
- Every page meets the 4-point orientation standard.
- All examples runnable and CI-tested; tutorial validated end-to-end in CI.
- Out-of-scope topics confined to reference; not advertised as v1 guides.
- All three quality gates passed and signed off.
- Named senior DX reviewer(s) and the recruited fresh-dev test participant.
- Final wording/threshold of the prose-style lint (e.g. Vale ruleset), if adopted.