Context
The swarm architecture documentation was recently consolidated, moving the startup workflow into AGENTS.md. A core mandate is the "Anti-Hallucination Policy", which dictates the usage of Knowledge Base tools.
Problem
There is a split-brain conflict within AGENTS.md regarding the primary Knowledge Base tool.
- §2.1 correctly establishes
ask_knowledge_base as the primary Anti-Hallucination tool for conceptual understanding (acting as an embedded zero-cost RAG agent) and demotes query_documents to file discovery.
- However, §15.1 ("The Query Command") and §15.3 ("The Two-Stage Query Protocol") still contain legacy instructions that incorrectly promote
query_documents as the "most important tool" and mandate its use for Stage 1 (understanding the technical "how").
This conflict creates cognitive friction for agents, as they receive contradictory instructions on how to acquire context, leading to inefficient query_documents -> view_file chains instead of utilizing the superior ask_knowledge_base synthesis.
Architectural Reality
ask_knowledge_base is strictly superior for conceptual queries. It performs the same underlying vector search as query_documents but adds an LLM synthesis step, returning both the answer and the same top-5 ranked references. Using query_documents for conceptual understanding wastes context window and turns.
Fix
Refactor AGENTS.md to establish a unified, non-contradictory tool hierarchy:
- Rewrite §15.1 to reflect the dominance of
ask_knowledge_base and align with §2.1.
- Update §15.3 (Stage 1) to mandate
ask_knowledge_base for "understanding the how", reserving query_documents for exhaustive path enumeration.
- Ensure the documentation consistently promotes the Embedded RAG pattern over manual file reading for conceptual tasks.
Acceptance Criteria
Context
The swarm architecture documentation was recently consolidated, moving the startup workflow into
AGENTS.md. A core mandate is the "Anti-Hallucination Policy", which dictates the usage of Knowledge Base tools.Problem
There is a split-brain conflict within
AGENTS.mdregarding the primary Knowledge Base tool.ask_knowledge_baseas the primary Anti-Hallucination tool for conceptual understanding (acting as an embedded zero-cost RAG agent) and demotesquery_documentsto file discovery.query_documentsas the "most important tool" and mandate its use for Stage 1 (understanding the technical "how").This conflict creates cognitive friction for agents, as they receive contradictory instructions on how to acquire context, leading to inefficient
query_documents->view_filechains instead of utilizing the superiorask_knowledge_basesynthesis.Architectural Reality
ask_knowledge_baseis strictly superior for conceptual queries. It performs the same underlying vector search asquery_documentsbut adds an LLM synthesis step, returning both the answer and the same top-5 ranked references. Usingquery_documentsfor conceptual understanding wastes context window and turns.Fix
Refactor
AGENTS.mdto establish a unified, non-contradictory tool hierarchy:ask_knowledge_baseand align with §2.1.ask_knowledge_basefor "understanding the how", reservingquery_documentsfor exhaustive path enumeration.Acceptance Criteria
query_documentsis the "most important tool".ask_knowledge_basefor Stage 1 conceptual queries.query_documents->view_filechains for conceptual understanding are removed.