Thank you for your interest in contributing to Shepherd Model Gateway. This
document is the front door. The detailed guides live under
docs/contributing/ and are served at
https://lightseekorg.github.io/smg/contributing/.
- Code of Conduct:
CODE_OF_CONDUCT.md— applies to every interaction in this repo and in community spaces. - How to contribute code:
docs/contributing/index.md - Development environment:
docs/contributing/development.md - Code style:
docs/contributing/code-style.md - Review guidelines:
REVIEW.md - PR template:
.github/PULL_REQUEST_TEMPLATE.md
# 1. Fork on GitHub, then clone your fork
git clone git@github.com:<your-user>/smg.git
cd smg
# 2. Install toolchain
rustup toolchain install nightly
rustup component add rustfmt --toolchain nightly
rustup component add clippy rustfmt
# 3. Install pre-commit hooks (enforces rustfmt, clippy, DCO, no-AI-attribution, branch naming)
pip install pre-commit
pre-commit install
pre-commit install --hook-type commit-msg
# 4. Create a branch (must match <type>/<desc> or <username>/<desc>)
git checkout -b feat/my-change
# 5. Build and test
cargo build
cargo testFull setup details are in docs/contributing/development.md.
Every PR must pass these five checks locally before requesting review:
| # | Command | Expectation |
|---|---|---|
| 1 | cargo +nightly fmt --all |
No output (silent success) |
| 2 | cargo clippy --all-targets --all-features -- -D warnings |
Zero warnings, zero errors |
| 3 | cargo test |
test result: ok with 0 failures |
| 4 | make python-dev (if config/types.rs, protocols/, or bindings/ changed) |
Successful compilation |
| 5 | Commit format | Conventional commit, DCO sign-off present, no AI attribution |
"Probably passes" is not passing. Paste the output or re-run.
We use Conventional Commits:
<type>(<scope>): <short summary>
<optional body explaining why>
Signed-off-by: Your Name <your.email@example.com>
- Types:
feat,fix,docs,style,refactor,perf,test,chore,ci - Scope: the crate or subsystem (
mesh,grpc_client,worker,protocols, …) - One logical change per commit. Prefer many small commits to one mega-commit.
- Every commit must be DCO-signed. Use
git commit -s. The DCO certifies that you wrote the code or have the right to submit it. - No AI attribution.
Co-Authored-By: Claude/noreply@anthropic.comand similar are rejected by theno-ai-co-authorpre-commit hook.
- Fill in the PR template — especially
the
Test Plansection. "Rancargo test" is not a test plan; name the scenarios the reviewer can reproduce. - Keep PRs small. Aim for ≤400 lines changed. Above that, split or coordinate with reviewers in advance.
- One concern per PR. Refactor or feature — not both.
- Link the issue.
Closes #1234orRefs: #1234. - Respond to review comments with a commit SHA and a one-line reason.
Example:
Fixed in abc1234 — capped total_chunks at 1024 before allocation. Silence or "Fixed!" makes reviewers re-hunt your work.
Agents are welcome and useful. Three ground rules:
- You own the PR, not the agent. Read every line before opening.
- Show the gate output. The agent must paste real
cargo fmt/clippy/testoutput, not "I have run the tests." - No AI attribution in commits, PR bodies, or review replies. The hook will reject it; so will the reviewer.
- Use the severity markers from
REVIEW.md: 🔴 Important, 🟡 Nit, 🟣 Pre-existing. - Cite
file:linein every substantive comment. - Run
/smg:review-prto map changed files to subsystem checklists before you start. - Approve small clean PRs fast; the faster turnaround, the fewer giant PRs reviewers face later.
Please do not open a public issue for security vulnerabilities. Contact the
maintainers privately — see CODEOWNERS for the current
maintainer list, or reach out in the #security channel of the
Lightseek Slack.
- Questions: GitHub Discussions
- Bugs: GitHub Issues
- Chat: Slack · Discord
By contributing to SMG, you agree that your contributions will be licensed under the Apache License 2.0.