End-to-end feature development workflow from research to deployment
This skill provides a structured workflow for developing features from concept to deployment, ensuring consistent quality and maintainability.
Goal: Understand the problem deeply before writing code.
□ Identify stakeholder needs
□ Clarify acceptance criteria
□ Define scope boundaries (what's in/out)
□ Identify dependencies and blockers
□ Estimate complexity
Questions to ask:
□ Review existing codebase for similar features
□ Check for reusable components/utilities
□ Identify required libraries/frameworks
□ Research best practices for this type of feature
□ Consider performance implications
□ Review security requirements
Document findings in comments or a separate file:
## Feature: [Name]
### Requirements
- [List key requirements]
### Technical Approach
- [Architecture decision]
### Dependencies
- [List dependencies]
### Risks
- [Potential blockers]
### References
- [Links to docs, similar code]
Goal: Create a clear roadmap before coding.
Break feature into small, testable chunks:
## Implementation Plan
### Task 1: [Name]
- **Scope**: [What this task accomplishes]
- **Files to touch**: [List]
- **Estimated time**: [Hours]
- **Dependencies**: [None/Task X]
### Task 2: [Name]
...
Guideline: Each task should be completable in 2-4 hours.
Create contracts/interfaces before implementations:
// repository.go - Define interface first
type UserRepository interface {
Create(ctx context.Context, user *User) error
GetByID(ctx context.Context, id string) (*User, error)
Update(ctx context.Context, user *User) error
Delete(ctx context.Context, id string) error
}
// Implementation comes later
type postgresUserRepo struct {
db *sql.DB
}
Goal: Build the feature incrementally with tests.
Before committing:
□ Code follows language conventions
□ No obvious security issues (input validation, auth)
□ Error handling is comprehensive
□ Logging is appropriate
□ No hardcoded values (use config)
□ No commented-out code
□ Functions are focused and small
Commit 1: feat(data): add user model and migrations
Commit 2: feat(repo): implement user repository
Commit 3: feat(service): add user service layer
Commit 4: feat(api): create user endpoints
Commit 5: feat(ui): add user list component
Commit 6: test: add unit tests for user service
Commit 7: test: add integration tests
Goal: Ensure feature works correctly and reliably.
/\
/ \ E2E Tests (few)
/____\
/ \ Integration Tests (some)
/________\
Unit Tests (many)
// Good test structure
it('should create user with valid data', async () => {
// Arrange
const userData = { name: 'John', email: 'john@example.com' };
const mockRepo = { create: jest.fn().mockResolvedValue({ id: '1', ...userData }) };
const service = new UserService(mockRepo);
// Act
const result = await service.create(userData);
// Assert
expect(result).toHaveProperty('id');
expect(mockRepo.create).toHaveBeenCalledWith(userData);
});
// Example: API integration test
describe('POST /api/users', () => {
it('should create a new user', async () => {
const response = await request(app)
.post('/api/users')
.send({ name: 'John', email: 'john@example.com' });
expect(response.status).toBe(201);
expect(response.body).toHaveProperty('id');
});
it('should return 400 for invalid email', async () => {
const response = await request(app)
.post('/api/users')
.send({ name: 'John', email: 'invalid' });
expect(response.status).toBe(400);
});
});
Goal: Polish and prepare for deployment.
□ Does it meet requirements?
□ Is code readable and maintainable?
□ Are edge cases handled?
□ Is error handling comprehensive?
□ Are there any security issues?
□ Is performance acceptable?
□ Is it tested?
□ Is documentation updated?
□ Database queries are optimized (N+1 avoided)
□ No unnecessary re-renders (frontend)
□ Lazy loading implemented where needed
□ Caching strategy appropriate
□ Bundle size acceptable (frontend)
Update:
Goal: Deploy safely to production.
□ All tests passing
□ Migrations tested
□ Feature flags configured (if using)
□ Rollback plan ready
□ Monitoring alerts configured
□ Monitor error rates
□ Check performance metrics
□ Verify feature works in production
□ Communicate to stakeholders
Build MVP first, then enhance:
MVP → Add validation → Add caching → Add analytics → Optimize
Use feature flags for risky changes:
if featureflags.IsEnabled("new-checkout") {
return newCheckoutProcess()
}
return oldCheckoutProcess()
Always have rollback plan:
-- Migration: Add users table
CREATE TABLE users (...);
-- Rollback: Drop users table
-- DROP TABLE users;
Add metrics from day one:
// Track performance
start := time.Now()
result := processOrder(order)
duration := time.Since(start)
metrics.RecordHistogram("order_processing_duration", duration)
// Track errors
if err != nil {
metrics.IncrementCounter("order_processing_errors")
logger.Error("failed to process order", zap.Error(err))
}
Use this skill when:
npx skills add Jonathan0823/feature-development下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer