Mazin Engineering Standard (MES) & Workbench v3.6
النسخة العربية (Arabic README) · Contributing · Changelog · License (MIT)
A zero-dependency, fully bilingual (English & Arabic) Spec-Driven Engineering Standard and CLI Workbench built for individual developers, software teams, and AI coding agents (Antigravity, Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI, plus a built-in multi-provider autonomous agent).
MES unifies:
- Full English & Arabic Editions: Complete standard modules (
standard/, 18 files including15-MENA-COMPLIANCE.mdandtesting-matrix.json), 7 playbooks, 38 Markdown/JSON templates (coveringG0,G3b,G4-UX,G4-UI,G5b,G5c,G8b, adaptivetest-plan.json,test-results.json,TEST_RESULTS.md,Given/When/Then+ EARS criteria, brownfieldDELTA_SPEC.md, andMENA_COMPLIANCE_CHECKLIST.md), 9 checklists, 5 openskills/(SKILL.mdwith anti-rationalization tables), and bilingual validator messages (--lang enemits English diagnostics). - Enforceable Gates, Receipts & Fail-to-Pass Bugfix (
none→G0..G10): State-machine gate progression (G0, G1..G3, G3b, G4, G4-UX, G4-UI, G5, G5b, G5c, G6..G8, G8b, G9, G10) with automatedstdlibchecks (WCAG contrast math,SUS >= 68,OpenAPI 3.x,STRUCTURE_MAP.md& public docstrings), SHA-256 hash-chained receipts verifiable offline (mes verify), fail-to-pass defect verification (mes bug assess/verify), EARS specs & archiving (mes spec new --ears/archive), and spec-to-code drift detection (mes analyze). - Enterprise & Solo Tooling: Multi-stack detection (
detect), lockfile-aware dependency planning (prepare), hybrid + ecosystem--deepaudit (ruff,bandit,npm audit), SARIF v2.1.0 export for GitHub Code Scanning (--sarif), multi-repo portfolio dashboard (mes portfolio), quality ratchet (score --ratchet), pre-commit secret-guard hooks (install-hooks), and progressive context summaries (context --compact). - Isolated Multi-Provider Agent (
mes agent run): Stdlib-only tool-calling loop for Gemini, DeepSeek, OpenAI, Anthropic, and OpenAI-compatible local endpoints with optional--worktreegit isolation,edit_project_file,search_project_files, read-onlygit_status_diff,stdioMCP servers (--mcp-config), atomic.bakbackups, JSON run audit logs, and opt-in allowlisted checks.
Installation
Option 1: One-Line Remote Install from GitHub (pipx / PowerShell / Bash)
# CLI only via pipx (Python 3.10+, zero third-party runtime dependencies)
pipx install "git+https://github.com/mazin103/mazin-mes.git"
# Windows (PowerShell one-liner: downloads, extracts to ~\.local\share\mes-src, installs CLI + Antigravity plugin)
$d="$env:USERPROFILE\.local\share\mes-src"; $z="$env:TEMP\mes.zip"; Invoke-WebRequest "https://github.com/mazin103/mazin-mes/archive/refs/heads/main.zip" -OutFile $z; Remove-Item $d -Recurse -Force -EA 0; Expand-Archive $z "$env:TEMP\mes_x" -Force; Move-Item (Get-ChildItem "$env:TEMP\mes_x" | Select-Object -First 1).FullName $d; & "$d\install.ps1"
# macOS / Linux (one-liner: downloads, extracts to ~/.local/share/mes-src, installs CLI + Antigravity plugin)
mkdir -p "$HOME/.local/share" && curl -fsSL "https://github.com/mazin103/mazin-mes/archive/refs/heads/main.tar.gz" | tar -xz -C "$HOME/.local/share" && mv "$HOME/.local/share/"*-main "$HOME/.local/share/mes-src" 2>/dev/null || true && bash "$HOME/.local/share/mes-src/install.sh"
Option 2: Double-Click / Local Bundle Install (Windows / macOS / Linux)
- Windows (Double-Click One-Click): Extract the ZIP and double-click
install.bat(or run.\install.ps1in PowerShell). - macOS / Linux:
bash install.sh - Local Python (
pipx/pip):pipx install .orpip install -e .(exposesmes,mazin-mes,mes-init,mes-validate).
Option 3: Run directly from a clone
python scripts/mes.py --help
30-Second Quick Start
# 1. Auto-initialize MES with full English edition (--lang en) and sync agent adapters
mes init ./my-app --name "My App" --profile standard --lang en --auto
# 2. Check environment, detect stack, and preview dependency plan
mes doctor ./my-app
mes detect ./my-app
mes prepare ./my-app # dry-run only; add --install to execute
# 3. Create a tracked specification or brownfield Delta Spec (auto-assigns FR-###)
mes spec new ./my-app "User Authentication" --delta
# 4. Install pre-commit secret & validation hook, inspect context & gates
mes install-hooks ./my-app
mes context ./my-app --compact --stdout
mes gate status ./my-app
mes validate --root ./my-app --strict
# 5. Deep audit + SARIF 2.1.0 + baseline ratchet + dashboard + release check
mes audit ./my-app --deep --sarif
mes score ./my-app --save-baseline
mes report ./my-app
mes dashboard ./my-app
mes release-check ./my-app
# 6. Aggregate multiple repositories for engineering leadership
mes portfolio ./services --discover
Command Reference
| Command | Purpose |
|---|---|
mes init <dir> [--name ...] [--profile lite|standard|critical] [--mode ...] [--lang en|ar] [--auto] |
Non-destructively scaffold English or Arabic MES standard, adapters, and context |
mes doctor [dir] |
Check Python, Git, linters/scanners, agent CLIs, API env keys, and project sync |
mes sync-agents <dir> [--force] [--skills] |
Sync AGENTS.md, CLAUDE.md, .cursor/rules/mes.mdc, .github/copilot-instructions.md, GEMINI.md, and optionally .agents/skills/ |
mes install-hooks <dir> |
Install non-destructive .git/hooks/pre-commit for secret & MES validation |
mes spec new <dir> "<title>" [--delta] [--ears] [--priority Must|Should|Could] |
Create tracked spec or brownfield Delta Spec (with optional EARS criteria) and update SRS.md + TRACEABILITY_MATRIX.md |
mes spec archive <dir> <spec_or_id> |
Archive completed spec into docs/specs/archive/ and merge summary into docs/SPEC_ARCHIVE.md |
mes context <dir> [--stdout] [--compact] |
Build token-efficient .mes-artifacts/context-summary.md |
mes gate status <dir> |
Show G0–G10 (incl. G3b, G4-UX, G4-UI, G5b, G5c, G8b) completion and missing evidence per profile |
mes gate advance <dir> <G0..G10> [--outcome VERIFIED|PARTIAL|ACCEPTED-RISK] [--reason "..."] [--sign-key KEY] |
Enforce evidence & strict validation, update gate, and emit SHA-256 chain receipt (with optional SSH Ed25519 signature) |
mes test-run <dir> [--cmd "..."] |
Execute declared test command via stdlib subprocess and persist JSON exit status in .mes-artifacts/test-run.json |
mes verify <dir> [target] [--allowed-signers FILE] |
Verify offline SHA-256 hash chain, post-signoff drift, and SSH signatures on gate/bugfix receipts |
mes bug assess <dir> --title "..." [--test-cmd "..."] [--severity S1..S4] |
Prove defect reproduction fails BEFORE editing code (fail-to-pass workflow) |
mes bug verify <dir> <BUG-###> [--test-cmd "..."] [--sign-key KEY] |
Re-run reproduction test after fix and emit VERIFIED bugfix receipt |
mes analyze <dir> |
Detect spec-to-traceability, receipt, and mes.config.yml-vs-code drift (AI/PII) |
mes validate [--root <dir>] [--strict] [--template] [--json] |
Validate required files, relative links, IDs, traceability, gates, and placeholders |
mes detect <dir> |
Detect 13 language/runtime stacks, JS framework hints, and tool availability |
mes prepare <dir> [--install] |
Generate lockfile-aware dependency plan (uv, poetry, pnpm, npm ci, cargo, go, etc.) |
mes audit <dir> [--deep] [--secrets-only] [--git-history [--all-commits]] [--sarif [PATH]] [--format json|sarif] |
Scan for secrets (regex + entropy + git history), sensitive files, MES compliance, and ecosystem scanners (ruff, bandit, mypy, pip-audit, npm, cargo, govulncheck, flutter, dotnet); export SARIF 2.1.0 |
mes portfolio <paths...> [--discover] [--out DIR] [--github-summary] |
Generate multi-repo portfolio-summary.json, SARIF counts, portfolio-history.jsonl trend, portfolio-dashboard.html, and GitHub Step Summary |
mes score <dir> [--save-baseline] [--ratchet] |
Heuristic quality score (0–100) with regression ratchet |
mes report <dir> |
Save .mes-artifacts/audit-report.md and audit-report.json |
mes dashboard <dir> |
Generate XSS-escaped .mes-artifacts/dashboard.html |
mes release-check <dir> |
Block release on high/critical findings, strict gate failures, or score regression |
mes agent run <dir> --goal "..." [--provider auto|gemini|deepseek|openai|anthropic|openai-compatible] [--worktree] [--mcp-config FILE] [--allow-checks] |
Run bounded autonomous agent loop (with retries, token tracking, search, git diff, worktree, stdio MCP tools, JSON run log) |
mes agent list | diff | apply | cleanup <dir> |
Inspect, merge, and clean up isolated agent git worktrees |
Risk-Proportional Profiles & MENA Compliance
| Profile | When to Use | Scope |
|---|---|---|
| Lite | Prototypes, personal tools, scripts without sensitive data | Streamlined gates, lightweight docs, critical-path tests |
| Standard | Production apps with real users (default) | Full G0–G10 (17 gates), adaptive test-plan.json, traceability matrix, CI validation |
| Critical | Finance, healthcare, identity, large-scale PII, regulated systems | Threat modeling, DPIA, DR drills, independent audit |
Includes dedicated MENA regional engineering guidance (locales/en/standard/15-MENA-COMPLIANCE.md / standard/15-MENA-COMPLIANCE.md) covering PDPL (KSA/Egypt/UAE), financial precision & audit trails, and RTL/BiDi engineering controls.
Repository Map
| Path | Contents |
|---|---|
mes_cli/ |
Modular Python package (cli.py, agent.py, spec_ops.py, v35_ops.py, enterprise.py, validate.py, resources.py, init_cli.py, mcp_client.py) |
locales/en/ |
Complete English edition of MES (standards, playbooks, checklists, templates, prompts) |
AGENTS.md |
Core agent constitution + tool adapters (CLAUDE.md, .cursor/, .github/) |
standard/ |
18 standard files (modules 00–15, glossary, and testing-matrix.json) |
playbooks/ |
7 playbooks (New, Existing, Feature, Bugfix, Refactor, Security Audit, AI Feature) |
checklists/ |
9 checklists (quality gates G0–G10, DoD, security, privacy, AI, accessibility, release, ops) |
docs/ |
38 Markdown/JSON doc templates (docs/templates/), tracked specs, and blueprints |
prompts/ |
Ready-to-use prompts for AI coding assistants |
tests/ |
Comprehensive unit and integration test suite |
GOVERNANCE.md |
Framework governance and SemVer policy |
Verification
python -m compileall -q mes_cli scripts tests
python -X utf8 scripts/mes.py validate --root . --template
python -X utf8 -m unittest discover -s tests -v
License
MIT License — see LICENSE.
Metadata
Release files for mazin-mes 3.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mazin_mes-3.6.1.tar.gz | 273.3 kB | With provenance | Details for mazin_mes-3.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mazin_mes-3.6.1-py3-none-any.whl | Python 3 | none | any | Details for mazin_mes-3.6.1-py3-none-any.whl |
Total release size: 636.2 kB
Release files / mazin_mes-3.6.1.tar.gz
| Download URL | mazin_mes-3.6.1.tar.gz |
|---|---|
| Size | 273.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6db88657df999cc302b5754ed0afaa377315271a911756d7e94ecafe34f8b4b5
|
|
BLAKE2b-256 checksum How to use checksums |
f4a602ad1ed4f5f84ab76ec696bfa18ad757095caf1190a4b187c273817731c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.
Transparency logRelease files / mazin_mes-3.6.1-py3-none-any.whl
| Download URL | mazin_mes-3.6.1-py3-none-any.whl |
|---|---|
| Size | 362.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
133863341cfd1dd4b405caa54d1b4c2e149939b99c449cea0a64510f68cb7e64
|
|
BLAKE2b-256 checksum How to use checksums |
81fca9e73000f5aa03dda84ed5a6e22a82162ce9abf8efcce704266ef62ee902
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.
Transparency logSecurity for mazin-mes 3.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mazin_mes-3.6.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.