Contributing to Network-AI
Network-AI is a solo-maintained project with high quality standards. Contributions are welcome but must meet strict requirements.
Before You Start
All contributions require prior discussion. Do not open a pull request without an approved issue first.
- Open an issue describing the problem or feature
- Wait for maintainer approval before writing code
- Only after approval, fork and implement
Unsolicited PRs without a linked, approved issue will be closed.
Requirements for All Contributions
Code Quality
- All 4,588 existing tests must pass (
npm run test:all) - Zero TypeScript compile errors (
npm run typecheck) - New features must include tests with >90% branch coverage
- Follow existing code style and patterns
- No new runtime dependencies without prior approval
Security
- No hardcoded secrets, keys, or credentials
- No new network calls without explicit justification
- Input validation required on all public API entry points
- Path traversal and injection protections where applicable
- New network listeners bind loopback by default and fail closed without a secret
- Changes to
lib/asi/orlib/perpetual/must keep the control invariants intact — configuration can only be tightened at runtime, the external stop works without agent cooperation, agents never modify their own limits, and spending stays inside operator-signed ceilings — and must add regression tests for each invariant they touch
Documentation
- JSDoc on all exported functions and classes
- Update README.md if adding user-facing features
- Update CHANGELOG.md under
[Unreleased]
Pull Request Process
- Fork the repository and create a branch from
main - Implement your change with tests
- Run the full test suite:
npm run test:all # 4,588 tests across 47 suites
npm run typecheck- Open a PR referencing the approved issue
- Fill out the PR template completely
- Wait for review -- the maintainer reviews all PRs personally
PR Review Criteria
- Does it solve the approved issue?
- Are tests comprehensive?
- Is the code clean and idiomatic TypeScript?
- Does it maintain backward compatibility?
- Does it introduce any security concerns?
What We Accept
- Bug fixes with reproduction steps and tests
- Security improvements
- Performance optimizations with benchmarks
- New adapter implementations (following
BaseAdapterpattern) - Documentation improvements
What We Do Not Accept
- Breaking API changes without a migration path
- Features that add external runtime dependencies
- Options that let an agent loosen its own limits, renew its own lease, or bypass a guarded path, kill switch, or budget ceiling
- Code that reduces test coverage
- Cosmetic-only changes (formatting, renaming)
- AI-generated code without human review and testing
Development Setup
git clone https://github.com/Jovancoding/Network-AI.git
cd Network-AI
npm install
npm run test:all # Run all 4,588 tests (47 suites)
npm run test:phase4 # Phase 4 behavioral control plane tests only
npx ts-node test-perpetual.ts # Perpetual Runtime: leases, egress, CLI
npx ts-node test-perpetual-safety.ts # Perpetual Runtime: guarded paths, sandbox, sentries, pipeline, budget
npm run typecheck # Type-checkLicense
By contributing, you agree that your contributions will be licensed under the MIT License.