ContributingΒΆ

How to contribute to Perspt.

Getting StartedΒΆ

  1. Fork the repository on GitHub

  2. Clone your fork:

    git clone https://github.com/YOUR_USERNAME/perspt.git
    cd perspt
    
  3. Create a branch:

    git checkout -b feat/your-feature
    

Development SetupΒΆ

# Install Rust (if needed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Build
cargo build

# Run tests
cargo test

# Run with debug
cargo run -- chat

Code StyleΒΆ

  • Rust: Follow rustfmt and clippy

  • Commit messages: Conventional Commits format

  • Documentation: Update docs for API changes

# Format code
cargo fmt

# Run linter
cargo clippy --all-targets

Commit MessagesΒΆ

Use Conventional Commits:

feat: add new agent tool
fix: correct energy calculation
docs: update SRBN documentation
refactor: simplify orchestrator
test: add integration tests
chore: update dependencies

Pull Request ProcessΒΆ

  1. Ensure all tests pass:

    cargo test --all
    
  2. Update documentation if needed

  3. Create a PR with clear description

  4. Address review feedback

  5. Squash and merge when approved

PSP ProcessΒΆ

For significant changes, create a PSP (Perspt Specification Proposal):

  1. Get PSP number from maintainers

  2. Create docs/psps/source/psp-00000N.rst

  3. Submit for review

  4. Implement after acceptance

See PSP: Perspt Specification Proposals for details.

Crate StructureΒΆ

crates/
β”œβ”€β”€ perspt-cli/     # CLI entry point
β”œβ”€β”€ perspt-core/    # LLM provider
β”œβ”€β”€ perspt-tui/     # Terminal UI
β”œβ”€β”€ perspt-agent/   # SRBN engine
β”œβ”€β”€ perspt-policy/  # Security
└── perspt-sandbox/ # Isolation

When contributing, add to the appropriate crate.

See AlsoΒΆ