RCM (Recursive Context Machine) is a Rust workspace for building and executing composable context-machine pipelines for LLM agents.
This repository's governance layer is managed by repo-seed; product code remains
repository-owned. .repo-seed/manifest.json records managed files and capability
state.
- Use
repo-reviewfor change and pull-request review. - Use
repo-decisionsfor durable choices with meaningful alternatives. - Use
repo-governancewhen complexity, ownership, security, release, or incident signals change. - Use the global
repo-seedskill for governance seeding and upgrades.
See docs/architecture.md for the module map and seams.
Rust crates live in crates/; the Python SDK lives in sdks/python/; runnable
RCM projects live in examples/; the protobuf contract is proto/rcm.proto.
- Test:
cargo nextest run --workspace --locked - Documentation tests:
cargo test --workspace --doc --locked - Lint:
cargo fmt --all -- --check && cargo clippy --workspace --all-targets --tests --locked -- -D warnings - Gates:
node scripts/run-gates.mjs
Run the relevant tests and gates before every commit. protoc and the stable Rust
toolchain are required for the full workspace checks.
- Develop on
devor a short-lived feature branch based ondev. mainis protected and only receives release promotion pull requests.- Comments explain why and provenance, not what the next line already says.
- Use descriptive names; single-letter variables and generic parameters are not
allowed except loop indices
i/jand the documented closure exception. - Use
tracingfor operational logging; failed outcomes log atwarn!with structured error fields. - Keep
reactorinternal tomachine; provider presets do not belong inmachine. - Use module-level timeout constants for every LLM and tool execution.
Environment::newis an honest host snapshot; useEnvironment::emptyfor explicitly sandboxed scenarios.
- Risk-boundary changes start with an Approved spec in docs/specs/.
- Durable alternatives belong in docs/decisions/, not changelogs.
- A subtle or systemic escaped failure earns a postmortem linked to a permanent guardrail in docs/postmortems/.
- Changes to
proto/rcm.protoregenerate the Python SDK and update server tests in the same change.
- Never read
.envfiles or commit credentials. - Never modify files outside the requested scope.
- Never force-push or directly push
main. - Never commit or push unless the user explicitly asks.
Follow docs/AGENTS.md for document placement and hygiene, and docs/testing.md for risk-adjusted evidence. Seeded governance files are upgraded only by rerunning the repo-seed skill.
- repo-review — semantic review policy.
- repo-decisions — MADR decision records.
- repo-governance — capability assessment.
Enabled optional capabilities include CI, release policy, community health files, CODEOWNERS, monorepo subtree instructions, and authorized local hooks.