Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*.scm text eol=lf
*.ncl text eol=lf
*.nix text eol=lf
*.anv text eol=lf linguist-language=Anvomidav

# Docs
*.md text eol=lf diff=markdown
Expand Down
123 changes: 123 additions & 0 deletions .github/linguist/anvomidav.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "Anvomidav",
"scopeName": "source.anv",
"fileTypes": ["anv"],
"patterns": [
{ "include": "#comments" },
{ "include": "#keywords" },
{ "include": "#elements" },
{ "include": "#skating" },
{ "include": "#literals" },
{ "include": "#operators" }
],
"repository": {
"comments": {
"patterns": [
{
"name": "comment.line.documentation.anv",
"match": "///.*$"
},
{
"name": "comment.line.anv",
"match": "//.*$"
}
]
},
"keywords": {
"patterns": [
{
"name": "keyword.control.anv",
"match": "\\b(program|segment|sequence|import|fn|let|in|if|then|else|at|duration|beat)\\b"
},
{
"name": "keyword.other.segment-kind.anv",
"match": "\\b(short|free|pattern|rhythm|exhibition)\\b"
}
]
},
"elements": {
"patterns": [
{
"name": "keyword.element.anv",
"match": "\\b(jump|spin|step|lift|throw|twist|death_spiral|choreographic)\\b"
}
]
},
"skating": {
"patterns": [
{
"name": "constant.language.rotation.anv",
"match": "\\b(single|double|triple|quad)\\b"
},
{
"name": "constant.language.jump.anv",
"match": "\\b(axel|lutz|flip|loop|salchow|toe_loop|euler)\\b"
},
{
"name": "constant.language.spin.anv",
"match": "\\b(upright|sit|camel|layback|biellmann)\\b"
},
{
"name": "constant.language.step.anv",
"match": "\\b(straight|circular|serpentine|diagonal|midline)\\b"
},
{
"name": "constant.language.level.anv",
"match": "\\b(B|L1|L2|L3|L4)\\b"
},
{
"name": "constant.language.lift-group.anv",
"match": "\\b(Gr1|Gr2|Gr3|Gr4|Gr5)\\b"
},
{
"name": "constant.language.edge.anv",
"match": "\\b(LFO|LFI|LBO|LBI|RFO|RFI|RBO|RBI)\\b"
},
{
"name": "constant.language.choreo.anv",
"match": "\\b(spiral|spread|ina|hydroblading|pivot)\\b"
}
]
},
"literals": {
"patterns": [
{
"name": "constant.numeric.time.anv",
"match": "\\b[0-9]+:[0-9]+(:[0-9]+)?\\b"
},
{
"name": "constant.numeric.anv",
"match": "\\b[0-9]+(\\.[0-9]+)?\\b"
},
{
"name": "string.quoted.double.anv",
"begin": "\"",
"end": "\"",
"patterns": [
{
"name": "constant.character.escape.anv",
"match": "\\\\."
}
]
},
{
"name": "constant.language.boolean.anv",
"match": "\\b(true|false)\\b"
}
]
},
"operators": {
"patterns": [
{
"name": "keyword.operator.anv",
"match": "(->|=>|::|\\+|-|\\*|/|%|==|!=|<=|>=|<|>|&&|\\|\\||!)"
},
{
"name": "punctuation.anv",
"match": "[{}()\\[\\]:;,@]"
}
]
}
}
}
190 changes: 104 additions & 86 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,116 +1,134 @@
# Contributing to Anvomidav

Thank you for your interest in contributing to Anvomidav, the domain-specific language for figure skating choreography.

## Language Policy

This project follows the Hyperpolymath Standard for language selection:

| Allowed | Use Case |
|---------|----------|
| **Rust** | Core implementation, CLI, libraries |
| **ReScript** | Future web UI components |
| **Deno** | JavaScript runtime (if needed) |

**Not Permitted:** TypeScript, Node.js, Go, Python (except SaltStack).

## Development Setup

### Prerequisites

- Rust 1.75+ (stable)
- Cargo

### Building

```bash
# Clone the repository
git clone https://{{FORGE}}/{{OWNER}}/{{REPO}}.git
cd {{REPO}}
git clone https://github.com/hyperpolymath/anvomidav.git
cd anvomidav

# Using Nix (recommended for reproducibility)
nix develop
# Build all crates
cargo build --workspace

# Or using toolbox/distrobox
toolbox create {{REPO}}-dev
toolbox enter {{REPO}}-dev
# Install dependencies manually
# Run tests
cargo test --workspace

# Verify setup
just check # or: cargo check / mix compile / etc.
just test # Run test suite
# Run clippy
cargo clippy --workspace
```

### Repository Structure
### Project Structure

```
{{REPO}}/
├── src/ # Source code (Perimeter 1-2)
├── lib/ # Library code (Perimeter 1-2)
├── extensions/ # Extensions (Perimeter 2)
├── plugins/ # Plugins (Perimeter 2)
├── tools/ # Tooling (Perimeter 2)
├── docs/ # Documentation (Perimeter 3)
│ ├── architecture/ # ADRs, specs (Perimeter 2)
│ └── proposals/ # RFCs (Perimeter 3)
├── examples/ # Examples (Perimeter 3)
├── spec/ # Spec tests (Perimeter 3)
├── tests/ # Test suite (Perimeter 2-3)
├── .well-known/ # Protocol files (Perimeter 1-3)
├── .github/ # GitHub config (Perimeter 1)
│ ├── ISSUE_TEMPLATE/
│ └── workflows/
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md # This file
├── GOVERNANCE.md
├── LICENSE
├── MAINTAINERS.md
├── README.adoc
├── SECURITY.md
├── flake.nix # Nix flake (Perimeter 1)
└── justfile # Task runner (Perimeter 1)
anvomidav/
├── crates/
│ ├── anv-core/ # Core types and utilities
│ ├── anv-syntax/ # Lexer and parser
│ ├── anv-types/ # Type checking
│ ├── anv-semantics/ # ISU rule validation
│ ├── anv-ir/ # Intermediate representation
│ ├── anv-viz/ # SVG visualization
│ └── anv-cli/ # Command-line interface
├── examples/ # Example .anv programs
└── docs/ # Documentation
```

---
## Making Changes

## How to Contribute
### Code Style

### Reporting Bugs
- Follow Rust conventions (run `cargo fmt`)
- No warnings allowed (run `cargo clippy`)
- All public APIs must be documented
- SPDX license headers on all source files:
```rust
// SPDX-FileCopyrightText: 2025 hyperpolymath
// SPDX-License-Identifier: MIT OR AGPL-3.0-or-later
```

**Before reporting**:
1. Search existing issues
2. Check if it's already fixed in `{{MAIN_BRANCH}}`
3. Determine which perimeter the bug affects
### Testing

**When reporting**:
- Write tests for new functionality
- Ensure all tests pass: `cargo test --workspace`
- Add integration tests for CLI changes

Use the [bug report template](.github/ISSUE_TEMPLATE/bug_report.md) and include:
### Commit Messages

- Clear, descriptive title
- Environment details (OS, versions, toolchain)
- Steps to reproduce
- Expected vs actual behaviour
- Logs, screenshots, or minimal reproduction
Use clear, descriptive commit messages:

### Suggesting Features
```
Add pairs skating element validation

**Before suggesting**:
1. Check the [roadmap](ROADMAP.md) if available
2. Search existing issues and discussions
3. Consider which perimeter the feature belongs to
- Implement lift group validation
- Add throw jump ISU limits
- Update tests for pairs short program
```

**When suggesting**:
## Pull Request Process

Use the [feature request template](.github/ISSUE_TEMPLATE/feature_request.md) and include:
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/my-feature`)
3. Make your changes
4. Run tests and clippy
5. Commit with clear messages
6. Push to your fork
7. Open a Pull Request

- Problem statement (what pain point does this solve?)
- Proposed solution
- Alternatives considered
- Which perimeter this affects
### PR Checklist

### Your First Contribution
- [ ] All tests pass
- [ ] No clippy warnings
- [ ] Code is formatted (`cargo fmt`)
- [ ] Documentation updated (if applicable)
- [ ] CHANGELOG updated (for user-facing changes)

Look for issues labelled:
## Areas for Contribution

- [`good first issue`](https://{{FORGE}}/{{OWNER}}/{{REPO}}/labels/good%20first%20issue) — Simple Perimeter 3 tasks
- [`help wanted`](https://{{FORGE}}/{{OWNER}}/{{REPO}}/labels/help%20wanted) — Community help needed
- [`documentation`](https://{{FORGE}}/{{OWNER}}/{{REPO}}/labels/documentation) — Docs improvements
- [`perimeter-3`](https://{{FORGE}}/{{OWNER}}/{{REPO}}/labels/perimeter-3) — Community sandbox scope
### Good First Issues

---
- Add more example programs for different disciplines
- Improve error messages
- Add test cases for edge cases

## Development Workflow
### Intermediate

### Branch Naming
```
docs/short-description # Documentation (P3)
test/what-added # Test additions (P3)
feat/short-description # New features (P2)
fix/issue-number-description # Bug fixes (P2)
refactor/what-changed # Code improvements (P2)
security/what-fixed # Security fixes (P1-2)
```
- Implement additional choreographic elements
- Enhance SVG visualizations
- Add more ISU rule validations

### Commit Messages
### Advanced

We follow [Conventional Commits](https://www.conventionalcommits.org/):
```
<type>(<scope>): <description>
- Tree-sitter grammar for editor support
- LSP server implementation
- Animation/timeline export

## Getting Help

- Open an issue for questions
- Check existing issues before creating new ones
- Use discussions for general questions

[optional body]
## License

[optional footer]
By contributing, you agree that your contributions will be licensed under the same license as the project (MIT OR AGPL-3.0-or-later).
Loading
Loading