Contributing
Open Job Spec is an open-source project that welcomes contributions. This guide explains how to contribute to different parts of the project.
Ways to contribute
Section titled “Ways to contribute”| Area | Repository | How to help |
|---|---|---|
| Specification | spec/ | Propose RFCs, review drafts, improve clarity |
| Backends | ojs-backend-redis/, ojs-backend-postgres/ | Fix bugs, add features, improve performance |
| SDKs | ojs-*-sdk/ | Fix bugs, improve ergonomics, add missing features |
| Conformance | ojs-conformance/ | Add test cases, improve coverage |
| JSON Schemas | ojs-json-schema/ | Update schemas, add validation tests |
| Protobuf | ojs-proto/ | Update service definitions |
| Documentation | website/ | Improve guides, fix typos, add examples |
Getting started
Section titled “Getting started”- Fork the repository on GitHub.
- Clone your fork locally.
- Create a branch for your change.
- Make your changes.
- Run the relevant tests (see below).
- Open a pull request.
Specification changes
Section titled “Specification changes”Changes to the specification follow the RFC Process. In short:
- Open a GitHub issue describing the problem (not the solution).
- Discuss with the community.
- Write an RFC using the template in
spec/rfcs/RFC-0000-template.md. - Open a PR with the RFC.
- Iterate based on feedback.
Specification changes require at least two conforming implementations before acceptance.
Writing style for spec text:
- Use RFC 2119 keywords (MUST, SHOULD, MAY) only when they carry normative meaning, and only in uppercase.
- Include a Rationale annotation for every MUST requirement.
- Reference prior art from existing systems.
- Keep language precise and unambiguous.
Backend contributions
Section titled “Backend contributions”Both backends (Redis and PostgreSQL) are written in Go 1.22+ and share the same internal structure.
Development setup
Section titled “Development setup”# Redis backendcd ojs-backend-redismake docker-up # Start Redis + servermake test # Run testsmake lint # Run go vetmake conformance # Run conformance tests
# PostgreSQL backendcd ojs-backend-postgresmake docker-up # Start PostgreSQL + servermake test # Run testsmake lint # Run go vetCode organization
Section titled “Code organization”Both backends follow the same three-layer pattern:
internal/api/- HTTP handlers (chi router)internal/core/- Business logic interfacesinternal/redis/orinternal/postgres/- Storage implementation
When making changes, consider:
- Does the change need to be reflected in both backends?
- Does it affect conformance? Run
make conformanceto verify. - Is the change covered by tests?
SDK contributions
Section titled “SDK contributions”All SDKs follow the same pattern regardless of language. When contributing to an SDK:
Before you start
Section titled “Before you start”- Read the Core Concepts to understand the OJS model.
- Look at the existing SDK code to understand the pattern for that language.
- Check open issues for the SDK you want to contribute to.
Language-specific guidelines
Section titled “Language-specific guidelines”Go SDK (ojs-go-sdk/)
go test ./... -race -covergo vet ./...JavaScript/TypeScript SDK (ojs-js-sdk/)
pnpm installpnpm run buildpnpm testpnpm run lintPython SDK (ojs-python-sdk/)
pip install -e ".[dev]"pytestmypy src/ruff check .Java SDK (ojs-java-sdk/)
mvn clean packagemvn testRust SDK (ojs-rust-sdk/)
cargo buildcargo testcargo clippyRuby SDK (ojs-ruby-sdk/)
bundle installbundle exec rspecSDK design principles
Section titled “SDK design principles”- Thin clients. SDKs are HTTP wrappers. All intelligence lives in the server.
- Idiomatic code. Follow the conventions of the target language. A Go SDK should feel like Go, a Python SDK should feel like Python.
- Minimal dependencies. Prefer stdlib where possible. The Ruby SDK uses zero external dependencies.
- Full type safety. Where the language supports it, provide strong types for job envelopes, errors, and configuration.
- Test coverage. Unit tests with mocked transport, integration tests against a real server.
Documentation contributions
Section titled “Documentation contributions”The documentation website uses Astro + Starlight and lives in the website/ directory.
Local development
Section titled “Local development”cd websitepnpm installpnpm dev # Start dev serverpnpm build # Production buildpnpm preview # Preview production buildWriting style
Section titled “Writing style”- Conversational but technical. No marketing language.
- Use concrete code examples.
- No em dashes. Use commas, periods, or “and” instead.
- Keep explanations concise. Link to detailed spec pages rather than repeating content.
Conformance test contributions
Section titled “Conformance test contributions”The conformance test suite in ojs-conformance/ contains JSON test definitions and a Go test runner.
Adding a test case
Section titled “Adding a test case”- Identify the conformance level for your test (0-4).
- Add a JSON test definition describing the HTTP request and expected response.
- Run the tests against both official backends to verify.
cd ojs-conformanceOJS_URL=http://localhost:8080 go test ./runner/http/ -vCode of conduct
Section titled “Code of conduct”We expect all contributors to be respectful and constructive. Focus on the technical merits of proposals. Disagree with ideas, not people.
License
Section titled “License”The specification is licensed under Apache 2.0. All code contributions must be compatible with this license.