Contributing to Alan von Palladium

August 23, 2026 Β· View on GitHub

First off, thank you for considering contributing to Palladium! It's people like you who will make Palladium the language where Turing's proofs meet von Neumann's performance.

Code of Conduct

We believe in:

  • Respectful discourse - Attack ideas, not people
  • Constructive feedback - "This could be better if..." not "This sucks"
  • Inclusive community - All backgrounds welcome, from theorem provers to bit twiddlers

How Can I Contribute?

πŸ› Reporting Bugs

Before creating bug reports, please check existing issues. When creating a bug report, include:

  1. Clear title and description
  2. Steps to reproduce
  3. Expected behavior
  4. Actual behavior
  5. Code samples (minimal reproducible example)
  6. Environment details (OS, Palladium version)

πŸ’‘ Suggesting Enhancements

Enhancement suggestions are tracked as GitHub issues. Include:

  1. Use case - Why is this needed?
  2. Proposed solution - How should it work?
  3. Alternatives considered - What else did you think about?
  4. Examples - Show how it would be used

πŸ”§ Pull Requests

  1. Fork the repo and create your branch from main
  2. Write clear commit messages following conventional commits
  3. Add tests for new functionality
  4. Update documentation as needed
  5. Ensure all tests pass with cargo test
  6. Run the formatter with cargo fmt
  7. Check lints with cargo clippy

Development Setup

# Clone your fork
git clone https://github.com/YOUR_USERNAME/palladium-a.git
cd palladium-a

# Add upstream remote
git remote add upstream https://github.com/labforadvancedstudy/palladium-a.git

# Create a feature branch
git checkout -b feature/amazing-feature

# Make your changes and test
cargo test
cargo run -- compile examples/basic/hello.pd

# Commit your changes
git commit -m "feat: add amazing feature"

# Push to your fork
git push origin feature/amazing-feature

Project Structure

palladium-a/
β”œβ”€β”€ src/           # Compiler source code
β”‚   β”œβ”€β”€ lexer/     # Tokenization
β”‚   β”œβ”€β”€ parser/    # AST generation
β”‚   β”œβ”€β”€ typeck/    # Type checking
β”‚   β”œβ”€β”€ codegen/   # Code generation
β”‚   └── driver/    # Compilation driver
β”œβ”€β”€ examples/      # Example programs
β”œβ”€β”€ tests/         # Integration tests
└── docs/          # Documentation

Testing

  • Unit tests: In relevant source files
  • Integration tests: In tests/ directory
  • Example programs: In examples/ directory

Run all tests:

cargo test

Test specific module:

cargo test parser::

Documentation

  • Code comments: Explain "why", not "what"
  • Doc comments: Use /// for public items
  • Examples: Include in doc comments when helpful
  • README updates: Keep in sync with features

file:line citations β€” when to fix one you did not break

This repository puts its evidence in path:line citations, and make check-doc-evidence pins them. A pin proves a cited range has not MOVED. It cannot prove the range SUPPORTS the claim, so wrong-but-stable citations accumulate: a sweep in 2026-08 found 98 whose own prose quotes a token that is uniquely locatable elsewhere in the same file.

You will therefore meet citations that are already wrong. The standing rule, adopted 2026-08-23 after a relocation pass "fixed" 124 of 238 citations WRONG and had to be reverted whole:

Fix a citation when your change broke it, when a reviewer names it, or when you are already editing the sentence that carries it. Leave every other pre-existing wrong citation alone, and RECORD IT AS DEBT in docs/contributing/citation-and-predicate-debt.md.

Both halves are load-bearing. Fixing beyond that line turns a bug fix into a tree-wide edit nobody can review, and each "fix" is a fresh chance to relocate a citation onto unrelated code. Staying silent about the ones you leave turns known debt into invisible debt, which is how they got there β€” and "silent" includes naming it only in a review thread, which is why the register is a file in the tree.

A mechanical remap is not a fix. Relocating a citation with a line map preserves what it pointed at, faithfully β€” including when what it pointed at was already the wrong code. A remapped citation is DEBT until somebody re-derives it BY CONTENT, and in a diff it is indistinguishable from a re-verified one. That is not hypothetical: one sentence in src/codegen/mod.rs carries two citations, one hand-re-derived and one mechanically shifted, and they look identical.

When you do relocate, the procedure is in scripts/check_doc_evidence.py's docstring, and it is not optional: correct the citation BY CONTENT first, then run --update. Running --update first launders whatever now sits at that line into the pin file, and "0 MOVED" afterwards proves only that the pins agree with the docs. Prefer an exact old→new line map (difflib over the base revision) to a text search — a search silently picks the wrong one of two identical lines, and a map is an identity. Re-derive HAND-WRITTEN citations LAST, from content anchors: a hand fix goes stale the moment a later edit in the same session shifts the file it names.

The durable fix for the class is proposed, with the measurement that kills the naive version, in docs/contributing/proposed-gate-quoted-token-citations.md.

Commit Messages

Follow conventional commits:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation only
  • test: Test additions/changes
  • refactor: Code refactoring
  • style: Formatting changes
  • chore: Maintenance tasks

Examples:

feat: implement for loops with range syntax
fix: correct type inference for struct returns
docs: update examples README with new structure
test: add parser tests for struct returns

Areas Needing Help

🌟 High Priority

  • Type system improvements - Making inference smarter
  • Error messages - Making them more helpful
  • Standard library - Vec, HashMap, iterators
  • Self-hosting - Compiler in Palladium

πŸ“š Documentation

  • Tutorial series - Teaching Palladium step by step
  • Language reference - Formal specification
  • Example programs - Showing off features

πŸ”¬ Research

  • Formal verification - Proof system integration
  • Optimization - Making it even faster
  • Memory models - Alternative GC strategies

Philosophy

When contributing, remember our core principles:

  1. Correctness first - If it's not right, it's not done
  2. Performance matters - Every cycle counts
  3. Developer experience - Make it joy to use

Questions?

  • Discord: Join our community server
  • GitHub Discussions: For longer form conversations
  • Issues: For specific bugs or features

Recognition

Contributors are recognized in:

  • Release notes
  • Contributors file
  • Special thanks in README

License

By contributing, you agree that your contributions will be licensed under the MIT License.


"The best way to predict the future is to implement it" - Alan von Palladium team