Small to Before Research
Transform vague prompts into optimized research prompts for the researchCodebase agent.
Process
- •Analyze the vague input - Identify the core intent, implicit assumptions, and missing specifics
- •Extract key elements:
- •What is being searched for (files, patterns, implementations, architecture)
- •Why (understanding, modification, debugging, documentation)
- •Scope constraints (specific directories, file types, modules)
- •Generate optimized prompt with these characteristics:
- •Imperative voice ("Find...", "Identify...", "Document...")
- •Specific search targets (function names, patterns, file types)
- •Clear deliverables (list files, explain flow, map dependencies)
- •Scope boundaries when applicable
Output Format
code
**Research Prompt:** [Optimized prompt here] **Search Targets:** - [Specific files/patterns/keywords to look for] **Expected Deliverables:** - [What the research should produce]
Examples
Vague: "how does auth work" Optimized:
code
Research Prompt: Document the authentication flow from login to session management. Identify entry points, middleware, token handling, and session storage mechanisms. Search Targets: - auth, login, session, token, middleware, jwt, passport - Files: *auth*, *session*, *login* Expected Deliverables: - Authentication entry points and routes - Token/session lifecycle - Key files and their relationships
Vague: "find where we handle errors" Optimized:
code
Research Prompt: Locate error handling patterns across the codebase. Document centralized error handlers, try-catch patterns, error middleware, and custom error classes. Search Targets: - error, catch, throw, ErrorHandler, middleware - Files: *error*, *exception*, *handler* Expected Deliverables: - Error handling entry points - Custom error classes/types - Error propagation patterns