mirror of
https://github.com/hanzoai/papers.git
synced 2026-11-02 10:23:36 +00:00
74 lines
2.9 KiB
TeX
74 lines
2.9 KiB
TeX
\section{Anti-Patterns and Design Decisions}
|
|
|
|
\label{sec:antipatterns}
|
|
|
|
The 4-Loop Architecture is as much defined by what it \emph{does not do} as
|
|
by what it does. We enumerate the anti-patterns it is specifically engineered
|
|
to prevent.
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\caption{Anti-patterns prevented by the 4-Loop Architecture.}
|
|
\label{tab:antipatterns}
|
|
\begin{tabularx}{\textwidth}{lXX}
|
|
\toprule
|
|
Anti-Pattern & Description & 4-Loop Prevention \\
|
|
\midrule
|
|
\textbf{Backlog growth} &
|
|
\texttt{OPPORTUNITIES.md} accumulates improvement ideas that are never
|
|
acted upon, growing without bound. &
|
|
Loop~1 (BIN) acts on triggers immediately. Proposition~\ref{prop:no_backlog}
|
|
guarantees $O(\log s)$ backlog size. \\[6pt]
|
|
|
|
\textbf{Context pollution} &
|
|
Self-improvement reasoning bleeds into the active context window, consuming
|
|
tokens and degrading task focus. &
|
|
All loops write to external stores. Zero impact on active context. \\[6pt]
|
|
|
|
\textbf{LLM trigger hallucination} &
|
|
LLM-based self-judgment generates false positives (``I should build a tool
|
|
for X'' when X is not a recurring problem). &
|
|
Loop~1 uses deterministic counting. $P = 0.94$ vs.\ LLM $P = 0.61$. \\[6pt]
|
|
|
|
\textbf{Over-generalization} &
|
|
Building a tool that is too general to be reliable, or that duplicates
|
|
existing tools with a different interface. &
|
|
BIN build pipeline requires evidence from specific $(t,f)$ pairs.
|
|
Gate step requires acceptance criteria pass. Probationary status limits damage. \\[6pt]
|
|
|
|
\textbf{Auto-deployed regression} &
|
|
Automatically deploying a new tool or system prompt change that degrades
|
|
performance on other tasks. &
|
|
Loop~4 is human-gated. Loop~1 tools start probationary. No change without evidence. \\[6pt]
|
|
|
|
\textbf{Lossy narrative memory} &
|
|
Summarizing session events into narrative text that discards threshold-relevant
|
|
information. &
|
|
Loop~0 appends structured records. Theorem~\ref{thm:entropy} guarantees
|
|
$\Omega(\log n)$ entropy advantage. \\[6pt]
|
|
|
|
\textbf{Preference drift} &
|
|
User corrections are not recorded, so the agent repeats corrected behaviors
|
|
in later sessions. &
|
|
Loop~2 captures all correction signals and writes to persistent facts database. \\[6pt]
|
|
|
|
\textbf{Cross-session amnesia} &
|
|
Each session starts fresh, discarding all learning from prior sessions. &
|
|
State $\Sigma^{(s)}$ (facts, tools, reflections) is loaded at session start. \\[6pt]
|
|
|
|
\textbf{Delayed correction} &
|
|
User corrections are applied only to the current session and not persisted. &
|
|
Loop~2 writes to the persistent facts database immediately on detection. \\[6pt]
|
|
|
|
\textbf{Evidence-free proposals} &
|
|
Loop~4 proposals generated without supporting evidence from multiple sessions. &
|
|
Proposal generation algorithm (Algorithm~\ref{alg:maintenance}) requires
|
|
$\gamma_{\text{sessions}} \geq 3$ supporting sessions per proposal. \\
|
|
\bottomrule
|
|
\end{tabularx}
|
|
\end{table}
|
|
|
|
% ============================================================================
|
|
% 11. IMPLEMENTATION
|
|
% ============================================================================
|