AGENTS.md

Working in xpd

Release and build invariants

  1. No unvendored system-header C crates in default builds. Linux and musllinux wheels cross-compile with maturin build --release --zig, where system headers such as /usr/include/openssl are unavailable. Any Linux C dependency (including transitive proc-macro build dependencies such as openssl-sys via sqlx-macros) must be vendored in both [target.'cfg(target_os = "linux")'.dependencies] and [target.'cfg(target_os = "linux")'.build-dependencies], or kept behind an opt-in feature.
  2. Keep CI and Documentation sub-2.5 min on homelab (2 parallel workers) and Release cache-free on GitHub-hosted runners with hard budget gates. CI and Documentation run in parallel on homelab (github-runner-xpd and github-runner-xpd-2, falling back to ubuntu-latest with Swatinem/rust-cache for fork PRs). Release runs only via workflow_dispatch on GitHub-hosted runners with no build cache (never Swatinem/rust-cache or sccache in release.yml), lto = "thin", and codegen-units = 16. .github/scripts/check_ci_budget.py enforces both static lefthook pre-commit invariants and hard workflow runtime caps (CI <= 120s self-hosted / <= 240s hosted, Docs <= 150s self-hosted / <= 300s hosted, Release clean wheel <= 840s / 960s Linux x86_64 / 1140s Windows).
  3. Never push over a red CI run on main. lefthook pre-commit (check_sample_marks.py, clippy, comments, rules load, discovery ranking) and pre-push (cargo deny check, check_rule_conflicts.py) mirror CI. Fix any failure locally before pushing.
  4. Ship a release via workflow_dispatch on main (tag created last). Bump Cargo.toml, Cargo.lock, .claude-plugin/plugin.json, and mcp.json together in one commit on main, wait for CI green, then dispatch gh workflow run release.yml --ref main (or -f dry_run=true to test wheels without publishing). The plan job verifies version parity and that vX.Y.Z does not exist yet; after all 6 clean wheels and sdist build and publish to PyPI via Trusted Publishing, github-release creates tag vX.Y.Z and the GitHub Release with attestations last, and install-from-pypi smoke-tests the published package.