|
| 1 | +# Contributing to Anvomidav |
| 2 | + |
| 3 | +Thank you for your interest in contributing to Anvomidav, the domain-specific language for figure skating choreography. |
| 4 | + |
| 5 | +## Language Policy |
| 6 | + |
| 7 | +This project follows the Hyperpolymath Standard for language selection: |
| 8 | + |
| 9 | +| Allowed | Use Case | |
| 10 | +|---------|----------| |
| 11 | +| **Rust** | Core implementation, CLI, libraries | |
| 12 | +| **ReScript** | Future web UI components | |
| 13 | +| **Deno** | JavaScript runtime (if needed) | |
| 14 | + |
| 15 | +**Not Permitted:** TypeScript, Node.js, Go, Python (except SaltStack). |
| 16 | + |
| 17 | +## Development Setup |
| 18 | + |
| 19 | +### Prerequisites |
| 20 | + |
| 21 | +- Rust 1.75+ (stable) |
| 22 | +- Cargo |
| 23 | + |
| 24 | +### Building |
| 25 | + |
| 26 | +```bash |
1 | 27 | # Clone the repository |
2 | | -git clone https://{{FORGE}}/{{OWNER}}/{{REPO}}.git |
3 | | -cd {{REPO}} |
| 28 | +git clone https://github.com/hyperpolymath/anvomidav.git |
| 29 | +cd anvomidav |
4 | 30 |
|
5 | | -# Using Nix (recommended for reproducibility) |
6 | | -nix develop |
| 31 | +# Build all crates |
| 32 | +cargo build --workspace |
7 | 33 |
|
8 | | -# Or using toolbox/distrobox |
9 | | -toolbox create {{REPO}}-dev |
10 | | -toolbox enter {{REPO}}-dev |
11 | | -# Install dependencies manually |
| 34 | +# Run tests |
| 35 | +cargo test --workspace |
12 | 36 |
|
13 | | -# Verify setup |
14 | | -just check # or: cargo check / mix compile / etc. |
15 | | -just test # Run test suite |
| 37 | +# Run clippy |
| 38 | +cargo clippy --workspace |
16 | 39 | ``` |
17 | 40 |
|
18 | | -### Repository Structure |
| 41 | +### Project Structure |
| 42 | + |
19 | 43 | ``` |
20 | | -{{REPO}}/ |
21 | | -├── src/ # Source code (Perimeter 1-2) |
22 | | -├── lib/ # Library code (Perimeter 1-2) |
23 | | -├── extensions/ # Extensions (Perimeter 2) |
24 | | -├── plugins/ # Plugins (Perimeter 2) |
25 | | -├── tools/ # Tooling (Perimeter 2) |
26 | | -├── docs/ # Documentation (Perimeter 3) |
27 | | -│ ├── architecture/ # ADRs, specs (Perimeter 2) |
28 | | -│ └── proposals/ # RFCs (Perimeter 3) |
29 | | -├── examples/ # Examples (Perimeter 3) |
30 | | -├── spec/ # Spec tests (Perimeter 3) |
31 | | -├── tests/ # Test suite (Perimeter 2-3) |
32 | | -├── .well-known/ # Protocol files (Perimeter 1-3) |
33 | | -├── .github/ # GitHub config (Perimeter 1) |
34 | | -│ ├── ISSUE_TEMPLATE/ |
35 | | -│ └── workflows/ |
36 | | -├── CHANGELOG.md |
37 | | -├── CODE_OF_CONDUCT.md |
38 | | -├── CONTRIBUTING.md # This file |
39 | | -├── GOVERNANCE.md |
40 | | -├── LICENSE |
41 | | -├── MAINTAINERS.md |
42 | | -├── README.adoc |
43 | | -├── SECURITY.md |
44 | | -├── flake.nix # Nix flake (Perimeter 1) |
45 | | -└── justfile # Task runner (Perimeter 1) |
| 44 | +anvomidav/ |
| 45 | +├── crates/ |
| 46 | +│ ├── anv-core/ # Core types and utilities |
| 47 | +│ ├── anv-syntax/ # Lexer and parser |
| 48 | +│ ├── anv-types/ # Type checking |
| 49 | +│ ├── anv-semantics/ # ISU rule validation |
| 50 | +│ ├── anv-ir/ # Intermediate representation |
| 51 | +│ ├── anv-viz/ # SVG visualization |
| 52 | +│ └── anv-cli/ # Command-line interface |
| 53 | +├── examples/ # Example .anv programs |
| 54 | +└── docs/ # Documentation |
46 | 55 | ``` |
47 | 56 |
|
48 | | ---- |
| 57 | +## Making Changes |
49 | 58 |
|
50 | | -## How to Contribute |
| 59 | +### Code Style |
51 | 60 |
|
52 | | -### Reporting Bugs |
| 61 | +- Follow Rust conventions (run `cargo fmt`) |
| 62 | +- No warnings allowed (run `cargo clippy`) |
| 63 | +- All public APIs must be documented |
| 64 | +- SPDX license headers on all source files: |
| 65 | + ```rust |
| 66 | + // SPDX-FileCopyrightText: 2025 hyperpolymath |
| 67 | + // SPDX-License-Identifier: MIT OR AGPL-3.0-or-later |
| 68 | + ``` |
53 | 69 |
|
54 | | -**Before reporting**: |
55 | | -1. Search existing issues |
56 | | -2. Check if it's already fixed in `{{MAIN_BRANCH}}` |
57 | | -3. Determine which perimeter the bug affects |
| 70 | +### Testing |
58 | 71 |
|
59 | | -**When reporting**: |
| 72 | +- Write tests for new functionality |
| 73 | +- Ensure all tests pass: `cargo test --workspace` |
| 74 | +- Add integration tests for CLI changes |
60 | 75 |
|
61 | | -Use the [bug report template](.github/ISSUE_TEMPLATE/bug_report.md) and include: |
| 76 | +### Commit Messages |
62 | 77 |
|
63 | | -- Clear, descriptive title |
64 | | -- Environment details (OS, versions, toolchain) |
65 | | -- Steps to reproduce |
66 | | -- Expected vs actual behaviour |
67 | | -- Logs, screenshots, or minimal reproduction |
| 78 | +Use clear, descriptive commit messages: |
68 | 79 |
|
69 | | -### Suggesting Features |
| 80 | +``` |
| 81 | +Add pairs skating element validation |
70 | 82 |
|
71 | | -**Before suggesting**: |
72 | | -1. Check the [roadmap](ROADMAP.md) if available |
73 | | -2. Search existing issues and discussions |
74 | | -3. Consider which perimeter the feature belongs to |
| 83 | +- Implement lift group validation |
| 84 | +- Add throw jump ISU limits |
| 85 | +- Update tests for pairs short program |
| 86 | +``` |
75 | 87 |
|
76 | | -**When suggesting**: |
| 88 | +## Pull Request Process |
77 | 89 |
|
78 | | -Use the [feature request template](.github/ISSUE_TEMPLATE/feature_request.md) and include: |
| 90 | +1. Fork the repository |
| 91 | +2. Create a feature branch (`git checkout -b feature/my-feature`) |
| 92 | +3. Make your changes |
| 93 | +4. Run tests and clippy |
| 94 | +5. Commit with clear messages |
| 95 | +6. Push to your fork |
| 96 | +7. Open a Pull Request |
79 | 97 |
|
80 | | -- Problem statement (what pain point does this solve?) |
81 | | -- Proposed solution |
82 | | -- Alternatives considered |
83 | | -- Which perimeter this affects |
| 98 | +### PR Checklist |
84 | 99 |
|
85 | | -### Your First Contribution |
| 100 | +- [ ] All tests pass |
| 101 | +- [ ] No clippy warnings |
| 102 | +- [ ] Code is formatted (`cargo fmt`) |
| 103 | +- [ ] Documentation updated (if applicable) |
| 104 | +- [ ] CHANGELOG updated (for user-facing changes) |
86 | 105 |
|
87 | | -Look for issues labelled: |
| 106 | +## Areas for Contribution |
88 | 107 |
|
89 | | -- [`good first issue`](https://{{FORGE}}/{{OWNER}}/{{REPO}}/labels/good%20first%20issue) — Simple Perimeter 3 tasks |
90 | | -- [`help wanted`](https://{{FORGE}}/{{OWNER}}/{{REPO}}/labels/help%20wanted) — Community help needed |
91 | | -- [`documentation`](https://{{FORGE}}/{{OWNER}}/{{REPO}}/labels/documentation) — Docs improvements |
92 | | -- [`perimeter-3`](https://{{FORGE}}/{{OWNER}}/{{REPO}}/labels/perimeter-3) — Community sandbox scope |
| 108 | +### Good First Issues |
93 | 109 |
|
94 | | ---- |
| 110 | +- Add more example programs for different disciplines |
| 111 | +- Improve error messages |
| 112 | +- Add test cases for edge cases |
95 | 113 |
|
96 | | -## Development Workflow |
| 114 | +### Intermediate |
97 | 115 |
|
98 | | -### Branch Naming |
99 | | -``` |
100 | | -docs/short-description # Documentation (P3) |
101 | | -test/what-added # Test additions (P3) |
102 | | -feat/short-description # New features (P2) |
103 | | -fix/issue-number-description # Bug fixes (P2) |
104 | | -refactor/what-changed # Code improvements (P2) |
105 | | -security/what-fixed # Security fixes (P1-2) |
106 | | -``` |
| 116 | +- Implement additional choreographic elements |
| 117 | +- Enhance SVG visualizations |
| 118 | +- Add more ISU rule validations |
107 | 119 |
|
108 | | -### Commit Messages |
| 120 | +### Advanced |
109 | 121 |
|
110 | | -We follow [Conventional Commits](https://www.conventionalcommits.org/): |
111 | | -``` |
112 | | -<type>(<scope>): <description> |
| 122 | +- Tree-sitter grammar for editor support |
| 123 | +- LSP server implementation |
| 124 | +- Animation/timeline export |
| 125 | + |
| 126 | +## Getting Help |
| 127 | + |
| 128 | +- Open an issue for questions |
| 129 | +- Check existing issues before creating new ones |
| 130 | +- Use discussions for general questions |
113 | 131 |
|
114 | | -[optional body] |
| 132 | +## License |
115 | 133 |
|
116 | | -[optional footer] |
| 134 | +By contributing, you agree that your contributions will be licensed under the same license as the project (MIT OR AGPL-3.0-or-later). |
0 commit comments