Code-writing standards for the Pyth Crosschain monorepo, for humans and agents. Start here. Read the cross-cutting files first, then the cluster that matches the language you are working in.
- style.md — readability, types, layered architecture, locality of types and functions, no catch-all modules, self-contained comments.
- testing.md — test-driven development, and why you should never widen an export just to reach it from a test.
- services.md — writing resilient services: error recovery, benchmarking, logging/metrics/tracing, dependency minimization, running multiple instances.
- review.md — the code-review checklist reviewers apply to every PR.
- rust/AGENTS.md — index for the Rust cluster.
- rust/style.md — toolchain, formatting, clippy configuration, essential crates.
- rust/idioms.md — panic discipline, checked/saturating arithmetic, numeric conversions, newtype IDs.
- rust/errors-and-logging.md —
anyhowvsthiserror, preserving error sources, structured logging withtracing. - rust/testing.md — the local test gate and
#[tokio::test]conventions.
- typescript/AGENTS.md — index for the TypeScript cluster.
- typescript/style.md — Biome,
catalog:dependency versions, layered architecture. - typescript/packages.md — creating a new package with
pnpm create-pyth-package, and package best practices. - typescript/testing.md — test-driven development for TypeScript.