Files
Project_Velocity/.Agent Context/Sprint 1/Project Velocity Pre-Sourik Purge Report.md
sagnik e241ff800c Missed files (#19)
Co-authored-by: Sagnik <sagnik7896@gmail.com>
Reviewed-on: #19
2026-04-12 19:26:20 +05:30

19 KiB
Raw Blame History

Project Velocity Pre-Sourik Purge Report

Prepared: 2026-04-12
Scope: Current Project_Velocity codebase excluding Sourik for scoring, with a separate compatibility pass against the incoming Sourik tree
Purpose: Identify what should be kept, archived, consolidated, or purged before merging Sourik into the main codebase
Action in this report: No deletion. Assessment only.


Scoring Model

Score Meaning
1 Banish. Strong candidate for removal from repo or immediate quarantine.
2 Very low value. Likely generated, stale, insecure, or misleading.
3 Archive out of main repo. Has historical value but should not live in the main working tree.
4 Review aggressively. Possible duplicate, stale path, or unclear ownership.
5 Transitional. Keep only if a near-term owner confirms it.
6 Useful but not core. Keep if it supports current delivery or migration.
7 Important support artifact.
8 Core implementation path.
9 Highly important operational or product-critical code.
10 Do not purge. Source-of-truth, live runtime, or critical integration surface.

Executive Summary

The current codebase has five major purge or merge-hardening problems before Sourik is brought in:

  1. Repo bloat is severe

    • models/ alone is about 13237.61 MB
    • db assets/ is about 3689.78 MB
    • app/ is about 2588.26 MB
    • Payload/ is about 523.81 MB
    • comfy_engine/ is about 524.58 MB
  2. The repo contains generated and duplicated artifacts

    • app/dist/ is about 442.56 MB
    • app/public/models/ is about 437.58 MB
    • app/assets/House Floor Plans/ is about 958.41 MB
    • the iOS tree has duplicated source files under both:
      • iOS/App, iOS/Core, iOS/Features
      • iOS/velocity/velocity/...
  3. There are many zero-byte placeholder files

    • especially under agents/, backend/api/, backend/database/, backend/sentinel/, comfy_engine/scripts/, infrastructure/aws_scale/, and infrastructure/blackbox_local/
    • these create false surface area and false merge confidence
  4. The repo contains security-sensitive or machine-local artifacts

    • desineuron-l4-node.pem in repo root is unacceptable long-term
    • historical bootstrap scripts contain stale IPs, stale assumptions, and one-off deployment logic
  5. The incoming Sourik tree overlaps the most dangerous places

    • backend API surface
    • frontend API client and dashboard/marketing modules
    • Oracle/Catalyst/Sentinel concepts
    • alternative runtime stacks in Go/Python

The highest-priority pre-merge action is not deleting business logic. It is removing ambiguity.


Quantitative Findings

Largest top-level paths

Path Size
models/ 13237.61 MB
db assets/ 3689.78 MB
app/ 2588.26 MB
comfy_engine/ 524.58 MB
Payload/ 523.81 MB
.Agent Context/ 8.92 MB
backend/ 0.40 MB
iOS/ 0.33 MB
infrastructure/ 0.27 MB

Generated or duplicated asset-heavy paths

Path Size Assessment
app/dist/ 442.56 MB Generated build output. Should not live in source control as working source.
app/public/models/ 437.58 MB Runtime-facing duplicates of model assets.
app/assets/House Floor Plans/ 958.41 MB Source asset tree with duplicate downstream copies.
db assets/ 3689.78 MB Valuable business/demo data, but too heavy for a clean app repo.
models/ 13237.61 MB Runtime model binaries. Belongs in artifact storage, not Git.
Payload/ 523.81 MB Packaged payload/archive staging. Likely not source-of-truth.

Zero-byte files found

Representative zero-byte paths include:

  • agents/docker-compose.agents.yml
  • agents/openclaw_gateway/openclaw.json
  • agents/openclaw_gateway/workspace/AGENTS.md
  • agents/openclaw_gateway/workspace/HEARTBEAT.md
  • agents/skills/meta_ads_manager.py
  • agents/skills/social_publisher.py
  • agents/skills/whatsapp_connector.ts
  • backend/api/routes_crm.py
  • backend/api/routes_oracle.py
  • backend/api/routes_weaver.py
  • backend/database/pinecone_client.py
  • backend/database/schemas.py
  • backend/database/supabase_client.py
  • backend/sentinel/face_tracker.py
  • backend/sentinel/sentiment_engine.py
  • comfy_engine/scripts/auto_term_sheet.py
  • comfy_engine/scripts/queue_manager.py
  • comfy_engine/workflows/cinematic_wan22_14b.json
  • comfy_engine/workflows/dream_weaver_restyle.json
  • infrastructure/aws_scale/node1_agents.tf
  • infrastructure/aws_scale/node2_rendering.tf
  • infrastructure/aws_scale/tailscale_config.sh
  • infrastructure/blackbox_local/docker-compose.local.yml
  • infrastructure/blackbox_local/setup_gpu_env.sh

These files are more dangerous than absent files because they imply functionality that does not exist.


Duplicate Code and Structural Redundancy

iOS duplicate source trees

The following file sets are byte-identical duplicates:

  • iOS/App/ContentView.swift

  • iOS/velocity/velocity/App/ContentView.swift

  • iOS/App/VelocityApp.swift

  • iOS/velocity/velocity/App/VelocityApp.swift

  • iOS/Core/State/AppStore.swift

  • iOS/velocity/velocity/Core/State/AppStore.swift

  • iOS/Core/UI/GlassBlurView.swift

  • iOS/velocity/velocity/Core/UI/GlassBlurView.swift

  • iOS/Core/UI/VelocityTheme.swift

  • iOS/velocity/velocity/Core/UI/VelocityTheme.swift

  • iOS/Features/Dashboard/DashboardView.swift

  • iOS/velocity/velocity/Features/Dashboard/DashboardView.swift

  • iOS/Features/Oracle/OracleView.swift

  • iOS/velocity/velocity/Features/Oracle/OracleView.swift

  • iOS/Features/Sentinel/SentinelView.swift

  • iOS/velocity/velocity/Features/Sentinel/SentinelView.swift

  • iOS/Features/Settings/SettingsView.swift

  • iOS/velocity/velocity/Features/Settings/SettingsView.swift

Interpretation:

  • one tree is acting like a clean source mirror
  • the other is the real Xcode project path
  • keeping both guarantees confusion and future merge drift

Frontend demo/runtime split

There is a real split between:

  • polished app shell modules in app/src/components/modules/*
  • newer Oracle-specific implementation under app/src/oracle/*
  • demo fallback content in app/src/oracle/lib/oracleDemoData.ts

This is not purge-worthy by itself, but it is a clear merge-risk zone because multiple “truths” exist:

  • product shell truth
  • demo truth
  • intended production truth

Scored Purge Table

Path / Scope Type Score Recommendation Reason
desineuron-l4-node.pem file 1 Banish from repo immediately Private key material does not belong in source control. This is a security risk, not just clutter.
3.0.0 file 1 Banish Zero-value stray file with no semantic role.
app/dist/ dir 1 Banish from repo, generate in CI/local only Build output. Large, derived, and guaranteed merge noise.
agents/docker-compose.agents.yml file 1 Banish unless populated immediately Zero-byte placeholder that implies a deployable agents stack that does not exist.
agents/openclaw_gateway/openclaw.json file 1 Banish or implement Zero-byte config placeholder.
agents/openclaw_gateway/workspace/AGENTS.md file 1 Banish Zero-byte placeholder.
agents/openclaw_gateway/workspace/HEARTBEAT.md file 1 Banish Zero-byte placeholder.
agents/skills/meta_ads_manager.py file 1 Banish or implement elsewhere Empty skill file creates false feature surface.
agents/skills/social_publisher.py file 1 Banish or implement elsewhere Same issue.
agents/skills/whatsapp_connector.ts file 1 Banish or implement elsewhere Same issue.
backend/api/routes_crm.py file 1 Banish or fill before merge Empty route file conflicts conceptually with live backend ownership.
backend/api/routes_oracle.py file 1 Banish or redirect to real Oracle router Empty file directly conflicts with actual Oracle implementation path in backend/oracle/router_v1.py.
backend/api/routes_weaver.py file 1 Banish or implement Empty route file.
backend/database/pinecone_client.py file 1 Banish Empty placeholder, no runtime value.
backend/database/schemas.py file 1 Banish Empty placeholder; current schema truth lives elsewhere.
backend/database/supabase_client.py file 1 Banish Empty placeholder and architecturally confusing because current truth favors PostgreSQL-first.
backend/sentinel/face_tracker.py file 1 Banish Empty placeholder.
backend/sentinel/sentiment_engine.py file 1 Banish Empty placeholder.
comfy_engine/scripts/auto_term_sheet.py file 1 Banish Empty placeholder.
comfy_engine/scripts/queue_manager.py file 1 Banish Empty placeholder.
comfy_engine/workflows/cinematic_wan22_14b.json file 1 Banish or replace with real workflow export Empty workflow file is actively misleading.
comfy_engine/workflows/dream_weaver_restyle.json file 1 Banish or replace with real workflow export Same issue.
infrastructure/aws_scale/node1_agents.tf file 1 Banish or implement in a real infra module Empty Terraform file is dead weight.
infrastructure/aws_scale/node2_rendering.tf file 1 Banish or implement in a real infra module Same issue.
infrastructure/aws_scale/tailscale_config.sh file 1 Banish Empty and also contradicts current non-Tailscale operating direction.
infrastructure/blackbox_local/docker-compose.local.yml file 1 Banish or define properly Empty infra stub.
infrastructure/blackbox_local/setup_gpu_env.sh file 1 Banish or define properly Empty infra stub.
backend_deploy_20260401.tgz file 2 Archive outside repo Historical deploy artifact, not source.
Payload/comfy_engine.zip file 2 Archive outside repo Packaged artifact. Valuable for history, not for source control.
remote_bootstrap_20260401.sh file 3 Archive under runbooks or infra-history Historical one-off bootstrap with time-bound assumptions.
patch_nemoclaw_service_20260401.sh file 3 Archive One-off patch script, not durable runtime code.
user_data_bootstrap.sh file 4 Keep only if still current; otherwise archive to infra-history Contains useful S3/bootstrap logic, but also bakes old assumptions.
dw_gateway_v2_min.py file 4 Review for consolidation into backend or comfy service layer Functional, but sits as a root-level one-off service, not in an owned module.
monitor_nvme.py file 4 Archive to ops scripts if still useful Ad hoc operational helper, not core product code.
monitor_qwen.py file 4 Archive to ops scripts if still useful Same issue.
test_scp.txt file 1 Banish Stray scratch file.
app/public/models/ dir 3 Review for consolidation Likely runtime-facing duplicates of source model assets.
app/assets/House Floor Plans/ dir 5 Keep as design/source assets, but deduplicate outputs Real source value exists, but there are duplicate exports in public/ and dist/.
db assets/ dir 5 Move to data repository or artifact store Valuable for demo and product data, but too heavy and merge-hostile for application repo.
models/ dir 2 Move to S3/artifact store, keep manifest only in repo Runtime models should not live in Git. Canonical storage should be S3 or controlled local store.
iOS/App, iOS/Core, iOS/Features dir tree 4 Consolidate with actual Xcode tree Duplicates the active app tree and guarantees drift.
iOS/velocity/velocity/... dir tree 8 Keep as likely real app source-of-truth This appears to be the actual project-backed path tied to Xcode.
app/src/oracle/lib/oracleDemoData.ts file 5 Keep short-term, mark explicitly as demo-only Useful for UI continuity, but dangerous if mistaken for live data path.
app/src/lib/oracleQueryClient.ts file 6 Review against app/src/oracle/lib/oracleApiClient.ts Potential overlap between legacy Oracle client and new Oracle path.
app/src/oracle/lib/oracleApiClient.ts file 8 Keep Newer Oracle contract path.
backend/main.py file 10 Keep Current backend integration root.
backend/routers/sentinel.py file 10 Keep Live Sentinel backbone.
backend/routers/cctv.py file 9 Keep Active auto-mode/CCTV path.
backend/routers/videos.py file 9 Keep Active video catalog runtime path.
backend/routers/vault.py file 9 Keep Live vault and trackable-link logic.
backend/services/nemoclaw_client.py file 10 Keep Current AI runtime integration truth.
backend/services/auto_mode_matcher.py file 9 Keep Core Sentinel automation logic.
backend/oracle/router_v1.py file 9 Keep Real Oracle implementation path, even if not fully mounted in the main runtime.
backend/oracle/* dir tree 8 Keep Important product direction with tests and contracts.
backend/tests/oracle/* dir tree 8 Keep High-value protection for a fragile future merge area.
app/src/components/modules/Sentinel.tsx and sentinel/* module area 9 Keep Core UI for a real implemented subsystem.
app/src/components/modules/Catalyst.tsx file 7 Keep, but compare against Sourik marketing/catalyst ideas Active surface with likely future overlap.
app/src/components/modules/Oracle.tsx + app/src/app/oracle/page.tsx module area 9 Keep Core UI architecture for Oracle.
infrastructure/desineuron_ingress/* dir tree 10 Keep Live infrastructure truth and runbooks.
infrastructure/ops_control_plane/* dir tree 10 Keep Live operational control surface.
.Agent Context/Bibels/* docs 8 Keep and consolidate High-value product/infra truth.

Strong Retain Set

These are the areas that should be treated as current core code, not purge targets:

  • backend/main.py
  • backend/routers/* except empty placeholder files in backend/api/
  • backend/services/*
  • backend/oracle/*
  • backend/db/*
  • backend/tests/*
  • app/src/* excluding clearly demo-only or overlapping legacy Oracle client paths that need review
  • infrastructure/desineuron_ingress/*
  • infrastructure/ops_control_plane/*
  • iOS/velocity/velocity/* as the likely canonical iOS app path
  • .Agent Context/Bibels/*

Redundant or Misleading Areas

1. The agents subtree

Current assessment:

  • almost entirely placeholder surface
  • no runtime truth
  • no concrete ownership
  • high probability of direct collision with Souriks actual agents and MCP work

Recommendation:

  • do not merge any existing non-Sourik agents/ placeholders forward as if they are real
  • either delete them later or move them to a scratch/archive area

2. Duplicate iOS trees

Current assessment:

  • exact duplicate code across two trees
  • one likely mirrors source
  • the nested Xcode-backed tree is the practical source of truth

Recommendation:

  • pick one tree before large merges
  • otherwise every iOS merge becomes a double-merge

3. Root-level ops scripts

Current assessment:

  • some are useful operational history
  • none should remain ambiguous root-level “maybe runtime” assets

Recommendation:

  • either move to infrastructure/archive/ or formalize them under owned infra modules

Compatibility Assessment for Incoming Sourik Merge

This section is based on the shape of the incoming Sourik tree and how it overlaps with the current codebase.

High-Conflict Zones

Incoming Sourik Area Current Main Area Risk Why
Sourik/velocity/api/*.py backend/main.py, backend/routers/*, backend/api/* High Both define backend API surfaces for Catalyst, Sentinel, leads, websockets, and chat/log flows.
Sourik/velocity/frontend/src/lib/api.ts app/src/lib/api.ts, app/src/oracle/lib/oracleApiClient.ts High Conflicting client-side contract layers are likely.
Sourik/velocity/frontend/src/components/... app/src/components/modules/* High Dashboard, marketing, and visual modules are likely to overlap semantically.
Sourik/velocity/internal/oracle/* backend/oracle/* High Two different Oracle implementations or mental models may coexist.
Sourik/velocity/internal/nemoclaw/* backend/services/nemoclaw_client.py, prompt files High Strong conceptual overlap around reasoning/runtime responsibilities.
Sourik/velocity/services/comfyui_service.py infrastructure/desineuron_ingress/*, ops control plane, current Comfy deployment path High Comfy runtime ownership is already established elsewhere.
Sourik/VelocityApp/* iOS/velocity/velocity/* Medium-High iOS naming and feature overlap likely.

Medium-Conflict Zones

Incoming Sourik Area Current Main Area Risk Why
Sourik/velocity/marketing/* backend/api/routes_catalyst.py, app/src/components/modules/Catalyst.tsx Medium Similar domain, different implementation lineage.
Sourik/velocity/mcp/* current repo has almost no real MCP implementation outside ops/docs Medium Less direct code collision, but conceptual ownership must be assigned.
Sourik/velocity/integrations/* current backend service boundaries Medium Could be useful if treated as adapter candidates instead of merged blindly.

Low-Compatibility / High-Archive Areas in Sourik

These should not be merged into main as-is later:

  • .pytest_cache
  • compiled .pyc
  • .env
  • local prototype.db
  • coverage*
  • test output logs
  • bundled .exe
  • scratch guides and extracted intermediates
  • duplicate keys such as desineuron-l4-node.pem

Pre-Merge Filter Recommendations

Before merging Sourik, do this sequence:

  1. Purge or quarantine score 1-2 paths from the current main tree

    • especially secrets, zero-byte placeholders, build output, and archived binaries
  2. Resolve canonical owners

    • iOS canonical tree
    • Oracle backend owner path
    • Comfy/infra owner path
    • AI runtime owner path
  3. Mark demo-only code explicitly

    • especially Oracle demo fallback and any mock client layers
  4. Move heavy artifacts out of repo

    • models
    • generated builds
    • payload zips
    • bulky demo assets if they are not required in the core app repo
  5. Merge Sourik by subsystem, not by tree

    • backend API
    • frontend marketing/dashboard
    • Oracle logic
    • MCP/integrations
    • iOS
  6. Do not allow two runtimes for the same responsibility

    • one Oracle backend
    • one Comfy orchestration path
    • one Nemoclaw integration contract
    • one frontend API client contract per domain

Final Recommendation

The current codebase is not yet ready for a blind merge with Sourik.

The biggest blockers are:

  • fake surface area from empty files
  • duplicated iOS source roots
  • heavy runtime assets in Git
  • root-level operational drift
  • overlapping conceptual ownership around Oracle, Nemoclaw, Catalyst, and API contracts

The right move is:

  • purge ambiguity first
  • then merge subsystem by subsystem

That will save far more time than trying to reconcile two partially overlapping stacks after the fact.