Contributing¶
Thanks for improving MCP Zen of Languages. Whether you're fixing a bug, adding a detector, or bringing support for a new language — this section gives you the context to contribute effectively.
Local development workflow¶
Setup¶
Run Checks¶
uv run pytest -xvs
uv run ty check
uv run ruff check
uv run zensical build -f mkdocs.yml
uv run python scripts/check_docs_contrast.py --build --mode check
Pre-commit¶
Notes¶
- Use Python 3.12+ typing (
str | None,list[str]). - Pydantic v2 only (use
ConfigDict, avoidclass Config). - Rule metrics must match detector config field names.
- Language modules must include
__init__.py,analyzer.py,detectors.py, andrules.py. - Follow the rendering conventions in
docs/contributing/rendering-style-guide.mdfor all terminal UX changes.
-
Development
Local setup, quality gates, test commands, and CI expectations.
-
Add a Language
Define zen principles, create an analyzer, wire detectors — step by step.
-
Add a Detector
Implement a violation detector with the Strategy pattern and register it.
-
Architecture
How Template Method, Strategy, Pipeline, and Factory patterns connect.
-
Content Quality Guide
Hybrid docs-from-code ownership, editorial standards, and release checks.
-
Rendering Guide
Rich/Typer output conventions and terminal UX patterns.
-
Zensical Migration
Updated docs engine/build workflow and theme migration notes.
Before opening a PR¶
Quality gates
Run these locally before pushing:
Include a regression test and note the root cause in your PR description.
Add documentation, usage examples, and update the rule/detector mapping if applicable.
Follow the Adding a Detector guide. Include at least one positive and one negative test case.
Keep PRs focused
Scope each PR to one detector or one language. Reviewers can validate behavior and docs together when changes are contained.
See Also¶
- Zensical Migration — Theme migration and docs build workflow updates.
- User Guide — End-user documentation surfaces impacted by contributor changes.
- API Reference — Generated API docs from docstrings.