|
| 1 | +# Contributing to Network-AI |
| 2 | + |
| 3 | +Network-AI is a solo-maintained project with high quality standards. Contributions are welcome but must meet strict requirements. |
| 4 | + |
| 5 | +## Before You Start |
| 6 | + |
| 7 | +**All contributions require prior discussion.** Do not open a pull request without an approved issue first. |
| 8 | + |
| 9 | +1. **Open an issue** describing the problem or feature |
| 10 | +2. **Wait for maintainer approval** before writing code |
| 11 | +3. Only after approval, fork and implement |
| 12 | + |
| 13 | +Unsolicited PRs without a linked, approved issue will be closed. |
| 14 | + |
| 15 | +## Requirements for All Contributions |
| 16 | + |
| 17 | +### Code Quality |
| 18 | + |
| 19 | +- All 251+ existing tests must pass (`npm test`) |
| 20 | +- Zero TypeScript compile errors (`npx tsc --noEmit`) |
| 21 | +- New features must include tests with >90% branch coverage |
| 22 | +- Follow existing code style and patterns |
| 23 | +- No new runtime dependencies without prior approval |
| 24 | + |
| 25 | +### Security |
| 26 | + |
| 27 | +- No hardcoded secrets, keys, or credentials |
| 28 | +- No new network calls without explicit justification |
| 29 | +- Input validation required on all public API entry points |
| 30 | +- Path traversal and injection protections where applicable |
| 31 | + |
| 32 | +### Documentation |
| 33 | + |
| 34 | +- JSDoc on all exported functions and classes |
| 35 | +- Update README.md if adding user-facing features |
| 36 | +- Update CHANGELOG.md under `[Unreleased]` |
| 37 | + |
| 38 | +## Pull Request Process |
| 39 | + |
| 40 | +1. Fork the repository and create a branch from `main` |
| 41 | +2. Implement your change with tests |
| 42 | +3. Run the full test suite: |
| 43 | + ```bash |
| 44 | + npm test |
| 45 | + npx tsc --noEmit |
| 46 | + ``` |
| 47 | +4. Open a PR referencing the approved issue |
| 48 | +5. Fill out the PR template completely |
| 49 | +6. Wait for review -- the maintainer reviews all PRs personally |
| 50 | + |
| 51 | +### PR Review Criteria |
| 52 | + |
| 53 | +- Does it solve the approved issue? |
| 54 | +- Are tests comprehensive? |
| 55 | +- Is the code clean and idiomatic TypeScript? |
| 56 | +- Does it maintain backward compatibility? |
| 57 | +- Does it introduce any security concerns? |
| 58 | + |
| 59 | +## What We Accept |
| 60 | + |
| 61 | +- Bug fixes with reproduction steps and tests |
| 62 | +- Security improvements |
| 63 | +- Performance optimizations with benchmarks |
| 64 | +- New adapter implementations (following `BaseAdapter` pattern) |
| 65 | +- Documentation improvements |
| 66 | + |
| 67 | +## What We Do Not Accept |
| 68 | + |
| 69 | +- Breaking API changes without a migration path |
| 70 | +- Features that add external runtime dependencies |
| 71 | +- Code that reduces test coverage |
| 72 | +- Cosmetic-only changes (formatting, renaming) |
| 73 | +- AI-generated code without human review and testing |
| 74 | + |
| 75 | +## Development Setup |
| 76 | + |
| 77 | +```bash |
| 78 | +git clone https://github.com/jovanSAPFIONEER/Network-AI.git |
| 79 | +cd Network-AI |
| 80 | +npm install |
| 81 | +npm test # Run all 251 tests |
| 82 | +npx tsc --noEmit # Type-check |
| 83 | +``` |
| 84 | + |
| 85 | +## License |
| 86 | + |
| 87 | +By contributing, you agree that your contributions will be licensed under the [MIT License](LICENSE). |
0 commit comments