{"id":33345930,"url":"https://github.com/rb248/model-based-se-assistant","last_synced_at":"2026-05-14T15:34:01.750Z","repository":{"id":324589055,"uuid":"1097745717","full_name":"rb248/model-based-se-assistant","owner":"rb248","description":"AI-powered Model-Based Software Engineering Assistant using LangGraph multi-agent orchestration. Transforms UML diagrams into production-ready code with SOLID analysis, design pattern detection, and comprehensive test generation.","archived":false,"fork":false,"pushed_at":"2025-11-16T18:52:55.000Z","size":31868,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-16T20:24:31.702Z","etag":null,"topics":["ai-agents","code-generation","design-patterns","faiss","langchain","langgraph","mbse","rag","refactoring","solid-principles","test-generation","uml"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rb248.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-16T18:47:10.000Z","updated_at":"2025-11-16T18:53:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rb248/model-based-se-assistant","commit_stats":null,"previous_names":["rb248/model-based-se-assistant"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rb248/model-based-se-assistant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rb248%2Fmodel-based-se-assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rb248%2Fmodel-based-se-assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rb248%2Fmodel-based-se-assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rb248%2Fmodel-based-se-assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rb248","download_url":"https://codeload.github.com/rb248/model-based-se-assistant/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rb248%2Fmodel-based-se-assistant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33031201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","code-generation","design-patterns","faiss","langchain","langgraph","mbse","rag","refactoring","solid-principles","test-generation","uml"],"created_at":"2025-11-22T05:00:46.238Z","updated_at":"2026-05-14T15:34:01.733Z","avatar_url":"https://github.com/rb248.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Model-Based Software Engineering Assistant (MBSE Assistant)\n=========================================================\n\nA compact multi-agent system that converts UML/PlantUML diagrams into refactored code, tests, and analysis reports. The workflow is designed for clarity and easy extension.\n\n# Overview\n\n## Screenshot\n![MBSE Assistant screenshot](images/image.png)\n\n\n\n...existing code...\nModel-Based Software Engineering Assistant\n\nThis repository provides a multi-agent system that turns UML/PlantUML diagrams into refactored code, tests, and architectural guidance.\n## Architecture and Workflow\n--------\n![Diagram of the architecture and workflow](images/workflow.png)\n\nThis project uses a LangGraph workflow with multiple agents to:\n\n- parse UML (PlantUML) into an intermediate representation (IR)\n- analyze the model for SOLID and design-pattern-based issues\n- generate refactored code (Python) with interfaces and dependency injection\n- generate tests (pytest) and run them in a sandbox\n- attempt to self-correct syntax/import errors\n- produce a critique report that includes issues, recommendations, and detected patterns\n\nKey components\n--------------\n\n- backend: FastAPI server and multi-agent orchestration\n- codegen: code generation and refactoring agent\n- testgen: automated test generation agent\n- parser: PlantUML to JSON IR converter\n- analysis: deterministic detectors + LLM-RAG for context-aware suggestions\n\nQuick start\n-----------\n\nPrerequisites\n- Python 3.12+\n- Node.js for the UI\n- Optional: Google Gemini/OpenAI keys for LLMs\n\nInstall\n\n```bash\ngit clone https://github.com/yourusername/model-based-se-assistant.git\ncd model-based-se-assistant\npython -m venv ag\nsource ag/bin/activate\npip install -r requirements.txt\ncp .env.example .env\n# Edit .env to add LLM keys if you have them\n```\n\nRun backend + UI\n-----------------\n\n```bash\n# Terminal 1 - Backend\nsource ag/bin/activate\nuvicorn backend.api:app --reload --port 8000\n\n# Terminal 2 - Frontend (dev)\ncd ui\nnpm install\nnpm run dev\n\n# Open http://localhost:5173\n```\n\nBuild \u0026 serve UI in production\n-------------------------------\n\n```bash\ncd ui\nnpm run build\n# optionally copy ui/dist/ to backend/static/ and configure the backend to serve static files\n```\n\nFeatures\n--------\n\n- Analysis:\n  - SOLID violation detection (SRP, OCP, DIP, ISP, LSP)\n  - Coupling/cohesion measures\n  - Deterministic detectors + LLM-enhanced recommendations\n  - `patterns_detected`: heuristics and LLM output (Repository, Service, Router/Controller, Strategy, Factory, Facade, Adapter, Observer)\n  - `strengths`: things done well in the model (clear naming, repository usage, DI)\n\n- Code generation:\n  - Splits god classes, extracts interfaces\n  - Produces multi-file Python project skeleton with services and repositories\n\n- Test generation and execution:\n  - Generates pytest suites and attempts to run them in a sandbox with timeout\n  - If tests fail due to syntax/import errors, a self-correction loop tries to fix errors (up to a retry limit)\n\nConfiguration\n-------------\n\nEdit `backend/config.py` or `.env`:\n\n```python\nPROJECTS_DIR=./projects\nLLM_PROVIDER=gemini\nLLM_FALLBACK_MODEL=gpt-4o-mini\nSANDBOX_TIMEOUT=60\n```\n\nDevelopment notes\n-----------------\n\n- Avoid storing generated artifacts in the repo while the dev server runs (set `PROJECTS_DIR` to an external folder to avoid auto-reloads).\n- The `analysis_report` includes `patterns_detected` and `strengths` which you can render in the UI to show \"what's good\" along with problems.\n\nTests\n-----\n\n```bash\n# Backend unit tests\npytest -m \"not integration\"\n\n# Integration tests (LLM keys needed)\npytest -m integration\n```\n\nRoadmap / TODOs\n---------------\n\n- Frontend: full dashboard, interactive UML editor, WebSocket progress\n- RAG: ingest PDFs and docs, multi-modal RAG\n- Multi-language codegen: TypeScript, Java\n- DevOps: docker-compose, helm charts\n- Security: user auth, sandbox hardening\n\nContributing\n------------\n\nPlease fork, add tests, and open a PR.\n\nLicense\n-------\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frb248%2Fmodel-based-se-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frb248%2Fmodel-based-se-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frb248%2Fmodel-based-se-assistant/lists"}