Chapter 6 - Small Feature Development
Build a complete small feature by adding supplier support to a product database, including schema changes, API endpoints, and data migrations.
- Reading time: 5 minutes
- Practical time: 2-3 hours
Reading
Briefs
Assets
Skills for feature implementation:
- Download: 06-small-feature-development.tar.gz
⚠️ Important: Extract and overwrite the skills for your chosen tool (Claude Code or Copilot CLI). These assets contain tool-specific skills that should replace any existing configuration in your project.
Practical
Task: Add Supplier Support to Products
Add supplier tracking to an existing product database. This requires coordinating database schema changes, API endpoints, and data migrations.
Context: Work with an existing product catalog system that needs to track which supplier provides each product.
What to do:
- Suppliers table created with proper schema
- Products linked to suppliers via foreign key
- CRUD endpoints working for suppliers (GET only)
- Sample data includes suppliers and product-supplier relationships
- The products endpoint should now include the supplier in their requests
- The UI should be updated for the product creation such that when you create a new product, a supplier must be selected (retrieve list via GET Request).
- Tests have been added or updated
Workflow
Follow this systematic approach to implement the feature:
- Explore: Describe the problem to your agent and let it explore the repository structure
- Plan: Ask the agent to create an implementation plan
- Review: Evaluate the proposed plan and identify any gaps or improvements
- Refine: Adjust the plan based on your experience and project requirements
- Execute: Direct the agent to implement the changes
- Test: Verify the changes using the
chrome-devtoolsMCP or test manually - Debug: Address any issues that arise during testing
- Code Review: Review the implementation and request fixes for any problems
- Commit: Save your work with a descriptive commit message
Alternative approach: Split the work into logical chunks—implement backend changes first, then frontend changes. This results in two focused commits that are easier to review.