Skip to content

Commit 233d26e

Browse files
GeneAIclaude
authored andcommitted
feat: Agent Factory v3.1 - CodeReviewCrew Dashboard Integration
Multi-agent code review system with VSCode dashboard integration: ## CodeReviewCrew (5 agents) - Review Lead, Security Analyst, Architecture Reviewer - Quality Analyst, Performance Reviewer - Memory graph integration for cross-agent learning ## PRReviewWorkflow (10 agents) - Combined CodeReviewCrew + SecurityAuditCrew - Parallel execution for speed - Unified verdict and risk scoring ## Dashboard Updates - "Run Analysis" button (5-agent pro-review) - "Review PR" button (10-agent comprehensive) - Verb-noun naming: Research Topic, Generate Docs, Run Analysis, Review PR, Prep Release, Check Deps ## New Workflows - CodeReviewPipeline: full/standard/quick modes - PRReviewWorkflow: code + security combined - SecureReleasePipeline: go/no-go release gate 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 8edfb70 commit 233d26e

File tree

86 files changed

+19086
-438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+19086
-438
lines changed

.claude/rules/empathy/debugging.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Debugging Patterns
22

33
Auto-generated from Empathy Framework learned patterns.
4-
Total patterns: 10
4+
Total patterns: 11
55

66
---
77

@@ -58,3 +58,8 @@ When debugging similar issues, consider these historical fixes:
5858
- **Root cause**: feat: Add drag-and-drop file upload to debug wizard
5959
- **Fix**: See commit 4c6069af
6060
- **Files**: website/components/debug-wizard/DebugWizard.tsx
61+
62+
### unknown
63+
- **Root cause**: feat: Release v3.0.1 - XML-Enhanced Prompts & Security Fixes
64+
- **Fix**: See commit 8edfb707
65+
- **Files**: .claude/CLAUDE.md, .gitignore, CHANGELOG.md

README.md

Lines changed: 154 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,21 @@
1212
pip install empathy-framework[full]
1313
```
1414

15-
## What's New in v3.0.1
15+
## What's New in v3.1.0
1616

17+
### Agent Intelligence System
18+
- **Smart Router** — Natural language wizard dispatch: "Fix security in auth.py" → routes to SecurityWizard
19+
- **Memory Graph** — Cross-wizard knowledge sharing: bugs, fixes, and patterns connected across sessions
20+
- **Auto-Chaining** — Wizards automatically trigger related wizards based on findings
21+
- **Prompt Engineering Wizard** — Analyze, generate, and optimize prompts with token cost savings
22+
23+
### Resilience Patterns
24+
- **Retry with Backoff** — Automatic retries with exponential backoff and jitter
25+
- **Circuit Breaker** — Prevent cascading failures (CLOSED → OPEN → HALF_OPEN states)
26+
- **Timeout & Fallback** — Graceful degradation with configurable fallbacks
27+
- **Health Checks** — Monitor system components with configurable thresholds
28+
29+
### Previous (v3.0.x)
1730
- **XML-Enhanced Prompts** — Structured prompts for consistent, parseable LLM responses
1831
- **Multi-Model Provider System** — Choose Anthropic, OpenAI, Ollama, or Hybrid mode
1932
- **80-96% Cost Savings** — Smart tier routing: cheap models detect, best models decide
@@ -189,7 +202,7 @@ workflow_xml_configs:
189202
template_name: "code-review"
190203
```
191204
192-
Built-in templates: `security-audit`, `code-review`, `research`, `bug-analysis`
205+
Built-in templates: `security-audit`, `code-review`, `research`, `bug-analysis`, `perf-audit`, `refactor-plan`, `test-gen`, `doc-gen`, `release-prep`, `dependency-check`
193206

194207
```python
195208
from empathy_os.prompts import get_template, XmlResponseParser, PromptContext
@@ -207,6 +220,140 @@ print(result.summary, result.findings, result.checklist)
207220

208221
---
209222

223+
## Smart Router
224+
225+
Route natural language requests to the right wizard automatically:
226+
227+
```python
228+
from empathy_os.routing import SmartRouter
229+
230+
router = SmartRouter()
231+
232+
# Natural language routing
233+
decision = router.route_sync("Fix the security vulnerability in auth.py")
234+
print(f"Primary: {decision.primary_wizard}") # → security-audit
235+
print(f"Also consider: {decision.secondary_wizards}") # → [code-review]
236+
print(f"Confidence: {decision.confidence}")
237+
238+
# File-based suggestions
239+
suggestions = router.suggest_for_file("requirements.txt") # → [dependency-check]
240+
241+
# Error-based suggestions
242+
suggestions = router.suggest_for_error("NullReferenceException") # → [bug-predict, test-gen]
243+
```
244+
245+
---
246+
247+
## Memory Graph
248+
249+
Cross-wizard knowledge sharing - wizards learn from each other:
250+
251+
```python
252+
from empathy_os.memory import MemoryGraph, EdgeType
253+
254+
graph = MemoryGraph()
255+
256+
# Add findings from any wizard
257+
bug_id = graph.add_finding(
258+
wizard="bug-predict",
259+
finding={
260+
"type": "bug",
261+
"name": "Null reference in auth.py:42",
262+
"severity": "high"
263+
}
264+
)
265+
266+
# Connect related findings
267+
fix_id = graph.add_finding(wizard="code-review", finding={"type": "fix", "name": "Add null check"})
268+
graph.add_edge(bug_id, fix_id, EdgeType.FIXED_BY)
269+
270+
# Find similar past issues
271+
similar = graph.find_similar({"name": "Null reference error"})
272+
273+
# Traverse relationships
274+
related_fixes = graph.find_related(bug_id, edge_types=[EdgeType.FIXED_BY])
275+
```
276+
277+
---
278+
279+
## Auto-Chaining
280+
281+
Wizards automatically trigger related wizards based on findings:
282+
283+
```yaml
284+
# .empathy/wizard_chains.yaml
285+
chains:
286+
security-audit:
287+
auto_chain: true
288+
triggers:
289+
- condition: "high_severity_count > 0"
290+
next: dependency-check
291+
approval_required: false
292+
- condition: "vulnerability_type == 'injection'"
293+
next: code-review
294+
approval_required: true
295+
296+
bug-predict:
297+
triggers:
298+
- condition: "risk_score > 0.7"
299+
next: test-gen
300+
301+
templates:
302+
full-security-review:
303+
steps: [security-audit, dependency-check, code-review]
304+
pre-release:
305+
steps: [test-gen, security-audit, release-prep]
306+
```
307+
308+
```python
309+
from empathy_os.routing import ChainExecutor
310+
311+
executor = ChainExecutor()
312+
313+
# Check what chains would trigger
314+
result = {"high_severity_count": 5}
315+
triggers = executor.get_triggered_chains("security-audit", result)
316+
# → [ChainTrigger(next="dependency-check"), ...]
317+
318+
# Execute a template
319+
template = executor.get_template("full-security-review")
320+
# → ["security-audit", "dependency-check", "code-review"]
321+
```
322+
323+
---
324+
325+
## Prompt Engineering Wizard
326+
327+
Analyze, generate, and optimize prompts:
328+
329+
```python
330+
from coach_wizards import PromptEngineeringWizard
331+
332+
wizard = PromptEngineeringWizard()
333+
334+
# Analyze existing prompts
335+
analysis = wizard.analyze_prompt("Fix this bug")
336+
print(f"Score: {analysis.overall_score}") # → 0.13 (poor)
337+
print(f"Issues: {analysis.issues}") # → ["Missing role", "No output format"]
338+
339+
# Generate optimized prompts
340+
prompt = wizard.generate_prompt(
341+
task="Review code for security vulnerabilities",
342+
role="a senior security engineer",
343+
constraints=["Focus on OWASP top 10"],
344+
output_format="JSON with severity and recommendation"
345+
)
346+
347+
# Optimize tokens (reduce costs)
348+
result = wizard.optimize_tokens(verbose_prompt)
349+
print(f"Reduced: {result.token_reduction:.0%}") # → 20% reduction
350+
351+
# Add chain-of-thought scaffolding
352+
enhanced = wizard.add_chain_of_thought(prompt, "debug")
353+
```
354+
355+
---
356+
210357
## Install Options
211358

212359
```bash
@@ -233,9 +380,13 @@ cd empathy-framework && pip install -e .[dev]
233380
| Component | Description |
234381
|-----------|-------------|
235382
| **Empathy OS** | Core engine for human↔AI and AI↔AI collaboration |
383+
| **Smart Router** | Natural language wizard dispatch with LLM classification |
384+
| **Memory Graph** | Cross-wizard knowledge sharing (bugs, fixes, patterns) |
385+
| **Auto-Chaining** | Wizards trigger related wizards based on findings |
236386
| **Multi-Model Router** | Smart routing across providers and tiers |
237387
| **Memory System** | Redis short-term + encrypted long-term patterns |
238-
| **30+ Production Wizards** | Security, performance, testing, docs, compliance |
388+
| **17 Coach Wizards** | Security, performance, testing, docs, prompt engineering |
389+
| **10 Cost-Optimized Workflows** | Multi-tier pipelines with XML prompts |
239390
| **Healthcare Suite** | SBAR, SOAP notes, clinical protocols (HIPAA) |
240391
| **Code Inspection** | Unified pipeline with SARIF/GitHub Actions support |
241392
| **VSCode Extension** | Visual dashboard for memory and workflows |

coach_wizards/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Coach Wizards - 16 Specialized Software Development Wizards
2+
Coach Wizards - 17 Specialized Software Development Wizards
33
44
Level 4 Anticipatory Empathy for software development using the Empathy Framework.
55
@@ -19,6 +19,7 @@
1919
from .monitoring_wizard import MonitoringWizard
2020
from .observability_wizard import ObservabilityWizard
2121
from .performance_wizard import PerformanceWizard
22+
from .prompt_engineering_wizard import PromptEngineeringWizard
2223
from .refactoring_wizard import RefactoringWizard
2324
from .scaling_wizard import ScalingWizard
2425
from .security_wizard import SecurityWizard
@@ -41,4 +42,5 @@
4142
"MigrationWizard",
4243
"MonitoringWizard",
4344
"LocalizationWizard",
45+
"PromptEngineeringWizard",
4446
]

0 commit comments

Comments
 (0)