Skip to main content

Add Feature Playbook

Step-by-step guide for adding a new feature to an existing project.

Overview

This playbook ensures features are properly planned, built, and shipped.

Checklist

Before Coding

  • Feature is defined in a spec
  • Acceptance criteria are clear
  • Design is approved (if UI changes)
  • Technical approach is decided

Development

  • Create feature branch
  • Implement backend changes
  • Implement frontend changes
  • Write tests
  • Update documentation

Review & Ship

  • Self-review code
  • Request peer review
  • Address feedback
  • Merge to main
  • Verify in staging
  • Deploy to production

Workflow

1. Create Feature Branch

git checkout main
git pull
git checkout -b feature/[feature-name]

Branch naming:

  • feature/ - New functionality
  • fix/ - Bug fixes
  • refactor/ - Code improvements
  • docs/ - Documentation

2. Implement Changes

Follow this order:

  1. Database - Schema changes first
  2. Backend - API endpoints
  3. Frontend - UI components
  4. Tests - Cover new functionality

3. Write Tests

At minimum:

  • Unit tests for business logic
  • Integration tests for API endpoints
  • E2E tests for critical paths

4. Self-Review

Before requesting review:

  • Code follows style guide
  • No console.logs or debug code
  • Tests pass locally
  • No TypeScript errors
  • Feature works as expected

5. Create Pull Request

PR description should include:

  • What changed
  • Why it changed
  • How to test
  • Screenshots (if UI changes)

6. Address Review Feedback

  • Respond to all comments
  • Make requested changes
  • Re-request review when ready

7. Merge and Deploy

# After approval
git checkout main
git pull
git merge feature/[feature-name]
git push

Tips

  • Keep PRs small and focused
  • One feature per branch
  • Communicate blockers early
  • Test on staging before production