git clone https://github.com/KeyCode17/rust-ai-surfer
cd rust-ai-surfer
cargo install lefthook cargo-nextest cargo-deny
lefthook install
cargo build --workspaceThe toolchain pins itself to 1.85 via rust-toolchain.toml on first cargo invocation.
- One feature crate per concern (
ras-{feature}). - One use case per file inside
src/application/. domain/modules import onlyras-errors,ras-types, and the crate's owndomain.- ≤200 LOC per file, no comments, no
unwrap()outsidetests/orexamples/. - Use
Arc<dyn Trait>for dependency injection between layers.
lefthook enforces:
cargo fmt --checkcargo clippy -D warnings- LOC ≤ 200
- No
//comments (only///and//!doc comments allowed) - No
.unwrap()
cargo nextest run --workspacecargo doc --workspace- Bump gate (only fires when the workspace
versionchanged since the last tag)
| Phase | Subject | Version target |
|---|---|---|
| 0 | Scaffold | 0.1.0 |
| 1 | Domain layer | 0.2.0 |
| 2 | CDP + cosmium + ChatAnthropicClaudeCode | 0.3.0 |
| ... | ... | ... |
| 11 | Examples + integration tests | 0.12.0 |
| Release | Full port | 1.0.0 |
To bump:
cargo run -p xtask -- bump minor 1
git push --follow-tagsxtask bump runs cargo build --workspace && cargo test --workspace first, then commits and tags.
feat:, fix:, chore:, docs:, refactor:, test:, perf:, build:, ci:, style:, revert:. Optional scope: feat(llm):, fix(cdp):, ...
ADRs live in docs/adr/. New significant decisions get a new ADR file.