Welcome! This guide will help you get started contributing to Sruja. Whether you're fixing a typo or adding a major feature, your contributions are welcome.
Start here: Getting Started
This step-by-step guide walks you through making your first contribution, even if you're new to the project.
- 🐛 Find Issues: Good First Issues
- 📖 Development Guide: Development Practices
- 🐕 Internal Dogfooding: Dogfooding Playbook
- 📐 Stack: Rust (CLI, language, engine, export, scan/diff/graph/intent, WASM), mdBook (docs), VS Code extension (TypeScript, WASM-powered language features).
- 💬 Get Help:GitHub Discussions
Sruja is a Rust-focused repo containing:
- Language and CLI: Parser, validator, export; CLI via
crates/sruja-cli - Book: mdBook documentation in
book/ - Examples: Canonical book-backed examples in
book/valid-examples/ - VS Code extension: editor integration in
extension/
The VS Code extension integrates directly with the WASM build for parsing/validation/preview (no standalone Rust LSP server crate).
This repository (sruja-ai/sruja) is the main development repository where all contributions should be made.
Do not contribute to these deployment-only repositories:
sruja-ai/staging-website- Staging deployment (auto-updated frommainon push; or manual)sruja-ai/prod-website- Production deployment (manual promote frommain; see Deploy to Production)
These repositories are automatically updated by GitHub Actions workflows and contain only built static files for GitHub Pages hosting. They are read-only for contributors.
All contributions should be made to this repository (sruja-ai/sruja):
- ✅ Open issues here
- ✅ Submit pull requests here
- ✅ Report bugs here
- ✅ Contribute code, docs, and examples here
The deployment repositories will be automatically updated when your changes are merged to main or released.
- Rust (stable)
- Git
Optional:
wasm-opt(optimizes WASM artifacts)wasm-pack(formake wasm/make wasm-nodejs)
# 1. Clone the repository
git clone https://github.com/sruja-ai/sruja.git
cd sruja
# 2. Install dependencies
make install
# 3. Build the CLI
make build
# 4. Verify it works
./target/release/sruja --help# Run tests
make test
# Format code
make fmt
# Lint code
make lint
# Build everything
make build
# Try examples
./target/release/sruja compile book/valid-examples/getting-started.sruja
./target/release/sruja lint book/valid-examples/getting-started.srujaFor more details, see Development Guide.
Sruja includes specialized developer tools located in the dev-tools/ directory. These are dev-only tools not used in production.
Diagram export is handled by the Rust crate sruja-export (Mermaid, etc.). To test changes:
cargo build --release -p sruja-cli
./target/release/sruja export mermaid path/to/file.srujaImportant: Do not use window.__*__ globals in production code. These are for E2E testing only.
Example .sruja models live under book/valid-examples/. After building the CLI:
# Compile an example
./target/release/sruja compile book/valid-examples/getting-started.sruja
# Lint an example
./target/release/sruja lint book/valid-examples/getting-started.sruja
# Export to different formats
./target/release/sruja export json book/valid-examples/getting-started.sruja
./target/release/sruja export markdown book/valid-examples/getting-started.srujaCI compiles and lints selected examples to catch regressions.
Use this workflow to propose changes via pull requests.
- Fork the repo on GitHub
- Create a topic branch from
main, e.g.feature/…,fix/…, ordocs/…
- Build and test locally:
make build,make test - Run formatting and linting:
make fmt,make lint - Add or update tests for new behavior
Follow Conventional Commits:
feat: add XYZ capabilityfix: prevent panic in parserdocs: update contribution workflowrefactor: simplify validatortest: cover edge cases
Optional scope: feat(language): …
- Push your branch and open a PR against
main - Fill out
.github/pull_request_template.md - Ensure CI is green (build, tests, lint)
- Address feedback with follow‑up commits
- Keep the PR focused; split large changes if needed
- Squash or rebase per maintainer guidance
- Post‑merge: clean up your branch if it’s no longer needed
- Create topic branches off
mainusingfeature/…,fix/…, ordocs/… - Keep changes focused; split large PRs when possible
make test,make fmt,make lintrun clean locally- Add/update tests for new behavior
- Update docs/examples if usage changes
- CI passes (build, tests, lint)
- Use the PR template (
.github/pull_request_template.md)
- Small, well‑named functions; cohesive packages
- Avoid breaking public APIs; document changes clearly when necessary
- Maintain meaningful test coverage
- Explicit error handling; avoid panics in library code
- Keep dependencies minimal; pin where appropriate (Cargo.lock for Rust)
- Follow the Design Philosophy when proposing language changes.
- 📝 Documentation: Fix typos, improve clarity, add examples
- 🐛 Testing: Test features and report bugs
- 💡 Examples: Add example architectures to
book/valid-examples/(and the book gallery) - ✍️ Content: Write tutorials, blog posts, or courses
- 🌐 Translation: Translate documentation
- ✅ Tests: Add test cases for existing functionality
- 🐛 Bugs: Fix small bugs
- 📝 Error Messages: Improve error messages and help text
- 📚 Examples: Add more example architectures
- 🎨 CLI: Improve CLI help text and user experience
- 🔧 Features: Implement new features
- 🚀 Export Formats: Add new export formats
- 🔍 Validation: Add validation rules
- 🛠️ Tooling: Improve development tooling
- Browse open issues
- Look for
good first issuelabels - Filter by
help wantedfor areas needing assistance
If there aren't many issues yet, here are common tasks that don't need issues:
- Fix typos in documentation
- Add examples to
book/valid-examples/ - Improve error messages
- Add test cases
- Write tutorials or blog posts
You can start working on these right away! Open a draft PR to show what you're working on.
- 💬 GitHub Discussions: Ask questions and share ideas
- 📝 GitHub Issues: Report bugs or request features
- 💬 PR Comments: Ask for help on your pull request
- Keep PRs small and focused: Easier to review and merge
- Test your changes: Run
make testbefore submitting - Follow conventions: Use Conventional Commits, run
make fmt - Start small: You can always contribute more later!
- Ask questions: We're here to help!
- GitHub Discussions
To add or edit docs, courses, and tutorials (mdBook in book/):
- Book content: Add/edit files in
book/src/ - Examples: Add to
book/valid-examples/ - Validate: Run
make bookto build and verify
When reporting bugs or requesting features:
- Check existing issues: Search to see if it's already reported
- Use clear titles: Describe the issue or feature clearly
- Provide context: Include steps to reproduce, expected vs actual behavior
- Tag appropriately: Use labels like
bug,enhancement,docs - Consider draft PRs: If you have a prototype, open a draft PR
- Be respectful: Treat everyone with kindness and respect
- Be constructive: Provide actionable feedback
- Be patient: Reviews take time, especially for maintainers
- Be collaborative: Work together to improve Sruja
- Architecture: See architecture/README.md for architecture overview and crates/sruja-engine/ARCHITECTURE.md for engine internals
- Design Philosophy: See DESIGN_PHILOSOPHY.md for language design principles
- Language Spec: See LANGUAGE_SPECIFICATION.md for complete DSL reference