Direct answer
An exploration plan should name the unknown that blocks implementation, the evidence that could resolve it, and the decision that follows. Start broad enough to find the relevant domain, then narrow with the repository’s own terms. Stop when the next decision can be made, not when every file has been read.
Do not begin an edit while a blocking product or architectural choice remains unresolved. Separate findings supported by files from assumptions that still need confirmation. If discovery changes the requested outcome or protected behavior, revise the brief and seek a new approval rather than hiding the change inside implementation.
Why unbounded discovery wastes the planning budget
Exploration feels productive because every new file adds context. The trouble begins when reading becomes the goal instead of a means to a decision. A repository tour can consume attention without answering the question that blocked the plan.
A useful unknown is specific. “Understand the account area” names a domain but not a decision. “Find where the expired-account message is defined and whether its redirect belongs to the same component” gives discovery a target. The second form can end with evidence.
Official (F025): Claude Code common workflows recommends starting broad and then narrowing with specific domain language. Such an approach is a search strategy, not a promise that the first narrow path is correct.
Official (F026): the prompt engineering overview treats clear success criteria as a starting point. Those criteria may need refinement after exploration, so the planning brief should keep them visible without treating them as immutable.
Independent (F027): the OpenStax software engineering process chapter describes inception as gathering, refining, defining, and managing requirements. That source is foundational process guidance, not Claude Code-specific behavior, and the source was available through search evidence rather than a full fetch.
The monorepo search and context-bloat guide covers search efficiency as a separate topic. The focus here is the decision that exploration must support.
Name the unknown that blocks a plan
Begin with the decision that cannot yet be made. A useful unknown changes the implementation route, the scope, or the acceptance condition. If resolving a question would not change any of those, it may be interesting but not blocking.
Write unknowns as questions with consequences. “Does filtering happen before or after pagination?” matters because the answer changes where a new status filter belongs. “What color is the heading?” may matter to a visual requirement, but it does not block the data-flow decision.
Classify the unknown before assigning discovery work. Some questions are discoverable in code. Others depend on product policy, external contracts, or requester intent. A repository search cannot decide whether an empty result should show a retry action or a permanent empty state.
| Unknown | Evidence that could resolve it | Decision that follows | Owner |
|---|---|---|---|
| Which component owns the message? | Definition and call sites | Edit target | Claude Code can investigate |
| Does the existing contract preserve the redirect? | Current route and component behavior | Protected behavior | Claude Code can investigate |
| Should an empty result offer retry? | Product requirement or requester answer | Acceptance condition | Human product owner |
| Is a dependency change necessary? | Current interfaces and proposed route | Scope exception | Human approval if scope changes |
| Which failure state is in scope? | Existing states and stated outcome | Plan boundary | Shared review |
The ambiguous requirements clarification guide helps separate discoverable facts from human decisions. Use that distinction to keep exploration from inventing policy.
A blocking unknown should also have a stopping condition. “Find the definition and one caller” can finish. “Learn the account system” cannot. The narrower statement gives the planner an observable state to report.
Choose evidence that could resolve it
For each unknown, name evidence that would change the answer. A file definition can establish where a symbol is declared. A caller can show how a value is consumed. A current branch can reveal behavior that a summary omitted. A product requirement can settle a choice that code cannot.
Avoid collecting evidence that merely repeats the same assumption. If three files import a helper, that may establish usage without establishing ownership of the requested behavior. Keep reading until the evidence distinguishes between the candidate routes.
A compact evidence request has four parts: the unknown, the source to inspect, the expected finding, and the decision it enables. That separation prevents discovery from drifting into unrelated architecture.
| Evidence request | Weak form | Decision-ready form |
|---|---|---|
| File ownership | “Look at account files” | “Find the message definition and the component that renders it” |
| Behavior | “Understand redirects” | “Trace the current expired-account path and record what remains unchanged” |
| Data flow | “Inspect filtering” | “Determine whether status filtering occurs before pagination” |
| Policy | “Handle empty states” | “Ask whether retry belongs to the agreed outcome” |
Official (F026): success criteria provide a starting point, not a permanent answer. If evidence shows that the criterion conflicts with the existing contract, update the requirement visibly. Do not rewrite the goal silently to match what discovery happened to find.
The context relevance guide for evidence selection supports choosing evidence that can change the answer. The file reference guide helps point to that evidence without attaching unrelated repository content.
Start broad, then narrow
Use broad discovery to locate the relevant domain and vocabulary. Names in code, routes, and project instructions can reveal which terms the repository uses for the behavior. Once those terms are known, narrow the search around definitions and consumers.
The broad pass should not become a full inventory. Its exit condition is a set of candidate locations or a clearer question. If the first pass produces too many unrelated matches, refine the domain language before reading more files.
The narrow pass should test a specific assumption. For example, the broad pass may identify an account-settings area. The narrow pass then asks where the expired state is rendered and which action follows it. Each read should either support or challenge a candidate route.
| Exploration breadth | Appropriate use | Stopping rule |
|---|---|---|
| Broad domain pass | Locate vocabulary and candidate areas | Stop when relevant terms and locations are identified |
| Definition pass | Find the symbol or block that owns behavior | Stop when the defining source is located |
| Consumer pass | Trace inputs, callers, and outputs | Stop when the relevant contract is understood |
| Contradiction pass | Check evidence that challenges the leading route | Stop when competing routes are distinguished |
| Decision pass | Compare findings with the requirement | Stop when the next plan choice is supported |
Official (F025): the documented progression is broad to narrow. The caveat is that the first narrow path may still be wrong, so retain a contradiction check when the cost of a wrong route is meaningful.
The working in large codebases documentation is supplied as official further reading. In this packet it is a canonical link only, so no detailed search-limit or tool behavior is asserted from it.
Do not turn every unknown into the same kind of search. A missing product rule needs a requester answer, not another grep. A missing symbol owner needs code evidence. Matching the method to the unknown keeps discovery efficient and honest.
Record discovered constraints
Discovery often produces constraints that were absent from the original request. A component may not own the behavior that a filename suggested. An existing interface may constrain the available implementation choices. A current branch may protect behavior that the new feature must preserve.
Record each constraint with its evidence and its consequence. A note such as “helper is shared” is weak. A note such as “the helper is called by the account route and settings page, so a signature change would affect both” explains why the plan should avoid that route. The note above is an editorial example, not a claim about a real repository.
A constraint can narrow scope without changing the outcome. If a shared helper must remain stable, the plan can target a local adapter instead. If the constraint makes the requested outcome impossible, the requirement needs revision rather than a hidden workaround.
| Constraint type | Record | Planning consequence |
|---|---|---|
| Ownership | Defining source and relevant consumers | Choose the edit target |
| Behavior | Current input and observable result | Add a protected condition |
| Interface | Caller expectations | Avoid an incompatible change |
| Scope | Work the request excludes | Remove unrelated steps |
| Policy | Human decision and owner | Block or revise the plan |
The negative requirements guide helps turn discovered constraints into exclusions. The behavior-preserving refactoring guide is relevant when the plan changes structure while retaining an existing contract.
A constraint should not be recorded as a universal rule. It belongs to the current repository evidence and the current request. If a later task changes that context, the constraint may no longer apply.
Separate findings from assumptions
A finding is supported by cited evidence. An assumption is a belief that still needs confirmation. Mixing them makes a plan look more certain than it is and hides the next decision.
Use plain labels in the exploration notes. Finding: the message is rendered by the named component, supported by its definition and caller. Assumption: the requester wants the redirect removed. The first can be checked in code; the second needs a product answer.
| Statement | Classification | Required next action |
|---|---|---|
| “The named component contains the visible message” | Finding, if the current file supports it | Cite the block in the plan |
| “The helper owns all filtering” | Assumption until consumers are traced | Inspect relevant call sites |
| “The requester wants a new empty state” | Product assumption | Ask for an acceptance condition |
| “A dependency change is required” | Assumption until alternatives are compared | Test a narrower route |
| “The existing redirect must remain” | Finding only if the brief or code establishes it | Record its source and scope |
Independent (F027): inception includes refining and managing requirements. That supports keeping the distinction visible as discovery changes understanding. It does not establish an automatic Claude Code replanning rule.
The conflicting instructions and precedence guide is useful when project guidance and current code appear to disagree. Record the conflict instead of choosing whichever source was read last.
An assumption can remain open without blocking all work. Mark whether it blocks the first edit, a later step, or only final acceptance. That classification prevents every uncertainty from stopping the entire task.
Decide whether exploration is sufficient
Exploration is sufficient when the next implementation decision can be made and the evidence behind it is inspectable. It does not require certainty about every detail. Remaining details can become bounded execution questions if they do not change the approved direction.
Use a readiness check:
- The blocking unknown has a supported answer or a named human owner.
- Candidate routes have been compared using relevant evidence.
- Discovered constraints are recorded with their consequences.
- Findings and assumptions are separated.
- The success criteria still match the requested outcome.
- The first proposed edit has a defining read before it.
- Any scope change is visible for approval.
If one item fails, choose the smallest next discovery action. Do not respond by reading the entire module set. A targeted question is more likely to close the gap.
The plan mode approval guide provides the next checkpoint when exploration produces an implementation proposal. The plan dependency guide helps order the evidence-producing steps before edits.
A useful stop statement is: “Implementation can be planned because the current evidence identifies the owning component, the protected redirect, and the unresolved empty-state policy.” That statement names what is known and what still blocks a specific choice.
Worked example: discover where a status filter belongs
Consider an editorial request to add a status filter to an existing table without changing the default result set. The implementation path is unknown because filtering could happen in the component or in the data-fetch layer.
The exploration plan names three questions: where rows are assembled, where pagination is applied, and where existing filter state is stored. Each question has evidence that could distinguish the routes. No edit is included in this plan.
The broad pass locates the table domain. The narrow pass reads the table definition, the row-fetch helper, and the current filter state. The contradiction pass checks whether an apparently local filter is transformed again before display.
Derived editorial example: discovery identifies two candidate routes: component-level filtering and fetch-layer filtering. The evidence rules out fetch-layer filtering because the existing fetch contract returns the complete page for that view. Formula: 2 candidate routes - 1 contradicted route = 1 route eligible for the implementation plan. The inputs and result belong only to this hypothetical example. They are not a benchmark or a Claude Code limit.
The remaining product question is whether an empty filtered result should offer a reset action. That choice does not block locating the filter, but it does block final acceptance wording. The plan records it as a human-owned decision instead of inventing an answer.
A decision-ready implementation plan can now propose a component-level filter, preserve the default result set, and leave the fetch contract unchanged. If later evidence shows that the component does not own pagination as assumed, the affected step pauses and the plan is revised.
Write the implementation plan
Translate findings into steps that change state. Each step should consume named evidence and produce an inspectable result. Avoid copying the exploration log into the implementation plan; keep only the constraints and decisions that control the work.
The first edit should be tied to the evidence that justified its target. A later verification step should test the original outcome, not merely repeat the planner’s confidence. The task breakdown guide for exit conditions provides the structure for those steps.
| Plan step | Consumes | Produces | Exit condition |
|---|---|---|---|
| Add filter state | Finding about current filter ownership | New local state | State has a defined default |
| Apply filter | Row data and status values | Filtered view | Default view remains unchanged |
| Handle empty result | Human-approved policy | Visible empty state | Policy matches acceptance criteria |
| Inspect result | Changed component and requirement | Review evidence | Outcome and exclusions are supported |
The exact edit target guide helps turn a discovered component into a unique replacement target. A file name alone is not enough once execution begins.
Official (F026): the success criterion remains the starting point, but exploration may refine it. If the refinement changes the product outcome, return to the brief. If it only clarifies how the existing outcome will be met, record the constraint and continue within the approved boundary.
Keep unresolved decisions visible
An unresolved decision should have an owner and a consequence. “Ask about empty states” is weaker than “the product owner must decide whether reset is offered before the empty-state acceptance condition can be approved.”
Place blocking decisions before the steps that consume them. If a decision only affects copy, it may remain open while structure is planned. If it changes data flow, it belongs before the first dependent edit.
The task checkpoint guide for long work helps record the current evidence, blocker, and next action. Session-handoff mechanics are not repeated here; the checkpoint exists to keep discovery decisions attached to the plan.
When new evidence invalidates a leading assumption, preserve the valid findings and revise only the affected route. The plan revision guide for new evidence explains when that change deserves another approval pass.
Concrete win, loss, and practical implication
Win: a bounded exploration plan can rule out an unsafe implementation route before any edit. The reviewer sees which evidence changed the decision and which product question remains open.
Loss: discovery can still miss relevant code, and a stopping rule can end too early. A narrow search may also reinforce the first plausible assumption if contradictory evidence is never requested. No supplied benchmark measures those risks.
Implication: pair every broad pass with a narrow evidence request and a contradiction check. Then use the reversible planning guide to place low-impact work before broader changes.
The verdict: resolve the decision, not the repository
Exploration earns its place when it changes what the team can decide. A repository does not need to be fully understood before a bounded change can be planned. It does need enough evidence to support the target, the constraints, and the next dependency order.
Use the context audit for loaded files when the question is what evidence is already present. Use this exploration plan when the question is what evidence is still missing. Those are different problems and deserve different stopping rules.
Data gaps and future updates
Unknown: the supplied research gives no optimal evidence-set size, exploration duration, or measured quality improvement. The stopping rules in this article are editorial heuristics, not documented thresholds.
The OpenStax source was available through search evidence. The large-codebases page was a canonical link only. Neither supports a quantitative claim about Claude Code search behavior.
Community evidence: no verified issue or reproducible run appears in the packet, so this article presents no community anecdote or claimed issue outcome.
A future update should recheck the official sources before adding tool mechanics or numeric guidance. Any comparison of exploration strategies would need a named method, comparator, and source.
One AI API Key option for OpenAI-format agents
If discovery feeds an OpenAI-format agent, One AI API Key offers https://api.oneaiapikey.com/v1, one key, and the packet’s 46 live free IDs for that format. Review the free model list and quickstart. These IDs are not Claude Code model sources; Claude Code uses an Anthropic-format route, and its Claude IDs were unavailable on 2026-11-27.
FAQ
When is exploration complete?
When the next implementation decision is supported by inspectable evidence and remaining unknowns have owners and consequences. Reading every file is not the goal.
What if the first narrow path is wrong?
Record the contradiction and compare the next candidate route. F025 explicitly describes broad-to-narrow exploration as a strategy, not a guarantee that the first path is correct.
Should every unknown block editing?
No. Classify each unknown by the step it affects. A policy choice that controls data flow should block dependent edits; a copy detail may wait until its step.
Can exploration change the requirement?
It can reveal that the original criterion needs refinement, which F026 allows. A changed product outcome should be approved visibly rather than absorbed into implementation.
Sources
- Official, fetched: Claude Code common workflows, F025. Start broad, then narrow with domain language; the first narrow path may be wrong.
- Official, fetched: Prompt engineering overview, F026. Clear success criteria are a starting point and may need refinement.
- Official, fetched: Claude Code best practices, F002. Precise prompts with file names and symptoms.
- Independent, search-index only: Software engineering process, F027. Foundational inception guidance, not Claude Code-specific behavior.
- Official, canonical link only: Working in large codebases. Further reading only; no detailed mechanics asserted.