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 vendoredcodex-app-server-clientcrateβs formerschema/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]- keepscrates/shared/codex-app-server-client/clients/typescript/src/generated/openapi-types.ts(a checked-in,openapi-typescript-generated TypeScript client for that crateβsrestfeature - see that directoryβs own README.md) in sync with the crateβs checked-inopenapi.json, and (in--checkmode) 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
cargosubcommand, 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.