Thank you for contributing to RelayLink. Please read the project overview and collaboration policies below before opening a pull request so code, documentation, and verification claims stay accurate and aligned.
1. Before You Start
- Read README.md (or README.zh-CN.md) and the Documentation Index to understand current capabilities and explicit boundaries.
- Review the relevant requirements, technical designs, and Architecture Decision Records (ADRs) for your change area.
- Follow the Repository Layout (
DEV-001) and Documentation Policy (DEV-002).
2. Branching & Commit Conventions
- Use short-lived topic branches such as
feat/tcp-relay,fix/session-cleanup, ordocs/protocol, keepingmainclean and reviewable. - Prefer conventional commit prefixes (
feat:,fix:,docs:,test:,chore:) that summarize the concrete change. - Keep each commit or PR focused on one cohesive problem; link or add an ADR when a change introduces or alters architectural trade-offs.
3. Local Build & Verification Commands
Run the full local checks matching your changes before submitting. On PowerShell, you can run pwsh ./scripts/test.ps1 (see scripts/test.ps1), or run each suite explicitly per the CI Pipeline (ci.yml):
.NET 10 Server, Agent & SDK
dotnet restore RelayLink.slnx --configfile NuGet.Config
dotnet build src/RelayLink.Sdk/RelayLink.Sdk.csproj --configuration Release --no-restore
dotnet test tests/RelayLink.UnitTests/RelayLink.UnitTests.csproj --configuration Release --no-restore -p:SkipAdminWebBuild=true
dotnet test tests/RelayLink.IntegrationTests/RelayLink.IntegrationTests.csproj --configuration Release --no-restore -p:EnablePeerTlsTests=true -p:SkipAdminWebBuild=true
Frontends (AdminWeb & AgentWeb)
pnpm --dir src/RelayLink.AdminWeb install --frozen-lockfile
pnpm --dir src/RelayLink.AdminWeb typecheck
pnpm --dir src/RelayLink.AdminWeb test
pnpm --dir src/RelayLink.AdminWeb build
pnpm --dir src/RelayLink.AdminWeb format:check
pnpm --dir src/RelayLink.AgentWeb install --frozen-lockfile
pnpm --dir src/RelayLink.AgentWeb build
pnpm --dir src/RelayLink.AgentWeb test
pnpm --dir src/RelayLink.AgentWeb format:check
Product Website, Skill & Multi-Language SDKs
npm --prefix website ci
node scripts/build-website.mjs
npm --prefix website test
node --check skills/relaylink-admin/scripts/relaylink.mjs
npm --prefix sdk/typescript ci
npm --prefix sdk/typescript test
python3 -m unittest discover -s sdk/python/tests -v
(cd sdk/go && go vet ./... && go test -v ./...)
cargo test --manifest-path sdk/rust/Cargo.toml
For the Java SDK conformance suite, compile and run sdk/java/src/main/java/com/relaylink/sdk/*.java together with sdk/java/src/test/java/com/relaylink/sdk/ConformanceRunner.java. Finish with a whitespace and trailing-line check:
git diff --check
4. Documentation, Encoding & Sync Policy
- Encoding & line endings: Use UTF-8 (no BOM) and LF line endings for all Markdown and source files; use stable lowercase kebab-case English filenames.
- Chinese canonical docs & English website docs: Canonical repository docs in
docs/are maintained in simplified Chinese. Native English website translations underwebsite/en/must contain zero CJK characters and must use relative links rooted at their corresponding canonical Chinese source directory. - Keep docs, examples, and tests in sync: Changes to behavior, wire protocol, config schemas, defaults, timeouts, metrics, or deployment workflows must update relevant docs, sanitized examples in config/examples, and tests in the same commit or PR.
- Accurate status claims: Never describe
DraftorProposeddesigns or planned features as supported, and never report unexecuted tests or unverified target environments as passed.
5. Security & Sanitization Rules
- Never commit real secrets, private keys, certificates, database passwords, client credentials, production configs, real deployment IPs or cloud instance IDs, or real business/SQL payloads in code, docs, example configs, test fixtures, or screenshots.
- Store temporary local test configurations, generated credentials, and runtime state inside the gitignored
.local/directory.
6. Pull Request Expectations
- Clearly describe the problem, final behavior, exact verification commands and coverage executed, and any remaining limitations or uncovered target environments.
- Link relevant requirements, technical designs, and ADRs whenever architectural decisions, module boundaries, cross-version compatibility, or security invariants are affected.
- References: Repository Layout, Documentation Policy, CI Pipeline.