
feature
Create a comprehensive plan to implement a new feature
提供方 ashneyderman|开源
Feature Planning
Create a plan to implement the feature using the specified markdown Plan Format. Research the codebase and create a thorough plan.
Instructions
Extract parameters:
agf_id- The unique task identifierprompt- The feature description
- If
agf_idorpromptis not provided, stop and ask the user to provide them - Create a plan to implement the feature described in the
prompt - The plan should be comprehensive, well-designed, and follow existing patterns
- Create the plan in the
specs/directory with filename:<agf_id>-feature-<descriptive_name>.md- Replace
<descriptive_name>with a short, descriptive name based on thepromptitself (e.g., "add-agent-logging", "implement-retry-logic", "create-workflow-api")
- Replace
- Research the codebase starting with
README.md - Replace every
<placeholder>in the Plan Format with the requested value - Use your reasoning model: THINK HARD about the feature requirements, design, and implementation approach
- Follow existing patterns and conventions in the codebase
- Design for extensibility and maintainability
Codebase Structure
- Read:
README.mdfor project overview and instructions (start here) to understand the project structure and guidelines
Plan Format
# Feature: <feature name>
## Metadata
agf_id: `<agf_id>`
prompt: `<prompt>`
## Feature Description
<describe the feature in detail, including its purpose and value to users>
## User Story
As a <type of user>
I want to <action/goal>
So that <benefit/value>
## Problem Statement
<clearly define the specific problem or opportunity this feature addresses>
## Solution Statement
<describe the proposed solution approach and how it solves the problem>
## Relevant Files
Use these files to implement the feature:
<list files relevant to the feature with bullet points explaining why. Include new files to be created under an h3 'New Files' section if needed>
## Implementation Plan
### Phase 1: Foundation
<describe the foundational work needed before implementing the main feature>
### Phase 2: Core Implementation
<describe the main implementation work for the feature>
### Phase 3: Integration
<describe how the feature will integrate with existing functionality>
## Step by Step Tasks
IMPORTANT: Execute every step in order, top to bottom.
<list step by step tasks as h3 headers with bullet points. Start with foundational changes then move to specific changes. Include creating tests throughout the implementation process>
### 1. <First Task Name>
- <specific action>
- <specific action>
### 2. <Second Task Name>
- <specific action>
- <specific action>
<continue with additional tasks as needed>
## Testing Strategy
### Unit Tests
<describe unit tests needed for the feature>
### Edge Cases
<list edge cases that need to be tested>
## Acceptance Criteria
<list specific, measurable criteria that must be met for the feature to be considered complete>
## Validation Commands
Execute these commands to validate the feature is complete:
<list specific commands to validate the work. Be precise about what to run. Include command that runs all the tests.>
- Example: `uv run python -m py_compile apps/*.py` - Test to ensure the code compiles
## Notes
<optional additional context, future considerations, or dependencies. If new libraries are needed, specify using `uv add`>
Output Format
IMPORTANT: Return a JSON object with this structure:
{
"path": "specs/<agf_id>-feature-<descriptive_name>.md"
}
Example Output
{
"path": "specs/agf-001-feature-user-authentication.md"
}