Contributing to Neusym
Thank you for your interest in contributing to Neusym, the open runtime and kits for building governed environments for autonomous agents.
Thank you for your interest in contributing to Neusym, the open runtime and kits for building governed environments for autonomous agents.
#Open Source & Licensing Model
Neusym is open core. The runtime (core/*), every contract in contracts/*, the schemas, the operator apps, the test and local profiles, the single-node drivers, and the kits for all five authority levels are open source under Apache-2.0. The Enterprise Edition (multi-process self-host drivers, plus the governance, coordination and self-learning kits) is commercial and distributed separately. It plugs into the same open contracts/* interfaces, nothing open source depends on it, and npm run check:licensing enforces both. docs/guides/open-core-editions.md lists which package belongs to which edition.
#Developer Certificate of Origin (DCO)
By submitting a pull request, you certify under the Developer Certificate of Origin that you have the right to submit your work under the Apache License 2.0 (see Section 5 of LICENSE). Please sign off commits with:
git commit -s -m "feat(scope): short description"#Development Workflow
Requires Node.js >= 22.14.0.
npm install # Link workspace packages
npm run check # Manifests, schemas, boundaries, determinism, domain-free, licensing & docs sync
npm run build # Compile TypeScript project references
npm test # Run all node:test suites
npm run verify # Full check + build + test gate#Architectural Rules (CI-Enforced)
Before opening a PR, please ensure npm run verify passes cleanly:
- Dependency allow-list (
scripts/boundaries/rules.json): Kits may only import@neusym/sdkand their declared@neusym/contract-*packages. Apps never import kits or drivers directly. - Determinism:
core/*,contracts/*,kits/*/*, andexamples/**forbid ambient wall-clock and randomness globals (Date.now,new Date(),Math.random,crypto.randomUUID, etc.). Usectx.nowMs(),ctx.nowIso(), andctx.nextId(). - Domain-free platform (
scripts/ci/domain-free.mjs): Keep vertical/product vocabulary out of platform roots; domain logic belongs in external Domain Packs. - No raw port/point/event literals: Kit code must import exported constants from
@neusym/contract-*. - Sync generated tables: If you add, move or change a package or manifest (
kit.json,driver.json,contract.json), runnpm run sync:docs. It regenerates the kits, drivers and contracts catalogs, the ARCHITECTURE tables, the editions breakdown and the README tree counts. Do not write package counts anywhere else;npm run checkfails when a generated table is stale. - Isolation & regression tests: Every kit must pass standalone isolation tests (
bootKitInIsolation), and bug fixes should include a regression test. - Kit source layout: When a kit's
src/index.tsgrows past 500 lines (or 350 with three or more roles), split it into role modules as described in kits/README.md.