Skip to content

How to Contribute

This guide covers the development workflow, coding conventions, and pull request process for contributing to Axiom.

For a quick overview of ways to get involved, see the Getting Started > How to Contribute page.


Development Setup

  1. Fork the repository on GitHub
  2. Clone your fork:
    git clone https://github.com/your-username/apitomy-axiom.git
    cd apitomy-axiom
    
  3. Start development mode:
    ./dev.sh
    
  4. Open http://localhost:9191 and verify the UI loads

See the Building Axiom guide for prerequisites and build details.


Code Organization

When making changes, use this guide to find the right module:

Change Module
REST API endpoint common/api (OpenAPI spec) + app/rest/ (implementation)
Domain entity or SDK function definitions core/
Claude Code agent agents/claude-code/
OpenCode agent agents/opencode/
GitHub Copilot CLI agent agents/copilot/
GitHub polling events/github/
Jira polling events/jira/
Event stream routing, workflow, and pipeline orchestration app/ (EventStreamOrchestrator, TaskExecutionService, WorkflowExecutionService, etc.)
Workflow Workbench (compositions, AI turns, test runs, publishing) app/src/main/java/io/apitomy/axiom/app/composition/ + CompositionsResourceImpl
AI Assistant sessions and engine drivers app/src/main/java/io/apitomy/axiom/app/assistant/
Built-in MCP servers and assistant templates app/src/main/resources/templates/
UI page or component ui/src/pages/ (workbench: ui/src/pages/workbench/) or ui/src/components/
API client functions ui/src/config/api.ts (workbench: ui/src/config/compositions.ts)
Database schema app/src/main/resources/db/migration/ (V1__baseline.sql is frozen; add V<n>__… migrations)

Coding Conventions

Java (Backend)

  • Follow existing Quarkus patterns: @ApplicationScoped, @Inject, @ConfigProperty, @Scheduled
  • Use Panache active record for entities (no separate DAO/repository layer)
  • Use builders for configuration objects (AgentRequest.Builder, etc.)
  • Async work returns CompletableFuture
  • Keep transactional boundaries small — one @Transactional method per database operation

TypeScript (Frontend)

  • Use PatternFly components — don't introduce other UI libraries
  • API calls go in ui/src/config/api.ts
  • Pages go in ui/src/pages/, reusable components in ui/src/components/
  • Run npm run build (tsc -b && vite build) to catch type errors before committing

Commit Message Format

Use conventional commits:

Prefix Usage
feat: New feature
fix: Bug fix
docs: Documentation only
refactor: Code restructuring without behavior change
test: Adding or updating tests
chore: Dependencies, tooling, CI

Examples:

feat: add Jira event source polling
fix: resolve timeout in Claude Code subprocess
docs: add extending-axiom developer guide

Pull Request Workflow

  1. Create a branch from main:
    git checkout -b feature/my-feature
    
  2. Make your changes following the conventions above
  3. Test locally:
  4. mvn test — run backend unit tests (or one test: mvn -q -pl app -am test -Dtest=MyTest -Dsurefire.failIfNoSpecifiedTests=false)
  5. cd ui && npm run build — type-check the frontend
  6. cd ui && npm test — run the UI unit tests
  7. ./dev.sh — verify the change works end-to-end
  8. Commit with a conventional commit message
  9. Push and open a pull request against main
  10. Describe what the PR does and why, and reference related issues (e.g. "Fixes #42")

PR Guidelines

  • Keep PRs focused on a single feature or fix
  • Update documentation if the change affects user-facing behavior
  • Ensure CI checks pass
  • Be responsive to review feedback

All submissions require code review before merging.


Testing

Unit Tests

Standard JUnit 5 tests — run with mvn test from the project root. To run one test class in a module and build the modules it depends on:

mvn -q -pl app -am test -Dtest=MyTest -Dsurefire.failIfNoSpecifiedTests=false

UI Tests

UI unit and component tests use Vitest — run them with cd ui && npm test. They also run as part of ./build.sh -Pui.

Integration Tests

Some tests start a real AI agent CLI (opencode or claude) and may consume tokens. They are tagged live-cli and excluded by default. Enable them with the live-cli-tests profile:

mvn test -Plive-cli-tests

This requires the agent CLI on your PATH and valid credentials for it.


Documentation

The documentation site uses MkDocs with the Material for MkDocs theme.

Local Preview

./serve-docs.sh

This starts a local server at http://localhost:8000 with live reload.

Adding a Page

  1. Create a Markdown file in the appropriate docs/ subdirectory
  2. Add a nav entry in mkdocs.yml
  3. Verify the build: python3 -m mkdocs build --strict

Install the tools with pip install mkdocs mkdocs-material.