-
-
Notifications
You must be signed in to change notification settings - Fork 3
Contributing
CortexPrism edited this page Jun 17, 2026
·
1 revision
Contributions are welcome! CortexPrism is open source and accepts bug reports, feature ideas, documentation improvements, and code contributions.
Prerequisites: Deno 2.x. Docker is optional.
git clone https://github.com/CortexPrism/cortex.git
cd cortex
deno run --allow-all src/db/migrate.ts
# Verify everything passes
deno task check # Type-check
deno task lint # Lint
deno task fmt # Format
deno task test # Run tests- Create a feature branch from
main - Make changes following conventions
- Verify:
deno task check && deno task lint && deno task fmt && deno task test - Commit using conventional commit format
- Open a PR against
main
-
Strict mode — no implicit
any, no!assertions without comment -
Async-first — prefer
async/awaitover raw Promise chains -
Fire-and-forget — background tasks use
.catch(() => {}), never block - Error handling — catch at boundaries, surface actionable messages
- No hardcoded secrets — use vault + env vars
-
No hardcoded paths — use
PATHSfromsrc/config/paths.ts
Use Deno.Command — never Deno.run (deprecated).
- Create
src/tools/builtin/your_tool.tsimplementingToolfromsrc/tools/types.ts - Register in
src/tools/registry.ts - Wire into
src/server/ws.tsif needed for Web UI - Add policy rule if it executes shell commands or makes network requests
- Add tests in
tests/your_tool_test.ts
- Create
src/cli/your-cmd.tsexporting aCommandfrom@cliffy/command - Register in
src/main.ts - Document in README and CHANGELOG
- Create
src/db/migrations/NNN_description.sql(next sequential number) - Add entry to
targetsarray insrc/db/migrate.ts - Never edit applied migrations — create new ones instead
- Create
src/llm/your-provider.tsimplementingLLMProviderfromsrc/llm/types.ts - Register in
src/llm/factory.ts - Add provider config schema
- Add to setup wizard in
src/cli/setup.ts - Document in README, CHANGELOG, and LLM Providers wiki page
Tests live in tests/ and use Deno's built-in test runner:
deno task test # All tests
deno test --allow-all tests/memory_test.ts # Single file- Follow pattern:
tests/<module>_test.ts - Prefer unit tests without live LLM API calls
- Use mocks/stubs for integration tests
Use Conventional Commits:
feat: add discord channel adapter
fix: handle empty response from Ollama
docs: update CLI reference
chore: bump deno.json dependencies
refactor: extract policy evaluation into pure function
test: add workspace path traversal cases
- One logical change per PR
- Fill in the PR template
- Link related issues with
Closes #123 - CI must pass (lint, format, type-check, tests)
- Rebase on main before requesting review
- Bugs — use the Bug Report template, include OS, Deno version, full error
- Features — use the Feature Request template
- Security — do NOT open public issues; follow Security Policy
By contributing you agree that your contributions will be licensed under MIT.
CortexPrism — Open-source agentic AI harness · MIT License · Built with Deno 2.x + TypeScript