# Repository Guidance ## Project `python-docs-mcp-server` is a read-only MCP server for the official Python standard library documentation. It is built for end users who want precise, version-aware stdlib answers inside MCP clients such as Claude, Cursor, and Codex without relying on an external hosted docs API at query time. The repo's public credibility matters. Prefer changes that make the project easier to trust, easier to verify, and easier to contribute to over changes that merely add more AI or MCP setup. ## Autonomous Agent Execution A portion of this project is executed by autonomous coding agents working unattended against GitHub issues. If you are such an agent — or are scoping work for one — **`AGENT-EXECUTION-PIPELINE.md` is mandatory reading before you touch anything.** It defines the forbidden territory (don't-touch paths), the required issue structure, the canonical validation gate, the supervisor-review triggers, and the recovery procedure. The *what and why* lives in `STRATEGIC-ROADMAP-2026-05-29.md`; the *how, with what guardrails* lives in the pipeline doc. Read its **2026-10-30 ownership amendment first**: Aymen cancelled Vision's authority and transferred project ownership to a Claude Code owner session that works for him under his GitHub account. The owner decides the roadmap and architecture, triages and replies to issues, repairs CI, upgrades dependencies, and merges and releases. No routine human approval is required. For v0.5.0, read the 2026-11-04 delegation and both 2026-11-07 amendments alongside that amendment. Under the later handback, a Codex owner session holds the role through release verification. Vision, its workers, the `pdctl` broker and the Vision GitHub Apps have no authority; `ops/vision/` is kept for reference only. Implementers work on branches in isolated worktrees, and never verify their own change. The owner merges only when the required checks are green on the current PR head, the newest owner record for that head is PASS (a separate Fable-model review, a Codex peer review and a `ponytail-review` pass), review conversations are resolved, and the merge is a squash merge bound to the head. Existing `human-led`, `maintainer-only`, or `needs-human-review` labels route to the owner; they do not require Aymen's approval. Context can live in the issue itself or a linked file that actually exists. The ownership amendment takes precedence over older conflicting approval, scheduling, and context-file requirements. ## Canonical Commands If `uv` is not installed yet: ```bash python -m pip install uv ``` Bootstrap the repo: ```bash uv sync --locked --dev ``` If `uv` is not on your `PATH` after installation, reopen the shell or use `python -m uv ...` as a fallback. Core local verification commands (the default pytest run includes benchmark tests): ```bash uv run --locked ruff check src/ tests/ benchmarks/ ops/ .github/scripts/ uv run --locked pyright src/ benchmarks/ uv run --locked pytest --tb=short -q ``` All benchmarks run locally. CI and release exclude `tests/benchmarks`. For measured results, follow the [local benchmark workflow](CONTRIBUTING.md#local-benchmark-workflow). Build and inspect a local docs index: ```bash uv run --locked python-docs-mcp-server build-index --versions 3.12,3.13 uv run --locked python-docs-mcp-server doctor ``` Package smoke check: ```bash uv build ``` ## MCP Testing Flow Use this order when validating MCP behavior: 1. Run the automated checks above. 2. Use MCP Inspector for quick local iteration. 3. Confirm real-client behavior with the runbook in `.github/INTEGRATION-TEST.md`. Client-facing integration and release runbooks live here: - `.github/INTEGRATION-TEST.md` - `.github/RELEASE.md` ## Done Means Before calling work complete: - relevant lint, typecheck, and test commands have been run fresh - user-facing docs reflect the current behavior - MCP-related changes still work in the documented validation flow - no runtime API/tool surface changes were made unless explicitly requested ## AI and MCP Policy - Use official documentation first for MCP, OpenAI/Codex, and Python SDK questions. - Avoid MCP sprawl. Do not add new MCP servers unless they clearly improve this project's development or user experience. - Do not add repo-local custom skills by default. Add one only if a repeated workflow is genuinely painful and no strong public pattern already covers it. - Follow existing test and documentation patterns before inventing new structure. ## Context Hygiene `.planning/` mixes archival history with forward-facing phase CONTEXTs. - `.planning/ROADMAP.md` and `.planning/phases/0X-…/0X-CONTEXT.md` are live, forward-looking specs — read these first when starting a new phase. - `.planning/agent-context/.md` and active `.planning/issues/v0.3.0/*.md` specs are live only for autonomous-agent issue execution; read them when an issue or pipeline document links them. - Anything else in `.planning/` (especially content dated 2026-04 or earlier) is archival history. It may help maintainers reconstruct prior context but should not drive routine implementation decisions. - For the source of truth about *what the code does today*, start with: - `README.md` - `CONTRIBUTING.md` - `.github/INTEGRATION-TEST.md` - `tests/`