We have ZERO tolerance for defects. Your "clippy warnings won't..." is a P0 problem.
ALL commits are blocked until quality gates pass:
- Pre-commit hook automatically runs Toyota Way quality checks
- Format checking:
cargo fmt --all -- --check - Clippy analysis: Zero warnings allowed
- Build verification: Must compile successfully
- Doctest validation: All doctests must pass
To commit code:
make quality-gate # Run before any commit
git add -A
git commit -m "message" # Will be blocked if quality failsMANDATORY: Use pmat quality-gate proxy via MCP during development
All code changes MUST go through pmat quality-gate proxy before writing:
# Start pmat MCP server with quality-gate proxy
pmat mcp-server --enable-quality-proxy
# In Claude Code, use quality_proxy MCP tool for all file operations:
# - write operations
# - edit operations
# - append operationsQuality Proxy Enforcement Modes:
- Strict Mode (default): Reject code that doesn't meet quality standards
- Advisory Mode: Warn about quality issues but allow changes
- Auto-Fix Mode: Automatically refactor code to meet standards
Quality Checks Applied:
- Cognitive complexity limits (≤25 per function)
- Zero SATD (Self-Admitted Technical Debt) comments
- Comprehensive documentation requirements
- Lint violation prevention
- Automatic refactoring suggestions
MANDATORY: Use PDMT (Pragmatic Deterministic MCP Templating) for all todos
Use the pdmt_deterministic_todos MCP tool for creating quality-enforced todo lists:
# Generate PDMT todos with quality enforcement
pdmt_deterministic_todos --requirement "implement feature X" --mode strict --coverage-target 80PDMT Todo Features:
- Quality Gates Built-in: Each todo includes validation commands
- Success Criteria: Clear, measurable completion requirements
- Test Coverage: Enforce 80%+ coverage targets
- Zero SATD: No technical debt tolerance
- Complexity Limits: Automatic complexity validation
- Documentation: Comprehensive docs required
## Todo: [ID] Implementation Task
**Quality Gate**: `cargo test --coverage && cargo clippy`
**Success Criteria**:
- [ ] Feature implemented with 80%+ test coverage
- [ ] Zero clippy warnings
- [ ] Comprehensive documentation with examples
- [ ] Property tests included
- [ ] Integration tests passing
**Validation Command**: `make quality-gate && make test-coverage`
- Use
pdmt_deterministic_todosfor task breakdown - Set quality targets: 80%+ coverage, zero SATD, complexity ≤25
- ALL code changes via pmat quality-gate proxy
- Use MCP
quality_proxytool for file operations - Continuous quality validation during development
- Pre-commit hook enforces Toyota Way quality gates
- Cannot commit without passing all quality checks
- Zero tolerance: formatting, clippy, build, tests
- Tests run with
--test-threads=1(race condition prevention) - Full quality gate validation
- Documentation coverage verification
Every new feature MUST include ALL of the following - NO EXCEPTIONS:
# Property-based fuzzing for robustness
cargo fuzz run fuzz_target_name
# OR using proptest for property-based testing
cargo test proptest# Invariant verification with quickcheck/proptest
cargo test property_tests
# Comprehensive property-based testing coverage# Comprehensive unit test coverage (80%+ required)
cargo test unit_tests
# All functions must have unit tests# Working example that demonstrates the feature
cargo run --example feature_name
# Must include real-world usage scenario- Integration Tests: Full client-server integration scenarios
- Doctests: All public APIs with working examples
- Performance Tests: Benchmarks for performance-critical features
- Security Tests: Security validation for auth/transport features
For EVERY new feature, follow this exact sequence:
# Generate deterministic todos with quality gates
pdmt_deterministic_todos --requirement "implement feature X" --mode strict --coverage-target 80- Write Property Tests FIRST - Define the invariants
- Write Unit Tests - Cover all edge cases
- Implement Feature - Meet the test requirements
- Add Fuzz Testing - Verify robustness
- Create Example - Demonstrate real usage
# MANDATORY validation before any commit
make quality-gate # All quality checks
make test-fuzz # Fuzz testing
make test-property # Property tests
make test-unit # Unit tests
make test-examples # Example verification
make test-integration # Integration tests- API Documentation: Comprehensive rustdoc with examples
- Usage Examples: Real-world scenarios in examples/
- Integration Guide: How to use with existing systems
- Property Documentation: What invariants are maintained
✅ Zero tolerance for defects
✅ Pre-commit quality gates enforced
✅ PMAT quality-gate proxy mandatory during development
✅ PDMT style todos with built-in quality gates
✅ Toyota Way principles: Jidoka, Genchi Genbutsu, Kaizen
✅ 80%+ test coverage with quality doctests
✅ Cognitive complexity ≤25 per function
✅ Zero SATD comments allowed
✅ Comprehensive documentation required
✅ ALWAYS requirements: fuzz, property, unit, cargo run --example
pmcp-widget-utils(leaf, no internal deps)pmcp(core SDK, depends on widget-utils)mcp-tester(depends on pmcp)mcp-preview(depends on widget-utils)cargo-pmcp(depends on pmcp, mcp-tester, mcp-preview)
Before starting a release, verify:
- Update local Rust toolchain — CI uses
dtolnay/rust-toolchain@stable(latest stable). Local/CI version mismatch is the #1 cause of CI failures (new clippy lints each release).rustup update stable rustc --version # Must match or exceed CI's version - Check crates.io versions — know what's already published vs what needs bumping:
cargo search pmcp --limit 5 cargo search mcp-tester --limit 1 cargo search mcp-preview --limit 1
- Identify changed crates — compare against the last release tag:
git diff --stat vLAST..HEAD -- src/ crates/ cargo-pmcp/
- Only bump crates that have changed since their last publish
- Downstream crates that pin a bumped dependency must also be bumped
(e.g., if
pmcpbumps, update thepmcp = { version = "..." }line inmcp-tester/Cargo.tomlandcargo-pmcp/Cargo.toml, and bump their versions) - Semver: new features = minor bump, breaking changes = major bump, fixes = patch
# 1. Update toolchain first
rustup update stable
# 2. Create a release branch
git checkout -b release/pmcp-vX.Y.Z
# 3. Bump version(s) in Cargo.toml files
# - Root Cargo.toml (pmcp version)
# - crates/mcp-tester/Cargo.toml (version + pmcp dep version)
# - crates/mcp-preview/Cargo.toml (version)
# - cargo-pmcp/Cargo.toml (version + pmcp, mcp-tester, mcp-preview dep versions)
# 4. Run the SAME quality gate CI uses — this is the critical step
# Do NOT run individual cargo commands; `make quality-gate` matches CI exactly
# (fmt --all, clippy with pedantic+nursery lints, build, test, audit, etc.)
make quality-gate
# 5. Commit, push, create PR to upstream
git add <changed Cargo.toml files>
git commit -m "chore: bump pmcp vX.Y.Z"
git push -u origin release/pmcp-vX.Y.Z
gh pr create --repo paiml/rust-mcp-sdk --head <your-fork>:release/pmcp-vX.Y.Z --base main
# 6. After PR merges and CI is green, tag and push
git checkout main && git pull upstream main
git tag -a vX.Y.Z -m "pmcp vX.Y.Z - <summary>"
git push upstream vX.Y.ZCI runs make quality-gate which invokes make lint with --features "full",
pedantic + nursery clippy lint groups, and workspace-wide cargo fmt --all.
Running bare cargo clippy -- -D warnings locally is weaker than CI and will
miss lints. Always use make quality-gate to match CI exactly.
Pushing a v* tag to upstream triggers .github/workflows/release.yml:
- Create Release — GitHub Release from CHANGELOG.md
- Publish to crates.io — publishes in dependency order with 30s waits between
- Publish to MCP Registry — OIDC-authenticated
mcp-publisher - Release Tester Binary — cross-platform mcp-tester binaries attached to release
- Tags use
vprefix:v1.17.0,v0.4.1 - One tag per release — the Release workflow publishes ALL crates that have new versions
- If a crate version already exists on crates.io, the publish step skips it gracefully
# Only for critical hotfixes - requires justification
git commit --no-verify -m "HOTFIX: critical issue - bypassing quality gates"Note: Emergency overrides require immediate follow-up commits to restore quality standards.
- Before pushing a new commit or a PR you need to run
make quality-gate.