Thank you for contributing to protocol-grade infrastructure. This guide defines the standards required for all contributions. Non-conforming PRs will be closed without review.
- Code of Conduct
- Conventional Commits
- Branch Strategy
- Pull Request Workflow
- Code Review Expectations
- Development Setup
- Testing Requirements
- Security-Sensitive Changes
All contributors must adhere to the Contributor Covenant Code of Conduct. Violations result in immediate removal.
Report unacceptable behavior by opening an issue on this repository.
All commit messages must conform to Conventional Commits v1.0.
<type>(<scope>): <short summary>
[optional body — wrap at 72 chars]
[optional footer: BREAKING CHANGE, Closes #N, Refs #N]
| Type | When to use |
|---|---|
feat |
New feature or capability |
fix |
Bug fix |
refactor |
Code restructuring without behavior change |
perf |
Performance improvement |
test |
Adding or correcting tests |
docs |
Documentation only |
chore |
Tooling, deps, CI changes |
security |
Security hardening (non-breaking) |
audit |
Audit trail or ZK-proof updates |
revert |
Reverts a previous commit |
engine-core · engine-bridge · dashboard · governance · zk · ci · deps · docs
engine-core and engine-bridge map to the directories of the same name; governance and zk are logical scopes for changes inside engine-core.
feat(engine-core): add ZK-audit hook interface to core state machine
Implements the hook interface defined in #3. All state transitions
now emit a structured audit event consumable by the ZK proof layer.
Closes #3
security(engine-bridge): enforce Ed25519 signature verification on all receipts
BREAKING CHANGE: receipt schema v1 is no longer accepted; callers
must upgrade to schema v2 before this release.
Commit messages must follow the Conventional Commits format above; they are enforced during code review. Since feature branches are squash-merged onto main using the PR title, keep PR titles in the same format.
main ← protected; requires 2 approvals + passing CI
└─ milestone/M1-engine-core
└─ feat/engine-core-zk-audit-hook ← your branch
└─ milestone/M2-engine-bridge
└─ hotfix/critical-patch-description ← hotfixes only
- Branch from the relevant
milestone/*branch, never directly frommain. - Name branches:
<type>/<short-slug>(e.g.,feat/zk-audit-hook,fix/receipt-nonce-collision). - Delete branches after merge.
- All tests pass locally:
cargo testfrom the repo root, plusnpm testinengine-bridge/anddashboard/ - Linters pass:
npm run lintinengine-bridge/anddashboard/ - New code has tests (unit + integration where applicable)
- Commit history is clean — squash WIP commits
- PR references the issue it closes:
Closes #N
Follow the same Conventional Commits format:
feat(engine-core): implement ZK-audit hook interface
## Summary
<!-- One paragraph: what does this PR do and why? -->
## Changes
<!-- Bullet list of significant changes -->
## Testing
<!-- How was this tested? Include commands. -->
## Security Considerations
<!-- Any auth, crypto, or data-handling implications? -->
## Checklist
- [ ] Tests added / updated
- [ ] Docs updated if behavior changed
- [ ] No secrets committed
- [ ] Breaking changes noted in footer| Size | Lines Changed | Policy |
|---|---|---|
| XS | < 50 | Merge same day |
| S | 50–200 | 1 reviewer |
| M | 200–500 | 2 reviewers |
| L | 500–1000 | 2 reviewers + architecture review |
| XL | > 1000 | Must be pre-approved; break it up |
- Respond to review comments within 48 hours.
- Don't resolve threads you didn't open.
- Mark the PR
Draftif it's not ready; don't open for review prematurely.
Review within 72 hours of assignment. Check:
- Correctness — Does it do what the issue requires?
- Security — New attack surface? Input validation? Auth bypass?
- Protocol integrity — Does this maintain auditability and ZK-readiness?
- Test quality — Are tests asserting behavior or just achieving coverage?
- Commit hygiene — Are commits atomic and correctly scoped?
| Verdict | Meaning |
|---|---|
| ✅ Approve | Ready to merge as-is |
| 💬 Comment | Non-blocking feedback |
| 🔄 Request Changes | Must be addressed before merge |
| 🚫 NACK | Architectural objection — escalate to maintainers |
- Squash merge for feature branches (single clean commit on
main). - Merge commit for
milestone/*intomain(preserves history). - Only maintainers with write access may merge into
main.
The repo has no root package.json; the Cargo workspace at the repo root covers engine-core/ and src/audit-guard/, while engine-bridge/ and dashboard/ are separate npm projects. Node 20 is used in CI.
# 1. Install Rust toolchain (for engine-core contracts)
rustup target add wasm32-unknown-unknown
cargo install stellar-cli --locked
# 2. Run contract tests and the WASM build from the repo root
cargo test
cargo build --target wasm32-unknown-unknown --release
# 3. engine-bridge (TypeScript relayer service)
cd engine-bridge && npm ci && npm test
# 4. dashboard (TypeScript/React frontend)
cd dashboard && npm ci && npm testBuild and lint each npm project exactly as CI does:
cd engine-bridge && npm run build && npm run lint
cd dashboard && npm run build && npm run lint| Layer | Minimum Requirement |
|---|---|
| Engine-core (smart contracts) | Unit tests for every public function; fuzz tests for state transitions |
| Engine-bridge (relayer) | Unit + integration tests; mock Horizon responses |
| Dashboard API | Unit tests + OpenAPI contract tests |
| E2E | Smoke test must pass on testnet before PR merge |
Coverage threshold: 80% line coverage enforced in CI. Security-critical paths require 100%.
Any change touching:
- Cryptographic key handling
- Signature verification
- Access control / authorization
- ZK proof generation or verification
- Treasury or governance logic
Must include:
- A threat model section in the PR description.
- A second reviewer with security background.
- Reference to the relevant SECURITY.md disclosure policy.
For vulnerabilities discovered during development, follow SECURITY.md — do not open a public issue.
Every pull request needs a detailed description. A one-line summary, a restatement of the issue title, or "fixes the issue" is not enough, and a PR that arrives with one will be sent back before review.
Write it for a reviewer who has not read the issue. Cover:
- What was wrong — the problem or gap, and the behaviour before your change.
- What you did — the approach you took, and any alternative you considered and rejected, with the reason.
- What to look at — anything subtle, risky, or that you are unsure about. Flagging your own uncertainty speeds review up; it does not count against you.
- How you verified it — tests you added, commands you ran, manual checks.
Two things this is not: it is not a diff summary — the diff already says which lines changed, and the description should say why. And it is not a place to hide problems. If something is incomplete or a known limitation remains, say so explicitly.
Keep the Closes #<issue-number> reference in the description itself. GitHub
ignores closing keywords written in PR comments, so a link posted as a comment
will not close the issue on merge.