Skip to content

Commit 498bffa

Browse files
committed
docs(readme): Update README for v2 release
This commit updates the README to reflect the major changes in v2. Key changes include: - Updated description of DevGuardian's capabilities. - Introduced the concept of a multi-agent autonomous engineering ecosystem. - Added a comprehensive list of features and their descriptions.
1 parent ce08264 commit 498bffa

1 file changed

Lines changed: 143 additions & 59 deletions

File tree

README.md

Lines changed: 143 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,80 @@
1-
# 🛡️ DevGuardian MCP Server: The "Mini-Antigravity" Edition
1+
# 🛡️ DevGuardian MCP Server: v2 — The Autonomous Engineering Edition
22

3-
> An AI-powered, **Project-Aware** coding assistant MCP server built with **Gemini 2.0 Flash** and **UV**.
4-
> Plug it into **Antigravity** or **Claude Desktop** for AI-assisted coding, debugging, and robust Git operations — now with a built-in **Pre-Push Security Gate**.
3+
> An AI-powered, **Project-Aware** coding assistant MCP server built with **Gemini 2.0 Flash** and **UV**.
4+
> Plug it into **Antigravity** or **Claude Desktop** and get a full AI engineering team: debugging, reviewing, testing, deploying, and securing your code — all autonomously.
55
66
---
77

8-
## 🌟 What makes it a "Monster"?
8+
## 🌟 What makes DevGuardian a "Monster"?
99

10-
DevGuardian isn't just a generic script runner anymore. It now has a 360-degree view of your codebase and a built-in security shield.
10+
DevGuardian v2 is no longer a single script. It is a **multi-agent autonomous engineering ecosystem**:
1111

12-
1. **🧠 Project DNA Awareness:** When you ask it to review, explain, or improve code, DevGuardian no longer just looks at the file. It inhales your `README.md`, dependencies (`pyproject.toml`), full file tree, and import relationships before generating an answer. It writes code that *fits your architecture*.
13-
2. **🛡️ Built-in Security Gate:** DevGuardian actively watches your Git operations. If you attempt to `git push` or `smart_commit` an API key, password, or GitHub token, DevGuardian will **BLOCK the push** and alert you instantly.
14-
3. **Robust Architecture:** All 20+ tools are backed by standard async patterns, graceful error handling, and `stderr` logging so the host MCP client won't crash when edge cases hit.
12+
1. **🧠 Project DNA Awareness** — Before writing a single line of code, DevGuardian reads your `README`, `pyproject.toml`, full file tree, and import graph. It generates code that *fits your architecture*.
13+
2. **🤖 Agent Swarm** — A 3-agent pipeline (Coder → Tester → Reviewer) that builds features autonomously, finds bugs, and returns production-ready code.
14+
3. **🧪 TDD Auto-Pilot** — Generates pytest tests, runs them, reads failures, fixes the source code, and loops until green.
15+
4. **🌐 GitHub PR Reviewer** — Connects to live GitHub PRs, reads the diffs, and posts a structured expert review.
16+
5. **🐳 DevOps Generator** — Produces a production-grade `Dockerfile`, `docker-compose.yml`, and GitHub Actions `ci.yml` by reading your project stack.
17+
6. **🏗️ God-Mode Mass Refactoring** — Applies a single instruction across **every Python file** in the project simultaneously.
18+
7. **🛡️ Pre-Push Security Gate** — Actively blocks accidental pushes of API keys, tokens, and passwords.
1519

1620
---
1721

18-
## ✨ Features (20+ Tools)
19-
20-
| Tool | Category | Description |
21-
|---|---|---|
22-
| `debug_error` | Code | Analyze errors & stack traces; get contextual root cause + fix |
23-
| `explain_code` | Code | Understand what any code does with full project context |
24-
| `review_code` | Code | Full codebase review: bugs, security, performance, style |
25-
| `generate_code` | Code | Generate clean code tailored to your project's architecture |
26-
| `improve_code` | Code | Refactor and improve existing code consistently |
27-
| 🛂 `validate_env` | Security | Validates `.env` files safely (never exposes secrets in UI) |
28-
| 🛡️ `security_scan` | Security | Scans repo for 20+ types of credential leaks and missing `.gitignore` rules |
29-
| `git_status` | Version Control | Show working tree status |
30-
| `git_add` | Version Control | Stage files for commit |
31-
| `git_commit` | Version Control | Commit with a custom message |
32-
| `git_push` | Version Control | **Push to remote (Protected by Security Gate)** |
33-
| `git_pull` | Version Control | Pull from remote |
34-
| `git_log` | Version Control | View commit history |
35-
| `git_diff` | Version Control | Show staged or unstaged diffs |
36-
| `git_branch` | Version Control | List all branches |
37-
| `git_checkout` | Version Control | Switch or create branches |
38-
| `git_stash` | Version Control | Stash / unstash changes |
39-
| `git_reset` | Version Control | Reset HEAD (soft, mixed, hard) |
40-
| `git_remote` | Version Control | List configured remotes |
41-
|`smart_commit`| Automation | **Reads diff → generates commit message → checks for leaks → commits!** |
42-
| 🚀 `autonomous_engineer` | Agent | **LangGraph agent that plans, uses tools in loops, and verifies work!** |
22+
## ✨ Complete Tool Reference (27 Tools)
23+
24+
### 🤖 Autonomous Agents
25+
| Tool | Description |
26+
|---|---|
27+
| 🤖 `agent_swarm` | **3-Agent Pipeline**: Coder → Tester → Reviewer. Builds features, audits for bugs, returns production-ready code. |
28+
| 🚀 `autonomous_engineer` | **Stateful LangGraph Agent**: Plans, executes tools in loops, verifies work, and self-corrects. |
29+
30+
### 🧠 AI Code Intelligence
31+
| Tool | Description |
32+
|---|---|
33+
| `debug_error` | Analyze errors & stack traces; get root cause + fix with project context |
34+
| `explain_code` | Understand what any code does in plain English |
35+
| `review_code` | Full project-aware codebase review: bugs, security, performance, style |
36+
| `generate_code` | Generate clean code tailored to your project's architecture |
37+
| `improve_code` | Refactor and improve existing code consistently |
38+
39+
### 🔬 Quality & Testing
40+
| Tool | Description |
41+
|---|---|
42+
| 🧪 `test_and_fix` | **TDD Auto-Pilot**: generates pytest tests, runs them, fixes source until tests pass |
43+
| 🌐 `review_pull_request` | **GitHub PR Reviewer**: fetches PR diffs from GitHub & performs AI code review |
44+
45+
### 🐳 DevOps & Infrastructure
46+
| Tool | Description |
47+
|---|---|
48+
| 🐳 `dockerize` | Auto-generates `Dockerfile` + `docker-compose.yml` for your project |
49+
| 🚀 `generate_ci` | Auto-generates `.github/workflows/ci.yml` (linting, testing, Docker) |
50+
51+
### 🏗️ Mass Operations
52+
| Tool | Description |
53+
|---|---|
54+
| 🏗️ `mass_refactor` | **God-Mode**: applies one instruction across ALL Python files simultaneously |
55+
56+
### 🛡️ Security
57+
| Tool | Description |
58+
|---|---|
59+
| 🛂 `validate_env` | Validates `.env` file format safely — never exposes secret values |
60+
| 🔍 `security_scan` | Scans repo for 20+ credential types + missing `.gitignore` rules |
61+
62+
### ⚡ Version Control (Git Suite)
63+
| Tool | Description |
64+
|---|---|
65+
|`smart_commit` | **AI reads your diff → writes commit message → scans for leaks → commits!** |
66+
| `git_status` | Show working tree status |
67+
| `git_add` | Stage files for commit |
68+
| `git_commit` | Commit with a custom message |
69+
| `git_push` | Push to remote **(Protected by Security Gate)** |
70+
| `git_pull` | Pull from remote |
71+
| `git_log` | View commit history |
72+
| `git_diff` | Show staged or unstaged diffs |
73+
| `git_branch` | List all branches |
74+
| `git_checkout` | Switch or create branches |
75+
| `git_stash` | Stash / unstash changes |
76+
| `git_reset` | Reset HEAD (soft, mixed, hard) |
77+
| `git_remote` | List configured remotes |
4378

4479
---
4580

@@ -62,6 +97,7 @@ uv pip install -e .
6297
```bash
6398
copy .env.example .env
6499
# Open .env and paste your Gemini API key
100+
# Optionally add GITHUB_TOKEN for private repo PR reviews
65101
```
66102

67103
### 4. Test the server runs
@@ -75,7 +111,24 @@ You should see no errors — the server waits for MCP connections on stdio.
75111
## 🔌 MCP Configuration
76112

77113
### Antigravity (VS Code)
78-
Add to your `.gemini/settings.json` or MCP config file:
114+
Add to your `.gemini/settings.json`:
115+
```json
116+
{
117+
"mcpServers": {
118+
"devguardian": {
119+
"command": "uv",
120+
"args": ["--directory", "C:\\Users\\ASUS\\OneDrive\\Desktop\\DevGuardian", "run", "devguardian"],
121+
"env": {
122+
"GEMINI_API_KEY": "your_key_here",
123+
"GITHUB_TOKEN": "your_github_token_here"
124+
}
125+
}
126+
}
127+
}
128+
```
129+
130+
### Claude Desktop
131+
Add to `%APPDATA%\Claude\claude_desktop_config.json`:
79132
```json
80133
{
81134
"mcpServers": {
@@ -94,53 +147,84 @@ Add to your `.gemini/settings.json` or MCP config file:
94147

95148
## 💡 Usage Examples
96149

97-
### Debug an error (Project-Aware)
98-
> "DevGuardian, debug the AttributeError I'm seeing in my flask app."
99-
→ DevGuardian reads your file tree, finds the offending class, and fixes the bug matching your specific project style.
150+
### 🤖 Agent Swarm — Build a feature with 3 AI agents
151+
> "DevGuardian, use the agent swarm to create a rate-limiting utility for our API."
152+
→ Coder writes a `RateLimiter` class, Tester finds 5 edge cases, Reviewer incorporates all fixes and returns the final production-ready file.
153+
154+
### 🧪 TDD Auto-Pilot — Test-driven bug fixing
155+
> "Run test_and_fix on `devguardian/tools/debugger.py`"
156+
→ DevGuardian writes pytest tests, runs them, reads the failures, patches the source, and loops until all tests go green.
100157

101-
### Push Code (Safely)
102-
> "Push changes to main."
103-
→ DevGuardian scans your staged files. If you accidentally left `api_key = "AIzaSy..."` inside a file, DevGuardian BLOCKS the push and warns you to remove it.
158+
### 🌐 GitHub PR Review — Review any live PR
159+
> "Review PR #42 in myorg/myrepo"
160+
→ DevGuardian fetches the diff from GitHub and gives you a structured review: Bugs, Security, Performance, Style, and a final verdict.
104161

105-
### Smart commit
106-
> "Commit my changes."
107-
→ DevGuardian runs `git add .`, scans for leaks, Gemini writes the commit message based on the diff, and the commit is saved.
162+
### 🐳 Dockerize a project in seconds
163+
> "Dockerize this project."
164+
→ DevGuardian reads your stack from `pyproject.toml`, generates a multi-stage `Dockerfile` and `docker-compose.yml`, and writes them to your project root.
108165

109-
### Autonomous Engineering
110-
> "Implement a new database endpoint to fetch users."
111-
→ DevGuardian starts a LangGraph loop, analyzes the existing database files, writes the new code, and ensures it doesn't break existing tests.
166+
### 🏗️ Mass Refactoring
167+
> "Add type hints to all function signatures in the project."
168+
→ DevGuardian scans every `.py` file, rewrites functions that need type hints, and reports all 14 files it modified.
169+
170+
### 🛡️ Push Code Safely
171+
> "Push my changes to main."
172+
→ DevGuardian scans all staged files. If it finds `api_key = "AIzaSy..."` hardcoded anywhere, it **BLOCKS the push** and tells you exactly which file and line contains the secret.
112173

113174
---
114175

115176
## 📁 Project Structure
116177
```
117178
DevGuardian/
118-
├── .env.example ← Copy to .env, add your API key
119-
├── .gitignore
120-
├── pyproject.toml ← UV project config (dependencies)
179+
├── .env.example ← Copy to .env, add your API key
180+
├── .gitignore ← Comprehensive security-focused rules
181+
├── pyproject.toml ← UV project config (dependencies)
182+
├── Dockerfile ← 🐳 Auto-generated production container
183+
├── docker-compose.yml ← 🐳 Auto-generated service orchestration
121184
├── README.md
185+
├── tests/
186+
│ └── test_debugger.py ← 🧪 TDD Auto-Pilot generated tests
187+
├── .github/
188+
│ └── workflows/
189+
│ └── ci.yml ← 🚀 Auto-generated GitHub Actions CI/CD
122190
└── devguardian/
123-
├── server.py ← Robust MCP server entry point (20+ tools, global try/except, live logging)
191+
├── server.py ← Robust MCP server (27 tools, logging, error handling)
124192
├── agents/
125-
│ └── engineer.py ← Stateful Langgraph agent
193+
│ ├── engineer.py ← Single stateful LangGraph agent
194+
│ └── swarm.py ← 🤖 3-Agent Swarm (Coder + Tester + Reviewer)
126195
├── tools/
127-
│ ├── debugger.py ← debug_error
196+
│ ├── debugger.py ← debug_error
128197
│ ├── code_helper.py ← explain, review, generate, improve
129-
│ └── git_ops.py ← Git commands + ⭐smart_commit
198+
│ ├── git_ops.py ← Full git suite + ⭐ smart_commit
199+
│ ├── tdd.py ← 🧪 TDD Auto-Pilot
200+
│ ├── github_review.py ← 🌐 GitHub PR Reviewer
201+
│ ├── infra.py ← 🐳 Dockerfile + CI/CD generator
202+
│ └── mass_refactor.py ← 🏗️ God-Mode mass refactoring
130203
└── utils/
131-
├── gemini_client.py ← Gemini 2.0 Flash wrapper
132-
├── file_reader.py ← 🧠 Project DNA Context Builder
204+
├── gemini_client.py ← Gemini 2.0 Flash wrapper (lazy init)
205+
├── file_reader.py ← 🧠 Project DNA Context Builder
133206
├── security.py ← 🛡️ Pre-push secret gate & .env validator
134207
└── memory.py ← Threading & Agent state management
135208
```
136209

137210
---
138211

139212
## 🔐 Enterprise-Grade Security
140-
- **Anti-Leak Shield:** `security.py` checks for over 20+ types of keys (AWS, GitHub, OpenAI, Google) before any `git push` or `smart_commit`.
141-
- **.env formatting:** `.env` validation ensures no placeholders or empty values are pushed to production by mistake.
142-
- **Local execution:** The server runs locally; your code never leaves your machine except for API calls to Gemini.
213+
214+
- **Anti-Leak Shield**: `security.py` detects 20+ credential types (AWS, GitHub, OpenAI, Google, Stripe, Slack…) before any `git push` or `smart_commit`.
215+
- **Smart Detection**: Only flags **hardcoded quoted values** — never false-positives on `os.getenv()` calls.
216+
- **`.env` Safety**: `validate_env` reviews your `.env` file format — shows keys but **never exposes values**.
217+
- **Local Execution**: Your code never leaves your machine except for Gemini API calls.
218+
219+
---
220+
221+
## 🐳 Docker
222+
223+
```bash
224+
# Build and run DevGuardian in a container
225+
docker compose up --build
226+
```
143227

144228
---
145229

146-
*Built with ❤️ by **Karan** using Gemini 2.0 Flash + MCP SDK + UV*
230+
*Built with ❤️ by **Karan** using Gemini 2.0 Flash + LangGraph + MCP SDK + UV*

0 commit comments

Comments
 (0)