Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/openagen/zeroclaw/llms.txt

Use this file to discover all available pages before exploring further.

ZeroClaw is a Rust-first autonomous agent runtime with a trait-driven, modular architecture. Contributions are welcome across docs, tests, bug fixes, and new extensions. This page covers the principles, workflow, validation gates, and extension surface you need to know before opening a PR.

Risk tiers

Every change falls into one of three risk tiers. When in doubt, classify as higher risk.
TierScopeExamples
LowDocs, chores, tests only — no behaviour changeREADME edits, adding tests, fixing typos
MediumMost src/** behaviour changes without security or boundary impactAdding a provider, adding a channel, refactoring a tool
HighSecurity, runtime, gateway, tool surface, or CI workflow changessrc/security/**, src/runtime/**, src/gateway/**, src/tools/**, .github/workflows/**
High-risk PRs require threat and risk notes, a rollback strategy, and test or validation evidence for failure modes and boundaries.

Workflow

1

Read before write

Inspect the existing module, factory wiring, and adjacent tests before making any changes. Understand what already exists; do not duplicate or contradict it.
2

One concern per PR

Avoid mixed feature + refactor + infra patches in a single PR. Each PR should address one coherent concern.
3

Implement the minimal patch

No speculative abstractions. No config keys without a concrete use case. No modifications to unrelated modules “while here”.
4

Validate by risk tier

Run the checks appropriate for your tier before pushing.
5

Document impact

Update PR notes to describe behaviour changes, risk, side effects, and rollback path.

Pre-PR validation

Extension points

ZeroClaw’s architecture exposes seven trait-based extension points. Each one follows the same wiring pattern: implement the trait, register in the factory module, add config keys if needed, write tests.
Extension pointTraitLocationWhat it does
ProviderProvidersrc/providers/traits.rsLLM backend adapter
ChannelChannelsrc/channels/traits.rsMessaging platform integration
ToolToolsrc/tools/traits.rsAgent capability / action
MemoryMemorysrc/memory/traits.rsPersistence backend
ObserverObserversrc/observability/traits.rsTelemetry and logging
RuntimeAdapterRuntimeAdaptersrc/runtime/traits.rsExecution environment (native, Docker)
PeripheralPeripheralsrc/peripherals/traits.rsHardware boards (STM32, RPi GPIO)

Architecture boundary rules

  • Extend by adding trait implementations and factory wiring first. Avoid cross-module rewrites for isolated features.
  • Keep dependency direction inward to contracts: concrete integrations depend on trait/config/util layers, not on other concrete integrations.
  • Avoid cross-subsystem coupling (for example, provider code importing channel internals).
  • Module responsibilities are single-purpose: orchestration in agent/, transport in channels/, model I/O in providers/, policy in security/, execution in tools/.
  • Introduce new shared abstractions only after repeated use (rule of three), with at least one real caller.
  • For config/schema changes, treat keys as a public contract: document defaults, compatibility impact, and migration/rollback path.

Anti-patterns

  • Do not add heavy dependencies for minor convenience.
  • Do not silently weaken security policy or access constraints.
  • Do not add speculative config or feature flags “just in case”.
  • Do not mix large formatting-only changes with functional changes.
  • Do not bypass failing checks without an explicit explanation in the PR.
  • Do not hide behaviour-changing side effects in refactor commits.
  • Do not include personal identity or sensitive information in test data, examples, docs, or commits.

Further reading

Build docs developers (and LLMs) love