Skip to content

docs: add the Python library reference page (#260) - #284

Merged
DustinTrap merged 2 commits into
mainfrom
docs/260-library-reference
Oct 15, 2026
Merged

DustinTrap merged 2 commits into
mainfrom
docs/260-library-reference

Conversation

@DustinTrap

Copy link
Copy Markdown
Owner

Closes #260.

What

docs/python-library.md — the reference page the audit found missing: docs/ covered CLI, configuration and the MCP server, but a library user had only README snippets and the agent-facing skill playbook (which is about driving safely, not about what exists).

Sections: the public import surface (kvm_pilot.__all__ + subpackages, underscore = private) · building a driver (make_driver, resolve_host precedence, make_driver_from_config incl. auto, register_driver) with a table of every kind and its constructor · capabilities and the protocol → method table, VideoScope semantics · the KVMClient method surface grouped, destructive ones marked · safety (dry_run first, then confirm; allow_all default means unattended; EffectClass/effect_of) · health (run_healthcheck, HealthReport, preflight/HealthGateError, AutoFix) · the full error hierarchy with when-raised · vision (make_backend kinds, VisionBackend contract, ScreenAnalyzer options, ALL_PHASES, the sensing hierarchy and DEFAULT_OCR_RULES, consensus) · the two SSH channels · the auto-detection probe table from detect.py · evidence-data helpers (load_registry, rollup, compute_maturity) · a complete safe script.

This closes the "sensing-hierarchy prose home" half of #13 and the library half of #152's best-practices ask, as the issue anticipated.

Why python-library.md, not library.md

The skill playbook src/kvm_pilot/skill/references/library.md already publishes to the wiki as library.md, and wiki link rewriting maps by file stem, so a second library.md would collide. The reason is recorded next to the PAGES entry.

Verification

  • Every snippet and every claimed signature/behaviour was executed against the fake driver before writing (deny_all → SafetyError; dry_run flip skips; effect_of; run_healthcheck(...).worst; KeyError on an unknown profile; ValueError on an unknown kind; wait_for_state raises kvm_pilot.TimeoutError; the powered fake with phase="grub_menu" resolves without a model call; rollup(vendor="gl.inet", product="RM1PE") returns rows).
  • Registered in PAGES (Reference), docs/README.md, llms.txt; build_wiki.py --check and the docs guards pass.

🤖 Generated with Claude Code

docs/ covered the CLI, config and MCP server but had no library
reference; it existed only as README snippets and the agent-facing skill
playbook. docs/python-library.md is the public-surface map: import
surface, every driver kind with its constructor, the capability
protocols + VideoScope, the KVMClient method surface, the safety gate
(dry_run first, then confirm; EffectClass), run_healthcheck/preflight,
the full error hierarchy, the vision contract and sensing hierarchy,
the two SSH channels, the auto-detection probe table (detect.py's
docstring), and the evidence-data helpers. Every snippet was executed
against the fake driver before it went in.

Named python-library.md rather than library.md: the skill playbook
already publishes to the wiki as library.md and wiki links map by stem.
Registered in PAGES (Reference), docs/README.md and llms.txt.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 48606bb2-97da-4275-9727-66128c87b2d2
📥 Commits

Reviewing files that changed from the base of the PR and between 9a1c975 and 4491962.

📒 Files selected for processing: 5
  • .github/scripts/build_wiki.py
  • CHANGELOG.md
  • docs/README.md
  • docs/python-library.md
  • llms.txt
+----------------------------------------------------------------------------------------------------------------------+
| You can't write perfect software. Software can't be perfect. Protect your code and users from the inevitable errors. |
+----------------------------------------------------------------------------------------------------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@DustinTrap
DustinTrap merged commit 06323f9 into main Oct 15, 2026
11 of 12 checks passed
@DustinTrap
DustinTrap deleted the docs/260-library-reference branch October 15, 2026 12:06
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.

docs: add a Python library/API reference page (docs/library.md)

1 participant