Repository navigation
Full Lifecycle Audit
Canonical source:
docs/FULL_LIFECYCLE_AUDIT.md— this page is rendered from it on every publish; edit the source.
Date: 2026-04-07 Scope: Business analysis → Product ownership → Architecture → Implementation → Testing → UAT → Release decision
ClawAI is a local-first AI orchestration platform that genuinely solves a real problem: giving technical users a self-hosted AI control plane where they can route prompts to local or cloud models, maintain persistent memory, ground answers in uploaded documents, and inspect every routing decision. The platform has strong foundational engineering across its microservices (17 at the time), a comprehensive Next.js frontend with 17 pages and 60+ components, and mature Docker orchestration.
Overall Assessment: CONDITIONAL APPROVAL for internal/staged rollout.
The platform is approximately 75% production-ready. The core chat→route→execute→respond pipeline works end-to-end. Memory extraction, file grounding, context assembly, and routing transparency are all wired. However, key gaps remain in message resilience (recently added DLQ), semantic search (no embeddings), and test coverage (312 unit tests but zero E2E).
Confidence Scores:
| Dimension | Score |
|---|---|
| Business viability | 7/10 |
| Technical completeness | 8/10 |
| UX trust | 7/10 |
| Operational readiness | 7/10 |
| Test confidence | 6/10 |
| Security posture | 7/10 |
| Release risk | 6/10 (medium) |
ClawAI is a local-first AI gateway with routing intelligence. It is NOT a chatbot. It is NOT a simple wrapper around Ollama. It is a multi-model orchestration platform that:
- Routes each user prompt to the best available model (local or cloud)
- Assembles context from memory, files, and conversation history before execution
- Provides full transparency into routing decisions
- Extracts and manages persistent user memories
- Supports 5 cloud AI providers + local Ollama
- Tracks usage, cost, and performance
Core value proposition: "One AI workspace that intelligently routes your prompts, remembers your context, and lets you inspect every decision."
Technical users and teams need a unified AI interface that:
- Works with local models (privacy, cost, speed) AND cloud models (quality, capabilities)
- Maintains context across conversations
- Grounds answers in uploaded documents
- Is fully self-hosted and transparent
- Solo developers/power users — want local AI with cloud fallback
- Small teams — want shared AI workspace with memory and files
- Privacy-conscious organizations — want local-first with cloud opt-in
- AI platform engineers — want to build AI workflows on top of routing
- vs ChatGPT/Claude: ClawAI is self-hosted, multi-provider, with routing transparency
- vs Ollama WebUI: ClawAI adds intelligent routing, memory, file grounding, multi-provider
- vs LangChain/LlamaIndex: ClawAI is a complete product, not a framework
- vs OpenRouter: ClawAI includes local execution, memory, file grounding
- Narrow audience: Requires Docker knowledge, not consumer-friendly
- Ollama dependency: Router quality depends on local model quality
- Cloud providers change fast: Must keep connector adapters updated
The product solves a real problem for a specific audience. The positioning is clear. The risk is audience size, not product-market fit.
"The most transparent, intelligent AI routing platform you can self-host."
| Module | Priority | Justification |
|---|---|---|
| Chat + Threads | P0 | Core user interaction |
| Routing (7 modes) | P0 | Core differentiator |
| Ollama integration | P0 | Local-first promise |
| Context assembly | P0 | Answer quality depends on it |
| Memory | P1 | Long-term value, but works without it |
| File grounding | P1 | High value for document-heavy use cases |
| Connectors (5 providers) | P1 | Multi-provider is a key selling point |
| Routing transparency | P1 | Trust and explainability |
| Audit/Usage tracking | P2 | Enterprise feature |
| Admin/Settings | P2 | Configuration surface |
| Observability | P2 | Operations feature |
| Client/Server logs | P2 | Debugging feature |
- NOT a consumer chatbot (no signup flow, no freemium)
- NOT a framework/SDK (it's a complete product)
- NOT a model training platform (inference only)
YES, with minor sprawl. The 17-page frontend is comprehensive but each page serves a clear purpose. The risk is complexity creep in settings/admin/routing-policies.
| Module | Business Value | User Value | Maturity | Risk |
|---|---|---|---|---|
| Chat | HIGH — core interaction | HIGH | 9/10 | Low |
| Threads | HIGH — context persistence | HIGH | 9/10 | Low |
| Memory | HIGH — personalization | MEDIUM | 7/10 | Medium (no contradiction detection) |
| Context Assembly | HIGH — answer quality | HIGH (invisible) | 8/10 | Low |
| Routing | CRITICAL — differentiator | HIGH | 8/10 | Medium (stale health cache) |
| Ollama Router | HIGH — intelligence | MEDIUM | 7/10 | Medium (model quality dependent) |
| File Grounding | HIGH — document workflows | HIGH | 6/10 | High (no semantic search) |
| Connectors | HIGH — multi-provider | HIGH | 9/10 | Low |
| Model Selector | HIGH — user control | HIGH | 9/10 | Low |
| Audit/Usage | MEDIUM — enterprise need | LOW | 8/10 | Low |
| Settings/Admin | MEDIUM — configuration | MEDIUM | 8/10 | Low |
| Client/Server Logs | MEDIUM — debugging | LOW | 8/10 | Low |
| Docker/Install | HIGH — onboarding | HIGH | 9/10 | Low |
| i18n (9 languages) | MEDIUM — international | HIGH for target | 9/10 | Low |
| Dark Mode | LOW — aesthetic | MEDIUM | 9/10 | Low |
- Routing transparency: Users can expand any message to see provider, model, confidence, reasons, privacy/cost class
- Model selector: Intuitive grouped dropdown in message composer
- File attachment: Paperclip button with file picker in chat
- Thread settings: System prompt, temperature, model, context packs — comprehensive
- Mobile responsive: Collapsible sidebar, responsive grids
- 8-language i18n: Including Arabic RTL support
- Dark mode: CSS variable-based, system preference aware
- No memory influence indicator: Users can't see which memories affected a response
- No file attribution: When files influence answers, there's no visible "grounded in: file.pdf"
- Polling not streaming: Uses 2-second polling instead of real-time SSE chunks
- No onboarding wizard: New users face a blank dashboard with no guidance
- No keyboard shortcuts: Power users can't navigate efficiently
Conditionally yes. The routing transparency is excellent — users can see exactly why a model was chosen. But the lack of memory/file influence indicators means the "context" part of the product is invisible, which undermines trust in answer quality.
- Clean microservice boundaries: Each service owns its data, no shared databases
- Event-driven: RabbitMQ with DLQ and retry (recently added)
- Context assembly: Real pipeline fetching memories + packs + files with token budgeting
- Security layers: JWT + RBAC + rate limiting + Helmet + Zod validation + encryption
- Comprehensive logging: StructuredLogger across all services, Elasticsearch-ready
- 7 PostgreSQL instances: ~1.4GB RAM for databases alone. Consider consolidating.
- No circuit breaker: One failing service can cascade. Recently identified but not yet implemented.
- No background job queue: File processing and memory extraction are synchronous in request threads.
- Health cache staleness: Routing decisions may use stale connector health data.
- No distributed tracing: X-Request-ID added but no OpenTelemetry.
YES. The microservice architecture supports independent scaling, the event bus enables async workflows, and the context assembly pipeline delivers on the "intelligent routing with context" promise.
| Module | Status | Reason |
|---|---|---|
| Chat (threads + messages) | PASS | Full CRUD, feedback, regeneration, polling |
| Routing (7 modes) | CONDITIONAL PASS | Works but health cache can be stale |
| Ollama Router | CONDITIONAL PASS | Temp=0, Zod, allowlist — but no model existence validation |
| Memory CRUD | PASS | Create, edit, delete, toggle, user-scoped |
| Memory Extraction | CONDITIONAL PASS | Ollama-based, Zod validated, dedup — but no contradiction detection |
| Context Assembly | PASS | 4 sources assembled with token budgeting |
| Context Packs | PASS | CRUD + attached to threads + injected into context |
| File Upload + Chunking | PASS | Upload, validate, chunk (JSON/CSV/MD/text) |
| File Grounding | CONDITIONAL PASS | Chunks injected but no semantic search (brute force) |
| Connectors (5 providers) | PASS | Health check, model sync, encrypted config |
| Model Selector | PASS | Grouped dropdown, per-thread + per-message |
| Routing Policies | CONDITIONAL PASS | Recently wired — highest-priority policy overrides mode |
| Auth (JWT + RBAC) | PASS | Refresh rotation, 3 roles, password management |
| Audit (10 events) | PASS | Comprehensive event tracking + usage ledger |
| SSE Streaming | CONDITIONAL PASS | Event bus exists but no token-by-token chunks |
| Settings/Admin | PASS | Language, theme, password, user management |
| Docker/Install | PASS | Automated scripts, 22 containers, health checks |
| CI/CD | PASS | 4-job GitHub Actions pipeline |
| Logging | PASS | Structured, redacted, Elasticsearch-ready |
| Security | CONDITIONAL PASS | Rate limiting + Helmet + encryption — but no TLS |
- Memory injected but outdated: No mechanism to expire old memories
- File chunked but never found: Without embeddings, all chunks are injected regardless of relevance
- Router returns model that doesn't exist: No model registry validation post-decision
- Config changed but runtime doesn't apply: Requires container restart for env changes
- Fallback loops: If all providers fail, error propagates to user with generic message
- Stale health cache: Router may send to dead provider between health checks
- Duplicate memories accumulate: Dedup uses prefix match which can miss semantic duplicates
- Frontend polls forever: If backend is down, polling continues indefinitely with no backoff
- Admin creates impossible state: Can set routing policies that conflict with manual overrides
- Support can't trace cross-service: X-Request-ID added but no unified trace view
| Layer | Current | Needed |
|---|---|---|
| Unit tests | 312 across the services | Add 2 untested services (logs) |
| Integration tests | 0 | Critical: message flow, memory extraction, file grounding |
| E2E tests | 0 (Playwright installed) | Critical: login → chat → response → verify |
| API contract tests | 0 | Needed for inter-service contracts |
| Load tests | 0 | Needed before production |
| Manual UI tests | Ad-hoc | Need structured checklist |
| Scenario | Would Pass? | Why/Why Not |
|---|---|---|
| New user creates thread, sends message, gets response | YES | Core flow works |
| User selects specific model, verifies it was used | YES | Model selector + attribution badges |
| User uploads file, asks about it, gets grounded answer | PARTIAL | File chunks injected but no visible attribution |
| User creates memory, verifies it influences next answer | PARTIAL | Memory injected but no visible indicator |
| Admin creates routing policy, verifies it's enforced | YES | Recently wired |
| Support engineer traces a failed request | PARTIAL | Structured logs exist but no unified trace view |
| Buyer evaluates product for team use | CONDITIONAL | Impressive features, needs onboarding + docs |
- 17-page frontend with loading/empty/error states
- 8-language support with RTL
- Automated install scripts
- Comprehensive Docker orchestration
- Routing transparency panel
- Model selector with provider groups
- File attachment in chat
- Context pack management
- No onboarding wizard or guided tour
- No public documentation site
- No demo mode / sandbox
- No pricing/billing hooks
- No team/organization support
- No export functionality (threads, memories)
- Polling instead of streaming
| Rollout Stage | Decision | Condition |
|---|---|---|
| Internal use (team) | GO | As-is |
| Staged rollout (beta users) | CONDITIONAL GO | Fix: E2E tests, add onboarding, add memory indicators |
| Public production | NOT YET | Needs: TLS, circuit breaker, streaming, load testing, billing |
- Add E2E tests for critical user flows (login → chat → response)
- Add memory influence indicator to message bubbles
- Add file attribution indicator to grounded responses
- Implement real token-by-token SSE streaming
- Add onboarding wizard for first-time users
- Add TLS/HTTPS support in Nginx
- Add circuit breaker for inter-service HTTP calls
- Add vector embeddings for semantic file search
- Add contradiction detection for memories
- Add export functionality (threads as JSON/MD)
- Clean microservice architecture with service-level data ownership
- Ollama-assisted intelligent routing with anti-hallucination
- Comprehensive context assembly (memories + packs + files + history)
- Routing transparency visible to users (confidence, reasons, privacy/cost)
- 8-language i18n with RTL support
- Automated install scripts (bash + PowerShell)
- 312 unit tests with CI/CD pipeline
- Rate limiting + Helmet + encryption across all services
- Full audit trail with 10 event types + usage ledger
- Comprehensive 563-line CLAUDE.md for instant developer context
"A self-hosted AI workspace that intelligently routes your prompts to the best model, remembers your context, grounds answers in your documents, and lets you inspect every decision."
ClawAI Wiki · source-controlled under wiki/ · generated/mirrored from the current repository knowledge layer.
ClawAI Wiki
Product
- Product-Vision
- Flagship-Features
- Business-Overview
- Requirements-Register
- Drift-Log
- Runtime-Managed-Connector-Providers
- Threads
- ADR-Index
Architecture
- System-at-a-Glance
- Architecture-Map
- System-Architecture
- Message-Flow
- End-to-End-Data-Flow
- Routing-Engine
- Event-Bus
- Security-Architecture
Platform
- Backend-Services
- Frontend-Architecture
- Shared-Packages
- Database-Reference
- API-Reference
- Provider-Catalog
- Memory-and-Context-Architecture
- File-Support-Architecture
- Research-and-Web-Crawling
Runtime & Ops
- Docker-Guide
- Nginx-Reference
- CI-CD-Pipeline
- Logging-and-Observability
- Operational-Runbooks
- Troubleshooting
Quality
Engineering OS
- AI-Native-Engineering-OS
- Generated-Manifests
- Rules-Catalog
- Skills-Catalog
- Context-Layer
- Engineering-Memory
- Tooling-and-Automation
- Scripts-and-Operations
- ESLint-and-Architecture-Enforcement
- Extended-Work-Skills
Agents
Reference