{
  "markdown": "<div align=\"center\">\n\n# Lingua Universale\n\n**A language for verified AI agent protocols.**\n\n[![PyPI](https://img.shields.io/pypi/v/cervellaswarm-lingua-universale.svg)](https://pypi.org/project/cervellaswarm-lingua-universale/)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)\n[![Zero Dependencies](https://img.shields.io/badge/dependencies-zero-blue.svg)](packages/lingua-universale/)\n[![VS Code](https://img.shields.io/badge/VS_Code-Marketplace-blue.svg)](https://marketplace.visualstudio.com/items?itemName=cervellaswarm.lingua-universale)\n[![Discord](https://img.shields.io/badge/Discord-community-5865F2.svg)](https://discord.gg/bvUBuejXxV)\n\n[**Try it in your browser**](https://rafapra3008.github.io/cervellaswarm/) -- no install needed.\n[**Watch AI agents live**](https://lu-debugger.fly.dev/) -- 3 agents on a verified protocol.\n\n</div>\n\n---\n\n## The Problem\n\nYour AI agents talk to each other, but nothing guarantees they follow the rules. Wrong sender, wrong message order, missing steps -- and you only find out in production.\n\nLingua Universale (LU) is a type checker for AI agent conversations. You define the protocol, LU proves it's correct, and the runtime enforces it.\n\n```python\nfrom cervellaswarm_lingua_universale import Protocol, ProtocolStep, MessageKind, SessionChecker, TaskRequest\n\n# Define: who sends what, to whom, in what order\nreview = Protocol(name=\"Review\", roles=(\"dev\", \"reviewer\"), elements=(\n    ProtocolStep(sender=\"dev\", receiver=\"reviewer\", message_kind=MessageKind.TASK_REQUEST),\n    ProtocolStep(sender=\"reviewer\", receiver=\"dev\", message_kind=MessageKind.TASK_RESULT),\n))\n\nchecker = SessionChecker(review)\nchecker.send(\"dev\", \"reviewer\", TaskRequest(task_id=\"1\", description=\"Review auth\"))  # OK\nchecker.send(\"dev\", \"reviewer\", TaskRequest(task_id=\"2\", description=\"Oops\"))         # ProtocolViolation!\n#                                                                                      ^^^ wrong turn: reviewer must send next\n```\n\nThe protocol says reviewer goes next. The runtime blocks it. Not because you trust the code -- because the session type makes it impossible.\n\n---\n\n## Install\n\n```bash\npip install cervellaswarm-lingua-universale\n```\n\nOr try it first: [**Playground**](https://rafapra3008.github.io/cervellaswarm/) (runs in your browser via Pyodide).\n\n---\n\n## Write a Protocol\n\n```\nprotocol DelegateTask:\n    roles: supervisor, worker, validator\n\n    supervisor asks worker to execute analysis\n    worker returns result to supervisor\n    supervisor asks validator to verify result\n\n    when validator decides:\n        pass:\n            validator returns approval to supervisor\n        fail:\n            validator sends feedback to supervisor\n\n    properties:\n        always terminates\n        no deadlock\n        no deletion\n        all roles participate\n```\n\nThen verify it:\n\n```bash\nlu verify delegate_task.lu\n```\n\n```\n  [1/4] always_terminates  ... PROVED\n  [2/4] no_deadlock        ... PROVED\n  [3/4] no_deletion        ... PROVED\n  [4/4] all_roles_participate ... PROVED\n\n  All 4 properties PASSED.\n```\n\nMathematical proof. Not a test that passes today and fails tomorrow.\n\n---\n\n## What You Get\n\n| Feature | Description |\n|---------|-------------|\n| **Full compiler** | Tokenizer, parser (64 rules), AST, contract checker, Python codegen |\n| **9 verified properties** | `always_terminates`, `no_deadlock`, `no_deletion`, `role_exclusive`, and more |\n| **20 stdlib protocols** | AI/ML, Business, Communication, Data, Security -- ready to use |\n| **Linter + Formatter** | `lu lint` (10 rules) + `lu fmt` (zero-config, like gofmt) |\n| **LSP server** | Diagnostics, hover, completion, go-to-definition, formatting |\n| **VS Code extension** | [Install from Marketplace](https://marketplace.visualstudio.com/items?itemName=cervellaswarm.lingua-universale) |\n| **Interactive chat** | `lu chat` -- build protocols conversationally (English, Italian, Portuguese) |\n| **Browser playground** | [Try it now](https://rafapra3008.github.io/cervellaswarm/) -- Check, Lint, Run, Chat |\n| **Lean 4 bridge** | Generate and verify mathematical proofs |\n| **REPL** | `lu repl` for interactive exploration |\n| **Project scaffolding** | `lu init --template rag_pipeline` from 20 verified templates |\n\nZero external dependencies. Pure Python stdlib.\n\n---\n\n## CLI\n\n```bash\nlu check file.lu          # Parse and compile\nlu verify file.lu         # Formal property verification\nlu run file.lu            # Execute\nlu lint file.lu           # 10 style and correctness rules\nlu fmt file.lu            # Zero-config auto-formatter\nlu chat --lang en         # Build a protocol conversationally\nlu demo --lang it         # See the La Nonna demo\nlu init --template NAME   # Scaffold from stdlib templates\nlu visualize file.lu      # Generate Mermaid sequence diagram\nlu mcp-audit --manifest t.json  # Audit MCP server protocols\nlu repl                   # Interactive REPL\nlu lsp                    # Start LSP server\n```\n\n---\n\n## CI Integration\n\nAdd protocol verification to your GitHub Actions workflow:\n\n```yaml\n# .github/workflows/lu-check.yml\non:\n  push:\n    paths: [\"**/*.lu\"]\n\njobs:\n  lu-check:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-python@v6\n        with:\n          python-version: \"3.11\"\n      - run: pip install cervellaswarm-lingua-universale\n      - run: lu lint protocols/\n      - run: lu verify protocols/\n```\n\nExit code is non-zero on violations -- works with any CI system.\n\n---\n\n## How It Works\n\nLU is built on [multiparty session types](https://en.wikipedia.org/wiki/Session_type) (Honda, Yoshida, Carbone -- POPL 2008). Session types describe communication protocols as types: if two processes follow the same session type, they cannot deadlock, messages cannot arrive in the wrong order, and the conversation always terminates.\n\nThe pipeline:\n\n```\n.lu source → Tokenizer → Parser → AST → Spec Checker → Lean 4 Proofs → Python Codegen\n                                           ↓\n                                    PROVED or VIOLATED\n```\n\nLU doesn't replace your AI agent framework. It makes it safe. Like TypeScript for JavaScript -- you keep your tools, you add guarantees.\n\n---\n\n## Examples\n\n**[LU Debugger](https://lu-debugger.fly.dev/)** -- Live web app: 3 AI agents (Customer, Warehouse, Payment) communicate on a verified OrderProcessing protocol. Click \"Break\" to see a protocol violation blocked in real time. [Source code](lu-debugger/).\n\nSee the [`examples/`](packages/lingua-universale/examples/) directory:\n\n- **[Agent Orchestration](packages/lingua-universale/examples/dogfood_agent_orchestration.lu)** -- 3 AI agents with nested choice, 8/8 properties proved\n- **[Live Runner](packages/lingua-universale/examples/dogfood_runner_live.py)** -- Real Claude API agents on a verified protocol\n- **[Standard Library](packages/lingua-universale/src/cervellaswarm_lingua_universale/stdlib/)** -- 20 verified protocols across 5 categories\n\nOr try the [interactive Colab notebook](https://colab.research.google.com/github/rafapra3008/cervellaswarm/blob/main/docs/blog/from-vibecoding-to-vericoding-demo.ipynb) -- 2 minutes, zero setup.\n\n---\n\n## More from CervellaSwarm\n\nLingua Universale is the core project by [CervellaSwarm](https://github.com/rafapra3008/cervellaswarm). We also publish these Python packages:\n\n| Package | What it does |\n|---------|-------------|\n| [code-intelligence](packages/code-intelligence/) | AST-powered code understanding (tree-sitter, PageRank) |\n| [agent-hooks](packages/agent-hooks/) | Lifecycle hooks for Claude Code agents |\n| [agent-templates](packages/agent-templates/) | Agent definition templates & team configuration |\n| [task-orchestration](packages/task-orchestration/) | Deterministic task routing & validation |\n| [spawn-workers](packages/spawn-workers/) | Multi-agent process management |\n| [session-memory](packages/session-memory/) | Persistent session context across conversations |\n| [event-store](packages/event-store/) | Immutable event logging & audit trail |\n| [quality-gates](packages/quality-gates/) | Automated quality checks & scoring |\n\nAll Apache 2.0, Python 3.11+, tested, documented.\n\n---\n\n## Contributing\n\nWe welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n- **Bug reports:** [GitHub Issues](https://github.com/rafapra3008/cervellaswarm/issues)\n- **Security:** See [SECURITY.md](SECURITY.md) for responsible disclosure\n\n---\n\n## License\n\nApache License 2.0 -- see [LICENSE](LICENSE).\n\nCopyright 2025-2026 CervellaSwarm Contributors.\n\n---\n\n<div align=\"center\">\n\n**Lingua Universale** -- *Verified protocols for AI agents.*\n\n[Playground](https://rafapra3008.github.io/cervellaswarm/) | [LU Debugger](https://lu-debugger.fly.dev/) | [PyPI](https://pypi.org/project/cervellaswarm-lingua-universale/) | [VS Code](https://marketplace.visualstudio.com/items?itemName=cervellaswarm.lingua-universale) | [Blog](docs/blog/from-vibecoding-to-vericoding.md) | [Colab Demo](https://colab.research.google.com/github/rafapra3008/cervellaswarm/blob/main/docs/blog/from-vibecoding-to-vericoding-demo.ipynb)\n\n</div>\n",
  "bytes": 9149,
  "sha": "4907226920e1fff1873db2ea898b8a07e5ef02734f11e6d09afa75d2c57dabf4",
  "repo_slug": "rafapra3008/cervellaswarm",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_rafapra3008_lu_mcp_server_693872dd/readme"
}