Contributing¶
Development Setup¶
# Clone
git clone https://github.com/eonseed/perspt.git
cd perspt
# Build
cargo build
# Run tests
cargo test
# Lint
cargo clippy -- -D warnings
# Format check
cargo fmt -- --check
Project Structure¶
crates/
perspt-core/ # Types, config, LLM, events, plugins
perspt-agent/ # Orchestrator, agents, ledger, tools
perspt-tui/ # Chat + Agent TUI
perspt-cli/ # CLI entry (clap)
perspt-store/ # DuckDB persistence
perspt-policy/ # Starlark policies
perspt-sandbox/ # Command sandboxing
tests/ # Integration tests
docs/ # Sphinx documentation
Coding Standards¶
Clippy clean —
cargo clippy -- -D warningsmust passFormatted —
cargo fmtwith default settingsTests pass —
cargo testmust pass all testsNo ``println!`` in UI paths — Use the event system or
env_loggerError types — Use
ErrorTypeenum for categorized errorsStreaming safety — Never block the UI select loop; spawn on tokio tasks
Commit Messages¶
Describe what changed, not the sequence
Do NOT include phase numbers or commit sequence numbers
Keep the subject line under 72 characters
# Good
Add sheaf validation for cross-language boundaries
# Bad
Commit 3/7: Phase 2 - Add sheaf validation
PR Workflow¶
Create a feature branch from
mainMake changes with passing tests
Run the full check suite:
cargo build && cargo test && cargo clippy -- -D warnings && cargo fmt -- --check
Push and open a PR
Address review feedback
Documentation¶
Documentation uses Sphinx with reStructuredText:
# Build HTML docs
cd docs/perspt_book && uv run make html
# Build PDF docs
cd docs/perspt_book && uv run make latexpdf
# Live preview
cd docs/perspt_book && uv run sphinx-autobuild source build/html
See the Generate Documentation and Build Sphinx HTML Documentation VS Code
tasks for convenience.