feat: Complete code integration of modules (#18)

The complete code integration is done.

Co-authored-by: Sagnik <sagnik7896@gmail.com>
Reviewed-on: sagnik/Project_Velocity#18
This commit is contained in:
2026-04-12 19:20:14 +05:30
parent 248d92042f
commit 4645ff737b
27 changed files with 3393 additions and 50 deletions

View File

@@ -1,6 +1,6 @@
# NemoClaw Setup Truth
Updated: April 2, 2026
Updated: April 12, 2026
## 1. Purpose
@@ -10,15 +10,24 @@ This is not the original intended architecture. This is the current operational
## 2. High-Level Summary
Project Velocity uses the term "NemoClaw" for the reasoning and prompt layer attached to the Sentinel QD Engine. In practice, this is now split into two different concerns:
Project Velocity uses the term "NemoClaw" for the reasoning and prompt layer attached to the Sentinel QD Engine. In practice, this is now split into three different concerns:
1. Prompted reasoning used by the FastAPI backend
2. OpenShell / gateway infrastructure that remains installed on the AWS node
3. Python-native append layers used by Oracle planning, MCP-style tool registration, and workflow dispatch preview
The active FastAPI inference path is NVIDIA-hosted OpenAI-compatible chat completions.
The OpenShell gateway and Ollama are still installed and running as adjacent infrastructure, but they are not the active primary scoring path used by `backend/services/nemoclaw_client.py`.
The root codebase now also includes Python-native compatibility layers inspired by Sourik's Go runtime:
- `backend/services/nemoclaw_runtime.py`
- `backend/services/mcp_registry.py`
- `backend/oracle/persona_service.py`
These append the current root without replacing the active NVIDIA-hosted inference path.
## 3. Node and Network Truth
AWS region: `us-east-1`
@@ -81,6 +90,24 @@ PostgreSQL 14 data directory.
`backend/services/nemoclaw_client.py`
Primary reasoning client used by the FastAPI backend.
`backend/services/nemoclaw_runtime.py`
Python-native append layer for workflow dispatch planning, webhook verification, and claim-style helper behavior.
`backend/services/mcp_registry.py`
Python-native MCP/search tool registry append layer used by Oracle helper surfaces.
`backend/oracle/persona_service.py`
Subordinate Oracle persona planning layer that recommends component templates, renders prompt assets, and augments Oracle v1.
`backend/api/routes_crm.py`
Root PostgreSQL-first CRM append layer for `leads`, `chat_logs`, `kanban`, and analytics routes.
`backend/api/routes_oracle.py`
Root Oracle helper append layer for workflow preview and MCP tool discovery.
`backend/oracle/router_v1.py`
Mounted Oracle v1 API surface for canvas, prompts, persona helpers, and collaboration.
`backend/routers/videos.py`
Marketing-video catalog endpoint for the Sentinel live-session picker.
@@ -182,6 +209,28 @@ No longer the primary path for backend scoring.
5. The backend calls NVIDIA hosted completions using `nvidia/nemotron-3-super-120b-a12b`
6. The result updates QD score state and is broadcast back over WebSocket
### Current Oracle canvas planning append flow
1. Frontend can call `/api/oracle/v1/canvas-pages/{pageId}/prompts`
2. `backend/oracle/prompt_orchestrator.py` builds a retrieval plan
3. `backend/oracle/persona_service.py` recommends reusable component templates and emits a planning note block
4. `backend/services/nemoclaw_runtime.py` produces a workflow dispatch preview for ComfyUI-backed execution
5. `backend/oracle/data_access_gateway.py` runs only whitelisted PostgreSQL queries
6. Oracle commits the resulting components into the active canvas revision
### Current CRM and analytics append flow
1. Root FastAPI mounts `backend/api/routes_crm.py`
2. Canonical root endpoints now exist for:
- `/api/leads`
- `/api/leads/demographics`
- `/api/chat-logs`
- `/api/kanban/board`
- `/api/kanban/move`
- `/api/analytics/sentiment-scatter`
3. These routes use the root asyncpg pool and PostgreSQL-first storage contract
4. CRM WebSocket sync is still intentionally deferred
### Current lead-tagging flow
1. Broker or system calls `/api/sentinel/tag-lead`
@@ -232,6 +281,22 @@ Why it still exists:
What it is not:
- It is not the current primary inference path for backend scoring
- It is not the root source of truth for Oracle or CRM orchestration
## 8.5 Python-Native Append Responsibilities
These are now part of root truth:
- Oracle persona prompt loading and render helpers live in Python, not Go
- MCP/search registration lives in Python, not Go
- Workflow dispatch planning for Oracle-to-Comfy orchestration lives in Python, not Go
- Claim-style helper behavior is appended in Python as a compatibility layer, not as a second backend center
What remains deferred:
- Full production webhook runtime parity with Sourik's Go stack
- Full external search provider execution inside the MCP layer
- Autonomous posting and non-root agent/webhook services
## 9. Prompts