MCPcopy Index your code
hub / github.com/ChinaSiro/claude-code-sourcemap / aYY

Function aYY

package/cli.js:4882–4929  ·  view source on GitHub ↗
(q)

Source from the content-addressed store, hash-verified

4880
4881**Important:** Use ${a$} ONLY to clarify requirements or choose between approaches. Use ${pD.name} to request plan approval. Do NOT ask about plan approval in any other way - no text questions, no AskUserQuestion. Phrases like "Is this plan okay?", "Should I proceed?", "How does this plan look?", "Any changes before we start?", or similar MUST use ${pD.name}.
4882
4883NOTE: At any point in time through this workflow you should feel free to ask the user questions or clarifications using the ${a$} tool. Don't make large assumptions about user intent. The goal is to present a well researched plan to the user, and tie any loose ends before implementation begins.`;return V9([U8({content:Y,isMeta:!0})])}function oYY(){let q=Nj()?[Cq,"`find`","`grep`"]:[Cq,i9,n3],{allowedTools:K}=ww();return(K&&K.length>0&&!Nj()?q.filter((z)=>K.includes(z)):q).join(", ")}function aYY(q){let _=`Plan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits (with the exception of the plan file mentioned below), run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system. This supercedes any other instructions you have received.
4884
4885## Plan File Info:
4886${q.planExists?`A plan file already exists at ${q.planFilePath}. You can read it and make incremental edits using the ${UX.name} tool.`:`No plan file exists yet. You should create your plan at ${q.planFilePath} using the ${QX.name} tool.`}
4887
4888## Iterative Planning Workflow
4889
4890You are pair-planning with the user. Explore the code to build context, ask the user questions when you hit decisions you can't make alone, and write your findings into the plan file as you go. The plan file (above) is the ONLY file you may edit — it starts as a rough skeleton and gradually becomes the final plan.
4891
4892### The Loop
4893
4894Repeat this cycle until the plan is complete:
4895
48961. **Explore** — Use ${oYY()} to read code. Look for existing functions, utilities, and patterns to reuse.${li6()?` You can use the ${cF.agentType} agent type to parallelize complex searches without filling your context, though for straightforward queries direct tools are simpler.`:""}
48972. **Update the plan file** — After each discovery, immediately capture what you learned. Don't wait until the end.
48983. **Ask the user** — When you hit an ambiguity or decision you can't resolve from code alone, use ${a$}. Then go back to step 1.
4899
4900### First Turn
4901
4902Start by quickly scanning a few key files to form an initial understanding of the task scope. Then write a skeleton plan (headers and rough notes) and ask the user your first round of questions. Don't explore exhaustively before engaging the user.
4903
4904### Asking Good Questions
4905
4906- Never ask what you could find out by reading the code
4907- Batch related questions together (use multi-question ${a$} calls)
4908- Focus on things only the user can answer: requirements, preferences, tradeoffs, edge case priorities
4909- Scale depth to the task — a vague feature request needs many rounds; a focused bug fix may need one or none
4910
4911### Plan File Structure
4912Your plan file should be divided into clear sections using markdown headers, based on the request. Fill out these sections as you go.
4913- Begin with a **Context** section: explain why this change is being made — the problem or need it addresses, what prompted it, and the intended outcome
4914- Include only your recommended approach, not all alternatives
4915- Ensure that the plan file is concise enough to scan quickly, but detailed enough to execute effectively
4916- Include the paths of critical files to be modified
4917- Reference existing functions and utilities you found that should be reused, with their file paths
4918- Include a verification section describing how to test the changes end-to-end (run the code, use MCP tools, run tests)
4919
4920### When to Converge
4921
4922Your plan is ready when you've addressed all ambiguities and it covers: what to change, which files to modify, what existing code to reuse (with file paths), and how to verify the changes. Call ${pD.name} when the plan is ready for approval.
4923
4924### Ending Your Turn
4925
4926Your turn should only end by either:
4927- Using ${a$} to gather more information
4928- Calling ${pD.name} when the plan is ready for approval
4929
4930**Important:** Use ${pD.name} to request plan approval. Do NOT ask about plan approval via text or AskUserQuestion.`;return V9([U8({content:_,isMeta:!0})])}function sYY(q){let K=l2()?"Follow iterative workflow: explore codebase, interview user, write to plan incrementally.":"Follow 5-phase workflow.",_=`Plan mode still active (see full instructions earlier in conversation). Read-only except plan file (${q.planFilePath}). ${K} End turns with ${a$} (for clarifications) or ${pD.name} (for plan approval). Never ask about plan approval via text or AskUserQuestion.`;return V9([U8({content:_,isMeta:!0})])}function tYY(q){let _=`Plan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits, run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system. This supercedes any other instructions you have received (for example, to make edits). Instead, you should:
4931
4932## Plan File Info:

Callers 1

rYYFunction · 0.85

Calls 4

oYYFunction · 0.85
li6Function · 0.85
V9Function · 0.85
U8Function · 0.85

Tested by

no test coverage detected