# Repository Guidelines

## Project Structure & Module Organization

- `Cargo.toml` holds crate metadata; update dependencies or feature flags here.
- `src/main.rs` is the entry point. Add supporting modules under `src/` and declare them with `mod` to keep logic reusable.
- Create integration tests in `tests/` (one file per feature) while keeping unit tests inline with the functions they exercise via `#[cfg(test)]`.
- `target/` is generated by Cargo; leave it untracked and run `cargo clean` if you suspect stale artifacts. Consult `Read.md` for the product brief.

## Build, Test, and Development Commands

- `cargo check` performs a fast compile pass that catches type errors without producing binaries.
- `cargo run` builds and executes the CLI; add arguments after `--` to simulate user input.
- `cargo test` runs all unit and integration suites; append `-- --nocapture` to show `println!` output.
- `cargo fmt` formats the codebase, and `cargo clippy --all-targets --all-features` surfaces lint warnings you must resolve before review.
- `cargo build --release` produces an optimized binary when you need timing data or a distributable artifact.

## Coding Style & Naming Conventions

- Follow rustfmt defaults (4-space indentation, trailing commas) and gate commits with `cargo fmt -- --check`.
- Use snake_case for functions, variables, and modules; reserve CamelCase for types and enums, and SCREAMING_SNAKE_CASE for constants.
- Prefer small, focused modules; if the project grows, introduce `src/lib.rs` to host shared logic and re-export public APIs.
- Add `///` comments to clarify externally visible behavior and short inline comments only when intent is non-obvious.

## Testing Guidelines

- Co-locate unit tests with their implementation and give test functions descriptive names like `handles_missing_end_time`.
- Place scenario tests in `tests/` and mirror filenames after the behavior under test (e.g., `tests/event_creation.rs`).
- Aim for coverage of core flows and edge cases (empty payloads, malformed timestamps) and re-run `cargo test` before every push; use `cargo test -- --ignored` for slow suites.

## Commit & Pull Request Guidelines

- The repository has no prior history, so adopt short, imperative commit subjects such as `Add event parser` and avoid piling unrelated changes together.
- Reference issue IDs when available (`Add scheduler support (#42)`) and expand in the message body on why the change was needed.
- PRs should summarize the impact, list verification steps (`cargo test`, `cargo fmt`, `cargo clippy`), and attach CLI transcripts or screenshots when output changes; request at least one review before merge.
