Skip to main content

Crate xtask

Crate xtask 

Source
Expand description

xtask β€” Repo automation for soma.

Invoked via: cargo xtask <command>

Commands: dist Build release binary into Cargo target dir ci Run all CI checks: fmt, clippy, nextest, taplo, audit symlink-docs Create AGENTS.md and GEMINI.md symlinks next to every CLAUDE.md check-env Validate required environment variables are set check-architecture Validate workspace dependency-layer boundaries patterns Check static contracts from docs/PATTERNS.md contract-audit Run local static/spec checks for REST-client MCP servers scaffold Plan, generate, or verify a new project from Soma codex-schema Rebuild/bisect/diff the vendored codex-app-server-client schema cargo-generate Smoke-test cargo-generate output cargo-generate-post Apply cargo-generate post-processing rewrites generate-docs Generate volatile docs and metadata from canonical specs doc Generate Rust API documentation (rustdoc) for workspace crates generate-provider-surfaces Generate provider docs and marketplace catalogs check-docs Validate generated docs and metadata are current check-mcp-registry Validate server.json against the MCP registry schema check-stale-claims Fail on stale hardcoded Soma claims sync-web-source Copy apps/web into the bundled soma-web scaffold source check-web-source-sync Validate bundled web source matches apps/web update-aurora-web Refresh Aurora components, validate apps/web, then sync bundle block-env-commits Prevent staged .env secrets from being committed check-coupled-files Check common companion-file drift in a diff check-file-size Check staged source files against size budgets run-ascii-check Check or fix tracked source/config/docs ASCII hygiene check-plugin-stdio-smoke Smoke-test installed plugin stdio binary apply-no-mcp-marketplace Apply deterministic no-MCP marketplace branch transform check-no-mcp-drift Validate marketplace-no-mcp branch invariants and drift check-ts-client Regenerate/verify the checked-in codex-app-server-client TypeScript REST client sync-cargo Copy Cargo.lock into plugin data directories check-release-versions Validate release component version policy release-plan Print changed release components and candidate tags sync-release-please-version Sync release files to .release-please-manifest.json bump-version Bump a release component version changed-paths Classify changed files into CI routing categories

CUSTOMIZE: Add your own commands by adding arms to the match block below. Keep each command as a separate fn for readability.

Philosophy: xtask replaces ad-hoc shell scripts. It gets type-checked by the compiler, works cross-platform, and is easy to extend. Keep functions small and use std::process::Command to shell out to existing tools rather than reimplementing them in Rust.

ModulesΒ§

architecture πŸ”’
architecture_graph πŸ”’
cargo_generate πŸ”’
cargo_generate_post πŸ”’
ci_paths πŸ”’
codex_schema πŸ”’
cargo xtask codex-schema <subcommand> β€” Rust port of the vendored codex-app-server-client crate’s former schema/build_combined_schema.py, plus staleness stamping and typify-panic bisection tooling.
doc_site πŸ”’
Landing page and OpenAPI (Redoc) assets for cargo xtask doc.
generated_surfaces πŸ”’
mcp_registry πŸ”’
no_mcp πŸ”’
patterns πŸ”’
Static checks for the conventions documented in docs/PATTERNS.md.
provider_manifest πŸ”’
release_commands πŸ”’
release_versions πŸ”’
rmcp_release_monitor πŸ”’
scaffold πŸ”’
scripts πŸ”’
Rust implementations for small scripts that have thin wrappers in scripts/.
scripts_lane_a πŸ”’
Lane A script migrations.
scripts_lane_b πŸ”’
Lane B Rust ports for release and plugin-layout shell scripts.
scripts_lane_c πŸ”’
Lane C ports for broad ops scripts.
scripts_lane_d πŸ”’
Lane D Rust migrations for Python scripts that have wrappers in scripts/.
test_siblings πŸ”’
trace_headers_smoke πŸ”’
Bounded live smoke for SOMA_MCP_TRACE_HEADERS.
ts_client πŸ”’
cargo xtask check-ts-client [--write|--check] - keeps crates/shared/codex-app-server-client/clients/typescript/src/generated/openapi-types.ts (a checked-in, openapi-typescript-generated TypeScript client for that crate’s rest feature - see that directory’s own README.md) in sync with the crate’s checked-in openapi.json, and (in --check mode) verifies the package still type-checks.
web_source πŸ”’
workspace_commands πŸ”’

FunctionsΒ§

cargo_generate πŸ”’
command_exists πŸ”’
Check whether a cargo subcommand (or standalone binary) is installed.
main πŸ”’
patterns_cmd πŸ”’
run_cargo πŸ”’
Run a cargo subcommand, forwarding stdout/stderr.
run_cmd πŸ”’
Run an arbitrary command, forwarding stdout/stderr. Fails if exit code != 0.
run_cmd_output πŸ”’
Run an arbitrary command and return stdout. Fails if exit code != 0.