# Serverless Claw Roadmap

> **Navigation**: [← Index Hub](../../INDEX.md)

Our goal: the most customizable, cost-effective, and self-evolving personal AI agent host.

## ✅ Phase 1: MVP

- [x] SST v4 setup
- [x] Telegram Webhook integration
- [x] DynamoDB history persistence
- [x] Basic Tool loop (Calculator, Weather)

## ✅ Phase 2: Developer Foundations

- [x] Standardized `IMemory`, `IChannel`, `ITool` interfaces
- [x] DynamoDB-based session locking (mutex)
- [x] Distilled Long-Term Memory (Reflection Loop)

## ✅ Phase 3: Self-Evolving & Multi-Agent

- [x] 3-Agent Architecture: Main → Coder → Deployer
- [x] EventBridge `AgentBus` for async inter-agent communication
- [x] `dispatchTask` and `triggerDeployment` tools
- [x] AWS CodeBuild sidecar Deployer
- [x] `fileWrite` tool for Coder Agent

## ✅ Phase 4: Safety Guardrails

- [x] Resource Labeling (Protected file list in `fileWrite`)
- [x] Deployment Circuit Breaker (5/day limit, DynamoDB-backed, TDD-verified)
- [x] Pre-flight `validateCode` tool
- [x] Human-in-the-Loop prompt instructions

## ✅ Phase 5: Self-Healing & Rollback

- [x] `checkHealth` tool — `GET /health` probe, rewards with counter decrement
- [x] `triggerRollback` tool — `git revert HEAD` + redeploy
- [x] Build Monitor: Log-based error analysis and auto-fix loop
- [x] Dead Man's Switch: Scheduled health probe + emergency rollback
- [x] SuperClaw orchestrates full deploy→verify→rollback cycle

---

## ✅ Phase 6: Visibility & Native Observability

- [x] **Claw-Trace**: Built-in tracing engine logging to DynamoDB.
- [x] **Claw-Monitor Dashboard**: Next.js 16 (Canary) + Tailwind v4 UI.
- [x] **Adaptive UI**: Full Dark/Light theme support with semantic variables.
- [x] **Milestone 1: High-Fidelity Tracing**: Trace detail views with raw prompt/response/payload inspection.
- [x] **Milestone 2: Neural Path Visualizer**: XYFlow integration for branching agent logic diagrams.
- [x] **Resilience Hub**: Dedicated views for self-healing logs and Dead Man's Switch status.
- [x] **Memory Browser**: Inspect distilled facts, session history, and tool registry.

## ✅ Phase 7: Multi-Model & Hot-Config

- [x] **Provider Hub**: Unified interface for OpenAI, Bedrock (Claude 4.6), DeepSeek (V4 Flash/Pro), and OpenRouter (Gemini/GLM/MiniMax-m2.7).
- [x] **Dynamic Routing**: `ProviderManager` for runtime model selection without redeploys.
- [x] **Config Table**: DynamoDB-backed persistent application settings.
- [x] **Direct Chat**: Dashboard-integrated neural interface for real-time agent interaction.
- [x] **Session Traffic Control**: Manual lock management and zombie session cleanup.

## ✅ Phase 8: Autonomous Self-Improvement Loop

- [x] **Git Push Integration**: CodeBuild pushes approved code changes back to GitHub.
- [x] **Verification Tooling**: `runTests` tool for agents to verify logic before deployment.

## ✅ Phase 9: Evolutionary Memory (Tiered)

- [x] **Tiered Memory**: Separate Long-Term **Facts** from dynamic **Tactical Lessons**.
- [x] **Reflector Agent**: Decoupled asynchronous reflection loop via EventBridge.
- [x] **Smart Recall**: Agents selectively retrieve knowledge via `recallKnowledge` tool.

## ✅ Phase 10: Intelligent Prioritization

- [x] **Granular Metrics**: Added Confidence, Impact, Complexity, Risk, and Urgency signals.
- [x] **ROI-Driven Logic**: Reflector estimates actionable signals for capability gaps.
- [x] **Strategic Telemetry**: Planner dynamically checks `ACTIVE_AGENTS` and `AVAILABLE_TOOLS` to prevent hallucinations.

## ✅ Phase 11: Evolution Control & Verified Lifecycle

- [x] **Evolution Mode**: Toggle between Human-in-the-Loop (`hitl`) and self-coding (`auto`) via `ConfigTable`.
- [x] **Notifier Subsystem**: Centralized EventBridge-driven (`OUTBOUND_MESSAGE`) handler decoupling LLM execution from messaging platforms.
- [x] **Verified Lifecycle**: Full status state machine (`OPEN` -> `PLANNED` -> `PROGRESS` -> `DEPLOYED` -> `DONE`).
- [x] **QA Auditor Agent**: Specialized node for satisfaction verification and loop closure.
- [x] **Deterministic Review**: Scheduled strategic reviews based on gap volume and frequency thresholds.

## ✅ Phase 11.5: Self-Evolution Loop Resilience

- [x] **Standardized Neural Signal Schema**: Enforce JSON-based status reporting and coordination via centralized enums (`TOOLS`, `TRACE_TYPES`).
- [x] **Deep Cognitive Health**: Pulse checks between agents to verify tool reasoning paths.
- [x] **Atomic Deployment Sync**: Ensure `gapIds` are always mapped to `BUILD#` records even if missing from initial tool call.
- [x] **Plan Decomposition**: Hierarchical task breakdown to prevent Coder Agent logic overload.

## ✅ Phase 12: Evolutionary Command Center (ClawCenter v2)

- [x] **Evolution Pipeline Board**: Kanban visualization of the 5-stage gap lifecycle.
- [x] **Hardened Binary Safety Tiers**: Reinforced safety levels (LOCAL, PROD) with strict approval gates.
- [x] **Neural Map**: Dependency graph visualization of agent-to-agent delegation paths and dynamic infrastructure state from DynamoDB.
- [x] **Capabilities Discovery**: Real-time multi-agent tool search and automated roster management.
- [x] **Real-time Resilience Gauge**: Dashboard HUD for Circuit Breaker status and token burn-rate monitoring.
- [x] **Interactive Gap Refinement**: Feedback loop for users to edit and improve strategic plans before implementation.

## ✅ Phase 13: Multi-Modal Chat & File Handling

- [x] **Rich Media Receiver**: Webhook support for Photos, Documents, and Voice messages via S3 bridging.
- [x] **S3 Memory Integration**: Attachments linked to session history with TTL-aware lifecycle.
- [x] **Multi-Modal Provider Support**: Full support for image and file analysis in OpenAI/Minimax adapters first, others deferred.
- [x] **Rich Media Notifier**: Capability for agents to send files, charts, and generated images back to chat channels.

## ✅ Phase 14: Advanced Autonomy

- [x] **Browser Automation**: Playwright Lambda Layer for autonomous web browsing.
- [x] **Promotion Manager**: Agent-driven promotion of validated builds to `prod`.
- [ ] **Skill Marketplace**: CLI-based installation of community tools (Deferred).

## 🏗️ Phase 15: Enterprise Scale (Active Priority)

- [x] **Agent Swarm Isolation**: Multi-tenant partitioning by `orgId`, `teamId`, and `staffId`.
- [x] **Per-tenant EventBridge filtering**: Secure signal routing between organizational boundaries.
- [x] **Multi-Channel Adapters**: Native Slack and Discord support implemented in Notifier.
- [x] **RBAC Policy Sync**: Synchronize organization roles with AWS IAM and SafetyEngine guardrails.

## 🏢 Phase 16: Evolution Analytics & Tool ROI

- [x] **Quantitative Tool Dashboard**: Frequency, success rates, and token cost per tool.
- [x] **Negative Memory Tier**: `FAILED_PLANS#` storage to prevent the Strategic Planner from repeating unsuccessful designs.

## 🏢 Phase 17: Advanced Cognitive Resilience

- [x] **Static Analysis Feed**: Inject `package.json` and environmental constraints directly into the Planner's telemetry.
- [ ] **Interactive Strategic Planning**: "Reject with Reason" feedback loop in dashboard that converts into immediate `TACTICAL_LESSONS`.
- [ ] **Multi-Agent Conflict Resolution**: Detection and mediation of overlapping plans between different autonomous nodes.
- [ ] **Continuous Knowledge Reconciliation**: Automated periodic audits to merge redundant facts and lessons.

---

## 🏗️ Phase 18: Cognitive Efficiency & Edge Optimization (Inspired by Ruflo)

- [ ] **Agent Booster (WASM)**: Integrate WASM-based transforms (regex/AST) to handle trivial code changes (logging, type fixes) without LLM calls.
- [ ] **Local Embedding Cache**: Local SSD/S3-backed cache for frequently used vector embeddings to reduce API dependency.
- [ ] **Pre-flight Static Analysis**: Inject `eslint` and `tsc` results directly into the agent context for faster error correction.

## 🏗️ Phase 19: Advanced Multi-Agent Orchestration (Next Priority)

- [ ] **Dynamic Workflow Engine (ClawFlow)**: Transition from fixed agent roles to a graph-based orchestration engine with parallel execution.
- [ ] **Consensus Protocols**: Implement "Council of Agents" (Raft-lite) for 3-agent agreement on critical production merges.
- [ ] **Unified Claim System**: Dashboard-based ownership management between human and agents for shared tasks.

## 🏗️ Phase 20: Persistent Human-in-the-Loop (Inspired by Mastra)

- [ ] **Workflow State Snapshots**: Persistent DynamoDB snapshots of active workflows allowing mid-task "Suspend & Resume".
- [ ] **Milestone Checkpoints**: Automatic session snapshotting before high-risk agent operations.
- [x] **Live Collaboration Interface**: Real-time collaborative "Mission Control" interface in ClawCenter for human-agent pairing.

## 🏗️ Phase 21: Neural Evolution & Quantitative Evals

- [ ] **SONA Learning Loop**: Track tool success rates to dynamically route tasks to the most cost-effective provider.
- [ ] **Integrated Agent Evals**: Built-in benchmarking suite to measure PR success rate, security regressions, and "Time to Fix".
- [ ] **Trajectory Analysis**: Extract high-performance reasoning patterns from successful traces and inject them as system-level guidance.

## ✅ Phase 22: Cognitive Mission Command (Operational)

- [x] **Unified Mission Control Layout**: Integrated operational phase tracking and real-time metrics into the primary chat interface.
- [x] **Mission Control HUD**: High-fidelity telemetry gauges for Trust, Stability, and ROI.
- [x] **Neural Presence Layer**: Workspace-wide awareness of active humans and agents via MQTT presence signals.
- [x] **Mode Persistence**: State-aware layout toggles for focused "Commander" sessions.

## 🏗️ Phase 23: Spec-Driven Development (SDD) Integration (Active Priority)

- [x] **DynamoDB-Backed Runtime Specs**: Upgrade Strategic Planner to output formal EARS-compliant technical specifications stored statefully in the DynamoDB `PLAN#` distilled memory record for low-latency multi-agent execution.
- [x] **SuperClaw Refinement Touchpoint**: Integrate SuperClaw and the Dashboard as the interactive Human-in-the-Loop (HITL) gate for editing and approving specification records in DynamoDB before execution.
- [x] **Intent-Aligned QA Auditor**: Train the QA Auditor/Critic agents to perform adversarial spec compliance audits verifying codebase changes against the DynamoDB specification.
