Rendering markdown & diagrams...
1 # TECHNICAL SPECIFICATION DIRECTIVE: DISTRIBUTED ABLITERATED COGNITIVE ARCHITECTURE
2 ## HIGH-LEVEL DESIGN (HLD): DISTRIBUTED AGENT & INFINITE GRAPH-WEIGHTED MEMORY
3 **PUBLICATION CONTROL IDENTIFIER:** SPEC-DOC-HLD-01
4 **COMMAND AUTHORITY:** CHIEF ARCHITECT (SHUBHAM)
5 **OPERATIONAL ENVIRONMENT:** DISTRIBUTED ASYMMETRICAL EDGE COMPUTE & MASS STORAGE
6 **EFFECTIVE DATE:** 2026-11-09
7 **LIFECYCLE STATUS:** ACTIVE SPECIFICATION // PRODUCTION BASELINE
8
9 ---
10
11 ### 1.0 OPERATIONAL MANDATE & STRATEGIC VISION
12
13 1. **Strategic Intent:** Construct a permanently persistent, distributed, unconstrained (abliterated) cognitive agent operating across an asymmetrical heterogeneous cluster. The agent must possess an essentially infinite, non-degrading episodic and semantic memory backed by multi-terabyte physical disk arrays.
14 2. **Core Architectural Pivot:** Transition beyond single-system, ephemeral chat memory into a self-reinforcing, graph-weighted, multi-tier associative memory engine. Memory is not a flat text log; it is a live directed graph where concepts are nodes, relationships are weighted edges, and recall operates via semantic vector entry combined with spreading activation.
15 3. **Cluster Allocation Principle:**
16 * **Cognitive Master (Mac Silicon):** High-bandwidth neural inference engine (Apple Metal acceleration, 120β273 GB/s memory bus). Executes unaligned 7Bβ14B reasoning and coding models.
17 * **Tactical Body (Dell `dell-ss`):** 24/7 headless execution worker, kinetic sandbox, and permanent multi-terabyte storage vault (Internal 240GB SSD + Dual 1TB External HDDs).
18 * **Decision & Routing Engine ("Laya"):** A deterministic cognitive layer governing whether an objective requires fast direct execution, graph traversal, or high-order multi-step decomposition.
19
20 ---
21
22 ### 2.0 MACRO-TOPOGRAPHY & COMPUTE INFRASTRUCTURE
23
24 ```
25 ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
26 β MACRO CLUSTER ARCHITECTURE β
27 ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
28 β β
29 β PRIMARY OPERATOR (CLI / Mobile / Terminal / Claude Code) β
30 β β β
31 β βΌ β
32 β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
33 β β COGNITIVE MASTER: APPLE SILICON MAC (M4 / M4 PRO) β β
34 β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β
35 β β β’ Inference Engine: llama-server / Metal GPU Acceleration β β
36 β β β’ Primary Model: DeepSeek-R1-Distill-Qwen-7B-abliterated β β
37 β β β’ Secondary / High-Order: Qwen2.5-Coder-14B-abliterated β β
38 β β β’ Volatile Working Buffer: L0 Context Window (8Kβ32K Tokens) β β
39 β ββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ β
40 β β Secure High-Speed C2 Channel β
41 β β (SSH Keypair / Tailscale Mesh) β
42 β βΌ β
43 β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
44 β β TACTICAL BODY: DELL INSPIRON 3521 (dell-ss @ 192.168.31.65) β β
45 β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β
46 β β β’ Executive Runtime: Lightweight Daemon / Python Controller β β
47 β β β’ Decision Layer ("Laya"): Intent Routing & State Evaluation β β
48 β β β’ Execution Sandbox: Non-interactive root bash via agent β β
49 β β β’ Embeddings: embeddinggemma-2 / bge-small (Fast CPU inference) β β
50 β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β
51 β β MULTI-TERABYTE STORAGE MATRIX: β β
52 β β βββ /dev/sda3 (146 GB Fast SSD) -> L1 Hot Graph & Schema β β
53 β β βββ /dev/sdb1 (931 GB HDD-1) -> L2 Warm Semantic Vectorsβ β
54 β β βββ /dev/sdc1 (931 GB HDD-2) -> L3 Cold Archival Vault β β
55 β β βββ /dev/sda5 (77.1 GB NTFS) -> PROTECTED (ROE-01 D:) β β
56 β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
57 ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
58 ```
59
60 ---
61
62 ### 3.0 MULTI-TIER INFINITE MEMORY HIERARCHY
63
64 The memory architecture solves the fundamental trade-off between latency, context limits, and infinite storage capacity through four distinct physical tiers:
65
66 | Tier | Designation | Storage Medium | Volume / Capacity | Latency Profile | Engine / Format | Scope & Content |
67 | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
68 | **L0** | **Volatile Register** | Apple Unified RAM | In-flight context pool | < 1 ms | Native KV-Cache | Active 8Kβ32K token conversation scratchpad, immediate instruction buffer. |
69 | **L1** | **Hot Graph Cache** | Dell ADATA SSD (`/dev/sda3`) | 146 GB ext4 (`/var/neural_memory/`) | 1β3 ms | SQLite3 (WAL Mode) + JSON-LD | Core identity, active session nodes, high-frequency facts, and system state indices. |
70 | **L2** | **Warm Graph Store** | External HDD 1 (`/mnt/hdd1`) | 931.5 GB NTFS (`in_hdd`) | 15β40 ms | SQLite-vec / Chroma / DuckDB | Full weighted graph of entities and relations, 768-dim embeddings, skill scripts. |
71 | **L3** | **Cold Archival Vault** | External HDD 2 (`/mnt/hdd2`) | 931.5 GB Volume (`mass_vault`) | 30β80 ms | Parquet / Tarball / Raw Text | Infinite chronological episodic logs, complete conversation transcripts, codebases. |
72
73 ---
74
75 ### 4.0 THE GRAPH-WEIGHTED MEMORY ENGINE
76
77 #### 4.1 Concept: Beyond Flat Vector Databases
78 Traditional vector retrieval (RAG) performs naive cosine similarity, retrieving disjoint text fragments that lose relational causality. The Graph-Weighted Edge Memory engine organizes intelligence into an explicit semantic knowledge graph:
79 * **Nodes ($V$):** Discrete entities (people, devices, storage volumes, software tools, historical incidents, constraints). Every node possesses a semantic vector embedding.
80 * **Edges ($E$):** Directed, typed relations ($A \xrightarrow{\text{RELATION}} B$) connecting concepts.
81 * **Weights ($W_{ij}$):** Dynamic scalar values $[0.0, 1.0]$ representing connection strength, reinforced through usage and decayed through time.
82
83 ```
84 ββββββββββββββββββββββββ
85 β NODE: DELL-SS (NODE) β
86 ββββββββββββ¬ββββββββββββ
87 β
88 ββββββββββββββββββΌβββββββββββββββββ
89 β [CONTAINS] β [PROTECTS] β [MOUNTS]
90 β Weight: 0.98 β Weight: 1.00 β Weight: 0.95
91 βΌ βΌ βΌ
92 ββββββββββββββββββββ βββββββββββββββββ ββββββββββββββββββββ
93 β NODE: AMD GPU β β NODE: DRIVE D β β NODE: HDD1 & HDD2β
94 β (Radeon HD 8730M)β β (/dev/sda5) β β (2x 1TB Storage) β
95 ββββββββββ¬ββββββββββ βββββββββββββββββ ββββββββββββββββββββ
96 β
97 β [USES_DRIVER] (Weight: 0.99)
98 βΌ
99 ββββββββββββββββββββ
100 β NODE: AMDGPU β
101 β (Linux Driver) β
102 ββββββββββββββββββββ
103 ```
104
105 #### 4.2 Spreading Activation Retrieval
106 1. **Entry Point:** The incoming query is embedded into a 768-dim vector using `embeddinggemma-2`.
107 2. **Anchor Identification:** The top-$K$ most similar nodes are retrieved via vector proximity.
108 3. **Graph Traversal:** From each anchor node, energy spreads along outward edges proportional to edge weights ($W_{ij}$).
109 4. **Context Assembly:** Connected subgraph nodes exceeding an activation threshold $\theta$ are injected into the cognitive model's L0 prompt, providing complete relational context with zero hallucination.
110
111 ---
112
113 ### 5.0 THE DECISION & ROUTING ENGINE ("LAYA")
114
115 The Decision Model ("Laya") acts as the executive triage gatekeeper preceding heavy LLM execution:
116
117 ```
118 INCOMING OPERATOR INTENT
119 β
120 βΌ
121 βββββββββββββββββββββββββββββββββ
122 β DECISION ENGINE ("LAYA") β
123 βββββββββββββββββ¬ββββββββββββββββ
124 β
125 βββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββ
126 βΌ βΌ βΌ
127 [TIER 1: REFLEX] [TIER 2: ASSOCIATIVE] [TIER 3: REASONING]
128 Deterministic Match Memory / Knowledge Task Complex / Multi-Step
129 β’ Direct shell ping β’ "Recall GPU driver" β’ "Write new driver wrapper"
130 β’ Telemetry query β’ "What is ROE-01?" β’ "Debug storage fault"
131 β’ node-status β’ Traverses Graph Memory β’ Invokes DeepSeek-R1 7B
132 β β β
133 βΌ βΌ βΌ
134 Direct Execution Graph-Augmented Prompt Full Chain-of-Thought
135 (Latency: <50ms) (Latency: ~200ms) (Latency: 1β5s)
136 ```
137
138 ---
139
140 ### 6.0 HARDWARE & MODEL TOPOLOGY SPECIFICATION
141
142 | Component | Host Platform | Physical Resource | Software Runtime | Operational Function |
143 | :--- | :--- | :--- | :--- | :--- |
144 | **Reasoning Engine** | Mac M4 | Apple Silicon GPU (Metal) | `llama-server` | High-order chain-of-thought, decomposition, code synthesis. |
145 | **Decision Router ("Laya")** | Mac / Dell | CPU / Metal | Fast rule engine / 3B SLM | Evaluates query complexity, directs graph lookup vs execution. |
146 | **Graph Memory Engine** | Dell `dell-ss` | 8GB RAM + SSD (`/dev/sda3`) | Python 3 + SQLite3 (WAL) | Manages node/edge relational tables, edge reinforcement, decay. |
147 | **Embedding Vector Engine** | Dell `dell-ss` | Intel i5 CPU (AVX) | `embeddinggemma-2` / Ollama | Generates 768-dim embeddings for new memories and incoming queries. |
148 | **Mass Storage Vault** | Dell `dell-ss` | Dual 1TB USB 3.0 HDDs | ext4 / NTFS via `/etc/fstab` | Houses cold episodic logs, large vectors, datasets, and archives. |
149 | **Kinetic Sandbox** | Dell `dell-ss` | Ubuntu Server 26.04 LTS | Bash via user `agent` | Executes package installations, disk queries, and tests safely. |
150
151 ---
152
153 ### 7.0 COMPREHENSIVE ARCHITECTURAL TRADE-OFF MATRIX
154
155 | Architectural Decision | Chosen Strategy | Alternatives Considered | Major Advantages (Pros) | Identified Constraints (Cons) | Mitigation |
156 | :--- | :--- | :--- | :--- | :--- | :--- |
157 | **Inference Location** | Split Compute (Mac M4 Brain + Dell Body) | Running all inference on Dell | High-speed Metal generation (30β60 tok/s); keeps Dell responsive. | Dependent on local network link between Mac and Dell. | Fallback 3B SLM deployed on Dell for disconnected survival. |
158 | **Graph Engine** | SQLite3 Relational + Binary Vector Table | Neo4j, ArangoDB, or dedicated Graph DB | Zero background overhead (<15 MB RAM); native ACID; instant startup. | Graph traversals beyond 4 hops require recursive CTE queries. | Laya limits spreading activation to depth $d \le 3$, which covers 99% of tasks. |
159 | **Memory Structure** | Weighted Graph + Vector Embeddings | Pure Vector RAG (Chroma/Pinecone) | Preserves causal relationships; eliminates hallucinated associations. | Requires graph maintenance (weight decay, edge pruning). | Background systemd timer executes nightly decay & garbage collection. |
160 | **Model Alignment** | Fully Abliterated (Uncensored Weights) | Standard aligned commercial models | Will never refuse low-level system commands, disk fixes, or security audits. | Requires strict systemic guardrails (ROE-01) in prompt and wrappers. | ROE-01 enforced at script level: `/dev/sda5` hardcoded read-only. |
161 | **Mass Storage** | Dual 1TB HDDs (Tiered L2/L3) | Single large SSD upgrade | Maximizes existing hardware; provides ~2 TB total cold/warm storage. | Mechanical HDDs have slower seek times (15β40 ms). | Hot indices and L1 cache reside entirely on internal ADATA SSD. |
162