Skip to content

Conversation

@godtail
Copy link

@godtail godtail commented Dec 22, 2025

✨ Integrate Built-in Planner Agent for Task Planning

This PR introduces a powerful, built-in Planner Agent designed to streamline development workflows by generating detailed technical implementation plans directly within the VSCode WebUI.

🚀 Key Highlights

  • Smart Planning Agent: A specialized agent that analyzes your codebase to architect solutions and provide step-by-step implementation roadmaps.
  • One-Click Action: A new "Create Plan" button (📋) in the chat input allows users to instantly trigger the planning process for any task.
  • Automatic Persistence: Plans are automatically saved to .pochi/plans/{taskId}.md, providing a persistent technical reference for the implementation phase.
  • Multi-language Support: Full localization for English, Japanese, Korean, and Chinese.

🛠️ Implementation Details

🤖 Core & Agents

  • Built-in Agent Support: Refactored the agent management system to support both file-based and in-memory built-in agents.
  • Planner Agent: Implemented planner-agent.ts with a specialized system prompt and toolset (readFile, globFiles, searchFiles, writeToFile).
  • Context Enhancement: Updated the environment schema to include taskId, enabling agents to interact with task-specific storage.

💻 VSCode WebUI

  • Task Input: Integrated the "Create Plan" button into CreateTaskInput with a dedicated shortcut/UI path.
  • Bridge Updates: Enhanced the VSCodeHostApi to pass taskId during environment reads.
  • Localization: Added chat.createPlanTooltip across all supported locales.

🔧 Refactoring

  • Renamed isValidCustomAgentFileisValidCustomAgent to reflect the broader support for agent types.
  • Updated CustomAgentManager to initialize with builtInCustomAgents.

🎮 How to Use

  1. Open the Pochi chat panel.
  2. Describe a feature or bug (e.g., "Add a settings page for user preferences").
  3. Click the Clipboard icon next to the attachment button.
  4. The Planner Agent will generate and save a detailed roadmap to your project's .pochi/plans/ directory.

🤖 Generated with Pochi

godtail and others added 4 commits December 23, 2025 00:43
This PR introduces a built-in "Planner" agent to help users generate detailed implementation plans directly from the VSCode WebUI.

### Key Changes

- **New "Planner" Agent**: Added a built-in `planner` agent (`packages/common/src/base/built-in-custom-agents/planner-agent.ts`) specialized in architecting technical solutions and creating step-by-step roadmaps.
- **UI Integration**: Added a "Create Plan" button to the task input area in the VSCode WebUI.
    - Clicking this button initiates a task using the planner agent.
    - Added tooltips and localization support (en, jp, ko, zh).
- **Environment Context**: Updated the environment system to pass the current `taskId` to the agent, allowing the planner to save plans to `.pochi/plans/{taskId}.md`.
- **Refactoring**:
    - Renamed `isValidCustomAgentFile` to `isValidCustomAgent` to support both file-based and built-in (in-memory) custom agents.
    - Updated `CustomAgentManager` in VSCode to load built-in agents alongside user-defined ones.
…lanning mode

* **Planner Agent**: Updated system prompt to strictly forbid code implementation and instruct the agent to output a `<plan-card>` tag upon completion.
* **Plan Card UI**: Implemented a new `PlanCard` component that displays the plan status and offers "Review & Comment" (opens file) and "Execute Plan" (sends instruction to chat) actions.
* **Markdown Support**: Added support for rendering the `<plan-card>` tag in chat messages, using the standardized `task-id` attribute.
* **Localization**: Added multi-language support (en, jp, ko, zh) for the new Plan Card UI.
* **Refactor**: Fixed linting issues and formatted code.
…ard UI

* **Planner Agent**: Optimized plan structure with analysis, steps, and verification. Enforced plan-only mode.
* **PlanCard UI**: Simplified to a compact card with action buttons in the footer. Removed preview logic for better fit in VSCode UI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant