Aller au contenu

Contributing

Ce contenu n’est pas encore disponible dans votre langue.

Audience: developer who wants to contribute code, documentation, or bug reports to Cortex.

Cortex is the open-source core of the Arka platform. See the full CONTRIBUTING.md in the repository for the canonical reference.


  1. Read the Architecture documentation. Cortex is strict about hexagonal layering — domain code must not import from adapters. PRs that violate this will be sent back.
  2. Open an issue first for anything beyond a typo or a clearly localised bug fix. Align on direction before writing code.
  3. One thing per PR. A bug fix and a refactor in the same PR will be asked to be split.

Terminal window
git clone https://github.com/arka-labs/arka-cortex.git
cd arka-cortex
cp .env.example .env
docker compose -f docker-compose.example.yml up -d
npm install
npm test

Requirements: Node >= 20, Docker >= 24, ~4 GB free for the local stack.


CategoryNotes
Bug fixesAlways. Include a regression test.
New ports / adaptersWelcome — must keep domain untouched. Discuss in an issue first.
Performance improvementsWelcome with before/after benchmarks.
DocumentationWelcome. Match the existing tone.
New core featuresDiscuss in an issue first. The engine should remain small.
  • Code that adds a dependency without an issue discussing why.
  • Features that belong in a downstream product rather than the engine.
  • Reformatting / style PRs unrelated to a substantive change.
  • Anything that breaks the public REST / MCP API without a clear migration path documented in the PR.

  • TypeScript strict mode. No any without an explanatory comment.
  • One file = one responsibility. Split when a file starts mixing concerns.
  • Tests next to code in __tests__/ directories. Aim for >= 90% coverage on domain services. Vitest is the runner.
  • Conventional Commits: feat:, fix:, chore:, docs:, refactor:, test:, perf: — optional scope in parentheses.
  • No emojis in code or commit messages.
  • Comments: explain why, not what.

domain/ # No import from adapters/. Pure logic.
ports/ # Interfaces. Both inbound (use-cases) and outbound (boundaries).
adapters/ # May import from domain/. Never the reverse.
config/ # Wires adapters into ports at startup.

A pre-commit hook checks this with a static dependency rule. Run npm run lint:arch locally to verify before pushing.


  1. Fork, create a branch named feat/short-description or fix/....
  2. Write your change. Add or update tests.
  3. Run npm run check (lint + typecheck + tests + arch rule).
  4. Open the PR against main. Fill in the template.
  5. Be patient. Maintainers review within ~1 week.

By submitting a PR you confirm your contribution is offered under the Apache License 2.0.


Do not open public issues for security vulnerabilities. See SECURITY.md for the responsible disclosure process.


Cortex is licensed under Apache 2.0. By contributing, you agree that your contributions will be licensed under the same terms.