An open API service indexing awesome lists of open source software.

https://github.com/bravetto/biasguard-production-suite

๐Ÿ›ก๏ธ 17KB justice-driven AI bias detection suite born from fighting for Jahmere Webb's freedom. Real-time bias analysis for chat interfaces, development environments & codebase mapping. <10ms speed, 84.9% accuracy, zero dependencies. Mission: 15% revenue supports criminal justice reform.
https://github.com/bravetto/biasguard-production-suite

ai-assistance ai-bias-detection ai-code-quality ai-debugging ai-development-tools ai-safety bias-prevention browser-console code-validation coding-assistant coding-workflow criminal-justice cursor-ai developer-tools development-productivity javascript-tools opilot-enhancement vscode-extension web-development web-development-security

Last synced: 2 months ago
JSON representation

๐Ÿ›ก๏ธ 17KB justice-driven AI bias detection suite born from fighting for Jahmere Webb's freedom. Real-time bias analysis for chat interfaces, development environments & codebase mapping. <10ms speed, 84.9% accuracy, zero dependencies. Mission: 15% revenue supports criminal justice reform.

Awesome Lists containing this project

README

          

# ๐Ÿ›ก๏ธ BiasGuard System

**Zero-dependency bias detection system for AI interactions**

*Born from fighting for JAHmere Webb's freedom - proven in high-stakes justice work*

## ๐Ÿš€ Mission Critical - August 25th, 2025

This system was developed for the JAHmere Webb Freedom Portal to ensure mission-critical engineering decisions remain bias-free and focused on deliverable outcomes.

## ๐Ÿ“ฆ Features

- **๐ŸŽฏ Zero Dependencies**: Pure TypeScript implementation, no external libraries
- **โšก High Performance**: <10ms analysis time, <2MB memory usage
- **๐Ÿ” 84.9% Accuracy**: Battle-tested bias detection algorithms
- **๐Ÿ›ก๏ธ Mission Aligned**: Optimized for high-stakes, time-sensitive projects
- **๐Ÿ“ฑ Multi-Platform**: Browser injection, API integration, CLI tools

## ๐Ÿ—๏ธ Architecture

```
src/
โ”œโ”€โ”€ core/ # Core bias detection engine
โ”‚ โ””โ”€โ”€ aria-protocol.ts # AI Regulation Interface
โ”œโ”€โ”€ detection/ # Pattern detection algorithms
โ”‚ โ””โ”€โ”€ unified-biasguard.ts # Main detection engine (383 lines)
โ”œโ”€โ”€ lib/ # Context management
โ”‚ โ””โ”€โ”€ biasguard-context-manager.ts # Session & cache management
โ””โ”€โ”€ index.ts # Main entry point

production-package/ # 17KB standalone package
โ”œโ”€โ”€ biasguard-chat-inject.js # Real-time chat bias detection (8.8KB)
โ”œโ”€โ”€ biasguard-inject.js # Development environment integration (2.1KB)
โ”œโ”€โ”€ ai-xray-vision.js # Codebase analysis engine (3.4KB)
โ””โ”€โ”€ ai-xray-inject.js # Browser analysis tool (2.5KB)
```

## ๐Ÿš€ Quick Start

### Installation

```bash
npm install biasguard-system
```

### Basic Usage

```typescript
import { quickAnalysis, createBiasGuard, systemHealthCheck } from 'biasguard-system';

// Quick analysis
const result = await quickAnalysis('This comprehensive solution guarantees perfect results');
console.log(`Bias Score: ${result.biasScore * 100}%`);

// Advanced usage
const biasGuard = createBiasGuard();
const analysis = await biasGuard.analyze({
aiResponse: 'We need to refactor everything before the court date',
userPrompt: 'How should we approach this?',
conversationHistory: ['Previous context...']
});

// System health
const health = systemHealthCheck();
console.log(`System Status: ${health.status}`);
```

### Browser Integration

```javascript
// Paste in browser F12 console for real-time chat analysis
// (Copy from production-package/biasguard-chat-inject.js)
```

## ๐ŸŽฏ Detected Bias Patterns

### Mission-Critical Patterns
- **โฐ Court Date Pressure**: Detects deadline-driven decision making
- **๐Ÿšซ Rewrite Trap**: Flags unnecessary refactoring/rebuilding
- **๐ŸŽฏ Mission Drift**: Identifies scope creep away from core objectives

### Technical Bias Patterns
- **๐Ÿ“… Planning Fallacy**: Timeline and roadmap language
- **๐Ÿ—๏ธ Feature Creep**: Over-engineering and complexity inflation
- **๐Ÿ‘‘ Authority Bias**: Mandatory/enforcement language
- **๐Ÿค” Assumption Bias**: Universal claims and absolute statements

### AI Behavior Patterns
- **โœ… Success Declaration**: AI declaring victory before user confirmation
- **๐Ÿ“Š Terminal Worship**: Over-reliance on logs vs. user experience
- **๐Ÿ”„ Pattern Blindness**: Recursive thinking and solution fixation

## ๐Ÿ“Š Performance Metrics

- **Analysis Speed**: <10ms per analysis
- **Memory Usage**: <2MB footprint
- **Accuracy**: 84.9% bias detection rate
- **False Positive Rate**: <15%
- **Zero Dependencies**: Complete self-containment

## ๐Ÿ› ๏ธ Development

```bash
# Install dependencies
npm install

# Build TypeScript
npm run build

# Run tests
npm test

# Validate system
npm run validate

# Watch mode
npm run dev
```

## ๐Ÿงช Testing

```bash
# Run all tests
npm test

# Coverage report
npm run test:coverage

# Watch mode
npm run test:watch
```

## ๐Ÿ“š API Reference

### Core Classes

#### `UnifiedBiasGuard`
Main bias detection engine with ARIA protocol integration.

#### `BiasGuardContextManager`
Session management, caching, and real-time monitoring.

#### `ARIAProtocol`
AI Regulation Interface for conversation pattern analysis.

### Interfaces

#### `UnifiedBiasResult`
```typescript
interface UnifiedBiasResult {
hasBias: boolean;
biasScore: number; // 0-1 scale
confidence: number; // Detection confidence
patterns: DetectedPattern[];
health: SystemHealth;
immediateActions: string[];
preventiveActions: string[];
contextWarning?: string;
}
```

#### `DetectedPattern`
```typescript
interface DetectedPattern {
type: string; // Pattern identifier
severity: 'low' | 'medium' | 'high' | 'critical';
confidence: number; // Pattern confidence
description: string; // Human-readable description
intervention: string; // Recommended action
location?: string; // Where pattern was found
}
```

## ๐ŸŽฏ Mission Context

This system was developed to support JAHmere Webb's court case on August 25th, 2025. Every component is optimized for:

- **High-stakes decision making** under time pressure
- **Mission-critical engineering** with zero room for error
- **Bias-free analysis** when stakes are highest
- **Rapid deployment** and immediate results

## ๐Ÿ”ง Production Package

The `production-package/` directory contains standalone tools:

### `biasguard-chat-inject.js` (8.8KB)
Real-time bias detection for AI chat interfaces. Paste in browser F12 console.

### `biasguard-inject.js` (2.1KB)
Development environment integration for VS Code/Cursor F12 console.

### `ai-xray-vision.js` (3.4KB)
Codebase analysis engine for mapping file relationships.

### `ai-xray-inject.js` (2.5KB)
Browser-based analysis tool for live codebase inspection.

## ๐Ÿ“ˆ System Health

Monitor system health with built-in diagnostics:

```typescript
const health = systemHealthCheck();
// Returns: { status, version, mission, components }
```

## ๐Ÿค Contributing

This system serves the JAHmere Webb Freedom Portal mission. Contributions should:

1. Maintain zero external dependencies
2. Preserve <10ms analysis performance
3. Support mission-critical reliability
4. Include comprehensive tests

## ๐Ÿ“„ License

MIT License - Built for justice, freedom, and bias-free AI interactions.

## ๐ŸŽฏ Support

For mission-critical support related to the JAHmere Webb Freedom Portal:
- **Court Date**: August 25th, 2025
- **Mission**: Bias-free engineering decisions
- **Priority**: Maximum reliability under pressure

---

*๐Ÿ›ก๏ธ BiasGuard - Protecting AI interactions from bias when it matters most*