Skip to content

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:

⚠️ 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:

  1. Explore: Describe the problem to your agent and let it explore the repository structure
  2. Plan: Ask the agent to create an implementation plan
  3. Review: Evaluate the proposed plan and identify any gaps or improvements
  4. Refine: Adjust the plan based on your experience and project requirements
  5. Execute: Direct the agent to implement the changes
  6. Test: Verify the changes using the chrome-devtools MCP or test manually
  7. Debug: Address any issues that arise during testing
  8. Code Review: Review the implementation and request fixes for any problems
  9. 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.

Copyright © MSG Systems Romania AI Labs