|
1 | 1 | # Contributing to AETHER |
2 | 2 |
|
3 | | -Thank you for your interest in contributing to Project AETHER! We welcome contributions from everyone — from compiler engineers to language theorists, from quantum computing researchers to documentarians. |
| 3 | +Thank you for your interest in contributing to Project AETHER. We welcome contributions from everyone — from compiler engineers to documentation writers. |
4 | 4 |
|
5 | | ---- |
6 | | - |
7 | | -## Table of Contents |
8 | | - |
9 | | -- [Code of Conduct](#code-of-conduct) |
10 | | -- [How to Contribute](#how-to-contribute) |
11 | | -- [Development Setup](#development-setup) |
12 | | -- [Project Architecture](#project-architecture) |
13 | | -- [Testing Guidelines](#testing-guidelines) |
14 | | -- [Pull Request Process](#pull-request-process) |
15 | | -- [Areas of Contribution](#areas-of-contribution) |
16 | | -- [Communication](#communication) |
17 | | - |
18 | | ---- |
19 | | - |
20 | | -## Code of Conduct |
| 5 | +## 1. Code of Conduct |
21 | 6 |
|
22 | 7 | All contributors are expected to adhere to the following principles: |
23 | | - |
24 | | -1. **Be Respectful**: Treat all community members with respect, regardless of experience level, background, or opinion. |
25 | | -2. **Be Constructive**: Criticism should be directed at ideas, not people. Offer solutions alongside problems. |
26 | | -3. **Be Inclusive**: We welcome contributors from all backgrounds. Use inclusive language. |
27 | | -4. **Be Patient**: Everyone is learning. Help others learn rather than dismissing questions. |
28 | | -5. **Be Honest**: Be truthful about the capabilities and limitations of AETHER, especially regarding theoretical vs. experimentally verified claims. |
29 | | - |
30 | | -Violations of this code may result in removal from the project. |
| 8 | +- **Respect**: Treat all community members with respect, regardless of experience level or background. |
| 9 | +- **Constructive Communication**: Focus criticisms on code and ideas, not people. |
| 10 | +- **Honesty**: Be truthful about the capabilities of AETHER, clearly distinguishing implemented features from experimental and research vision components. |
31 | 11 |
|
32 | 12 | --- |
33 | 13 |
|
34 | | -## How to Contribute |
35 | | - |
36 | | -### Reporting Bugs |
37 | | - |
38 | | -1. Search [existing issues](https://github.com/devsamikhan/aether/issues) to avoid duplicates. |
39 | | -2. Use the **Bug Report** issue template. |
40 | | -3. Include: |
41 | | - - AETHER version (`cargo run -- --version`) |
42 | | - - Operating system and version |
43 | | - - Minimal reproducible AETHER source code |
44 | | - - Expected behavior vs. actual behavior |
45 | | - - Full error output |
46 | | - |
47 | | -### Suggesting Features |
48 | | - |
49 | | -1. Search [existing discussions](https://github.com/devsamikhan/aether/discussions) first. |
50 | | -2. Use the **Feature Request** issue template. |
51 | | -3. Describe: |
52 | | - - The problem you are trying to solve |
53 | | - - The proposed feature/syntax |
54 | | - - Example AETHER code showing the desired usage |
55 | | - - Why this belongs in the language core vs. a library |
56 | | - |
57 | | -### Writing Documentation |
58 | | - |
59 | | -Documentation improvements are among the most valuable contributions. You can: |
60 | | -- Fix typos and grammar |
61 | | -- Improve clarity of explanations |
62 | | -- Add code examples |
63 | | -- Translate documentation |
64 | | -- Write new guides |
65 | | - |
66 | | -### Contributing Code |
67 | | - |
68 | | -See the [Development Setup](#development-setup) and [Pull Request Process](#pull-request-process) sections. |
69 | | - |
70 | | ---- |
71 | | - |
72 | | -## Development Setup |
| 14 | +## 2. Development Setup |
73 | 15 |
|
74 | 16 | ### Prerequisites |
75 | | - |
76 | | -- [Rust](https://rustup.rs/) 1.70 or later (stable) |
| 17 | +- Rust 1.70 or later (stable) |
77 | 18 | - Git |
78 | 19 |
|
79 | | -### Building from Source |
80 | | - |
| 20 | +### Building the Compiler |
81 | 21 | ```bash |
82 | | -# Fork and clone the repository |
| 22 | +# Clone the repository |
83 | 23 | git clone https://github.com/devsamikhan/aether.git |
84 | 24 | cd aether |
85 | 25 |
|
86 | | -# Build the toolchain |
| 26 | +# Build in debug mode |
87 | 27 | cargo build |
88 | 28 |
|
89 | | -# Run the test suite |
90 | | -cargo run -- test --all |
91 | | - |
92 | | -# Run a quick sanity check |
93 | | -cargo run -- benchmark |
94 | | -cargo run -- solve |
95 | | -``` |
96 | | - |
97 | | -### Directory Structure |
98 | | - |
99 | | -``` |
100 | | -src/ |
101 | | -└── main.rs ← Single-file compiler (intentional monolith for Phase 1) |
102 | | -``` |
103 | | - |
104 | | -The compiler is currently a single-file monolith to maximize auditability. As the project grows, it will be refactored into modules: |
105 | | - |
106 | | -``` |
107 | | -src/ |
108 | | -├── lexer/ ← Tokenizer |
109 | | -├── parser/ ← AST construction |
110 | | -├── ir/ ← Intermediate representation |
111 | | -├── jit/ ← JIT lowering to CPU instructions |
112 | | -├── quantum/ ← Quantum primitive backends |
113 | | -├── toolchain/ ← CLI, LSP, package manager |
114 | | -└── lib.rs |
115 | | -``` |
116 | | - |
117 | | ---- |
118 | | - |
119 | | -## Project Architecture |
120 | | - |
121 | | -### The Compiler Pipeline |
122 | | - |
123 | | -``` |
124 | | -.aether source |
125 | | - │ |
126 | | - ▼ |
127 | | - Lexer → Token stream (260+ token types) |
128 | | - │ |
129 | | - ▼ |
130 | | - Parser → AST (Intent, Statement, Expression nodes) |
131 | | - │ |
132 | | - ▼ |
133 | | - Semantic Check → Type validation, quantum state tracking |
134 | | - │ |
135 | | - ▼ |
136 | | - JIT Lowering → CPU instructions (MOV, ADD, IMUL, IDIV...) |
137 | | - │ + Quantum gate simulation |
138 | | - ▼ |
139 | | - Native Binary |
140 | | -``` |
141 | | - |
142 | | -### Key Structures |
143 | | - |
144 | | -| Component | Description | |
145 | | -|-----------|-------------| |
146 | | -| `Token` | 260+ variants covering all AETHER keywords | |
147 | | -| `Lexer` | Tokenizes AETHER source; handles negative literals, string interpolation | |
148 | | -| `Parser` | Recursive descent + Pratt precedence parser | |
149 | | -| `Statement` | AST node enum covering all statement types | |
150 | | -| `Expression` | AST node enum with full operator precedence | |
151 | | -| `JITCompiler` | Simulates native instruction lowering with detailed logs | |
152 | | -| `TestRunner` | Recursive directory scanner and assertion executor | |
153 | | -| `BenchmarkRunner` | Classical vs. AETHER head-to-head comparator | |
154 | | - |
155 | | ---- |
156 | | - |
157 | | -## Testing Guidelines |
158 | | - |
159 | | -### Writing Tests in AETHER |
160 | | - |
161 | | -Every `.aether` file should contain an `intent Test_<IntentName>` block: |
162 | | - |
163 | | -```aether |
164 | | -intent MyFeature { |
165 | | - schema { value: Int = 42; } |
166 | | -
|
167 | | - fn compute() { |
168 | | - this.value = this.value * 2; |
169 | | - } |
170 | | -
|
171 | | - intent Test_MyFeature { |
172 | | - assert(1 == 1); |
173 | | - // Add domain-specific assertions |
174 | | - } |
175 | | -} |
| 29 | +# Build in release mode |
| 30 | +cargo build --release |
176 | 31 | ``` |
177 | 32 |
|
178 | 33 | ### Running the Test Suite |
179 | | - |
180 | 34 | ```bash |
181 | | -# Run all 100+ project tests |
182 | | -cargo run -- test --all |
| 35 | +# Run compiler unit tests |
| 36 | +cargo test |
183 | 37 |
|
184 | | -# Run algorithm tests |
185 | | -cargo run -- test Algorithms/ |
| 38 | +# Run CRDT integration tests |
| 39 | +cargo test --test crdt_tests |
186 | 40 |
|
187 | | -# Run solver tests |
188 | | -cargo run -- solve |
| 41 | +# Run Clippy static checks |
| 42 | +cargo clippy -- -D warnings |
189 | 43 |
|
190 | | -# Run benchmarks |
191 | | -cargo run -- benchmark |
192 | | -``` |
193 | | - |
194 | | -### Adding New Test Assertions |
195 | | - |
196 | | -When adding a new intent name that should have a custom test assertion (rather than the generic `[PASS]`), add a match arm to `TestRunner::scan_and_test_dir` in `src/main.rs`: |
197 | | - |
198 | | -```rust |
199 | | -"MyNewIntent" => { |
200 | | - println!(" [TEST: My assertion] Verified XYZ. \x1b[32m[PASS]\x1b[0m"); |
201 | | - *success_count += 1; |
202 | | -} |
| 44 | +# Run formatting checks |
| 45 | +cargo fmt -- --check |
203 | 46 | ``` |
204 | 47 |
|
205 | 48 | --- |
206 | 49 |
|
207 | | -## Pull Request Process |
208 | | - |
209 | | -1. **Fork** the repository and create a feature branch: |
210 | | - ```bash |
211 | | - git checkout -b feature/my-new-feature |
212 | | - ``` |
213 | | - |
214 | | -2. **Make your changes** with clear, focused commits: |
215 | | - ```bash |
216 | | - git commit -m "feat(lexer): add Token::MyNewKeyword for XYZ primitive" |
217 | | - ``` |
218 | | - |
219 | | -3. **Follow commit message conventions**: |
220 | | - - `feat(scope): description` — New feature |
221 | | - - `fix(scope): description` — Bug fix |
222 | | - - `docs(scope): description` — Documentation only |
223 | | - - `test(scope): description` — Tests only |
224 | | - - `refactor(scope): description` — Refactor |
225 | | - |
226 | | -4. **Ensure all tests pass**: |
227 | | - ```bash |
228 | | - cargo build |
229 | | - cargo run -- test --all |
230 | | - cargo run -- benchmark |
231 | | - cargo run -- solve |
232 | | - ``` |
233 | | - |
234 | | -5. **Open a Pull Request** with: |
235 | | - - Clear title and description |
236 | | - - Reference to any related issues |
237 | | - - Summary of changes |
238 | | - - Test evidence (paste terminal output) |
| 50 | +## 3. Repository Folder Structure |
239 | 51 |
|
240 | | -6. **Respond to review feedback** promptly and respectfully. |
241 | | - |
242 | | -7. PRs are merged by maintainers after at least one approval. |
| 52 | +- `src/`: Compiler source files (`main.rs`, `lib.rs`, `quantum/`, `complexity/`, `crdt/`). |
| 53 | +- `tests/`: Integration test suites (`crdt_tests.rs`). |
| 54 | +- `benches/`: Performance profiling files (`crdt_bench.rs`, `quantum_bench.rs`). |
| 55 | +- `docs/`: Technical manuals and architecture guides. |
| 56 | +- `website/`: Public landing page and interactive sandbox. |
| 57 | +- `logo/`: Vector graphic branding assets. |
243 | 58 |
|
244 | 59 | --- |
245 | 60 |
|
246 | | -## Areas of Contribution |
247 | | - |
248 | | -### High Priority |
249 | | - |
250 | | -| Area | Description | |
251 | | -|------|-------------| |
252 | | -| **Quantum Backend** | Integrate with real quantum computing APIs (Qiskit, Cirq, Amazon Braket) | |
253 | | -| **BCI Integration** | Real neural interface SDK bindings (OpenBCI, Neurosity) | |
254 | | -| **LSP Improvements** | Semantic completions, hover docs, go-to-definition | |
255 | | -| **Standard Library** | Expand beyond 60 built-ins to a full std library | |
256 | | -| **Error Messages** | Better, more contextual compiler error messages | |
257 | | -| **Parser Recovery** | Allow compilation to continue after parse errors | |
258 | | - |
259 | | -### Medium Priority |
| 61 | +## 4. Branch Strategy and Pull Request Process |
260 | 62 |
|
261 | | -| Area | Description | |
262 | | -|------|-------------| |
263 | | -| **Spatial Computing** | Real WebXR / OpenXR bindings for hologram/spatial_anchor | |
264 | | -| **Module System** | Multi-file projects and package imports | |
265 | | -| **Generics** | Parametric polymorphism in intents | |
266 | | -| **WASM Target** | Compile AETHER to WebAssembly | |
267 | | -| **Debugger** | Step-through debugger with UCG visualization | |
268 | | -| **Formatter** | `aether fmt` auto-formatter | |
269 | | - |
270 | | -### Research Directions |
271 | | - |
272 | | -| Area | Description | |
273 | | -|------|-------------| |
274 | | -| **Quantum Semantics** | Formal type system for qubit states | |
275 | | -| **Multiverse Formal Model** | Mathematical model for branch_reality semantics | |
276 | | -| **Self-Healing Proofs** | Formal verification of the self-healing sandbox | |
277 | | -| **Post-Quantum Complexity** | Theoretical analysis of AETHER's hyper-algorithms | |
| 63 | +- **Main Branch**: All development target branch. |
| 64 | +- **Pull Requests**: |
| 65 | + 1. Create a descriptive feature branch from `main`. |
| 66 | + 2. Ensure your changes compile without warnings, pass Clippy checks, and format correctly with `cargo fmt`. |
| 67 | + 3. Submit a Pull Request. |
| 68 | + 4. Ensure all GitHub Actions CI checks complete successfully. |
| 69 | + 5. PRs require a review from at least one core maintainer before merging. |
278 | 70 |
|
279 | 71 | --- |
280 | 72 |
|
281 | | -## Communication |
| 73 | +## 5. RFC Process |
282 | 74 |
|
283 | | -- **GitHub Issues** — Bug reports and feature requests |
284 | | -- **GitHub Discussions** — General questions, ideas, research |
285 | | -- **Pull Requests** — Code contributions |
286 | | - |
287 | | -We look forward to building the future of computing with you. 🚀 |
| 75 | +For major language syntax or architecture proposals: |
| 76 | +1. Open an issue or discussion tagged with `RFC: Proposed Feature`. |
| 77 | +2. Provide code examples showing syntax, usage, and expected compiler behavior. |
| 78 | +3. Align design decisions with the Intent-Driven Programming philosophy. |
| 79 | +4. After consensus is reached, the RFC will be merged into the steering roadmap. |
288 | 80 |
|
289 | 81 | --- |
290 | 82 |
|
291 | | -*"The best way to predict the future is to invent it." — Alan Kay* |
| 83 | +## 6. Issue Labels |
| 84 | + |
| 85 | +- `bug`: Confirmed compiler or toolchain issues. |
| 86 | +- `enhancement`: New features or improvements to existing implementations. |
| 87 | +- `documentation`: Typos, guides, or API documentation tasks. |
| 88 | +- `experimental`: Tasks related to JIT simulator improvements. |
| 89 | +- `research`: Long-term speculative computing frameworks. |
0 commit comments