Files
shimmy/docs/METHODOLOGY.md
Michael A. Kuykendall 65298f767e feat(mlx): implement native Apple Silicon MLX support with pre-commit quality gates
- Add comprehensive MLX engine implementation with Python MLX bindings
- Implement MLX model discovery, loading, and native inference pipeline
- Add MLX feature flag compilation and Apple Silicon hardware detection
- Create dedicated GitHub Actions workflow for MLX testing on macos-14 ARM64
- Add MLX documentation to README and wiki with capability descriptions
- Implement pre-commit hooks enforcing cargo fmt, clippy, and test validation
- Fix GPU backend tests to properly force specific backends instead of auto-detection
- Resolve property test race conditions with serial test execution
- Update release workflow validation and platform-specific test expectations
- Add MLX implementation plan and cross-compilation toolchain support

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 20:11:32 -05:00

2.4 KiB
Raw Permalink Blame History

Engineering Methodology

Shimmy was built spec-first, test-driven, and AIassisted. This document records the exact loop, the quality gates, and where to find proofs.


Development Loop

  1. Define a contract/spec Example: “Implement /v1/chat/completions with streaming (ServerSent Events) and match the response schema.”

  2. Generate a candidate implementation AI tools scaffold code; every line is reviewed before commit. Nontrivial changes are tied to a spec (issue or PR description) and include tests.

  3. Validate with properties & invariants

    • Propertybased tests: see docs/ppt-invariant-testing.md.
    • Runtime invariants: assertions on protocol, state, and memory safety expectations.
    • Tests live under /tests and run in CI on Linux/macOS/Windows.
  4. CI Gates Every PR runs:

    • DCO signoff
    • Build matrix (Linux/macOS/Windows)
    • Unit + property tests
    • Static checks / duplicate issue detection
    • Release workflow dryrun (where applicable)
  5. Iterate until green Code merges only when all gates pass. Releases are signed/tagged and changelogged.


Quality Practices

  • Property Testing: Exercise edge cases beyond examplebased tests.
  • Runtime Invariants: Fail fast when correctness assumptions are violated.
  • Benchmarks: Reproducible scripts and environment in docs/BENCHMARKS.md.
  • OpenAI Compat: Supported endpoints/fields in docs/OPENAI_COMPAT.md.
  • Security Defaults:
    • Binds to 127.0.0.1 by default.
    • External model files are trustonfirstuse; optional SHA256 verification and allowlist paths are available/planned.
    • Prefer running with least privilege; avoid exposing ports publicly without auth.

Philosophy

  • Spec first, code second — logic/contracts drive implementation.
  • Tests > syntax — correctness is proven with properties/invariants.
  • AI is a tool; process is the product — the methodology scales teams.
  • Foreverfree core — MIT license; contributions via Issues/PRs are welcome.