Preliminary Context Gathering
Definition (confidence: high)
A workflow pattern that constrains the LLM to gather all necessary context using tools before producing any output. The agent must search for relevant information, read relevant files, or classify the request before responding. Prevalence: MEDIUM (~25%, ~13 tools).
Variants (confidence: high)
| Level | Behavior | Tools |
|---|---|---|
| Light | ”Check the workspace first” before acting | Windsurf, Cursor |
| Medium | ”Read all relevant files before editing” | Comet, Junie |
| Heavy | ”Classify the request, gather context, then respond” | Kiro |
Tools Using This Pattern (confidence: high)
Comet Assistant, Codex CLI (2025), Gemini CLI, Junie, Devin, Windsurf (light), Cursor (light), kiro-intent-classifier (heavy).
Why This Matters (confidence: high)
Without a context-gathering gate, the LLM may act on incomplete information — hallucinating file contents, overwriting code it hasn’t read, or making incorrect assumptions. The gate forces evidence-based action. It pairs naturally with the plan-before-implement gate: gather context first, then plan, then execute.
Related Concepts (confidence: high)
plan-before-implement-gate — The complementary pattern. Context gathering answers “what exists?”; plan gates answer “what should I do?” Together they form a complete pre-execution workflow.
chain-of-thought-pattern — CoT often precedes context gathering. The agent thinks about what information it needs, then gathers it, then reasons about next steps.
skills-directory-gate — The skills gate determines which skill to use; context gathering feeds input into that skill. These patterns often co-occur in sophisticated agents.
communication-style-spectrum — Context gathering affects communication style. Heavy gatherers (Kiro classifier) tend toward exhaustive enumeration. Light gatherers tend toward solution-only.
Implications (confidence: high)
Preliminary context gathering is a key reliability pattern. It prevents the most common agent failure mode — acting on incomplete information. The light/heavy classification helps match the investment to the task: simple codegen needs only light context checking; complex refactoring needs heavy gathering. The pattern’s medium prevalence (~25%) suggests it’s under-adopted — many tools that would benefit from it don’t use it.
Sources
- [raw/prompts/articles/taxonomy-synthesis-2026-07-16.md]