\IfFileExists{IEEEtran.cls}{%
  \documentclass[journal]{IEEEtran}\newif\ifieeetran\ieeetrantrue
}{%
  \documentclass[10pt,twocolumn]{article}\newif\ifieeetran\ieeetranfalse
}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{microtype}
\microtypesetup{expansion=false}
\usepackage{booktabs}
\usepackage{array}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{amsmath,amssymb}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,positioning,fit,calc}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepackage{url}
\usepackage[hidelinks,breaklinks]{hyperref}
\usepackage{balance}
\ifieeetran\else
\usepackage[letterpaper,margin=0.68in,columnsep=0.24in]{geometry}
\newenvironment{IEEEkeywords}{\par\small\noindent\textbf{Index Terms---}}{\par\normalsize}
\fi
\setlength{\parindent}{1em}
\setlength{\parskip}{0pt}
\raggedbottom
\definecolor{ebblue}{HTML}{1F4E79}
\definecolor{ebteal}{HTML}{267D7A}
\definecolor{ebamber}{HTML}{A86E00}
\definecolor{ebgray}{HTML}{F1F3F5}
\definecolor{ebline}{HTML}{697077}
\newcommand{\eb}{\textsc{Entropy Box}}
\newcommand{\code}[1]{\texttt{\small #1}}
\tikzset{
  block/.style={draw=ebblue,rounded corners,fill=ebblue!5,align=center,minimum height=7mm,font=\small},
  gate/.style={draw=ebamber,rounded corners,fill=ebamber!8,align=center,minimum height=7mm,font=\small},
  store/.style={draw=ebteal,rounded corners,fill=ebteal!8,align=center,minimum height=7mm,font=\small},
  hdr/.style={draw=ebblue,rounded corners,fill=ebblue!12,align=center,minimum height=8mm,font=\small\bfseries},
  ar/.style={-{Latex[length=2mm]},thick,draw=ebline}
}

\title{Entropy Box: An Agent-Native Knowledge Compiler and Capability Substrate for Grounded Robotics System Engineering}
\author{Anonymous Authors}
\date{}

\begin{document}
\maketitle

\begin{abstract}
Robotics engineering knowledge is fragmented across literature, open-source repositories, software packages, hardware documentation, and simulation environments. While modern Large Language Models (LLMs) and Retrieval-Augmented Generation (RAG) can surface isolated code snippets or text passages, query-time derivations in complex embodied engineering remain ephemeral, unstructured, and prone to catastrophic error compounding: they fail to guarantee topological dependency closure, omit critical kinematic/dynamic constraints, and hallucinate non-existent software packages. We present \eb, a source-level, agent-native knowledge compiler and runtime substrate that transforms heterogeneous robotics sources into a persistent, typed, and globally indexed Robotics Capability Substrate. To prevent ungrounded model drift across long-running production, \eb\ introduces an Untrusted-Agent / Deterministic-Gate architecture: autonomous LLM research workers propose isolated technical route artifacts and explicit negative retrieval ledgers, while 4,261 lines of deterministic programmatic gates strictly enforce DAG acyclicity, schema typing, cross-process symbol table uniqueness, and surrogate key isolation. Over a 5-month continuous production campaign across 15 robotics domains, the compiler materialized 2,511 topics, 37,673 normalized capability contracts ($\sigma$), 11,397 verified physical software assets, and 54,602 directed dependency edges, eliminating over 21,316 redundant capability derivations ($\alpha = 1.566$). Crucially, an extensive empirical audit over 2,362 adjudicated duplicate pairs demonstrates that embedding similarity carries near-zero discriminative power ($\text{AUC} = 0.509$, 95\% CI $[0.453, 0.564]$) for automated entity merging, proving that single-node perfection cannot be achieved via threshold scoring alone. We resolve this by decoupling build-time verification from run-time global composition: downstream LLMs query the broad substrate via 6-dimensional Semantic Views ($\vec{v}_{\text{id}}, \vec{v}_{\text{con}}, \vec{v}_{\text{fn}}, \vec{v}_{\text{rel}}, \vec{v}_{\text{ctx}}, \vec{v}_{\text{impl}}$), GPU-accelerated PyTorch exact dense indexing ($<2\text{ms}$ latency), domain-enhanced BM25F, and 1-hop topological expansion. A dedicated Integrate Planner then automatically synthesizes end-to-end task DAGs while explicitly flagging unsupported capabilities as formal gaps ($\mathcal{C}_{\text{gap}}$). Through a standardized Model Context Protocol (MCP) server, \eb\ directly empowers external coding agents (including OpenAI Codex, Claude 3.5 Sonnet, and Gemini) with architectural foresight and scientific rigor, reducing unsupported claims from 100.0\% to 5.2\% and boosting constraint coverage to 35.4\% in structured engineering planning. Finally, we validate the complete compilation-to-execution pipeline on two distinct robotic platforms: a wheeled mobile manipulator (Husky + Franka Panda) and a bipedal humanoid (Unitree G1) in physical simulation.
\end{abstract}

\begin{quote}
\noindent\textbf{Note to Practitioners---}
Robotics engineering teams repeatedly search research literature, software repositories, package documentations, and issue trackers before assembling a functional system or diagnosing an integration failure. \eb\ shifts this recurring discovery and verification work into a persistent, typed, machine-checkable capability substrate. Offline, multi-agent workers backed by deterministic validation gates compile multi-paradigm technical routes into verified task DAGs, capability contracts, and physical software bindings. Online, the compiler converts an engineering requirement into task steps, globally retrieved capabilities and assets, dependency context, a proposed workflow DAG, and explicit missing-capability gaps ($\mathcal{C}_{\text{gap}}$). A standardized FastMCP server enables direct integration with modern agentic IDEs and coding agents across 15 robotics domains. Practitioners can treat \eb\ as an architectural co-pilot that prevents package hallucinations, enforces prerequisite closure, and flags ungrounded assumptions early in the development lifecycle.
\end{quote}

\begin{IEEEkeywords}
robotics engineering knowledge, knowledge compiler, capability substrate, agent systems, retrieval-augmented generation, task graphs, Model Context Protocol, robot simulation grounding.
\end{IEEEkeywords}

\section{Introduction}

\subsection{The Robotics Knowledge Bottleneck and Engineering Isolation}
Developing an autonomous robotic system---such as a wheeled mobile manipulator or a bipedal humanoid navigating an orchard to execute delicate fruit harvesting---requires integrating deep, multidisciplinary engineering expertise. An engineering team must orchestrate heterogeneous subsystems spanning camera drivers, coordinate frame transformations (TF2), dense point cloud filtering, real-time elevation mapping, nonlinear Model Predictive Control (MPC) for locomotion, inverse kinematics (IK) solvers, and tactile-driven force-closure grasp controllers.

While foundation models have exhibited remarkable qualitative reasoning, when applied to robotic software engineering, autonomous coding agents and human engineers encounter a critical \emph{knowledge fragmentation bottleneck}:
\begin{enumerate}
\item \textbf{Algorithmic Knowledge is Dispersed}: Standard algorithmic decompositions are scattered across thousands of academic publications, package documentations, and legacy forum threads.
\item \textbf{Hidden Prerequisites and Incompatible Assumptions}: A trajectory planner may implicitly require a dynamically feasible velocity profile and specific frame conventions (REP-103/105), but LLMs routinely omit these prerequisites.
\item \textbf{Software Binding Hallucinations}: Standard LLMs frequently invent non-existent Python libraries or recommend deprecated ROS packages incompatible with the specified target distribution.
\end{enumerate}

\subsection{The Failure Modes of Ephemeral Query-Time Retrieval}
The dominant paradigm for grounding language models in technical domains is query-time Retrieval-Augmented Generation (RAG) \cite{lewis2020rag,gao2023ragsurvey} or dynamic agentic web search. However, as formalized in Table~\ref{tab:comparison}, query-time synthesis exhibits three fatal structural failures:
\begin{itemize}
\item \textbf{Amnesic and Redundant Derivations}: Every query re-derives technical chains from scratch. Recognizing that motion planning decomposes into state-space sampling, collision checking, and path optimization is computed on the fly and discarded immediately upon response termination.
\item \textbf{Unstructured Prose vs. Machine-Checkable Contracts}: Downstream coding agents require \emph{typed contracts} declaring explicit inputs, outputs, preconditions, operational invariants, and verified code bindings. Prose checklists cannot be formally checked for type consistency or topological cycle freedom.
\item \textbf{Absence of Global Symbols and Cross-Topic Synergy}: In standard RAG, the concept of ``Quasi-Static Equilibrium'' in a humanoid balance paper remains isolated from the same concept in a robotic manipulation paper. There is no global symbol table, resulting in fragmented and contradictory specifications.
\end{itemize}

\begin{figure*}[t]
\centering
\begin{tikzpicture}[node distance=4mm]
\node[hdr,text width=44mm] (qa) {Query-time derivation};
\node[block,text width=34mm,below=of qa] (q1) {Question};
\node[block,text width=34mm,below=of q1] (q2) {Retrieve passages};
\node[block,text width=34mm,below=of q2] (q3) {Derive task structure};
\node[block,text width=34mm,below=of q3] (q4) {Return prose};
\node[gate,text width=34mm,below=of q4] (q5) {Structure discarded};
\draw[ar] (q1)--(q2); \draw[ar] (q2)--(q3); \draw[ar] (q3)--(q4); \draw[ar] (q4)--(q5);
\draw[ar,dashed,draw=ebamber] (q5.west) -- ++(-8mm,0) |- (q1.west)
  node[pos=.5,left,font=\scriptsize,text=ebamber,align=right]{next request\\repeats derivation};

\node[hdr,text width=44mm,right=30mm of qa] (ca) {Offline knowledge compilation};
\node[block,text width=34mm,below=of ca] (c1) {Sources};
\node[gate,text width=34mm,below=of c1] (c2) {Research, type, gate};
\node[store,text width=34mm,below=of c2] (c3) {Persistent typed artifact};
\node[block,text width=34mm,below=of c3] (c4) {Retrieve structure};
\node[block,text width=34mm,below=of c4] (c5) {Specialize plan + gaps};
\draw[ar] (c1)--(c2); \draw[ar] (c2)--(c3); \draw[ar] (c3)--(c4); \draw[ar] (c4)--(c5);
\draw[ar,dashed,draw=ebteal] (c5.east) -- ++(8mm,0) |- (c4.east)
  node[pos=.5,right,font=\scriptsize,text=ebteal,align=left]{next request\\reuses artifact};
\draw[ar,dashed,draw=ebamber] (c5.south) -- ++(0,-6mm) -| (c2.west)
  node[pos=.28,below,font=\scriptsize,text=ebamber]{observed gaps become compilation targets};
\end{tikzpicture}
\caption{Where structural work occurs. Query-time retrieval reconstructs and usually discards engineering topology; \eb\ places research, normalization, and validation before serving, then reuses the persistent artifact across requests.}
\label{fig:why-compile}
\end{figure*}

\subsection{The Core Proposition: Source-Level Knowledge Compilation}
To overcome these limitations, we introduce \eb, which shifts the burden of structural discovery from ephemeral query time to an \textbf{offline, quality-gated compilation lifecycle} (Fig.~\ref{fig:why-compile}):
\[
\text{Public Sources} \xrightarrow{\text{Compiler}} \mathcal{G}_{\text{substrate}} \xrightarrow[\text{Planner}]{\text{Multi-Facet}} \text{Task DAGs} + \mathcal{C}_{\text{gap}}
\]
Our method is governed by the \textbf{Symmetric Double-Gatekeeper Principle}:
\begin{quote}
\emph{At both build-time and run-time, probabilistic LLM workers are treated as strictly untrusted proposal generators. All state transitions, identifier allocations, topological closures, and output schemas are governed by deterministic programmatic algorithms.}
\end{quote}

\subsection{Summary of Contributions}
\begin{enumerate}
\item \textbf{A Typed Intermediate Representation for Robotics Engineering}: We formalize the multi-layer property graph $\mathcal{G} = \langle \mathcal{T}, \mathcal{K}, \mathcal{C}, \mathcal{A}, \mathcal{E}, \mathcal{R} \rangle$, decoupling mutable display names from immutable surrogate keys (\code{CAP\_<hex>}), and formally defining explicit engineering gaps ($\mathcal{C}_{\text{gap}}$).
\item \textbf{An Agent-Native Offline Compiler with 4,261 Lines of Deterministic Gates}: A four-stage production pipeline ($A_1 \to A_2 \to B \to C$) enforcing DAG acyclicity, DFS reachability, bidirectional hierarchy closures, and cross-process registry locking across concurrent worker sessions.
\item \textbf{The Largest Open-Access Robotics Capability Substrate}: A public artifact spanning \textbf{2,511 topics across 15 domains, 37,673 normalized capabilities, 11,397 verified physical assets, and 54,602 dependency edges}, eliminating over 21,316 redundant capability derivations ($\alpha = 1.566$).
\item \textbf{Empirical Proof of Embedding Unreliability in Entity Merging}: An audit of 2,362 adjudicated duplicate pairs proving that raw embedding similarity achieves an AUC of only 0.509, demonstrating why conservative two-stage adjudication and transaction rewriting are mandatory.
\item \textbf{Runtime Multi-Facet Retrieval \& Integrate Planner}: A 6-dimensional Semantic View architecture executed over native GPU PyTorch dense index ($<2\text{ms}$) combined with domain BM25F (124+ synonym dictionaries) and 1-hop topological expansion, feeding an Integrate Planner that generates verified task DAGs.
\item \textbf{OpenAPI \& Model Context Protocol (MCP) Ecosystem}: Standardized FastMCP servers enabling direct zero-shot integration with Claude 3.5 Sonnet, OpenAI Codex, and Google Antigravity, reducing unsupported claims from 100.0\% to 5.2\% and boosting constraint coverage to 35.4\%.
\item \textbf{Dual Platform Simulation Grounding}: End-to-end execution validation across both a wheeled mobile manipulator (Husky + Franka Panda in PyBullet) and a bipedal humanoid (Unitree G1 in MuJoCo), achieving 100\% non-destructive harvest and zero collision clipping.
\end{enumerate}

\section{Problem Formulation and Typed Intermediate Representation}

\subsection{Mathematical Formulation of the Capability Graph}
We formalize robotics engineering knowledge as a typed, multi-layer directed property graph:
\[
\mathcal{G} = \langle \mathcal{T}, \mathcal{K}, \mathcal{C}, \mathcal{A}, \mathcal{E}, \mathcal{R} \rangle
\]
\begin{itemize}
\item $\mathcal{T} = \{T_0, T_1, T_2\}$: A 3-tier taxonomy tree spanning 15 $L_0$ domains, 142 $L_1$ sub-domains, and 2,511 $L_2$ topic nodes.
\item $\mathcal{K} = \{K_t\}$: A set of compiled technical task chains for each topic $t$. Each chain $K = (V_K, E_K)$ is a Directed Acyclic Graph (DAG) of discrete engineering steps.
\item $\mathcal{C} = \{c_j\}$: A global registry of normalized capability records. Each capability $c_j$ is uniquely identified by an immutable surrogate key (\code{CAP\_<hex>}) and bound to a formal typed contract:
\[
\sigma(c_j) = \langle \mathcal{I}(c_j), \mathcal{O}(c_j), \mathcal{P}(c_j), \Psi(c_j), \mathcal{H}(c_j) \rangle
\]
where $\mathcal{I}$ is the typed input set, $\mathcal{O}$ the output set, $\mathcal{P}$ preconditions, $\Psi$ invariant operational constraints (e.g., maximum frequency, latency bounds), and $\mathcal{H}$ physical/hardware assumptions.
\item $\mathcal{A} = \{a_k\}$: A registry of physical software assets (\code{AST\_<hex>}), mapping capabilities to concrete GitHub repositories, ROS/ROS 2 packages, pre-trained model weights, URDF models, or simulation environments.
\item $\mathcal{E} = \{e_m\}$: Provenance evidence nodes containing verified URLs, local document pointers, extraction timestamps, and explicit \code{[unverified]} markers.
\item $\mathcal{R}$: A typed relation set partitioned into five canonical edge families:
\[
\mathcal{R} = \mathcal{R}_{\text{precedes}} \cup \mathcal{R}_{\text{impl}} \cup \mathcal{R}_{\text{requires}} \cup \mathcal{R}_{\text{hierarchy}} \cup \mathcal{R}_{\text{evidence}}
\]
\end{itemize}

\begin{figure*}[t]
\centering
\begin{tikzpicture}[x=1mm,y=1mm]
\node[hdr,text width=34mm,anchor=north west] (topic) at (0,0) {Topic graph\\{\scriptsize problem boundaries}};
\node[hdr,text width=34mm,anchor=north west] (task) at (58,0) {Task graph\\{\scriptsize chains, steps, branch/merge}};
\node[hdr,text width=34mm,anchor=north west] (gap) at (116,0) {Gap ledger\\{\scriptsize required but unsupported}};
\node[hdr,text width=34mm,anchor=north west] (asset) at (0,-36) {Asset registry\\{\scriptsize packages, models, data}};
\node[hdr,text width=34mm,anchor=north west] (cap) at (58,-36) {Capability graph\\{\scriptsize hierarchy and dependency}};
\node[hdr,text width=34mm,anchor=north west] (evid) at (116,-36) {Evidence graph\\{\scriptsize papers, docs, repositories}};
\draw[ar] (topic.east)--(task.west) node[midway,above,font=\scriptsize]{contains};
\draw[ar] (task.south)--(cap.north) node[midway,right,font=\scriptsize]{requires};
\draw[ar] (task.east)--(gap.west) node[midway,above,font=\scriptsize]{exposes};
\draw[ar] (cap.west)--(asset.east) node[midway,above,font=\scriptsize]{implemented\_by};
\draw[ar] (cap.east)--(evid.west) node[midway,above,font=\scriptsize]{grounded\_in};
\draw[ar] (gap.south)--(evid.north) node[midway,right,font=\scriptsize]{missing evidence};
\draw[ar] (cap.east) ++(0,3) arc (110:-110:7mm)
  node[midway,right=1mm,font=\scriptsize,align=left]{parent/child\\precedes};
\draw[ar] (asset.west) ++(0,3) arc (70:290:-7mm)
  node[midway,left=1mm,font=\scriptsize]{depends\_on};
\end{tikzpicture}
\caption{Typed multi-graph representation over shared stable identities. Task order, capability hierarchy, implementation binding, evidence, and unresolved gaps remain distinct relation families so retrieval and validation can follow only the semantics required by the request.}
\label{fig:multigraph}
\end{figure*}

\subsection{Cross-Paradigm Comparison}
Table~\ref{tab:comparison} provides a systematic comparison between \eb\ and existing knowledge representations.

\begin{table*}[t]
\centering
\caption{Relationship to adjacent paradigms. Entries describe the primary artifact, not every possible implementation.}
\label{tab:comparison}
\begin{tabular}{@{}p{2.6cm}p{3.2cm}p{3.4cm}p{3.4cm}p{3.4cm}@{}}
\toprule
Paradigm & Persistent unit & Typical structure & Admission boundary & Primary use \\
\midrule
Vector RAG \cite{lewis2020rag} & Text chunk and embedding & Document-local text & Indexing pipeline & Passage retrieval for generation \\
GraphRAG \cite{edge2024graphrag} & Corpus-derived entity/summary & Entity relations and communities & Extraction and clustering & Local/global corpus questions \\
Robot ontology \cite{tenorth2013knowrob} & Objects, actions, episodes, axioms & Description logic axioms/rules & Ontology consistency (OWL) & Robot cognition and action execution \\
Deep-research agent & Session trace or report & Query-specific plan and prose & Model/tool loop & One-off synthesis \\
\textbf{\eb} & Topic, typed chain, capability ($\sigma$), asset, evidence & Task DAGs and cross-topic capability dependencies & Deterministic compiler gates and ledgers & Reusable engineering retrieval, assembly, and gap inspection \\
\bottomrule
\end{tabular}
\end{table*}

\subsection{Surrogate Keys Symbol Table and Decoupling}
A major failure mode in early knowledge graphs is the tight coupling between human-readable entity names and their internal identifiers. When an engineer or LLM renames an entity to ``Analytical 6-DOF IK Solver'', all referencing task chains and graph edges break.

\eb\ introduces an \textbf{Immutable Surrogate Key Architecture}:
\begin{itemize}
\item When a capability is admitted, it is permanently assigned an opaque surrogate key: \code{CAP\_<hex>}.
\item The human-readable string is stored as a mutable display attribute with an associated alias set:
\[
\text{Record}(c_j) = \langle \text{id}: \texttt{CAP\_90e22fca}, \text{name}: \text{"Analytical IK"}, \text{aliases}: \{\dots\} \rangle
\]
\item Any refactoring, renaming, or localization update triggers an \textbf{Atomic Topic Rewriting Transaction}: global references and Markdown views are rewritten simultaneously, followed by deterministic re-validation.
\end{itemize}

\subsection{Formal Gap Formulation and Closed-Loop Feedback}
A critical feature of \eb\ is the formal distinction between owned capabilities and engineering gaps:
\[
\mathcal{C}_{\text{owned}} = \{ c \in \mathcal{C} \mid \exists a \in \mathcal{A}, (c \xrightarrow{\text{impl}} a) \in \mathcal{R} \}
\]
\[
\mathcal{C}_{\text{gap}} = \{ c \in \mathcal{C} \mid \nexists a \in \mathcal{A}, (c \xrightarrow{\text{impl}} a) \in \mathcal{R} \}
\]
When downstream LLM planners construct an engineering plan, required capabilities lacking software bindings are formally emitted as $\mathcal{C}_{\text{gap}}$. These gap records are automatically pushed to the compiler's backlog, driving subsequent targeted extraction campaigns.

\subsection{Amortization Economics and Structural Reuse}
Across the public substrate of 2,511 topics:
\begin{itemize}
\item Total normalized capabilities: $|\mathcal{C}| = 37,673$.
\item Total capability step usages across all task chains: $|U| = 58,989$.
\item \textbf{Structural Amortization Factor}:
\[
\alpha = \frac{|U|}{|\mathcal{C}|} = \frac{58,989}{37,673} \approx 1.566
\]
\end{itemize}
This confirms that the offline compiler successfully eliminated \textbf{21,316 redundant capability derivations}. Foundational capabilities (e.g., TF2 coordinate transforms, KD-tree nearest neighbor search) are reused across more than 50 distinct topics.

\begin{table*}[t]
\centering
\caption{Core intermediate-representation objects and their enforced role.}
\label{tab:schema}
\begin{tabular}{@{}p{2.3cm}p{5.4cm}p{4.2cm}p{4.0cm}@{}}
\toprule
Object & Representative fields & Deterministic checks & Downstream use \\
\midrule
Topic & identifier, domain, names, task chains, status & schema, unique ID, at least one accepted chain & discovery and scope \\
Chain step & step ID, predecessors, successors, capability IDs, inputs, outputs, constraints & local reference closure, edge reciprocity, acyclicity & ordered plan and branch navigation \\
Capability & opaque ID, names/aliases, contract $\sigma$, category & global ID/type conflict, candidate-duplicate ledger & cross-topic reuse and dependency expansion \\
Asset & opaque ID, type, repository or source URL, implementation note & type/URL syntax, hard repository conflicts & software/model/dataset selection \\
Evidence & source URL, local document pointer, claim context, verification marker & required pointer fields; resolvability audit & provenance inspection \\
Gap & required capability, reason, status & explicit unresolved state rather than invented asset & missing-component reporting \\
\bottomrule
\end{tabular}
\end{table*}

\section{Offline Knowledge Production Compiler}

\subsection{The Production Challenge and the Handoff Rule}
The artifact was produced by multi-agent workers under strict deterministic gating. Our pipeline architecture evolved through three major iterations:
\begin{itemize}
\item \textbf{v1 (Monolithic Single-Agent)}: A single agent attempted to research, extract, and format entire topic graphs in one prompt. This suffered from context crowding, degradation across later technical chains, and hallucination of non-existent packages.
\item \textbf{v2 (Specialist Relay Agents)}: Specialized agents handled research, extraction, and validation sequentially. This failed because design intent evaporated at agent boundaries---downstream agents lacked the technical context to resolve structural ambiguity.
\item \textbf{v3 (Artifact-Centric Compilation)}: Agents communicate strictly through persisted, typed intermediate artifacts with deterministic validation gates.
\end{itemize}

The resulting design rule is: \emph{keep stages in one context when the handoff object is reasoning; separate stages when the handoff object is a validated artifact}. Research and chain construction remain together because topology depends on source comparison. Alternative chains are isolated because the durable handoff is a chain document.

\subsection{Four-Stage Multi-Agent Compilation Pipeline}

\begin{figure*}[t]
\centering
\begin{tikzpicture}[
node distance=7mm and 6mm,
box/.style={draw=ebblue,rounded corners=2pt,fill=ebgray,minimum height=9mm,align=center,text width=25mm,font=\small},
gate/.style={draw=ebamber,rounded corners=2pt,fill=ebamber!10,minimum height=9mm,align=center,text width=25mm,font=\small},
store/.style={draw=ebteal,rounded corners=2pt,fill=ebteal!10,minimum height=9mm,align=center,text width=26mm,font=\small},
arr/.style={-{Stealth[length=2mm]},thick,draw=black!60}
]
\node[box] (sched) {A1: anchor + route hypotheses};
\node[box,right=of sched] (workers) {A2: isolated chain research};
\node[gate,right=of workers] (local) {Evidence and chain gates};
\node[box,right=of local] (assemble) {B/C: transcription + finalization};
\node[store,right=of assemble] (global) {Accepted registries + views};
\draw[arr] (sched)--(workers);
\draw[arr] (workers)--(local);
\draw[arr] (local)--(assemble);
\draw[arr] (assemble)--(global);
\node[gate,below=9mm of local,text width=48mm] (watch) {Watchdog: reject, resume, adjudicate, relink, rebuild};
\draw[arr] (global.south) |- (watch.east);
\draw[arr] (watch.west) -| (sched.south);
\end{tikzpicture}
\caption{Agent-native compilation. Models perform bounded research and extraction; deterministic gates and a watchdog control durable state transitions.}
\label{fig:pipeline}
\end{figure*}

Figure~\ref{fig:pipeline} illustrates the four-stage production workflow:
\begin{enumerate}
\item \textbf{Phase A1 (Route Derivation)}: Given an $L_2$ topic, a coordinator analyzes domain boundaries and proposes $\ge 3$ distinct technical paradigms (e.g., Polynomial Spline, Kinodynamic RRT*, Diffusion Policy for trajectory generation).
\item \textbf{Phase A2 (Isolated Research Workers)}: For each technical route, an isolated worker agent performs web search and repository inspection, outputting a 9-section Markdown document containing problem formulation, step sequences, software bindings, and a \textbf{Mandatory Retrieval Ledger} with explicit negative search proofs.
\item \textbf{Phase B (Topic Assembly)}: Evaluates pairwise capability overlap:
\[
\text{overlap}(K_A, K_B) = \frac{|\mathcal{C}_A \cap \mathcal{C}_B|}{\min(|\mathcal{C}_A|, |\mathcal{C}_B|)}
\]
Chains with overlap $\ge 0.70$ are consolidated into branching variants of a unified DAG.
\item \textbf{Phase C (Finalization \& Rekeying)}: Assigns new opaque surrogate keys (\code{CAP\_<hex>}) to unseen capabilities, updates references transactionally, and emits the candidate topic DAG.
\end{enumerate}

\subsection{Critical Sequencing Constraints}
Through production deployments, we discovered two fundamental sequencing constraints:
\begin{enumerate}
\item \textbf{Normalize Identifiers Before Measuring Overlap}: Computing chain overlap using raw strings underestimates redundancy by over 60\% due to phrasing variations.
\item \textbf{Rekey to Surrogate Keys After Merge Adjudication, Never Before}: Semantic disambiguation must occur on natural language names, with rekeying occurring as the final atomic commit.
\end{enumerate}

\subsection{Deterministic Quality Gatekeepers}
The compiler incorporates 4,261 lines of deterministic Python code across validation modules:
\begin{itemize}
\item \textbf{DAG Acyclicity and Reachability Gate}: Implements Tarjan's strongly connected components and white/gray/black tri-color DFS to guarantee zero cycles and verify reachability from entry steps.
\item \textbf{Bidirectional Hierarchy Closure}: Enforces parent--child reciprocity between related capabilities.
\item \textbf{Physical Asset Syntax Gate}: Validates repository URL resolvability, package naming syntax, and enforces a platform blacklist.
\item \textbf{Cross-Process Transactional Lock}: Registry admissions acquire atomic file locks to guarantee symbol uniqueness during high-concurrency builds (up to 20 parallel workers).
\end{itemize}

\begin{table*}[t]
\centering
\caption{Durable compilation lifecycle. Status changes are deterministic even when stage contents are model-generated.}
\label{tab:lifecycle}
\begin{tabular}{@{}p{2.4cm}p{4.0cm}p{5.2cm}p{4.1cm}@{}}
\toprule
State & Persisted product & Admission condition & Failure handling \\
\midrule
Queued & Topic inventory and anchor card & Topic is in taxonomy, unclaimed, and not accepted & Expire lease; retain current stage \\
A1 scoped & Three route hypotheses and representative leads & Routes parse, are nonempty, and are technically distinct & Repair list format or return to queue \\
A2 researched & Isolated chain documents and source ledgers & Evidence sections, capability/asset fields, and chain gates pass & Reject only failing chain; preserve siblings \\
B transcribed & Incremental typed topic DAG & Local references close; edges are reciprocal and acyclic & Return machine-readable report; append only missing chain \\
C finalized & Candidate topic plus final validation & Blocking checks clear after one bounded repair & Record structural debt; do not loop indefinitely \\
Registered & Global identifiers, conflicts, suspect ledger & No hard conflict; rewrites validate as a transaction & Abort without partial global write \\
Published & Lookup, lexical, vector, and graph views & Accepted records and view manifest agree & Rebuild views from accepted records \\
\bottomrule
\end{tabular}
\end{table*}

\subsection{Empirical Proof of Embedding Inefficacy in Deduplication}
\label{sec:dedup}
During our production build, the compiler flagged \textbf{2,362 duplicate suspect pairs} using embedding similarity ($s \ge 0.863$). All pairs were audited by human experts and consensus judges.

\begin{table}[t]
\centering
\caption{Empirical audit of deduplication gateways ($n = 2,362$). AUC intervals use 2,000 bootstrap resamples.}
\label{tab:dedup}
\resizebox{\columnwidth}{!}{%
\begin{tabular}{@{}lrrrr@{}}
\toprule
Path & Pairs & True Dup. & Precision & AUC [95\% CI] \\
\midrule
Embedding ($s \ge 0.86$) & 1,867 & 103 & .055 (5.5\%) & .509 [.453, .564] \\
Lexical fallback & 495 & 8 & .016 (1.6\%) & .689 [.572, .791] \\
\bottomrule
\end{tabular}}
\end{table}

\begin{figure}[t]
\centering
\begin{tikzpicture}
\begin{axis}[
  width=\columnwidth,height=4.8cm,
  xlabel={Similarity threshold},ylabel={Rate},
  xmin=.86,xmax=1.0,ymin=0,ymax=1.05,
  grid=major,grid style={draw=ebline!25},
  tick label style={font=\scriptsize},label style={font=\small},
  legend style={font=\scriptsize,at={(0.5,-0.28)},anchor=north,legend columns=2,draw=ebline!40}
]
\addplot[color=ebteal,thick,mark=*,mark size=1.1pt] coordinates {
(.862,1.000) (.873,.990) (.885,.961) (.896,.922) (.908,.903) (.919,.864) (.931,.767) (.942,.670) (.954,.563) (.965,.379) (.977,.039) (.988,.010) (1.000,.010)};
\addlegendentry{duplicate recall}
\addplot[color=ebamber,thick,mark=square*,mark size=1.1pt] coordinates {
(.862,.055) (.873,.055) (.885,.055) (.896,.055) (.908,.057) (.919,.058) (.931,.061) (.942,.069) (.954,.076) (.965,.089) (.977,.091) (.988,.083) (1.000,1.000)};
\addlegendentry{precision}
\end{axis}
\end{tikzpicture}
\caption{Embedding duplicate-gate threshold sweep within the flagged set. Precision remains too low for automatic merging while recall collapses as the threshold rises.}
\label{fig:dedup-sweep}
\end{figure}

\textbf{Key Finding}: As shown in Table~\ref{tab:dedup} and Fig.~\ref{fig:dedup-sweep}, raw embedding similarity is statistically indistinguishable from a coin toss ($\text{AUC} = 0.509$). Raising the cosine threshold from 0.862 to 0.942 only increases precision from 5.5\% to 6.9\%, while true duplicate recall drops from 100\% to 67.0\%.

\textbf{Engineering Solution}: We implemented a \textbf{Two-Stage Triage Architecture}:
\begin{enumerate}
\item \emph{Conservative Deterministic Triage}: Non-LLM rule triage clears obvious non-duplicates without ever performing automated merges.
\item \emph{Low-Temperature LLM Adjudication}: Borderline pairs are adjudicated in isolated micro-batches ($N=5$, $\text{temperature}=0.1$) with a strict inductive bias (``when uncertain, retain distinct entities'').
\item \emph{Atomic Rewriting Engine}: Confirmed merges trigger an atomic rewrite across all referencing task chains and topic documents.
\end{enumerate}

\section{Runtime Multi-Facet Retrieval and Topological Reasoning}

\begin{figure*}[t]
\centering
\begin{tikzpicture}[
node distance=7mm and 6mm,
box/.style={draw=ebblue,rounded corners=2pt,fill=ebgray,minimum height=9mm,align=center,text width=27mm,font=\small},
gate/.style={draw=ebamber,rounded corners=2pt,fill=ebamber!10,minimum height=9mm,align=center,text width=27mm,font=\small},
store/.style={draw=ebteal,rounded corners=2pt,fill=ebteal!10,minimum height=9mm,align=center,text width=29mm,font=\small},
arr/.style={-{Stealth[length=2mm]},thick,draw=black!60}
]
\node[box] (q) {Requirement and project constraints};
\node[box,right=of q] (d) {Intent routing and task decomposition};
\node[box,right=of d] (r) {Typed multi-view retrieval};
\node[store,right=of r] (c) {Graph-enriched candidate context};
\node[box,right=of c] (w) {Constrained workflow assembly};
\node[gate,below=9mm of r,text width=58mm] (g) {Identifier validation, gap detection, owned-module projection, evidence trace};
\draw[arr] (q)--(d); \draw[arr] (d)--(r); \draw[arr] (r)--(c); \draw[arr] (c)--(w);
\draw[arr] (w.south) |- (g.east);
\draw[arr] (g.west) -| (q.south);
\end{tikzpicture}
\caption{Runtime compilation. Retrieval supplies a bounded typed context; the synthesis model cannot silently create registered graph entities. The result seeds the next project iteration in a traceable loop.}
\label{fig:runtime}
\end{figure*}

\subsection{6-Dimensional Semantic Views and Dynamic Intent Weighting}
Rather than collapsing an entity into a single monolithic embedding vector, \eb\ projects every capability $c \in \mathcal{C}$ into \textbf{six orthogonal semantic views}:
\begin{itemize}
\item \textbf{Identity View ($\vec{v}_{\text{id}}$)}: Canonical name, multilingual translation, and verified aliases.
\item \textbf{Concept View ($\vec{v}_{\text{con}}$)}: Algorithmic principle and mathematical overview.
\item \textbf{Function View ($\vec{v}_{\text{fn}}$)}: Structured contract fields: Inputs, Outputs, Invariants, and Assumptions.
\item \textbf{Relation View ($\vec{v}_{\text{rel}}$)}: Hierarchical taxonomy context (parent, siblings, child specializations).
\item \textbf{Context View ($\vec{v}_{\text{ctx}}$)}: Topological dependency neighborhood ($c_{\text{precedes}}$ and $c_{\text{succeeded\_by}}$).
\item \textbf{Implementation View ($\vec{v}_{\text{impl}}$)}: Supported physical assets and package bindings.
\end{itemize}

An intent classifier categorizes the query into one of six canonical intents, dynamically assigning view weights (Table~\ref{tab:view-weights}):
\[
S(Q, c) = \sum_{k \in \{\text{id}, \text{con}, \text{fn}, \text{rel}, \text{ctx}, \text{impl}\}} w_k(Q) \cdot \cos\left(\mathbf{E}(Q), \vec{v}_k(c)\right)
\]

\begin{table}[t]
\centering
\caption{Dynamic Intent Weighting across 6 Semantic Views.}
\label{tab:view-weights}
\resizebox{\columnwidth}{!}{%
\begin{tabular}{@{}lcccccc@{}}
\toprule
Query Intent & $w_{\text{id}}$ & $w_{\text{con}}$ & $w_{\text{fn}}$ & $w_{\text{rel}}$ & $w_{\text{ctx}}$ & $w_{\text{impl}}$ \\
\midrule
\textbf{Identity} (e.g., ``MoveIt'', exact pkg) & \textbf{0.55} & 0.15 & 0.05 & 0.05 & 0.05 & 0.15 \\
\textbf{Concept} (e.g., ``Kinodynamic planning'') & 0.15 & \textbf{0.40} & 0.20 & 0.10 & 0.05 & 0.10 \\
\textbf{Function} (e.g., ``Numerical IK solver'') & 0.10 & 0.15 & \textbf{0.50} & 0.05 & 0.10 & 0.10 \\
\textbf{Relation} (e.g., ``A* vs D* Lite'') & 0.10 & 0.10 & 0.05 & \textbf{0.55} & 0.15 & 0.05 \\
\textbf{Context} (e.g., ``Prerequisites for MPC'') & 0.05 & 0.10 & 0.10 & 0.15 & \textbf{0.55} & 0.05 \\
\textbf{Implementation} (e.g., ``ROS 2 MPC pkg'') & 0.15 & 0.10 & 0.10 & 0.05 & 0.05 & \textbf{0.55} \\
\bottomrule
\end{tabular}}
\end{table}

\subsection{Native GPU PyTorch Exact Dense Index}
To achieve ultra-low latency without external dependencies, we developed a GPU-native exact dense index in PyTorch:
\begin{itemize}
\item All 2560-dimensional float16 embeddings reside in GPU VRAM ($\approx 5\text{GB}$ on an NVIDIA RTX 4090).
\item Query scoring executes as batch matrix multiplication: $\mathbf{S} = \mathbf{M}_{\text{GPU}} \cdot \mathbf{q}_{\text{GPU}}$.
\item Delivers \textbf{100\% exact mathematical recall} with latency \textbf{$< 2\text{ms}$} across $10^5+$ vectors. Dynamic updates are handled in $O(1)$ time via a swap-and-truncate memory buffer.
\end{itemize}

\subsection{Lexical BM25F with 124+ Domain Synonym Dictionaries}
The lexical engine uses field-weighted BM25F with dedicated tokenizers for ASCII symbols, camelCase names, and CJK characters. It incorporates a curated dictionary of \textbf{124+ robotics synonym groups} (e.g., \code{IK} $\leftrightarrow$ \code{Inverse Kinematics}). Exact symbol and repository matches receive deterministic score boosts (+5.0).

\subsection{Multi-Stage Fusion, Topological Expansion, and Reranking}
\begin{enumerate}
\item \textbf{Reciprocal Rank Fusion (RRF)}: Lexical and dense candidates are fused using RRF ($K=60$).
\item \textbf{1-Hop Topological Expansion}: Traverses $\mathcal{G}_{\text{substrate}}$ along hierarchy, precedes, and implementation edges, appending structural context.
\item \textbf{CrossEncoder Neural Reranking}: Candidates are formatted into structured natural language contracts and scored via a domain-adapted CrossEncoder.
\item \textbf{Chain Completion}: When a capability step is retrieved, its parent task chain is attached to preserve end-to-end topological continuity.
\end{enumerate}

\section{LLM End-to-End Workflow Assembly and Scientific Advisory}

\subsection{The Integrate Planner Engine}
Served via \code{/api/consult}, the \textbf{Integrate Planner} takes an engineering specification, performs multi-intent subquery decomposition, executes multi-facet retrieval over $\mathcal{G}_{\text{substrate}}$, and prompts an assembly LLM to synthesize a complete engineering solution:
\begin{itemize}
\item \textbf{Topological Integrity}: The synthesized plan is formatted as an executable DAG specifying exact I/O types and coordinate frame conventions.
\item \textbf{Prerequisite Closure}: Upstream prerequisites (e.g., IMU pre-integration, sensor calibration) are automatically pulled into the DAG.
\item \textbf{Physical Software Grounding}: Every capability is strictly bound to a verified repository asset (\code{AST\_<hex>}).
\end{itemize}

\subsection{Automated Gap Reporting and Scientific Advisory}
When a requirement cannot be satisfied by any verified asset in $\mathcal{A}$, the planner does not hallucinate. Instead, it:
\begin{enumerate}
\item Emits a formal \textbf{Engineering Gap ($\mathcal{C}_{\text{gap}}$)} declaring missing dependencies.
\item Provides \textbf{Architectural \& Scientific Advice}: Outlines theoretical trade-offs (e.g., explaining why quadratic programming MPC will suffer latency bottlenecks on embedded compute, recommending a linearized approximation).
\end{enumerate}

\subsection{FastMCP Server and OpenAPI Ecosystem}
Implemented in \texttt{pipeline/mcp/ontology\_mcp\_server.py}, \eb\ registers four standardized agent tools:
\begin{enumerate}
\item \code{consult\_robotics\_solution(question, top\_k, prev\_context)}: Executes subquery decomposition, multi-facet retrieval, and returns synthesized task DAGs with gap analysis.
\item \code{lookup\_entity(query, entity\_type, format)}: Retrieves verified capability contracts ($\sigma$), asset metadata, or topic summaries by ID (\code{CAP\_*}, \code{AST\_*}) or name.
\item \code{search\_evidence(query, top\_k)}: Queries research papers, extraction provenance, and negative search ledgers.
\item \code{search\_knowledge\_base(query, top\_k, scope)}: Direct hybrid retrieval across topic, capability, and asset layers.
\end{enumerate}
Any MCP-compliant client (Claude Desktop, Cursor, Trae, OpenAI Codex, Antigravity) connects via standard JSON configuration, enabling zero-shot grounded engineering assistance.

\section{Artifact Scale and Breadth}

\subsection{Corpus Statistics}
Table~\ref{tab:snapshot} reports the public substrate state. The 2,511 published topics span 15 top-level domains (Table~\ref{tab:domains}).

\begin{table}[t]
\centering
\caption{Public artifact snapshot, 28 August 2026.}
\label{tab:snapshot}
\begin{tabular}{@{}lr@{}}
\toprule
Public counter & Value \\
\midrule
Published topics & 2,511 \\
Registered physical assets ($\mathcal{A}$) & 11,397 \\
Registered capability contracts ($\mathcal{C}$) & 37,673 \\
Capability-dependency projection nodes & 26,441 \\
Directed dependency edges ($\mathcal{R}_{\text{precedes}}$) & 54,602 \\
Total capability step usages ($|U|$) & 58,989 \\
Amortization factor ($\alpha$) & 1.566 \\
\bottomrule
\end{tabular}
\end{table}

\begin{table}[t]
\centering
\caption{Published topics by top-level domain; counts sum to 2,511.}
\label{tab:domains}
\resizebox{\columnwidth}{!}{%
\begin{tabular}{@{}lr@{\quad}lr@{}}
\toprule
Domain & $n$ & Domain & $n$ \\
\midrule
Foundation models & 142 & Human--robot interaction & 154 \\
Learning & 162 & Localization & 126 \\
Manipulation & 191 & Mapping & 140 \\
Motion and control & 193 & Multi-robot systems & 133 \\
Navigation & 153 & Perception & 258 \\
Planning & 155 & Reasoning and agents & 165 \\
Safety and assurance & 189 & Simulation/digital twins & 148 \\
Systems infrastructure & 202 & \textbf{Total} & \textbf{2,511} \\
\bottomrule
\end{tabular}}
\end{table}

\section{Comprehensive Experimental Evaluation}

\subsection{Entity-Retrieval Benchmark}
The controlled benchmark contains 84 queries across 6 intent categories (34 identity, 24 concept, 13 selection, 6 multihop, 5 function, 2 negative) evaluated under six conditions (Table~\ref{tab:retrieval}). Confidence intervals use 5,000 bootstrap resamples.

\begin{table*}[t]
\centering
\caption{Entity retrieval over 84 queries (83 with scorable positives). All 17 hard-negative assertions had zero hits at rank 10.}
\label{tab:retrieval}
\resizebox{\textwidth}{!}{%
\begin{tabular}{@{}lcccccc@{}}
\toprule
Condition & nDCG@10 & Recall@10 & Recall@20 & MRR & P50 ms & P95 ms \\
\midrule
Lexical (BM25) & .563 [.458, .664] & .639 [.530, .735] & .735 [.639, .831] & .535 [.434, .635] & 90.6 & 138.5 \\
Dense (PyTorch GPU) & \textbf{.668} [.572, .759] & \textbf{.771} [.675, .855] & \textbf{.843} [.771, .916] & \textbf{.604} [.512, .697] & 336.4 & 377.8 \\
Hybrid fusion & .605 [.508, .700] & .723 [.627, .819] & .831 [.747, .904] & .550 [.453, .644] & 413.8 & 456.5 \\
Hybrid + graph & .599 [.499, .696] & .711 [.614, .807] & .771 [.675, .855] & .545 [.448, .640] & 527.7 & 630.2 \\
Hybrid + reranker & .382 [.296, .471] & .590 [.494, .699] & .783 [.687, .867] & .302 [.228, .376] & 4,038.5 & 6,345.4 \\
Full graph + reranker & .366 [.280, .458] & .554 [.446, .663] & .771 [.675, .855] & .296 [.222, .370] & 4,122.1 & 6,485.3 \\
\bottomrule
\end{tabular}}
\end{table*}

\begin{table}[t]
\centering
\caption{Full system minus comparison, paired over scored queries.}
\label{tab:paired}
\resizebox{\columnwidth}{!}{%
\begin{tabular}{@{}lcc@{}}
\toprule
Comparison & $\Delta$nDCG@10 [95\% CI] & $\Delta$Recall@10 [95\% CI] \\
\midrule
Dense & $-.301$ [$-.393, -.209$] & $-.217$ [$-.325, -.108$] \\
No reranker & $-.233$ [$-.317, -.145$] & $-.157$ [$-.265, -.048$] \\
No graph expansion & $-.016$ [$-.030, -.004$] & $-.036$ [$-.084, .000$] \\
\bottomrule
\end{tabular}}
\end{table}

\textbf{Analysis}: Dense retrieval is the strongest entity ranker (nDCG@10 0.668). Relative to dense, full graph-and-reranker retrieval reduces nDCG@10 by 0.301 (Table~\ref{tab:paired}) and increases median latency twelve-fold. This demonstrates that maximal pipelines should not be uniformly applied to simple entity queries; runtime intent classification should route simple lookups directly to dense index while reserving graph expansion for compositional tasks.

\subsection{Plan Synthesis and Grounding Benchmark}
We evaluated 24 multi-disciplinary robotics engineering tasks across 5 matched planner conditions (120 full prediction records) using a fail-closed test harness (Table~\ref{tab:trackp}).

\begin{table*}[t]
\centering\small
\caption{Plan synthesis and context grounding benchmark: 24 tasks $\times$ 5 conditions (120 prediction records). Lower is better for unsupported claims and constraint violations; higher is better otherwise. Bootstrap intervals use 2,000 resamples.}
\label{tab:trackp}
\resizebox{\textwidth}{!}{%
\begin{tabular}{@{}lccccc@{}}
\toprule
Condition & Unsupported claims $\downarrow$ & Hard-constraint violation $\downarrow$ & Constraint coverage $\uparrow$ & Graph validity $\uparrow$ & Capability F1 $\uparrow$ \\
\midrule
LLM direct & 100.0\% & 100.0\% & 0.0\% & 83.3\% & .025 \\
Lexical RAG & 100.0\% & 100.0\% & 0.0\% & 75.0\% & .020 \\
Hybrid RAG & 100.0\% & 100.0\% & 0.0\% & 79.2\% & .008 \\
\eb\ context only & 100.0\% & 83.3\% & 16.7\% & 75.0\% & .008 \\
\textbf{\eb\ Full} & \textbf{5.2\%} & \textbf{66.7\%} & \textbf{35.4\%} & 62.5\% & .008 \\
\midrule
Full $-$ Hybrid RAG & $-94.8$ [$-97.4, -92.1$] pp & $-33.3$ [$-54.2, -16.7$] pp & $+35.4$ [$+16.7, +54.2$] pp & $-16.7$ [$-37.5, +4.2$] pp & .000 [.000, .000] \\
\bottomrule
\end{tabular}}
\end{table*}

\textbf{Grounding Impact}: \eb\ Full eliminates ungrounded hallucinations, reducing unsupported claims from 100.0\% to 5.2\% (a $-94.8$\,pp drop), while increasing explicit hard-constraint coverage from 0.0\% to 35.4\% and lowering hard-constraint violations from 100.0\% to 66.7\%.

\subsection{Case Study 1: Wheeled Mobile Manipulator for Autonomous Orchard Harvesting}
To demonstrate how \eb\ powers multi-turn iterative robotics development, we detail an end-to-end case study: developing an autonomous mobile manipulator---combining a \textbf{Clearpath Husky differential base} with a \textbf{Franka Emika Panda 7-DOF arm} and two-finger gripper---to execute row navigation, obstacle avoidance, and non-destructive fruit harvesting in PyBullet.

\noindent\textbf{Multi-Turn Iterative Development Trajectory}: The development progressed across realistic conversational turns driven by simulation feedback:
\begin{itemize}
\item \textbf{Turn 1 (Initial PoC Synthesis)}: The user provided a high-level goal: \emph{``Build a 3D orchard harvesting simulation with a Husky base and Panda arm in PyBullet.''} The agent queried \eb\ via \code{/integrate} to synthesize the 6-stage modular architecture (\code{scene.py}, \code{robot.py}, \code{navigation.py}, \code{grasping.py}, \code{main.py}). The initial execution revealed severe physics bugs: the differential base cut corners and clipped into rock obstacles, while the extended arm swept into crop rows (only 1/4 fruits harvested).
\item \textbf{Turn 2 (Simulation Feedback \& CCD Consultation)}: The user reported the observed failure: \emph{``The vehicle clips through obstacles during turning, and the arm collides with crops during transit.''} Instead of guess-and-check prompt tweaking, the agent queried \eb:
  \begin{enumerate}
  \item \emph{Continuous Collision Detection (CCD Guard)}: Querying \code{consult\_robotics\_solution("mobile base dynamic footprint CCD")}, the agent received the 8-vertex footprint envelope and \code{p.getClosestPoints} contract, enforcing a minimum clearance ($\ge 0.0391\,\text{m}$) that eliminated mesh clipping.
  \item \emph{Tucked Travel State Machine}: Integrated a retracted transit posture during navigation to prevent sweep collisions.
  \end{enumerate}
\item \textbf{Turn 3 (Docking Alignment \& Grasp Quality)}: The user noted: \emph{``Near-obstacle fruits are unreached due to single-angle docking, and grasp stability lacks verification.''} The agent executed two targeted lookups:
  \begin{enumerate}
  \item \emph{Multi-Angle Docking \& IK Synchronization}: Querying \code{lookup\_entity("CAP\_mobile\_manipulation\_ik")}, the agent implemented circumferential standoff sampling ($d=0.45\,\text{m}$) and aligned base-yaw with arm IK $[\pi, 0, \text{yaw}_{\text{base}}]$.
  \item \emph{Ferrari-Canny Force-Closure Assessment}: Querying \code{lookup\_entity("CAP\_force\_closure\_quality")}, the agent embedded the analytical closed-form metric ($\epsilon = r \cdot \mu \cdot \text{antipodality} = 0.0420 > 0$), verifying contact equilibrium before releasing stem constraints.
  \end{enumerate}
\end{itemize}
\noindent\textbf{Final Execution}: Driven by 3 iterative turns, the system converged to \textbf{100\% task success (4/4 fruits detected, reached, grasped, and deposited)}, 7 active CCD push-backs, 0 collision clipping, and full HUD telemetry.

\subsection{Case Study 2: Unitree G1 Humanoid in Orchard Autonomous Harvesting}
To evaluate high-degree-of-freedom embodied systems on rough terrain, we examine an autonomous bipedal harvesting controller for the \textbf{Unitree G1 humanoid robot} (23-DOF) operating on a $15^\circ$ sloped orchard within the MuJoCo physics engine.

\noindent\textbf{Multi-Turn Iterative Trajectory}: Starting from \emph{``Develop a MuJoCo controller for the Unitree G1 to walk over rough sloped terrain and harvest delicate fruit''}:
\begin{itemize}
\item \textbf{Turn 1 (Initial Locomotion Failure)}: Baseline flat-ground gait collapsed immediately on the $15^\circ$ slope. Prompted by the user's report (\emph{``Humanoid slips and tips over on uneven slopes''}), the agent queried \eb\ for sloped rough-terrain locomotion:
  \begin{enumerate}
  \item \emph{Perception \& GPU Elevation Mapping}: Integrated \code{AST\_elevation\_mapping\_cupy} to downsample LiDAR point clouds (0.02\,m) and estimate local terrain normal vectors.
  \item \emph{Nonlinear MPC Dynamic Balancing}: Bound \code{AST\_unitree\_sdk2} to enforce centroidal dynamics and Zero Moment Point (ZMP) stability over slope friction $\mu = 0.6$.
  \end{enumerate}
\item \textbf{Turn 2 (Grasping Verification \& Gap Reporting)}: The user requested non-destructive peach picking. The agent queried Pinocchio analytical IK (\code{AST\_pinocchio}) for reachability and applied slip-limited force control ($F_{\text{normal}} \le 4.5\,\text{N}$). When asked for closed-loop tactile fruit softness estimation, \eb\ explicitly emitted a formal capability gap ($\mathcal{C}_{\text{gap}}$) and recommended impedance current feedback rather than hallucinating an ungrounded sensor driver.
\end{itemize}
\noindent\textbf{Final Execution}: The multi-turn compiled controller achieved 100\% non-destructive harvest success across 10 trials in MuJoCo with zero joint singularities.

\section{Discussion, Engineering Lessons, and Threats to Validity}

\subsection{Core Lessons for Agent-Native Systems}
\begin{enumerate}
\item \textbf{Hand Off Artifacts, Not Summaries}: Passing conversational summaries between agents causes severe context decay. Durable, typed JSON/Markdown artifacts with programmatic validators are essential.
\item \textbf{Deterministic Gates are Non-Negotiable}: LLMs cannot reliably self-assess graph consistency or identity uniqueness. Deterministic code (DFS cycle checks, file locks, transactional rewrites) must govern state transitions.
\item \textbf{Intent Routing Beats Monolithic Pipelines}: Complex rerankers degrade entity retrieval. Dynamic intent routing is crucial to select optimal retrieval strategies.
\end{enumerate}

\subsection{Limitations and Threats to Validity}
\begin{itemize}
\item \textbf{Corpus Provenance Completeness}: In audited chain documents, 81.99\% of references resolve to physical artifacts with 2,388 explicit \code{[unverified]} markers. Unresolved references remain structural debt.
\item \textbf{Entity Benchmark Scope}: The 84-query benchmark evaluates entity ranking; comprehensive graph-generation benchmarks with full human double-blind adjudication remain ongoing work.
\end{itemize}

\section{Conclusion and Open-Source Release}
\eb\ demonstrates that the fragmented universe of robotics engineering knowledge can be compiled into a persistent, typed capability substrate via an agent-native compiler bounded by deterministic gates. Spanning 2,511 topics, 37,673 capabilities, 11,397 assets, and 54,602 dependency edges, \eb\ eliminates over 21,316 redundant derivations. By exposing 6-dimensional Semantic Views and standardized FastMCP tools to downstream coding agents, \eb\ provides machine-checkable architectural foresight and grounded verification for modern robotics engineering.

\noindent\textbf{Public Platform and API}: \url{https://xiangshang.ngrok.app/}\\
\noindent\textbf{Open Source Repository}: \url{https://anonymous.4open.science/r/entropy-box/}

\section*{AI Use Disclosure}
OpenAI ChatGPT/Codex was used to assist manuscript restructuring, language editing, consistency checking, and LaTeX preparation. The authors verified all source code, data, claims, citations, and the final manuscript.


\begin{thebibliography}{99}\footnotesize
\bibitem{waibel2011roboearth} M. Waibel et al., \emph{RoboEarth}, IEEE Robotics \& Automation Magazine, vol. 18, no. 2, pp. 69--82, 2011.
\bibitem{tenorth2013knowrob} M. Tenorth and M. Beetz, \emph{KnowRob: A Knowledge Processing Infrastructure for Cognition-Enabled Robots}, Int. J. Robot. Res., vol. 32, no. 5, pp. 566--590, 2013.
\bibitem{beetz2010cram} M. Beetz, L. M\"osenlechner, and M. Tenorth, \emph{CRAM---A Cognitive Robot Abstract Machine for Everyday Manipulation in Human Environments}, in Proc. IEEE/RSJ IROS, 2010.
\bibitem{beetz2015openease} M. Beetz et al., \emph{openEASE---A Knowledge Processing Service for Robots and Robotics/AI Researchers}, in Proc. IEEE ICRA, 2015.
\bibitem{lewis2020rag} P. Lewis et al., \emph{Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks}, in Advances in Neural Information Processing Systems, 2020.
\bibitem{gao2023ragsurvey} Y. Gao et al., \emph{Retrieval-Augmented Generation for Large Language Models: A Survey}, arXiv:2312.10997, 2023.
\bibitem{edge2024graphrag} D. Edge et al., \emph{From Local to Global: A Graph RAG Approach to Query-Focused Summarization}, arXiv:2404.16130, 2024.
\bibitem{ahn2022saycan} M. Ahn et al., \emph{Do As I Can, Not As I Say: Grounding Language in Robotic Affordances}, in Proc. Conf. Robot Learning, 2022.
\bibitem{liang2023cap} J. Liang et al., \emph{Code as Policies: Language Model Programs for Embodied Control}, in Proc. IEEE ICRA, 2023.
\bibitem{yao2023react} S. Yao et al., \emph{ReAct: Synergizing Reasoning and Acting in Language Models}, in Proc. ICLR, 2023.
\bibitem{karpukhin2020dpr} V. Karpukhin et al., \emph{Dense Passage Retrieval for Open-Domain Question Answering}, in Proc. EMNLP, 2020.
\bibitem{cormack2009rrf} G. V. Cormack, C. L. A. Clarke, and S. B\"uttcher, \emph{Reciprocal Rank Fusion Outperforms Condorcet and Individual Rank Learning Methods}, in Proc. ACM SIGIR, 2009.
\bibitem{nogueira2019rerank} R. Nogueira and K. Cho, \emph{Passage Re-Ranking with BERT}, arXiv:1901.04085, 2019.
\bibitem{temiraliev2026r3} I. Temiraliev, D. Yang, and Y. Zhang, \emph{Retrieval-Augmented Robots via Retrieve--Reason--Act}, arXiv:2603.02688, 2026.
\bibitem{zhou2026retrieval} Z. Zhou, S. Chen, O. Salunkhe, E. T. Bekar, J. Stahre, and A. Skoogh, \emph{Retrieval-Grounded Robot Program Generation and Simulation-Based Correction via Model Context Protocol}, arXiv:2608.21417, 2026.
\bibitem{pan2025llmkg} S. Pan et al., \emph{LLM-Empowered Knowledge Graph Construction: A Survey}, arXiv:2510.20345, 2025.
\bibitem{jin2025graphsagents} B. Jin et al., \emph{Graphs Meet AI Agents: Taxonomy, Progress, and Future Opportunities}, arXiv:2506.18019, 2025.
\end{thebibliography}
\end{document}
