chore: add CONTRIBUTING.md
This commit is contained in:
53
CONTRIBUTING.md
Normal file
53
CONTRIBUTING.md
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
# Contributing
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- rust 1.85+ (edition 2024)
|
||||||
|
- sqlite development libraries
|
||||||
|
|
||||||
|
install the rust toolchain via [rustup](https://rustup.rs/) and make sure
|
||||||
|
sqlite headers are available for your platform.
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cargo build
|
||||||
|
cargo test
|
||||||
|
cargo clippy
|
||||||
|
cargo fmt
|
||||||
|
```
|
||||||
|
|
||||||
|
run all checks before submitting changes:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cargo fmt && cargo clippy && cargo test && cargo build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Database
|
||||||
|
|
||||||
|
data is stored in a sqlite file at `$XDG_DATA_HOME/todo/todos.db` (override
|
||||||
|
with `TODO_DB`). migrations in `migrations/` are applied automatically at
|
||||||
|
startup.
|
||||||
|
|
||||||
|
## Project layout
|
||||||
|
|
||||||
|
```
|
||||||
|
src/
|
||||||
|
main.rs - entry point
|
||||||
|
cli.rs - clap argument definitions
|
||||||
|
commands.rs - command handlers
|
||||||
|
db.rs - database access layer
|
||||||
|
model.rs - data types
|
||||||
|
display.rs - output formatting
|
||||||
|
mcp.rs - mcp server
|
||||||
|
tests/ - integration tests
|
||||||
|
migrations/ - sqlite migrations
|
||||||
|
build.rs - shell completion generation
|
||||||
|
```
|
||||||
|
|
||||||
|
## Submitting changes
|
||||||
|
|
||||||
|
1. create a feature branch from `main`
|
||||||
|
2. keep commits small and focused
|
||||||
|
3. ensure `cargo fmt`, `cargo clippy`, and `cargo test` all pass
|
||||||
|
4. open a merge request with a clear description of what changed and why
|
||||||
Reference in New Issue
Block a user