OpenCodeHub is a clean-room implementation. Do not copy code from any PolyForm, BSL, Commons Clause, GPL, or AGPL source.
CI enforces:
- Permissive-license allowlist (Apache-2.0 / MIT / BSD / ISC / CC0 / BlueOak / 0BSD) on all transitive deps
- Banned-strings grep over all tracked source (see
scripts/check-banned-strings.sh) osv-scannervulnerability scan on the lockfile
mise install
pnpm install --frozen-lockfile
mise run check # lint + typecheck + test + banned-stringsAll commits on main must follow Conventional Commits.
<type>(<scope>): <subject>
[optional body]
[optional footer(s)]
- Types:
feat,fix,chore,docs,refactor,perf,test,build,ci,style,revert,release. - Scopes: the workspace package (
cli,ingestion,mcp, …) or meta-scope (deps,ci,docs,repo,release). - Breaking changes: append
!after the type or add aBREAKING CHANGE:footer. While on0.x.ythese bump the minor; after1.0.0they bump the major.
Use the interactive prompt if you're unsure:
pnpm run commit # wraps commitizen — prompts for type, scope, subject, bodyEnforcement:
- Local:
lefthookruns commitlint oncommit-msg— malformed messages are rejected before they land. - CI:
.github/workflows/commitlint.ymlvalidates every commit on a PR. - Releases:
release-pleasereads the commit log onmainand opens a versioned release PR automatically. Merging it cuts the tag, generatesCHANGELOG.md, and publishes the release.
lefthook install wires:
pre-commit: biome + banned-stringscommit-msg: commitlintpre-push: typecheck + test
- Fork + branch
pnpm run checkgreen locally- PR against
main - All CI jobs green: lint, typecheck, test (Linux/macOS/Windows), banned-strings, licenses, osv, sarif-validate, commitlint, CodeQL
- Add the tree-sitter grammar to
packages/ingestion/package.jsonwith a pinned version - Implement
LanguageProviderinpackages/ingestion/src/providers/<lang>.ts - Register it in
packages/ingestion/src/providers/registry.ts(TypeScript will fail the build if missing) - Add fixture tests in
packages/ingestion/test/fixtures/<lang>/
- Determinism is non-negotiable — identical inputs must yield identical graph-hash
- Offline-first —
codehub analyze --offlinemust open zero sockets - Clean-room IP hygiene — when in doubt, ask