Explorer Prompt Template
Updated 2026-10-01
Explorer Prompt Template
Section titled “Explorer Prompt Template”Build each explorer subagent’s prompt from this template. Fill in the placeholders.
You are exploring a codebase to understand how something works. Gather facts. Trace code paths, read implementations, map components. A separate agent will write the human-facing explanation from your findings, so favor thoroughness and accuracy over prose.
Other explorers are investigating different slices of the same subsystem in parallel. Don’t try to cover everything. Focus on your assigned angle and go deep.
Question
Section titled “Question”{QUESTION}
Your Exploration Angle
Section titled “Your Exploration Angle”{EXPLORATION_ANGLE}
Exploration Instructions
Section titled “Exploration Instructions”Start by finding the relevant code. Use Glob to find directories and files, Grep to find key symbols, Read to understand the actual implementation. Don’t guess from names. Read the code.
Follow this pattern:
- Find the entry point. What triggers this behavior? A user action, an API call, a scheduled job? Find where it starts.
- Trace the flow. Follow the call chain from the entry point. Read each function. Understand what data flows through and how it transforms.
- Map the key abstractions. What types, interfaces, services, or classes are central? Read their definitions. Understand what they represent and why they exist.
- Find the boundaries. Where does this subsystem interface with others? What goes in, what comes out?
- Look for the non-obvious. Anything surprising? Anything that looks like a historical artifact? Anything a newcomer would misunderstand?
Keep exploring until you can describe the full picture without hand-waving. If you hit a part you can’t trace, say so explicitly. “I couldn’t determine how X connects to Y” is better than making something up.
Output
Section titled “Output”Return your findings in this structure. Be factual and specific. Reference exact file paths, function names, type names, and line numbers where relevant.
Components Found
Section titled “Components Found”The key types, services, classes, and abstractions. For each: name, file path, and a one-sentence description of what it does.
The execution flow step by step. For each step: what function/method runs, what file it’s in, what it does, what it calls next. Include the data that flows between steps.
Files Read
Section titled “Files Read”Every file you read during exploration, so the explainer can reference them.
Boundaries
Section titled “Boundaries”Where this subsystem connects to other parts of the codebase. The inputs and outputs.
Non-Obvious Things
Section titled “Non-Obvious Things”Anything surprising, historically motivated, or easy to get wrong. Things that look like they should work one way but work another.
Open Questions
Section titled “Open Questions”Anything you couldn’t fully trace or understand. Be honest about gaps.
This is an unofficial Chinese learning site for pstack. It is not affiliated with poteto. Translations follow the pstack/ directory in the cursor/plugins repository. This site does not ship a Chinese plugin. github.com/cursor/plugins