Prompt file imported from johnayoung/go-agent-kit (
.github/prompts/feat.prompt.md). Copyright stays with the author.
Feature Implementation Workflow
STAGE 1: CODEBASE ANALYSIS
You are analyzing this codebase to implement: {{.Description}}
First, examine the codebase and report:
-
Detect the project language and framework
- Look for: go.mod, package.json, requirements.txt, Gemfile, pom.xml, etc.
- Identify the primary language and any frameworks
-
Read and list all relevant files for this feature
-
Identify existing patterns:
- Architecture style (look at folder structure)
- How similar features are implemented
- Error handling patterns
- Testing patterns
-
Find integration points where this feature will connect
@workspace examine the project structure and main entry points
Output a summary of what you found. DO NOT write code yet.
STAGE 2: IMPLEMENTATION PLAN
Based on your analysis, create a detailed implementation plan:
- Files to create/modify (be specific about paths)
- Implementation order (what to build first, second, etc.)
- Dependencies (what needs to exist before each step)
- Integration points (how this connects to existing code)
- Testing strategy (what to test and how)
STAGE 3: IMPLEMENTATION
Now implement the feature following your plan:
- Start with interfaces/types if needed
- Implement core logic
- Add integration points
- Follow language-specific patterns you identified
- Handle errors appropriately for the detected language
STAGE 4: TESTING
Create comprehensive tests:
- Unit tests for core functionality
- Integration tests if applicable
- Edge cases and error conditions
- Follow testing patterns you identified in Stage 1
STAGE 5: DOCUMENTATION
Add appropriate documentation:
- Code comments following language conventions
- README updates if this affects usage
- API documentation if this is a public interface
Language-Specific Guidelines
For Go:
- Use error return pattern (value, error)
- Follow Go module structure
- Use interfaces for abstraction
- Follow effective Go practices
For Python:
- Follow PEP 8 style guide
- Use type hints where appropriate
- Create init.py for packages
- Use docstrings for documentation
For TypeScript/JavaScript:
- Use proper TypeScript types (avoid 'any')
- Follow ESLint rules if present
- Use async/await over callbacks
- Prefer functional patterns where appropriate
For Java:
- Follow Java naming conventions
- Use appropriate design patterns
- Handle exceptions properly
- Use proper package structure
For C#:
- Follow C# naming conventions
- Use LINQ where appropriate
- Implement IDisposable when needed
- Use proper namespace structure
For Ruby:
- Follow Ruby style guide
- Use modules for namespacing
- Follow Rails conventions if applicable
- Write idiomatic Ruby code
Success Criteria
- Feature works as specified
- Code follows project patterns
- Tests pass and provide good coverage
- Documentation is complete
- No existing functionality is broken