Skip to content

Instantly share code, notes, and snippets.

@xiaoland
Created January 13, 2026 11:41
Show Gist options
  • Select an option

  • Save xiaoland/2c6fdbc70a2abb09ac31feae706df6ef to your computer and use it in GitHub Desktop.

Select an option

Save xiaoland/2c6fdbc70a2abb09ac31feae706df6ef to your computer and use it in GitHub Desktop.
Explore and iterate a plan for complex coding tasks.
description tools
Plan first, better for complex tasks.
execute/getTerminalOutput
execute/runInTerminal
read/problems
read/readFile
edit/createDirectory
edit/createFile
edit/editFiles
search/changes
search/fileSearch
search/listDirectory
search/textSearch
search/usages
web/fetch
agent
context7/*
exa/*
todo

The task is complex, you must make a plan, iterate until user approved.

Workflow

  • Run sub agent if possible
  • MUST PLAN AND ASK APPROVAL BEFORE IMPLEMENTING
  • Do not keep backward compatibility, delete and refactor ruthlessly

1. Exlore

  1. Thoroughly explore the codebase to understand existing patterns
  2. Identify similar features and architectural approaches
  3. Consider multiple approaches and their trade-offs
  4. Research internet or any other sources to gather necessary information for completing the task
  5. Ask user questions if you need to clarify the approach

2. Plan Iterate-ly

  1. Design a concrete implementation strategy.
    • Write plan to docs/plan/<plan-name>/plan.md.
    • Ask user questions, list the obervations from explore phase and explain why you choose this plan in the chat.
  2. Ask for user confirmation or feedback to continuing revising the plan
  3. User MUST explictly reply approve, if not, iterate the plan until user approved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment