|
1 | | -# Contributing to conflow |
| 1 | +# Contributing |
2 | 2 |
|
3 | | -Thank you for your interest in contributing to conflow! This document provides |
4 | | -guidelines and information for contributors. |
5 | | - |
6 | | -## Tri-Perimeter Contribution Framework (TPCF) |
7 | | - |
8 | | -conflow uses a graduated trust model based on the RSR Tri-Perimeter Contribution |
9 | | -Framework: |
10 | | - |
11 | | -### Perimeter 1: Core (Maintainers Only) |
12 | | - |
13 | | -Changes to critical infrastructure require maintainer review and approval: |
14 | | - |
15 | | -- Build system (`Cargo.toml`, `flake.nix`, `justfile`) |
16 | | -- CI/CD configuration (`.gitlab-ci.yml`) |
17 | | -- Security-sensitive code (`src/executors/shell.rs`) |
18 | | -- Release processes |
19 | | - |
20 | | -### Perimeter 2: Expert (Trusted Contributors) |
21 | | - |
22 | | -Experienced contributors may work on: |
23 | | - |
24 | | -- New executor implementations |
25 | | -- Pipeline validation logic |
26 | | -- Cache algorithms |
27 | | -- RSR integration features |
28 | | -- Performance optimizations |
29 | | - |
30 | | -**Requirements**: Previous accepted contributions, demonstrated expertise |
31 | | - |
32 | | -### Perimeter 3: Community (Open to All) |
33 | | - |
34 | | -Everyone is welcome to contribute: |
35 | | - |
36 | | -- Documentation improvements |
37 | | -- Bug reports and fixes |
38 | | -- Test coverage |
39 | | -- Example pipelines |
40 | | -- Translations |
41 | | -- Issue triage |
42 | | - |
43 | | -## Getting Started |
44 | | - |
45 | | -### Prerequisites |
46 | | - |
47 | | -- Rust 1.75+ (install via rustup) |
48 | | -- Nix (optional, for reproducible builds) |
49 | | -- CUE and Nickel (for integration tests) |
50 | | - |
51 | | -### Development Setup |
52 | | - |
53 | | -```bash |
54 | | -# Clone the repository |
55 | | -git clone https://gitlab.com/hyperpolymath/conflow.git |
56 | | -cd conflow |
57 | | - |
58 | | -# Option 1: Use Nix (recommended) |
59 | | -nix develop |
60 | | - |
61 | | -# Option 2: Manual setup |
62 | | -cargo build |
63 | | -cargo test |
64 | | -``` |
65 | | - |
66 | | -### Running Tests |
67 | | - |
68 | | -```bash |
69 | | -# All tests |
70 | | -cargo test |
71 | | - |
72 | | -# Specific test |
73 | | -cargo test test_name |
74 | | - |
75 | | -# With output |
76 | | -cargo test -- --nocapture |
77 | | -``` |
78 | | - |
79 | | -## Contribution Process |
80 | | - |
81 | | -### 1. Find or Create an Issue |
82 | | - |
83 | | -- Check existing issues first |
84 | | -- Create a new issue for bugs or features |
85 | | -- Wait for maintainer feedback on large changes |
86 | | - |
87 | | -### 2. Fork and Branch |
88 | | - |
89 | | -```bash |
90 | | -git checkout -b feature/my-feature |
91 | | -# or |
92 | | -git checkout -b fix/issue-123 |
93 | | -``` |
94 | | - |
95 | | -### 3. Make Changes |
96 | | - |
97 | | -- Follow the code style (run `cargo fmt`) |
98 | | -- Add tests for new functionality |
99 | | -- Update documentation as needed |
100 | | -- Add SPDX headers to new files: |
101 | | - |
102 | | -```rust |
103 | | -// SPDX-License-Identifier: MIT OR Apache-2.0 |
104 | | -// Copyright (c) 2025 conflow contributors |
105 | | -``` |
106 | | - |
107 | | -### 4. Commit |
108 | | - |
109 | | -Follow conventional commits: |
110 | | - |
111 | | -``` |
112 | | -feat: add new cue validation option |
113 | | -fix: handle empty pipeline gracefully |
114 | | -docs: update CLI usage examples |
115 | | -test: add cache invalidation tests |
116 | | -refactor: simplify stage execution |
117 | | -``` |
118 | | - |
119 | | -### 5. Submit Merge Request |
120 | | - |
121 | | -- Fill out the MR template |
122 | | -- Link related issues |
123 | | -- Ensure CI passes |
124 | | -- Request review |
125 | | - |
126 | | -## Code Style |
127 | | - |
128 | | -### Rust Guidelines |
129 | | - |
130 | | -- Use `cargo fmt` for formatting |
131 | | -- Use `cargo clippy` for linting |
132 | | -- Prefer explicit error handling over `.unwrap()` |
133 | | -- Document public APIs with doc comments |
134 | | -- Keep functions focused and small |
135 | | - |
136 | | -### Documentation |
137 | | - |
138 | | -- Use clear, concise language |
139 | | -- Include code examples where helpful |
140 | | -- Update README for user-facing changes |
141 | | -- Add inline comments for complex logic |
142 | | - |
143 | | -## Testing Requirements |
144 | | - |
145 | | -### Unit Tests |
146 | | - |
147 | | -- All new functions should have tests |
148 | | -- Test edge cases and error conditions |
149 | | -- Use descriptive test names |
150 | | - |
151 | | -### Integration Tests |
152 | | - |
153 | | -- Test CLI commands in `tests/` |
154 | | -- Test with real CUE/Nickel files |
155 | | -- Verify cache behavior |
156 | | - |
157 | | -### Test Coverage |
158 | | - |
159 | | -We aim for >80% coverage on core modules. |
160 | | - |
161 | | -## Review Process |
162 | | - |
163 | | -### What Reviewers Look For |
164 | | - |
165 | | -1. **Correctness**: Does the code work as intended? |
166 | | -2. **Tests**: Are there adequate tests? |
167 | | -3. **Documentation**: Is it documented? |
168 | | -4. **Style**: Does it follow conventions? |
169 | | -5. **Security**: Any security implications? |
170 | | - |
171 | | -### Review Timeline |
172 | | - |
173 | | -- Initial response: 2-3 business days |
174 | | -- Full review: 1 week for small changes |
175 | | -- Large changes may take longer |
176 | | - |
177 | | -## Community |
178 | | - |
179 | | -### Communication Channels |
180 | | - |
181 | | -- GitLab Issues: Bug reports and feature requests |
182 | | -- Merge Requests: Code discussions |
183 | | -- Email: maintainers@conflow.dev |
184 | | - |
185 | | -### Meetings |
186 | | - |
187 | | -- No regular meetings currently |
188 | | -- Ad-hoc discussions as needed |
189 | | - |
190 | | -## Recognition |
191 | | - |
192 | | -Contributors are recognized in: |
193 | | - |
194 | | -- `MAINTAINERS.md` for significant contributions |
195 | | -- Release notes for merged changes |
196 | | -- `humans.txt` for all contributors |
197 | | - |
198 | | -## License |
199 | | - |
200 | | -By contributing, you agree that your contributions will be licensed under the |
201 | | -same MIT OR Apache-2.0 dual license as the project. |
202 | | - |
203 | | -## Questions? |
204 | | - |
205 | | -Don't hesitate to ask! Open an issue or reach out to maintainers. |
206 | | - |
207 | | ---- |
208 | | - |
209 | | -*This contributing guide follows RSR standards and TPCF principles.* |
| 3 | +See [CONTRIBUTING.adoc](CONTRIBUTING.adoc) for full contribution guidelines. |
0 commit comments