BroccoliDB is intentionally small and portable. Contributions should preserve that boundary and make behavior easier to inspect, test, and transfer.
The current release line is Apache-2.0. The repository uses the Developer
Certificate of Origin 1.1 (../DCO): every commit submitted for inclusion must
carry a Signed-off-by: Name <email> line. DCO sign-off confirms contribution
provenance and permission to submit under Apache-2.0; it does not assign
copyright or authorize confidential material. The pull-request workflow checks
the complete proposed commit range for the sign-off; a passing local build does
not bypass that provenance gate.
Contributors must:
- Submit only original work or material they are authorized to contribute.
- Identify third-party code, generated assets, and their license before adding them; do not assume a package’s npm metadata is sufficient evidence.
- Avoid confidential information, customer data, trade secrets, and patent- sensitive disclosures that the contributor is not authorized to publish.
- Preserve existing SPDX, copyright, license, attribution, and NOTICE
information. Mark discussion that is not intended for inclusion as
Not a Contribution. - Update the IP record only with verifiable source, test, release, or public archive evidence. Do not describe repository notes as guaranteed patent validity, patent invalidity, or freedom to operate.
Contributions are accepted under Apache-2.0 as described by Section 5 of the license. A separate written agreement is required before anyone promises copyright assignment, exclusive rights, or a future commercial relicensing right.
| Area | Location |
|---|---|
| Public exports | src/index.ts |
| Public contracts | src/broccolidb.contracts.ts |
| Kernel lifecycle | src/broccolidb-kernel.ts |
| Tables and indexes | src/broccolidb-table.ts |
| WAL | src/broccolidb-wal.ts |
| CAS | src/broccolidb-cas.ts |
| Queries and aggregation | src/broccolidb-natural-query.ts, src/broccolidb-aggregation.ts |
| Locking | src/broccolidb-mutex.ts |
| Prompt compression | src/TokenCompressionService.ts |
| Tests | test/ |
| Documentation | README.md, docs/, docs/adr/ |
npm install
npm run build
npm test
npm run docs:check
npm run license:check
npm run ip:check
npm run package:check
npm pack --dry-runRun the smallest relevant test while iterating, then run npm run check before
handoff. Tests should use temporary workspace roots and always clean them in a
finally block.
The repository's agent guide defines how to split work across coding agents and automation. Give each contributor one outcome, a bounded set of files, and an acceptance checklist. Assign separate worktrees or non- overlapping file ownership when multiple people need to edit; a shared working tree has one writer at a time.
For review work, prefer a read-only assignment with a concrete area such as WAL recovery, JSONSQL semantics, public API navigation, or release metadata. Ask the reviewer to return prioritized findings with file/line, a reproduction or source evidence, impact, and a suggested correction. Keep one integrator responsible for reconciling findings across code, tests, docs, generated output, and the final verification pass.
Delegation template:
Outcome:
Scope and file ownership:
Allowed actions:
Must-preserve contracts:
Acceptance criteria:
Validation command:
Report: findings, evidence, risks, unresolved questions
- Keep the runtime dependency list empty unless a dependency is unavoidable,
justified in an ADR, and compatible with Node.js
>=18. - Preserve ESM-compatible relative imports and the public package export.
- Treat WAL, checkpoint, CAS, and serialized contract changes as compatibility changes even when TypeScript still compiles.
- Add tests for startup/replay, checkpoint/rollback, integrity failures, and query/index behavior when changing those areas.
- Keep
transaction()callbacks deterministic and avoid network or long-lived external work while holding the kernel mutex. - Keep native drivers and full dialect compatibility out of the core. The bounded JSONSQL surface is defined by ADR-005; grammar or durability expansions require tests and an updated decision.
Update the relevant layer whenever behavior changes:
| Change | Required documentation |
|---|---|
| Export or signature | API reference and release notes |
| Lifecycle, durability, or file format | Architecture, Operations, and an ADR |
| Error or recovery behavior | Troubleshooting and operations guide |
| Terminology | Glossary and affected docs |
| Supported package/version policy | README.md and release notes |
| Vulnerability reporting | SECURITY.md |
Examples must import from @noorm/broccolidb and show lifecycle ownership.
Avoid claims such as “transactional” or “durable” without naming the exact
boundary (flush, transaction, compact, checkpoint, or stop).
- The public export surface is intentional.
- Runtime dependencies remain portable and native-free.
- TypeScript build passes.
- Relevant tests pass, including restart/recovery tests where applicable.
-
npm run docs:checkpasses. -
npm run license:checkandnpm run ip:checkpass. -
npm run package:checkverifies the publish boundary. - README/API/operations/ADR/release notes are updated as required.
- Every submitted commit has a DCO sign-off and any third-party material has a recorded license/provenance review.
-
npm run license:checkpasses and source headers use the project SPDX identifier. - No generated
dist/or.broccolidb/runtime state was added accidentally. -
npm pack --dry-runcontains the intended docs and runtime files.
- Update
versioninpackage.jsonand the lockfile. - Add a release-note entry describing API and persistence compatibility.
- Run
npm run check,npm audit --omit=dev --audit-level=high, andnpm pack --dry-run. - Inspect the tarball file list for
dist,README.md,docs,LICENSE,NOTICE, and the IP/trademark policies. - Confirm the version’s license boundary in
docs/RELEASE_NOTES.mdand the package metadata before publishing. - Verify a clean consumer can import the compiled package without dev tools.
- Preserve the immutable artifact, public-accessibility evidence, archive digest, and raw audit output before making an external IP or patent claim.