Skip to content

Research mode: lightweight planning without git operations #30

@chanakyav

Description

@chanakyav

Add a lightweight research/planning mode that runs the agent without creating branches, PRs, or commits.

Use Case

While one autopilot task is implementing a feature, you want to plan the next task. Run a research session that analyzes the codebase, produces a plan, and saves it — so when the first task completes, you can immediately start the next one with full context.

Proposed Design

# Research mode — no branch, no PR, just analysis
autopilot research --prompt "Analyze how pagination works in this codebase and plan how to add it to all API endpoints"
# => task abc123 (mode: research)

# Later, use the research as context for implementation
autopilot start --prompt "Add pagination to all API endpoints" --context abc123

Behavior

  • Runs copilot -p with a research-focused prompt (no git operations instructed)
  • Agent output saved to session files (same as today)
  • No branch creation, no PR, no git checkout
  • Task reaches COMPLETE when agent finishes
  • Session files can be referenced by future tasks via --context <task_id>

Research Prompt Template

The prompt should instruct the agent to:

  1. Analyze the relevant code
  2. Identify files that need changes
  3. Outline an implementation plan
  4. Note any risks or edge cases
  5. Write findings to a structured output file

--context flag

When --context <task_id> is passed to autopilot start:

  1. Load the research task's session file
  2. Prepend it to the implementation prompt as context
  3. Agent has full plan before starting implementation

Implementation Notes

  • New task_mode: "research" value
  • Simplified orchestrator: INIT -> RESEARCH -> COMPLETE (no VERIFY_PR, no review loop)
  • No branch locking needed (no git operations)
  • Research runs in current working directory (read-only from git perspective)
  • Could run in parallel with other tasks safely (no git mutations)

Open Questions

  • Should research mode have a timeout? (Default agent_timeout_seconds should suffice)
  • Should we support --context referencing multiple research sessions?
  • Could this evolve into a general "agent task" framework beyond just research?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions