Generated Files vs Existing Files - Evaluation Report
Date: December 2, 2025 Evaluator: Claude Code Decision: KEEP EXISTING FILES - Archive generated files
Executive Summary
After a comprehensive line-by-line comparison, the existing production files are vastly superior to the generated reference implementations in all five categories. The generated files appear to be simplified templates with placeholder URLs, while the existing files are production-ready with complete feature sets, real deployment URLs, and robust error handling.
Recommendation: Archive the generated files and maintain the existing production implementations.
Detailed Comparison
1. Static Registry Configuration
| Aspect | Generated | Existing | Winner |
|---|---|---|---|
| File | backend/config/static_registry.py |
miz-oki-adk-agents/boss/cell_registry_config.py |
EXISTING |
| Lines of Code | 41 | 224 | Existing (5.5x) |
| Cell Coverage | 8 placeholders | Complete 32 cells | Existing |
| URLs | Placeholder (mizoki-cell-01-research-uc.a.run.app) |
Real production (miz-oki-cell1-698171499447.us-central1.run.app) |
Existing |
| Dual Registry | No | Yes (cell IDs + capabilities) | Existing |
| Input Normalization | No | Yes (cell3, cell03, cell_3 all work) |
Existing |
| Capabilities Mapping | No | Yes (CELL_CAPABILITIES dict) | Existing |
| Env Var Fallback | No | Yes | Existing |
Generated (41 lines):
CELL_REGISTRY = {
"research": "https://mizoki-cell-01-research-uc.a.run.app", # PLACEHOLDER
"coder": "https://mizoki-cell-02-coder-uc.a.run.app", # PLACEHOLDER
# ... only 8 entries
}
Existing (224 lines):
CELL_REGISTRY = {
"cell01": "https://miz-oki-cell1-698171499447.us-central1.run.app", # REAL
"cell02": "https://miz-oki-cell2-698171499447.us-central1.run.app", # REAL
# ... complete 32 cells with real URLs
}
CAPABILITY_REGISTRY = {
"research": "https://miz-oki-cell1-698171499447.us-central1.run.app",
"coder": "https://miz-oki-cell2-698171499447.us-central1.run.app",
# ... 30+ capability mappings
}
CELL_CAPABILITIES = {
"cell01": ["data-ingestion", "source-discovery"],
# ... complete capability descriptions
}
2. Cell Invoker (A2A Communications)
| Aspect | Generated | Existing | Winner |
|---|---|---|---|
| File | backend/orchestration/invoker.py |
miz-oki-adk-agents/boss/cell_invoker.py |
EXISTING |
| Lines of Code | 69 | 410 | Existing (6x) |
| Sync Support | Yes | Yes | Tie |
| Async Support | No | Yes (invoke_cell_async) |
Existing |
| Invocation Patterns | 1 (by capability) | 3 (capability, cell ID, multiple) | Existing |
| Standalone Functions | No | Yes (invoke_cell_http, ping_cell) |
Existing |
| Singleton Pattern | No | Yes (cell_invoker = CellInvoker()) |
Existing |
| Timeout Config | Fixed 120s | Configurable | Existing |
| HTTP Library | requests |
requests + httpx + aiohttp |
Existing |
Generated (69 lines):
class CellInvoker:
def invoke_cell(self, capability, payload, session_id):
# Single sync method only
response = requests.post(target_url, json=payload, headers=headers, timeout=120)
Existing (410 lines):
class CellInvoker:
def invoke_cell(self, capability, payload, session_id, timeout=120):
# Sync with configurable timeout
async def invoke_cell_async(self, capability, payload, session_id, timeout=120):
# Full async support for FastAPI
def invoke_cell_by_id(self, cell_id, payload, session_id, timeout=120):
# Direct cell ID invocation
def invoke_multiple_cells(self, tasks, session_id):
# Batch invocation
# Standalone async functions
async def invoke_cell_http(cell_url, payload): ...
async def ping_cell(cell_url): ...
# Singleton + convenience functions
cell_invoker = CellInvoker()
def invoke_cell(capability, payload, session_id): ...
3. Unified Memory Manager (Firestore)
| Aspect | Generated | Existing | Winner |
|---|---|---|---|
| File | backend/shared/memory/unified_memory.py |
miz-oki-adk-agents/boss/unified_memory.py |
EXISTING |
| Lines of Code | 67 | 253 | Existing (3.8x) |
| Core Methods | 3 | 7 | Existing |
| Artifact Retrieval | No | Yes (get_artifacts()) |
Existing |
| Session Metadata | No | Yes (get/update_session_metadata()) |
Existing |
| Session Lifecycle | No | Yes (end_session()) |
Existing |
| Routing Observability | No | Yes (add_routing_decision()) |
Existing |
| Cleanup Utilities | No | Yes (cleanup_old_sessions()) |
Existing |
| Type Hints | Partial | Complete | Existing |
| Convenience Functions | No | Yes (get_or_create_session()) |
Existing |
Generated (67 lines):
class UnifiedMemory:
def add_interaction(self, role, content, agent_id="boss"): ...
def store_agent_artifact(self, agent_id, artifact_type, data): ...
def get_full_context(self, limit=10): ...
Existing (253 lines):
class UnifiedMemory:
def add_interaction(self, role, content, agent_id="boss"): ...
def store_agent_artifact(self, agent_id, artifact_type, data): ...
def get_full_context(self, limit=10): ...
def get_artifacts(self, artifact_type=None, limit=10): ...
def get_session_metadata(self): ...
def update_session_metadata(self, metadata): ...
def end_session(self): ...
def add_routing_decision(self, task, routed_to, confidence, reasoning): ...
def get_routing_history(self, limit=20): ...
# Convenience functions
def get_or_create_session(session_id): ...
def cleanup_old_sessions(days=7): ...
4. Boss Agent Core
| Aspect | Generated | Existing | Winner |
|---|---|---|---|
| File | backend/services/boss_agent/core.py |
miz-oki-adk-agents/boss/app.py |
EXISTING |
| Framework | Flask | FastAPI | Existing (async) |
| Endpoints | 2 (/health, /api/chat) |
10+ | Existing |
| Agent Registry | None | Complete 32-cell | Existing |
| Routing Logic | Basic keyword | Intelligent with intent analysis | Existing |
| Session Integration | Basic | Full session manager | Existing |
| LLM Integration | None shown | Claude + Gemini | Existing |
5. Frontend API Service
| Aspect | Generated | Existing | Winner |
|---|---|---|---|
| File | frontend/src/services/mizokiApi.ts |
miz-oki-command-center-ui/lib/mizoki-api.ts |
EXISTING |
| Lines of Code | 63 | 232 | Existing (3.7x) |
| Framework | React (REACT_APP_*) |
Next.js (NEXT_PUBLIC_*) |
Existing (correct) |
| API Methods | 2 | 8 | Existing |
| Base URL | localhost:8080 |
Real production URL | Existing |
| Type Definitions | 1 interface | 4 interfaces | Existing |
| Error Handling | Basic | Detailed with body parsing | Existing |
Generated (63 lines):
const API_BASE_URL = process.env.REACT_APP_API_URL || 'http://localhost:8080';
export const MizokiApi = {
sendMessage: async (message, sessionId) => { ... },
checkHealth: async () => { ... }
};
Existing (232 lines):
const API_BASE_URL = process.env.NEXT_PUBLIC_BOSS_AGENT_URL ||
'https://boss-agent-adk-698171499447.us-central1.run.app';
export const MizokiApi = {
sendMessage: async (message, sessionId) => { ... },
processTask: async (task, userId, context) => { ... },
getAgents: async () => { ... },
getAgentDetails: async (agentId) => { ... },
executeAgent: async (agentId, task, context) => { ... },
getRegistry: async () => { ... },
getSystemStatus: async () => { ... },
checkHealth: async () => { ... },
getBaseUrl: () => API_BASE_URL
};
Summary Comparison Table
| Component | Generated | Existing | Improvement Factor |
|---|---|---|---|
| Static Registry | 41 lines, 8 placeholders | 224 lines, 32 real URLs | 5.5x more complete |
| Cell Invoker | 69 lines, sync only | 410 lines, sync + async | 6x more complete |
| Unified Memory | 67 lines, 3 methods | 253 lines, 11 methods | 3.8x more complete |
| Boss Agent | Flask, 2 endpoints | FastAPI, 10+ endpoints | Different framework |
| Frontend API | 63 lines, 2 methods | 232 lines, 8 methods | 3.7x more complete |
Final Verdict
Decision: ARCHIVE GENERATED FILES
The generated files serve no purpose in the production codebase:
- Placeholder URLs - Would break production if deployed
- Missing Features - Lack async support, multiple invocation patterns, observability
- Wrong Framework - React instead of Next.js for frontend
- Incomplete Coverage - 8 cells vs 32 cells
- No Session Lifecycle - Missing cleanup, metadata management
Action Plan
- Move generated files to
archive/reference_implementations/ - Keep existing production files unchanged
- Document this evaluation for future reference
Archive Location
archive/
└── reference_implementations/
└── 2025-12-02_generated_fixes/
├── backend/
│ ├── config/
│ │ └── static_registry.py
│ ├── orchestration/
│ │ └── invoker.py
│ ├── services/
│ │ └── boss_agent/
│ │ └── core.py
│ └── shared/
│ └── memory/
│ └── unified_memory.py
├── frontend/
│ └── src/
│ └── services/
│ └── mizokiApi.ts
└── README.md (this evaluation)