GC-101 · Module 2

Planning & Task Management

3 min read

Effective AI-assisted coding starts with a plan. Gemini CLI supports custom /plan commands defined in .toml configuration files. A plan command lets you formalize a workflow — "analyze the codebase, identify the affected files, propose a change, validate the approach, then execute." This plan-before-code pattern is the single biggest differentiator between developers who get great results from AI agents and those who don't.

[command]
name = "plan"
description = "Create a structured plan before making changes"
prompt = """
Before writing any code, create a plan:
1. Analyze the current state of the relevant files
2. Identify what needs to change and why
3. List the files that will be modified
4. Describe the approach step by step
5. Note any risks or edge cases

Do NOT write code yet. Just present the plan for my review.

Task: {{args}}
"""

Gemini CLI includes a built-in WriteTodos tool that creates and manages todo items during a session. When working on complex tasks, ask Gemini to break the work into todos, then tackle them one by one. This keeps both you and the AI focused. The todos persist in the session and can be marked complete as you progress.

# Ask Gemini to create a structured task list
"Break down the auth migration into todos and work through them one at a time"

# Gemini uses WriteTodos internally to track:
# [ ] Extract auth logic from monolith
# [ ] Create new auth service module
# [ ] Add JWT validation middleware
# [ ] Update route handlers
# [ ] Add integration tests
# [x] Extract auth logic from monolith  ← completed

Do This

  • Start with a plan for any task touching more than 2 files
  • Use WriteTodos to track multi-step work
  • Review the plan before approving execution

Avoid This

  • Jump straight to "refactor the auth system" with no plan
  • Try to hold complex task state in your head
  • Auto-approve a plan without reading it because you're in a hurry