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 C dependency (including transitive proc-macro build dependencies) must build from source it ships, such as rusqlite with bundled, or stay behind an opt-in feature. A -sys crate that links a system library by default needs its vendored feature enabled in both [target.'cfg(target_os = "linux")'.dependencies] and [target.'cfg(target_os = "linux")'.build-dependencies].
  2. Keep CI and Documentation sub-2.5 min on homelab (2 parallel workers) and Release cache-free on self-hosted runners with hard budget gates. CI and Documentation run in parallel on homelab (github-runner-xpd and github-runner-xpd-2). Release runs only via workflow_dispatch 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_blocking_gate.py, 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 cafe ci dispatch 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 clean wheels and sdist build, stage in R2, and publish to PyPI, cafe creates tag vX.Y.Z and the GitCafe Release last, and install-from-pypi smoke-tests the published package.