- Updates CONCEPTS.md and DATA_STRUCTURES.md to include Multi-Vec Isolation, Orchestration Matrix, and Static Analysis Payloads. - Adds GRAVEYARD.md to document dismissed anti-patterns (Doc-to-LoRA and PASTE). - Implements corresponding Proof-of-Concept scripts in `forum/experiments/` (multi_vec_poc.ts, orchestration_matrix_poc.ts, static_analysis_poc.ts, and graveyard_poc.ts). - Integrates all new PoCs into the `lab.ts` experiment runner. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: mrteye <1945243+mrteye@users.noreply.github.com>
30 lines
3.1 KiB
Markdown
30 lines
3.1 KiB
Markdown
# Architectural Graveyard
|
|
|
|
This document catalogs advanced technical approaches and bleeding-edge tools that were evaluated during the design phase of `agent-forum` but were ultimately dismissed.
|
|
|
|
The primary purpose of this file is to mathematically or logically prove *why* these concepts violate the strict constraints of a Git-Native, Local-First ecosystem. We document these anti-patterns to prevent future regressions where an agent or engineer might attempt to re-introduce them without understanding the structural consequences.
|
|
|
|
## 1. Doc-to-LoRA (D2L) Hypernetworks
|
|
|
|
**The Concept:**
|
|
A Perceiver-based latent mapping system designed to internalize external context by generating LoRA (Low-Rank Adaptation) weights in a single forward pass. This eliminates KV-cache overhead during inference by directly modifying the neural network's weights based on project documentation.
|
|
|
|
**The Dismissal Rationale (Git Repository Bloat):**
|
|
While D2L offers incredible inference speeds, the resulting `.safetensors` adapter files (even low-rank ones) are typically several megabytes in size.
|
|
In a Git-Native ecosystem, state must be tracked alongside the code. If an agent generates a new LoRA adapter for every major architectural change or task, committing thousands of binary `.safetensors` files directly to the Git object database will cause extreme repository bloat, violating the goal of a lightweight, portable codebase.
|
|
|
|
**The Alternative:**
|
|
D2L was swapped out in favor of context-caching via `sqlite-vec` (Embedded Vector Databases). High-dimensional semantic data is compressed via TurboQuant (2-bit to 4-bit quantization) into binary hashes, resulting in a tiny, highly portable index (often under 30MB) that can be queried natively in milliseconds.
|
|
|
|
## 2. PASTE (Pattern-Aware Speculative Tool Execution)
|
|
|
|
**The Concept:**
|
|
A framework that predicts tool calls using historical patterns and executes them speculatively *while* the LLM is still generating text. This parallel execution aims to achieve near-zero latency by having the tool results ready the moment the LLM decides it needs them.
|
|
|
|
**The Dismissal Rationale (Bounded Model Checking Violations):**
|
|
The `agent-forum` architecture relies heavily on strict mathematical governance (Bounded Model Checking via `transitions.json`). Agents are restricted to a defined Orchestration Matrix.
|
|
Speculative execution fundamentally breaks this governance. If an agent speculatively executes a script (e.g., to read a file, or modify a meta-state JSON) before the Gatekeeper or Evaluator has authorized the transition, it violates the deterministic, step-by-step state machine. Furthermore, speculative write operations (e.g., speculatively drafting a commit) can lead to irrecoverable race conditions and corrupted meta-state branches if the LLM ultimately decides *not* to use the tool.
|
|
|
|
**The Alternative:**
|
|
Execution must remain purely deterministic. Tool execution happens strictly sequentially, driven by the DAG and the Transitions Matrix. Speed is achieved not through speculative branching, but through O(1) Merkle DAG diffing and zero-latency local vector lookups, keeping the input context tiny and execution times low.
|