ashneyderman avatar

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 identifier
  • prompt - The feature description
  1. If agf_id or prompt is not provided, stop and ask the user to provide them
  2. Create a plan to implement the feature described in the prompt
  3. The plan should be comprehensive, well-designed, and follow existing patterns
  4. 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 the prompt itself (e.g., "add-agent-logging", "implement-retry-logic", "create-workflow-api")
  5. Research the codebase starting with README.md
  6. Replace every <placeholder> in the Plan Format with the requested value
  7. Use your reasoning model: THINK HARD about the feature requirements, design, and implementation approach
  8. Follow existing patterns and conventions in the codebase
  9. Design for extensibility and maintainability

Codebase Structure

  • Read: README.md for 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"
}