Spaces:
Sleeping
Sleeping
Commit Β·
1de0435
1
Parent(s): c01a8fa
docs: reformat README.md by removing emojis and standardizing table alignment
Browse files
README.md
CHANGED
|
@@ -15,26 +15,22 @@ short_description: The AI Courtroom That Exposes Bad Freelance Code
|
|
| 15 |
|
| 16 |
<div align="center">
|
| 17 |
|
| 18 |
-
#
|
| 19 |
|
| 20 |
### The AI Courtroom That Exposes Bad Freelance Code
|
| 21 |
|
| 22 |
-
**
|
| 23 |
-
|
| 24 |
-
Built using GLM 5.1 for long-horizon reasoning and orchestrated tool use via CrewAI.
|
| 25 |
|
| 26 |
[](https://github.com/amineyagoub/CodeTribunal/actions/workflows/tests.yml)
|
| 27 |
[](https://www.python.org/downloads/)
|
| 28 |
[](https://opensource.org/licenses/MIT)
|
| 29 |
[](https://build-with-glm-5-1-challenge.devpost.com)
|
| 30 |
|
| 31 |
-
[How It Works](#-how-it-works) β’ [Architecture](#-architecture) β’ [Install](#-install) β’ [Usage](#-usage) β’ [Demo](#-demo)
|
| 32 |
-
|
| 33 |
</div>
|
| 34 |
|
| 35 |
---
|
| 36 |
|
| 37 |
-
##
|
| 38 |
|
| 39 |
A freelancer delivers code. The client can't tell if it's professional work or a security nightmare. Traditional linters find syntax errors. Code reviews miss architectural flaws. Nobody puts it all together and tells you:
|
| 40 |
|
|
@@ -46,7 +42,7 @@ Upload a `.zip` of code and watch a full courtroom trial unfold β evidence gat
|
|
| 46 |
|
| 47 |
---
|
| 48 |
|
| 49 |
-
##
|
| 50 |
|
| 51 |
CodeTribunal runs a **6-phase pipeline**, each building on the last:
|
| 52 |
|
|
@@ -92,9 +88,9 @@ Each agent **autonomously decides which tools to call**, observes the results, a
|
|
| 92 |
|
| 93 |
A courtroom debate between AI agents:
|
| 94 |
|
| 95 |
-
1. **
|
| 96 |
-
2. **
|
| 97 |
-
3. **
|
| 98 |
|
| 99 |
Agents use CrewAI's `context` parameter to chain arguments: prosecution output feeds into defense context, both feed into rebuttal.
|
| 100 |
|
|
@@ -117,7 +113,7 @@ Agents use CrewAI's `context` parameter to chain arguments: prosecution output f
|
|
| 117 |
|
| 118 |
---
|
| 119 |
|
| 120 |
-
##
|
| 121 |
|
| 122 |
```
|
| 123 |
ββββββββββββββββ
|
|
@@ -161,7 +157,7 @@ Agents use CrewAI's `context` parameter to chain arguments: prosecution output f
|
|
| 161 |
|
| 162 |
---
|
| 163 |
|
| 164 |
-
##
|
| 165 |
|
| 166 |
| Component | Technology | Purpose |
|
| 167 |
| -------------------- | ------------------------ | ---------------------------------------------------- |
|
|
@@ -175,7 +171,7 @@ Agents use CrewAI's `context` parameter to chain arguments: prosecution output f
|
|
| 175 |
|
| 176 |
---
|
| 177 |
|
| 178 |
-
##
|
| 179 |
|
| 180 |
```bash
|
| 181 |
# Clone
|
|
@@ -190,7 +186,7 @@ npm install -g @getgrit/cli
|
|
| 190 |
|
| 191 |
# Configure
|
| 192 |
cp .env.example .env
|
| 193 |
-
# Edit .env: set ZAI_API_KEY
|
| 194 |
```
|
| 195 |
|
| 196 |
### Requirements
|
|
@@ -201,7 +197,7 @@ cp .env.example .env
|
|
| 201 |
|
| 202 |
---
|
| 203 |
|
| 204 |
-
##
|
| 205 |
|
| 206 |
### Web UI (Recommended)
|
| 207 |
|
|
@@ -284,32 +280,7 @@ Test fixtures in `tests/fixtures/locale/` contain deliberately bad Python and Ja
|
|
| 284 |
|
| 285 |
---
|
| 286 |
|
| 287 |
-
##
|
| 288 |
-
|
| 289 |
-
```
|
| 290 |
-
CodeTribunal/
|
| 291 |
-
βββ src/code_tribunal/
|
| 292 |
-
β βββ config.py # Centralized configuration
|
| 293 |
-
β βββ evidence.py # GritQL forensic scanning (17 patterns)
|
| 294 |
-
β βββ code_graph.py # AST code dependency graph
|
| 295 |
-
β βββ tools.py # 4 custom CrewAI tools
|
| 296 |
-
β βββ agents.py # 8 agent definitions
|
| 297 |
-
β βββ react.py # ReACT engine (LiteLLM function calling)
|
| 298 |
-
β βββ courtroom.py # 6-phase pipeline orchestrator
|
| 299 |
-
β βββ pipeline.py # State machine + persistence
|
| 300 |
-
β βββ app.py # Gradio UI + export
|
| 301 |
-
β βββ cli.py # CLI entry point
|
| 302 |
-
βββ tests/
|
| 303 |
-
β βββ fixtures/locale/ # Deliberately bad code samples
|
| 304 |
-
β βββ bad_code.zip # Zip fixture for UI testing
|
| 305 |
-
βββ assets/
|
| 306 |
-
β βββ logo.png # 3D courtroom logo
|
| 307 |
-
βββ pyproject.toml
|
| 308 |
-
```
|
| 309 |
-
|
| 310 |
-
---
|
| 311 |
-
|
| 312 |
-
## π What Makes This a Strong Hackathon Entry
|
| 313 |
|
| 314 |
1. **System Complexity** β 6-phase pipeline with 8 agents, 4 custom tools, code graph, and streaming
|
| 315 |
2. **Effective Tool Use** β Agents use BaseTool with Pydantic schemas to read files, search patterns, and trace calls
|
|
|
|
| 15 |
|
| 16 |
<div align="center">
|
| 17 |
|
| 18 |
+
# CodeTribunal
|
| 19 |
|
| 20 |
### The AI Courtroom That Exposes Bad Freelance Code
|
| 21 |
|
| 22 |
+
**Built using GLM 5.1 for long-horizon reasoning and orchestrated tool use via CrewAI.**
|
|
|
|
|
|
|
| 23 |
|
| 24 |
[](https://github.com/amineyagoub/CodeTribunal/actions/workflows/tests.yml)
|
| 25 |
[](https://www.python.org/downloads/)
|
| 26 |
[](https://opensource.org/licenses/MIT)
|
| 27 |
[](https://build-with-glm-5-1-challenge.devpost.com)
|
| 28 |
|
|
|
|
|
|
|
| 29 |
</div>
|
| 30 |
|
| 31 |
---
|
| 32 |
|
| 33 |
+
## The Problem
|
| 34 |
|
| 35 |
A freelancer delivers code. The client can't tell if it's professional work or a security nightmare. Traditional linters find syntax errors. Code reviews miss architectural flaws. Nobody puts it all together and tells you:
|
| 36 |
|
|
|
|
| 42 |
|
| 43 |
---
|
| 44 |
|
| 45 |
+
## How It Works
|
| 46 |
|
| 47 |
CodeTribunal runs a **6-phase pipeline**, each building on the last:
|
| 48 |
|
|
|
|
| 88 |
|
| 89 |
A courtroom debate between AI agents:
|
| 90 |
|
| 91 |
+
1. ** The Prosecutor** β builds the case for negligence, cites specific evidence
|
| 92 |
+
2. ** The Defense Attorney** β challenges claims, argues context and proportionality
|
| 93 |
+
3. ** Rebuttal** β the prosecutor responds to the defense
|
| 94 |
|
| 95 |
Agents use CrewAI's `context` parameter to chain arguments: prosecution output feeds into defense context, both feed into rebuttal.
|
| 96 |
|
|
|
|
| 113 |
|
| 114 |
---
|
| 115 |
|
| 116 |
+
## Architecture
|
| 117 |
|
| 118 |
```
|
| 119 |
ββββββββββββββββ
|
|
|
|
| 157 |
|
| 158 |
---
|
| 159 |
|
| 160 |
+
## Tech Stack
|
| 161 |
|
| 162 |
| Component | Technology | Purpose |
|
| 163 |
| -------------------- | ------------------------ | ---------------------------------------------------- |
|
|
|
|
| 171 |
|
| 172 |
---
|
| 173 |
|
| 174 |
+
## Install
|
| 175 |
|
| 176 |
```bash
|
| 177 |
# Clone
|
|
|
|
| 186 |
|
| 187 |
# Configure
|
| 188 |
cp .env.example .env
|
| 189 |
+
# Edit .env: set ZAI_API_KEY (get one at https://open.bigmodel.cn/)
|
| 190 |
```
|
| 191 |
|
| 192 |
### Requirements
|
|
|
|
| 197 |
|
| 198 |
---
|
| 199 |
|
| 200 |
+
## Usage
|
| 201 |
|
| 202 |
### Web UI (Recommended)
|
| 203 |
|
|
|
|
| 280 |
|
| 281 |
---
|
| 282 |
|
| 283 |
+
## What Makes This a Strong Hackathon Entry
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 284 |
|
| 285 |
1. **System Complexity** β 6-phase pipeline with 8 agents, 4 custom tools, code graph, and streaming
|
| 286 |
2. **Effective Tool Use** β Agents use BaseTool with Pydantic schemas to read files, search patterns, and trace calls
|