diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 00000000..4f28459e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,119 @@ +name: Bug Report +description: Report incorrect behavior or a defect in lambda-rs. +title: "[Bug] " +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Use this template to report bugs. Provide sufficient detail for + maintainers to reproduce and diagnose the issue. + + - type: textarea + id: summary + attributes: + label: Summary + description: A concise description of the bug. + placeholder: Describe the incorrect behavior in one or two sentences. + validations: + required: true + + - type: textarea + id: expected-behavior + attributes: + label: Expected Behavior + description: Describe what should happen. + placeholder: The expected correct behavior. + validations: + required: true + + - type: textarea + id: actual-behavior + attributes: + label: Actual Behavior + description: Describe what currently happens. + placeholder: The observed incorrect behavior. + validations: + required: true + + - type: textarea + id: reproduction-steps + attributes: + label: Reproduction Steps + description: Provide minimal steps to reproduce the issue. + placeholder: | + 1. Clone repository + 2. Run `cargo run --example ` + 3. Observe error/unexpected behavior + validations: + required: true + + - type: textarea + id: code-sample + attributes: + label: Code Sample + description: Include a minimal code snippet that demonstrates the issue. + placeholder: | + ```rust + // Minimal reproduction code + fn main() { + // ... + } + ``` + render: rust + validations: + required: false + + - type: textarea + id: environment + attributes: + label: Environment + description: Provide details about the environment. + placeholder: | + - OS: macOS 14.0 / Windows 11 / Ubuntu 24.04 + - Rust version: `rustc --version` + - GPU: NVIDIA RTX 4090 / Apple M3 / Intel UHD 770 + - Graphics backend: Vulkan / Metal / DX12 + - lambda-rs version or commit: `main` / `abc1234` + validations: + required: true + + - type: dropdown + id: affected-crates + attributes: + label: Affected Crates + description: Select the crate(s) this bug impacts. + multiple: true + options: + - lambda-rs + - lambda-rs-platform + - lambda-rs-args + - lambda-rs-logging + - Unknown + validations: + required: true + + - type: textarea + id: logs-output + attributes: + label: Logs and Output + description: Include relevant error messages, stack traces, or console output. + placeholder: | + ``` + error[E0XXX]: ... + ``` + render: shell + validations: + required: false + + - type: textarea + id: additional-context + attributes: + label: Additional Context + description: Any other information that may help diagnose the issue. + placeholder: | + - Related issues + - Screenshots or screen recordings (for visual bugs) + - Workarounds discovered + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..764debb3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Discussions + url: https://github.com/lambda-sh/lambda/discussions + about: Use discussions for general questions, ideas, or community support. diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml new file mode 100644 index 00000000..7483de6c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation.yml @@ -0,0 +1,81 @@ +name: Documentation +description: Report missing, incorrect, or unclear documentation. +title: "[Docs] " +labels: ["documentation"] +body: + - type: markdown + attributes: + value: | + Use this template to report documentation issues or request improvements. + + - type: textarea + id: summary + attributes: + label: Summary + description: Describe the documentation issue or improvement. + placeholder: A concise description of what is missing, incorrect, or unclear. + validations: + required: true + + - type: dropdown + id: documentation-type + attributes: + label: Documentation Type + description: Select the type of documentation affected. + options: + - API documentation (rustdoc) + - Specification (docs/specs/) + - Tutorial (docs/tutorials/) + - Guide (docs/) + - README + - Code comments + - Other + validations: + required: true + + - type: textarea + id: location + attributes: + label: Location + description: Identify the file path or URL of the affected documentation. + placeholder: | + - File: `docs/tutorials/uniform-buffers.md` + - Module: `lambda_rs::render` + - URL: https://docs.rs/lambda-rs/... + validations: + required: false + + - type: textarea + id: current-content + attributes: + label: Current Content + description: Quote or describe the current documentation (if applicable). + placeholder: | + The current documentation states: + > "..." + validations: + required: false + + - type: textarea + id: proposed-change + attributes: + label: Proposed Change + description: Describe the improvement or correction. + placeholder: | + The documentation should: + - Clarify X + - Add example for Y + - Correct statement about Z + validations: + required: true + + - type: textarea + id: additional-context + attributes: + label: Additional Context + description: Any other relevant information. + placeholder: | + - Related code changes + - User confusion observed + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 00000000..6ef16fea --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,119 @@ +name: Feature Request +description: Propose a new feature or enhancement for lambda-rs. +title: "[Feature] " +labels: ["enhancement"] +body: + - type: markdown + attributes: + value: | + Use this template to propose new functionality or enhancements. Provide + sufficient detail for maintainers to evaluate scope, feasibility, and + alignment with project goals. + + - type: textarea + id: overview + attributes: + label: Overview + description: A concise summary of the proposed feature and its purpose. + placeholder: | + Describe the feature in one paragraph. Include the problem it solves and + the expected outcome. + validations: + required: true + + - type: textarea + id: current-state + attributes: + label: Current State + description: Describe the current behavior or limitation that motivates this request. + placeholder: | + Reference existing code, APIs, or behavior. Include file paths or code snippets where relevant. + Example: + ```rust + // crates/lambda-rs/src/example.rs:42-50 + // Current implementation does X but lacks Y + ``` + validations: + required: false + + - type: textarea + id: scope + attributes: + label: Scope + description: Define goals and non-goals for this feature. + placeholder: | + **Goals:** + - Goal 1 + - Goal 2 + + **Non-Goals:** + - Item explicitly out of scope + validations: + required: true + + - type: textarea + id: proposed-api + attributes: + label: Proposed API + description: Outline the public API surface, types, and usage patterns. + placeholder: | + ```rust + pub struct ExampleBuilder { + // fields + } + + impl ExampleBuilder { + pub fn new() -> Self; + pub fn with_option(self, value: u32) -> Self; + pub fn build(self) -> Result; + } + ``` + + **Example Usage:** + ```rust + let example = ExampleBuilder::new() + .with_option(42) + .build()?; + ``` + validations: + required: false + + - type: textarea + id: acceptance-criteria + attributes: + label: Acceptance Criteria + description: List concrete, testable criteria for completion. + placeholder: | + - [ ] Criterion 1 + - [ ] Criterion 2 + - [ ] Documentation updated + - [ ] Example added or updated + validations: + required: true + + - type: dropdown + id: affected-crates + attributes: + label: Affected Crates + description: Select the crate(s) this feature impacts. + multiple: true + options: + - lambda-rs + - lambda-rs-platform + - lambda-rs-args + - lambda-rs-logging + - Other/Multiple + validations: + required: true + + - type: textarea + id: notes + attributes: + label: Notes + description: Additional context, constraints, or considerations. + placeholder: | + - Related issues or PRs + - Platform-specific considerations + - Future work explicitly deferred + validations: + required: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..bb9ef03d --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,78 @@ +## Summary + + + +## Related Issues + + + +## Changes + + + +- + +## Type of Change + + + +- [ ] Bug fix (non-breaking change that fixes an issue) +- [ ] Feature (non-breaking change that adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to change) +- [ ] Documentation (updates to docs, specs, tutorials, or comments) +- [ ] Refactor (code change that neither fixes a bug nor adds a feature) +- [ ] Performance (change that improves performance) +- [ ] Test (adding or updating tests) +- [ ] Build/CI (changes to build process or CI configuration) + +## Affected Crates + + + +- [ ] `lambda-rs` +- [ ] `lambda-rs-platform` +- [ ] `lambda-rs-args` +- [ ] `lambda-rs-logging` +- [ ] Other: + +## Checklist + + + +- [ ] Code follows the repository style guidelines (`cargo +nightly fmt --all`) +- [ ] Code passes clippy (`cargo clippy --workspace --all-targets -- -D warnings`) +- [ ] Tests pass (`cargo test --workspace`) +- [ ] New code includes appropriate documentation +- [ ] Public API changes are documented +- [ ] Breaking changes are noted in this PR description + +## Testing + + + +**Commands run:** + +```bash +cargo build --workspace +cargo test --workspace +``` + +**Manual verification steps (if applicable):** + +1. + +## Screenshots/Recordings + + + +## Platform Testing + + + +- [ ] macOS +- [ ] Windows +- [ ] Linux + +## Additional Notes + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..2ef3cb02 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,85 @@ +# Contributing to Lambda + +Thank you for your interest in contributing to Lambda. This document provides +guidelines for contributing to the project. + +## Getting Started + +1. Fork the repository and clone it locally. +2. Run `scripts/setup.sh` to install git hooks and git-lfs. +3. Build the workspace: `cargo build --workspace` +4. Run tests: `cargo test --workspace` + +## Code Style + +Before submitting changes: + +```bash +# Format code (requires nightly toolchain) +cargo +nightly fmt --all + +# Run clippy +cargo clippy --workspace --all-targets -- -D warnings + +# Run tests +cargo test --workspace +``` + +## Commit Messages + +Follow the `[scope] message` convention: + +- `[add]` — New feature or file +- `[fix]` — Bug fix +- `[refactor]` — Code restructuring without behavior change +- `[docs]` — Documentation changes +- `[test]` — Test additions or modifications +- `[build]` — Build system or CI changes + +Examples: + +``` +[add] input action mapping system to lambda-rs. +[fix] mouse press events missing cursor coordinates. +[docs] add uniform buffer tutorial. +[refactor] extract render command encoding to separate module. +``` + +## Pull Requests + +1. Create a branch from `main` with a descriptive name. +2. Make focused, narrowly scoped commits. +3. Ensure all commits build independently. +4. Fill out the PR template completely. +5. Link related issues using "Closes #123" or "Relates to #456". +6. Include screenshots or recordings for visual changes. +7. List manual verification steps if automated testing is insufficient. + +## Issues + +Use the appropriate issue template: + +- **Feature Request**: Propose new functionality or enhancements. +- **Bug Report**: Report incorrect behavior or defects. +- **Documentation**: Report missing or unclear documentation. + +Provide sufficient detail for maintainers to evaluate and reproduce issues. + +## Documentation + +When adding or modifying features: + +- Update rustdoc comments for public APIs. +- Add or update examples in `crates/lambda-rs/examples/`. +- Create or update specifications in `docs/specs/` for significant changes. +- Follow the documentation tone and style guidelines in `AGENTS.md`. + +## Questions and Discussions + +For general questions or ideas, use +[GitHub Discussions](https://github.com/lambda-sh/lambda/discussions). + +## License + +By contributing, you agree that your contributions will be licensed under the +same license as the project (see [`LICENSE`](./LICENSE)).