Mozaiks is the OSS runtime, platform, Studio, and factory framework repo.
factory_app is the first-party builder/reference app workspace that dogfoods
the same contracts external app workspaces consume.
All participation in this repository is governed by the Code of Conduct.
Follow this path for any human-authored contribution — a bug fix, a docs change, a new test, or a small feature:
-
Fork the repository and clone your fork.
-
Create a branch for your change, e.g.
git checkout -b fix/short-description. -
Install development dependencies:
pip install -e ".[dev]" -
Make a focused change. Keep the diff scoped to one thing and avoid unrelated refactors.
-
Sign off your commits with
git commit -s. This certifies you have the right to contribute the change under the Developer Certificate of Origin - there is no CLA and no rights assignment. CI checks for it, and forgetting is easy to fix after the fact. -
Run the relevant tests for what you changed. Use the narrowest test slice that covers your change (see Running Tests Locally below), or run the full suite with
pytest. -
Open a pull request against
mainusing the pull request template. Describe what changed, why, and what you tested.
Using an AI coding agent (Claude Code, Cursor, Copilot, or similar)? Read the AI Policy first — it is short, it applies to maintainers and their agents too, and it explains what we ask of any contribution regardless of how it was written. Then see Working With an AI Coding Agent below for the repo's optional agent routing system, which is tooling this repo supports rather than a prerequisite for contributing.
Looking for something to work on:
Browse the good first issue label — scoped, self-contained work, written with file and line references so you are not hunting for context.
Most of these need no MongoDB, Node.js, or LLM API key — see What You Can Contribute Without Extra Setup.
Comment on the issue saying you are taking it, and wait for a maintainer to assign it to you. GitHub does not let contributors self-assign, so the assignment has to come from our side; it is usually quick.
This matters more than it looks. Two people have already built the same fix half an hour apart because nothing here said to claim first, and one of them lost the work. That was our fault, not theirs, and this section exists so it does not happen again. An issue with an assignee is taken; an issue without one is free.
If an issue is assigned but has gone quiet for a couple of weeks, comment and ask — people's circumstances change and we would rather hand it on than let it sit.
Many issues here include a suggested fix. That is a starting point written by someone who may have been wrong, not a specification. Read the surrounding code first, and if the suggestion looks wrong, say so on the issue — noticing that is worth more to us than implementing it faithfully.
There is no bounty program; see Bounties.
Running the full Mozaiks Studio stack needs MongoDB, Node.js, and an LLM API key. Most first contributions need none of that:
-
Documentation changes (
docs/,README.md,CONTRIBUTING.md, and other Markdown) only need Python and the docs extra to preview locally:pip install -e ".[docs]" python -m mkdocs serve -
Most Python tests run with no external services.
tests/conftest.pyautomatically skips the tests that need a real app workspace (MOZAIKS_APP_WORKSPACE_PATHorPLATFORM_PATH) — you do not need to set those to add or fix an ordinary test. -
Many
mozaiks_clichanges can be developed and verified through the CLI's own unit tests without MongoDB, Node.js, or a running Studio instance.
You only need Docker/MongoDB, Node.js 18+, and an LLM API key when you are changing or manually verifying behavior that talks to a real database, a real frontend build, or a real LLM call. See Local Setup when you get there.
You do not need to run the entire test suite for every change. Pick the focused test file(s) that cover what you touched:
python -m pytest tests/test_your_file.py -qCoverage gate note: The local pyproject.toml configuration sets a
repository-wide minimum coverage threshold of 30% (--cov-fail-under=30,
measured against mozaiksai). However, CI enforces a stricter 70% gate
(--cov-fail-under=70 in .github/workflows/ci.yml). CI is authoritative —
your pull request must pass the 70% threshold regardless of local results.
Running a narrow test file against the global threshold will often report a coverage failure even when every test you ran passes. That failure reflects the coverage math for the whole package, not a problem with your change.
To run a focused slice without tripping the repository-wide coverage gate, use the verified command:
python -m pytest tests/test_your_file.py -q --no-covCI remains authoritative. --no-cov is a local convenience for fast
iteration on a narrow slice. It does not weaken what is enforced in CI — the
full test suite runs in CI with the 70% coverage gate enforced, and your pull
request must pass CI regardless of what you ran locally.
Before anything below: the AI Policy covers what we ask of AI-assisted contributions — you understand and have tested the change, the description matches the diff, and you can discuss it in review. It applies to maintainer agents on
cc/andcodex/branches on exactly the same terms. It also explains the boundary question agents get wrong most often here: which changes belong in this repository and which belong in the hosted product.
This repo also maintains a skill/rule routing system that AI coding agents (Claude Code, Cursor, Copilot, and similar tools) use to find the right context before nontrivial changes. Human contributors may use it too, but nothing below is required to complete the Quickstart above.
Use this order before nontrivial work:
- Read .claude/skills/README.md to choose the closest task skill.
- Read the matching .claude/rules files for the layer you are changing.
- Use AGENTS.md and CLAUDE.md for repo-wide agent and contributor rules.
If scope spans layers or the right owner is unclear, start with the
oss-contribution-review skill.
- Runtime or platform change: use
runtime-changeplus the runtime and architecture-boundary rules. Useruntime-architecture-reviewwhen you need a review-only scope or boundary pass before or after edits. - Auth change: use
runtime-changeunless the task is purely docs or tests. - Build workflow sequence change: use
factory-build-workflow-changeplus the factory build workflow rules. Usebuild-sequence-changewhen you only need a narrow sequence or journey-composition review. - AppGenerator-specific change: use
appgenerator-change, then inspectfactory_app/workflows/AppGenerator/and the nearest AppGenerator docs/tests. Addfactory-build-workflow-changeas a companion skill only when the change widens intoextension_registry.json, sequence design, transitions, entrypoints, or cross-workflow factory composition. - AgentGenerator-specific change: use
agentgenerator-change, then inspectfactory_app/workflows/AgentGenerator/and the nearest AgentGenerator docs/tests. Addfactory-build-workflow-changeas a companion skill only when the change widens intoextension_registry.json, sequence design, transitions, entrypoints, or cross-workflow factory composition. - ExistingAppDiscovery or brownfield change: use
existing-app-discovery-change, then inspectfactory_app/workflows/ExistingAppDiscovery/and the brownfield docs/tests. Addfactory-build-workflow-changeas a companion skill only when the change widens intoextension_registry.json, sequence design, transitions, entrypoints, or cross-workflow factory composition. - Refinement Engine or refinement harness change: use
control-plane-refinement-changeplus the refinement rule. Addfactory-build-workflow-changetoo whenworkflow_sequencecomposition orextension_registry.jsonrouting changes. - Module contract change: use
add-modulefor module authoring or scaffolding changes. Useruntime-changeif module loader, executor, or runtime behavior changes. Useappgenerator-changeif generated module output changes. - Add a deterministic backend module: use
add-module. - Page or frontend change: use the frontend rule and
add-pagewhen appropriate. - Admin UI change: use
add-pageplus the frontend rule for custom operator/admin React pages. Distinguish AdminPortal schema panels from custom operator React routes. If platform/admin shell behavior changes, useruntime-changetoo. - Persistence change: use
persistence-changeplus the persistence rule. Addruntime-changeifModuleContext.persistenceor runtime persistence behavior changes. Addappgenerator-changeif generated database intent or module persistence output changes. - Docs-only change: use
docs-maintenance. If docs change a specific layer contract, also read that layer's rule. - Test-only change: use the owning surface skill when obvious. Runtime tests go to
runtime-change, AppGenerator tests go toappgenerator-change, and workflow sequence tests go tofactory-build-workflow-change. If the owner is unclear, useoss-contribution-review. - CLI change: use
oss-contribution-reviewfor now. If CLI scaffolding changes module, page, or workflow contracts, also inspect the owning layer rule or skill. - Release/changelog change: use
release-notes. - Managed-capability support change: use
oss-contribution-reviewplus the managed-capabilities rule for now; no dedicatedmanaged-capability-changeskill exists yet. - Unsure: use
oss-contribution-reviewfirst.
- Build is
workflow_sequence-driven throughfactory_app/workflows/extended_orchestration/extension_registry.json. AppGeneratoris one workflow inside that build system, not the whole build.ValueEngine,ThemeCapture,DesignDocs,AgentGenerator, andAppGeneratorhave separate responsibilities inside those sequences.ExistingAppDiscoverybelongs to the brownfield flow.- Refinement today is checkpoint-driven re-entry through
app/config/refinement_policy.yamlruntime policy and the selectedrefinement_harness/config/harness.yamlpack, with normal chat/workflow startup still inapp/config/ai.json; it is not a dedicatedRefinementWorkflow. workflow_sequenceis not a human-in-the-loop handoff. Keep sequences, transitions, entrypoints, and workflow-localtransition_graph.yamlseparate.
Every nontrivial change should include Tests run plus the relevant sections
from .claude/rules/testing.md:
OSS Change ImpactBuild Workflow Sequence Impactwhen sequence, transition, or entry routing changedControl-Plane / Refinement Impactwhen checkpoint routing or refinement behavior changedModule Contract Impactwhen module contracts or module loader expectations changedManaged Capability Boundary Checkwhen managed-capability, facade, or adapter boundaries changed
Prefer the narrowest test slice that matches the layer you changed.
- Docs and guidance changes should use focused hygiene tests.
- Do not default to broad unrelated test runs when a narrower slice can falsify the change.
- Update docs and tests together when contributor guidance changes.
Focused guidance validation:
python -m pytest tests/test_contributor_guidance_framing.py tests/test_module_reactions_docs_contract.py tests/test_admin_ui_two_tier_contract.py tests/test_claude_guidance_operating_system.py tests/test_contributor_quickstart.py tests/test_runtime_change_skill.py tests/test_factory_build_workflow_skill.py tests/test_control_plane_refinement_skill.py tests/test_existing_app_discovery_skill.py tests/test_appgenerator_change_skill.py tests/test_agentgenerator_change_skill.py tests/test_contributor_skill_routing_map.py -q- Do not copy private hosted product logic into the OSS repo.
- Use provider-neutral examples in public contributor guidance.
- Do not treat
AppGeneratoras the whole build system. - Do not treat
workflow_sequenceas HITL handoff routing. - Do not reintroduce
backend/models.pyas canonical persistence structure. - Do not author
contracts/subscriptions.yaml; usecontracts/reactions.yaml. - Do not route contributors toward
app/capability_packs,transport.py, or direct provider internals as current canonical extension points.
Opening a pull request uses the repository's pull request template, which asks for the related issue (if any), a summary, the tests you ran, screenshots for UI changes, and confirmation that no private hosted-product logic was introduced. In addition:
- Explain scope and motivation.
- Call out public API changes in
mozaiksai/. - Update architecture or contributor docs when behavior, paths, or contributor workflow changed.
- Add or update focused tests for the touched surface.
- Keep commits focused.
- Avoid unrelated refactors in the same PR.
- Do not include generated noise unless required.
Mozaiks has no CLA. You keep the copyright to your work and assign us nothing. Instead, every commit carries a one-line certification that you have the right to contribute it, which is what the Developer Certificate of Origin says.
git commit -s adds it for you:
Signed-off-by: Your Name <your.email@example.com>
Set git config user.name and git config user.email first, since the line is
generated from them.
Forgot? Nothing is lost:
# most recent commit
git commit --amend -s --no-edit && git push --force-with-lease
# every commit on your branch
git rebase --signoff origin/main && git push --force-with-leaseThe DCO check on your pull request prints the exact command for your branch
when it fails.
- Discord — questions, design discussion, and a good place to ask before writing code if you are unsure whether an approach fits.
- Docs — architecture, contracts, and guides.
- The issue itself — if an issue is unclear or its suggested approach looks wrong, say so there. That is useful feedback, not an interruption.
Mozaiks does not run a bounty program. Issues here carry no payment, including
those labeled good first issue, and we cannot act on requests for payment
attached to a pull request.
Contributions are voluntary. We think that is worth stating plainly rather than leaving people to guess, since some ecosystems do attach bounties to issues and the absence of a policy reads as ambiguity rather than as an answer.
Do not commit secrets, production tokens, or private keys. To report a security vulnerability, see SECURITY.md instead of opening a public issue.