|
| 1 | +# Contributing to omphalOS |
| 2 | + |
| 3 | +Thank you for your interest in contributing to omphalOS. This document outlines how to contribute code, investigations, documentation, and bug reports. |
| 4 | + |
| 5 | +## Code of Conduct |
| 6 | + |
| 7 | +Be professional, respectful, and constructive. This is a tool for serious analytical work—maintain that standard in all interactions. |
| 8 | + |
| 9 | +## How to Contribute |
| 10 | + |
| 11 | +### 1. Bug Reports |
| 12 | + |
| 13 | +Use GitHub Issues to report bugs. Include: |
| 14 | +- What you did (exact commands, case definitions) |
| 15 | +- What you expected |
| 16 | +- What actually happened |
| 17 | +- System information (OS, Python version, omphalOS commit SHA) |
| 18 | + |
| 19 | +### 2. Investigation Contributions |
| 20 | + |
| 21 | +Have a novel pattern for detecting evasion/proliferation? Contribute it: |
| 22 | + |
| 23 | +**Steps**: |
| 24 | +1. Write SQL investigation following catalog conventions (Canon/Margin headers, CTE structure, LIMIT clause) |
| 25 | +2. Place in `core/sql/investigations/custom/custom_<initials>_<date>_<description>.sql` |
| 26 | +3. Create test case with synthetic data showing the pattern |
| 27 | +4. Document false positive scenarios |
| 28 | +5. Submit pull request with investigation + test + docs |
| 29 | + |
| 30 | +**Example**: |
| 31 | +```sql |
| 32 | +-- Investigation: custom_jd_20260123_circular_flows |
| 33 | +-- Domain: all |
| 34 | +-- Intent: Detect circular shipment patterns (A→B→A) |
| 35 | +-- [Canon 01-60 + Margin 001-045] |
| 36 | +WITH ... |
| 37 | +``` |
| 38 | + |
| 39 | +### 3. Documentation Improvements |
| 40 | + |
| 41 | +Found unclear docs? Submit PR with improvements. Follow existing tone (technical but accessible). |
| 42 | + |
| 43 | +### 4. Code Contributions |
| 44 | + |
| 45 | +**Before coding**: |
| 46 | +- Open an issue describing what you want to build |
| 47 | +- Discuss approach with maintainers |
| 48 | +- Get approval before significant work |
| 49 | + |
| 50 | +**Code standards**: |
| 51 | +- Python: Follow PEP 8, use `black` formatter |
| 52 | +- Rust: Use `rustfmt` |
| 53 | +- Go: Use `gofmt` |
| 54 | +- All code must include docstrings/comments |
| 55 | +- No external dependencies without approval (offline-first requirement) |
| 56 | + |
| 57 | +**Testing**: |
| 58 | +- All new investigations must have test cases |
| 59 | +- All code changes must not break existing tests |
| 60 | +- Run `pytest` before submitting |
| 61 | + |
| 62 | +### 5. Security Contributions |
| 63 | + |
| 64 | +Found a vulnerability? See SECURITY.md for responsible disclosure process. |
| 65 | + |
| 66 | +**Do NOT** open public issues for security vulnerabilities. |
| 67 | + |
| 68 | +## Contribution Requirements |
| 69 | + |
| 70 | +### What You Can Submit |
| 71 | + |
| 72 | +✅ **Allowed**: |
| 73 | +- SQL investigations using synthetic data |
| 74 | +- Documentation improvements |
| 75 | +- Bug fixes |
| 76 | +- Performance optimizations |
| 77 | +- New verifiers (additional languages) |
| 78 | +- UI enhancements |
| 79 | +- Test cases |
| 80 | + |
| 81 | +❌ **Prohibited**: |
| 82 | +- Real trade data, PII, BCI, or classified information |
| 83 | +- Credentials, API keys, or secrets (even fake ones that look real) |
| 84 | +- Copyrighted material without attribution |
| 85 | +- Malicious code or backdoors |
| 86 | + |
| 87 | +### Data Requirements |
| 88 | + |
| 89 | +**CRITICAL**: All contributed data must be **synthetic and non-identifiable**. |
| 90 | + |
| 91 | +- Do NOT include real company names, addresses, or transaction records |
| 92 | +- Do NOT include data derived from classified sources |
| 93 | +- Do NOT include proprietary data from commercial providers |
| 94 | + |
| 95 | +When in doubt, generate synthetic test data using omphalOS's world builder. |
| 96 | + |
| 97 | +## Pull Request Process |
| 98 | + |
| 99 | +1. **Fork** the repository |
| 100 | +2. **Create branch**: `git checkout -b feature/your-feature-name` |
| 101 | +3. **Make changes**: Follow code standards above |
| 102 | +4. **Test**: Ensure `pytest` passes, run verification on sample cases |
| 103 | +5. **Commit**: Use clear commit messages explaining *why*, not just *what* |
| 104 | +6. **Push**: `git push origin feature/your-feature-name` |
| 105 | +7. **Open PR**: Describe changes, link to related issues, explain testing performed |
| 106 | + |
| 107 | +**PR Requirements**: |
| 108 | +- Passes all CI checks (linting, tests, pack verification) |
| 109 | +- Includes documentation updates if changing user-facing behavior |
| 110 | +- Includes test cases for new functionality |
| 111 | +- No merge conflicts with `main` |
| 112 | + |
| 113 | +## Review Process |
| 114 | + |
| 115 | +Maintainers will review within 7 days. Expect: |
| 116 | +- Questions about design choices |
| 117 | +- Requests for additional tests or documentation |
| 118 | +- Style/formatting feedback |
| 119 | + |
| 120 | +**Be patient**. This is a system used for national security work—thoroughness matters more than speed. |
| 121 | + |
| 122 | +## License |
| 123 | + |
| 124 | +By contributing, you agree that your contributions will be licensed under CC0 (public domain). You affirm that: |
| 125 | +- You have the right to submit the contribution |
| 126 | +- The contribution is your original work or properly attributed |
| 127 | +- The contribution contains no classified, proprietary, or sensitive information |
| 128 | + |
| 129 | +## Recognition |
| 130 | + |
| 131 | +Contributors will be acknowledged in: |
| 132 | +- `CONTRIBUTORS.md` file (if substantial contribution) |
| 133 | +- Release notes for version where contribution appears |
| 134 | +- Academic publications citing omphalOS (if contribution is methodologically significant) |
| 135 | + |
| 136 | +## Questions? |
| 137 | + |
| 138 | +Open a GitHub Discussion (not an Issue) for: |
| 139 | +- How to implement a feature |
| 140 | +- Design questions |
| 141 | +- General usage questions |
| 142 | + |
| 143 | +Use Issues only for bugs and concrete feature requests. |
| 144 | + |
| 145 | +--- |
| 146 | + |
| 147 | +**Thank you for helping make intelligence analysis more transparent, reproducible, and defensible.** |
0 commit comments